/* Verse Chase Live: two looks, each with a dark and a light version.
     classic (Everyone mode): deep blue, cream room-code tiles, the name in serif capitals.
     party   (Kids mode):     deep plum, bright colors, the name in chunky bouncing letters.
   html[data-look] chooses the look and html[data-theme] dark or light (the big screen's Dark/Light
   button; phones follow the device's own setting). The band across the top keeps the look's deep
   color in both versions, so the lamp logo always sits on its own background.
   Made to read from the back of a room: big type, strong contrast, no thin lines or small print.
   One file for both pages: body.host is the big screen, body.phone is a player's phone.
   Fonts: Fraunces (the classic name and headings), Lilita One (the bouncing letters and Kids
   headings) and Fredoka (Kids text) are served from fonts/ on this laptop, never from the web
   (downloaded 2026-11-19 with Ryan's OK; SIL Open Font License, the license texts are beside
   them). If a file can't load, each stack falls back to fonts already on the device. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700; /* one file, weight 600, used for bold headings too (no faked bold) */
  font-display: swap;
  src: url('fonts/Fraunces-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/LilitaOne.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/Fredoka.woff2') format('woff2');
}

:root {
  /* The brand's fixed colors (from Design/logo-system.html). */
  --navy: #16263a;
  --plum: #2b1f3a;
  --cream: #f3ebdd;
  --flame: #f0a93b;
  --flame-pale: #fff0b8;
  --coral: #dc5630;
  --clay: #e8643c;
  --clay-dark: #c54f29;
  --clay-deep: #a83c1b;
  /* The party look's four bright colors. */
  --p1: #ff8a66;
  --p2: #5cc9c4;
  --p3: #f6c443;
  --p4: #c39be0;

  --display: 'Fraunces', Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Cambria, serif;
  --chunky: 'Lilita One', 'Cooper Black', 'Arial Rounded MT Bold', 'Arial Rounded MT', 'Segoe UI Black', 'Arial Black', ui-rounded, system-ui, sans-serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --round: 'Fredoka', ui-rounded, 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Classic look, dark (the look as designed). */
  --bg: #16263a;
  --bg-glow: #24415f;
  --card: #203750;
  --ink: #f3ebdd;
  --soft-ink: #c4cfdc;
  --line: #4a6482;
  --band: #101c2c;
  --band-ink: #f3ebdd;
  --accent: #f0a93b;
  --primary-bg: #f0a93b;
  --primary-ink: #16263a;
  --tile-bg: #f3ebdd;
  --tile-ink: #16263a;
  --chip-ink: #16263a;
  --right: #8be5a8;
  --right-soft: #18412f;
  --wrong: #ffad9d;
  --wrong-soft: #4a2622;
  --try: #c4cfdc;
  --try-soft: #2b4664;
  --focus: #9cc8ff;
  --head-font: var(--display);
  --text-font: var(--sans);
  --text-weight: 700;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f6efe2;
  --bg-glow: #fffaf0;
  --card: #fffdf8;
  --ink: #16263a;
  --soft-ink: #42546a;
  --line: #c9bca3;
  --band: #16263a;
  --accent: #8a4b00;
  --primary-bg: #16263a;
  --primary-ink: #f3ebdd;
  --tile-bg: #16263a;
  --tile-ink: #f3ebdd;
  --right: #1c6b3a;
  --right-soft: #dcefe0;
  --wrong: #9b2c1c;
  --wrong-soft: #f8e1dc;
  --try: #42546a;
  --try-soft: #e6ecf3;
  --focus: #1f5fbf;
  color-scheme: light;
}
:root[data-look='party'] {
  --bg: #2b1f3a;
  --bg-glow: #4b3070;
  --card: #3c2b56;
  --ink: #f7efe2;
  --soft-ink: #dccfec;
  --line: #6f5796;
  --band: #20172d;
  --accent: #f6c443;
  --primary-bg: #f6c443;
  --primary-ink: #2b1f3a;
  --tile-ink: #2b1f3a;
  --chip-ink: #2b1f3a;
  --right: #93eaa9;
  --right-soft: #204634;
  --try: #dccfec;
  --try-soft: #4a3568;
  --focus: #ffe08a;
  --head-font: var(--chunky);
  --text-font: var(--round);
  --text-weight: 600;
}
:root[data-look='party'][data-theme='light'] {
  --bg: #fbf3ff;
  --bg-glow: #ffffff;
  --card: #ffffff;
  --ink: #2b1f3a;
  --soft-ink: #5b4a72;
  --line: #d3bdec;
  --band: #2b1f3a;
  --accent: #7a35b5;
  --primary-bg: #2b1f3a;
  --primary-ink: #f6c443;
  --right: #1c6b3a;
  --right-soft: #dcf3e2;
  --try: #5b4a72;
  --try-soft: #efe3fb;
  --focus: #7a35b5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: radial-gradient(120% 90% at 15% 0%, var(--bg-glow) 0%, var(--bg) 62%) fixed;
  color: var(--ink);
  font: 1rem/1.4 var(--text-font);
  min-height: 100vh;
  min-height: 100dvh;
}
[data-look='party'] body { background: radial-gradient(120% 90% at 85% 0%, var(--bg-glow) 0%, var(--bg) 62%) fixed; }
h1, h2, h3 { font-family: var(--head-font); font-weight: 700; line-height: 1.15; margin: 0; }
[data-look='party'] :is(h1, h2, h3) { font-weight: 400; letter-spacing: 0.01em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }

