:root {
  color-scheme: light;
  --paper: #eef2f3;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #162f4a;
  --muted: #52677b;
  --border: #c8d1d6;
  --primary: #162f4a;
  --primary-ink: #ffffff;
  --reveal: #ee7833;
  --success: #526f86;
  --warning: #ee7833;
  --danger: #ee7833;
  --danger-ink: #8a3b0a;
  --focus: #ee7833;
  --ok-soft: #e4f3ea;
  --ok-border: #b9dfc8;
  --ok-ink: #1e6b3f;
  --warn-soft: #fdeee4;
  --warn-border: #f3c6a6;
  --info-soft: #e6edf2;
  --info-border: #c3d1dc;
  --radius-sm: .5rem;
  --radius: .875rem;
  --radius-lg: 1.25rem;
  --shadow: 0 1px 2px rgb(22 47 74 / .08), 0 12px 32px rgb(22 47 74 / .12);
  --page: 36rem;
  /* Release branches and the ring around the cat: light, so the headset stands out. */
  --badge-branch: #f6ae78;

  /* Type scale: every font-size uses one of these steps (display headings use clamp()).
     Checked by src/style-tokens.test.ts. */
  --text-2xs: .72rem; --text-xs: .8rem; --text-sm: .88rem; --text-md: .95rem;
  --text-base: 1rem; --text-lg: 1.1rem; --text-xl: 1.25rem; --text-2xl: 1.6rem;
  /* Page layers (z-index): local stacking inside a component stays 0–9. */
  --z-strip: 12; --z-dock: 15; --z-menu: 20; --z-header: 30; --z-effects: 60;
  /* Motion: durations and the one easing curve (--ease-out). */
  --dur-fast: 150ms; --dur-base: 250ms; --dur-deliberate: 650ms; --dur-celebrate: 900ms;

  /* Verdicts: one green for Goed, one red for Fout, in every theme (text on top: *-ink). */
  --good: #1e6b3f; --good-ink: #ffffff;
  --bad: #b3261e; --bad-ink: #ffffff;
  /* Text on a strong colour (timer at zero) and on the reveal colour (avatars). */
  --on-accent: #ffffff; --on-reveal: #162f4a;
  /* Dark hint bubble (star hint, +1 badge): the same in every theme. */
  --tooltip-bg: #162f4a; --tooltip-ink: #ffffff;
  /* Settings switch knob when on. */
  --toggle-knob-on: var(--primary-ink);

  /* Printed card: paper, grooves, ink and ring as on the PDF (card_art.py); the same in
     every theme, like the physical card. Checked by src/style-tokens.test.ts. */
  --card-paper: #fbf8f2; --card-groove: #c8d1d6; --card-ink: #162f4a; --card-ring: #ee7833; --card-white: #ffffff; --card-muted: #52677b;
  /* Special cards: exactly the printed colours; *-ink = readable text on that colour. */
  --fx-skip: #d62839; --fx-skip-ink: #ffffff;
  --fx-reverse: #1d6fb8; --fx-reverse-ink: #ffffff;
  --fx-plus2: #23a05a; --fx-plus2-ink: #0b0b0b;
  --fx-wheel: #f0a500; --fx-wheel-ink: #162f4a;
  --fx-ink: #ffffff;
  /* The title + artist star (earning a chip). */
  --star-gold: #f5b82e; --star-edge: #b57c00; --star-ink: #4d3300; --star-line: #d6b25c; --star-soft: #f3d78c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Reserve the scrollbar's room on desktop: a list that grows past the window (Admin ›
   Controleren › Alle) must not shift the centred page sideways. Phones: no effect. */
html { scrollbar-gutter: stable; }
/* clip (not hidden) prevents sideways scrolling without turning body into a scroll
   container, which would stop the sticky top bar from staying in view. */
