/* Versle Group Play. One stylesheet for the TV, the remote, phones and the
   landing page. The TV sizes everything in rem off the viewport width so it
   reads from the back of a youth room at any resolution. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/BricolageGrotesque-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/fonts/Merriweather-Variable-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #121212;
  --surface: #1c1c1c;
  --surface-2: #262626;
  --surface-3: #303030;
  --line: rgba(253, 244, 228, 0.12);
  --ink: #fdf4e4;
  --muted: rgba(253, 244, 228, 0.62);
  --faint: rgba(253, 244, 228, 0.35);
  --green: #608b54;
  --yellow: #b19f4c;
  --gray: rgba(255, 255, 255, 0.1);
  --primary: #4e8543;
  --primary-hover: #5a9650;
  --danger: #c0645b;
  --gold: #e3b341;
  --radius: 14px;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
a { color: var(--ink); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.875em; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8em; color: var(--muted); font-weight: 600; }

/* ---- controls -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.6em 1.15em; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.08s;
  touch-action: manipulation;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: #f0a79f; border-color: rgba(192, 100, 91, 0.45); background: transparent; }
.btn.small { min-height: 40px; padding: 0.4em 0.9em; font-size: 0.9rem; }
.btn.block { display: flex; width: 100%; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0.4em; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45em; }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 999px; padding: 0.45em 0.95em; font-size: 0.92rem; cursor: pointer; min-height: 40px;
  display: inline-flex; align-items: center; gap: 0.4em;
}
.chip.on { background: var(--ink); color: #161616; border-color: var(--ink); font-weight: 700; }

.field {
  width: 100%; padding: 0.75em 0.9em; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-size: 1.15rem; outline: none;
}
.field:focus { border-color: var(--ink); }
.field.code { text-transform: uppercase; letter-spacing: 0.35em; font-weight: 800; font-size: 1.8rem; text-align: center; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 2.2em; height: 2.2em; border-radius: 50%;
  font-weight: 800; font-size: 0.85em; color: #161616;
}
.avatar.xs { width: 1.6em; height: 1.6em; font-size: 0.7em; }
.avatar.sm { width: 1.9em; height: 1.9em; font-size: 0.75em; }
.avatar.lg { width: 3.4em; height: 3.4em; font-size: 1.3em; }
.avatar.xl { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }

.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.qr { background: #fff; border-radius: 10px; padding: 4px; line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }

.entry-err { color: #f0a79f; min-height: 1.2em; margin: 0.4em 0; font-size: 0.92rem; }

/* ---- TV chrome ---------------------------------------------------------------- */

html:has(body.tv) { font-size: clamp(12px, 1.1vw, 30px); }
body.tv { height: 100vh; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }

