/* ---------- theme ----------
   Every colour in the app comes from the tokens below. To restyle, change the
   values here; to add a colour, add a token to BOTH palettes and use var(--name).
   theme.js sets data-theme="light" | "dark" on <html> before first paint
   (saved choice, else the system setting). Without JS the dark palette applies.
   Poster and week-card art keep fixed light-on-dark text in both themes. */
:root {
  --sans: "Outfit", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1019;
  --card: #131929;
  --inset: #0e1320;
  --chip: #1c2335;
  --line: #252d40;
  --line-strong: #323b52;
  --text: #e8ebf2;
  --muted: #8b93a7;
  --faint: #5d6579;
  --gold: #e9c45d;
  --gold-fill: #e9c45d;      /* buttons and marks filled with gold; --gold is for gold text */
  --gold-ink: #1b1505;
  --silver: #c3cad8;         /* league board medals: 2nd and 3rd, beside --gold-fill */
  --bronze: #d49563;
  --good: #3ebd7e;
  --bad: #e5574e;
  --warn: #e59b3a;
  --easy: #3ebd7e;
  --medium: #5b9ef0;
  --hard: #ee8a3c;
  --on-accent: #0c1019;      /* text on a filled --easy/--medium/--hard */
  --shadow: rgb(0 0 0 / 0.8);
  --shadow-strong: rgb(0 0 0 / 0.9);
  --slack-bg: #fff;
  --slack-ink: #1d1c1d;
  --slack-line: #fff;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #ffffff;
  --inset: #eef0f3;
  --chip: #e6e8ed;
  --line: #dde0e6;
  --line-strong: #c6cad3;
  --text: #161a24;
  --muted: #596073;
  --faint: #868c9b;
  --gold: #a87909;
  --gold-fill: #f2c14a;
  --gold-ink: #1b1505;
  --silver: #aab2c0;
  --bronze: #c98450;
  --good: #1d8a55;
  --bad: #c7372e;
  --warn: #b0680f;
  --easy: #1d8a55;
  --medium: #2f6fc4;
  --hard: #c2611a;
  --on-accent: #ffffff;
  --shadow: rgb(30 30 50 / 0.35);
  --shadow-strong: rgb(30 30 50 / 0.45);
  --slack-bg: #fff;
  --slack-ink: #1d1c1d;
  --slack-line: var(--line-strong);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.09em; font-size: 1.1rem; text-decoration: none; }
.logo .mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--gold-fill); color: var(--gold-ink); }
.logo em { font-style: normal; color: var(--gold); }
.topnav { display: flex; gap: 2px; }
.topnav a { padding: 7px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--chip); }
.player { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); color: var(--text); font-weight: 600; font-size: 0.8rem; }

main { max-width: 1180px; margin: 0 auto; padding: 32px 16px 96px; }

