/* The arena poster: SHOW MARKER (marker.html and #/marker) and the poster panels, tips and sheet in the match flow. */

/* MARK: SHOW MARKER */

body.marker-body { background: #070918; }
body.marker-body .marker-screen { background: radial-gradient(1200px 700px at 20% 0%, #1b2150, #0b0d22); }

/* Over the whole console (top bar included): the page is a screen of its own. */
.marker-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-x: hidden;
  overflow-y: auto;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(27, 33, 80, 0.97), rgba(8, 10, 30, 0.98)), #070918;
  color: var(--text);
}
.marker-screen .spacer { flex: 1; }

.marker-setup, .marker-check { display: grid; gap: 1.4rem; max-width: 64rem; margin: 0 auto; padding: 1.2rem var(--gutter) 3rem; }
.marker-top { display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; }
.marker-title { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 900; text-shadow: 0 0.3rem 1.4rem rgba(0, 0, 0, 0.45); }
.marker-intro { display: grid; gap: 0.5rem; }
.marker-lead { max-width: 48rem; color: var(--muted); font-size: 1.2rem; }
.marker-lead b { color: var(--text); }

.marker-steps { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.marker-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 0.12rem solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
}
.marker-step-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0.14rem solid var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.marker-step-mark .icon { width: 1.4rem; height: 1.4rem; }
.marker-step-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--faint); }
.marker-step.is-todo .marker-step-dot { background: var(--yellow); box-shadow: 0 0 0.6rem var(--yellow); animation: pulse 1.4s ease-in-out infinite; }
.marker-step.is-done .marker-step-mark { border-color: rgba(53, 224, 124, 0.8); background: rgba(20, 120, 60, 0.35); color: var(--green); }
.marker-step.is-problem { border-color: rgba(255, 176, 32, 0.7); background: linear-gradient(180deg, rgba(90, 60, 10, 0.7), rgba(40, 24, 6, 0.85)); }
.marker-step.is-problem .marker-step-mark { border-color: var(--amber); color: var(--amber); }
.marker-step-text b { display: block; font-size: 1.55rem; font-weight: 900; }
.marker-step-text p { margin-top: 0.2rem; color: var(--muted); font-size: 1.08rem; }
.marker-step.is-problem .marker-step-text p { color: #ffe1a6; font-weight: 600; }
.marker-step-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }

.marker-go-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.marker-go { min-width: min(100%, 24rem); }
.marker-go-note { color: var(--muted); font-size: 1rem; }

.marker-tips { display: grid; gap: 0.6rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-lg); border: 0.1rem solid var(--line); background: rgba(4, 6, 20, 0.45); }
.marker-tips ul { display: grid; gap: 0.45rem; margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 1.08rem; }
.marker-tips b { color: var(--text); }
.marker-foot { font-size: 1rem; }