.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--accent); }
.dot { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; flex: none; background: var(--c, var(--soft-ink)); }
:root[data-theme='light'] .dot { box-shadow: 0 0 0 2px var(--ink); }

.btn {
  border: 3px solid var(--ink);
  background: var(--card);
  border-radius: 0.6em;
  padding: 0.5em 1em;
  font-weight: 700;
  min-height: 48px;
}
.btn.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
[data-look='party'] .btn { border-radius: 999px; }

/* ======================= The logo ======================= */

.logo { display: inline-flex; align-items: center; gap: 0.5em; color: var(--cream); white-space: nowrap; }
.lamp { width: 2.5em; height: 2.5em; flex: none; overflow: visible; }
.lamp .handle { fill: none; stroke: var(--clay); stroke-width: 4; }
.lamp .body { fill: var(--clay); }
.lamp .shade, .lamp .foot { fill: var(--clay-dark); }
.lamp .hole { fill: var(--clay-deep); }
.lamp .flame-out, .lamp .glow { fill: var(--flame); }
.lamp .flame-in { fill: var(--flame-pale); }
.lamp .flame, .lamp .glow { opacity: 0; transition: opacity 0.4s; }
.lamp .flame { transform-box: fill-box; transform-origin: 50% 100%; }
.lamp .glow { transform-box: fill-box; transform-origin: center; }
.lit .lamp .flame { opacity: 1; }
.lit .lamp .glow { opacity: 0.2; }
.lit .lamp .glow-2 { opacity: 0.28; }