/* ---------- shared bits ---------- */
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.title-row h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.7rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; }
.title-row p { margin: 6px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; min-width: 0; }
.inset { background: var(--inset); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; background: var(--chip); color: var(--muted); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill.gold { color: var(--gold); background: color-mix(in srgb, var(--gold) 13%, var(--chip)); }
.pill.good { color: var(--good); background: color-mix(in srgb, var(--good) 13%, var(--chip)); }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, var(--chip)); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, var(--chip)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; font-weight: 600; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.gold { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); box-shadow: 0 0 24px -8px color-mix(in srgb, var(--gold-fill) 70%, transparent); }
.btn.gold:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.round-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--chip); cursor: pointer; flex: none; }
.round-btn:hover { background: var(--line-strong); }
.round-btn svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--muted); cursor: pointer; font-weight: 500; }
.link-btn:hover { color: var(--text); }
.eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 600; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.section-head h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- poster grid ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.poster-card { display: grid; gap: 10px; text-decoration: none; }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: var(--p1); box-shadow: 0 10px 30px -14px var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; isolation: isolate; }
.poster-card:hover .poster, .poster-card:focus-visible .poster { transform: translateY(-4px); box-shadow: 0 18px 40px -14px var(--shadow-strong); }
.poster .genre { align-self: flex-start; padding: 3px 9px; border-radius: 6px; background: rgb(5 8 15 / 0.45); color: #f3efe2; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.poster .big { font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 0.98; font-weight: 800; letter-spacing: -0.01em; color: #fbf7ec; text-wrap: balance; }
.poster .tag { margin-top: 8px; color: rgb(251 247 236 / 0.82); font-size: 0.9rem; line-height: 1.35; }
.poster .done { position: absolute; top: 14px; right: 14px; }
.poster-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.poster-meta .method { width: 100%; color: var(--text); font-weight: 600; font-size: 0.88rem; }
.stars { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); }
.stars svg { width: 13px; height: 13px; }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; margin-bottom: 18px; font-weight: 500; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--text); }
.hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 28px; }
.hero .poster { aspect-ratio: 2 / 3; }
.hero h1 { margin: 6px 0 4px; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; font-weight: 800; letter-spacing: -0.015em; }
.hero .tagline { margin: 0 0 16px; font-size: 1.15rem; font-weight: 600; }
.hero .about { margin: -6px 0 18px; max-width: 58ch; font-size: 1rem; line-height: 1.6; color: var(--muted); }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.detail-grid h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; }
.detail-grid p { margin: 0 0 10px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 0.86rem; }
.kv .total { color: var(--text); font-weight: 600; border-top: 1px solid var(--line); padding-top: 8px; }
.kv dd.total { color: var(--gold); }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.source-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.source-list a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.source-list .rev { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }
details.prompt-file { margin-top: 8px; }
details.prompt-file summary { cursor: pointer; font-weight: 500; }
details.prompt-file pre { margin: 8px 0 0; padding: 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; font: 0.78rem/1.6 var(--mono); max-height: 360px; overflow: auto; }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
.notes li { margin-bottom: 4px; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qlist li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.qlist .n { width: 22px; color: var(--faint); font-family: var(--mono); }
.qlist .grow { flex: 1; min-width: 0; color: var(--muted); }

/* ---------- play ---------- */
.play { max-width: 760px; margin: 0 auto; }
.play-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.play-top .title { font-weight: 600; }
/* One dot per question; each is a button that jumps to its question, with a hit area larger than the dot. */
.dots { display: flex; margin-left: auto; }
.dot { position: relative; flex: none; width: 15px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.dot::after { content: ""; position: absolute; left: 2.5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--chip); transition: transform 0.15s, box-shadow 0.15s; }
.dot.good::after { background: var(--good); }
.dot.bad::after { background: var(--bad); }
.dot.done::after { background: var(--muted); }
.dot:hover::after { transform: scale(1.3); }
/* A question at a time: the dots past the first unanswered question can't be jumped to yet. */
.dot:disabled { cursor: default; }
.dot:disabled:hover::after { transform: none; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.q-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.prompt { margin: 0 0 18px; font-size: 1.22rem; line-height: 1.6; }
/* A picture clue sits under the question, at its own shape: a tall photo isn't cropped to fit a wide box. */
.q-body.has-pic { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.q-body.has-pic .prompt, .q-body.has-pic .clues-reveal { margin-bottom: 0; }
.pic-clue { margin: 0; justify-self: start; max-width: 100%; }
.pic-open { display: block; width: auto; max-width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--inset); cursor: zoom-in; }
.pic-open img { display: block; width: auto; max-width: 100%; height: auto; max-height: 380px; object-fit: contain; transition: transform .25s ease; }
.pic-open:hover img { transform: scale(1.03); }
.pic-open:focus-visible { outline: 2px solid var(--accent, var(--gold-fill)); outline-offset: 2px; }
.pic-clue figcaption { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: .78rem; color: var(--muted); }
.pic-dialog { padding: 0; border: 0; border-radius: 14px; background: transparent; max-width: min(92vw, 1000px); overflow: visible; }
.pic-dialog::backdrop { background: rgb(5 8 15 / .82); backdrop-filter: blur(3px); }
.pic-dialog img { display: block; max-width: 100%; max-height: 84vh; border-radius: 14px; }
.pic-dialog form { position: absolute; top: -14px; right: -14px; }
.pic-dialog .round-btn { background: var(--card); border: 1px solid var(--line-strong); }
.pic-credit { margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
/* A code question's snippet, under the question. Kept to 36 characters a line, so it fits a phone. */
.q-code { margin: 0 0 18px; }
.q-code figcaption { margin-bottom: 7px; font-size: .78rem; color: var(--muted); }
.q-code pre { margin: 0; padding: 14px 16px; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; font: 500 0.95rem/1.65 var(--mono); white-space: pre; overflow-x: auto; tab-size: 2; }
.q-code pre:focus-visible { outline: 2px solid var(--gold-fill); outline-offset: 2px; }
@media (max-width: 520px) { .q-code pre { padding: 12px 12px; font-size: 0.8rem; } }
/* End screen: the questions again, each one reopening its answer screen. */
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--inset); color: inherit; text-decoration: none; transition: border-color .15s; }
.review-item:hover { border-color: var(--line-strong); }
.review-item:focus-visible { outline: 2px solid var(--accent, var(--gold-fill)); outline-offset: 2px; }
.review-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; margin-top: 1px; }
.review-mark.good { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.review-mark.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.review-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.review-q { font-size: .95rem; line-height: 1.5; }
.review-a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: .92rem; }
.review-a s { text-decoration-thickness: 1px; }
.review-pic { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 520px) { .review-pic { width: 48px; height: 48px; } }
.pic-credit a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 620px) {
  .q-body.has-pic { gap: 14px; }
  .pic-open img { max-height: 320px; }
  .pic-dialog form { top: 8px; right: 8px; }
}
.answer-row { display: flex; gap: 10px; align-items: center; padding: 8px; }
.answer-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 0; background: transparent; font-size: 1.05rem; outline: none; }
.answer-row:focus-within { border-color: var(--gold); }
.result { margin-top: 18px; display: grid; gap: 12px; }
.verdict-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verdict-row .answer { font-size: 1.3rem; font-weight: 700; }
.result .explain { margin: 0; color: var(--muted); }
details.more { font-size: 0.88rem; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 500; }
details.more summary:hover { color: var(--text); }
.clues { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.clues li { min-width: 0; }
.clues .claim { font-size: 0.8rem; color: var(--faint); font-weight: 500; }
.clues blockquote { margin: 3px 0; overflow-wrap: anywhere; }
.clues a { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-decoration-color: var(--line-strong); }
.history { display: grid; gap: 8px; margin-top: 10px; }
.history .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
.history p { margin: 2px 0 0; }
.history ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }

.feedback { margin-top: 16px; display: grid; gap: 16px; }
.feedback .row-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.feedback .row-label b { font-weight: 600; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scale button, .votes button { padding: 9px 0; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--inset); cursor: pointer; font-weight: 600; }
.scale button:hover, .votes button:hover { border-color: var(--muted); }
.scale button[aria-pressed="true"] { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }
.scale-ends { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--faint); margin-top: 4px; }
.votes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.votes button { font-size: 0.85rem; padding: 9px 4px; }
.votes.enjoy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.votes button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.feedback textarea { width: 100%; min-height: 64px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--inset); }
.check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.saved { font-size: 0.8rem; color: var(--faint); min-height: 1em; }
.next-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.next-row .grow { flex: 1; }
.final { text-align: center; padding: 26px 10px 6px; }