html, body { margin: 0; max-width: 100%; overflow-x: clip; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--primary); }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0 0 1rem; font-size: clamp(1.75rem, 7vw, 2.4rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin: 0 0 .75rem; font-size: var(--text-lg); font-weight: 800; line-height: 1.3; }
.muted, small, .helper { color: var(--muted); }
.helper { font-size: var(--text-md); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

button, .btn, input, select { font: inherit; }
button, .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
button.reveal-action { background: var(--reveal); border-color: var(--reveal); color: var(--ink); }
button:disabled { opacity: .58; cursor: wait; }
.wide { width: 100%; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

label { display: block; margin: .75rem 0 .3rem; color: var(--muted); font-size: var(--text-md); font-weight: 650; }
input, select {
  width: 100%;
  min-height: 48px;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 16px;
}
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.password-field button { min-width: 6.5rem; }
.field-error, .game-error { color: var(--danger-ink); font-weight: 700; }
.field-error { margin: .5rem 0; }

.game-header {
  min-height: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Side padding lines the logo and menu up with the content column on wide screens. */
  padding: max(.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right), calc((100% - var(--page)) / 2 + 1rem)) .75rem max(1rem, env(safe-area-inset-left), calc((100% - var(--page)) / 2 + 1rem));
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}
.game-header { position: sticky; z-index: var(--z-header); top: 0; justify-content: space-between; }
/* The top bar stays in view on every page; a soft shadow separates it from scrolled content. */
.game-header { box-shadow: 0 1px 0 var(--border), 0 6px 16px rgb(22 47 74 / .06); }
.wordmark { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: auto; height: 1.5rem; max-width: min(40vw, 8rem); object-fit: contain; }
/* The Gitster cat remains a home link in the header. */
.brand-badge { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; }
.brand-badge .theme-cat { width: 100%; height: 100%; }
.wordmark svg { width: 1.75rem; height: 1.75rem; fill: var(--ink); }
.wordmark svg circle:last-child { fill: var(--paper); }
.compact-menu { position: relative; }
.compact-menu summary { width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; list-style: none; }
.compact-menu summary::-webkit-details-marker { display: none; }
/* Speaker button beside the menu: same size and frame as the menu button, always in view. */
.sound-toggle { width: 48px; min-height: 48px; flex: none; display: flex; align-items: center; justify-content: center; margin-left: auto; margin-right: -.5rem; padding: .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
.sound-toggle svg { width: 1.35rem; height: 1.35rem; }
.sound-toggle[aria-pressed="false"] { color: var(--muted); }
/* Info sits between the sound button (Spelen) and the menu; alone it takes the free space itself. */
.sound-toggle ~ .header-info { margin-left: 0; }
.header-stand { color: var(--primary); }
.header-stand:not([hidden]) ~ .sound-toggle { margin-left: 0; }
@media (max-width: 399px) { .game-header { gap: .4rem; padding-right: max(.75rem, env(safe-area-inset-right)); padding-left: max(.75rem, env(safe-area-inset-left)); } }
/* Small phones: the cat and five square actions still fit during a test game. */
@media (max-width: 359px) {
  .game-header { gap: .25rem; padding-right: max(.5rem, env(safe-area-inset-right)); padding-left: max(.5rem, env(safe-area-inset-left)); }
  .brand-badge { width: 2.1rem; height: 2.1rem; }
  .brand-logo { height: 1.25rem; }
  .sound-toggle, .compact-menu summary { width: 44px; min-height: 44px; padding: .55rem; }
  .sound-toggle { margin-right: 0; }
}
.sound-toggle:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.compact-menu summary:hover, .compact-menu[open] summary { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.menu-icon { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.compact-menu nav { position: absolute; z-index: var(--z-menu); right: 0; top: calc(100% + .25rem); min-width: 14rem; padding: .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); box-shadow: var(--shadow); }
.compact-menu nav a, .compact-menu .menu-action { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: flex-start; text-align: left; white-space: nowrap; gap: .55rem; padding: .65rem .75rem; border: 0; border-radius: .6rem; background: transparent; color: var(--ink); text-decoration: none; font-weight: 650; }
.compact-menu nav a svg, .compact-menu .menu-action svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.compact-menu .menu-danger { color: var(--danger-ink); }
.compact-menu nav a[aria-current="page"] { color: var(--primary); }

/* ---- Shared page layout: one column width, top-aligned, 1rem rhythm between blocks ---- */
.container { width: min(100%, var(--page)); margin: 0 auto; padding: 1.25rem max(1rem, env(safe-area-inset-right)) max(3rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); display: grid; gap: 1rem; align-content: start; }
.stack { min-width: 0; display: grid; gap: 1rem; }

/* Page intro: title, one lead sentence and optional status badges; aligned to the card edges */
.page-intro { min-width: 0; padding: .25rem 0; }
.page-intro h1 { margin: 0 0 .5rem; }
.page-intro > p:not(.status-badge) { margin: 0; color: var(--muted); }
.page-intro .status-badge { margin-top: .9rem; }

/* Cards (Gestalt enclosure): every logical unit gets its own card */
.card { min-width: 0; margin: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 1px 2px rgb(22 47 74 / .06), 0 4px 14px rgb(22 47 74 / .06); }
.card-title { margin: 0; padding: 0; color: var(--ink); font-size: var(--text-lg); font-weight: 800; line-height: 1.3; }
.card-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-head > div { min-width: 0; }
/* Helper text is visually tied to the element it describes: small gap above, larger gap below. */
.card-hint { margin: .35rem 0 1rem; line-height: 1.4; }
.card > .card-hint:last-child { margin-bottom: 0; }
.field-hint { margin: .4rem 0 0; line-height: 1.4; }
.card form > button.wide, .card > button.wide, .card > .btn.wide { margin-top: 1rem; }
.card > .card-hint + button.wide, .card > .card-hint + .btn.wide { margin-top: 0; }
/* Secondary links as a consistent card footer instead of floating links */
/* Collapsible card for optional tasks (progressive disclosure) */
.card-disclosure > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: -.25rem 0; cursor: pointer; list-style: none; }
.card-disclosure > summary::-webkit-details-marker { display: none; }
.card-disclosure > summary::after { content: ""; width: .6rem; height: .6rem; flex: 0 0 auto; margin-right: .3rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--dur-fast) ease; }
.card-disclosure[open] > summary::after { transform: rotate(-135deg); }
.card-disclosure > summary + * { margin-top: 1rem; }
.quiet-button { min-height: 44px; padding: .5rem .25rem; border: 0; background: transparent; color: var(--primary); font-weight: 750; }
.quiet-button:hover { text-decoration: underline; }
.action-icon { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.action-icon[hidden] { display: none; }
.action-icon::before { content: ""; display: inline-block; flex: none; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--action-icon) center / contain no-repeat; mask: var(--action-icon) center / contain no-repeat; }
.action-icon--refresh { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 6.7M20 4v7h-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.action-icon--download { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M4 17v3h16v-3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.action-icon--share { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V3m-4 4 4-4 4 4M5 13v7h14v-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.action-icon--edit { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 20 4.5-1 11-11a2 2 0 0 0-3-3l-11 11L4 20Zm10-13 3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.action-icon--delete { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M9 7V4h6v3m-9 0 1 13h10l1-13M10 11v6m4-6v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.quiet-danger { color: var(--danger-ink); }

/* Status badges: scannable system status, always icon/dot + text */
.status-badge { width: fit-content; max-width: 100%; min-height: 2rem; display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .3rem .8rem .3rem .6rem; border: 1px solid; border-radius: 999px; font-size: var(--text-sm); font-weight: 750; line-height: 1.2; white-space: nowrap; }
.status-badge svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.status-badge::before { content: ""; width: .5rem; height: .5rem; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status-badge:has(svg)::before { display: none; }
.status-badge-ok { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok-ink); }
.status-badge-warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--danger-ink); }
.status-badge-info { border-color: var(--info-border); background: var(--info-soft); color: var(--ink); }
.status-badge-neutral { border-color: var(--border); background: var(--paper); color: var(--muted); }
.status-badge-busy { border-color: var(--info-border); background: var(--paper); color: var(--muted); }
.status-badge-busy::before { animation: badge-pulse 1.2s ease-in-out infinite; }
@keyframes badge-pulse { 50% { opacity: .3; } }
.count-pill { flex: 0 0 auto; padding: .15rem .6rem; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: var(--text-xs); font-weight: 750; font-variant-numeric: tabular-nums; }

.game-body { overscroll-behavior-y: none; touch-action: manipulation; }
.game-shell { width: min(100%, var(--page)); min-height: calc(100dvh - 4rem); margin: 0 auto; padding: 1.25rem max(1rem, env(safe-area-inset-right)) calc(10rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); display: grid; align-content: start; }
/* Only the running game module is vertically centred; setup and login start at the top like every other page. */
.game-shell:has(> .game-panel:not([hidden])) { align-content: center; }
.game-panel { text-align: center; }
.game-status { min-height: 3rem; margin: 0 auto .75rem; display: grid; place-items: center; color: var(--muted); font-size: var(--text-lg); font-weight: 700; }
.playfield { position: relative; width: min(82vw, 21rem); aspect-ratio: 1; margin: .25rem auto .75rem; display: grid; place-items: center; isolation: isolate; }
.playfield[data-phase="revealed"] { width: min(65.6vw, 16.8rem); }
.record { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; border: 3px solid #0a1c2d; border-radius: 50%; background: repeating-radial-gradient(circle at center, #10283e 0 3px, #19334b 4px 6px, #0c2236 7px 9px); box-shadow: 0 5px 0 #091a29, 0 18px 40px rgb(22 47 74 / .3); }
.record::before { content: ""; position: absolute; inset: 2%; z-index: 0; border-radius: 50%; background: radial-gradient(ellipse at 34% 23%, transparent 0 28%, rgb(244 239 229 / .12) 28.4% 28.8%, transparent 29.2%), radial-gradient(ellipse at 71% 70%, transparent 0 42%, rgb(244 239 229 / .09) 42.3% 42.7%, transparent 43%), linear-gradient(112deg, transparent 18%, rgb(244 239 229 / .08) 18.4%, transparent 19%, transparent 64%, rgb(244 239 229 / .07) 64.4%, transparent 65%); opacity: .78; pointer-events: none; }
.record-label { position: relative; z-index: 2; width: 48%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 4px solid var(--badge-branch); border-radius: 50%; background: #f4efe5; box-shadow: inset 0 0 0 1px rgb(22 47 74 / .08), 0 3px 9px rgb(10 28 45 / .32); }
.record-label .theme-cat { width: 92%; height: 92%; transform: translateY(-4%); }
.album-art { width: 100%; height: 100%; display: block; object-fit: cover; border: 5px solid var(--surface); border-radius: var(--radius-lg); box-shadow: 0 16px 36px rgb(22 47 74 / .24); }
.playfield[data-phase="playing"] .record { animation: record-spin 8s linear infinite; }
/* Omdraaien: the record turns the other way, just like the turn order. */
.playfield[data-spin="reverse"][data-phase="playing"] .record { animation-direction: reverse; }
.playfield[data-phase="paused"] .record { animation: none; transform: none; }
.music-notes { position: absolute; inset: -7%; z-index: 3; pointer-events: none; }
.music-note { position: absolute; width: 2rem; height: 2rem; color: var(--reveal); opacity: 0; filter: drop-shadow(0 3px 5px rgb(22 47 74 / .16)); }
.note-one { left: 2%; top: 24%; }
.note-two { right: 0; top: 15%; width: 1.65rem; height: 1.65rem; }
.note-three { right: 8%; bottom: 14%; width: 1.4rem; height: 1.4rem; color: var(--ink); }
.playfield[data-phase="playing"] .note-one { animation: note-dance 1.2s ease-in-out infinite; }
.playfield[data-phase="playing"] .note-two { animation: note-dance 1.2s .35s ease-in-out infinite; }
.playfield[data-phase="playing"] .note-three { animation: note-dance 1.2s .7s ease-in-out infinite; }
.playfield[data-rewinding="true"] .record { animation: record-rewind .72s cubic-bezier(.4, 0, .2, 1) 1; }
.playfield[data-rewinding="true"] .music-note { animation: none; opacity: 0; }
.camera-wrap { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-lg); background: #000; }
.playfield .camera-wrap { position: absolute; inset: 0; z-index: 4; border-radius: 50%; }
.playfield[data-phase="ready"] .record-label { opacity: 0; }
.camera-wrap video, video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.switch-camera { display: flex; min-height: 44px; margin: -.25rem auto .5rem; gap: .4rem; }
.switch-camera svg { width: 1.2rem; height: 1.2rem; }
.scan-frame { position: absolute; inset: 20%; border: 3px solid var(--reveal); border-radius: var(--radius-lg); box-shadow: 0 0 0 100vmax rgb(0 0 0 / .25); }
.answer { margin: .5rem 0 1.25rem; }
.answer > span { display: block; }
.answer-year { display: block; color: var(--reveal); font-size: clamp(3rem, 16vw, 5rem); font-variant-numeric: tabular-nums; line-height: 1; }
.answer-title { margin-top: .6rem; font-size: var(--text-xl); font-weight: 800; }
.answer-artist { color: var(--muted); }
.button-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.primary-dock { position: fixed; z-index: var(--z-dock); left: 0; right: 0; bottom: 0; padding: .75rem max(1rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); background: var(--paper); border-top: 1px solid var(--border); }
.primary-dock > * { width: min(100%, calc(var(--page) - 2rem)); margin-inline: auto; }
/* Block-level so auto margins centre the button under the content column. */
.primary-dock > button { display: flex; }
/* ---- Start screen (spelen.html) ---- */
/* Play style: two large choice tiles */
.play-style-selector { min-width: 0; margin: 0; padding: 0; border: 0; }
.play-style-selector legend { width: 100%; margin-bottom: .75rem; text-align: left; }
.play-style-selector > .card-hint { margin: .75rem 0 0; }
.play-style-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.play-style-option { position: relative; margin: 0; }
.play-style-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.play-style-option > span { min-height: 72px; display: grid; align-content: center; gap: .15rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); color: var(--ink); cursor: pointer; text-align: left; transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.play-style-option small { color: var(--muted); font-size: var(--text-xs); line-height: 1.25; }
.play-style-option input:checked + span { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.play-style-option input:checked + span small { color: var(--primary-ink); opacity: .82; }
.play-style-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.play-style-option input:disabled + span { opacity: .58; cursor: not-allowed; }

/* Segmented control (progressive disclosure: only the active field is rendered) */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border-radius: var(--radius); background: var(--paper); }
/* Players */
.player-form { display: grid; gap: .6rem; }
.player-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
.player-field { min-width: 0; }
.player-field input, .player-field select { margin: 0; }
.score-setup .field-error { margin: .75rem 0 0; }
.active-score-game { padding: 1rem; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.active-score-game p { margin: 0 0 .75rem; }
.active-score-game button { width: 100%; }

.score-strip { margin: 0 0 .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; }
.score-strip .turn-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .8rem; font-weight: 800; }
.undo-score { width: 100%; }

@media (max-width: 390px) {
  .card { padding: 1rem; }
  }

/* ---- Statistics ---- */
.stats-loading { margin: 0; padding: .5rem 0; color: var(--muted); font-weight: 700; }
/* ---- Statistieken (DESIGN.md "Statistieken"): podium, totals, one view at a time ---- */
.page-eyebrow { margin: 0 0 .2rem; color: var(--muted); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.stats-podium { display: grid; gap: .25rem; padding: .9rem 1rem 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.stats-podium .podium { margin: 0; }
.podium-eyebrow { margin: 0; color: var(--muted); font-family: inherit; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.stats-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.stat-card { min-width: 0; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); text-align: left; box-shadow: 0 1px 2px rgb(22 47 74 / .06), 0 4px 14px rgb(22 47 74 / .06); }
.stat-card span { display: block; color: var(--muted); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: .3rem; color: var(--reveal); font-family: var(--display); font-size: clamp(1.45rem, 7vw, 2.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card.has-ring { display: flex; align-items: center; gap: .45rem; padding-inline: .65rem; }
.stat-card.has-ring strong { font-size: clamp(1.2rem, 5.6vw, 1.75rem); }
.stat-ring { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--share, 0) * 1turn), var(--border) 0); mask: radial-gradient(circle, transparent 58%, black 60%); }
.stat-text { min-width: 0; }
/* One segmented switch for the statistics and the end screen. */
.view-switch { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: .25rem; padding: .25rem; border-radius: 999px; background: color-mix(in srgb, var(--border) 70%, var(--paper)); }
.view-switch button { min-width: 0; min-height: 44px; padding: .4rem .2rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: var(--text-xs); font-weight: 800; box-shadow: none; }
.view-switch button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(22 47 74 / .18); }
.view-switch button[hidden] { display: none; }
.stats-view { display: grid; gap: .6rem; }
.stats-view > .helper { margin: 0; }
.rank-list, .game-list, .miss-grid { margin: 0; padding: 0; list-style: none; }
.rank-list, .game-list { display: grid; gap: .5rem; }
.rank-row, .game-row { min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rank-place { width: 1.2rem; flex: none; color: var(--muted); font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-ava { flex: none; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 2px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--ink); font-family: var(--display); font-weight: 800; }
.rank-row.is-first .rank-ava { border-color: var(--reveal); background: var(--reveal); color: var(--on-reveal); }
.rank-body { flex: 1 1 auto; min-width: 0; display: grid; gap: .3rem; }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.rank-head strong { min-width: 0; overflow-wrap: anywhere; }
.rank-rate { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-bar { display: block; height: .5rem; border-radius: 999px; background: linear-gradient(to right, var(--good) calc(var(--share, 0) * 100%), color-mix(in srgb, var(--bad) 22%, var(--surface)) 0); }
.rank-body small, .game-info small { color: var(--muted); font-size: var(--text-xs); }
.decade-bars { display: grid; gap: .7rem; }
.decade-bar { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 3rem; align-items: center; gap: .6rem; }
.decade-label { font-family: var(--display); font-variant-numeric: tabular-nums; }
.decade-middle { display: grid; gap: .2rem; min-width: 0; }
.decade-middle small { color: var(--muted); font-size: var(--text-2xs); }
.decade-track { display: block; height: .85rem; border-radius: .45rem; background: linear-gradient(to right, var(--primary) calc(var(--share, 0) * 100%), color-mix(in srgb, var(--border) 70%, var(--surface)) 0); }
.decade-bar.is-strong .decade-track { background: linear-gradient(to right, var(--good) calc(var(--share, 0) * 100%), color-mix(in srgb, var(--border) 70%, var(--surface)) 0); }
.decade-rate { text-align: right; font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
/* Missed cards look like the printed Gitster cards: paper, ink, the year in the ring colour. */
.miss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.miss-card { position: relative; min-width: 0; min-height: 9rem; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: .75rem; border: 1px solid color-mix(in srgb, var(--card-groove) 70%, var(--card-paper)); border-radius: var(--radius); background: var(--card-paper); color: var(--card-ink); box-shadow: 0 6px 16px rgb(22 47 74 / .1); text-align: center; }
.miss-card[hidden] { display: none; }
.miss-title, .miss-artist { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miss-title { font-size: var(--text-sm); font-weight: 800; }
.miss-year { color: color-mix(in srgb, var(--card-ring) 78%, var(--card-ink)); font-family: var(--display); font-size: clamp(2rem, 9vw, 2.25rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.miss-artist { color: var(--card-muted); font-size: var(--text-xs); }
.miss-times { position: absolute; top: .5rem; right: .5rem; padding: .05rem .45rem; border-radius: 999px; background: var(--card-ink); color: var(--card-paper); font-size: var(--text-2xs); font-weight: 800; }
.miss-empty { grid-column: 1 / -1; }
.evening-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.evening-pill { min-height: 44px; padding: .3rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 800; }
.evening-pill[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.evening-summary { margin: 0; padding: .7rem .9rem; border: 1px solid var(--warn-border); border-radius: var(--radius); background: var(--warn-soft); color: var(--ink); font-size: var(--text-sm); font-weight: 700; }
.game-row { flex-wrap: wrap; }
.game-date { flex: none; width: 2.9rem; display: grid; justify-items: center; padding: .35rem 0; border-radius: .6rem; background: var(--paper); }
.game-date strong { font-family: var(--display); font-size: var(--text-lg); line-height: 1; }
.game-date small { color: var(--muted); font-size: var(--text-2xs); font-weight: 800; text-transform: uppercase; }
.game-info { flex: 1 1 10rem; min-width: 0; display: grid; gap: .15rem; }
.game-info strong { overflow-wrap: anywhere; }
.game-more { flex: none; }
.game-more > summary { width: 44px; height: 44px; display: grid; place-items: center; border-radius: .7rem; color: var(--muted); cursor: pointer; list-style: none; }
.game-more > summary::-webkit-details-marker { display: none; }
.game-more > summary svg { width: 1.2rem; height: 1.2rem; }
.game-more[open] { flex-basis: 100%; }
.game-more[open] > summary { margin-left: auto; }
.game-more .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.game-more .row-actions .quiet-button { padding-inline: 0; }
.game-more .row-actions .delete-question { flex-basis: 100%; }
.decade-meter { grid-column: 1 / -1; height: .35rem; overflow: hidden; border-radius: 999px; background: var(--border); }
.decade-meter span { display: block; height: 100%; border-radius: inherit; background: var(--reveal); }

/* ---- Admin ---- */
.deck-list { display: grid; margin-top: .5rem; }
.track-list { display: grid; gap: .5rem; }
/* Track row: checkbox | title, artist, badges | year, with secondary actions behind "⋯" */
.track-row { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 5rem; grid-template-areas: "check info year" "check info more"; column-gap: .6rem; row-gap: .15rem; align-items: start; padding: .6rem .6rem .5rem .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, opacity var(--dur-fast) ease; }
.track-row.is-excluded { background: var(--paper); }
.track-row.is-excluded .track-info { opacity: .55; }
.track-row.needs-attention { border-color: var(--warn-border); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.track-check { grid-area: check; width: 48px; min-height: 48px; padding: 0; border: 0; background: transparent; }
.track-check svg { width: 1.6rem; height: 1.6rem; padding: .25rem; border: 2px solid var(--border); border-radius: .5rem; color: transparent; background: var(--surface); transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.track-check[aria-pressed="true"] svg { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.track-check:disabled { cursor: wait; }
.track-info { grid-area: info; min-width: 0; display: grid; gap: .1rem; padding-top: .35rem; line-height: 1.25; }
.track-info > strong, .track-info > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-info > span { color: var(--muted); font-size: var(--text-md); }
.track-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.track-badges .status-badge { min-height: 1.5rem; padding: .1rem .5rem .1rem .4rem; font-size: var(--text-2xs); }
.track-other-years { color: var(--muted); font-size: var(--text-2xs); }
.track-fans { white-space: nowrap; }
.track-year { grid-area: year; margin: 0; display: grid; gap: .1rem; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; }
.track-year input { width: 100%; min-width: 0; min-height: 44px; padding: .35rem .2rem; -moz-appearance: textfield; appearance: textfield; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.track-year input::-webkit-inner-spin-button, .track-year input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.track-more { grid-area: more; justify-self: end; }
.track-more > summary { width: 44px; min-height: 36px; display: flex; align-items: center; justify-content: center; border-radius: .6rem; color: var(--muted); cursor: pointer; list-style: none; }
.track-more > summary::-webkit-details-marker { display: none; }
.track-more > summary svg { width: 1.25rem; height: 1.25rem; }
.track-more[open] > summary { background: var(--paper); color: var(--ink); }
.track-actions { position: absolute; z-index: 5; right: .5rem; display: grid; min-width: 12rem; margin-top: .25rem; padding: .3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.track-actions .quiet-button { width: 100%; justify-content: flex-start; padding-inline: .6rem; text-decoration: none; }
/* Deck row: name + status badge on one line, meta below, one main action and a quiet delete */
.deck-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem .75rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.deck-row:first-child { border-top: 0; padding-top: .5rem; }
.deck-main, .track-info { min-width: 0; display: grid; }
.deck-main strong { overflow-wrap: anywhere; }
.deck-meta, .track-info span, .track-info small { color: var(--muted); }
.deck-meta { font-size: var(--text-md); }
.deck-row .deck-actions { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.deck-actions > button:first-child { flex: 1; }
.deck-row > .status-badge { align-self: start; min-height: 1.6rem; padding: .15rem .6rem .15rem .5rem; font-size: var(--text-xs); }
.delete-question { flex: 1 0 100%; color: var(--ink); font-weight: 700; }
.danger-button { border-color: var(--danger); color: var(--danger-ink); }
/* .card sets margin: 0; a modal dialog needs margin: auto to sit centred in the viewport. */
dialog.card { width: min(calc(100% - 2rem), 32rem); max-height: min(85dvh, calc(100dvh - 2rem)); margin: auto; overflow-y: auto; overscroll-behavior: contain; color: var(--ink); }
dialog::backdrop { background: rgb(22 47 74 / .5); }
.spread { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.spread span { padding: .3rem .6rem; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: var(--text-sm); font-weight: 700; }
.print-actions { display: grid; gap: .6rem; margin: 1rem 0; }
.selection-decades { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: var(--text-md); }
.selection-tracks { margin: .5rem 0 0; }
.selection-tracks summary { min-height: 44px; display: flex; align-items: center; color: var(--primary); font-weight: 750; cursor: pointer; }
.selection-tracks ol { max-height: 16rem; overflow: auto; margin: 0; padding-left: 1.4rem; font-size: var(--text-md); }
.check-row { display: flex; align-items: flex-start; gap: .65rem; margin: 1rem 0 0; color: var(--ink); font-size: var(--text-base); font-weight: 700; }
.check-row input { width: 1.4rem; min-height: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.check-row small { display: block; margin-top: .2rem; font-weight: 400; line-height: 1.4; }

/* ---- Chip bar: in view during the round, two columns of 48px+ targets ----
   Only rendered when chips are on; the buttons change with the phase. */
@media (max-width: 340px) {
  }
.print-summary { white-space: normal; border-radius: var(--radius); }


@keyframes record-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes note-dance {
  0%, 100% { opacity: 0; transform: translateY(.6rem) rotate(-8deg) scale(.82); }
  35%, 70% { opacity: 1; }
  55% { opacity: 1; transform: translateY(-.55rem) rotate(8deg) scale(1.08); }
}
@keyframes record-rewind {
  0% { transform: rotate(0deg) scale(1); }
  45% { transform: rotate(-180deg) scale(.965); box-shadow: 0 12px 30px rgb(22 47 74 / .2); }
  100% { transform: rotate(-360deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 560px) {
}

/* ---- Theme choice (Admin) ---- */
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.theme-name { font-size: var(--text-md); }
.theme-option { position: relative; margin: 0; display: grid; gap: .5rem; padding: .55rem .55rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); color: var(--ink); cursor: pointer; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.theme-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.theme-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.theme-option:has(input:disabled) { cursor: wait; opacity: .7; }
.theme-swatch { display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - .3rem); }
.theme-swatch-standard { background: url("/gitster-cat.png") center / auto 34% no-repeat, radial-gradient(circle closest-side, #f4efe5 0 36%, #ee7833 37% 42%, #162f4a 43% 90%, transparent 91%), #eef2f3; }
.theme-swatch-metal { background: url("/gitster-cat-metal.png") center / auto 34% no-repeat, radial-gradient(circle closest-side, #0b0b0b 0 36%, #ece4d2 37% 41%, #1c1c1c 42% 90%, transparent 91%), #111; box-shadow: inset 0 0 0 3px #111, inset 0 0 0 4px rgb(236 228 210 / .35); }
.theme-name { font-weight: 800; text-align: center; line-height: 1.2; }
.theme-name-metal { font-family: "Metal Mania", "Avenir Next", system-ui, sans-serif; font-weight: 400; font-size: var(--text-xl); letter-spacing: .06em; }

/* Theme-specific assets: exactly one of each pair is shown. */
html:not([data-theme="metal"]) .metal-only, :root[data-theme="metal"] .standard-only { display: none !important; }
/* The cat comes from one token per theme (--cat-art); the wink over the standard art
   takes the theme's face and line colours. Themes with a text name hide the image name. */
:root { --cat-art: url("/gitster-cat.png"); --cat-bare: url("/gitster-cat-bare.png"); --wink-face: #fcfbfb; --wink-line: #0b2a51; }
:root[data-theme="metal"] { --cat-art: url("/gitster-cat-metal.png"); --cat-bare: url("/gitster-cat-bare-metal.png"); }
:root[data-theme="neon"] { --cat-art: url("/gitster-cat-neon.png"); --cat-bare: url("/gitster-cat-bare-neon.png"); }
.theme-cat { display: block; background: var(--cat-art) center / contain no-repeat; }
html:not([data-theme="neon"]) .neon-only, :root[data-theme="neon"] .neon-hide { display: none !important; }
:root:is([data-theme="metal"], [data-theme="neon"]) .wink-std { display: none; }
.brand-name { display: none; }
:root:is([data-theme="neon"], [data-theme="kerst"]) .brand-logo.standard-only { display: none !important; }
:root:is([data-theme="neon"], [data-theme="kerst"]) .brand-name { display: block; font-family: var(--display); line-height: 1; white-space: nowrap; }

/* ---- METAL!! theme: dark, bone-white on black, inspired by the heavy-metal deck ---- */
@font-face { font-family: "Metal Mania"; src: url("/fonts/metal-mania.woff2") format("woff2"); font-display: swap; }
:root[data-theme="metal"] {
  color-scheme: dark;
  --paper: #0b0b0b;
  --surface: #141414;
  --surface-strong: #1b1b1b;
  --ink: #ece4d2;
  --muted: #a8a092;
  --border: #3d3a34;
  --primary: #ece4d2;
  --primary-ink: #0b0b0b;
  --reveal: #ece4d2;
  --success: #a8a092;
  --warning: #d4453a;
  --danger: #d4453a;
  --danger-ink: #ff9a8f;
  --focus: #fff6e2;
  --ok-soft: #13211a;
  --ok-border: #2e5a40;
  --ok-ink: #93d8ac;
  --warn-soft: #2a1311;
  --warn-border: #6e2b24;
  --info-soft: #1b1b1b;
  --info-border: #4a463e;
  /* Bone-white main button, like the printed metal deck. */
  --bone-hi: #fff4dc; --bone: #f6f0e2; --bone-lo: #d6ccb8;
  --radius-sm: .3rem;
  --radius: .45rem;
  --radius-lg: .55rem;
  --shadow: 0 1px 2px rgb(0 0 0 / .6), 0 14px 34px rgb(0 0 0 / .6);
}
/* Grunge: fine bone-coloured speckles and a soft light from above, like worn print. */
:root[data-theme="metal"] body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgb(236 228 210 / .07), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .89 0 0 0 0 .82 1.5 0 0 0 -.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
:root[data-theme="metal"] h1 { font-family: "Metal Mania", "Avenir Next", system-ui, sans-serif; font-weight: 400; letter-spacing: .03em; line-height: 1.05; text-shadow: 0 2px 0 #000; }
:root[data-theme="metal"] .page-intro h1::after { content: ""; display: block; width: 7rem; height: .9rem; margin-top: .45rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 112 14'%3E%3Cpath d='M0 7h46M66 7h46' stroke='%23ece4d2' stroke-opacity='.45' stroke-width='1.5'/%3E%3Cpath d='M57 0 50 8h5l-3 6 9-9h-5l3-5z' fill='%23ece4d2'/%3E%3C/svg%3E") left center / contain no-repeat; }
:root[data-theme="metal"] .card-title, :root[data-theme="metal"] .play-style-selector legend { text-transform: uppercase; letter-spacing: .06em; font-size: var(--text-md); }
:root[data-theme="metal"] .game-header { background: rgb(11 11 11 / .94); box-shadow: 0 1px 0 var(--border), 0 8px 18px rgb(0 0 0 / .55); }
/* Metal name stretched to the width of the standard name (6.42rem = 1.5rem × 809/189),
   so both themes take the same room in the header. */
:root[data-theme="metal"] .brand-logo { width: 6.42rem; height: 2.2rem; max-width: min(40vw, 8rem); object-fit: fill; }
/* Cards get the double frame line from the printed deck. */
:root[data-theme="metal"] .card, :root[data-theme="metal"] .stat-card { border-color: var(--info-border); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px rgb(236 228 210 / .1), 0 10px 28px rgb(0 0 0 / .5); }
:root[data-theme="metal"] button.primary, :root[data-theme="metal"] .btn.primary, :root[data-theme="metal"] button.reveal-action { border-color: var(--bone-hi); background: linear-gradient(180deg, var(--bone), var(--bone-lo)); color: var(--primary-ink); letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 2px 0 #000, inset 0 1px 0 rgb(255 255 255 / .6); }
:root[data-theme="metal"] .status-badge-warn, :root[data-theme="metal"] .quiet-danger, :root[data-theme="metal"] .danger-button { color: var(--danger-ink); }
/* Record: black vinyl, bone label ring and lightning bolts instead of branches. */
:root[data-theme="metal"] .record { border-color: #000; background: repeating-radial-gradient(circle at center, #0c0c0c 0 3px, #202020 4px 6px, #111 7px 9px); box-shadow: 0 5px 0 #000, 0 0 0 1px rgb(236 228 210 / .18), 0 18px 40px rgb(0 0 0 / .7); }
:root[data-theme="metal"] .record::before { opacity: .6; }
:root[data-theme="metal"] .record-label { border-color: var(--reveal); background: var(--paper); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgb(236 228 210 / .35), 0 3px 9px rgb(0 0 0 / .6); }
:root[data-theme="metal"] .record-label .theme-cat { transform: none; }
:root[data-theme="metal"] .music-note, :root[data-theme="metal"] .note-three { color: var(--reveal); filter: drop-shadow(0 2px 3px rgb(0 0 0 / .8)); }
:root[data-theme="metal"] .answer-year { font-family: "Metal Mania", "Avenir Next", system-ui, sans-serif; font-weight: 400; letter-spacing: .04em; text-shadow: 0 3px 0 #000; }
:root[data-theme="metal"] .album-art { box-shadow: 0 16px 36px rgb(0 0 0 / .7); }
:root[data-theme="metal"] dialog::backdrop { background: rgb(0 0 0 / .72); }

/* ---- Info window (menu → Info en spelregels) ---- */
/* A sheet from the bottom, like the standings during a game: the screen stays visible above it. */
dialog.info-dialog { width: min(100%, var(--page)); max-width: 100%; height: fit-content; max-height: calc(100dvh - 5.5rem); margin: auto auto 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.info-head { display: grid; gap: .5rem; margin-bottom: .25rem; }
/* Title and close stay in view while a window scrolls: it can always be closed. */
.info-title-row, .replace-head { position: sticky; top: -1.25rem; z-index: 2; margin: -1.25rem -1.25rem 0; padding: 1rem 1.25rem .6rem; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.info-title-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.sheet-close { position: absolute; top: .6rem; right: 0; width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.sheet-close svg { width: 1.4rem; height: 1.4rem; }
.sheet-close[hidden] { display: none; }
.summary-dialog[data-mode="interim"] .summary-intro { position: sticky; top: -1.1rem; z-index: 2; margin: -1.1rem -1rem 0; padding: 1.1rem 3rem .5rem; background: var(--paper); }
.summary-dialog[data-mode="interim"] .sheet-close { right: .5rem; }
.info-title-row h2 { margin: 0; }
.info-close { width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.info-close svg { width: 1.4rem; height: 1.4rem; }
.info-version { font-variant-numeric: tabular-nums; }
.info-dialog h3 { margin: 1rem 0 .35rem; color: var(--ink); font-size: var(--text-md); font-weight: 800; }
.info-dialog ol, .info-dialog ul { margin: 0; padding-left: 1.2rem; color: var(--ink); line-height: 1.45; }
.info-dialog li + li { margin-top: .3rem; }
.info-dialog > button { margin-top: 1.25rem; }
/* Illustrated rule steps: own line drawing on top, step name and text below. */
.info-dialog :is(ol, ul):has(> .rule-step) { padding-left: 0; list-style: none; }
.info-dialog li.rule-step { display: grid; gap: .5rem; padding: .6rem .6rem .85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.info-dialog li.rule-step + li, .info-dialog li + li.rule-step { margin-top: .6rem; }
.rule-step strong { display: block; margin-bottom: .15rem; font-weight: 800; }
.rule-step > span { padding-inline: .3rem; }
.rule-art { --rule-accent: var(--reveal); display: block; width: 100%; max-width: none; height: auto; color: var(--ink); }
:root[data-theme="metal"] .rule-art { --rule-accent: var(--danger); }


/* ==== Spice: reveal, record player, winning, finishing touches ====================
   Motion follows the Impeccable guidance: ease-out-expo, no bounce, transform and
   opacity only, delight at earned moments (< 1 s, never blocking), and a calm
   alternative under prefers-reduced-motion (see the end of this block). */
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-700.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-500.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --display: "Poppins", "Avenir Next", system-ui, sans-serif; }

/* Display type matches the printed cards (Poppins); body text stays the system font. */
h1, h2, h3, .card-title, .answer-year, .answer-title, .podium strong, button.primary, .btn.primary { font-family: var(--display); }
h1 { font-weight: 700; letter-spacing: -.03em; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Tap feedback: a quick, small press on every button. */
button, .btn { transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease; }
button:not(:disabled):active, .btn:active { transform: scale(.97); }

/* Page changes cross-fade where the browser supports it (Chrome, Safari 18.2+). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: var(--ease-out); }
.game-header { view-transition-name: topbar; }

/* -- Reveal: rolling year ------------------------------------------------------- */
.answer-year { display: flex; justify-content: center; }
.odo-digit { display: inline-block; height: 1em; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.answer-year.is-rolling .odo-digit { animation: odo-unmask 0s linear 1.3s forwards; }
@keyframes odo-unmask { to { -webkit-mask-image: none; mask-image: none; } }
.odo-strip { display: block; transform: translateY(0); }
.odo-strip > span { display: block; height: 1em; line-height: 1; text-align: center; }
.answer-year.is-rolling .odo-strip { transform: translateY(calc(var(--odo-stop) * -1em)); transition: transform 900ms var(--ease-out) var(--odo-delay, 0ms); }
.answer-title, .answer-artist { animation: answer-in 500ms var(--ease-out) 350ms both; }
@keyframes answer-in { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

/* -- Reveal: the record turns into the album cover, with its colour behind it ---- */
.album-art.is-entering { animation: cover-flip 650ms var(--ease-out) both; }
@keyframes cover-flip {
  from { opacity: 0; transform: perspective(900px) rotateY(-95deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.playfield::before { content: ""; position: absolute; inset: -16%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--reveal-tint, transparent), transparent); opacity: 0; transition: opacity 700ms var(--ease-out); pointer-events: none; }
.playfield[data-tinted="true"]::before { opacity: .55; }

/* -- Record player: tonearm and equaliser ----------------------------------------- */
.tonearm { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 3px 3px rgb(10 28 45 / .35)); }
.tonearm-arm { transform-box: view-box; transform-origin: 88px 10px; transform: rotate(-24deg); transition: transform 800ms var(--ease-out); }
.tonearm-rod { fill: none; stroke: #c4ccd3; stroke-width: 2.4; stroke-linecap: round; }
.tonearm-head { fill: #c4ccd3; stroke: #0a1c2d; stroke-width: .6; }
.tonearm-weight { fill: #8d99a4; }
.tonearm-base { fill: var(--surface); stroke: #0a1c2d; stroke-width: 1.2; }
.tonearm-pin { fill: var(--reveal); }
.playfield[data-phase="playing"] .tonearm-arm { transform: rotate(0deg); }
.playfield[data-phase="paused"] .tonearm-arm { transform: rotate(-7deg); }
.playfield[data-phase="loading_track"] .tonearm-arm { transform: rotate(-12deg); }
/* Hidden while scanning (camera) and when the cover replaces the record. */
.playfield[data-phase="ready"] .tonearm, .playfield:has(.album-art:not([hidden])) .tonearm { opacity: 0; }
.tonearm { transition: opacity var(--dur-base) ease; }

/* Spectrum equalizer: 15 bars, taller in the middle, each with its own irregular rhythm.
   Transform/opacity only; the space below the record grows with it (no overlap). */
.eq { position: absolute; left: 50%; bottom: -3.1rem; z-index: 3; display: flex; align-items: flex-end; gap: 4px; height: 2.75rem; transform: translateX(-50%); opacity: 0; transition: opacity var(--dur-base) ease; pointer-events: none; }
.eq::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: -4px; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--reveal) 35%, transparent); }
.eq i { width: 7px; height: calc(var(--eq-h, 1) * 100%); border-radius: 3.5px 3.5px 2px 2px; background: linear-gradient(to top, var(--reveal), color-mix(in srgb, var(--reveal) 55%, #ffd8a8)); transform-origin: bottom; transform: scaleY(.3); }
:root[data-theme="metal"] .eq i { background: linear-gradient(to top, var(--danger), var(--reveal)); }
.playfield[data-phase="playing"] .eq { opacity: 1; }
.playfield[data-phase="playing"] .eq i { animation: eq-bounce var(--eq-d, 1200ms) linear var(--eq-o, 0ms) infinite; }
.eq i:nth-child(1) { --eq-h: 0.45; --eq-d: 1730ms; --eq-o: -286ms; }
.eq i:nth-child(2) { --eq-h: 0.53; --eq-d: 951ms; --eq-o: -313ms; }
.eq i:nth-child(3) { --eq-h: 0.61; --eq-d: 1402ms; --eq-o: -757ms; }
.eq i:nth-child(4) { --eq-h: 0.69; --eq-d: 1236ms; --eq-o: -1201ms; }
.eq i:nth-child(5) { --eq-h: 0.76; --eq-d: 1308ms; --eq-o: -1074ms; }
.eq i:nth-child(6) { --eq-h: 0.84; --eq-d: 1463ms; --eq-o: -262ms; }
.eq i:nth-child(7) { --eq-h: 0.92; --eq-d: 1049ms; --eq-o: -1044ms; }
.eq i:nth-child(8) { --eq-h: 1.00; --eq-d: 1196ms; --eq-o: -976ms; }
.eq i:nth-child(9) { --eq-h: 0.92; --eq-d: 1386ms; --eq-o: -612ms; }
.eq i:nth-child(10) { --eq-h: 0.84; --eq-d: 1774ms; --eq-o: -1644ms; }
.eq i:nth-child(11) { --eq-h: 0.76; --eq-d: 1639ms; --eq-o: -712ms; }
.eq i:nth-child(12) { --eq-h: 0.69; --eq-d: 1061ms; --eq-o: -683ms; }
.eq i:nth-child(13) { --eq-h: 0.61; --eq-d: 1796ms; --eq-o: -579ms; }
.eq i:nth-child(14) { --eq-h: 0.53; --eq-d: 1634ms; --eq-o: -1242ms; }
.eq i:nth-child(15) { --eq-h: 0.45; --eq-d: 1298ms; --eq-o: -722ms; }
@keyframes eq-bounce { 0% { transform: scaleY(.2); } 18% { transform: scaleY(.95); } 32% { transform: scaleY(.45); } 50% { transform: scaleY(.8); } 64% { transform: scaleY(.3); } 82% { transform: scaleY(1); } 100% { transform: scaleY(.2); } }
.playfield:not([data-phase="revealed"]) { margin-bottom: 3.75rem; }

/* Waiting for Spotify: the record breathes instead of sitting still. */
.playfield[data-phase="loading_track"] .record, .playfield[data-phase="starting"] .record { animation: record-wait 1.4s ease-in-out infinite; }
@keyframes record-wait { 50% { transform: scale(.975); opacity: .85; } }

/* -- Correct answer: a short spark burst ------------------------------------------ */
.spark-burst { position: fixed; z-index: var(--z-effects); width: 0; height: 0; pointer-events: none; }
.spark { position: absolute; left: -4px; top: -6px; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: spark-fly 900ms var(--ease-out) var(--delay, 0ms) forwards; }
.spark-1 { background: var(--reveal); }
.spark-2 { background: var(--primary); }
.spark-3 { background: var(--success); border-radius: 50%; width: 8px; height: 8px; }
@keyframes spark-fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}
.is-cheered { animation: cheer 500ms var(--ease-out); }
@keyframes cheer { 40% { transform: scale(1.06); } }

/* -- Live standings: pulse on a new card, badge for a hot streak ------------------ */
@keyframes bump { 30% { transform: scale(1.18); color: var(--reveal); } }
.streak-badge { display: inline-flex; align-items: center; gap: .2rem; margin-left: .25rem; padding: .05rem .45rem .05rem .3rem; border-radius: 999px; background: color-mix(in srgb, var(--reveal) 16%, var(--surface)); color: var(--danger-ink); font-size: var(--text-2xs); font-weight: 800; vertical-align: .08em; white-space: nowrap; }
.streak-badge svg { width: .9rem; height: .9rem; }

/* -- End of game: podium ------------------------------------------------------------ */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: .5rem; margin: .75rem 0 1rem; padding: 0; list-style: none; }
.podium-step { display: grid; gap: .35rem; min-width: 0; text-align: center; animation: podium-rise 700ms var(--ease-out) var(--rise-delay, 0ms) both; transform-origin: bottom; }
.podium-name { overflow: hidden; color: var(--ink); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.podium-block { display: grid; place-content: center; gap: .1rem; border-radius: var(--radius) var(--radius) .35rem .35rem; background: var(--paper); border: 1px solid var(--border); color: var(--ink); }
.podium-block strong { font-size: var(--text-2xl); line-height: 1; }
.podium-block small { color: var(--muted); font-size: var(--text-2xs); }
.podium-place-1 .podium-block { height: 7rem; background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.podium-place-1 .podium-block small { color: var(--primary-ink); opacity: .85; }
/* Winner name in ink: orange text on the page fails contrast (axe); the block carries the colour. */
.podium-place-1 .podium-name { color: var(--ink); }
.podium-place-2 .podium-block { height: 5.2rem; }
.podium-place-3 .podium-block { height: 4rem; }
@keyframes podium-rise { from { opacity: 0; transform: translateY(1.5rem) scaleY(.6); } to { opacity: 1; transform: none; } }

/* METAL!!: metal parts in bone and black. */
:root[data-theme="metal"] .tonearm-rod { stroke: var(--ink); }
:root[data-theme="metal"] .tonearm-head { fill: var(--ink); stroke: #000; }
:root[data-theme="metal"] .tonearm-weight { fill: #7d776c; }
:root[data-theme="metal"] .tonearm-base { fill: #111; stroke: var(--ink); }
:root[data-theme="metal"] .spark-2 { background: var(--danger); }

/* Reduced motion: no rolling, flying or sliding. State changes stay visible through
   colour and an instant change; the global rule above shortens what remains. */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .album-art.is-entering, .podium-step, .answer-title, .answer-artist { animation: none; }
  .playfield[data-phase="playing"] .eq i { animation: none; transform: scaleY(.6); }
  /* Continuous motion while music plays: the record and notes rest too. */
  .playfield[data-phase="playing"] .record, .playfield[data-phase="playing"] .music-note { animation: none; }
  .playfield[data-phase="playing"] .music-note { opacity: .85; }
  .playfield[data-phase="loading_track"] .record, .playfield[data-phase="starting"] .record { animation: none; opacity: .85; }
}
#summary-title:focus { outline: none; }
#game-summary { gap: .45rem; } #game-summary p { margin: 0; }

/* ---- Play pass (Admin) ---- */
.play-pass { display: grid; justify-items: center; gap: .5rem; margin: .25rem 0 1rem; }
.play-pass-qr { width: 11rem; height: 11rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-white); }
.play-pass-url { max-width: 100%; margin: 0; color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; text-align: center; }
.play-pass-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.play-pass-actions > .primary { flex: 1 1 10rem; }
.play-pass-actions .delete-question { flex-basis: 100%; }

/* ---- Reveal screen: spacious answer, scoring in the flow (no overlay) ----
   Hierarchy: year > title > artist; one calm card for the verdict. The fixed score
   overlay used to cover the title on phones, so it now sits below the answer. */
.score-strip { margin-bottom: 1rem; }
.score-strip .turn-row { font-size: var(--text-base); font-weight: 700; padding: .7rem 1rem; }
.score-unit { color: var(--muted); font-size: .88em; font-weight: 500; }

.game-panel[data-phase="revealed"] .game-status { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.playfield[data-phase="revealed"] { width: min(46vw, 11rem); margin: 1.25rem auto 1.5rem; }
.playfield[data-phase="revealed"] .album-art { border: 0; border-radius: var(--radius); outline: 1px solid rgb(22 47 74 / .08); outline-offset: -1px; box-shadow: 0 14px 32px -10px rgb(22 47 74 / .45); }
.answer { max-width: 24rem; margin: 0 auto 1.75rem; display: grid; gap: .25rem; }
.answer-year { margin-bottom: .5rem; font-size: clamp(2.75rem, 13vw, 3.5rem); letter-spacing: -.01em; }
.answer-title { margin-top: 0; font-size: var(--text-xl); font-weight: 700; line-height: 1.3; text-wrap: balance; }
.answer-artist { font-size: var(--text-base); line-height: 1.4; }

/* Scored: one quiet line with the verdict and an undo link, instead of a second big button. */
:root[data-theme="metal"] .playfield[data-phase="revealed"] .album-art { outline-color: rgb(236 228 210 / .12); box-shadow: 0 14px 32px -10px rgb(0 0 0 / .8); }

@media (max-height: 700px) {
  .playfield[data-phase="revealed"] { width: min(36vw, 8.5rem); margin: .5rem auto 1rem; }
  .answer { margin-bottom: 1.25rem; }
  .answer-year { margin-bottom: .25rem; font-size: 2.6rem; }
}
/* The answer screen starts at the top so nothing shifts when the verdict collapses. */
.game-shell:has(> .game-panel[data-phase="revealed"]) { align-content: start; }
@media (min-height: 780px) {
  .playfield[data-phase="revealed"] { width: min(56vw, 13rem); }
}

/* ---- Difficulty: options card, rule chips, timer ring ----
   The ring empties clockwise around the record; the last five seconds turn red and the
   number pulses once per second (transform only). At zero the music stops. */
.difficulty summary > span { display: grid; gap: .1rem; }
.difficulty summary .card-title { margin: 0; }
.difficulty-summary { color: var(--muted); font-size: var(--text-sm); font-weight: 500; }
.difficulty > label:not(.check-row) { margin-top: .75rem; }
.difficulty .check-row { margin-top: .75rem; }

.round-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: -.25rem 0 .75rem; padding: 0; list-style: none; }
.round-rules li { padding: .25rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 9%, var(--surface)); color: var(--ink); font-size: var(--text-xs); font-weight: 700; }
.game-panel[data-phase="revealed"] .round-rules { display: none; }

/* Standard --danger is brand orange; the countdown needs a true alarm red. */
.playfield { --timer-alert: var(--bad); }
:root[data-theme="metal"] .playfield { --timer-alert: var(--danger); }
.timer-ring { position: absolute; inset: -5%; z-index: 0; width: 110%; height: 110%; transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.timer-ring circle { fill: none; stroke-width: 2.2; }
.timer-track { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.timer-progress { stroke: var(--reveal); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-base) linear, stroke var(--dur-base) ease; }
.playfield[data-timer="low"] .timer-progress, .playfield[data-timer="up"] .timer-progress { stroke: var(--timer-alert); }
.timer-count { position: absolute; top: -.5rem; left: -.25rem; z-index: 5; min-width: 3.25rem; margin: 0; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--display); font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; text-align: center; box-shadow: 0 4px 12px rgb(22 47 74 / .12); }
.playfield[data-timer="low"] .timer-count { border-color: var(--timer-alert); color: var(--timer-alert); animation: timer-pulse 1s var(--ease-out) infinite; }
.playfield[data-timer="up"] .timer-count { border-color: var(--timer-alert); background: var(--timer-alert); color: var(--on-accent); }
:root[data-theme="metal"] .playfield[data-timer="up"] .timer-count { color: var(--ink); }
@keyframes timer-pulse { 0% { transform: scale(1.12); } 60%, 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .playfield[data-timer="low"] .timer-count { animation: none; }
  .timer-progress { transition: none; }
}
.playfield[data-timer="up"] .timer-progress { opacity: 0; }
.playfield[data-timer="up"] .timer-track { stroke: color-mix(in srgb, var(--timer-alert) 35%, transparent); }
/* Short phones (e.g. iPhone SE): smaller record while playing so turn strip, rules,
   timer and equalizer all stay above the button bar. */
@media (max-height: 700px) {
  .playfield:not([data-phase="revealed"]) { width: min(60vw, 13.5rem); margin-top: 0; }
  .game-panel:not([data-phase="revealed"]) .game-status { min-height: 0; margin-bottom: .5rem; font-size: var(--text-md); }
  .round-rules { margin: 0 0 .9rem; gap: .3rem; }
  .round-rules li { font-size: var(--text-2xs); }
}

/* ---- Honorary titles on the end screen ---- */
.awards { margin: 1.25rem 0 .5rem; text-align: left; }
.awards h3 { margin: 0 0 .6rem; font-size: var(--text-base); }
.awards ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.award { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); animation: award-in 500ms var(--ease-out) both; }
.award:nth-child(2) { animation-delay: 90ms; }
.award:nth-child(3) { animation-delay: 180ms; }
.award:nth-child(4) { animation-delay: 270ms; }
.award > svg { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; padding: .45rem; border-radius: 50%; background: color-mix(in srgb, var(--reveal) 16%, var(--surface)); color: var(--reveal); }
.award div { display: grid; gap: .05rem; min-width: 0; }
.award strong { font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.award-winners { font-family: var(--display); font-size: var(--text-lg); font-weight: 700; }
.award small { color: var(--muted); font-size: var(--text-sm); }
@keyframes award-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .award { animation: none; } }

/* ---- Official Hitster cards ---- */
.hitster-options { margin-top: .75rem; }
.hitster-options label { display: block; margin-bottom: .35rem; }
.hitster-options .helper { margin: .5rem 0 0; }
/* The year lives on the printed card: a quiet line instead of the big rolling year. */
.answer-year.is-card-year { margin-bottom: .75rem; color: var(--muted); font-family: inherit; font-size: var(--text-md); font-weight: 600; letter-spacing: 0; text-shadow: none; }
:root[data-theme="metal"] .answer-year.is-card-year { font-family: inherit; font-weight: 600; letter-spacing: 0; text-shadow: none; }

/* ---- Gebruikers ---- */
#user-form { display: grid; gap: .45rem; }
#user-form label small { color: var(--muted); font-weight: 500; }
#user-form .primary { margin-top: .5rem; }
.user-list { display: grid; gap: .6rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.user-row { display: grid; gap: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.user-head { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.user-avatar { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--reveal) 16%, var(--surface)); color: var(--reveal); font-family: var(--display); font-size: var(--text-lg); font-weight: 700; }
.user-names { display: grid; min-width: 0; }
.user-names strong { overflow-wrap: anywhere; font-family: var(--display); font-size: var(--text-lg); font-weight: 700; }
.user-names small { color: var(--muted); font-size: var(--text-sm); }
.user-titles { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.user-titles li { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem .25rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--reveal) 14%, var(--surface)); color: var(--ink); font-size: var(--text-xs); font-weight: 700; }
.user-titles svg { width: .95rem; height: .95rem; color: var(--reveal); }
.user-row .row-actions { justify-content: flex-start; }

/* ---- Spel inrichten: gebruikers kiezen en gasten ---- */
.user-picker { margin-top: .5rem; }
.user-picker > .picker-label, .guest-form > label { display: block; margin: 0 0 .4rem; font-weight: 700; }
.user-picker-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.user-pick { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; }
.user-pick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.user-pick .pick-order { min-width: 1.3rem; height: 1.3rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--primary-ink); color: var(--primary); font-size: var(--text-2xs); font-weight: 800; }
.guest-form { margin-top: 1rem; }
.user-row .row-actions { margin: -.35rem 0 -.5rem; }
.user-edit-form { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .35rem 0 .5rem; }
.user-edit-form label { grid-column: 1 / -1; display: grid; gap: .2rem; font-weight: 700; }
.user-edit-form input { width: 100%; }
.user-edit-form .field-error { grid-column: 1 / -1; }
.user-edit-form button { min-width: 0; }

/* ---- Game settings card (Uitgebreid) ----
   Two short choices side by side, then on/off rules as switches (one tap, state visible
   at a glance), then the optional evening name. */
.setting-toggles { display: grid; margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.setting-toggle { min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0; padding: .6rem .85rem; background: var(--surface); color: var(--ink); font-size: var(--text-base); cursor: pointer; }
.setting-toggle + .setting-toggle { border-top: 1px solid var(--border); }
.setting-toggle > span { min-width: 0; display: grid; gap: .1rem; }
.setting-toggle strong { font-weight: 750; }
.setting-toggle small { color: var(--muted); font-size: var(--text-xs); font-weight: 500; line-height: 1.35; }
/* The checkbox drawn as a switch; still a real checkbox for forms, tests and screen readers. */
.setting-toggle input { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto; width: 2.9rem; min-height: 0; height: 1.7rem; margin: 0; padding: 0; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, var(--surface)); cursor: pointer; transition: background-color var(--dur-fast) ease; }
.setting-toggle input::before { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--card-white); box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform var(--dur-fast) ease; }
.setting-toggle input:checked { background: var(--primary); }
.setting-toggle input:checked::before { transform: translateX(1.2rem); background: var(--toggle-knob-on); }
.label-note { color: var(--muted); font-weight: 500; }
@media (max-width: 340px) {
  }
@media (prefers-reduced-motion: reduce) {
  .setting-toggle input, .setting-toggle input::before { transition: none; }
}

/* Target as a segmented row: 5 / 10 / 15 / Vrij, one tap. */
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: .75rem 0 0; padding: 0; border: 0; background: transparent; }
.segmented legend { grid-column: 1 / -1; margin: 0 0 .3rem; padding: 0; color: var(--muted); font-size: var(--text-md); font-weight: 650; }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented span { min-height: 48px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; }
.segmented input:checked + span { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* One list for the table: users and guests; the header can clear it. */
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.picker-head .picker-label { margin: 0; }
.picker-head .quiet-button { min-height: 44px; padding-inline: .25rem; }
.user-pick.is-guest { border-style: dashed; }
.user-pick.is-guest[aria-pressed="true"] { border-style: dashed; border-color: var(--primary-ink); }

/* "Meer opties": two quiet sub-headings inside one card. */
.options-heading { margin: 1rem 0 0; color: var(--ink); font-size: var(--text-md); font-weight: 800; }
.hitster-options { margin-top: 1.25rem; padding-top: .25rem; border-top: 1px solid var(--border); }

/* ==== Start screen (index.html): the card badge, large and animated ===============
   Same artwork as the badge on the cards: orange ray ring, light disc, the cat. The rays
   light up in a clockwise wave while the ring turns slowly; the cat stays upright and
   nods to the beat. Only transform and opacity animate. Reduced motion: still badge. */
.splash { width: min(100%, var(--page)); min-height: calc(100dvh - 4.5rem); margin: 0 auto; padding: .5rem max(1.25rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: .35rem; text-align: center; }
.splash-badge { --size: min(96vw, 30rem, 56dvh); position: relative; width: var(--size); height: var(--size); margin-bottom: 1rem; animation: splash-in 900ms var(--ease-out, cubic-bezier(.2, .8, .2, 1)) both; }
.splash-glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--reveal) 30%, transparent) 0%, transparent 100%); animation: splash-glow 2s ease-in-out infinite; }
.splash-rays { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.splash-ring { transform-box: view-box; transform-origin: 50% 50%; animation: splash-turn 40s linear infinite; }
.splash-rays .ray { transform-box: view-box; transform-origin: 50% 50%; fill: var(--badge-branch); stroke: var(--badge-branch); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; animation: splash-ray-in 500ms var(--ease-out, cubic-bezier(.2, .8, .2, 1)) calc(250ms + var(--i) * 45ms) both, splash-ray 2.4s ease-in-out calc(1s + var(--i) * 200ms) infinite; }
.splash-rays .ray path { fill: none; }
/* Open commit where a side branch splits off (filled like the disc in every theme). */
.splash-rays .ray .commit { fill: #fff; stroke-width: 2; }
.splash-disc { fill: #fff; stroke: var(--badge-branch); stroke-width: 3.4; }
.splash-cat { position: absolute; inset: 25%; display: grid; place-items: center; animation: splash-nod 1s ease-in-out 900ms infinite; }
.splash-cat .theme-cat { width: 100%; aspect-ratio: 1; }
/* The wink: a closed, smiling eye over the right eye for a moment every few seconds. */
.splash-wink { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: splash-wink 4.5s ease-in-out 1.6s infinite; }
@keyframes splash-wink { 0%, 84%, 100% { opacity: 0; } 86%, 95% { opacity: 1; } }
.splash-title { margin: 0; color: var(--ink); font-size: clamp(2.6rem, 12vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.splash-title .brand-logo { width: auto; height: clamp(2.6rem, 12vw, 3.4rem); max-width: min(80vw, 18rem); margin: 0 auto; }
:root .splash-title .brand-name { font-size: clamp(2.6rem, 12vw, 3.4rem); }
.splash-tagline { margin: 0 0 1.25rem; color: var(--muted); font-size: var(--text-lg); }
.splash-cta { width: min(100%, 22rem); min-height: 3.5rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font-size: var(--text-lg); animation: splash-rise 700ms var(--ease-out, cubic-bezier(.2, .8, .2, 1)) 500ms both; }
.splash-cta svg { width: 1.35rem; height: 1.35rem; }
@keyframes splash-turn { to { transform: rotate(360deg); } }
@keyframes splash-ray-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes splash-ray { 0%, 70%, 100% { transform: scale(1); opacity: 1; } 15% { transform: scale(1.07); opacity: .75; } }
@keyframes splash-nod { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.04) rotate(-3deg); } 50% { transform: scale(1) rotate(0); } 75% { transform: scale(1.04) rotate(3deg); } }
@keyframes splash-glow { 0%, 100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes splash-in { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes splash-rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
:root[data-theme="metal"] .splash-bolts .ray { fill: var(--reveal); stroke: var(--paper); stroke-width: .7; }
:root[data-theme="metal"] .splash-disc { fill: var(--surface); stroke: var(--danger); }
:root[data-theme="metal"] .splash-glow { background: radial-gradient(circle closest-side, color-mix(in srgb, var(--danger) 34%, transparent) 0%, transparent 100%); }
@media (prefers-reduced-motion: reduce) {
  .splash-badge, .splash-glow, .splash-ring, .splash-rays .ray, .splash-cat, .splash-cta, .splash-wink { animation: none; }
}

/* Start screen with a running game: the line above, "Ga verder" as the main action and
   a quiet "Stop spel" under it. */
.splash-running { max-width: 22rem; margin: -.5rem 0 .75rem; padding: .45rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--reveal) 14%, var(--surface)); color: var(--ink); font-size: var(--text-md); font-weight: 650; }
.splash-continue { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-family: var(--display); }
:root[data-theme="metal"] .splash-continue { border-color: var(--bone-hi); background: linear-gradient(180deg, var(--bone), var(--bone-lo)); color: var(--primary-ink); letter-spacing: .03em; text-transform: uppercase; }
.splash-confirm { width: min(100%, 22rem); display: grid; gap: .35rem; margin-top: .5rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; }
.splash-confirm p { margin: 0; }
.splash-confirm-title { color: var(--ink); font-size: var(--text-md); font-weight: 800; }
.splash-confirm-detail { color: var(--muted); font-size: var(--text-sm); }
.splash-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .35rem; }
.splash-confirm-actions button { min-height: 3rem; font-weight: 800; }
.splash-stop { width: min(100%, 22rem); min-height: 3rem; margin-top: .5rem; border-color: var(--border); background: transparent; color: var(--ink); font-weight: 700; }
.splash .field-error { max-width: 22rem; }

/* Old or new official cards: two example links, each with what it means. */
.edition-help { display: grid; gap: .4rem; margin: .5rem 0 .25rem; line-height: 1.4; }
.edition-example { display: grid; gap: .1rem; padding: .45rem .6rem; border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.edition-example code { font-size: var(--text-sm); font-weight: 700; overflow-wrap: anywhere; }

/* ==== Neon theme: synthwave night, pink and cyan light on deep purple ===============
   Glow comes from text-shadow / box-shadow / drop-shadow on static elements; only the
   existing transform/opacity animations move, so it costs no extra battery. */
@font-face { font-family: "Orbitron"; src: url("/fonts/orbitron-700.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("/fonts/orbitron-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
:root[data-theme="neon"] {
  color-scheme: dark;
  --neon-pink: #ff3fa4;
  --neon-cyan: #29e7ff;
  --neon-violet: #b44bff;
  --glow-ink: #ffffff; /* white text that glows */
  --toggle-knob-on: #ffffff;
  --on-accent: #ffffff;
  --paper: #0e0620;
  --surface: #1a0d35;
  --surface-strong: #221245;
  --ink: #f7ecff;
  --muted: #bca8e0;
  --border: #45297a;
  --primary: #ff3fa4;
  --primary-ink: #1b0030;
  --reveal: #29e7ff;
  --success: #bca8e0;
  --warning: #ffb347;
  --danger: #ff4f7b;
  --danger-ink: #ff9ab6;
  --focus: #29e7ff;
  --ok-soft: #0d2a2e;
  --ok-border: #1f6f73;
  --ok-ink: #7ff5e3;
  --warn-soft: #2e0f24;
  --warn-border: #7a2356;
  --info-soft: #1f1040;
  --info-border: #4a3285;
  --shadow: 0 0 0 1px rgb(255 63 164 / .18), 0 14px 34px rgb(0 0 0 / .55);
  --display: "Orbitron", "Avenir Next", system-ui, sans-serif;
}
/* Night sky fading to a purple horizon, with the classic perspective grid below. */
:root[data-theme="neon"] body {
  background-color: var(--paper);
  background-image: linear-gradient(180deg, var(--paper) 0%, #150833 55%, #2c0c4a 100%);
  background-attachment: fixed;
}
:root[data-theme="neon"] body::before {
  content: ""; position: fixed; z-index: -1; left: -50%; right: -50%; bottom: 0; height: 34vh; pointer-events: none;
  background:
    linear-gradient(180deg, #2c0c4a 0%, transparent 30%),
    repeating-linear-gradient(90deg, rgb(255 63 164 / .45) 0 1.5px, transparent 1.5px 60px),
    repeating-linear-gradient(0deg, rgb(255 63 164 / .45) 0 1.5px, transparent 1.5px 34px);
  transform: perspective(260px) rotateX(58deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%);
}
:root[data-theme="neon"] .game-header { background: rgb(14 6 32 / .9); box-shadow: 0 1px 0 rgb(255 63 164 / .45), 0 6px 22px rgb(255 63 164 / .12); }
:root[data-theme="neon"] .brand-name { font-size: var(--text-xl); font-weight: 900; letter-spacing: .06em; line-height: 1; text-transform: uppercase; color: var(--glow-ink); text-shadow: 0 0 3px var(--neon-pink), 0 0 10px var(--neon-pink), 0 0 22px rgb(255 63 164 / .6); }
:root[data-theme="neon"] .brand-badge .theme-cat { filter: drop-shadow(0 0 5px rgb(41 231 255 / .55)); }
:root[data-theme="neon"] h1 { font-weight: 900; letter-spacing: .02em; color: var(--glow-ink); text-shadow: 0 0 4px var(--neon-pink), 0 0 16px rgb(255 63 164 / .7); }
:root[data-theme="neon"] .card-title, :root[data-theme="neon"] .play-style-selector legend { text-transform: uppercase; letter-spacing: .08em; font-size: var(--text-sm); color: var(--neon-cyan); text-shadow: 0 0 8px rgb(41 231 255 / .45); }
:root[data-theme="neon"] .card, :root[data-theme="neon"] .stat-card { border-color: rgb(255 63 164 / .35); background: rgb(26 13 53 / .86); box-shadow: 0 0 0 1px rgb(41 231 255 / .06), 0 0 26px rgb(255 63 164 / .1), 0 12px 28px rgb(0 0 0 / .45); }
:root[data-theme="neon"] button, :root[data-theme="neon"] .btn { border-color: rgb(41 231 255 / .35); }
/* Top-bar controls keep the menu button's frame, also the speaker button. */
:root[data-theme="neon"] .sound-toggle:not(:hover) { border-color: var(--border); }
:root[data-theme="neon"] button.primary, :root[data-theme="neon"] .btn.primary, :root[data-theme="neon"] button.reveal-action, :root[data-theme="neon"] .splash-continue {
  border-color: transparent; background: linear-gradient(90deg, var(--neon-pink), var(--neon-violet)); color: var(--glow-ink);
  letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 0 6px rgb(255 255 255 / .5);
  box-shadow: 0 0 16px rgb(255 63 164 / .55), inset 0 1px 0 rgb(255 255 255 / .35);
}
:root[data-theme="neon"] button:disabled.primary, :root[data-theme="neon"] button.primary:disabled { opacity: .45; box-shadow: none; }
:root[data-theme="neon"] .play-style-option input:checked + span, :root[data-theme="neon"] .user-pick[aria-pressed="true"], :root[data-theme="neon"] .segmented input:checked + span { border-color: var(--neon-pink); background: rgb(255 63 164 / .18); color: var(--glow-ink); box-shadow: 0 0 12px rgb(255 63 164 / .45), inset 0 0 0 1px var(--neon-pink); }
:root[data-theme="neon"] .user-pick .pick-order { background: var(--neon-pink); color: var(--glow-ink); }
:root[data-theme="neon"] .setting-toggle input:checked { background: var(--neon-pink); box-shadow: 0 0 10px rgb(255 63 164 / .6); }
:root[data-theme="neon"] .status-badge-warn, :root[data-theme="neon"] .quiet-danger, :root[data-theme="neon"] .danger-button { color: var(--danger-ink); }
:root[data-theme="neon"] dialog::backdrop { background: rgb(8 2 20 / .75); }
:root[data-theme="neon"] :focus-visible { outline-color: var(--neon-cyan); }
/* The record: purple vinyl with a pink rim, cyan rays and label ring. */
:root[data-theme="neon"] .record { border-color: #0a0418; background: repeating-radial-gradient(circle at center, #150a2e 0 3px, #24114d 4px 6px, #190b38 7px 9px); box-shadow: 0 0 0 2px rgb(255 63 164 / .55), 0 0 34px rgb(255 63 164 / .35), 0 18px 40px rgb(0 0 0 / .6); }
:root[data-theme="neon"] .record-label { border-color: var(--neon-cyan); background: var(--surface); box-shadow: 0 0 12px rgb(41 231 255 / .5); }
:root[data-theme="neon"] .music-note { color: var(--neon-pink); filter: drop-shadow(0 0 5px var(--neon-pink)); }
:root[data-theme="neon"] .eq i { background: linear-gradient(to top, var(--neon-pink), var(--neon-cyan)); box-shadow: 0 0 8px rgb(41 231 255 / .45); }
:root[data-theme="neon"] .tonearm-rod { stroke: #d6c6ff; }
:root[data-theme="neon"] .tonearm-head { fill: var(--neon-cyan); stroke: #0a0418; }
:root[data-theme="neon"] .tonearm-weight { fill: #6b54a8; }
:root[data-theme="neon"] .tonearm-base { fill: var(--neon-pink); stroke: var(--glow-ink); }
:root[data-theme="neon"] .answer-year { font-weight: 900; color: var(--glow-ink); text-shadow: 0 0 4px var(--neon-cyan), 0 0 16px rgb(41 231 255 / .7); }
:root[data-theme="neon"] .answer-year.is-card-year { font-family: inherit; font-weight: 600; text-shadow: none; }
:root[data-theme="neon"] .playfield[data-phase="revealed"] .album-art { outline-color: rgb(255 63 164 / .4); box-shadow: 0 0 30px rgb(255 63 164 / .35), 0 14px 32px -10px rgb(0 0 0 / .8); }
:root[data-theme="neon"] .playfield { --timer-alert: var(--danger); }
:root[data-theme="neon"] .rule-art { --rule-accent: var(--neon-pink); color: var(--ink); }
:root[data-theme="neon"] .spark-2 { background: var(--neon-cyan); }
/* Start screen: cyan rays with glow, dark disc with a pink ring; a glint on the glasses. */
:root[data-theme="neon"] .splash-rays .ray { fill: var(--neon-cyan); stroke: var(--neon-cyan); }
:root[data-theme="neon"] .splash-rays { filter: drop-shadow(0 0 5px rgb(41 231 255 / .8)); }
:root[data-theme="neon"] .splash-disc { fill: var(--surface); stroke: var(--neon-pink); }
:root[data-theme="neon"] .splash-rays .ray .commit { fill: var(--surface); }
:root[data-theme="neon"] .splash-glow { background: radial-gradient(circle closest-side, rgb(255 63 164 / .45) 0%, rgb(180 75 255 / .2) 55%, transparent 100%); }
:root[data-theme="neon"] .splash-cat .theme-cat { filter: drop-shadow(0 0 6px rgb(255 63 164 / .5)); }
:root[data-theme="neon"] .splash-title { font-weight: 900; color: var(--glow-ink); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 0 4px var(--neon-pink), 0 0 18px rgb(255 63 164 / .75), 0 0 40px rgb(180 75 255 / .5); }
:root[data-theme="neon"] .splash-running { background: rgb(41 231 255 / .12); color: var(--glow-ink); box-shadow: inset 0 0 0 1px rgb(41 231 255 / .4); }
:root[data-theme="neon"] .splash-wink { animation: none; opacity: 1; }
.splash-glint-band { transform-box: view-box; animation: splash-glint 4.5s ease-in-out 1.6s infinite; }
@keyframes splash-glint { 0%, 70% { translate: 0 0; } 90%, 100% { translate: 300px 0; } }
.theme-swatch-neon { background: url("/gitster-cat-neon.png") center / auto 34% no-repeat, radial-gradient(circle closest-side, #1a0d35 0 36%, #ff3fa4 37% 41%, #24114d 42% 90%, transparent 91%), linear-gradient(180deg, #0e0620, #2c0c4a); box-shadow: inset 0 0 0 1px rgb(255 63 164 / .5); }
.theme-name-neon { font-family: "Orbitron", system-ui, sans-serif; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #ff3fa4; text-shadow: 0 0 6px rgb(255 63 164 / .6); }
@media (prefers-reduced-motion: reduce) { .splash-glint-band { animation: none; } }

/* ==== Kerst: pine green with red and gold, and quiet (static) snow ==== */
@font-face { font-family: "Mountains of Christmas"; src: url("/fonts/mountains-of-christmas-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root[data-theme="kerst"] {
  color-scheme: dark;
  --cat-art: url("/gitster-cat-kerst.png"); --cat-bare: url("/gitster-cat-bare-kerst.png"); --wink-face: #fff4e6; --wink-line: #6b3a2a;
  --paper: #0f2a1e; --surface: #173a2a; --surface-strong: #1d4533;
  --ink: #fff7ec; --muted: #c9d8cc; --border: #2f5d47;
  /* Main button: snow cream with pine text. Red is only for Fout and decoration (holly,
     candy-cane edge), never for "go on". */
  --primary: #fff4e6; --primary-ink: #0f2a1e; --reveal: #f4c542;
  --snow: #fffaf2; --snow-shade: #efe1c9; --holly: #d62e3a; --holly-light: #e0404b; --holly-dark: #b81f2b;
  --glow-ink: #ffffff; --on-accent: #ffffff; --on-reveal: #0f2a1e;
  --success: #c9d8cc; --warning: #f4c542; --danger: #ff6b6b; --danger-ink: #ffb3b3; --focus: #f4c542;
  --ok-soft: #173d2b; --ok-border: #2f7a52; --ok-ink: #a8e6bf;
  --warn-soft: #3a1a1a; --warn-border: #7a2e2e; --info-soft: #1d4533; --info-border: #36684f;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 14px 34px rgb(0 0 0 / .45);
  --display: "Mountains of Christmas", "Avenir Next", system-ui, sans-serif;
}
:root[data-theme="kerst"] body { background-color: var(--paper); background-image: radial-gradient(circle, rgb(255 255 255 / .55) 1.2px, transparent 1.8px), radial-gradient(circle, rgb(255 255 255 / .3) 1px, transparent 1.5px), linear-gradient(180deg, var(--paper), #12321f); background-size: 90px 90px, 53px 53px, auto; background-position: 0 0, 25px 31px, 0 0; background-attachment: fixed; }
:root[data-theme="kerst"] h1, :root[data-theme="kerst"] .splash-title { font-weight: 700; color: var(--glow-ink); text-shadow: 0 2px 0 var(--holly), 0 0 14px rgb(244 197 66 / .35); }
:root[data-theme="kerst"] .card-title, :root[data-theme="kerst"] .play-style-selector legend { color: var(--reveal); font-size: var(--text-xl); }
:root[data-theme="kerst"] .brand-name { font-size: var(--text-2xl); font-weight: 700; color: var(--glow-ink); text-shadow: 0 2px 0 var(--holly), 0 0 10px rgb(244 197 66 / .45); }
:root[data-theme="kerst"] .game-header { background: rgb(15 42 30 / .94); box-shadow: 0 1px 0 rgb(244 197 66 / .35); }
:root[data-theme="kerst"] .card, :root[data-theme="kerst"] .stat-card { border-color: rgb(244 197 66 / .3); }
:root[data-theme="kerst"] button.primary, :root[data-theme="kerst"] .btn.primary, :root[data-theme="kerst"] button.reveal-action, :root[data-theme="kerst"] .splash-continue { border-color: var(--reveal); background: linear-gradient(180deg, var(--snow), var(--snow-shade)); color: var(--primary-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 4px 14px rgb(244 197 66 / .3); }
:root[data-theme="kerst"] .play-style-option input:checked + span, :root[data-theme="kerst"] .user-pick[aria-pressed="true"], :root[data-theme="kerst"] .segmented input:checked + span { border-color: var(--reveal); background: var(--primary); color: var(--primary-ink); }
:root[data-theme="kerst"] .user-pick .pick-order { background: var(--reveal); color: var(--on-reveal); }
:root[data-theme="kerst"] dialog::backdrop { background: rgb(5 18 12 / .75); }
/* Deep red Christmas vinyl, so the record stands out against the pine-green page. */
:root[data-theme="kerst"] .record { border-color: #2e060b; background: repeating-radial-gradient(circle at center, #4a0d14 0 3px, #6e1520 4px 6px, #560f18 7px 9px); box-shadow: 0 5px 0 #2e060b, 0 18px 40px rgb(0 0 0 / .5); }
:root[data-theme="kerst"] .record-label { border-color: var(--reveal); background: var(--wink-face); }
:root[data-theme="kerst"] .eq i { background: linear-gradient(to top, var(--holly), var(--reveal)); }
:root[data-theme="kerst"] .splash-rays .ray { fill: var(--reveal); stroke: var(--reveal); }
:root[data-theme="kerst"] .splash-disc { fill: var(--wink-face); stroke: var(--holly); }
:root[data-theme="kerst"] .splash-rays .ray .commit { fill: var(--wink-face); }
:root[data-theme="kerst"] .splash-glow { background: radial-gradient(circle closest-side, rgb(244 197 66 / .4) 0%, transparent 100%); }
:root[data-theme="kerst"] .answer-year { font-weight: 700; }
:root[data-theme="kerst"] .answer-year.is-card-year { font-family: inherit; }
:root[data-theme="kerst"] .rule-art { --rule-accent: var(--reveal); color: var(--ink); }

/* Admin swatches for the new themes */
.theme-swatch-kerst { background: url("/gitster-cat-kerst.png") center / auto 34% no-repeat, radial-gradient(circle closest-side, #fff4e6 0 36%, #f4c542 37% 42%, #11271b 43% 90%, transparent 91%), #0f2a1e; }
.theme-name-kerst { font-family: "Mountains of Christmas", system-ui, sans-serif; font-weight: 700; font-size: var(--text-lg); color: #d62e3a; }

/* ---- Special cards (set builder): Skip, Omdraaien, +2, Rad ----
   --fx-*: the colours of the printed cards, also used by the rules drawings. */
/*
   Colour matches the printed frame; the text always names the effect, so colour is
   never the only signal. */
.effect-chip, .effect-note[data-effect] { --effect: var(--muted); --effect-ink: var(--surface); }
[data-effect="skip"] { --effect: var(--fx-skip); --effect-ink: var(--fx-skip-ink); }
[data-effect="reverse"] { --effect: var(--fx-reverse); --effect-ink: var(--fx-reverse-ink); }
[data-effect="plus2"] { --effect: var(--fx-plus2); --effect-ink: var(--fx-plus2-ink); }
[data-effect="wheel"] { --effect: var(--fx-wheel); --effect-ink: var(--fx-wheel-ink); }
.effect-chip { display: inline-block; align-self: center; margin: 0 auto .35rem; padding: .2rem .7rem; border-radius: 999px; background: var(--effect); color: var(--effect-ink); font-size: var(--text-xs); font-weight: 800; letter-spacing: .02em; }
.effect-chip[hidden] { display: none; }
.turn-detail { margin: -.25rem 0 .35rem; color: var(--muted); font-size: var(--text-sm); font-weight: 700; text-align: center; }
.wheel-dialog { text-align: center; }
.wheel-dialog h2 { margin: 0 0 .25rem; }
.wheel-spinner { margin: 0 0 .5rem; color: var(--muted); font-weight: 700; }
.wheel-stage { position: relative; width: min(72vw, 17rem); aspect-ratio: 1; margin: .5rem auto .75rem; transition: width var(--dur-base) ease; }
/* Choosing a player: the wheel shrinks so every player fits without scrolling. */
.wheel-dialog.is-choosing .wheel-stage { width: min(40vw, 9.5rem); margin-bottom: .25rem; }
.wheel-stage[hidden] { display: none; }
.wheel-svg { display: block; width: 100%; height: 100%; }
.wheel-label text { fill: var(--card-ink); font-size: 10.5px; font-weight: 800; font-family: inherit; }
.wheel-pointer { position: absolute; z-index: 1; top: -.35rem; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: .7rem solid transparent; border-right: .7rem solid transparent; border-top: 1.2rem solid var(--reveal); filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25)); }
.wheel-result:empty { display: none; }
.wheel-result { margin: .25rem 0 .5rem; font-size: var(--text-lg); font-weight: 800; color: var(--ink); }
.wheel-targets { display: grid; gap: .5rem; margin-bottom: .75rem; }
.wheel-targets p { margin: 0; font-weight: 700; }
.wheel-targets #wheel-target-list { display: grid; gap: .5rem; }
.wheel-targets button, .wheel-dialog > button { min-height: 48px; }
.wheel-dialog > button + button { margin-top: .5rem; }

/* Admin: set builder */
.effect-builder { display: grid; gap: .6rem; }
.effect-builder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.effect-builder-grid label { display: grid; gap: .25rem; padding: .5rem .6rem; border: 1px solid var(--border); border-left: 5px solid var(--effect); border-radius: var(--radius-sm); font-weight: 700; }
.effect-builder-grid input { width: 100%; font-size: 16px; }
.effect-builder-grid small { color: var(--muted); font-weight: 500; }
.status-badge.effect-badge { background: var(--effect); border-color: var(--effect); color: var(--effect-ink); }

/* ---- One-screen game (spelen.html, body.in-game) ----
   The running game never scrolls: header, turn row, status, stage, round panel and dock
   form a fixed column the height of the screen. Only the stage (record, camera or cover)
   is flexible: it is a size container and the playfield takes whatever height is left.
   Checked by e2e/one-screen.spec.ts from 375×667 to 430×932 in every theme. */
html:has(body.in-game) { height: 100dvh; overflow: hidden; }
/* iOS Safari can still move an overflow-hidden body after a pinch or toolbar resize.
   Fix the game surface to the viewport; dialogs remain independently scrollable. */
body.in-game { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
/* Keep gestures on the game surface app-like; top-layer dialogs may still scroll. */
body.in-game > :is(.game-header, .game-shell, .primary-dock) { touch-action: none; }
body.in-game .game-shell, body.in-game .game-shell:has(> .game-panel) { min-height: 0; height: 100%; display: flex; flex-direction: column; padding: .6rem max(1rem, env(safe-area-inset-right)) .5rem max(1rem, env(safe-area-inset-left)); }
body.in-game .game-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: .5rem; }
body.in-game .game-panel > * { flex: none; margin: 0; }
body.in-game .game-status { min-height: 0; margin: 0; font-size: var(--text-md); line-height: 1.3; }
body.in-game .round-rules { margin: 0; gap: .3rem; }
body.in-game .round-rules li { font-size: var(--text-2xs); }
body.in-game .game-status:empty { display: none; }

/* Turn row: who plays and who is next on the left, cards and chips in one pill. */
body.in-game .score-strip { position: relative; z-index: var(--z-strip); margin: 0; border-left: 3px solid var(--reveal); background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
body.in-game .score-strip .turn-row { min-height: 3rem; padding: .4rem .5rem .4rem .85rem; list-style: none; }
.turn-who { min-width: 0; display: grid; gap: .15rem; line-height: 1.2; }
.turn-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#current-player { font-family: var(--display); font-size: var(--text-md); font-weight: 800; letter-spacing: -.02em; }
body.in-game .turn-detail { margin: 0; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-align: left; }

/* Stage: the record (or camera) is as large as the leftover height allows. */
.game-stage { display: contents; }
body.in-game .game-stage { flex: 1 1 0; min-height: 0; container: stage / size; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; }
body.in-game .playfield { --below: 3.4rem; width: min(21rem, calc(100cqw - 2rem), calc(100cqh - var(--below))); margin: 0 0 calc(var(--below) - .1rem); }
body.in-game .playfield[data-phase="ready"] { --below: 3.3rem; margin-bottom: 0; }

/* Revealed: the answer beside the cover, left-aligned and vertically centred. */
body.in-game .game-panel[data-phase="revealed"] .game-stage { flex-direction: row; gap: clamp(.75rem, 4cqw, 1.25rem); }
body.in-game .playfield[data-phase="revealed"] { flex: none; width: min(15rem, 46cqw, calc(100cqh - .5rem)); margin: 0; }
body.in-game .answer { flex: 0 1 auto; min-width: 0; max-width: 15rem; max-height: 100cqh; margin: 0; display: grid; gap: .15rem; justify-items: start; overflow: hidden; text-align: left; }
body.in-game .answer .effect-chip { margin: 0 0 .3rem; }
body.in-game .answer-year { justify-content: flex-start; margin: 0 0 .15rem; font-size: clamp(2.3rem, 12cqw, 3.4rem); }
body.in-game .answer-year.is-card-year { margin-bottom: .3rem; font-size: var(--text-md); }
body.in-game .answer-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: clamp(1rem, 5cqw, 1.2rem); line-height: 1.25; text-wrap: balance; }
body.in-game .answer-artist { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: var(--text-md); line-height: 1.3; }

/* A tall phone can show the revealed card and answer at a larger, calmer scale. */
@media (min-height: 800px) and (min-width: 360px) {
  body.in-game .game-panel[data-phase="revealed"] .game-stage { flex-direction: column; gap: .75rem; }
  body.in-game .playfield[data-phase="revealed"] { width: min(13.5rem, 58cqw, calc(100cqh - 11rem)); }
  body.in-game .answer { flex: none; width: min(100%, 24rem); max-width: 24rem; justify-items: center; text-align: center; }
  body.in-game .answer-year { justify-content: center; font-size: clamp(3rem, 15cqw, 4rem); }
  body.in-game .answer-title { font-size: clamp(1.2rem, 5.5cqw, 1.55rem); }
}

/* Low stage (small phone, big round panel): a tighter answer. */
@container stage (max-height: 12rem) {
  .answer-year { font-size: 2.1rem; }
  .answer-title { -webkit-line-clamp: 2; font-size: var(--text-base); }
  .answer-artist { -webkit-line-clamp: 1; font-size: var(--text-sm); }
  .answer .effect-chip { font-size: var(--text-2xs); }
}
/* Dock in the flow (no longer fixed over the content). */
body.in-game .primary-dock { position: static; }

/* ---- Admin flow (admin.html): tabs Decks/Instellingen, one deck per screen ----
   Decks come first; each deck walks four fixed steps with one button at the bottom. */
.admin-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; padding: .25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.admin-tabs a { min-height: 44px; display: grid; place-items: center; border-radius: calc(var(--radius) - .25rem); color: var(--muted); font-weight: 700; text-decoration: none; }
.admin-tabs a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.new-deck { display: flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; }
.new-deck svg { width: 1.2rem; height: 1.2rem; }
.deck-list-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.deck-list-head .helper { margin: 0; }
#view-decks .deck-list { gap: .75rem; margin: 0; }
#view-decks .deck-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 1px 2px rgb(22 47 74 / .06); overflow: hidden; }
#view-decks .deck-row:first-child { padding-top: 0; }
.deck-open { min-width: 0; display: grid; gap: .5rem; padding: 1rem 1rem .75rem; color: var(--ink); text-decoration: none; }
.deck-open:hover { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.deck-open strong { font-size: var(--text-lg); overflow-wrap: anywhere; }
.deck-open .deck-meta { margin-top: -.4rem; }
.deck-progress, .deck-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin: 0; padding: 0; list-style: none; }
.deck-progress li { display: grid; gap: .3rem; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; }
.deck-progress li::before, .deck-steps a::before { content: ""; height: 5px; border-radius: 3px; background: var(--border); }
.deck-progress li.is-done::before, .deck-steps a.is-done::before { background: var(--ok-ink); }
.deck-progress li.is-now { color: var(--ink); }
.deck-progress li.is-now::before, .deck-steps a[aria-current="step"]::before { background: var(--reveal); }
.deck-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.deck-chips .status-badge { min-height: 1.6rem; padding: .15rem .6rem; font-size: var(--text-xs); }
#view-decks .deck-row .deck-actions { margin: 0; padding: 0 .5rem .35rem; justify-content: flex-end; }
#view-decks .deck-actions > button:first-child { flex: 0 0 auto; }
#view-decks .deck-actions:has(.delete-question) { padding: .5rem 1rem .75rem; }

/* Deck screen */
.deck-screen { display: grid; gap: .9rem; }
.back-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; gap: .25rem; margin: -.5rem 0 -.5rem -.35rem; padding-inline: .35rem; color: var(--muted); font-weight: 700; text-decoration: none; }
.back-link svg { width: 1.2rem; height: 1.2rem; }
.deck-screen-head { display: grid; gap: .15rem; }
.deck-screen-head h2 { margin: 0; font-size: var(--text-2xl); text-wrap: balance; overflow-wrap: anywhere; }
.deck-screen-head .helper { margin: 0; }
.deck-steps a { min-height: 44px; display: grid; align-content: start; gap: .35rem; padding-top: .2rem; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-decoration: none; }
.deck-steps a[aria-current="step"] { color: var(--ink); }
.deck-steps a[aria-disabled] { opacity: .45; cursor: default; }
.deck-step { display: grid; gap: .75rem; }
.deck-step[hidden] { display: none; }
.deck-step > .card > .card-title { margin: 0 0 .25rem; }
.import-state-text { margin: 0; font-weight: 600; }
/* The one button of a step stays at the bottom of the screen. */
.step-dock { position: sticky; z-index: 5; bottom: 0; display: grid; gap: .35rem; margin: 0 -1rem; padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 72%, color-mix(in srgb, var(--paper) 0%, transparent)); }
.step-dock[hidden], .step-dock > [hidden] { display: none; }
.dock-short { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .35rem .35rem .85rem; border: 1px solid var(--warn-border); border-radius: var(--radius); background: var(--warn-soft); }
.dock-short p { margin: 0; font-size: var(--text-sm); font-weight: 700; }
.dock-short button { flex: none; min-height: 44px; padding: .35rem .9rem; }
.fill-done { margin: 0; padding: .6rem .85rem; border-radius: var(--radius); background: var(--paper); font-size: var(--text-sm); font-weight: 700; }
.fill-done[hidden] { display: none; }
/* Server-made notice pages (Spotify linking stopped, a card opened outside the game). */
.notice-page { display: grid; align-content: center; min-height: 100dvh; padding-block: 1.5rem; }
.notice-page p { margin: 0; }
#create-form .step-dock { margin: 1rem -1.25rem -1.25rem; padding-inline: 1.25rem; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: var(--surface); }
/* Step 2: filter, decade bars, reports */
.track-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.track-filter button { min-height: 40px; padding: .35rem .8rem; border-radius: 999px; font-size: var(--text-sm); font-weight: 700; }
.track-filter button[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--primary); }
.deck-screen .spread { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .3rem; align-items: end; height: 4.25rem; margin: 0; }
.deck-screen .spread > span { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .2rem; padding: 0; border-radius: 0; background: none; }
.deck-screen .spread i { align-self: end; height: calc(max(var(--share, 0), .08) * 100%); border-radius: 3px; background: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.deck-screen .spread small { color: var(--muted); font-size: var(--text-2xs); font-weight: 700; text-align: center; }
.card-reports { display: grid; gap: .5rem; }
.card-reports:empty { display: none; }
.card-report { display: grid; gap: .35rem; padding: .75rem .9rem; border: 1px solid var(--warn-border); border-radius: var(--radius); background: var(--warn-soft); }
.card-report p { margin: 0; }
.card-report .quiet-button { justify-self: start; }
.track-report { color: var(--danger-ink) !important; font-weight: 700; }
.track-footnote { margin: 0; text-align: center; }
.track-footnote:empty { display: none; }

/* Step 4 */
.print-steps { display: grid; gap: .3rem; margin: 0; padding-left: 1.1rem; color: var(--ink); font-size: var(--text-md); }
.print-options { display: grid; gap: .35rem; }
.print-options label { font-weight: 700; }
.print-options select { width: 100%; min-height: 44px; }
.test-mode-launch { width: 48px; min-height: 48px; flex: none; margin-left: auto; margin-right: -.5rem; padding: .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); box-shadow: none; }
.test-mode-launch svg { width: 1.35rem; height: 1.35rem; }
.test-mode-launch:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.sound-toggle ~ .test-mode-launch, .test-mode-launch:not([hidden]) ~ .header-info { margin-left: 0; }
.game-header > :is(.sound-toggle, .test-mode-launch) { margin-right: 0; }
dialog > .test-mode-launch { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 4.25rem); right: max(.5rem, env(safe-area-inset-right, 0px)); z-index: var(--z-effects); margin: 0; }
@media (max-width: 359px) { .test-mode-launch { width: 44px; min-height: 44px; margin-right: 0; padding: .55rem; } }
.test-mode-launch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.test-mode-dialog { width: min(92vw, 32rem); max-height: 90dvh; overflow-y: auto; }
.deck-step .print-actions { margin: 0; }
.deck-step #deck-test-form { display: grid; gap: .5rem; }
.deck-step #deck-test-form .card-title, .deck-step #deck-test-form .field-hint { margin: 0; }
body.is-deck-screen .page-intro { display: none; }
.track-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.track-filter button { flex: 0 0 auto; min-height: 40px; padding: .3rem .7rem; font-size: var(--text-xs); }
.import-state-text { font-weight: 500; }
.deck-steps a { font-size: var(--text-2xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-filter button { padding-inline: .55rem; font-size: var(--text-xs); }
/* Admin: four tabs; decade bars with counts that filter; approve buttons */
.admin-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-tabs a { font-size: var(--text-md); }
.deck-screen .spread { height: 5.5rem; }
.spread-bar { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .15rem; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; box-shadow: none; color: var(--muted); }
.spread-bar b { font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.spread-bar i { align-self: end; height: calc(max(var(--share, 0), .08) * 100%); border-radius: 3px; background: color-mix(in srgb, var(--primary) 30%, var(--surface)); transition: background var(--dur-fast) ease; }
.spread-bar small { font-size: var(--text-2xs); font-weight: 700; }
.spread-bar:hover i { background: color-mix(in srgb, var(--primary) 55%, var(--surface)); }
.spread-bar[aria-pressed="true"] { color: var(--ink); }
.spread-bar[aria-pressed="true"] i { background: var(--reveal); }
.track-approve { justify-self: start; min-height: 36px; display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; padding: .25rem .7rem; border-color: var(--ok-border); border-radius: 999px; background: var(--ok-soft); color: var(--ok-ink); font-size: var(--text-sm); font-weight: 700; }
.track-approve svg { width: 1rem; height: 1rem; }
.track-approve[hidden] { display: none; }
#approve-all { border-color: var(--ok-border); color: var(--ok-ink); }
#selection-card > label { margin-top: .5rem; }
#selection-card > .wide { margin-top: .75rem; }

/* ---- Kerst, more Christmas: falling snow, a string of lights, snow on the cards, holly
   and a candy-cane main button. The badge is a reindeer (gitster-cat-kerst.png), built on
   the cat so shape and position match the other themes. Motion stops for reduced motion. */
:root[data-theme="kerst"] body { background-image: linear-gradient(180deg, var(--paper), #12321f); }
:root[data-theme="kerst"] body::before, :root[data-theme="kerst"] body::after { content: ""; position: fixed; z-index: -1; left: 0; right: 0; top: -120px; bottom: 0; pointer-events: none; will-change: transform; }
:root[data-theme="kerst"] body::before { background: radial-gradient(circle, rgb(255 255 255 / .85) 0 2.2px, transparent 2.8px) 0 0 / 120px 120px, radial-gradient(circle, rgb(255 255 255 / .6) 0 1.6px, transparent 2.2px) 44px 70px / 120px 120px; animation: kerst-snow-big 14s linear infinite; }
:root[data-theme="kerst"] body::after { background: radial-gradient(circle, rgb(255 255 255 / .45) 0 1.1px, transparent 1.6px) 12px 20px / 60px 60px; animation: kerst-snow-small 9s linear infinite; }
@keyframes kerst-snow-big { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(12px, 120px, 0); } }
@keyframes kerst-snow-small { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-6px, 60px, 0); } }
:root[data-theme="kerst"] .game-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 24px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22120%22 height=%2224%22 viewBox=%220 0 120 24%22%3E%3Cpath d=%22M0 3 Q 30 14 60 3 T 120 3%22 fill=%22none%22 stroke=%22%2338463f%22 stroke-width=%222%22/%3E%3Cg%3E%3Crect x=%2212.5%22 y=%226.5%22 width=%225%22 height=%224%22 rx=%221%22 fill=%22%2338463f%22/%3E%3Cellipse cx=%2215%22 cy=%2215%22 rx=%225%22 ry=%227%22 fill=%22%23ff4d5a%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%2242.5%22 y=%2210%22 width=%225%22 height=%224%22 rx=%221%22 fill=%22%2338463f%22/%3E%3Cellipse cx=%2245%22 cy=%2218%22 rx=%225%22 ry=%226.5%22 fill=%22%23f4c542%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%2272.5%22 y=%226.5%22 width=%225%22 height=%224%22 rx=%221%22 fill=%22%2338463f%22/%3E%3Cellipse cx=%2275%22 cy=%2215%22 rx=%225%22 ry=%227%22 fill=%22%234fd18b%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%22102.5%22 y=%2210%22 width=%225%22 height=%224%22 rx=%221%22 fill=%22%2338463f%22/%3E%3Cellipse cx=%22105%22 cy=%2218%22 rx=%225%22 ry=%226.5%22 fill=%22%23ffffff%22/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 24px repeat-x; filter: drop-shadow(0 0 4px rgb(255 214 102 / .55)); animation: kerst-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes kerst-twinkle { from { opacity: .8; } to { opacity: 1; } }
:root[data-theme="kerst"] :is(.card, .score-strip) { position: relative; }
:root[data-theme="kerst"] :is(.card, .score-strip)::before { content: ""; position: absolute; z-index: 1; left: -1px; right: -1px; top: -7px; height: 16px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22160%22 height=%2218%22 viewBox=%220 0 160 18%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M0 10 Q 0 2 10 2 L 150 2 Q 160 2 160 10 L 160 11 Q 150 11 146 15 Q 140 18 134 13 Q 124 9 112 12 Q 104 17 96 12 Q 84 7 70 12 Q 60 18 50 12 Q 40 8 28 13 Q 18 18 12 12 Q 6 9 0 11 Z%22 fill=%22%23f4f7fb%22/%3E%3Cpath d=%22M4 4 Q 10 2 20 2 L 140 2%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-width=%222%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 2px 1px rgb(0 0 0 / .25)); }
:root[data-theme="kerst"] dialog.card::before { display: none; }
:root[data-theme="kerst"] :is(.page-intro h1, .splash-title)::after { content: ""; display: inline-block; width: 1.1em; height: .85em; margin-left: .3em; vertical-align: .05em; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 44 34%22%3E%3Cpath d=%22M20 20 C 10 22 4 14 2 8 C 8 10 12 6 14 2 C 16 10 22 12 20 20Z%22 fill=%22%232f8f57%22/%3E%3Cpath d=%22M22 20 C 32 22 40 16 42 10 C 36 12 32 7 30 3 C 28 11 21 13 22 20Z%22 fill=%22%23247a49%22/%3E%3Ccircle cx=%2219%22 cy=%2223%22 r=%224%22 fill=%22%23d62e3a%22/%3E%3Ccircle cx=%2226%22 cy=%2224%22 r=%224%22 fill=%22%23e0404b%22/%3E%3Ccircle cx=%2222%22 cy=%2229%22 r=%224%22 fill=%22%23b81f2b%22/%3E%3C/svg%3E") center / contain no-repeat; }
:root[data-theme="kerst"] :is(button.primary, .btn.primary, button.reveal-action, .splash-continue):not(:disabled) { background: repeating-linear-gradient(-45deg, var(--snow) 0 7px, var(--holly) 7px 14px) top / 100% 6px no-repeat, linear-gradient(180deg, var(--snow), var(--snow-shade)); }
:root[data-theme="kerst"] .primary-dock { position: relative; }
:root[data-theme="kerst"] .primary-dock::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22200%22 height=%2216%22 viewBox=%220 0 200 16%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M0 16 L 0 9 Q 25 1 50 7 Q 75 13 100 6 Q 125 0 150 7 Q 175 13 200 6 L 200 16 Z%22 fill=%22%23f4f7fb%22/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
:root[data-theme="kerst"] body:not(.in-game) .primary-dock { position: fixed; }
:root[data-theme="kerst"] .primary-dock { border-top-color: var(--snow); }
:root[data-theme="kerst"] .playfield::after { content: ""; position: absolute; z-index: 4; left: -2%; top: -4%; width: 30%; aspect-ratio: 44 / 34; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 44 34%22%3E%3Cpath d=%22M20 20 C 10 22 4 14 2 8 C 8 10 12 6 14 2 C 16 10 22 12 20 20Z%22 fill=%22%232f8f57%22/%3E%3Cpath d=%22M22 20 C 32 22 40 16 42 10 C 36 12 32 7 30 3 C 28 11 21 13 22 20Z%22 fill=%22%23247a49%22/%3E%3Ccircle cx=%2219%22 cy=%2223%22 r=%224%22 fill=%22%23d62e3a%22/%3E%3Ccircle cx=%2226%22 cy=%2224%22 r=%224%22 fill=%22%23e0404b%22/%3E%3Ccircle cx=%2222%22 cy=%2229%22 r=%224%22 fill=%22%23b81f2b%22/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 3px 3px rgb(0 0 0 / .35)); }
:root[data-theme="kerst"] .playfield[data-phase="ready"]::after, :root[data-theme="kerst"] .playfield:has(.album-art:not([hidden]))::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="kerst"] body::before, :root[data-theme="kerst"] body::after, :root[data-theme="kerst"] .game-header::after { animation: none; }
}
/* Room for the string of lights above the turn row */
:root[data-theme="kerst"] body.in-game .game-shell, :root[data-theme="kerst"] body.in-game .game-shell:has(> .game-panel) { padding-top: 1.6rem; }
.theme-name-neon { overflow-wrap: anywhere; }

/* ---- Test game (Admin › Test) ---- */
.test-effect-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0; }
.test-effect-options button:last-child { grid-column: 1 / -1; }
.test-summary { margin: 1rem 0 .5rem; padding: .75rem .9rem; border: 1px dashed var(--border); border-radius: var(--radius); text-align: left; }
.test-summary h3 { margin: 0 0 .35rem; font-size: var(--text-base); }
.test-summary ul { display: grid; gap: .2rem; margin: 0 0 .5rem; padding-left: 1.1rem; }
.test-summary .helper { margin: 0; }
#test-note-form textarea { width: 100%; min-height: 6rem; font: inherit; }
#test-game-form { display: grid; gap: .6rem; }
#test-game-form > .card-title, #test-game-form > .helper { margin: 0; }
.test-notes-list { display: grid; gap: .45rem; margin: .5rem 0 .75rem; padding: 0; list-style: none; }
.test-note { display: grid; gap: .1rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); }
.test-note small { color: var(--muted); }
.test-note.is-battery strong { color: var(--muted); font-weight: 600; }
.test-notes-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.test-notes-actions .btn { flex: 1; }
.test-notes-actions [hidden] { display: none; }

/* ---- Bedieningsdek (spelen.html, deck-model.ts) ----
   Every button of the game lives in one block at the bottom that is equally high at
   every step: a head line (question, verdict or status), a row of up to four
   secondary keys and a full-width main action below. Player pickers and feedback
   float above the deck. Colour means something: primary = go on,
   reveal = cannot be undone, green = Goed, red = Fout. */
.primary-dock.deck { display: grid; gap: .55rem; padding: .7rem max(1rem, env(safe-area-inset-right)) max(.8rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); border-top: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface); box-shadow: 0 -10px 28px rgb(22 47 74 / .09); }
body.in-game .primary-dock.deck { position: relative; }
.deck-picker { position: absolute; z-index: var(--z-dock); left: max(1rem, env(safe-area-inset-left)); right: max(1rem, env(safe-area-inset-right)); bottom: calc(100% + .4rem); width: auto; max-height: min(40dvh, 16rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; overflow-y: auto; margin-inline: 0; padding: .6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 -8px 26px rgb(22 47 74 / .16); }
.deck-picker[hidden] { display: none; }
.deck-picker .deck-main { min-height: 3rem; white-space: normal; }
.deck-feedback { position: absolute; z-index: var(--z-dock); left: max(1rem, env(safe-area-inset-left)); right: max(1rem, env(safe-area-inset-right)); bottom: calc(100% + .4rem); width: auto; max-height: 25dvh; display: none; gap: .35rem; overflow-y: auto; margin-inline: 0; padding: .6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 -8px 26px rgb(22 47 74 / .16); }
.deck-feedback:has(> :not([hidden])) { display: grid; }
body:not(.in-game) .game-shell { padding-bottom: calc(13.5rem + env(safe-area-inset-bottom)); }
body:not(.in-game) .deck-head { display: none; }
.deck-head { min-height: 1.6rem; display: flex; align-items: center; gap: .5rem; }
.deck-head .game-status, .deck-head .deck-prompt { flex: 1 1 auto; min-width: 0; min-height: 0; margin: 0; display: block; font-size: var(--text-md); font-weight: 700; line-height: 1.3; text-align: left; }
.deck-head .game-status { color: var(--muted); }
.deck-head .deck-prompt { color: var(--ink); }
.deck-earned { flex: none; display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .55rem; border-radius: 999px; background: var(--star-gold); color: var(--star-ink); font-size: var(--text-xs); font-weight: 800; white-space: nowrap; }
.deck-earned .star-icon { width: .8rem; height: .8rem; fill: currentColor; }
/* margin-block only: the inline auto margins keep it in the page column on wide screens. */
.deck .effect-note { margin-block: 0; padding: .35rem .6rem; border-left: 4px solid var(--effect, var(--border)); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font-size: var(--text-sm); font-weight: 700; }
.deck .field-error { margin-block: 0; }
.deck-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: .5rem; row-gap: .15rem; }
.deck-group { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 0 2px; overflow: hidden; color: var(--muted); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .09em; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.deck-group::after { content: ""; height: 6px; border: 2px solid var(--border); border-bottom: 0; border-radius: 7px 7px 0 0; }
.deck-group.is-empty::after { border-color: transparent; }
.deck-key { position: relative; min-width: 0; height: 4rem; min-height: 4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: 0 .2rem; overflow: hidden; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: var(--text-2xs); font-weight: 700; letter-spacing: -.005em; line-height: 1.1; text-align: center; text-decoration: none; white-space: nowrap; }
.deck-key svg { width: 1.35rem; height: 1.35rem; flex: none; }
.deck-key[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.deck-key:disabled { opacity: .42; cursor: not-allowed; }
.deck-cost { position: absolute; top: 4px; right: 5px; min-width: 1.35rem; padding: 0 .3rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--ink); font-size: var(--text-2xs); font-weight: 800; line-height: 1.05rem; font-variant-numeric: tabular-nums; }
.deck-spacer { min-width: 0; }
.deck-mains { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: .5rem; }
.deck-main { min-width: 0; min-height: 3.5rem; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem .75rem; border-radius: var(--radius); font-size: var(--text-base); font-weight: 800; white-space: nowrap; text-decoration: none; }
.deck-main svg { width: 1.25rem; height: 1.25rem; flex: none; }
.deck-main-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
button.deck-main.verdict-good { border-color: var(--good); background: var(--good); color: var(--good-ink); }
button.deck-main.verdict-bad { border-color: var(--bad); background: var(--bad); color: var(--bad-ink); }
/* Steel differs from Goed and Fout in every theme: ink on surface, never green or red. */
button.deck-main.verdict-steal { border-color: var(--ink); background: var(--ink); color: var(--surface); }
/* Group steal attempt: a ticked player looks chosen (primary), the rest stays plain. */
button.deck-main.deck-toggle[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.deck-mains[style*="--cols: 3"] .deck-main { gap: .35rem; padding-inline: .45rem; font-size: var(--text-md); }
.deck-mains[style*="--cols: 3"] .deck-ava { width: 1.35rem; height: 1.35rem; font-size: var(--text-2xs); }
.deck-ava { width: 1.6rem; height: 1.6rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--reveal); color: var(--on-reveal); font-size: var(--text-xs); font-weight: 800; }
.deck-choice { grid-column: 1 / -1; }
/* Reserve a full row for secondary controls and a full row for the next action. */
.primary-dock.deck > .deck-head, .primary-dock.deck > .deck-bar { min-width: 0; }
.deck-bar { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 3.25rem minmax(4rem, auto); gap: .4rem; }
.deck-bar > .deck-keys { grid-row: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; font-size: var(--text-2xs); }
.deck-bar > .deck-keys[hidden] { display: none; }
.deck-cue { grid-column: span var(--cue-cols, 4); min-width: 0; min-height: 3.25rem; display: flex; align-items: center; justify-content: center; margin: 0; padding: .25rem .45rem; border-left: 3px solid var(--border); border-radius: .35rem; background: var(--paper); color: var(--muted); font-size: var(--text-sm); font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.deck-cue[hidden] { display: none; }
.deck-cue[data-tone="good"] { border-color: var(--good); color: var(--ink); }
.deck-cue[data-tone="bad"] { border-color: var(--bad); color: var(--ink); }
.deck-cue[data-tone="steal"] { border-color: var(--ink); color: var(--ink); }
.deck-bar > .deck-mains { grid-row: 2; min-width: 0; }
.deck-bar .deck-key { width: 100%; height: 3.25rem; min-height: 3.25rem; padding: 0 .1rem; font-size: .94em; letter-spacing: -.02em; white-space: normal; }
/* A chip key in the bar: the price stands beside the icon, the label below both. */
.deck-bar .chip-key { display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center; align-items: center; gap: .15rem .1rem; }
.deck-bar .chip-key svg { width: 1.15rem; height: 1.15rem; justify-self: end; }
.deck-bar .chip-key .deck-cost { position: static; min-width: 0; padding: 0 .25rem; justify-self: start; }
.deck-bar .chip-key .deck-key-label { grid-column: 1 / -1; }
.deck-bar .deck-main { min-height: 4rem; padding-inline: .5rem; overflow: hidden; line-height: 1.15; text-align: center; text-wrap: balance; white-space: normal; overflow-wrap: anywhere; }
.deck-bar .deck-keys[data-count="4"] + .deck-mains .deck-main { gap: .35rem; padding-inline: .3rem; }
body:not(.in-game) .deck-bar .deck-main { min-height: 3.5rem; }
body:not(.in-game) .deck-bar { grid-template-rows: minmax(3.5rem, auto); }
body:not(.in-game) .deck-bar > .deck-mains { grid-row: 1; }
/* One head line keeps the deck equally high: the question never wraps, a status may
   take a second line when it has to (an error is never cut off). */
body.in-game .primary-dock .deck-head .deck-prompt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) {
  .deck-bar, .deck-bar > .deck-keys { gap: .3rem; }
  .deck-bar .deck-key { padding: 0 .05rem; font-size: .88em; letter-spacing: -.02em; }
  .deck-bar .deck-main { font-size: var(--text-md); }
  body.in-game .primary-dock .deck-head .game-status { font-size: var(--text-sm); }
  .deck-bar .deck-keys[data-count="3"] + .deck-mains .deck-main > svg, .deck-bar .deck-keys[data-count="4"] + .deck-mains .deck-main > svg { display: none; }
  body.in-game .primary-dock .deck-head .deck-prompt { font-size: var(--text-sm); }
}
/* A player row in the standings gets the same Koop kaart key. */
:root[data-theme="metal"] .deck-key { border-color: var(--ink); }
:root[data-theme="metal"] .primary-dock.deck, :root[data-theme="metal"] .deck-dialog > .deck { box-shadow: 0 -10px 28px rgb(0 0 0 / .6); }
:root[data-theme="neon"] .deck-key svg { color: var(--neon-cyan); }
:root[data-theme="neon"] .primary-dock.deck, :root[data-theme="neon"] .deck-dialog > .deck { box-shadow: 0 -8px 26px rgb(255 63 164 / .18); }
:root[data-theme="kerst"] .deck-key { border-color: rgb(244 197 66 / .35); }

/* The title + artist star beside the answer; a bracket ties it to both lines. */
.answer-tt { position: relative; justify-self: stretch; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; column-gap: .4rem; border-radius: .6rem; transition: background var(--dur-base) var(--ease-out); }
.answer-lines { min-width: 0; display: grid; gap: .1rem; }
.answer-bracket { display: none; }
.answer-tt.has-star { grid-template-columns: minmax(0, 1fr) .55rem 2.85rem; margin-left: -.35rem; padding: .2rem .8rem .2rem .35rem; }
.answer-tt.has-star .answer-bracket { display: block; align-self: stretch; margin: .3rem 0; border: 2px solid var(--border); border-left: 0; border-radius: 0 .5rem .5rem 0; }
.answer-tt.is-lit { background: color-mix(in srgb, var(--star-gold) 22%, transparent); }
.answer-tt.is-lit .answer-bracket { border-color: var(--star-edge); }
button.title-artist-star { position: relative; width: 2.85rem; height: 2.85rem; min-height: 0; padding: 0; border: 1.5px solid var(--star-line); border-radius: 50%; background: var(--surface); color: var(--star-edge); transition: background var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-out); }
.title-artist-star .star-icon { width: 1.5rem; height: 1.5rem; }
button.title-artist-star.is-on { border-color: var(--star-edge); background: var(--star-gold); color: var(--star-ink); box-shadow: 0 0 0 4px rgb(245 184 46 / .28); }
.title-artist-star.is-on .star-icon { fill: currentColor; }
button.title-artist-star.is-locked { box-shadow: none; cursor: default; }
button.title-artist-star.is-locked:not(.is-on) { border-style: dashed; border-color: var(--border); background: transparent; color: var(--muted); }
button.title-artist-star.is-locked.is-on { border-color: var(--star-line); background: var(--star-soft); }
.star-plus { position: absolute; top: -.55rem; right: -.7rem; padding: 0 .35rem; border: 2px solid var(--surface); border-radius: 999px; background: var(--tooltip-bg); color: var(--tooltip-ink); font-size: var(--text-2xs); font-weight: 800; line-height: 1.1rem; opacity: 0; transform: scale(.6); transition: opacity var(--dur-fast) ease, transform var(--dur-base) var(--ease-out); pointer-events: none; }
.title-artist-star.is-on:not(.is-locked) .star-plus { opacity: 1; transform: none; }
body.in-game .game-stage { position: relative; }
.star-hint { position: absolute; z-index: 6; width: min(15rem, calc(100% - 1rem)); margin: 0; display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .6rem .6rem .75rem; border-radius: var(--radius); background: var(--tooltip-bg); color: var(--tooltip-ink); font-size: var(--text-sm); font-weight: 600; line-height: 1.4; text-align: left; box-shadow: 0 10px 24px rgb(10 28 45 / .3); }
.star-hint[hidden] { display: none; }
.star-hint::before { content: ""; position: absolute; right: 1.1rem; top: -6px; width: 14px; height: 14px; background: var(--tooltip-bg); transform: rotate(45deg); }
.star-hint.is-above::before { top: auto; bottom: -6px; }
.star-hint b { color: var(--star-gold); }
.star-hint button { flex: none; width: 2rem; height: 2rem; min-height: 0; margin: -.3rem -.2rem 0 0; padding: 0; border: 0; border-radius: .5rem; background: rgb(255 255 255 / .12); color: var(--tooltip-ink); }
.star-hint button svg { width: 1rem; height: 1rem; }
.fly-chip { position: fixed; z-index: var(--z-effects); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--star-gold); color: var(--star-ink); font-size: var(--text-2xs); font-weight: 800; pointer-events: none; box-shadow: inset 0 0 0 2px var(--star-edge); }
@media (prefers-reduced-motion: reduce) {
  .answer-tt, button.title-artist-star, .star-plus { transition: none; }
}

/* Wheel and end screen: full screen, the same deck at the bottom. */
dialog.deck-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); }
dialog.deck-dialog[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.deck-dialog-body { width: min(100%, var(--page)); margin-inline: auto; padding: max(1.25rem, env(safe-area-inset-top)) 1rem 1rem; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: .6rem; text-align: center; }
.deck-dialog-body h2 { margin: 0; }
.deck-dialog > .deck { display: grid; gap: .55rem; padding: .7rem 1rem max(.8rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface); box-shadow: 0 -10px 28px rgb(22 47 74 / .09); }
.deck-dialog > .deck > * { width: min(100%, calc(var(--page) - 2rem)); margin-inline: auto; }
.deck-dialog .deck-head { flex-direction: column; justify-content: center; gap: .15rem; text-align: center; }
.deck-dialog .wheel-result, .deck-dialog #wheel-target-question { margin: 0; font-weight: 800; }
.deck-dialog .wheel-result:empty { display: none; }
.wheel-dialog .deck-dialog-body { align-content: center; }

/* End screen: the language of the statistics page — records, pill switch, rank rows,
   tiles and missed songs as Gitster cards — on the existing podium and control deck. */
.summary-dialog .deck-dialog-body { gap: .75rem; padding-top: max(1.3rem, env(safe-area-inset-top)); text-align: left; }
.summary-intro { display: grid; justify-items: center; gap: .1rem; text-align: center; }
.summary-intro .page-eyebrow { margin: 0; }
.summary-dialog .summary-intro h2 { margin: 0; font-size: var(--text-2xl); text-wrap: balance; }
.summary-intro h2 span { color: var(--reveal); }
.summary-meta { margin: 0; color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.summary-meta:empty { display: none; }
.summary-dialog .podium { margin: .25rem 0 0; gap: .6rem; }
.summary-dialog .podium-step { justify-items: center; gap: .3rem; }
.summary-dialog .podium-name { width: 100%; white-space: normal; overflow-wrap: anywhere; }
.summary-dialog .podium-block { position: relative; width: 100%; box-sizing: border-box; overflow: hidden; }
.summary-dialog .podium-place-1 .podium-block { height: 7rem; background-image: repeating-radial-gradient(circle at 50% 145%, transparent 0px, transparent 12px, color-mix(in srgb, var(--primary-ink) 10%, transparent) 13px, transparent 14px); }
.summary-dialog .podium-place-2 .podium-block { height: 5.5rem; }
.summary-dialog .podium-place-3 .podium-block { height: 4.6rem; }
/* Podium with crowned cats (podium.ts): the cat without its headset (--cat-bare per
   theme) wears a crown askew: gold and big for first, slim silver, small bronze. The
   crown's bottom centre is pinned between the ears; its size is a share of the cat. */
:root { --crown-gold: #f6c327; --crown-gold-deep: #e5a50f; --crown-gold-line: #a8740a; --crown-gold-shine: #fbe07a; --crown-silver: #d5dbe1; --crown-silver-deep: #b9c2cb; --crown-silver-line: #7e8a96; --crown-bronze: #c98a4b; --crown-bronze-deep: #b5773a; --crown-bronze-line: #7d4e1e; --gem-red: #d62839; --gem-blue: #1d6fb8; --gem-green: #23a05a; }
.podium.crowned { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
.crowned .podium-step { grid-row: 1; justify-items: center; gap: .3rem; }
.crowned .podium-name { width: 100%; white-space: normal; overflow-wrap: anywhere; }
.crowned .podium-block { width: 100%; box-sizing: border-box; }
.podium-cat { position: relative; width: var(--cat-size, 86%); aspect-ratio: 322 / 255; margin-top: var(--crown-room, 1.2rem); background: var(--cat-bare) center / contain no-repeat; }
.podium-crown { position: absolute; left: 46.6%; top: 27%; width: var(--crown-size, 34%); transform: translate(-50%, -100%) rotate(var(--crown-tilt, -13deg)); transform-origin: 50% 100%; }
.crown { display: block; width: 100%; height: auto; overflow: visible; }
.crown-body { fill: var(--crown); stroke: var(--crown-line); stroke-width: 1.6; stroke-linejoin: round; }
.crown-band { fill: var(--crown-deep); stroke: var(--crown-line); stroke-width: 1.6; }
.crown-shine { fill: var(--crown-gold-shine); opacity: .8; }
.gem-a { fill: var(--gem-red); }
.gem-b { fill: var(--gem-blue); }
.gem-c { fill: var(--gem-green); }
.podium-place-1 { --crown: var(--crown-gold); --crown-deep: var(--crown-gold-deep); --crown-line: var(--crown-gold-line); --cat-size: 100%; --crown-size: 50%; --crown-tilt: -14deg; --crown-room: 2.9rem; }
.podium-place-2 { --crown: var(--crown-silver); --crown-deep: var(--crown-silver-deep); --crown-line: var(--crown-silver-line); --cat-size: 86%; --crown-size: 34%; --crown-room: 1.3rem; }
.podium-place-3 { --crown: var(--crown-bronze); --crown-deep: var(--crown-bronze-deep); --crown-line: var(--crown-bronze-line); --cat-size: 74%; --crown-size: 22%; --crown-tilt: -16deg; --crown-room: .8rem; }
.podium-place-3 .podium-crown { left: 43%; }
.podium-sparkles { position: absolute; left: 0; bottom: 74%; width: 100%; overflow: visible; fill: none; stroke: var(--crown-gold-deep); stroke-width: 2.4; stroke-linecap: round; }
/* Fireworks (fireworks.ts): a canvas over the page for five seconds; taps go through. */
.fireworks { position: fixed; inset: 0; z-index: var(--z-effects); width: 100%; height: 100%; pointer-events: none; }
.summary-dialog .awards { margin: 0; }
.award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.summary-dialog .award { flex-direction: column; gap: .55rem; padding: .85rem; border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgb(22 47 74 / .06), 0 4px 14px rgb(22 47 74 / .06); }
.summary-dialog .award > svg { width: 2.4rem; height: 2.4rem; }
.summary-dialog .award div { gap: .1rem; }
.summary-dialog .award strong { font-size: var(--text-2xs); letter-spacing: .08em; }
.summary-dialog .award-winners { font-size: var(--text-lg); line-height: 1.15; overflow-wrap: anywhere; }
.summary-dialog .award small { font-size: var(--text-xs); }
.summary-results { display: grid; align-content: start; gap: .6rem; }
.summary-results > .helper { margin: 0; }
.rank-bar.is-cards { background: linear-gradient(to right, var(--reveal) calc(var(--share, 0) * 100%), color-mix(in srgb, var(--border) 60%, var(--surface)) 0); }
.summary-tiles .stat-card { display: flex; flex-direction: column; padding: .75rem .8rem; }
.summary-tiles .stat-card strong { margin-top: auto; padding-top: .3rem; }
.summary-tiles .stat-card strong { font-size: clamp(1.15rem, 5.4vw, 1.6rem); }
.summary-tiles .stat-card small { display: block; margin-top: .25rem; overflow: hidden; color: var(--muted); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
#summary-missed .miss-times { max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#summary-missed .miss-card { padding-top: 1.6rem; }
.summary-dialog .deck-main { font-size: var(--text-sm); white-space: normal; }
@media (max-height: 730px) {
  .summary-dialog .podium-place-1 .podium-block { height: 6rem; }
  .summary-dialog .podium-place-2 .podium-block { height: 4.9rem; }
  .summary-dialog .podium-place-3 .podium-block { height: 4.3rem; }
  .summary-dialog .summary-intro h2 { font-size: var(--text-xl); }
}
@media (max-width: 359px) {
  .award-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Levels (Rookie / Kenner / Legende, official Hitster levels) and the play-length presets.
   Kenner = ink outline on a soft fill, Legende = the reveal colour: the badge reads the
   same in the setup, the turn row and the steal buttons. */
.player-levels { display: grid; gap: .5rem; margin-top: .25rem; }
.player-levels-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.level-row { min-width: 0; display: flex; align-items: center; gap: .6rem; min-height: 3.25rem; padding: .25rem .25rem .25rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.level-row .pick-order { flex: none; min-width: 1.5rem; height: 1.5rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: var(--text-2xs); font-weight: 800; }
.level-row strong { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
button.level-button { flex: none; min-width: 7rem; min-height: 44px; padding: .3rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: var(--text-sm); font-weight: 800; box-shadow: none; }
button.level-button.is-kenner { border-color: var(--ink); background: var(--info-soft); color: var(--ink); }
button.level-button.is-legende { border-color: var(--reveal); background: var(--reveal); color: var(--on-reveal); }
.level-legend { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: 0; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--paper); color: var(--muted); font-size: var(--text-xs); }
.level-legend dt { color: var(--ink); font-weight: 800; }
.level-legend dd { margin: 0; }
.game-settings > .picker-label { margin: .75rem 0 .3rem; color: var(--muted); font-size: var(--text-md); font-weight: 650; }
.player-levels > .picker-label { margin: 0; font-weight: 700; }
.preset-switch { margin-bottom: .1rem; }
.preset-line { margin: 0 0 .5rem; }
.level-badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: var(--text-2xs); font-weight: 800; vertical-align: middle; }
.level-badge.is-kenner { border: 1px solid currentColor; background: var(--info-soft); color: var(--ink); }
.level-badge.is-legende { background: var(--reveal); color: var(--on-reveal); }
.level-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .4rem; }
button.level-check { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .9rem; border: 2px dashed var(--star-edge); border-radius: 999px; background: var(--card-paper); color: var(--star-ink); font-size: var(--text-sm); font-weight: 800; box-shadow: none; }
button.level-check svg { width: 1.1rem; height: 1.1rem; }
button.level-check[aria-pressed="true"] { border-style: solid; border-color: var(--star-edge); background: var(--star-gold); }
button.level-check[aria-pressed="true"] svg { fill: currentColor; }
button.level-check[data-check="year"][aria-pressed="true"] svg { fill: none; }
.level-hint { display: block; margin-top: .3rem; color: var(--muted); font-size: var(--text-xs); text-align: center; }
/* Info: "Dit spel" on top while a game runs. */
.info-this-game { margin-top: .75rem; padding: .25rem .9rem .8rem; border: 2px solid var(--primary); border-radius: var(--radius); }
.info-this-game h3 { margin-top: .6rem; }

/* ---- Game flow (werkwijze-audit): menu groups, in-deck confirmation, outcome bar ---- */
/* Menu in groups: "Dit spel" (only while something runs) and "Ga naar". */
.compact-menu nav { max-width: min(20rem, calc(100vw - 2rem)); }
.compact-menu .menu-group { display: block; padding: .5rem .75rem .2rem; color: var(--muted); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.compact-menu nav > :not([hidden]) ~ .menu-group { margin-top: .3rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.compact-menu .menu-action > span { min-width: 0; display: grid; gap: .1rem; }
.compact-menu .menu-action small { color: var(--muted); font-size: var(--text-xs); font-weight: 600; white-space: normal; }
/* Confirmation keeps the deck size; details appear just above the controls. */
body:not(.in-game) .deck-head.is-confirming { display: flex; }
.deck-confirm-detail { margin: 0; color: var(--muted); font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
/* After the verdict the turn bar shows what happened, tinted by the outcome. */
.score-strip[data-outcome] { border-width: 2px; }
.score-strip[data-outcome="good"] { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.score-strip[data-outcome="bad"] { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
.score-strip[data-outcome="steal"] { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
body.in-game .turn-detail.is-outcome { color: var(--ink); font-size: var(--text-sm); font-weight: 800; }
/* Second line of the turn bar as chips that wrap on a small phone (never cut off). */
body.in-game .turn-sub > .turn-detail { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; overflow: visible; white-space: normal; }
/* Under the name: the turn player's cards and chips, then the chips of the turn. */
.turn-who > .turn-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .4rem; margin-top: .15rem; overflow: visible; white-space: normal; }
.turn-sub > .turn-pill { display: inline-flex; gap: .3rem; color: var(--muted); font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.turn-sub > .turn-pill > span + span::before { content: "· "; }
.turn-sub > [hidden] { display: none; }
/* Stand: the standings as a window, one tap from the turn row. */
.stand-button { flex: none; min-height: 48px; display: inline-flex; align-items: center; gap: .35rem; padding: 0 .8rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--primary); font-size: var(--text-sm); font-weight: 750; box-shadow: none; cursor: pointer; }
.stand-button svg { width: 1.2rem; height: 1.2rem; }
/* The name may take a second line next to the button; it is never cut off. */
.turn-who > #current-player { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 359px) { .stand-button { padding: 0 .6rem; gap: .25rem; } }
.stand-button:hover { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
/* During a game the standings are a sheet over the play screen (the game stays visible
   behind it); the end of a game keeps the whole screen. */
dialog.summary-dialog[data-mode="interim"] { width: min(100%, var(--page)); height: calc(100dvh - 5.5rem); max-height: calc(100dvh - 5.5rem); margin: auto auto 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow); }
.summary-dialog[data-mode="interim"] .deck-dialog-body { padding-top: 1.1rem; }
/* Standings during a game: whose turn it is, chips as dots, Koop kaart per player. */
.summary-standing.is-current { border-color: var(--warn-border); background: var(--warn-soft); }
.stand-note { margin: 0; padding: .6rem .85rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-size: var(--text-sm); font-weight: 700; }
.stand-note[hidden] { display: none; }
/* Keys in the window's deck may take two lines (Fiche-actie ongedaan). */
.summary-dialog .deck-keys .deck-key { white-space: normal; overflow-wrap: anywhere; }
.summary-standing.can-buy .deck-key { width: 5.5rem; height: 3.4rem; min-height: 3.4rem; flex: none; }
.turn-chip { min-width: 0; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--muted); overflow-wrap: anywhere; }
body.in-game .score-strip .turn-row > .turn-who { flex: 1 1 auto; }
.turn-chip.is-plus2 { padding: .05rem .5rem; border: 1px solid var(--good); border-radius: .8rem; background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--ink); }
/* Standings: chips as five dots under the name; Koop kaart only beside who can buy. */
.score-who { min-width: 0; display: grid; gap: .2rem; }
.score-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-dots { display: flex; gap: .25rem; }
.chip-dots > span { width: .7rem; height: .7rem; border: 2px solid var(--border); border-radius: 50%; }
.chip-dots > .is-on { border-color: var(--star-edge); background: var(--star-gold); }
/* Setup on one screen: the table (turn order, level, ×), Erbij, settings as a summary. */
button.level-button { min-width: 6rem; }
.level-remove { width: 44px; height: 44px; min-height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); box-shadow: none; }
.level-remove svg { width: 1.2rem; height: 1.2rem; }
.user-picker { padding-top: .6rem; border-top: 1px dashed var(--border); }
.user-pick.is-add-guest { border-style: dashed; border-color: var(--muted); }
/* Klaarzetten (mockup A): title and Spotify badge on one line, the play style as a pill
   switch (same look as the play-length switch), one main button in the deck. */
.page-intro.intro-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; }
.page-intro.intro-row h1 { margin: 0; }
.page-intro.intro-row .status-badge { margin-top: 0; }
.play-style-bar .play-style-options { gap: .25rem; padding: .25rem; border-radius: 999px; background: color-mix(in srgb, var(--border) 70%, var(--paper)); }
.play-style-bar .play-style-option > span { min-height: 44px; justify-items: center; padding: .4rem .6rem; border: 0; border-radius: 999px; background: transparent; text-align: center; }
.play-style-bar .play-style-option input:checked + span { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--primary), 0 1px 3px rgb(22 47 74 / .18); }
.play-style-bar .play-style-selector > .card-hint { margin: .5rem .25rem 0; }
.score-setup .card-head .label-note { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-sm); }
.user-picker > .picker-head .picker-label { color: var(--muted); font-size: var(--text-sm); font-weight: 800; }
.level-legend-toggle > summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.guest-form { margin-top: .5rem; }
.play-style-selector legend.visually-hidden { width: 1px; margin: -1px; }
/* Spelregels and Officiele Hitster-kaarten (DESIGN.md "Startscherm"): one rhythm, one
   disclosure, one control per kind of choice. Gaps of .9rem between the parts of a card;
   a disclosure row sits under a hairline; a switch for on/off, segmented buttons for one
   of several. */
.game-settings { display: grid; gap: .9rem; }
.game-settings > * { margin: 0; }
.settings-head { display: grid; gap: .25rem; }
.settings-head .card-title { margin: 0; }
.settings-head .preset-line { margin: 0; font-size: var(--text-sm); line-height: 1.45; }
.settings-disclosure { padding-top: .35rem; border-top: 1px solid var(--border); }
.settings-disclosure > summary, .hitster-disclosure > summary { min-height: 52px; margin: 0; font-weight: 800; }
.settings-disclosure > summary + * { margin-top: .25rem; }
.settings-groups { display: grid; gap: 1.25rem; padding-bottom: .5rem; }
.settings-group { display: grid; gap: .6rem; }
.settings-group-title { margin: 0; color: var(--muted); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.settings-group .segmented { margin: 0; }
.settings-group .setting-toggles { margin: 0; }
.segmented.segmented-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.segmented.segmented-two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
#auto-field { margin-top: 1rem; }
.segmented.segmented-five span { padding-inline: .1rem; font-size: var(--text-sm); }
.disclosure-text { min-width: 0; display: grid; gap: .15rem; }
.disclosure-text .card-title { margin: 0; }
.disclosure-summary { color: var(--muted); font-size: var(--text-sm); font-weight: 500; line-height: 1.35; }
.hitster-disclosure > summary + * { margin-top: .75rem; }
.hitster-body { display: grid; gap: .5rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.hitster-body > * { margin: 0; }
.simple-rules { display: grid; gap: .75rem; }
.simple-rules > * { margin: 0; }
.simple-steps { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.simple-steps li { position: relative; padding-left: 2.1rem; line-height: 1.45; counter-increment: step; }
.simple-steps li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: var(--text-2xs); font-weight: 800; }
/* The chosen rule set reads in every theme: the same ring as the play style switch. */
.preset-switch button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--primary), 0 1px 3px rgb(22 47 74 / .18); }
.preset-switch button:disabled { opacity: .5; cursor: not-allowed; }
.preset-switch button { font-size: var(--text-sm); }

/* ==== Samenstellen (Admin › deck › Importeren) ======================================
   A deck is built in rounds: the goal in one big line, the deck's choices in one quiet
   line, one main button (Aanvullen), and a preview before anything changes. Artist rows
   show cards already in the deck, new ones and room left; fame per song as small tiles.
   Tokens only, so all four themes follow. */
.choice-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; margin: .6rem 0 0; }
.choice-result strong { font-size: var(--text-lg); font-weight: 800; }
.choice-result span { color: var(--muted); font-size: var(--text-sm); }
.fame-selector { margin-top: 1rem; }
/* Same quiet label as Aantal nummers and Spreiding, in every theme (the play-style legend is a heading). */
#import-fame > legend { margin-bottom: .3rem; color: var(--muted); font-family: inherit; font-size: var(--text-md); font-weight: 650; letter-spacing: normal; text-transform: none; text-shadow: none; }
.fame-selector + .setting-toggles { margin-top: .75rem; }
.compose { display: grid; gap: .75rem; }
.compose > * { margin: 0; }
.compose-goal { margin: 0; font-size: var(--text-xl); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.compose-settings { margin: 0; line-height: 1.45; }
.compose-last { display: grid; gap: .2rem; margin: 0; padding: .6rem .85rem .6rem 1.9rem; border-radius: var(--radius); background: var(--paper); color: var(--muted); font-size: var(--text-sm); }
.compose-actions { display: grid; gap: .5rem; }
.compose-actions .quiet-button { justify-self: start; min-height: 44px; }
.compose-preview { display: grid; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.compose-preview > * { margin: 0; }
.compose-preview-title { margin: 0; font-size: var(--text-lg); font-weight: 800; line-height: 1.3; }
.compose-subtitle { margin: .25rem 0 0; font-size: var(--text-md); font-weight: 800; }
.compose-shortage { display: grid; gap: .6rem; padding: .75rem .85rem; border: 1px solid var(--warn-border); border-radius: var(--radius); background: var(--warn-soft); }
.compose-shortage p { margin: 0; font-size: var(--text-sm); line-height: 1.45; }
.compose-left-out { padding: .6rem .85rem; border-radius: var(--radius); background: var(--warn-soft); }
.compose-left-out summary { min-height: 32px; display: flex; align-items: center; font-weight: 750; cursor: pointer; }
.compose-left-out ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.compose .quiet-danger { justify-self: start; min-height: 44px; text-align: left; }

/* Fame of the chosen songs: Hit, Bekend, Redelijk, Onbekend (always a word, never colour alone). */
.fame-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); gap: .4rem; }
.fame-band { display: grid; gap: .05rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--ink); }
.fame-band small { font-size: var(--text-xs); }
.fame-band b { font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.fame-band-hit { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.fame-band-known { border-color: color-mix(in srgb, var(--primary) 70%, var(--surface)); background: color-mix(in srgb, var(--primary) 70%, var(--surface)); color: var(--primary-ink); }
.fame-band-deep, .fame-band-outside_top { border-color: var(--warn-border); background: var(--warn-soft); }
.fame-band-unknown { border-style: dashed; }

/* Artists with the most cards: a bar of slots up to the spread. */
.artist-bars { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.artist-bar-head { display: flex; justify-content: space-between; gap: .5rem; font-size: var(--text-sm); }
.artist-bar-head span { color: var(--muted); text-align: right; }
.artist-bar { display: grid; grid-template-columns: repeat(var(--slots), minmax(0, 1fr)); gap: 3px; margin-top: .25rem; }
.artist-bar i { height: .5rem; border-radius: 999px; }
.seg-old, .legend-old::before { background: color-mix(in srgb, var(--ink) 45%, var(--surface)); }
.seg-new, .legend-new::before { background: var(--primary); }
.seg-room, .legend-room::before { background: color-mix(in srgb, var(--ink) 12%, var(--surface)); }
.artist-bars-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: var(--text-xs); }
.artist-bars-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.artist-bars-legend span::before { content: ""; width: .9rem; height: .5rem; border-radius: 999px; }

/* Fame per card in Controleren: "deepcut · nr. 48 bij artiest". */
.track-fame.fame-deep, .track-fame.fame-outside_top { color: var(--danger-ink); font-weight: 650; }
#filter-replace { margin: .25rem 0 .5rem; }

/* ---- Genres (Nieuw deck, Controleren › Per genre), meezingers and Vervang ---- */
.status-badge-sing { border-color: var(--star-line); background: var(--star-soft); color: var(--star-ink); }
.genre-chips { margin: 1rem 0 0; padding: 0; border: 0; }
.genre-chips legend { margin: 0 0 .3rem; padding: 0; color: var(--muted); font-size: var(--text-md); font-weight: 650; }
.genre-chip-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.genre-chip { position: relative; margin: 0; }
.genre-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.genre-chip > span { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; padding: 0 .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-strong); color: var(--ink); font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.genre-chip input:checked + span { border-style: dashed; border-color: var(--danger-ink); background: var(--warn-soft); color: var(--danger-ink); text-decoration: line-through; }
/* Chips that choose (decades), not leave out: checked reads as "in". */
.pick-chips { margin-top: 0; }
.pick-chips .genre-chip input:checked + span { border-style: solid; border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--primary); color: var(--ink); text-decoration: none; }
.genre-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.genre-bars { display: grid; gap: .35rem; margin: .5rem 0 0; }
.genre-bar { min-height: 40px; display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) 2.2rem; align-items: center; gap: .5rem; padding: .2rem .5rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; box-shadow: none; color: var(--ink); font-size: var(--text-sm); font-weight: 600; text-align: left; }
.genre-bar[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.genre-bar i { display: block; height: .55rem; border-radius: 999px; background: var(--paper); overflow: hidden; }
.genre-bar i::before { content: ""; display: block; height: 100%; width: var(--share); border-radius: inherit; background: var(--primary); }
.genre-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.genre-bar:disabled { color: var(--muted); }
.genre-bars-note { margin: .2rem .5rem 0; color: var(--muted); font-size: var(--text-sm); }
.replace-dialog { display: grid; gap: .85rem; }
.replace-dialog:not([open]) { display: none; }
.replace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.replace-head h2 { margin: 0; font-size: var(--text-xl); }
.replace-head p { margin: .15rem 0 0; }
.replace-close { flex: 0 0 auto; width: 44px; height: 44px; min-height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; }
.replace-close svg { width: 1.1rem; height: 1.1rem; }
.replace-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; padding: .25rem; border-radius: var(--radius); background: var(--paper); }
.replace-tabs button { min-height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none; color: var(--ink); font-weight: 700; }
.replace-tabs button[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); }
.replace-options { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.replace-option { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-strong); }
.replace-option.is-chosen { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.replace-option > b { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.replace-option > span { min-width: 0; display: grid; gap: .05rem; }
.replace-option strong { overflow-wrap: anywhere; }
.replace-option small { color: var(--muted); font-size: var(--text-xs); }
.replace-option button { min-width: 4.5rem; min-height: 44px; }
.replace-empty { display: grid; gap: .5rem; justify-items: start; padding: .85rem; border-radius: var(--radius); background: var(--paper); }
.replace-empty p { margin: 0; }
.replace-done { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .85rem; border-radius: var(--radius); background: var(--paper); font-size: var(--text-sm); }

/* ---- Import steps: what is done, what runs (count, estimate), what comes ---- */
.import-steps { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.import-step { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); column-gap: .6rem; align-items: start; font-size: var(--text-sm); color: var(--muted); }
.import-step::before { content: ""; grid-row: span 2; width: .9rem; height: .9rem; margin-top: .2rem; border: 2px solid var(--border); border-radius: 50%; box-sizing: border-box; }
.import-step > span { font-weight: 650; }
.import-step > small { grid-column: 2; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.import-step.is-done { color: var(--ink); }
.import-step.is-done::before { border-color: var(--ok-ink); background: var(--ok-ink); box-shadow: inset 0 0 0 2px var(--surface); }
.import-step.is-active { color: var(--ink); }
.import-step.is-active > span { font-weight: 800; }
.import-step.is-active::before { border-color: var(--primary); border-top-color: transparent; animation: import-spin 1s linear infinite; }
@keyframes import-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .import-step.is-active::before { animation: none; border-top-color: var(--primary); } }
.import-wait { padding: .5rem .7rem; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--danger-ink); }