.wm { font-size: 1.5em; line-height: 1; }
.wm .tm { font: 400 0.34em var(--sans); vertical-align: top; position: relative; top: 0.15em; margin-left: 0.2em; letter-spacing: 0; }
.wm-classic { font-family: var(--display); font-weight: 600; letter-spacing: 0.06em; }
.wm-classic .colon { font-weight: inherit; padding: 0 0.05em; position: relative; top: -0.06em; opacity: 0.55; transition: color 0.4s, opacity 0.4s, text-shadow 0.4s; }
.lit .wm-classic .colon { color: var(--flame); opacity: 1; text-shadow: 0 0 0.35em rgb(240 169 59 / 0.75); }
.wm-party { display: none; font-family: var(--chunky); font-size: 2.1em; align-items: center; letter-spacing: 0.02em; }
.wm-party .l { display: inline-block; color: var(--c); rotate: var(--r); }
.wm-party .l:nth-of-type(4n + 1) { --c: var(--p1); }
.wm-party .l:nth-of-type(4n + 2) { --c: var(--p2); }
.wm-party .l:nth-of-type(4n + 3) { --c: var(--p3); }
.wm-party .l:nth-of-type(4n + 4) { --c: var(--p4); }
.wm-party .l:nth-of-type(1) { --r: -8deg; --i: 0; }
.wm-party .l:nth-of-type(2) { --r: 5deg; --i: 1; }
.wm-party .l:nth-of-type(3) { --r: -4deg; --i: 2; }
.wm-party .l:nth-of-type(4) { --r: 6deg; --i: 3; }
.wm-party .l:nth-of-type(5) { --r: -5deg; --i: 4; }
.wm-party .l:nth-of-type(6) { --r: 6deg; --i: 5; }
.wm-party .l:nth-of-type(7) { --r: -6deg; --i: 6; }
.wm-party .l:nth-of-type(8) { --r: 4deg; --i: 7; }
.wm-party .l:nth-of-type(9) { --r: -7deg; --i: 8; }
.wm-party .l:nth-of-type(10) { --r: 5deg; --i: 9; }
.wm-party .dots { display: inline-flex; flex-direction: column; gap: 0.14em; margin: 0 0.14em; }
.wm-party .dots i { width: 0.25em; height: 0.25em; border-radius: 50%; background: var(--cream); opacity: 0.55; display: block; transition: background 0.4s, opacity 0.4s, box-shadow 0.4s; }
.lit .wm-party .dots i { background: var(--flame); opacity: 1; box-shadow: 0 0 0.3em rgb(240 169 59 / 0.8); }
.wm-party .tm { align-self: flex-start; font-size: 0.28em; }
[data-look='party'] .wm-classic { display: none; }
[data-look='party'] .wm-party { display: inline-flex; }
.live-tag {
  font: 800 0.72em var(--sans); letter-spacing: 0.18em; border: 0.16em solid var(--coral); color: var(--cream);
  border-radius: 0.45em; padding: 0.25em 0.5em 0.25em 0.6em; display: inline-flex; align-items: center; gap: 0.45em;
  transition: background 0.4s;
}
.live-tag::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--cream); opacity: 0.5; }
.lit .live-tag { background: var(--coral); color: #fff; }
.lit .live-tag::before { background: #fff; opacity: 1; }

/* Motion, only for people who haven't asked their device to reduce it. */
@media (prefers-reduced-motion: no-preference) {
  .lit .lamp .flame { animation: light 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both, flick 1.5s ease-in-out 0.9s infinite; }
  .lit .lamp .glow { animation: glow-in 1.2s ease-out both; }
  .lit .live-tag::before { animation: blink 1.8s ease-in-out infinite; }
  .wm-party .l { animation: drop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(var(--i) * 70ms); }
  /* The name bobs only while the room is waiting or celebrating, never during a question. */
  :is([data-phase='pick'], [data-phase='lobby'], [data-phase='podium']) .wm-party .l { animation: drop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both, bob 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms), calc(0.9s + var(--i) * 130ms); }
  .wm-party .l.hop { animation: hop 0.7s cubic-bezier(0.3, 1.5, 0.5, 1); }
  .chip.new { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  [data-look='party'] .code span { animation: drop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
  .option.right, .blank.filled, .answer:active { transition: transform 0.15s; }
  [data-look='party'] .option.right { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  .cheer { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
}
@keyframes light { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes flick { 0%, 100% { transform: scale(1, 1) rotate(0deg); } 35% { transform: scale(0.94, 1.07) rotate(-3deg); } 70% { transform: scale(1.05, 0.95) rotate(2deg); } }
@keyframes glow-in { 0% { transform: scale(0.3); opacity: 0; } 45% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes drop { from { translate: 0 -1.6em; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.1em; } }
@keyframes hop { 0%, 100% { translate: 0 0; scale: 1; } 40% { translate: 0 -0.55em; scale: 1.25; } 70% { translate: 0 0.04em; scale: 0.95; } }
@keyframes pop { from { scale: 0.6; opacity: 0; } to { scale: 1; opacity: 1; } }

/* ======================= Big screen ======================= */

body.host {
  font-size: clamp(16px, 1.55vw, 44px);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.host .bar {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.3em 1.2em;
  background: var(--band);
  color: var(--band-ink);
  flex-wrap: wrap;
}
.host .bar .room-tag { font-weight: 800; font-size: 1.1em; letter-spacing: 0.12em; }
.host .bar .mode-tag { font-weight: 800; font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; border: 2px solid var(--band-ink); border-radius: 999px; padding: 0.1em 0.7em; }
.host .bar .spacer { flex: 1; }
.host .bar .logo { font-size: 0.9em; }
.host .tools { display: flex; gap: 0.4em; flex-wrap: wrap; justify-content: flex-end; }
.host .tools .btn { font-size: 0.64em; min-height: 36px; padding: 0.3em 0.75em; border: 2px solid var(--band-ink); background: transparent; color: var(--band-ink); white-space: nowrap; }
.host .tools .btn[aria-pressed='true'] { background: var(--band-ink); color: var(--band); }
.host main { flex: 1; display: flex; flex-direction: column; padding: 0.8em 2em 1em; min-height: 0; }
.host p { margin: 0; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 0.7em; }
.notice {
  background: var(--wrong-soft); color: var(--wrong); font-weight: 700; padding: 0.5em 1em;
  border-radius: 0.5em; border: 3px solid var(--wrong); margin-bottom: 0.6em;
}
.notice.gentle { background: var(--try-soft); color: var(--ink); border-color: var(--accent); }

/* Pick a mode (before the room opens; the lamp is not lit yet) */
.pick { align-items: center; justify-content: center; gap: 1em; }
.pick h2 { font-size: 2.6em; text-align: center; }
.pick .sub { font-size: 1.2em; font-weight: var(--text-weight); color: var(--soft-ink); text-align: center; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4em; width: min(100%, 52em); }
.mode-card {
  border: 4px solid var(--ink); border-radius: 1.2em; padding: 1.1em 1.3em 1.2em; text-align: left; display: flex; flex-direction: column; gap: 0.5em;
  color: var(--cream); font-family: var(--sans); min-height: 15em;
}
.mode-card.classic { background: radial-gradient(120% 90% at 15% 0%, #24415f 0%, var(--navy) 62%); }
.mode-card.party { background: radial-gradient(120% 90% at 85% 0%, #4b3070 0%, var(--plum) 62%); font-family: var(--round); }
.mode-card .name { font-size: 3em; line-height: 1.05; }
.mode-card.classic .name { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.mode-card.party .name { font-family: var(--chunky); display: flex; gap: 0.02em; font-size: 3.4em; }
.mode-card.party .name span { display: inline-block; }
.mode-card.party .name span:nth-child(4n + 1) { color: var(--p1); rotate: -7deg; }
.mode-card.party .name span:nth-child(4n + 2) { color: var(--p2); rotate: 5deg; }
.mode-card.party .name span:nth-child(4n + 3) { color: var(--p3); rotate: -4deg; }
.mode-card.party .name span:nth-child(4n + 4) { color: var(--p4); rotate: 6deg; }
.mode-card .for { font-size: 1.1em; font-weight: 700; }
.mode-card ul { margin: 0; padding: 0 0 0 1.1em; font-size: 1em; font-weight: 600; line-height: 1.35; flex: 1; }
.mode-card .open { align-self: flex-start; font-weight: 800; font-size: 1.15em; border-radius: 999px; padding: 0.3em 1.1em; }
.mode-card.classic .open { background: var(--flame); color: var(--navy); }
.mode-card.party .open { background: var(--p3); color: var(--plum); }

/* Lobby */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 1.8em; align-items: start; }
.join-card { background: var(--card); border: 4px solid var(--ink); border-radius: 1em; padding: 1em 1.3em 1.2em; display: grid; grid-template-columns: 1fr auto; gap: 0.8em 1.2em; align-items: center; }
.join-card .how { display: flex; flex-direction: column; gap: 0.4em; min-width: 0; }
.join-card .step { font-size: 1.25em; font-weight: 700; }
.join-card .address { font-size: 1.9em; font-weight: 800; font-family: var(--sans); color: var(--accent); white-space: nowrap; line-height: 1.1; }
.join-card .code { grid-column: 1 / -1; display: flex; justify-content: center; gap: 0.12em; font-size: 4.2em; line-height: 1; }
.code span { background: var(--tile-bg); color: var(--tile-ink); font-family: var(--display); font-weight: 600; padding: 0.14em 0.2em 0.1em; border-radius: 0.16em; min-width: 1em; text-align: center; }
[data-look='party'] .code { gap: 0.16em; }
[data-look='party'] .code span { font-family: var(--chunky); font-weight: 400; background: var(--c); rotate: var(--r); }
[data-look='party'][data-theme='light'] .code span { box-shadow: 0 0 0 0.05em var(--plum); }
.code span:nth-child(1) { --c: var(--p1); --r: -4deg; --i: 0; }
.code span:nth-child(2) { --c: var(--p2); --r: 3deg; --i: 1; }
.code span:nth-child(3) { --c: var(--p3); --r: -2deg; --i: 2; }
.code span:nth-child(4) { --c: var(--p4); --r: 4deg; --i: 3; }
.code span:nth-child(5) { --c: var(--p1); --r: -3deg; --i: 4; } /* five-letter codes since 2026-11-19 */
.join-card .qr { width: 7.6em; height: 7.6em; background: #fff; padding: 0.3em; border-radius: 0.4em; }
.join-card .qr svg { width: 100%; height: 100%; display: block; }
.join-card .qr-note { text-align: center; font-weight: 700; color: var(--soft-ink); font-size: 0.85em; }
.join-card .warn { grid-column: 1 / -1; }
.setup { display: flex; flex-direction: column; gap: 0.7em; }
.set-row { display: grid; grid-template-columns: 5.6em 1fr; gap: 0.3em 0.6em; align-items: start; }
.set-row h2 { font-size: 1.1em; padding-top: 0.45em; }
.choice-row { display: flex; gap: 0.4em; flex-wrap: wrap; align-items: center; }
.choice-row button { border: 3px solid var(--ink); background: var(--card); border-radius: 0.6em; padding: 0.25em 0.7em; font-weight: 700; font-size: 0.88em; min-height: 2.3em; white-space: nowrap; }
[data-look='party'] .choice-row button { border-radius: 999px; }
.choice-row button[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.choice-row button:disabled { opacity: 0.55; cursor: not-allowed; }
.setup .plan-note, .setup .switch-note { color: var(--soft-ink); font-weight: 600; font-size: 0.9em; line-height: 1.3; }
.setup .plan-note.short { color: var(--ink); background: var(--try-soft); border: 3px solid var(--accent); border-radius: 0.5em; padding: 0.3em 0.7em; font-weight: 700; }
.players-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-top: 0.2em; }
.players-head .count { font-size: 1.5em; font-weight: 800; }
.players-head .btn { font-size: 1.35em; padding: 0.3em 1.5em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45em; align-content: flex-start; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em; background: var(--c, var(--card)); color: var(--chip-ink);
  border-radius: 999px; padding: 0.15em 0.8em; font-weight: 800; font-size: 1.1em;
}
:root[data-theme='light'] .chip { box-shadow: 0 0 0 3px var(--ink); }
.chip.away { opacity: 0.5; outline: 3px dashed var(--ink); outline-offset: -3px; }
.small-note { color: var(--soft-ink); font-weight: 600; font-size: 0.85em; }

/* Get ready (Everyone mode) */
.ready { align-items: center; justify-content: center; text-align: center; }
.ready .number { font-size: 2em; font-weight: 800; color: var(--soft-ink); }
.ready h2 { font-size: 5em; }
.ready .sub { font-size: 1.8em; font-weight: 700; }

/* Question */
.q-head { display: flex; align-items: center; gap: 1em; }
.q-head .kicker { font-size: 1.4em; }
.q-head .of { font-weight: 800; color: var(--soft-ink); font-size: 1.2em; }
.q-head .spacer { flex: 1; }
.clock {
  width: 3em; height: 3em; border-radius: 50%; border: 0.22em solid var(--ink);
  display: grid; place-items: center; font-size: 1.8em; font-weight: 900; font-variant-numeric: tabular-nums; flex: none; font-family: var(--sans);
}
.clock.low { border-color: var(--wrong); color: var(--wrong); }
.clock.paused { border-style: dashed; font-size: 1.1em; }
.clock.waiting { border-style: dashed; opacity: 0.7; }
.answered { font-size: 1.3em; font-weight: 800; text-align: right; }
.quote, .verse {
  font-family: var(--display); font-size: 3em; line-height: 1.2; font-weight: 700; margin: 0.1em 0 0.2em;
  text-wrap: balance;
}
.quote.long, .verse.long { font-size: 2.4em; }
/* Party look: three choices leave more room, so the words the leader reads aloud are bigger. */
[data-look='party'] :is(.quote, .verse) { font-family: var(--round); font-weight: 700; font-size: 3.5em; margin: 0.25em 0 0.35em; }
[data-look='party'] :is(.quote.long, .verse.long) { font-size: 2.9em; }
[data-look='party'] .option { font-size: 2.3em; min-height: 2.4em; justify-content: center; text-align: center; }
.quote::before { content: '“'; }
.quote::after { content: '”'; }
.nowrap { white-space: nowrap; }
.blank { display: inline-block; min-width: 3.4em; border-bottom: 0.14em solid var(--accent); text-align: center; line-height: 1; vertical-align: baseline; }
.blank.filled { color: var(--right); border-color: var(--right); min-width: 0; padding: 0 0.15em; }
.prompt { font-family: var(--head-font); font-size: 1.9em; font-weight: 700; }
[data-look='party'] .prompt { font-weight: 400; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.options.n3 { grid-template-columns: 1fr 1fr 1fr; }
.option {
  border: 4px solid var(--ink); background: var(--card); border-radius: 0.7em; padding: 0.5em 0.8em;
  font-size: 2em; font-weight: 800; display: flex; align-items: center; gap: 0.5em; position: relative; overflow: hidden; min-height: 2.6em; line-height: 1.15;
}
.option .bar-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 28%, transparent); z-index: 0; }
.option > span { position: relative; z-index: 1; }
.option .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.option.right { border-color: var(--right); background: var(--right-soft); color: var(--right); }
.option.right .bar-fill { background: color-mix(in srgb, var(--right) 22%, transparent); }
.option.dim { opacity: 0.5; }
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.events.n3 { grid-template-columns: 1fr; }
.event { border: 4px solid var(--ink); background: var(--card); border-radius: 0.7em; padding: 0.6em 0.9em; font-size: 1.75em; font-weight: 700; line-height: 1.2; }
.events.n3 .event { font-size: 2em; padding: 0.5em 0.9em; }
/* Party look: each choice has its own bright color, the same on the big screen and the phone. */
[data-look='party'] :is(.option, .event, .answer) { background: var(--o, var(--card)); color: var(--plum); border-color: var(--plum); border-radius: 1em; }
[data-look='party'][data-theme='dark'] :is(.option, .event, .answer) { border-color: transparent; }
[data-look='party'] :is(.option, .event, .answer):nth-child(1) { --o: var(--p1); }
[data-look='party'] :is(.option, .event, .answer):nth-child(2) { --o: var(--p2); }
[data-look='party'] :is(.option, .event, .answer):nth-child(3) { --o: var(--p3); }
[data-look='party'] :is(.option, .event, .answer):nth-child(4) { --o: var(--p4); }
[data-look='party'] .option.right { background: var(--o); color: var(--plum); border-color: var(--ink); box-shadow: 0 0 0 0.12em var(--right); }
[data-look='party'] .option.dim { opacity: 0.35; }
.ref-line { font-size: 1.8em; font-weight: 800; text-align: center; margin-top: 0.1em; }
.ref-line .ref { color: var(--accent); }
.ref-line .web { color: var(--soft-ink); font-size: 0.6em; font-weight: 700; }
.cheer { font-family: var(--head-font); font-size: 2.2em; text-align: center; color: var(--accent); line-height: 1.1; }
.read-hint { text-align: center; font-size: 1.3em; font-weight: 700; color: var(--soft-ink); margin-top: auto; }
.q-head .next-top, .q-head .go { font-size: 1.3em; padding: 0.3em 1.2em; }
.q-head .go { font-size: 1.7em; padding: 0.25em 1.4em; }
.order-reveal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4em; }
.order-reveal li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 0.6em; align-items: center; border: 4px solid var(--right); background: var(--right-soft); border-radius: 0.7em; padding: 0.25em 0.9em; }
.order-reveal .place { font-size: 1.9em; font-weight: 900; color: var(--right); }
.order-reveal .text { font-size: 1.45em; font-weight: 700; line-height: 1.2; }
.order-reveal.n3 .text { font-size: 1.7em; }
.order-reveal .ref { display: block; font-size: 0.8em; color: var(--accent); font-weight: 800; }
.order-reveal .got { font-size: 1.1em; font-weight: 800; text-align: right; }

/* Scores and podium */
.board h2, .podium-screen h2, .lookup h2 { font-size: 2.6em; text-align: center; }
.board .sub { text-align: center; font-size: 1.5em; font-weight: 700; color: var(--soft-ink); }
.rows { list-style: none; margin: 0 auto; padding: 0; width: min(100%, 38em); display: flex; flex-direction: column; gap: 0.5em; }
.rows li { display: grid; grid-template-columns: 2em 1fr auto auto; gap: 0.6em; align-items: center; background: var(--card); border: 4px solid var(--c, var(--ink)); border-radius: 0.7em; padding: 0.3em 0.9em; font-size: 1.7em; font-weight: 800; }
:root[data-theme='light'] .rows li { border-color: var(--ink); box-shadow: inset 0.5em 0 0 var(--c, transparent); padding-left: 1.2em; }
.rows.big { width: min(100%, 44em); }
.rows.big li { font-size: 2.1em; padding: 0.4em 0.9em; }
.rows .place { color: var(--soft-ink); }
.rows .name { display: flex; align-items: center; gap: 0.4em; overflow: hidden; white-space: nowrap; }
.rows .score { font-variant-numeric: tabular-nums; }
.rows .gain { color: var(--right); font-size: 0.7em; min-width: 4.2em; text-align: right; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1em; flex: 1; padding-top: 1em; }
.podium .stand { width: min(30%, 13em); display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.podium .who { font-size: 2em; font-weight: 900; text-align: center; line-height: 1.1; word-break: break-word; }
.podium .pts { font-size: 1.3em; font-weight: 800; color: var(--soft-ink); }
.podium .block { width: 100%; border: 4px solid var(--ink); border-bottom: none; border-radius: 0.7em 0.7em 0 0; background: var(--c, var(--card)); color: var(--chip-ink); display: grid; place-items: start center; padding-top: 0.2em; font-size: 3.4em; font-weight: 900; font-family: var(--head-font); }
[data-look='party'] .podium .block { font-weight: 400; } /* Lilita One has one weight; never fake a bold */
.podium .p1 .block { height: 5em; }
.podium .p2 .block { height: 3.6em; }
.podium .p3 .block { height: 2.6em; }
.lookup .sub { text-align: center; font-size: 1.3em; font-weight: 700; color: var(--soft-ink); }
.ref-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2em; }
.ref-list li { break-inside: avoid; padding: 0.3em 0; border-bottom: 2px solid var(--line); font-size: 1.15em; line-height: 1.25; }
.ref-list .ref { font-weight: 900; color: var(--accent); margin-right: 0.4em; }
.ref-list.dense li { font-size: 0.95em; }
.next-row { display: flex; justify-content: flex-end; gap: 0.8em; margin-top: auto; padding-top: 0.6em; flex-wrap: wrap; }
.next-row .btn { font-size: 1.3em; padding: 0.35em 1.4em; }
.closed-screen { align-items: center; justify-content: center; text-align: center; gap: 1em; }
.closed-screen h2 { font-size: 3em; }

/* The players panel (rename or remove) */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(26em, 100%); background: var(--card); border-left: 4px solid var(--ink); padding: 1em 1.2em; overflow-y: auto; z-index: 20; box-shadow: -8px 0 30px rgb(0 0 0 / 0.35); }
.drawer h2 { font-size: 1.5em; margin-bottom: 0.4em; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li { display: flex; align-items: center; gap: 0.5em; padding: 0.4em 0; border-bottom: 2px solid var(--line); font-weight: 700; }
.drawer li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.drawer li .away { color: var(--soft-ink); font-weight: 600; font-size: 0.85em; }
.drawer li .btn { font-size: 0.75em; min-height: 36px; padding: 0.2em 0.6em; border-width: 2px; }
.drawer .close-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6em; }
.paused-banner { position: fixed; inset: auto 0 0 0; background: var(--ink); color: var(--bg); text-align: center; font-size: 2em; font-weight: 900; padding: 0.3em; z-index: 10; }

@media (max-width: 900px) {
  .lobby, .mode-cards { grid-template-columns: 1fr; }
  .options, .options.n3, .events { grid-template-columns: 1fr; }
}

/* ======================= Phone ======================= */

body.phone { font-size: 18px; }
.phone #find, .phone #join, .phone #play { display: flex; flex-direction: column; gap: 16px; }
.phone .top { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; padding: 0.5em 14px; background: var(--band); color: var(--band-ink); }
.phone .top .logo { font-size: 0.8em; gap: 0.4em; }
.phone .me { display: flex; align-items: center; gap: 0.4em; font-weight: 800; min-width: 0; }
.phone .me .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone .me .pts { font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0.85; }
.phone .me .dot { box-shadow: none; }
/* Once a player is in, the top band shows the lamp and their name; the lettering steps aside on a narrow phone. */
.phone.joined .top .wm, .phone.joined .top .live-tag { display: none; }
.phone main { padding: 18px 16px 28px; max-width: 34em; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.phone h1 { font-size: 1.9em; }
.phone h2 { font-size: 1.5em; }
.phone .lead { font-size: 1.15em; font-weight: 600; color: var(--soft-ink); margin: 0; }
.phone .lead b { color: var(--ink); letter-spacing: 0.08em; }
.link { border: none; background: none; padding: 0.2em 0.1em; text-decoration: underline; font-weight: 700; color: var(--accent); min-height: 44px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 800; font-size: 1.05em; padding: 0; }
.field input[type='text'], .field input:not([type]) {
  font: inherit; font-size: 1.5em; font-weight: 800; padding: 0.35em 0.5em; border: 3px solid var(--ink); border-radius: 0.4em;
  background: var(--card); color: var(--ink); width: 100%;
}
.field input.code-input { letter-spacing: 0.3em; text-transform: uppercase; text-align: center; font-size: 2em; }
.field .hint { color: var(--soft-ink); font-size: 0.9em; margin: 0; }
.err { color: var(--wrong); font-weight: 800; margin: 0; }
fieldset.field { border: none; margin: 0; padding: 0; min-width: 0; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatches label, .animals label { position: relative; }
.swatches input, .animals input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.swatches span { display: flex; align-items: center; justify-content: center; height: 56px; border-radius: 0.6em; background: var(--c); color: var(--chip-ink); font-weight: 800; border: 4px solid transparent; font-size: 0.9em; }
.swatches input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--bg); }
.swatches input:focus-visible + span, .animals input:focus-visible + span { outline: 4px solid var(--focus); outline-offset: 2px; }
.animals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.animals span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 58px; border-radius: 0.8em; border: 3px solid var(--ink); background: var(--card); font-weight: 800; line-height: 1.1; }
.animals small { font-size: 0.62em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.animals input:checked + span { background: var(--pick, var(--ink)); color: var(--chip-ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--bg); }
.animals input:disabled { cursor: not-allowed; }
.animals input:disabled + span { opacity: 0.4; border-style: dashed; }
.animals .away span { border-style: dashed; }
.big-btn { font-size: 1.35em; min-height: 64px; border-radius: 0.5em; }
.answers { display: flex; flex-direction: column; gap: 12px; }
.answer {
  min-height: 76px; border: 4px solid var(--ink); background: var(--card); border-radius: 0.6em; font-size: 1.45em; font-weight: 800;
  padding: 0.3em 0.6em; text-align: left; display: flex; align-items: center; gap: 0.6em; touch-action: manipulation;
}
[data-look='party'] .answer { min-height: 88px; font-size: 1.6em; justify-content: center; text-align: center; }
.answer:active { transform: scale(0.98); }
.answer.used { opacity: 0.6; }
.answer .badge { flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; border: 3px solid currentColor; display: grid; place-items: center; font-size: 0.85em; }
.answer.event { font-size: 1.1em; font-weight: 700; line-height: 1.25; min-height: 72px; }
[data-look='party'] .answer.event { font-size: 1.15em; min-height: 84px; justify-content: flex-start; text-align: left; }
.phone .timer { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.phone .timer .secs { font-size: 1.5em; font-variant-numeric: tabular-nums; }
.phone .timer .secs.low { color: var(--wrong); }
.result-card { border: 4px solid var(--ink); border-radius: 0.8em; padding: 18px; background: var(--card); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.result-card p { margin: 0; }
.result-card.good { border-color: var(--right); background: var(--right-soft); }
.result-card.bad { border-color: var(--wrong); background: var(--wrong-soft); }
.result-card.try { border-color: var(--try); background: var(--try-soft); }
.result-card .big { font-family: var(--head-font); font-size: 2em; font-weight: 700; line-height: 1.15; }
[data-look='party'] .result-card .big { font-weight: 400; font-size: 2.3em; }
.result-card .pts { font-size: 1.4em; font-weight: 900; }
.result-card .ref { color: var(--accent); font-weight: 800; }
.place-big { font-family: var(--head-font); font-size: 3.4em; font-weight: 700; text-align: center; line-height: 1; margin: 0; }
[data-look='party'] .place-big { font-weight: 400; color: var(--accent); }
.center { text-align: center; }
.phone .foot { color: var(--soft-ink); font-size: 0.85em; text-align: center; margin: 8px 0 0; }
.phone .conn { background: var(--wrong-soft); color: var(--wrong); font-weight: 800; text-align: center; padding: 8px 16px; }
.toggle-line { display: flex; justify-content: center; }
.toggle-line .btn { font-size: 0.85em; min-height: 40px; border-width: 2px; }