/* ---------- results ---------- */
.table-card { padding: 4px 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 18px; vertical-align: middle; }
th { color: var(--faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
td { border-top: 1px solid var(--line); }
td.r, th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vote-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--inset); min-width: 120px; }
.vote-bar span { display: block; height: 100%; }
.vote-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
.vote-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.result-note { margin-top: 12px; font-size: 0.86rem; color: var(--muted); max-width: 80ch; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero .poster { max-width: 220px; }
  .votes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .votes.enjoy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo .word { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .poster { transition: none; }
}

/* ---------- Claude's difficulty call ---------- */
.diff-easy { --diff: var(--easy); }
.diff-medium { --diff: var(--medium); }
.diff-hard { --diff: var(--hard); }
.pill.diff-easy, .pill.diff-medium, .pill.diff-hard { color: var(--diff); background: color-mix(in srgb, var(--diff) 15%, var(--chip)); font-weight: 600; }
.claude-mark { font-size: 0.7rem; opacity: 0.85; }
.claude-said { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.votes button { position: relative; }
.votes button.claude-pick { border-color: var(--diff); border-style: dashed; color: var(--diff); }
.votes button.claude-pick[aria-pressed="true"] { border-style: solid; background: var(--diff); border-color: var(--diff); color: var(--on-accent); }
.pick-label { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 6px; background: var(--card); color: var(--diff); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.votes button.claude-pick[aria-pressed="true"] .pick-label { background: var(--diff); color: var(--on-accent); }

.poster-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* clue-by-clue questions */
.clues-reveal { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.clue-line { display: flex; gap: 12px; font-size: 1.18rem; line-height: 1.55; animation: clue-in 0.25s ease-out; }
.clue-line .clue-n { flex: none; width: 24px; height: 24px; margin-top: 4px; border-radius: 999px; display: grid; place-items: center; background: var(--chip); color: var(--gold); font-family: var(--mono); font-size: 0.78rem; font-weight: 600; }
.clue-line.late { color: var(--muted); animation: none; }
.clue-line.late .clue-n { color: var(--faint); }
.more-btn:disabled { opacity: 0.45; cursor: default; }
.judge-note { margin: 0; font-size: 0.88rem; }
@keyframes clue-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .clue-line { animation: none; } }

/* end-of-quiz reveal */
.reveal, .card.quiz-feedback, .card.tiebreak { margin-top: 16px; }
.tiebreak p { margin: 8px 0; }
.reveal-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.reveal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reveal-head .n { width: 22px; color: var(--faint); font-family: var(--mono); }
.reveal-head .grow { flex: 1; }
.reveal-q { margin: 8px 0 4px; }
.reveal-sum { margin: 0; font-size: 0.86rem; }
.worth { font-size: 0.88rem; }
.table-card td:first-child { min-width: 190px; }

/* ---------- scoring and streaks ---------- */
.gold-text { color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.play-top .grow { flex: 1; }
.play-top .dots { margin-left: 0; }
.status { display: flex; align-items: center; gap: 8px; }
.score-chip { padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.score-chip b { color: var(--gold); font-size: 0.95rem; }
.score-chip.bump { animation: bump 0.45s ease-out; }
.streak { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-size: 0.82rem; font-weight: 600; animation: clue-in 0.3s ease-out; }
.ladder { display: flex; gap: 4px; }
.ladder span { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 0.85rem; transition: background 0.2s, color 0.2s; }
.ladder span.now { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }
.ladder span.spent { text-decoration: line-through; opacity: 0.5; }
.ladder span.drop { animation: bump 0.35s ease-out; }
.ladder.big { margin: 4px 0 12px; }
.ladder.big span { display: flex; flex-direction: column; gap: 0; height: auto; padding: 6px 12px; color: var(--muted); font-family: var(--sans); font-size: 0.74rem; }
.ladder.big b { color: var(--gold); font-family: var(--mono); font-size: 1.1rem; }
.worth { font-size: 0.9rem; }
.worth b { color: var(--gold); }
.worth.nudge { animation: shake 0.35s; }
.hint-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.hint-row .grow { flex: 1; }
.keys { font-size: 0.8rem; }
kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; font: 600 0.72rem/1.5 var(--mono); text-align: center; color: var(--muted); }
@media (hover: none) { .keys { display: none; } }
.answer-row.shake { animation: shake 0.4s; border-color: var(--bad); }
.pill.gain { animation: bump 0.45s ease-out; }
.said { margin: 0; font-size: 0.95rem; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---------- rating and the crowd ---------- */
.note-box .row-label .muted { font-size: 0.8rem; }
.crowd { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); animation: clue-in 0.3s ease-out; }
.crowd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.crowd p { margin: 0; }
.spread { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 0.84rem; color: var(--muted); }
.spread .track { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.spread i { display: block; height: 100%; border-radius: 999px; }
.spread i.good { background: var(--good); }
.spread i.bad { background: var(--bad); }
.people { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.88rem; }
.people li { display: flex; align-items: center; gap: 6px; }
.people li.me > span:first-child { font-weight: 600; }

/* ---------- end of quiz ---------- */
.final .tier { margin: 6px 0 2px; font-size: 1.5rem; font-weight: 800; color: var(--gold); letter-spacing: -0.01em; }
.final > p { margin: 10px auto 0; max-width: 46ch; }
.share { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.share-grid { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.share-grid div { display: flex; gap: 4px; }
.share-grid i { width: 18px; height: 18px; border-radius: 4px; }
.share-grid i.seen { background: var(--line-strong); }
.share-grid i.unused { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.share-grid i.hit { background: var(--good); }
.share-grid i.miss { background: var(--bad); }
.share-text { width: min(100%, 360px); padding: 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--inset); font: 0.85rem/1.3 var(--mono); }
.board-card { margin-top: 16px; }
.board-card h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 0.92rem; }
.board li.me { background: color-mix(in srgb, var(--text) 6%, transparent); }
.board .rank { color: var(--faint); font-family: var(--mono); font-size: 0.8rem; }
.board .rank svg { color: var(--gold); }
.board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .muted { font-size: 0.8rem; }
.board b { text-align: right; font-family: var(--mono); color: var(--text); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: 0.9; } }

/* ---------- home ---------- */
.me-strip { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.continue { flex: 1 1 320px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 16px; align-items: center; padding: 16px 20px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); background: color-mix(in srgb, var(--gold) 7%, var(--card)); text-decoration: none; }
.continue b { font-size: 1.25rem; }
.continue .btn { grid-column: 2; grid-row: 1 / 4; }
.me-stats { flex: 1 1 320px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.me-stats > div { display: flex; flex-direction: column; justify-content: center; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.me-stats b { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.me-stats b .muted { font-size: 1rem; }
.me-stats span:not(.muted) { color: var(--muted); font-size: 0.8rem; }
.you-score { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.poster-meta svg { width: 13px; height: 13px; vertical-align: -2px; }

@media (prefers-reduced-motion: reduce) {
  .score-chip.bump, .ladder span.drop, .answer-row.shake, .pill.gain, .worth.nudge, .streak, .crowd { animation: none; }
}
.next-btn { white-space: nowrap; }
@media (max-width: 720px) {
  .pre-actions { flex-wrap: wrap; gap: 10px; }
  .pre-actions .grow { display: none; }
  .pre-actions .more-btn { flex: 1 1 100%; }
  .hint-row { flex-wrap: wrap; }
  .play-top .status { order: 3; }
}

/* ---------- leagues ---------- */
.form-error { color: var(--bad); font-size: 0.9rem; min-height: 1.2em; }
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.league-card { display: grid; gap: 4px; padding: 16px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.15s; }
.league-card:hover { border-color: var(--line-strong); }
.league-card b { font-size: 1.2rem; }
.league-card .muted { font-size: 0.86rem; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 500; white-space: nowrap; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); }
.seg button:disabled { opacity: 0.35; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 12px; color: var(--muted); cursor: pointer; font-size: 0.85rem; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.board li.idle { opacity: 0.55; }

/* ---------- league board (TS-10): summary, standings, quarters ---------- */
.lb-summary { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
.lb-card h3 { display: flex; align-items: baseline; gap: 8px; }
.lb-scroll { overflow-x: auto; margin: 0 -6px; }
.lb-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0 3px; font-size: 0.92rem; }
.lb-table th { padding: 4px 10px 6px; text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.lb-table td { padding: 8px 10px; vertical-align: middle; border-top: 0; }
.lb-table td:first-child { border-radius: 10px 0 0 10px; }
.lb-table td:last-child { border-radius: 0 10px 10px 0; }
.lb-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lb-table tr.me td { background: color-mix(in srgb, var(--text) 6%, transparent); }
.lb-place { width: 44px; text-align: center !important; color: var(--faint); font-family: var(--mono); font-size: 0.82rem; }
.lb-player { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.lb-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lb-name small { font-size: 0.74rem; }
.lb-avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; background: var(--chip); color: var(--muted); font-weight: 600; font-size: 0.8rem; box-shadow: 0 0 0 2px var(--card); }
.lb-player .lb-avatar + .lb-avatar { margin-left: -14px; }
.lb-vp b { font-size: 1.05rem; color: var(--text); }
.lb-right, .lb-avg { color: var(--muted); }
.lb-pods { white-space: nowrap; }
.lb-pod { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-right: 4px; border-radius: 999px; font-family: var(--mono); font-size: 0.72rem; font-weight: 600; color: var(--gold-ink); }
.lb-pod-1 { background: var(--gold-fill); }
.lb-pod-2 { background: var(--silver); }
.lb-pod-3 { background: var(--bronze); }
.lb-gap td { padding: 0; text-align: center; color: var(--faint); line-height: 1; }
.lb-more { margin: 6px 0 0; font-size: 0.82rem; }

/* Medals for 1st to 3rd (also on the quiz results board); .podium-N sets --medal to the place's colour.
   On the league board the top three (.lb-top) get a medal for the place, a ring round the picture, a wash of the medal's colour. */
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--gold-ink); font-weight: 700; font-size: 0.85rem; box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18), 0 2px 6px -2px var(--shadow); }
.medal-gold { background: radial-gradient(circle at 35% 30%, #fff6d6 0 12%, var(--gold-fill) 45%); width: 32px; height: 32px; }
.medal-silver { background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, var(--silver) 45%); }
.medal-bronze { background: radial-gradient(circle at 35% 30%, #ffe2c8 0 12%, var(--bronze) 45%); }
.medal svg { color: var(--gold-ink); }
.lb-top td { background: color-mix(in srgb, var(--medal) 11%, transparent); }
.podium-1 { --medal: var(--gold-fill); }
.podium-2 { --medal: var(--silver); }
.podium-3 { --medal: var(--bronze); }
.lb-top .lb-avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--medal); }
.lb-top.podium-1 td { background: color-mix(in srgb, var(--gold-fill) 16%, transparent); }
.lb-top.podium-1 .lb-name { font-weight: 600; font-size: 1rem; }
.lb-top.podium-1 .lb-vp b { color: var(--gold); font-size: 1.2rem; }

/* Quarters: each row picks that period. */
.lb-periods tbody tr { cursor: pointer; }
.lb-periods td:first-child { white-space: nowrap; }
.lb-periods tbody td { background: var(--inset); }
.lb-periods tbody tr:hover td { background: var(--chip); }
.lb-periods tr.selected td { background: color-mix(in srgb, var(--gold) 12%, var(--card)); }
.lb-periods tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.lb-periods .lb-crown { display: inline-flex; margin-right: 6px; color: var(--gold); vertical-align: -2px; }
.lb-champ .lb-player { vertical-align: middle; gap: 8px; }
.lb-champ .lb-name { display: inline; }
@media (max-width: 560px) {
  .lb-summary { gap: 8px; }
  .lb-summary > div { padding: 10px 12px; }
  .lb-summary b { font-size: 1.3rem; }
  .lb-table .lb-pods, .lb-table .lb-avg, .lb-periods .lb-weeks { display: none; }
  .lb-table td { padding: 8px 6px; }
  .lb-place { width: 36px; }
}

/* ---------- my stats ---------- */
.stat-tiles { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stats-grid h3, .cat-card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.chart-sub { margin: 2px 0 10px; font-size: 0.82rem; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .base { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--mono); }
.chart .series { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--gold); stroke: var(--card); stroke-width: 2; }
.chart .bar { fill: var(--gold); }
.chart .hit { fill: transparent; cursor: default; }
.chart .pt:hover .dot { r: 6; }
.chart .pt:hover .bar { filter: brightness(1.15); }
.chart .pt:hover rect.hit { fill: color-mix(in srgb, var(--text) 4%, transparent); }
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-legend { display: flex; gap: 16px; font-size: 0.8rem; color: var(--muted); }
.cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cat-legend i { display: inline-block; }
.cat-legend .you { width: 14px; height: 8px; border-radius: 2px; background: var(--gold); }
.cat-legend .avg { width: 2px; height: 12px; background: var(--text); }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cats li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; align-items: center; gap: 14px; font-size: 0.9rem; }
.cat-track { position: relative; height: 10px; border-radius: 999px; background: var(--inset); }
.cat-bar { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--gold); }
.cat-avg { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); box-shadow: 0 0 0 2px var(--card); }
.cat-num .muted { font-size: 0.8rem; }
@media (max-width: 720px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .cats li { grid-template-columns: 1fr auto; row-gap: 4px; }
  .cats .cat-track { grid-column: 1 / -1; grid-row: 2; }
  .topnav a { padding: 7px 8px; }
}
.topnav { overflow-x: auto; scrollbar-width: none; }
.topnav a { white-space: nowrap; }
@media (max-width: 520px) { .logo .word { display: none; } }
@media (max-width: 520px) {
  .board li { grid-template-columns: 32px minmax(0, 1fr) 40px; row-gap: 0; }
  .board li > .muted { grid-column: 2; grid-row: 2; }
  .board li > b { grid-column: 3; grid-row: 1 / 3; }
  .board .rank { grid-row: 1 / 3; }
}

/* ---------- sign in ---------- */
img.avatar { object-fit: cover; }
.sign-in { max-width: 420px; margin: 8vh auto 0; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 28px; }
.sign-in .mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold-fill); color: var(--gold-ink); font-weight: 800; font-size: 1.5rem; }
.sign-in h1 { margin: 6px 0 0; font-size: 2rem; }
.sign-in p { margin: 0 0 8px; }
.slack-btn { background: var(--slack-bg); color: var(--slack-ink); border-color: var(--slack-line); }
.slack-btn:hover { border-color: var(--slack-line); filter: brightness(0.95); }
.slack-btn svg { width: 18px; height: 18px; }

/* ---------- home: the week and the shelves ---------- */
.week-hero { margin-bottom: 22px; }
.week-hero > a { display: block; border-radius: 18px; text-decoration: none; color: inherit; }
.week-status { margin: 0 0 18px; color: var(--text); max-width: 52ch; }
.week-empty { margin-bottom: 22px; padding: 26px 26px 22px; }
.week-empty h2 { margin: 6px 0 6px; font-size: 1.6rem; line-height: 1.15; }
.week-empty p { margin: 0; }
.last-week { flex: 1 1 320px; display: grid; gap: 8px; text-decoration: none; color: var(--text); }
.last-week:hover { border-color: var(--muted); }
.podium { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.podium li { display: flex; align-items: baseline; gap: 6px; }
.podium li.me b { color: var(--gold); }
.podium .num { color: var(--muted); }
.shelf { margin-top: 34px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.shelf-head h2, .section-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.shelf-head p { margin: 0; font-size: 0.92rem; }
.section-title { margin: 34px 0 14px; }
@media (max-width: 720px) {
  .week-hero { gap: 16px; }
  .week-hero .poster { max-width: 150px; }
}

.quarter-winner { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); }
.quarter-winner svg { color: var(--gold); }

.week-hero .week-status { margin: 8px 0 18px; font-size: 1.35rem; line-height: 1.35; }

/* ---------- theme toggle ---------- */

/* home: this week sits first, so its shelf needs no gap above */
main > .shelf:first-child { margin-top: 0; }

/* The tiebreaker card on the results, laid out like the feedback rows. */
.tiebreak .row-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tb-note { margin: 12px 0 0; font-size: 0.9rem; }

/* ---------- internal bits ----------
   Staff-only extras (class "internal") stay hidden until the "Behind the scenes" switch in the account menu adds
   .show-internal to <html>.
   Shown, they sit in a dashed, tinted panel so the player's own view is easy to picture without them. */
.internal { display: none !important; }
:root.show-internal .internal { display: revert !important; }
:root.show-internal span.internal, :root.show-internal .pill.internal { display: inline-flex !important; }
.internal-panel { position: relative; border: 1.5px dashed var(--medium) !important; background: color-mix(in srgb, var(--medium) 7%, var(--card)) !important; }
.internal-panel::before { content: "Behind the scenes"; position: absolute; top: -9px; right: 12px; padding: 0 6px; font: 600 0.68rem/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--medium); background: var(--bg); border-radius: 4px; }
.pill.internal { outline: 1.5px dashed var(--medium); outline-offset: 1px; }
.diff-panel { margin-top: 18px; padding: 16px 14px 14px; border-radius: 12px; }
.diff-panel .row-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- account menu ----------
   The avatar opens who you are, the staff-only "Behind the scenes" switch and sign out, so the top bar keeps room for the
   section links on a phone. */
.player { position: relative; }
.menu-btn { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.86rem; position: relative; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--chip); color: var(--text); }
:root.show-internal .menu-btn::after { content: ""; position: absolute; left: 24px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--medium); box-shadow: 0 0 0 2px var(--bg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 300px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -16px var(--shadow-strong); }
.menu-who { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 0.9rem; }
.menu-who span { color: var(--faint); font-size: 0.8rem; overflow-wrap: anywhere; }
.menu-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: 0.9rem; text-align: left; }
.menu-item:hover { background: var(--chip); }
.menu-item small { display: block; margin-top: 2px; color: var(--faint); font-size: 0.76rem; }
.switch { flex: none; position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); transition: transform 0.15s; }
.menu-item[aria-checked="true"] .switch { background: var(--medium); }
.menu-item[aria-checked="true"] .switch::after { transform: translateX(14px); background: #fff; }
@media (max-width: 520px) {
  .topbar-inner { gap: 10px; }
  .menu-btn { padding: 3px; }
  .menu-btn .name { display: none; }
}

/* ---------- quiz page ---------- */
.questions-card { margin-top: 16px; }
.questions-card h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; }