/* Size check: the bank-card outline at the current pixels per mm. */
.marker-check-head { display: grid; gap: 0.5rem; }
.marker-check-head p { max-width: 50rem; color: var(--muted); font-size: 1.15rem; }
.marker-card-stage { display: grid; place-items: center; min-height: 14rem; padding: 1rem; border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.04); border: 0.1rem dashed var(--line-strong); }
.marker-card {
  position: relative;
  box-sizing: border-box;
  border: 2px solid var(--yellow);
  background: rgba(255, 210, 26, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 2rem rgba(255, 210, 26, 0.18);
}
.marker-card-chip { position: absolute; left: 12%; top: 34%; width: 14%; height: 20%; border-radius: 12%; border: 2px solid rgba(255, 210, 26, 0.7); }
.marker-card-label { position: absolute; right: 8%; bottom: 10%; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 210, 26, 0.8); }
.marker-check-controls { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.marker-slider { flex: 1 1 18rem; min-width: 12rem; height: 2.6rem; accent-color: var(--yellow); }
.marker-check-readout { min-width: 9rem; font-family: var(--mono); color: var(--muted); }
.marker-check-actions { display: flex; justify-content: flex-end; gap: 0.8rem; flex-wrap: wrap; }

/* Showing: white, the artwork at its real size in the middle, nothing else but the corner hint. */
.marker-screen[data-mode="show"] { overflow: hidden; background: #fff; cursor: none; }
.marker-screen[data-mode="show"].hint-on { cursor: default; }
.marker-stage { position: absolute; inset: 0; display: grid; place-items: center; background: #fff; }
.marker-art { display: block; max-width: none; image-rendering: auto; }
.marker-hint {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: calc(100% - 1.6rem);
  padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  border-radius: 0.8rem;
  background: rgba(10, 13, 31, 0.86);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.marker-screen.hint-on .marker-hint { opacity: 1; pointer-events: auto; }
.marker-hint.is-warning { background: #b3121f; }
.marker-exit { --btn-bg: rgba(255, 255, 255, 0.14); }
.marker-nofit { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 2rem; text-align: center; background: #0a0d1f; color: #fff; }
.marker-nofit h1 { font-size: 3rem; }
.marker-nofit p { max-width: 40rem; color: var(--muted); font-size: 1.2rem; }

@media (max-width: 700px) {
  .marker-step { grid-template-columns: auto minmax(0, 1fr); }
  .marker-step > :last-child:not(.marker-step-text) { grid-column: 1 / -1; justify-self: start; }
  .marker-step-actions { justify-content: flex-start; }
  .marker-go { width: 100%; }
}

/* MARK: Poster in the match flow */

/* The sheet behind every POSTER button. */
.sheet-poster { width: min(94vw, 66rem); }
.poster-sheet { display: grid; grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr); gap: 2rem; padding: 2rem 2rem 0.6rem; align-items: start; }
.poster-sheet-art { display: grid; gap: 0.6rem; margin: 0; }
.poster-sheet-art img { display: block; width: 100%; height: auto; border-radius: 0.5rem; background: #fff; border: 0.6rem solid #fff; box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.45); }
.poster-sheet-art figcaption { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-size: 0.95rem; text-align: center; }
.poster-sheet-main { display: grid; gap: 0.7rem; min-width: 0; }
.poster-sheet-title { font-size: 3rem; font-weight: 900; }
.poster-reminder { font-size: 1.25rem; font-weight: 600; }
.poster-note { max-width: none; }
.poster-sheet-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0.3rem 0; }
.poster-howto { display: grid; gap: 0.35rem; margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 1.02rem; }
.poster-howto b { color: var(--text); }
.poster-more { font-size: 0.98rem; }
.poster-sheet-foot { padding: 0.4rem 0 1.4rem; }
@media (max-width: 760px) {
  .poster-sheet { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 1.2rem 0.4rem; }
  .poster-sheet-art { max-width: 18rem; }
  .poster-sheet-title { font-size: 2.4rem; }
}

/* The lobby: under SCAN TO JOIN while players are scanning the arena (the QR gives up the room it needs). */
.poster-tip {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.65rem 0.85rem 0.7rem;
  border-radius: 1.1rem;
  border: 0.18rem solid rgba(255, 210, 26, 0.85);
  background: linear-gradient(180deg, rgba(70, 52, 0, 0.94), rgba(32, 22, 0, 0.96));
  box-shadow: 0 0.8rem 2.2rem rgba(0, 0, 0, 0.5), 0 0 2rem rgba(255, 190, 0, 0.25);
  animation: panel-in 0.4s var(--ease-out);
}
.poster-tip-title { display: flex; align-items: center; gap: 0.4rem; font-size: min(1.35rem, 6.2cqw); font-weight: 900; color: var(--yellow); line-height: 1.05; overflow-wrap: anywhere; }
.poster-tip-title .icon { width: 1.2em; height: 1.2em; }
.poster-tip-text { font-size: 0.92rem; line-height: 1.3; color: #fff3cf; }
.poster-tip-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.15rem; }
/* SCAN TO JOIN's QR gives the tip the room it needs (see .join-qr in match.css). */
.join-wrap:has(.poster-tip:not([hidden])) .join-qr { width: min(100%, calc(100cqh - 27rem)); }
.join-wrap:has(.poster-tip:not([hidden])):has(.join-warning:not([hidden])) .join-qr { width: min(100%, calc(100cqh - 33rem)); }
/* A phone's lobby scrolls, so the QR keeps its size. */
@media (max-width: 760px) {
  .join-wrap:has(.poster-tip:not([hidden])) .join-qr, .join-wrap:has(.poster-tip:not([hidden])):has(.join-warning:not([hidden])) .join-qr { width: min(100%, 17rem); }
  .poster-tip-title { font-size: 1.25rem; }
}

/* The share sheet's poster line. */
.share-poster { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 0.8rem; align-items: center; margin-top: 0.6rem; padding: 0.8rem 0.9rem; border-radius: 1rem; border: 0.1rem solid var(--line); background: rgba(255, 255, 255, 0.05); }
.share-poster-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; background: rgba(255, 210, 26, 0.16); color: var(--yellow); }
.share-poster p { color: var(--muted); }
.share-poster p b { color: var(--text); }
.share-poster-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* BIBS: the poster as the print run's last page. */
.bibs-poster-row { display: flex; align-items: center; gap: 0.9rem; }
.bibs-poster-row p { font-size: 0.95rem; line-height: 1.3; }

/* ARENAS detail. */
.poster-arena-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