.tv-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0.8rem 1.6rem; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 1.9rem; height: 1.9rem; border-radius: 0.45rem; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); }
.top-title { font-weight: 700; font-size: 1.15rem; color: var(--muted); }
.top-right { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; }
.join-pill {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.35rem 0.4rem 0.35rem 0.9rem;
  border-radius: 999px; background: var(--surface-2); font-size: 1rem;
}
.join-pill strong { background: var(--ink); color: #161616; border-radius: 999px; padding: 0.15rem 0.7rem; letter-spacing: 0.2em; font-size: 1.15rem; }
.pill-btn {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.85rem; cursor: pointer; white-space: nowrap;
}
.pill-btn:hover { color: var(--ink); border-color: var(--faint); }
.pill-btn.on { color: #b9e3ad; border-color: rgba(96, 139, 84, 0.6); }
.pill-btn.icon { font-size: 1rem; padding: 0.3rem 0.6rem; }

.tv-stage { position: relative; overflow: hidden; padding: 1.4rem 2.2rem; display: flex; flex-direction: column; min-height: 0; }
.loading { margin: auto; display: grid; justify-items: center; gap: 1rem; color: var(--muted); font-size: 1.2rem; }

.tv-bar { position: relative; border-top: 1px solid var(--line); background: #171717; padding: 0.6rem 1.4rem 0.7rem; font-size: 15px; }
.tv-bar.collapsed .bar-inner { display: none; }
.tv-bar.collapsed { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.bar-toggle { position: absolute; right: 1rem; top: -1.9rem; border: 1px solid var(--line); border-bottom: 0; background: #171717; color: var(--muted); border-radius: 10px 10px 0 0; padding: 0.25rem 0.8rem; font-size: 0.8rem; cursor: pointer; }
.bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.bar-inner .opt-group { display: flex; align-items: center; gap: 0.6rem; }
.bar-inner .ctl-label { color: var(--muted); font-size: 0.9rem; }
.bar-inner .game-btns { display: flex; gap: 0.6rem; }
.bar-inner .game-btn span { display: none; }
.bar-inner .ctl-row.end { margin-left: auto; }
.bar-inner .pad { display: none; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; z-index: 20; animation: rise 0.2s; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2rem 2.2rem; width: min(52rem, 92vw); }
.modal h2 { margin: 0 0 1.2rem; font-size: 1.8rem; }
.pair { display: grid; grid-template-columns: 14rem 1fr; gap: 1.8rem; align-items: center; font-size: 1.15rem; line-height: 1.5; }
.pair p { margin: 0 0 0.8rem; }
.pair .ok { color: #b9e3ad; }
.modal-actions { display: flex; gap: 0.8rem; margin-top: 1.4rem; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); background: var(--ink); color: #161616; padding: 0.7rem 1.2rem; border-radius: 12px; font-weight: 600; z-index: 30; animation: rise 0.2s; }

/* ---- TV: menu, lobby, final ----------------------------------------------------- */

.menu, .lobby { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.4rem; flex: 1; min-height: 0; }
.menu h1, .lobby h1 { font-size: 3rem; margin: 0.2rem 0 1.4rem; letter-spacing: -0.02em; }
.game-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.game-card {
  text-align: left; display: grid; gap: 0.3rem; padding: 1.3rem 1.5rem; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 1.1rem;
  animation: rise 0.3s both;
}
.game-card:nth-child(2) { animation-delay: 0.06s; }
.game-card:nth-child(3) { animation-delay: 0.12s; }
.game-card:nth-child(4) { animation-delay: 0.18s; }
.game-card:hover { background: var(--surface-2); }
.game-card strong { font-size: 1.9rem; }
.game-card span:last-child { color: var(--muted); }
.badge { justify-self: start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 6px; background: rgba(96, 139, 84, 0.25); color: #b9e3ad; }
.badge.sword { background: rgba(227, 179, 65, 0.18); color: #f0d78f; }
.badge.classic { background: rgba(109, 157, 197, 0.2); color: #b5d3ee; }
.badge.wolf { background: rgba(192, 100, 91, 0.2); color: #f0b2aa; }

.menu-side, .lobby-side { display: flex; flex-direction: column; gap: 1.2rem; min-height: 0; }
.join-panel { display: grid; grid-template-columns: 10rem 1fr; gap: 1.2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem; }
.join-panel.big { grid-template-columns: 14rem 1fr; }
.join-step { color: var(--muted); font-size: 1rem; }
.join-url { font-weight: 800; font-size: 1.6rem; margin: 0.1rem 0 0.4rem; word-break: break-all; }
.join-code { font-weight: 900; font-size: 3.4rem; letter-spacing: 0.18em; line-height: 1.1; }
.join-panel.big .join-code { font-size: 4.4rem; }
.cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; align-content: flex-start; overflow: hidden; }
.cloud.empty { color: var(--faint); font-size: 1.1rem; padding: 0.5rem; }
.cloud-chip { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--surface-2); border-radius: 999px; padding: 0.3rem 0.85rem 0.3rem 0.3rem; font-size: 1.15rem; font-weight: 600; }
.cloud.dense .cloud-chip { font-size: 0.95rem; }
.pop { animation: pop 0.35s cubic-bezier(.2, 1.4, .4, 1) both; }

.lobby-info { display: flex; flex-direction: column; }
.howto { font-size: 1.45rem; line-height: 1.45; padding-left: 1.4em; margin: 0 0 1.4rem; }
.howto li { margin-bottom: 0.5rem; }
.howto.small { font-size: 0.95rem; text-align: left; }
.summary { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.summary-chip { background: var(--surface-2); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 1rem; color: var(--muted); }
.lobby-hint { margin-top: auto; font-size: 1rem; }
.team-list { display: grid; gap: 0.8rem; }
.team-card { padding: 1.4rem 1.6rem; border-radius: 18px; background: color-mix(in srgb, var(--team) 22%, var(--surface)); border-left: 0.6rem solid var(--team); font-size: 2.2rem; font-weight: 800; }
.no-phones { margin: auto; text-align: center; }
.no-phones .big { font-size: 2.4rem; font-weight: 800; }
.no-phones p { color: var(--muted); font-size: 1.3rem; }

.final { margin: auto; text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; }
.final h1 { font-size: 3.6rem; margin: 0.3rem 0 2rem; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.2rem; }
.podium-step { display: grid; justify-items: center; gap: 0.4rem; width: 13rem; animation: rise 0.5s both; }
.podium-step.p1 { animation-delay: 0.6s; }
.podium-step.p2 { animation-delay: 0.3s; }
.podium-name { font-weight: 800; font-size: 1.5rem; }
.podium-score { color: var(--muted); font-size: 1.2rem; }
.podium-block { width: 100%; border-radius: 14px 14px 0 0; background: var(--surface-2); display: grid; place-items: center; font-size: 2.4rem; font-weight: 900; color: var(--faint); }
.p1 .podium-block { height: 11rem; background: color-mix(in srgb, var(--gold) 30%, var(--surface-2)); color: var(--gold); }
.p2 .podium-block { height: 8rem; }
.p3 .podium-block { height: 6rem; }
.team-dot { width: 3.4rem; height: 3.4rem; border-radius: 50%; }
.final-rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.6rem; max-width: 70rem; }
.rest-chip { background: var(--surface-2); border-radius: 999px; padding: 0.35rem 0.85rem; color: var(--muted); }
.final-cta { margin-top: 2.2rem; font-size: 1.3rem; color: var(--muted); }
.final-cta strong { color: var(--ink); }

/* ---- TV: shared game pieces ----------------------------------------------------- */

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.round-pill { background: var(--surface-2); border-radius: 999px; padding: 0.35rem 1rem; font-weight: 700; font-size: 1.05rem; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.timer.big { font-size: 2.6rem; min-width: 3ch; text-align: right; }
.timer.low { color: #f0a79f; }
.timebar { height: 0.45rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.6rem 0 0; }
.timebar i { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: inherit; transition: width 0.2s linear; }

.verse-big, .verse-med, .verse-small {
  font-family: var(--serif); margin: 0 auto; text-align: center; line-height: 1.45; max-width: 62rem;
  text-wrap: balance;
}
.verse-big { font-size: 2.5rem; margin-top: 2.2rem; margin-bottom: 1.2rem; }
.verse-med { font-size: 1.7rem; margin-top: 1rem; margin-bottom: 0.8rem; }
.verse-small { font-size: 1.25rem; color: var(--muted); margin-bottom: 0.4rem; }
.prompt { text-align: center; color: var(--muted); font-size: 1.3rem; margin: 0.4rem 0 1.4rem; }

.lock-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }
.lock-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem; border-radius: 999px; background: var(--surface); color: var(--faint); font-weight: 600; opacity: 0.6; transition: all 0.3s; }
.lock-chip.on { background: var(--surface-2); color: var(--ink); opacity: 1; box-shadow: 0 0 0 2px rgba(96, 139, 84, 0.8); }
.lock-chip.on::after { content: '✓'; color: #b9e3ad; margin-left: 0.2rem; }

.answer-line { display: flex; align-items: baseline; justify-content: center; gap: 1rem; margin: 0.6rem 0 0.4rem; animation: pop 0.45s both; }
.answer-ref { font-size: 3.4rem; font-weight: 900; letter-spacing: -0.02em; }
.answer-sub { color: var(--muted); font-size: 1.3rem; }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem 1rem; min-width: 18rem; }
.board-title { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; margin-bottom: 0.4rem; }
.board-row { display: grid; grid-template-columns: 1.6rem auto 1fr auto; align-items: center; gap: 0.55rem; padding: 0.22rem 0; font-size: 1.05rem; }
.board-row.me { color: #b9e3ad; }
.board-rank { color: var(--faint); font-weight: 800; }
.board-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-score { font-variant-numeric: tabular-nums; font-weight: 700; }
.board-more { color: var(--faint); font-size: 0.9rem; padding-top: 0.2rem; }

/* ---- Bookmark Showdown ------------------------------------------------------------ */

.bm-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.shelf-wrap { position: relative; margin: 0.8rem 0 0; }
.shelf { position: relative; height: 2.6rem; border-radius: 6px; overflow: visible; background: var(--surface); }
.shelf-book { position: absolute; top: 0; bottom: 0; border-right: 1px solid rgba(0, 0, 0, 0.45); opacity: 0.85; }
.shelf-labels { position: relative; height: 1.4rem; margin-top: 0.35rem; }
.shelf-labels span { position: absolute; top: 0; text-align: center; font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pins { position: relative; height: calc(var(--rows, 1) * 2rem + 1.2rem); }
.pin { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: drop 0.5s cubic-bezier(.3, 1.4, .5, 1) both; z-index: 2; }
.pin-flag { margin-bottom: calc(var(--row) * 2rem); padding: 0.15rem 0.55rem; border-radius: 6px; font-weight: 700; font-size: 0.9rem; color: #161616; white-space: nowrap; }
.pin i { position: absolute; bottom: -2.6rem; width: 3px; height: calc(2.6rem + var(--row) * 2rem); border-radius: 2px; z-index: -1; }
.pin.exact .pin-flag { box-shadow: 0 0 0 3px var(--gold); }
@keyframes drop { from { transform: translate(-50%, -2.5rem); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.shelf-answer { position: absolute; top: -0.6rem; bottom: -0.6rem; width: 0.4rem; margin-left: -0.2rem; background: var(--gold); border-radius: 4px; box-shadow: 0 0 1.2rem var(--gold); z-index: 3; animation: pop 0.5s both; }
.shelf-answer span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 0.3rem; background: var(--gold); color: #161616; font-weight: 800; padding: 0.15rem 0.6rem; border-radius: 6px; white-space: nowrap; font-size: 1rem; }
.shelf-marker { position: absolute; top: -0.5rem; bottom: -0.5rem; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6); z-index: 3; }
.shelf-marker::before { content: ''; position: absolute; top: -0.55rem; left: 50%; transform: translateX(-50%); border: 0.45rem solid transparent; border-top-color: var(--ink); }
.reveal .shelf-labels { margin-top: 2.6rem; }
/* Auto margins center the reveal under the round pill, and collapse to zero
   instead of clipping the top when a full room makes it taller than the screen. */
.bm-stage.reveal .answer-line { margin-top: auto; }
.bm-stage.reveal .answer-ref { font-size: 3rem; }
.reveal-cols { display: grid; grid-template-columns: 1fr auto; gap: 1.6rem; margin-top: 0.8rem; margin-bottom: auto; align-items: start; }
.round-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 1.4rem; }
.rr { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 0.6rem; font-size: 1.1rem; padding: 0.35rem 0.6rem; border-radius: 10px; animation: rise 0.4s both; }
.rr.best { background: rgba(227, 179, 65, 0.14); }
.rr-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-guess { color: var(--muted); }
.rr-off { color: var(--muted); font-variant-numeric: tabular-nums; }
.rr-pts { font-weight: 800; font-variant-numeric: tabular-nums; color: #b9e3ad; }

/* ---- Classic Live ------------------------------------------------------------------ */

.cl-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cl-rows { display: grid; gap: 0.35em; }
.cl-row { display: flex; align-items: center; gap: 0.3em; }
.tile { width: 1.9em; height: 2.2em; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--gray); background: transparent; }
.tile.book { width: 7.5em; padding: 0 0.4em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile.c0 { background: var(--gray); border-color: transparent; }
.tile.c1 { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.tile.c2 { background: var(--green); border-color: var(--green); color: #fff; }
.cl-row:not(.empty) .tile { animation: pop 0.3s both; }
.sep { width: 0.5em; text-align: center; font-weight: 800; color: var(--muted); }
.hint { min-width: 4.2em; padding-left: 0.4em; font-weight: 800; display: flex; align-items: center; gap: 0.25em; }
.hint small { font-weight: 600; color: var(--muted); font-size: 0.75em; }
.cl-rows.xl { font-size: 1.7rem; }
.cl-stage.room .verse-big { font-size: 2.1rem; margin-top: 1rem; margin-bottom: 0.6rem; }
.cl-stage.room .answer-line { margin: 0 0 0.4rem; }
.cl-rows.md { font-size: 0.9rem; }
.cl-rows.sm { font-size: 0.5rem; gap: 0.25rem; }
.cl-rows.sm .tile { width: 1.6em; height: 1.6em; border-width: 1px; }
.cl-rows.sm .tile.book { width: 4.2em; }
.cl-rows.sm .hint { min-width: 1.5em; font-size: 1.6em; }
.cl-room-body { display: flex; gap: 3rem; justify-content: center; align-items: flex-start; margin-top: 1rem; }
.cl-side { display: flex; flex-direction: column; gap: 0.6rem; width: 30rem; }
.cl-side .prompt { text-align: left; margin: 0; font-size: 1.6rem; color: var(--ink); font-weight: 800; }
.book-strip-title { color: var(--muted); font-weight: 700; margin-bottom: 0.4rem; }
.book-strip-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.25rem; }
.bs { font-size: 0.8rem; padding: 0.2rem 0.1rem; text-align: center; border-radius: 4px; background: color-mix(in srgb, var(--sec) 35%, var(--surface)); transition: opacity 0.4s; }
.bs.out { opacity: 0.12; }
.cl-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); align-content: start; margin-top: 0.4rem; overflow: hidden; }
.cl-grid.n1, .cl-grid.n2, .cl-grid.n3, .cl-grid.n4 { grid-template-columns: repeat(auto-fit, minmax(16rem, 20rem)); justify-content: center; }
.cl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 0.8rem; font-size: 1rem; }
.cl-grid.n1 .cl-rows.sm, .cl-grid.n2 .cl-rows.sm, .cl-grid.n3 .cl-rows.sm, .cl-grid.n4 .cl-rows.sm { font-size: 0.75rem; }
.cl-card.solved { border-color: var(--green); box-shadow: 0 0 0 2px rgba(96, 139, 84, 0.5); }
.cl-card.out { opacity: 0.55; }
.cl-card-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem; font-weight: 700; }
.cl-card-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-badge { background: var(--green); color: #fff; border-radius: 6px; padding: 0.05rem 0.45rem; font-size: 0.8rem; }
.cl-badge.out { background: var(--surface-3); color: var(--muted); }
.cl-stage.race .board { position: absolute; right: 2.2rem; bottom: 1.4rem; }
.entry { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.entry-input { min-width: 22rem; padding: 0.6rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.05rem; outline: none; }
.entry-input:focus { border-color: var(--ink); }

/* ---- Sword Drill --------------------------------------------------------------------- */

.sw-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sw-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; }
.sw-command { font-size: 6rem; font-weight: 900; letter-spacing: -0.03em; animation: pop 0.4s both; }
.sw-sub { font-size: 1.7rem; color: var(--muted); }
.sw-ref { font-size: 7rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; animation: pop 0.4s both; }
.sw-ref.small { font-size: 3.6rem; }
.sw-charge { font-size: 3rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); animation: pop 0.3s both; }
.stopwatch { font-size: 3.2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.sw-found { font-size: 5rem; font-weight: 900; animation: pop 0.4s both; }
.sw-time { font-size: 1.8rem; color: var(--muted); }
.sw-teams { display: flex; justify-content: center; gap: 1rem; padding-top: 1rem; }
.sw-team { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.3rem; border-radius: 16px; background: color-mix(in srgb, var(--team) 22%, var(--surface)); border: 2px solid transparent; font-size: 1.6rem; font-weight: 800; min-width: 13rem; }
.sw-team.won { border-color: var(--team); animation: pop 0.4s both; }
.sw-team-key { width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 8px; background: rgba(0, 0, 0, 0.3); font-size: 0.7em; color: var(--muted); }
.sw-team-name { flex: 1; }
.sw-team-score { font-size: 2.2rem; font-variant-numeric: tabular-nums; }

/* ---- Wolf in Sheep's Clothing --------------------------------------------------------- */

.wf-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.wf-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.6rem; }
.wf-emoji { font-size: 3.2rem; line-height: 1.1; }
.wf-emoji.small { font-size: 2.4rem; }
.wf-title { font-size: 3.6rem; margin: 0.2rem 0; letter-spacing: -0.02em; animation: pop 0.4s both; }
.wf-sub { font-size: 1.45rem; color: var(--muted); margin: 0 0 0.8rem; max-width: 46rem; text-align: center; }
.wf-chips { margin-top: 1rem; padding-top: 0; }
.wf-clues { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4rem; align-items: center; min-height: 0; }
.wf-turn { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.7rem; }
.wf-turn .avatar.xl { width: 7rem; height: 7rem; font-size: 2.6rem; animation: pop 0.4s both; }
.wf-speaker { font-size: 3.4rem; font-weight: 900; letter-spacing: -0.02em; }
.wf-board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1.1rem; display: grid; gap: 0.15rem; align-self: center; max-height: 100%; overflow: hidden; }
.wf-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border-radius: 10px; font-size: 1.15rem; }
.wf-row.now { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--ink); }
.wf-row.wolf { background: rgba(192, 100, 91, 0.18); }
.wf-row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-words { display: flex; gap: 0.4rem; }
.wf-word { background: var(--ink); color: #161616; font-weight: 800; border-radius: 8px; padding: 0.1rem 0.6rem; animation: pop 0.3s both; }
.wf-word.skip { background: transparent; color: var(--faint); font-weight: 600; }
.wf-voters { display: flex; gap: 0.2rem; flex-wrap: wrap; justify-content: flex-end; }
.wf-count { font-weight: 900; font-size: 1.4rem; min-width: 1.6rem; text-align: right; }
.wf-result { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: auto; }
.wf-result .wf-sub { margin-bottom: 0.6rem; }
.wf-story { display: flex; align-items: baseline; gap: 0.8rem; background: var(--surface); border-radius: 14px; padding: 0.6rem 1.2rem; }
.wf-story span { color: var(--muted); }
.wf-story strong { font-size: 1.8rem; }
.wf-cols { grid-template-columns: 1fr 1fr auto; margin-bottom: auto; }
.wf-gains { display: grid; gap: 0.2rem; align-content: start; }

.wf-cat { color: var(--muted); font-weight: 600; font-size: 0.9rem; text-align: right; }
.wf-card {
  position: relative; min-height: 13rem; border-radius: 20px; border: 2px dashed var(--line);
  background: var(--surface); display: grid; place-items: center; text-align: center; padding: 1.2rem;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer;
}
.wf-card-back { display: grid; gap: 0.5rem; justify-items: center; color: var(--muted); font-weight: 700; }
.wf-card-face { display: none; gap: 0.3rem; justify-items: center; }
.wf-card-face p { margin: 0; color: var(--muted); }
.wf-card-face .big { font-size: 1.4rem; font-weight: 800; }
.wf-card.peek { border-style: solid; border-color: var(--ink); }
.wf-card.peek .wf-card-back { display: none; }
.wf-card.peek .wf-card-face { display: grid; }
.wf-card-cat { font-size: 1.6rem; font-weight: 900; line-height: 1.2; margin: 0.2rem 0 0.4rem; }
.wf-myturn { background: rgba(96, 139, 84, 0.18); border-radius: 16px; padding: 1.1rem; display: grid; gap: 0.6rem; text-align: center; }
.wf-myturn .big, .wf-vote .big { font-size: 1.5rem; font-weight: 800; }
.wf-myturn p { margin: 0; color: var(--muted); }
.wf-vote { display: grid; gap: 0.55rem; }
.wf-vote .big { text-align: center; margin-bottom: 0.3rem; }
.wf-vote-btn { justify-content: flex-start; min-height: 54px; font-size: 1.05rem; }

/* ---- the pass-one-phone page ------------------------------------------------------- */

.solo { max-width: 520px; margin: 0 auto; padding: 1rem 1.1rem calc(2rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 1rem; min-height: 100dvh; }
.solo h1 { margin: 0.2rem 0; font-size: 1.8rem; line-height: 1.15; }
.solo .center { text-align: center; display: grid; gap: 0.8rem; justify-items: center; margin: auto 0; }
.solo-names { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.solo-add { display: flex; gap: 0.5rem; }
.solo-add .field { flex: 1; min-width: 0; }
.solo-order { margin: 0; padding-left: 1.4em; font-size: 1.2rem; line-height: 1.7; }
.solo-reveal { min-height: 16rem; }
.solo .wf-story { flex-direction: column; align-items: center; gap: 0.1rem; text-align: center; }
.solo .wf-story strong { font-size: 1.5rem; }

/* ---- control panels (remote and TV bar) ---------------------------------------------- */

.opt-group { display: grid; gap: 0.4rem; }
.opt-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.ctl-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ctl-label { color: var(--muted); font-size: 0.95rem; }
.team-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.6rem; }
.btn.team { background: color-mix(in srgb, var(--team) 70%, #000); border-color: transparent; color: #fff; min-height: 64px; font-size: 1.2rem; }
.btn.team.small { min-height: 44px; font-size: 1rem; background: color-mix(in srgb, var(--team) 30%, var(--surface-2)); }
.btn.team.won { box-shadow: 0 0 0 3px var(--ink); }
.bar-inner .btn.team { min-height: 44px; font-size: 1rem; }
.bar-inner .team-btns { display: flex; }
.game-btns { display: grid; gap: 0.6rem; }
.game-btn { flex-direction: column; align-items: flex-start; text-align: left; padding: 0.8rem 1rem; }
.game-btn strong { font-size: 1.1rem; }
.game-btn span { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.chip.player { padding-left: 0.3em; }

/* ---- phones ---------------------------------------------------------------------- */

body.phone { font-size: 16px; }
.phone-screen { padding: 1rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }
.phone-screen.center { text-align: center; align-items: center; padding-top: 2.5rem; }
.phone-screen h1 { margin: 0.3rem 0; font-size: 1.7rem; }
.join-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 800; font-size: 1.4rem; margin: 1.5rem 0 0.5rem; }
.join-brand img { width: 2.2rem; height: 2.2rem; border-radius: 0.5rem; }
.join-brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.join-form { display: grid; gap: 1rem; }
.join-form label { display: grid; gap: 0.4rem; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.player-page { min-height: 100dvh; }
.me-bar { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); font-weight: 700; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.me-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-room { color: var(--muted); letter-spacing: 0.15em; font-size: 0.85rem; }
.phone-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 700; }
.phone-head .timer { font-size: 1.4rem; color: var(--ink); }
.phone-head .timer.low { color: #f0a79f; }
.phone-wait { display: grid; justify-items: center; gap: 0.9rem; padding: 2rem 0.5rem; text-align: center; color: var(--muted); font-size: 1.05rem; }
.phone-wait p { margin: 0; }
.next-game { background: var(--surface); border-radius: 14px; padding: 0.8rem 1.2rem; display: grid; gap: 0.2rem; }
.next-game strong { font-size: 1.3rem; }
.remote-warn { background: rgba(192, 100, 91, 0.16); border: 1px solid rgba(192, 100, 91, 0.4); border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.6rem 1rem 0; font-size: 0.95rem; }
.verse-phone { font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; margin: 0; padding: 0.8rem 0.9rem; background: var(--surface); border-radius: 12px; max-height: 9.5rem; overflow: auto; }

.placer { display: flex; flex-direction: column; gap: 0.9rem; }
.placer-readout { text-align: center; font-size: 2rem; font-weight: 800; min-height: 2.6rem; }
.placer-readout .muted { font-size: 1.15rem; font-weight: 600; }
.placer-shelf { touch-action: none; padding: 0.7rem 0 0.1rem; cursor: pointer; }
.placer-shelf .shelf { height: 4rem; }
.placer-shelf .shelf-labels { height: 2.4rem; }
.placer-shelf .shelf-labels span { font-size: 0.6rem; white-space: normal; line-height: 1.1; }
.placer-fine { display: grid; gap: 0.6rem; }
.placer-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; }
.placer-row-label { text-align: center; color: var(--muted); font-size: 0.85rem; }
.placer-slider { width: 100%; accent-color: var(--ink); height: 2rem; }
.locked-card, .phone-answer { background: var(--surface); border-radius: 16px; padding: 1.2rem; text-align: center; }
.locked-label { color: var(--muted); font-weight: 600; }
.locked-ref { font-size: 2rem; font-weight: 900; margin: 0.2rem 0; }
.phone-result { background: var(--surface); border-radius: 16px; padding: 1rem 1.2rem; text-align: center; display: grid; gap: 0.25rem; }
.phone-result.great { background: rgba(96, 139, 84, 0.22); }
.phone-result .big { font-size: 1.5rem; font-weight: 800; }
.phone-result .pts { color: #b9e3ad; font-weight: 800; font-size: 1.25rem; }
.phone-rank { text-align: center; color: var(--muted); margin: 0; }
.cta-card { background: var(--surface); border-radius: 16px; padding: 1.2rem; display: grid; gap: 0.5rem; margin-top: 1.2rem; width: 100%; }
.cta-card p { margin: 0 0 0.4rem; color: var(--muted); }

.cl-phone { gap: 0.7rem; }
.cl-phone .cl-rows { align-self: center; }
.cl-phone .verse-phone { font-size: 0.95rem; max-height: 6.6rem; padding: 0.6rem 0.8rem; }
.cl-phone .pad-book { min-height: 44px; }
.cl-phone .slot { height: 2.8rem; }
.pad { display: grid; gap: 0.7rem; }
.pad-top { display: grid; gap: 0.6rem; }
.pad-book { min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.pad-book.empty { color: var(--muted); font-weight: 600; border-style: dashed; }
.slots { display: flex; justify-content: center; align-items: center; gap: 0.35rem; }
.slot { width: 3rem; height: 3.2rem; border: 2px solid var(--line); border-radius: 8px; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.slot.active { border-color: var(--ink); }
.slot-sep { font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.key { min-height: 46px; border-radius: 10px; border: 0; background: var(--surface-2); font-size: 1.35rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.key:active { background: var(--surface-3); }
.key.fn { color: var(--muted); }
.pad-books { display: grid; gap: 0.4rem; }
.pad-books-label { color: var(--muted); font-size: 0.8rem; font-weight: 700; margin-top: 0.3rem; }
.pad-books-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.3rem; }
.pb { min-height: 40px; border-radius: 8px; border: 0; border-left: 4px solid var(--sec); background: var(--surface-2); font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 0 0.2rem; }
.pb.out { opacity: 0.3; }
.pb.sel { background: var(--ink); color: #161616; }

/* ---- the leader's remote ---------------------------------------------------------- */

.remote { max-width: 560px; margin: 0 auto; padding: 0.8rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 1rem; }
.remote-status { display: grid; gap: 0.35rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.remote-status .remote-warn { margin: 0.3rem 0 0; }
.remote-room { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.remote-room strong { letter-spacing: 0.15em; }
.dot { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.85rem; }
.dot::before { content: ''; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--danger); }
.dot.on::before { background: #7fc46b; }
.remote-now { font-weight: 800; font-size: 1.2rem; }
.remote-meta { color: var(--muted); font-size: 0.85rem; }
.remote-controls { display: grid; gap: 1rem; }
.remote-controls .btn.primary { min-height: 60px; font-size: 1.15rem; }
.remote-controls .ctl-row .btn.primary { flex: 1; }
.remote-controls .ctl-row.end { justify-content: center; margin-top: 0.6rem; }
.remote-controls > .btn { width: 100%; }
.remote-controls .entry { display: none; }

/* ---- landing page ------------------------------------------------------------------ */

body.landing { font-size: 17px; line-height: 1.55; }
.l-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.l-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.l-nav .brand { font-size: 1.15rem; }
.l-nav a.nav-link { color: var(--muted); text-decoration: none; font-weight: 600; }
.l-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding: 40px 20px 56px; }
.l-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; }
.l-hero p.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 26px; max-width: 34rem; }
.l-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.l-cta .btn { min-height: 54px; font-size: 1.05rem; padding: 0 1.5em; }
.l-join { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.l-join h2 { margin: 0 0 4px; font-size: 1.3rem; }
.l-join p { margin: 0 0 16px; color: var(--muted); }
.l-join form { display: flex; gap: 10px; }
.l-join .field.code { flex: 1; min-width: 0; font-size: 1.5rem; }
.l-section { padding: 48px 0; border-top: 1px solid var(--line); }
.l-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 8px; }
.l-section > .l-wrap > p.sub { color: var(--muted); margin: 0 0 26px; max-width: 42rem; }
.l-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.l-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.l-game { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: opacity 0.2s; }
.l-game.dim { opacity: 0.3; }
.l-game h3 { margin: 0; font-size: 1.35rem; }
.l-game p { margin: 0; color: var(--muted); }
.l-game a { color: var(--ink); }
.l-game ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.95rem; }
.l-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.l-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.l-game-art { height: 120px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.l-step { background: var(--surface); border-radius: 18px; padding: 20px; }
.l-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #161616; font-weight: 900; margin-bottom: 12px; }
.l-step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.l-step p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.l-screens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.l-screen { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.l-screen h3 { margin: 0 0 6px; font-size: 1.1rem; }
.l-screen p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.l-screen .note { margin-top: 8px; font-size: 0.88rem; color: var(--faint); }
.l-faq { display: grid; gap: 10px; max-width: 760px; }
.l-faq details { background: var(--surface); border-radius: 14px; padding: 14px 18px; }
.l-faq summary { font-weight: 700; cursor: pointer; }
.l-faq p { color: var(--muted); margin: 8px 0 0; }
.l-foot { padding: 40px 20px 60px; color: var(--muted); border-top: 1px solid var(--line); }
.l-foot a { color: var(--ink); }
.mini-shelf { width: 86%; }
.mini-shelf .shelf { height: 18px; }
.mini-tiles { display: flex; gap: 4px; }
.mini-tiles span { width: 22px; height: 26px; border-radius: 3px; }
.mini-ref { font-size: 2.3rem; font-weight: 900; letter-spacing: -0.02em; }

@media (max-width: 860px) {
  .l-hero { grid-template-columns: 1fr; padding-top: 16px; }
  .l-join { order: -1; }
  .l-nav .nav-link { font-size: 0.9rem; text-align: right; }
  .l-games, .l-steps, .l-screens { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .l-join form { flex-direction: column; }
}

/* ---- the TV page on a narrow or portrait screen (a phone mirroring, a small window) ---- */

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  html:has(body.tv) { font-size: clamp(12px, 2.4vw, 22px); }
  body.tv { overflow: auto; height: auto; min-height: 100dvh; }
  .tv-top { grid-template-columns: 1fr auto; padding: 0.6rem 1rem; }
  .top-title { display: none; }
  .top-right { flex-wrap: wrap; gap: 0.35rem; }
  .brand em { display: none; }
  .tv-stage { padding: 1rem; overflow: visible; }
  .menu, .lobby { grid-template-columns: 1fr; gap: 1.2rem; }
  .game-cards { grid-template-columns: 1fr; }
  .menu h1, .lobby h1 { font-size: 2.2rem; margin-bottom: 0.8rem; }
  .join-panel, .join-panel.big { grid-template-columns: 8rem 1fr; }
  .join-code, .join-panel.big .join-code { font-size: 2.6rem; }
  .join-url { font-size: 1.2rem; word-break: normal; overflow-wrap: anywhere; }
  .pair { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pair .qr { width: 12rem; }
  .cl-room-body { flex-direction: column; align-items: center; gap: 1.2rem; }
  .cl-side { width: 100%; }
  .reveal-cols { grid-template-columns: 1fr; }
  .round-results { grid-template-columns: 1fr; }
  .sw-command { font-size: 3.6rem; }
  .sw-ref { font-size: 3.6rem; }
  .sw-found { font-size: 2.8rem; }
  .sw-teams { flex-wrap: wrap; }
  .sw-team { min-width: 0; font-size: 1.2rem; }
  .podium-step { width: 8rem; }
  .wf-clues { grid-template-columns: 1fr; }
  .wf-cols { grid-template-columns: 1fr; }
  .wf-title { font-size: 2.4rem; }
}