/* ---------- play band ----------
   The quiz's poster colours across the top of every play screen. Text and progress sit on dark glass so they
   read on any poster colour. */
.play { --accent: var(--gold); --accent-ink: color-mix(in srgb, var(--accent) 55%, var(--text)); }
.play-band { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; min-height: 68px; margin-bottom: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, var(--p1) 0%, color-mix(in srgb, var(--p2) 82%, var(--p1)) 100%); color: #fbf7ec; box-shadow: 0 10px 30px -18px var(--shadow); }
.play-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 140% at 100% 0%, rgb(255 255 255 / 0.14), transparent 55%), linear-gradient(90deg, rgb(5 8 15 / 0.22), transparent 55%); pointer-events: none; }
.play-band .grow { flex: 1; }
.band-back { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgb(5 8 15 / 0.35); color: #fbf7ec; }
.band-back:hover { background: rgb(5 8 15 / 0.55); }
.band-title { display: grid; min-width: 0; }
.band-title b { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-genre { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(251 247 236 / 0.75); }
.band-status { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 999px; background: rgb(5 8 15 / 0.45); }
.play-band .score-chip { padding: 0; background: none; color: rgb(251 247 236 / 0.8); }
.play-band .score-chip b { color: #f5d06a; }
.play-band .dots { margin: 0; }
.play-band .dot::after { background: rgb(251 247 236 / 0.22); }
.play-band .dot.good::after { background: var(--good); }
.play-band .dot.bad::after { background: var(--bad); }
.play-band .dot.here::after { box-shadow: 0 0 0 2px rgb(251 247 236 / 0.55); }
.play-band .dot.done::after { background: #f5d06a; }
.play-band .dot.here:not(.good, .bad, .done)::after { background: #fbf7ec; }
.play-band .streak { color: #ffc27a; }
.play .q-head h2 { color: var(--accent-ink); }
.play .q-head h2 .muted { color: var(--muted); }
@media (max-width: 520px) {
  .play-band { flex-wrap: wrap; row-gap: 10px; }
  .play-band .band-status { order: 3; width: 100%; justify-content: space-between; border-radius: 12px; }
}

/* ---------- answer screen ---------- */
.verdict { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; border: 1px solid; animation: clue-in 0.25s ease-out; }
.verdict.good { --tone: var(--good); }
.verdict.bad { --tone: var(--bad); }
.verdict.warn { --tone: var(--warn); }
.verdict.neutral { --tone: var(--muted); }
.verdict { background: color-mix(in srgb, var(--tone) 12%, var(--card)); border-color: color-mix(in srgb, var(--tone) 40%, transparent); }
.verdict-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--tone); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.verdict-label svg { width: 16px; height: 16px; }
.verdict-answer { font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.verdict .said { color: var(--muted); }
.quick-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.qf-label { font-size: 0.9rem; font-weight: 600; }
.thumbs { display: flex; gap: 6px; }
.thumb { display: grid; place-items: center; width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--inset); color: var(--muted); cursor: pointer; }
.thumb:hover { border-color: var(--muted); color: var(--text); }
.thumb[data-rating="5"][aria-pressed="true"] { background: var(--good); border-color: var(--good); color: var(--on-accent); }
.thumb[data-rating="1"][aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.thumb svg { width: 18px; height: 18px; }
.quick-feedback .grow { flex: 1; }
.qf-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 500; }
.qf-link:hover, .qf-link[aria-expanded="true"] { color: var(--text); background: var(--chip); }
.qf-link[aria-pressed="true"] { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, var(--chip)); }
.qf-link svg { width: 15px; height: 15px; }
.appeal-result:empty { display: none; }
.appeal-result { margin-top: 8px; }
.play .note-box { margin-top: 10px; }
.play .note-box textarea { width: 100%; min-height: 72px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--inset); }
@media (max-width: 520px) {
  .quick-feedback .grow { flex-basis: 100%; height: 0; }
}

/* ---------- end screen ---------- */
.final { padding: 30px 18px 24px; }
.score-ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: var(--inset); }
.ring-fill { stroke: var(--accent); stroke-linecap: round; }
.score-ring::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; box-shadow: 0 0 60px -10px color-mix(in srgb, var(--accent) 35%, transparent); pointer-events: none; }
.final.celebrate .ring-fill { animation: ring-fill 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes ring-fill { from { stroke-dasharray: 0 100; } }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-family: var(--sans); font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-text span { margin-top: 4px; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.final .tier { margin: 16px 0 0; font-size: 1.7rem; color: var(--text); }
.final .final-sub { margin: 6px auto 0; max-width: 46ch; color: var(--muted); }
.share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .final.celebrate .ring-fill, .verdict { animation: none; } }
.crowd-head { flex-wrap: wrap; row-gap: 2px; }
.crowd-head .muted { font-size: 0.86rem; }

/* Verdict banner, two sides: the right answer on the left, your points or what you said on the right. */
.verdict { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; padding: 18px 22px; }
.verdict-main { display: grid; gap: 6px; min-width: 0; }
.verdict-aside { display: grid; justify-items: end; gap: 4px; padding-left: 22px; border-left: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); text-align: right; }
.verdict-aside span { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.verdict-points { color: var(--tone); font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.verdict-said { max-width: 22ch; color: var(--muted); font-size: 1.35rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--tone) 70%, transparent); text-decoration-thickness: 2px; }
.result > .judge-note { margin-top: -4px; }
.sources-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; }
@media (max-width: 520px) {
  .verdict { grid-template-columns: 1fr; row-gap: 12px; padding: 16px 18px; }
  .verdict-aside { display: flex; align-items: baseline; gap: 8px; justify-content: flex-start; padding: 10px 0 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); text-align: left; }
  .verdict-points { font-size: 1.4rem; }
}
/* Badge | answer | points or what you said. */
.verdict { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; }
.verdict:not(:has(.verdict-badge)) { grid-template-columns: minmax(0, 1fr) auto; }
.verdict-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 22%, transparent); color: var(--tone); }
.verdict-badge svg { width: 22px; height: 22px; }
.verdict-main { align-content: center; }
.verdict-main .pill { justify-self: start; }
@media (max-width: 520px) {
  .verdict { grid-template-columns: auto minmax(0, 1fr); }
  .verdict-badge { width: 36px; height: 36px; }
  .verdict-aside { grid-column: 1 / -1; }
}

/* Theme choice in the account menu. */
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; font-size: 0.9rem; }
.theme-seg { display: flex; padding: 2px; border-radius: 9px; background: var(--inset); border: 1px solid var(--line); }
.theme-seg button { padding: 4px 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 500; }
.theme-seg button:hover { color: var(--text); }
.theme-seg button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px -1px var(--shadow); }
#sign-out { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; padding-top: 11px; }

/* ---------- the quiz on one page ----------
   A card per question down the page. The band (title, score, dots) sticks under the top bar; --topbar-h and
   --sheet-head-h are measured by app.js so a question scrolled to starts just below both. */
.sheet-head { position: sticky; top: var(--topbar-h, 60px); z-index: 5; margin-top: -12px; padding: 12px 0 14px; background: linear-gradient(var(--bg) calc(100% - 14px), transparent); }
.sheet-head .play-band { margin-bottom: 0; }
.sheet-list { display: grid; gap: 16px; }
/* The quiz's "about" paragraph, above the first question. */
.sheet-about { margin-bottom: 16px; padding: 16px 22px; }
.sheet-about p { margin: 6px 0 0; font-size: 1.05rem; line-height: 1.6; }
.sheet-about p:not(.sheet-tagline) { color: var(--muted); font-size: 1rem; }
.sheet-about .sheet-tagline { font-weight: 600; font-size: 1.1rem; }
.sheet .q-card, .sheet-tb, .sheet-end { scroll-margin-top: calc(var(--topbar-h, 60px) + var(--sheet-head-h, 96px) + 4px); }
.sheet-end { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.sheet-end-text { display: grid; gap: 2px; }
.sheet-end-text .muted { font-size: 0.92rem; }
/* Only the answer box in use is gold; the rest wait quietly, so the page isn't a column of gold buttons. */
.sheet .answer-row:not(:focus-within):has(input:placeholder-shown) .btn.gold,
.sheet .answer-row:has(input:disabled) .btn.gold { background: var(--chip); border-color: var(--line-strong); color: var(--muted); box-shadow: none; }
.band-count { display: none; color: rgb(251 247 236 / 0.8); font-size: 0.82rem; font-weight: 600; }
@media (max-width: 520px) {
  /* One row on a phone so the band stays short: the dots give way to a count. */
  .sheet .play-band { flex-wrap: nowrap; min-height: 56px; padding: 10px 12px; }
  .sheet .play-band .band-status { order: 0; width: auto; padding: 6px 12px; border-radius: 999px; }
  .sheet .band-genre, .sheet .dots, .sheet .streak-word { display: none; }
  .sheet .band-count { display: inline; }
  .sheet .q-card { padding: 18px 16px; }
}

/* Saving and submitting. The band's save button sits beside the count; the foot of the quiz has both buttons, what's
   saved, and a note when submitting needs a second look (blank answers) or didn't go through. */
.band-save { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border: 0; border-radius: 999px; background: #fbf7ec; color: #14181f; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.band-save:hover:not(:disabled) { filter: brightness(0.94); }
.band-save:disabled { background: rgb(5 8 15 / 0.45); color: rgb(251 247 236 / 0.8); cursor: default; }
.band-save svg { color: var(--good); }
.band-save:focus-visible { outline: 2px solid #fbf7ec; outline-offset: 2px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.sheet-actions .saved { font-size: 0.85rem; }
.submit-note { flex-basis: 100%; margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; }
.submit-note.warn { background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--text); }
.submit-note.bad { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--text); }
.step-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.step-nav .grow { flex: 1; }
@media (max-width: 520px) {
  .sheet .chip-word { display: none; }
  .sheet-actions { width: 100%; justify-content: stretch; }
  .sheet-actions .saved { flex-basis: 100%; }
  .sheet-actions .btn { flex: 1 1 100%; }
}

/* An answer locked in while questions are left: no right or wrong until the results. */
.locked { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); color: var(--muted); animation: clue-in 0.25s ease-out; }
.locked svg { flex: none; color: var(--accent-ink, var(--gold)); }
.locked b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .locked { animation: none; } }

/* How sure: 🎲 / 💯 at the right of the answer box (TS-9). Faded until picked. */
.moods { display: flex; gap: 2px; flex: none; }
.mood { display: grid; place-items: center; width: 34px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 1.05rem; line-height: 1; cursor: pointer; opacity: 0.4; filter: grayscale(1); transition: opacity 0.15s, filter 0.15s; }
.mood:hover { opacity: 0.85; filter: none; }
.mood[aria-pressed="true"] { opacity: 1; filter: none; background: var(--chip); border-color: var(--line-strong); }
.mood-mark { margin-left: 6px; font-size: 0.95em; }
.answer-row > .mood-mark { padding-right: 8px; }
.verdict-main .pill + .pill { margin-left: 6px; }
.menu-row.internal .theme-seg button { white-space: nowrap; }

/* Ready-made notes, sitting inside the note box. */
.note-field { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--inset); }
.note-field:focus-within { border-color: var(--gold); }
.play .note-field textarea { display: block; border: 0; background: transparent; outline: none; }
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.note-chip { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.note-chip:hover { color: var(--text); border-color: var(--muted); }
.note-chip[aria-pressed="true"] { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line-strong)); background: color-mix(in srgb, var(--gold) 13%, var(--chip)); }

/* "Tap to show" picture clues. */
.pic-reveal { justify-self: start; padding: 8px 14px; font-size: 0.88rem; font-weight: 500; }
:root.show-internal .menu-row.internal { display: flex !important; }
/* Design directions (TS-8), for staff: a grid of looks under the theme. */
.menu-design { padding: 8px 10px; font-size: 0.9rem; }
.menu-design small { color: var(--faint); font-size: 0.74rem; }
.design-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 6px; }
.design-seg button { padding: 5px 4px; white-space: nowrap; }

/* ---------- home, compact (TS-12) ----------
   One row of what's there to play, then past quizzes; smaller tiles, two to a row on a phone. A played quiz's tile
   carries your score in the corner. */
.posters.compact { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.posters.compact .poster { aspect-ratio: 4 / 5; padding: 13px; border-radius: 12px; }
.posters.compact .poster .big { font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
.posters.compact .poster .tag { margin-top: 6px; font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.posters.compact .poster .done { top: 11px; right: 11px; }
.posters.compact .poster-card { gap: 8px; }
.tile-score { display: inline-flex; align-items: baseline; gap: 1px; padding: 4px 9px; border-radius: 999px; background: rgb(5 8 15 / 0.62); color: rgb(251 247 236 / 0.78); font-family: var(--mono); font-size: 0.78rem; backdrop-filter: blur(4px); }
.tile-score b { color: #fbf7ec; font-size: 1.05rem; font-weight: 700; }
.home-now .all-played { margin: 0; }
@media (max-width: 420px) {
  .posters.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .posters.compact .poster .tag { display: none; }
}

/* ---------- the quiz page: results (TS-11) ---------- */
.results > .card { margin-top: 16px; }
.res-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 -4px; }
.res-step { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.res-step:hover { border-color: var(--line-strong); }
.res-step span { display: grid; min-width: 0; }
.res-step small { color: var(--faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.res-step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-step.newer { justify-content: flex-end; text-align: right; }
.res-step svg { flex: none; color: var(--muted); }
.res-head h1 { margin: 6px 0 4px; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.015em; }
.res-head .tagline { margin: 0; font-size: 1.05rem; font-weight: 600; }
.res-head .about { margin: 8px 0 0; max-width: 62ch; color: var(--muted); line-height: 1.6; }
.res-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.res-cta > div { display: grid; gap: 2px; }
.res-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.res-stats > div { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--inset); }
.res-stats b { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.res-stats b .muted { font-size: 0.95rem; }
.res-stats span:not(.muted) { color: var(--muted); font-size: 0.8rem; }
.res-stats > p { grid-column: 2 / -1; align-self: center; margin: 0; font-size: 0.9rem; }
.res-stats > p svg, .res-locked svg { vertical-align: -2px; }
.res-seg { margin-bottom: 14px; }
.res-seg button { padding: 7px 18px; }
.res-seg button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px -1px var(--shadow); }
.res-board li[data-who] { cursor: pointer; }
.res-board li[data-who]:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.res-board li.podium-1 { background: color-mix(in srgb, var(--gold-fill) 12%, transparent); }
.res-board .rank .medal { width: 26px; height: 26px; font-size: 0.78rem; }
.res-board.late { opacity: 0.7; }
.res-more { margin-top: 10px; width: 100%; }
.res-sub { margin: 16px 0 6px; font-size: 0.85rem; }
.res-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; font-size: 0.9rem; color: var(--muted); }
.res-picker select { flex: 1 1 200px; max-width: 320px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--inset); color: var(--text); font: inherit; font-weight: 600; }
.review-a .pill { padding: 1px 8px; font-size: 0.75rem; }
/* Your answers in a row of circles; each opens its answer. */
.result-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px 14px; border-radius: 999px; background: var(--inset); border: 1px solid var(--line); }
.result-row button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: transform 0.12s ease; }
.result-row button:hover { transform: scale(1.15); }
.result-row button:focus-visible { outline: 2px solid var(--accent, var(--gold-fill)); outline-offset: 2px; }
.result-row .hit { background: var(--good); }
.result-row .miss { background: var(--bad); }
.sheet-how { display: flex; gap: 8px; align-items: baseline; margin: 10px 0 0 !important; font-size: 0.9rem !important; }
.sheet-about > .sheet-how:first-child { margin-top: 0 !important; }
.sheet-how svg { flex: none; position: relative; top: 2px; }
@media (max-width: 520px) {
  .res-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px; }
  .res-stats > div { padding: 8px 10px; }
  .res-stats b { font-size: 1.25rem; }
  .res-stats > p { grid-column: 1 / -1; }
  .result-row { gap: 6px; padding: 10px; border-radius: 14px; }
  .result-row button { width: 22px; height: 22px; }
  .res-step { font-size: 0.82rem; padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) { .result-row button { transition: none; } }
.poster-meta b { color: var(--text); font-weight: 600; }
.res-tabs, .results .review-list li { scroll-margin-top: calc(var(--topbar-h, 64px) + 12px); }
.posters.compact .poster-meta { gap: 2px 6px; font-size: 0.8rem; }
.res-stats.waiting { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.res-stats.waiting > p { grid-column: 2; }
@media (max-width: 400px) {
  .result-row { gap: 5px; padding: 9px 10px; }
  .result-row button { width: 20px; height: 20px; }
}
