/* =====================================================================
   Weerwolfr: "Toneel", theater bij kaarslicht.
   Ontwerpbasis (tokens + gedeelde onderdelen) en de schermen rond het spel.
   Geladen na styles.css (het spelscherm, erft hier de kleuren) en voor sound.css.

   TOKENS (:root)
     Kleur      --tn-bg  --tn-ink  --tn-ink-strong  --tn-ink-soft  --tn-ink-dim  --tn-ink-faint
                --tn-amber  --tn-amber-ink  --tn-amber-rgb  --tn-cream  --tn-cream-ink
                --tn-rule (amberlijn)  --tn-line / --tn-line-strong (crèmelijn)
     Kampen     --tn-wolf  --tn-dorp  --tn-dubieus  --tn-eenling   (+ -soft voor tekst op donker)
                Zet data-camp="weerwolf|burger|dorp|dubieus|eenling|onbekend" op een element en
                gebruik daarbinnen --camp, --camp-rgb, --camp-soft, --camp-deep, --camp-a/b, --camp-line.
     Vlakken    --tn-panel (verlicht paneel)  --tn-key (toets)  --tn-well (verzonken vak)
                --tn-quiet (stil vlak)  --tn-side (zijwand)  --tn-footlight (podium met voetlicht)
                --tn-curtain (rood doek)  --tn-pelmet (doekrand bovenin)
     Letter     --tn-font; schaal --tn-fs-13 … --tn-fs-116; gewichten 400/500/600/700, geen cursief
     Ruimte     --tn-s1 4  --tn-s2 8  --tn-s3 12  --tn-s4 16  --tn-s5 20  --tn-s6 24  --tn-s7 30
     Hoeken     --tn-r-s 6  --tn-r-m 7  --tn-r-l 8  --tn-r-pill 22
     Schaduw    --tn-sh-panel  --tn-sh-key  --tn-sh-key-lit  --tn-sh-cta  --tn-sh-pop
     Maat       --tn-tap 44px (kleinste tikvlak)  --tn-strip-h (hoogte geluidsstrook)

   ONDERDELEN
     .tn-ico / .tn-flame        inline SVG (icon() in app.js, of <i data-ico="…"> in index.html)
     .tn-key (+ .tn-lamp)       toets met lampje; aan = aria-pressed="true", .is-lit = fel, .is-down = ingedrukt
                                varianten: .tn-key-two (twee regels), .tn-key-block (volle breedte), .tn-key-warn
     .tn-cta                    amber hoofdtoets; maten -sm -md -lg -xl -hero; inhoud .tn-cta-text > .tn-cta-kicker, b, .tn-cta-sub
     .tn-btn                    stille omlijnde knop; -strong, -dim, -two (twee regels), -wide
     .tn-link                   stille tekstlink met icoon
     .tn-round                  ronde icoonknop van 44px; -strong
     .tn-pill                   klein ovaal knopje ("Zet terug")
     .tn-steps > li > .tn-step  kaarsen als stappen; .tn-candle.is-lit / .is-todo / .is-done (+ -xl)
     .tn-panel / .tn-panel-quiet / .tn-well / .tn-curtain-panel     vlakken
     .tn-switch (checkbox) / .tn-switch-key (knop met .tn-switch-vis)  schakelaars
     .tn-range                  schuifregelaar (zet --fill via paintRange() in app.js)
     .tn-seg                    twee- of meerkeuze naast elkaar (aria-pressed)
     .tn-eq (.is-playing)       geluidsbalkjes
     .tn-ring                   de ovale tafel met stoelen (.tn-seat) of namen (.tn-seatname)
     .tn-input                  tekstveld; -xl
     .tn-h1 / .tn-h2 / .tn-dim  koppen en gedempte tekst
     HET SPELSCHERM (.tn-game, onderaan dit bestand)
     Maten      --game-list-w (rolverdeling)  --game-desk-w (geluidstafel)
     Toneel     .tn-stage zet --st-ink --st-soft --st-faint --st-line --st-accent --st-danger --st-chip
                --st-chip-line --st-next-bg --st-next-ink; overdag ([data-phase="day"]) worden dat de
                perkamentkleuren. Alles op het toneel gebruikt deze, nooit de vaste donkere tokens.
     .tn-cast / .tn-cast-row    rolverdeling op het doek; rij = toets met lampje (.tn-dot), .is-awake (amber),
                                .is-dead, aria-pressed (gekozen), data-pick="on|off|other|no" als een briefje wacht
     .tn-phases / .tn-track     Nacht 1, Dag 1, Nacht 2 en de voortgang: .tn-wick (kaars) of .tn-agenda (vak)
     .tn-speech                 de voorleestekst (.is-tight / .is-tighter op .tn-stage maken hem kleiner)
     .tn-slips > .tn-slip       briefje: .is-filled, .is-ask (de vraag), .is-off (op), aria-pressed="true" = wacht
                                op een tik links; .tn-slip-choice (.tn-opt) twee of drie keuzes; .tn-slipbox groep
     .tn-note (.is-warn)        regel uitleg of waarschuwing; .tn-reminder afvinkbaar geheugensteuntje
     .tn-stagebtn               knop op het toneel; .is-primary, .is-quiet, .is-on
     .tn-word (+ .tn-word-btn)  aantikbaar zinsdeel in een voorleestekst (geluid), .is-playing = gloed; .tn-closer de afsluiter
     .tn-board > .tn-score      de tussenstand van de stemming: rij per speler (naam met balk is de plustoets), cijfer en min; .tn-board-head, .tn-tally-extra
     .tn-speech-lead / -reveal / -beat / -next   delen van de voorleestekst: de aanloop, de onthulling (apart gezet),
                                een volgende zin na een dood, en wat er na Volgende komt (alleen voor de verteller)
     .tn-rolecard / .tn-cardask kaart die de verteller ziet: bekend (laat zien, in kampkleur) of nog in te vullen
     .tn-next.is-blocked + .is-wanted   Volgende ging niet door (half briefje, stemming open); het briefje licht op
     .tn-deaths > .tn-death     doden van de nacht of de stemming; .tn-spared wie overleeft
     .tn-clock / .tn-votes / .tn-tie / .tn-verdict     debatklok, stemmen tellen, gelijkspel, uitslag
     .tn-stage-nav              .tn-stagekey (vorige, andere tekst) en .tn-next (de grote toets Volgende)
     .tn-sheet                  spelerpaneel over het toneel: .tn-rolekey (grote roltoets in kampkleur),
                                .tn-pick (keuzetoets, aria-pressed), .tn-kill (meld dood)
     .tn-desk                   kolom met de geluidstafel; .tn-drawer-btn en .tn-scrim voor de laden (smal)
     .tn-btn-warn / .tn-dot     rode stille knop; kamplampje (kleurt met data-camp)
     Bestaande klassen die het spelscherm gebruikt (.btn, .btn-primary, .btn-ghost, .btn-warn, .chip,
     .option, .modal, .toast, .notice, .badge, .text-input, .panel-block) zijn hier in dezelfde
     stijl gezet, zodat het spelscherm nu al meekleurt.

   INDELING
     html[data-layout="wide"]    iPad liggend en MacBook: elk scherm past zonder scrollen (app.js: syncLayout)
     html[data-layout="narrow"]  iPad staand, telefoon, of met het soundboard ernaast: kolommen onder elkaar
     html[data-route="home|players|setup|check|night|end"]   het scherm dat open is
   ===================================================================== */

@font-face { font-family: "General Sans"; src: url("fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  --tn-bg: #0c0806;
  --tn-ink: #f1e3c4;
  --tn-ink-strong: #f6e7c6;
  --tn-ink-soft: #d6c19c;
  --tn-ink-dim: #b8a37f;
  --tn-ink-faint: #a8936f;
  --tn-amber: #e6a53c;
  --tn-amber-rgb: 230, 165, 60;
  --tn-amber-ink: #22130a;
  --tn-cream: #f0e2c3;
  --tn-cream-ink: #27180d;
  --tn-rule: rgba(230, 165, 60, 0.22);
  --tn-line: rgba(238, 223, 191, 0.18);
  --tn-line-strong: rgba(238, 223, 191, 0.3);

  --tn-wolf: #e2574b;
  --tn-wolf-soft: #f0a79e;
  --tn-dorp: #f0c36a;
  --tn-dorp-soft: #dcc591;
  --tn-dubieus: #b9aad6;
  --tn-dubieus-soft: #c9bfdd;
  --tn-eenling: #62ab91;
  --tn-eenling-soft: #a5cdbd;

  --tn-panel: linear-gradient(180deg, #2a1d12, #1d140c);
  --tn-key: linear-gradient(180deg, #2d2015, #1f150d);
  --tn-key-lit: radial-gradient(120% 120% at 30% 0%, rgba(240, 165, 60, 0.55), rgba(240, 165, 60, 0.16) 60%), #2a1c11;
  --tn-well: rgba(10, 5, 4, 0.55);
  --tn-quiet: rgba(238, 223, 191, 0.035);
  --tn-side: radial-gradient(100% 30% at 50% 0%, rgba(230, 165, 60, 0.09), transparent 70%), linear-gradient(180deg, #1b130c, #120c07);
  --tn-footlight: radial-gradient(120% 70% at 50% 108%, rgba(214, 134, 38, 0.30), rgba(150, 70, 20, 0.10) 42%, transparent 70%), radial-gradient(60% 40% at 50% 0%, rgba(0, 0, 0, 0.6), transparent 70%), #0c0806;
  --tn-curtain: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 22px, rgba(0, 0, 0, 0.3) 40px, rgba(0, 0, 0, 0) 58px), linear-gradient(180deg, #35100e, #200a09 70%, #160706);
  --tn-curtain-wide: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 46px, rgba(0, 0, 0, 0.26) 70px, rgba(0, 0, 0, 0) 96px), linear-gradient(180deg, #35100e, #200a09 70%, #160706);
  --tn-pelmet: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 14px, rgba(0, 0, 0, 0.32) 26px, rgba(0, 0, 0, 0) 38px), linear-gradient(180deg, #3d1310, #260c0a);

  --tn-font: "General Sans", "Inter", system-ui, sans-serif;
  --tn-fs-13: 13px;
  --tn-fs-14: 14.5px;
  --tn-fs-15: 15.5px;
  --tn-fs-16: 16px;
  --tn-fs-17: 17px;
  --tn-fs-20: 20px;
  --tn-fs-22: 22px;
  --tn-fs-28: 28px;
  --tn-fs-32: 32px;
  --tn-fs-50: 50px;
  --tn-fs-116: 116px;

  --tn-s1: 4px;
  --tn-s2: 8px;
  --tn-s3: 12px;
  --tn-s4: 16px;
  --tn-s5: 20px;
  --tn-s6: 24px;
  --tn-s7: 30px;

  --tn-r-s: 6px;
  --tn-r-m: 7px;
  --tn-r-l: 8px;
  --tn-r-pill: 22px;

  --tn-sh-panel: inset 0 1px 0 rgba(255, 220, 160, 0.12), 0 14px 30px -18px #000;
  --tn-sh-key: inset 0 1px 0 rgba(255, 225, 170, 0.09), 0 4px 0 #090503;
  --tn-sh-key-lit: 0 0 22px -6px rgba(240, 165, 60, 0.7), 0 1px 0 #090503;
  --tn-sh-cta: inset 0 1px 0 rgba(255, 235, 190, 0.6), 0 10px 30px -10px rgba(230, 150, 40, 0.6);
  --tn-sh-pop: inset 0 1px 0 rgba(255, 220, 160, 0.12), 0 30px 60px -20px #000;

  --tn-tap: 44px;
  --tn-strip-h: 54px;

  /* De oude namen uit styles.css, zodat het spelscherm dezelfde kleuren krijgt. */
  --bg: var(--tn-bg);
  --bg-elev: #1d140c;
  --bg-elev-2: #2a1d12;
  --text: var(--tn-ink);
  --text-dim: var(--tn-ink-dim);
  --accent: var(--tn-amber);
  --accent-glow: rgba(240, 165, 60, 0.4);
  --wolf: var(--tn-wolf);
  --village: var(--tn-dorp);
  --loner: var(--tn-eenling);
  --warn: var(--tn-wolf-soft);
  --border: var(--tn-line);
  --radius: var(--tn-r-m);
  --shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.8);
}

[data-camp="weerwolf"] { --camp: #e2574b; --camp-rgb: 226, 87, 75; --camp-soft: #f0a79e; --camp-deep: 111, 22, 18; --camp-a: #c8392f; --camp-b: #7d1814; --camp-line: #f08a78; }
[data-camp="burger"], [data-camp="dorp"] { --camp: #f0c36a; --camp-rgb: 240, 195, 106; --camp-soft: #dcc591; --camp-deep: 90, 61, 14; --camp-a: #f0c36a; --camp-b: #b07a1f; --camp-line: #ffe0a0; }
[data-camp="dubieus"] { --camp: #b9aad6; --camp-rgb: 185, 170, 214; --camp-soft: #c9bfdd; --camp-deep: 51, 41, 74; --camp-a: #9585bd; --camp-b: #4d3f73; --camp-line: #d6caee; }
[data-camp="eenling"] { --camp: #62ab91; --camp-rgb: 98, 171, 145; --camp-soft: #a5cdbd; --camp-deep: 20, 61, 51; --camp-a: #5fa58c; --camp-b: #235a4b; --camp-line: #a4dcc7; }
[data-camp="onbekend"], [data-camp="geen"] { --camp: #b8a37f; --camp-rgb: 184, 163, 127; --camp-soft: #d6c19c; --camp-deep: 42, 29, 18; --camp-a: #6b5a3f; --camp-b: #2a1d12; --camp-line: #d6c19c; }

/* ---------- Basis ---------- */

html, body {
  background: var(--tn-bg);
  color: var(--tn-ink);
  font-family: var(--tn-font);
  font-size: 16px;
  line-height: 1.35;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

button, input, textarea, select, output { font: inherit; color: inherit; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
em, i, blockquote, cite, address { font-style: normal; }
input::placeholder, textarea::placeholder { color: #9a8767; opacity: 1; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--tn-amber);
  outline-offset: 2px;
}

#app { max-width: none; min-height: 100vh; min-height: 100dvh; }
#view-night { width: 100%; }

.tn-ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tn-flame {
  width: 12px;
  height: 17px;
  flex: none;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 7px rgba(240, 170, 60, 0.95)) drop-shadow(0 0 20px rgba(240, 150, 40, 0.6));
  animation: tn-flicker 2.6s ease-in-out infinite;
}

@keyframes tn-flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  30% { transform: scale(1.06, 0.94) rotate(2deg); }
  55% { transform: scale(0.95, 1.08) rotate(-2deg); }
  80% { transform: scale(1.03, 0.97) rotate(1deg); }
}
@keyframes tn-level { 0%, 100% { transform: scaleY(0.18); } 50% { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01s !important; transition-duration: 0.01s !important; }
}

.tn-h1 { margin: 0; font-weight: 600; font-size: var(--tn-fs-32); line-height: 1; letter-spacing: -0.02em; color: var(--tn-ink-strong); }
.tn-h2 { margin: 0; font-weight: 600; font-size: var(--tn-fs-22); line-height: 1.1; letter-spacing: -0.01em; color: var(--tn-ink-strong); }
.tn-dim { font-size: 15px; line-height: 1.25; color: var(--tn-ink-dim); }

/* ---------- Toets met lampje ---------- */

.tn-key {
  position: relative;
  box-sizing: border-box;
  min-height: 56px;
  padding: 8px 34px 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: var(--tn-fs-17);
  font-weight: 500;
  color: #e3d1ab;
  background: var(--tn-key);
  border: 1px solid rgba(238, 223, 191, 0.16);
  border-radius: var(--tn-r-m);
  box-shadow: var(--tn-sh-key);
  cursor: pointer;
  transition: transform 0.06s, box-shadow 0.14s, border-color 0.14s;
}
.tn-key > .tn-ico { width: 22px; height: 22px; color: var(--tn-amber); }
.tn-key:hover { filter: brightness(1.12); }
.tn-key:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 225, 170, 0.09), 0 1px 0 #090503; }
.tn-key:disabled { opacity: 0.4; cursor: default; filter: none; }

.tn-lamp {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d2c1c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.tn-key[aria-pressed="true"], .tn-key.is-lit {
  color: #fff6e2;
  border-color: rgba(240, 165, 60, 0.9);
  box-shadow: var(--tn-sh-key-lit);
  transform: translateY(3px);
}
.tn-key.is-lit { background: var(--tn-key-lit); }
.tn-key.is-lit > .tn-ico { color: #fff6e2; }
.tn-key.is-down { box-shadow: 0 0 30px -4px rgba(240, 165, 60, 0.8), 0 1px 0 #090503; }
.tn-key[aria-pressed="true"] .tn-lamp, .tn-key.is-lit .tn-lamp { background: #fff; box-shadow: 0 0 10px 2px rgb(240, 165, 60); }

.tn-key-two { min-height: 54px; padding: 8px 24px 8px 12px; gap: 11px; }
.tn-key-two > span:not(.tn-lamp) { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.18; }
.tn-key-two b { font-size: var(--tn-fs-14); font-weight: 600; color: var(--tn-ink); }
.tn-key-two small { font-size: 13px; color: var(--tn-ink-faint); }

.tn-key-block { display: flex; width: 100%; margin-bottom: 8px; }
.tn-key-warn { color: var(--tn-wolf-soft); border-color: rgba(226, 87, 75, 0.5); }
.tn-key-warn > .tn-ico { color: var(--tn-wolf-soft); }

/* ---------- Amber hoofdtoets ---------- */

.tn-cta {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  text-align: left;
  color: var(--tn-amber-ink);
  background: var(--tn-amber);
  border: 0;
  border-radius: var(--tn-r-s);
  box-shadow: var(--tn-sh-cta);
  cursor: pointer;
}
.tn-cta:hover { filter: brightness(1.08); }
.tn-cta:active { translate: 0 2px; }
.tn-cta:disabled { opacity: 0.38; cursor: default; filter: none; translate: none; box-shadow: none; }
.tn-cta > .tn-ico { width: 28px; height: 28px; stroke-width: 1.8; }
.tn-cta-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.1; }
.tn-cta-text b { font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.tn-cta-kicker { font-size: 14.5px; font-weight: 500; }
.tn-cta-sub { font-size: 15px; font-weight: 500; }

.tn-cta-sm { min-height: 48px; justify-content: center; font-size: var(--tn-fs-17); font-weight: 700; }
.tn-cta-md { min-height: 64px; padding: 0 10px 0 16px; }
.tn-cta-md .tn-cta-kicker { font-size: 13.5px; white-space: nowrap; }
.tn-cta-md b { font-size: 21px; }
.tn-cta-md > .tn-ico { width: 24px; height: 24px; }
.tn-cta-lg { min-height: 72px; padding: 0 20px 0 22px; }
.tn-cta-lg b { font-size: 24px; }
.tn-cta-xl { min-height: 118px; padding: 16px 18px 16px 22px; }
.tn-cta-xl b { font-size: 32px; }
.tn-cta-xl .tn-cta-kicker { font-size: 15px; }
.tn-cta-xl > .tn-ico { width: 30px; height: 30px; }
.tn-cta-hero {
  min-height: 104px;
  padding: 12px 18px 14px 22px;
  border-radius: var(--tn-r-l);
  box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.6), 0 0 44px -6px rgba(240, 160, 50, 0.75), 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}
.tn-cta-hero .tn-cta-text { line-height: 1.08; gap: 0; }
.tn-cta-hero .tn-cta-kicker { font-size: 15px; line-height: 1.2; }
.tn-cta-hero b { font-size: 40px; letter-spacing: -0.03em; }
.tn-cta-hero .tn-cta-sub { font-size: 20px; white-space: nowrap; }
.tn-cta-hero > .tn-ico { width: 38px; height: 38px; stroke-width: 1.7; }

.tn-cta-wait {
  box-sizing: border-box;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  color: var(--tn-ink-dim);
  border: 1px dashed var(--tn-line-strong);
  border-radius: var(--tn-r-s);
}
.tn-cta-wait span { font-size: 14.5px; }
.tn-cta-wait b { font-weight: 600; font-size: 21px; }

/* ---------- Stille knoppen en links ---------- */

.tn-btn {
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--tn-ink);
  background: rgba(238, 223, 191, 0.06);
  border: 1px solid var(--tn-line);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-btn:hover { filter: brightness(1.12); }
.tn-btn:active { translate: 0 2px; }
.tn-btn:disabled { opacity: 0.4; cursor: default; filter: none; translate: none; }
.tn-btn[aria-pressed="true"] { border-color: rgba(240, 165, 60, 0.9); }
.tn-btn-strong { font-weight: 700; background: rgba(238, 223, 191, 0.08); border-color: rgba(238, 223, 191, 0.28); }
.tn-btn-dim { background: none; color: var(--tn-ink-soft); }
.tn-btn-two { min-height: 56px; padding: 6px 14px; gap: 12px; }
.tn-btn-two > .tn-ico, .tn-tools-pair .tn-btn:not(.tn-btn-dim) > .tn-ico { color: var(--tn-amber); }
.tn-btn-two > span { display: flex; flex-direction: column; line-height: 1.2; }
.tn-btn-two > span > span { font-size: var(--tn-fs-17); }
.tn-btn-two small { font-size: 14px; color: var(--tn-ink-dim); }
.tn-btn-wide {
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px 0 22px;
  background: rgba(10, 5, 4, 0.35);
  border-color: rgba(241, 227, 196, 0.35);
}
.tn-btn-wide > span { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.tn-btn-wide b { font-size: 18px; font-weight: 700; }
.tn-btn-wide small { font-size: 15px; color: var(--tn-ink-soft); }

.tn-link {
  min-height: var(--tn-tap);
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #d9c6a0;
  background: none;
  border: 0;
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-link:hover { color: var(--tn-ink-strong); }
.tn-link > .tn-ico { width: 17px; height: 17px; }
.tn-link:disabled { opacity: 0.4; cursor: default; }

.tn-round {
  box-sizing: border-box;
  width: var(--tn-tap);
  height: var(--tn-tap);
  flex: none;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--tn-ink-soft);
  background: none;
  border: 1px solid var(--tn-line);
  border-radius: 50%;
  cursor: pointer;
}
.tn-round:active { translate: 0 2px; }
.tn-round:disabled { opacity: 0.3; cursor: default; translate: none; }
.tn-round-strong { color: var(--tn-ink); background: rgba(238, 223, 191, 0.06); border-color: var(--tn-line-strong); }

.tn-pill {
  flex: none;
  min-height: var(--tn-tap);
  padding: 0 14px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--tn-ink);
  background: none;
  border: 1px solid rgba(238, 223, 191, 0.28);
  border-radius: var(--tn-r-pill);
  cursor: pointer;
}
.tn-pill:active { translate: 0 2px; }

/* ---------- Kaarsen als stappen ---------- */

.tn-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}
.tn-steps li { display: flex; }
.tn-step {
  flex: 1;
  min-width: 96px;
  min-height: 60px;
  padding: 0 6px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--tn-ink-dim);
  background: none;
  border: 0;
  cursor: pointer;
}
.tn-step:hover:not(:disabled) { filter: brightness(1.15); }
.tn-step:disabled { cursor: default; }
.tn-step:disabled .tn-step-label { opacity: 0.75; }
.tn-steps li[aria-current="step"] .tn-step { font-weight: 600; color: var(--tn-ink); box-shadow: inset 0 -3px 0 var(--tn-amber); cursor: default; }
.tn-step-label { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }

.tn-candle { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 34px; }
.tn-candle-stick { display: block; width: 7px; height: 18px; opacity: 0.7; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #7d6a4b, #e3cfa2 45%, #6b5a3f); }
.tn-candle.is-lit .tn-candle-stick { height: 13px; opacity: 1; }
.tn-candle.is-done .tn-candle-stick { height: 6px; opacity: 0.5; }
.tn-candle-xl { height: 62px; }
.tn-candle-xl .tn-flame { width: 17px; height: 24px; filter: drop-shadow(0 0 9px rgba(240, 170, 60, 0.95)) drop-shadow(0 0 26px rgba(240, 150, 40, 0.6)); }
.tn-candle-xl .tn-candle-stick { width: 10px; height: 30px; }

/* ---------- Vlakken ---------- */

.tn-panel {
  box-sizing: border-box;
  background: var(--tn-panel);
  border: 1px solid rgba(230, 165, 60, 0.28);
  border-radius: var(--tn-r-l);
  box-shadow: var(--tn-sh-panel);
}
.tn-panel-quiet {
  box-sizing: border-box;
  background: var(--tn-quiet);
  border: 1px solid rgba(238, 223, 191, 0.13);
  border-radius: var(--tn-r-l);
}
.tn-well {
  box-sizing: border-box;
  background: var(--tn-well);
  border: 1px solid rgba(241, 227, 196, 0.14);
  border-radius: var(--tn-r-l);
}
.tn-curtain-panel {
  box-sizing: border-box;
  color: var(--tn-ink);
  background: radial-gradient(90% 45% at 50% 108%, rgba(230, 150, 40, 0.34), transparent 70%), var(--tn-curtain-wide);
  border: 1px solid rgba(241, 227, 196, 0.14);
  border-radius: var(--tn-r-l);
  box-shadow: inset 0 14px 24px -14px rgba(0, 0, 0, 0.8);
}
.tn-panel-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--tn-tap); }
.tn-panel-head h2, .tn-side-head h2 { margin: 0; font-size: var(--tn-fs-15); font-weight: 600; color: #d9c6a0; }
.tn-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--tn-ink-faint); }
.tn-side-head h2 { font-size: var(--tn-fs-14); font-weight: 500; color: var(--tn-ink-faint); }

/* ---------- Velden, schakelaars, schuif ---------- */

.tn-input, .text-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font-family: inherit;
  font-size: var(--tn-fs-17);
  font-weight: 500;
  color: var(--tn-ink-strong);
  background: rgba(10, 5, 4, 0.6);
  border: 1px solid rgba(230, 165, 60, 0.5);
  border-radius: var(--tn-r-s);
}
.tn-input-xl { height: 58px; padding: 0 16px; font-size: 22px; }
textarea.tn-input { padding: 8px 12px; line-height: 1.35; resize: none; font-weight: 400; }

.tn-switch-vis, .tn-switch {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 40px;
  height: 22px;
  flex: none;
  margin: 0;
  border-radius: 12px;
  background: #3a2a1b;
  transition: background 0.2s;
}
.tn-switch { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; }
.tn-switch-vis::after, .tn-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a08a64;
  transition: transform 0.2s, background 0.2s;
}
[aria-pressed="true"] > .tn-switch-vis, .tn-switch:checked { background: #b9721a; }
[aria-pressed="true"] > .tn-switch-vis::after, .tn-switch:checked::after { background: #fff3d2; transform: translateX(18px); }

.tn-switch-key, .tn-switch-row {
  box-sizing: border-box;
  min-height: 48px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: none;
  border: 1px solid var(--tn-line);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-switch-key > span:last-child, .tn-switch-row > span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tn-switch-key b, .tn-switch-row b { font-size: 16px; font-weight: 500; }
.tn-switch-key small, .tn-switch-row small { font-size: 13.5px; color: var(--tn-ink-faint); }
.tn-switch-key:disabled { opacity: 0.55; cursor: default; }
.tn-switch-key-ruled { min-height: 52px; margin-top: 2px; padding: 9px 12px 0; border: 0; border-top: 1px dashed rgba(230, 165, 60, 0.3); border-radius: 0; }
.tn-switch-key-ruled b { font-size: var(--tn-fs-15); }

.tn-range {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  height: var(--tn-tap);
  margin: 0;
  background: linear-gradient(90deg, var(--tn-amber) var(--fill, 50%), #3a2a1b var(--fill, 50%)) center / 100% 8px no-repeat;
  border-radius: 4px;
  cursor: pointer;
}
.tn-range::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.tn-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3d2, #d9a044 60%, #8a5a16);
  box-shadow: 0 2px 6px #000;
}
.tn-range::-moz-range-track { height: 8px; background: transparent; }
.tn-range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #d9a044; }

.tn-seg { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--tn-line); border-radius: var(--tn-r-l); }
.tn-seg button {
  min-height: var(--tn-tap);
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tn-ink);
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}
.tn-seg button[aria-pressed="true"] { font-weight: 700; color: var(--tn-cream-ink); background: var(--tn-cream); }

.tn-eq { display: flex; align-items: flex-end; gap: 3px; width: 74px; height: 46px; flex: none; }
.tn-eq i {
  display: block;
  flex: 1;
  height: 8%;
  opacity: 0.35;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #ffd27a, #b9721a);
  transform-origin: 50% 100%;
}
.tn-eq.is-playing i { height: 100%; opacity: 1; animation: tn-level 0.9s ease-in-out infinite; }
.tn-eq.is-playing i:nth-child(3n) { animation-duration: 0.72s; animation-delay: -0.4s; }
.tn-eq.is-playing i:nth-child(3n+1) { animation-duration: 1.18s; animation-delay: -0.9s; }
.tn-eq.is-playing i:nth-child(4n+2) { animation-duration: 1.02s; animation-delay: -0.2s; }
.tn-eq.is-playing i:nth-child(5n) { animation-duration: 0.84s; animation-delay: -0.65s; }
.tn-eq-sm { width: 46px; height: 34px; }

/* ---------- De ovale tafel ---------- */

.tn-ring { position: relative; }
.tn-ring-table {
  position: absolute;
  left: 7.5%;
  right: 7.5%;
  top: 13%;
  bottom: 13%;
  border-radius: 50%;
  border: 1px solid rgba(230, 165, 60, 0.35);
  background: radial-gradient(60% 70% at 50% 45%, rgba(230, 150, 40, 0.24), rgba(40, 22, 10, 0.7) 80%);
}
.tn-ring-dots { position: absolute; inset: 0; }
.tn-ring-count { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tn-ring-count b { font-weight: 700; font-size: 54px; line-height: 0.9; letter-spacing: -0.03em; color: var(--tn-ink-strong); }
.tn-ring-count span { font-size: var(--tn-fs-17); color: var(--tn-ink-soft); }
.tn-seat {
  position: absolute;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tn-ink);
  background: #1b130c;
  border: 1px solid rgba(230, 165, 60, 0.55);
  border-radius: 50%;
}
.tn-seat.is-fresh { color: var(--tn-amber-ink); background: var(--tn-amber); border-color: #ffd88a; box-shadow: 0 0 14px rgba(240, 170, 60, 0.8); }

.tn-ring-names .tn-ring-table {
  left: 26%;
  right: 26%;
  top: 28%;
  bottom: 28%;
  background: radial-gradient(closest-side, rgba(230, 165, 60, 0.20), rgba(230, 165, 60, 0.04));
}
.tn-ring-names .tn-ring-count b { font-size: 38px; line-height: 0.95; }
.tn-ring-names .tn-ring-count span { font-size: 15px; line-height: 1; color: var(--tn-ink-dim); }
.tn-seatname {
  position: absolute;
  max-width: 96px;
  transform: translate(-50%, -50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--tn-ink);
}
.tn-seatname.is-first { font-weight: 700; color: var(--tn-amber); }
.tn-check-table .tn-ring-names.is-dense { height: 104px; max-width: 250px; margin: 4px 0 8px; }
.tn-ring-names.is-dense .tn-ring-table { left: 12%; right: 12%; top: 20%; bottom: 20%; }
.tn-ring-names.is-dense .tn-ring-count span { display: none; }
.tn-ring-names.is-dense .tn-ring-count b { font-size: 28px; }
.tn-ring-names.is-dense .tn-seat { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 11.5px; }
.tn-seatlist {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  counter-reset: seat;
  columns: 3;
  column-gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.38;
}
.tn-seatlist li { counter-increment: seat; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; break-inside: avoid; }
.tn-seatlist li::before { content: counter(seat); display: inline-block; width: 15px; margin-right: 5px; text-align: right; font-weight: 500; color: var(--tn-ink-dim); font-variant-numeric: tabular-nums; }
.tn-seatlist li:first-child { color: var(--tn-amber); font-weight: 700; }

/* ---------- Geluidsstrook: de doekrand bovenin ---------- */

.sound-strip {
  box-sizing: border-box;
  min-height: var(--tn-strip-h);
  padding: 4px 16px 4px;
  gap: 8px;
  background: var(--tn-pelmet);
  border-bottom: 2px solid rgba(230, 165, 60, 0.55);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  z-index: 30;
}
.sound-strip .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--tn-tap);
  padding: 0 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--tn-ink);
  background: rgba(10, 5, 4, 0.45);
  border: 1px solid rgba(238, 223, 191, 0.24);
  border-radius: var(--tn-r-s);
  box-shadow: none;
}
.sound-strip .btn .tn-ico { width: 18px; height: 18px; color: var(--tn-amber); }
.sound-strip .btn[aria-pressed="true"] { border-color: rgba(240, 165, 60, 0.9); }
.sound-strip #btn-sound-auto::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d2c1c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.sound-strip #btn-sound-auto[aria-pressed="true"]::before { background: #fff; box-shadow: 0 0 10px 2px rgb(240, 165, 60); }
.sound-strip .btn-warn { color: var(--tn-ink); border-color: rgba(226, 87, 75, 0.7); }
.sound-strip .btn-warn .tn-ico { color: var(--tn-wolf-soft); }
.sound-vol { color: var(--tn-ink-soft); font-size: 14.5px; }
.sound-vol .tn-range { flex: 1; }
.sound-now { color: var(--tn-ink-soft); font-size: 14px; }

/* ---------- Schermen: pasvorm ---------- */

.tn-screen { box-sizing: border-box; padding: 0; background: var(--tn-bg); }
.tn-screen[hidden] { display: none !important; }

html[data-layout="wide"]:not([data-route="night"]) #app {
  height: 100vh;
  height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  min-height: 0;
  overflow: hidden;
}
html[data-layout="wide"] #app > .tn-screen { flex: 1 1 0; min-height: 0; overflow: hidden; }

/* ---------- Start ---------- */

.tn-home {
  display: grid;
  grid-template-columns: clamp(28px, 12.7vw, 190px) minmax(0, 1fr) clamp(28px, 12.7vw, 190px);
  background: radial-gradient(120% 70% at 50% 108%, rgba(214, 134, 38, 0.34), rgba(150, 70, 20, 0.12) 42%, transparent 70%), radial-gradient(60% 40% at 50% 0%, rgba(0, 0, 0, 0.6), transparent 70%), #0c0806;
}
.tn-drape { position: relative; z-index: 2; background: var(--tn-curtain); }
.tn-drape-left { box-shadow: 22px 0 60px rgba(0, 0, 0, 0.7), inset -1px 0 0 rgba(230, 165, 60, 0.18); }
.tn-drape-right { box-shadow: -22px 0 60px rgba(0, 0, 0, 0.7), inset 1px 0 0 rgba(230, 165, 60, 0.18); }

.tn-home-stage {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px clamp(16px, 5.4vw, 64px) 14px;
}
.tn-home-center {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0; text-align: center; }
.tn-wordmark {
  margin: 0;
  font-weight: 700;
  font-size: clamp(52px, 9.83vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--tn-ink-strong);
  text-shadow: 0 0 60px rgba(240, 160, 50, 0.28);
}
.tn-wordmark-r { color: var(--tn-amber); }
.tn-tagline { margin: 0; display: flex; align-items: center; gap: 14px; font-size: 16px; color: var(--tn-ink-dim); }
.tn-tagline::before, .tn-tagline::after { content: ""; display: block; flex: none; width: 44px; height: 1px; background: rgba(230, 165, 60, 0.5); }
.tn-lead { margin: 0; font-size: 20px; line-height: 1.35; color: var(--tn-ink-soft); }
.tn-home .notice { margin: 8px 0 0; max-width: 620px; text-align: left; }

.tn-home-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
  align-items: start;
  gap: 14px;
  margin-top: 22px;
  text-align: left;
}
.tn-home-actions[data-game="yes"] { grid-template-columns: 290px minmax(0, 1fr); }
.tn-resume { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.tn-resume-main {
  box-sizing: border-box;
  width: 100%;
  min-height: 118px;
  padding: 14px 18px 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: var(--tn-ink);
  background: var(--tn-panel);
  border: 1px solid rgba(230, 165, 60, 0.45);
  border-radius: var(--tn-r-s);
  box-shadow: var(--tn-sh-panel);
  cursor: pointer;
}
.tn-resume-main:hover { filter: brightness(1.12); }
.tn-resume-main:active { translate: 0 2px; }
.tn-resume-main > .tn-ico { width: 30px; height: 30px; color: var(--tn-amber); stroke-width: 1.8; }
.tn-resume-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tn-resume-kicker { font-size: 15px; color: var(--tn-ink-dim); }
.tn-resume-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.tn-resume-line b { font-weight: 700; font-size: 32px; letter-spacing: -0.02em; line-height: 1; color: var(--tn-ink-strong); white-space: nowrap; }
.tn-resume-line span { font-size: var(--tn-fs-15); white-space: nowrap; }
.tn-resume-camps { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 16px; font-size: 15px; color: var(--tn-ink-dim); }
.tn-campcount { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tn-campcount .tn-ico { width: 18px; height: 18px; color: var(--camp, currentColor); }
.tn-campcount b { font-weight: 600; font-size: 19px; line-height: 1; color: var(--tn-ink); }

.tn-soundtest {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px 14px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}
.tn-soundtest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.tn-soundtest-kicker { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--tn-ink-dim); }
.tn-soundtest-kicker .tn-ico { width: 18px; height: 18px; }
.tn-soundtest-text b { font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; color: var(--tn-ink-strong); }
.tn-soundtest-status { font-size: var(--tn-fs-15); line-height: 1.3; color: var(--tn-ink-dim); }
.tn-soundtest-status.is-strong, .tn-dim.is-strong { color: var(--tn-ink); }
.tn-soundtest-ask { display: flex; gap: 8px; flex: none; }
.tn-soundtest-ask .tn-cta, .tn-soundtest-ask .tn-btn { min-height: 56px; padding: 0 18px; font-size: var(--tn-fs-17); }
.tn-soundtest-keys { display: flex; flex-direction: column; align-items: stretch; gap: 0; flex: none; }
.tn-soundtest-keys .tn-key { min-height: 60px; min-width: 190px; }
.tn-soundtest-keys .tn-link { justify-content: center; }
.home-footer { margin: 0; padding: 0; font-size: 14px; color: var(--tn-ink-faint); text-align: center; }

/* ---------- Voorbereiding: kop met kaarsen ---------- */

.tn-setup-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--tn-rule);
}
.tn-setup-title { display: flex; flex-direction: column; gap: 5px; padding-bottom: 9px; min-width: 0; }
.tn-setup-head-wide { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(0, 200px); }
.tn-setup-head-wide .tn-steps { justify-self: center; width: min(100%, 480px); }
.tn-setup-head-wide .tn-step { min-height: 66px; font-size: 16px; }
.tn-setup-head-wide .tn-candle { height: 36px; }
.tn-back { justify-self: start; margin-bottom: 6px; font-size: 16px; color: var(--tn-ink-dim); }
.tn-back > .tn-ico { width: 22px; height: 22px; }
.tn-setup-kicker { justify-self: end; padding-bottom: 16px; font-size: 15px; color: var(--tn-ink-dim); }

/* ---------- Voorbereiding 1: spelers ---------- */

.tn-players {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px clamp(16px, 2.5vw, 30px) 18px;
  background: radial-gradient(120% 70% at 50% 108%, rgba(214, 134, 38, 0.26), rgba(150, 70, 20, 0.09) 42%, transparent 70%), radial-gradient(60% 40% at 50% 0%, rgba(0, 0, 0, 0.6), transparent 70%), #0c0806;
}
.tn-players-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.tn-players-entry { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.tn-players-entry .tn-h1 { font-weight: 700; font-size: var(--tn-fs-28); line-height: 1.1; }
.tn-field { display: flex; flex-direction: column; gap: 6px; }
.tn-field label, .tn-paste label { font-size: 15px; color: var(--tn-ink-dim); }
.name-entry { display: flex; gap: 8px; margin: 0; }
.name-entry .tn-input { flex: 1; min-width: 0; }
.name-entry .tn-btn { flex: none; min-height: 58px; padding: 0 18px; font-size: var(--tn-fs-17); }
.tn-msg-row { min-height: var(--tn-tap); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tn-msg { font-size: 15px; line-height: 1.3; color: var(--tn-ink-dim); }
.tn-msg[data-kind="said"] { color: var(--tn-ink); }
.tn-msg[data-kind="warn"] { color: var(--tn-amber); }

.tn-players .tn-ring { width: 100%; max-width: 420px; align-self: center; height: 190px; flex: 1 1 150px; min-height: 130px; max-height: 210px; }
.tn-paste { height: 196px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.tn-paste textarea { flex: 1; min-height: 0; border-color: rgba(230, 165, 60, 0.4); }
.tn-paste-actions { display: flex; gap: 8px; }
.tn-paste-actions .tn-cta { flex: 1; min-height: 46px; font-size: 16px; }
.tn-paste-actions .tn-btn { min-height: 46px; padding: 0 16px; }

.tn-players-tools { display: flex; flex-direction: column; gap: 8px; }
.tn-players-tools > .tn-btn { width: 100%; }
.tn-tools-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tn-fill { min-height: 48px; display: flex; align-items: center; gap: 6px; }
.tn-fill-label { flex: 1; min-width: 0; font-size: 15px; line-height: 1.2; color: var(--tn-ink-dim); }
.tn-fill output { min-width: 30px; text-align: center; font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums lining-nums; color: var(--tn-ink-strong); }
.tn-fill .tn-btn { min-height: var(--tn-tap); margin-left: 4px; }
.tn-players-next { margin-top: auto; }
.tn-players-next .tn-cta { width: 100%; }

.tn-players-table { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.tn-table-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; min-height: 30px; }
.tn-empty { margin: 32px 0 0; max-width: 460px; font-size: 21px; line-height: 1.38; color: var(--tn-ink-soft); }
.names-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 54px;
  column-gap: 30px;
}
.name-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(230, 165, 60, 0.18);
  border-radius: 0;
}
.name-number { flex: none; width: 26px; min-width: 0; font-size: 16px; font-weight: 500; line-height: 1; text-align: right; font-variant-numeric: tabular-nums lining-nums; color: var(--tn-ink-dim); }
.name-text { flex: 1; min-width: 0; padding-left: 6px; font-weight: 600; font-size: 20px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; color: var(--tn-ink); }
.name-item.is-fresh .name-text { color: var(--tn-amber); }
.tn-table-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tn-hint { margin: 0; display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; line-height: 1.35; color: var(--tn-ink-dim); }
.tn-hint .tn-ico { width: 22px; height: 22px; margin-top: 1px; }
.tn-hint strong { font-weight: 700; color: var(--tn-ink); }

html[data-layout="wide"] .tn-players-body { grid-template-columns: 400px minmax(0, 1fr); gap: 34px; }
html[data-layout="wide"] .tn-players-table { padding-left: 30px; border-left: 1px solid var(--tn-rule); }
html[data-layout="wide"] .names-list {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  grid-auto-flow: column;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 9), minmax(46px, 58px));
  grid-auto-rows: auto;
}

/* ---------- Voorbereiding 2 en 3: toneel links, zijwand rechts ---------- */

.tn-split { display: grid; grid-template-columns: minmax(0, 1fr); }
.tn-split-main {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  background: var(--tn-footlight);
}
.tn-split-side {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--tn-side);
  border-top: 1px solid var(--tn-rule);
}
html[data-layout="wide"] .tn-split { grid-template-columns: minmax(0, 1fr) 300px; }
html[data-layout="wide"] .tn-check { grid-template-columns: minmax(0, 1fr) clamp(390px, 37.3vw, 460px); }
html[data-layout="wide"] .tn-split-main { padding: 12px 20px 14px 24px; overflow: hidden; }
html[data-layout="wide"] .tn-split-side { border-top: 0; border-left: 1px solid var(--tn-rule); box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45); z-index: 6; }

/* Kaarttegels */

.tn-card-groups { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.tn-cardgroup { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.tn-cardgroup-head { display: flex; align-items: center; gap: 8px; height: 18px; }
.tn-cardgroup-swatch { display: block; flex: none; width: 9px; height: 13px; border-radius: 2px; background: var(--camp); }
.tn-cardgroup-head h2 { margin: 0; font-size: var(--tn-fs-14); font-weight: 600; line-height: 1; color: var(--camp); }
.tn-cardgroup-sub { font-size: 13.5px; line-height: 1; color: var(--tn-ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-cardgroup-rule { display: block; flex: 1; min-width: 8px; height: 1px; background: rgba(var(--camp-rgb), 0.28); }
.tn-cardgroup-tally { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1; color: var(--camp); white-space: nowrap; }
.tn-cardgroup-tally.is-empty { color: var(--tn-ink-faint); }

.tn-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  grid-auto-rows: 78px;
  gap: 7px 8px;
}
html[data-layout="wide"] .tn-cardgrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  /* 7 rijen tegels passen in het scherm: strook, kop, vier groepskoppen en de tussenruimtes eraf. */
  grid-auto-rows: clamp(60px, calc((100dvh - var(--tn-strip-h) - 250px) / var(--card-rows, 7)), 104px);
}

.tn-card {
  position: relative;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--camp-soft);
  background: #140d09;
  border: 1px dashed rgba(var(--camp-rgb), 0.5);
  border-radius: var(--tn-r-m);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.14s, box-shadow 0.14s;
}
button.tn-card:active { translate: 0 2px; }
.tn-card-step { cursor: default; }
.tn-card-art {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 2px, rgba(255, 255, 255, 0) 2px 9px), linear-gradient(160deg, var(--camp-a), var(--camp-b));
}
.tn-card-motif { position: absolute; top: 4px; right: 6px; width: 46px; height: 46px; color: rgba(255, 246, 226, 0.6); stroke-width: 1.1; }
.tn-card-step .tn-card-motif { display: none; }
.tn-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.tn-card-img.is-loaded { opacity: 1; }
/* Het plaatje is de ster: geen kleurwas over de tegel, alleen onderaan een korte warme schaduw achter de naam. */
.tn-card-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 9, 6, 0) 46%, rgba(14, 9, 6, 0.72) 72%, rgba(14, 9, 6, 0.94) 100%); }
.tn-card:has(.char-needs) .tn-card-scrim { background: linear-gradient(180deg, rgba(14, 9, 6, 0) 30%, rgba(14, 9, 6, 0.72) 58%, rgba(14, 9, 6, 0.94) 100%); }
/* Niet in het spel: plaatje sterk gedimd en ontkleurd, stippelrand. */
.tn-card:not(.is-on) .tn-card-art, .tn-card:not(.is-on) .tn-card-img { filter: grayscale(0.85) brightness(0.4); }
.tn-card:not(.is-on) .tn-card-scrim { background: linear-gradient(180deg, rgba(14, 9, 6, 0.25) 0%, rgba(14, 9, 6, 0.8) 60%, rgba(14, 9, 6, 0.95) 100%); }
.tn-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--camp); opacity: 0; }
.tn-card.is-on::after { opacity: 1; }
.tn-card-check {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 16px;
  height: 16px;
  display: none;
  place-items: center;
  color: rgb(var(--camp-deep));
  background: #fff6e2;
  border-radius: 50%;
}
.tn-card-check .tn-ico { width: 12px; height: 12px; stroke-width: 3; }
.tn-card-label { position: absolute; left: 8px; right: 8px; bottom: 7px; display: flex; flex-direction: column; gap: 3px; }
.tn-card .char-name { flex: none; font-weight: 600; font-size: 14px; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.7); }
.tn-card .char-needs { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; line-height: 1.1; white-space: nowrap; color: var(--camp-soft); }
.tn-card .char-needs .tn-ico { width: 13px; height: 13px; stroke-width: 1.9; }

.tn-card.is-on {
  color: #fff6e2;
  background: rgb(var(--camp-deep));
  border: 1px solid var(--camp-line);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.9), 0 0 18px -4px rgba(var(--camp-rgb), 0.7);
}
.tn-card.is-on .tn-card-check { display: grid; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
.tn-card.is-on .char-needs { color: #fff6e2; }
button.tn-card.is-on:nth-child(7n+1) { transform: rotate(-0.7deg); }
button.tn-card.is-on:nth-child(7n+2) { transform: rotate(0.5deg); }
button.tn-card.is-on:nth-child(7n+3) { transform: rotate(-0.4deg); }
button.tn-card.is-on:nth-child(7n+4) { transform: rotate(0.8deg); }
button.tn-card.is-on:nth-child(7n+5) { transform: rotate(-0.6deg); }
button.tn-card.is-on:nth-child(7n+6) { transform: rotate(0.4deg); }
button.tn-card.is-on:nth-child(7n) { transform: rotate(-0.5deg); }
.tn-card.is-shown { box-shadow: 0 0 0 2px var(--tn-bg), 0 0 0 4px var(--tn-amber); }
.tn-card.is-on.is-shown { box-shadow: 0 0 0 2px var(--tn-bg), 0 0 0 4px var(--tn-amber), 0 8px 18px -8px rgba(0, 0, 0, 0.9); }

.tn-card-stepper {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 3px 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
/* De tellertegels hebben alleen achter hun knoppen en het getal een donker vlakje. */
.tn-card-stepper .tn-round { width: 44px; height: 44px; color: #fff6e2; background: rgba(14, 9, 6, 0.72); border-color: rgba(var(--camp-rgb), 0.6); font-size: inherit; }
.tn-card.is-on .tn-card-stepper .tn-round { border-color: rgba(255, 246, 226, 0.7); }
.tn-card-stepper .stepper-count { min-width: 40px; padding: 4px 6px; text-align: center; font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; color: #fff6e2; background: rgba(14, 9, 6, 0.72); border-radius: 18px; }
.tn-card-step > .char-name { position: absolute; left: 6px; right: 6px; bottom: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Zijwand van de kaarten */

.tn-tally { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.tn-tally[data-state="off"] { border: 1px dashed var(--tn-amber); }
.tn-tally-top { display: flex; align-items: center; gap: 12px; }
.tn-tally-num { font-weight: 700; font-size: 54px; line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums lining-nums; color: var(--tn-ink-strong); }
.tn-tally-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-tally-word { font-size: 16px; font-weight: 600; line-height: 1.15; }
.tn-tally-words .tn-dim { font-size: 14.5px; line-height: 1.2; }
.tn-tally-verdict { display: flex; align-items: flex-start; gap: 9px; padding-top: 9px; border-top: 1px dashed rgba(230, 165, 60, 0.3); font-size: 14.5px; line-height: 1.28; color: var(--tn-ink-dim); }
.tn-tally-verdict > span:first-child { display: flex; color: var(--tn-amber); }
.tn-tally-verdict .tn-ico { stroke-width: 1.8; }
.tn-tally-verdict strong { font-weight: 600; color: var(--tn-ink-strong); }
.tn-tally[data-state="ok"] .tn-tally-verdict strong { color: var(--tn-amber); }

.tn-balance { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 0; }
.tn-balance .tn-side-head h2 { font-size: 14px; }
.tn-balance .tn-side-head span { font-size: 13px; }
.tn-balance-bar { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: #3a2a1b; }
.tn-balance-bar span { display: block; flex: 0 1 0; background: var(--camp); transition: flex-grow 0.25s; }
.tn-balance-camps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.tn-balance-camps > span { display: flex; align-items: baseline; gap: 7px; font-size: 14px; color: var(--tn-ink-dim); }
.tn-dot { display: block; align-self: center; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--camp); box-shadow: 0 0 8px rgba(var(--camp-rgb), 0.6); }
.tn-balance-camps b { min-width: 13px; font-weight: 700; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums lining-nums; color: var(--camp); }
.tn-balance > .tn-dim { font-size: 14px; line-height: 1.28; }

.tn-presets { display: flex; flex-direction: column; gap: 7px; }
.tn-side-head-tall { align-items: center; min-height: var(--tn-tap); margin: -6px 0 -8px; }
.tn-side-head-tall h2 { font-size: 14px; }
.tn-presets .tn-link { font-size: 14px; padding: 0 4px 0 10px; }
.tn-presets .tn-link .tn-ico { width: 16px; height: 16px; }

.tn-cardinfo { flex: 1 1 auto; min-height: 96px; overflow-y: auto; padding: 11px 14px; display: flex; flex-direction: column; gap: 5px; }
.tn-cardinfo h2 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.15; letter-spacing: -0.01em; color: var(--camp, var(--tn-ink-strong)); }
.tn-cardinfo-meta { font-size: 13px; line-height: 1.25; color: var(--tn-ink-faint); }
.tn-cardinfo p { margin: 2px 0 0; font-size: 14.5px; line-height: 1.32; color: #e3d1ab; }
.tn-cardinfo h2 + p { color: var(--tn-ink-dim); }
.tn-cardinfo p.tn-cardinfo-note { display: flex; align-items: flex-start; gap: 7px; font-size: 13.5px; line-height: 1.28; color: var(--tn-amber); }
.tn-cardinfo-note .tn-ico { width: 17px; height: 17px; margin-top: 1px; stroke-width: 1.7; }

.tn-side-nav { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: stretch; }
.tn-side-nav .tn-btn { min-height: 64px; padding: 0 12px 0 8px; gap: 5px; font-size: 15.5px; white-space: nowrap; }
html[data-layout="narrow"] .tn-cards .tn-side-nav {
  position: sticky;
  bottom: 0;
  z-index: 7;
  margin: 0 -14px -14px;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(18, 12, 7, 0), #120c07 26%);
}

/* Controle */

.tn-check-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
html[data-layout="wide"] .tn-check-top { grid-template-columns: minmax(280px, 322px) minmax(0, 1fr); }
.tn-check-table, .tn-check-cards { min-width: 0; padding: 6px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.tn-check-table .tn-ring { width: 100%; max-width: 340px; height: 210px; align-self: center; }
.tn-check-table .tn-dim { font-size: 14.5px; }
.tn-check-camps { display: flex; flex-direction: column; }
.tn-check-camp { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid rgba(238, 223, 191, 0.11); }
.tn-check-camp > .tn-ico { margin-top: 3px; color: var(--camp); }
.tn-check-camp > b { font-weight: 700; font-size: 24px; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; color: var(--camp); }
.tn-check-camp > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tn-check-camp-label { font-size: 14px; line-height: 1.2; color: var(--camp-soft); }
.tn-check-camp-names { font-size: 15px; font-weight: 500; line-height: 1.28; color: var(--tn-ink); text-wrap: pretty; }

.tn-checks { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.tn-checks .tn-side-head h2 { font-size: var(--tn-fs-15); font-weight: 600; color: #d9c6a0; }
.tn-checks .tn-side-head span { font-size: 14.5px; }
.tn-check-list { min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; align-content: start; grid-auto-rows: min-content; }
.tn-check-item {
  box-sizing: border-box;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  border: 1px solid rgba(238, 223, 191, 0.13);
  border-radius: var(--tn-r-s);
}
.tn-check-dot { box-sizing: border-box; width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #d9c6a0; }
.tn-check-dot .tn-ico { width: 17px; height: 17px; stroke-width: 2; }
.tn-check-item[data-kind="ok"] { background: var(--tn-quiet); }
.tn-check-item[data-kind="ok"] .tn-check-dot { color: var(--tn-amber-ink); background: var(--tn-amber); }
.tn-check-item[data-kind="warn"] { background: rgba(230, 165, 60, 0.09); border: 1px dashed var(--tn-amber); }
.tn-check-item[data-kind="warn"] .tn-check-dot { color: var(--tn-amber); border: 2px dashed var(--tn-amber); }
.tn-check-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.tn-check-text b { font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--tn-ink); }
.tn-check-text > span { font-size: 14px; line-height: 1.28; color: var(--tn-ink-dim); }
.tn-check-text .tn-pill { margin-top: 6px; }
.tn-check-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.tn-check-foot .tn-btn { padding: 0 18px 0 12px; font-size: 16.5px; }
.tn-check-foot .tn-dim { font-size: 14.5px; }

.tn-check .tn-split-side { gap: 11px; }
.tn-check .tn-split-side > .tn-side-head { margin-bottom: -5px; }
.tn-tonight { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.tn-tonight-sound { display: flex; flex-direction: column; gap: 8px; }
.tn-setting { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.tn-setting-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tn-setting-text b { font-size: 16px; font-weight: 500; }
.tn-setting-text small { font-size: 13.5px; color: var(--tn-ink-faint); }
.tn-setting .tn-round { border-color: rgba(238, 223, 191, 0.26); color: var(--tn-ink); }
.tn-setting output { width: 84px; text-align: center; font-weight: 700; font-size: 27px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; color: var(--tn-ink-strong); }
.tn-volume { display: flex; align-items: center; gap: 10px; }
.tn-volume > span { display: flex; margin: 0 2px 0 12px; color: #d9c6a0; }
.tn-volume > span .tn-ico { width: 22px; height: 22px; }
.tn-volume .tn-range { flex: 1; }
.tn-volume output { width: 34px; text-align: right; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--tn-ink-strong); }
.tn-tonight-test { display: flex; align-items: center; gap: 12px; }
.tn-tonight-test .tn-key { flex: none; min-height: 52px; padding: 0 30px 0 12px; gap: 9px; font-size: 16px; color: var(--tn-ink); }
.tn-tonight-test .tn-dim { flex: 1; min-width: 0; font-size: 14px; }

.tn-ritual { flex: 1 1 auto; min-height: 0; padding: 16px 18px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.tn-ritual > div { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.tn-ritual h2 { margin: 0; font-weight: 600; font-size: 26px; line-height: 1.05; letter-spacing: -0.02em; }
.tn-ritual ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tn-ritual li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; align-items: baseline; font-size: 17px; font-weight: 500; line-height: 1.3; text-wrap: pretty; }
.tn-ritual li > span:first-child { font-weight: 700; color: var(--tn-amber); }

/* ---------- Slot ---------- */

.tn-end { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-layout="wide"] .tn-end { grid-template-columns: clamp(330px, 33vw, 420px) minmax(0, 1fr); }
.tn-end-side {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  min-height: 0;
  padding: 26px 24px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(110% 40% at 50% 104%, rgba(var(--camp-rgb, 230, 160, 50), 0.42), transparent 72%), var(--tn-curtain-wide);
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.7);
}
.tn-end[data-camp="dorp"] .tn-end-side { --camp-rgb: 230, 160, 50; }
.tn-end[data-camp="eenling"] .tn-end-side { --camp-rgb: 226, 214, 186; }
.tn-end[data-camp="geen"] .tn-end-side { --camp-rgb: 120, 100, 80; }
.tn-end-kicker { font-size: 16px; color: var(--tn-ink-soft); }
.tn-end-emblem { width: 68px; height: 68px; flex: none; margin-top: 4px; display: grid; place-items: center; border: 1px solid rgba(241, 227, 196, 0.45); border-radius: 50%; background: rgba(10, 5, 4, 0.4); }
.tn-end-emblem .tn-ico { width: 36px; height: 36px; stroke-width: 1.4; }
#win-title { margin: 0; font-weight: 700; font-size: clamp(34px, 4.2vw, 50px); line-height: 1; letter-spacing: -0.035em; color: var(--tn-ink-strong); text-wrap: balance; overflow-wrap: break-word; }
.tn-end[data-winner="sektarier"] #win-title, .tn-end[data-winner="witte-weerwolf"] #win-title { font-size: 34px; }
#win-text { margin: 0; font-size: 19px; line-height: 1.38; color: var(--tn-ink); text-wrap: pretty; }
.tn-end-facts { margin: 4px 0 0; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(241, 227, 196, 0.22); }
.tn-end-facts div { display: flex; flex-direction: column; gap: 1px; }
.tn-end-facts dt { font-size: 14.5px; color: var(--tn-ink-soft); }
.tn-end-facts dd { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tn-end-actions { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.tn-end-actions .tn-cta-lg { min-height: 76px; padding: 0 18px 0 22px; }
.tn-end-actions .tn-cta-lg b { font-size: 26px; }
.tn-end-actions .tn-cta-sub { font-size: 16px; }
.tn-end-actions .tn-link { align-self: flex-start; color: var(--tn-ink); font-size: 15.5px; }

.tn-end-main {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 20px clamp(14px, 2.2vw, 26px) 16px clamp(14px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: radial-gradient(120% 60% at 50% 110%, rgba(214, 134, 38, 0.2), rgba(150, 70, 20, 0.07) 45%, transparent 72%), #0c0806;
}
.tn-end-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.tn-end-title { display: flex; align-items: baseline; gap: 12px; }
.tn-end-title .tn-h1 { font-weight: 700; font-size: 28px; letter-spacing: -0.025em; }
.tn-end-groups { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.tn-end-group { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid var(--tn-rule); }
.tn-end-group-head { display: flex; flex-direction: column; padding-top: 7px; line-height: 1.2; }
.tn-end-group-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--tn-ink); }
.tn-end-group.is-won .tn-end-group-head h3 { color: var(--tn-amber); }
.tn-end-group-head span { font-size: 14px; color: var(--tn-ink-dim); }
.tn-end-rows { display: flex; flex-direction: column; min-width: 0; }
.tn-end-row {
  display: grid;
  grid-template-columns: 14px minmax(84px, 0.9fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
html[data-layout="wide"] .tn-end-row { min-height: clamp(30px, calc((100dvh - var(--tn-strip-h) - 250px) / var(--rows, 12)), 42px); }
.tn-end-lamp { display: block; box-sizing: border-box; width: 10px; height: 10px; justify-self: center; border-radius: 50%; background: var(--camp); box-shadow: 0 0 8px rgba(var(--camp-rgb), 0.7); }
[data-camp="onbekend"] > .tn-end-lamp { background: transparent; border: 2px solid var(--tn-ink-dim); box-shadow: none; }
.tn-end-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tn-end-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 19px; line-height: 1.2; color: var(--tn-ink-strong); }
.tn-end-row.is-dead .tn-end-name b { color: var(--tn-ink-soft); }
.tn-end[data-solo="yes"] .tn-end-row.is-winner .tn-end-name b { color: var(--tn-amber); }
.tn-end-name .tn-ico { width: 17px; height: 17px; color: var(--tn-amber); }
.tn-end-role, .tn-end-fate { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tn-end-role { font-size: 15.5px; color: var(--tn-ink); }
.tn-end-role .tn-ico { width: 19px; height: 19px; }
.tn-end-role > span, .tn-end-fate > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-end-row[data-camp="weerwolf"] .tn-end-role { font-weight: 700; color: var(--tn-wolf); }
.tn-end-role.is-unknown { color: var(--tn-ink-dim); }
.tn-end-fate { font-size: 14.5px; color: var(--tn-ink-dim); }
.tn-end-fate .tn-ico { width: 18px; height: 18px; }
.tn-end-row.is-alive .tn-end-fate { font-weight: 700; color: var(--tn-ink); }
.tn-end-legend { margin-top: auto; padding-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; border-top: 1px solid var(--tn-rule); font-size: 14.5px; color: var(--tn-ink-dim); }
.tn-end-key { display: inline-flex; align-items: center; gap: 7px; }
.tn-end-key .tn-ico { width: 17px; height: 17px; color: var(--tn-amber); }
.tn-end-key b { font-weight: 600; color: var(--tn-amber); }

html[data-layout="narrow"] .tn-end-side { box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7); }
html[data-layout="narrow"] .tn-end-actions { margin-top: 8px; }

/* ---------- Smal: telefoon ---------- */

@media (max-width: 620px) {
  .tn-tagline::before, .tn-tagline::after { display: none; }
  .tn-tagline { font-size: 15px; text-align: center; }
  .tn-lead { font-size: 18px; }
  .tn-home-actions, .tn-home-actions[data-game="yes"] { grid-template-columns: minmax(0, 1fr); }
  .tn-soundtest { flex-wrap: wrap; }
  .tn-soundtest .tn-eq { display: none; }
  .tn-soundtest-keys, .tn-soundtest-ask { flex: 1 1 100%; }
  .tn-setup-head { flex-direction: column-reverse; align-items: stretch; gap: 6px; border-bottom: 0; }
  .tn-setup-head .tn-steps { border-bottom: 1px solid var(--tn-rule); }
  .tn-setup-head-wide { display: flex; flex-direction: column; align-items: stretch; }
  .tn-setup-head-wide .tn-steps { width: 100%; order: 2; }
  .tn-setup-kicker { display: none; }
  .tn-back { margin-bottom: 0; }
  .tn-step { min-width: 0; }
  .name-entry .tn-btn span { display: none; }
  .names-list { grid-template-columns: minmax(0, 1fr); }
  .tn-end-group { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tn-end-group-head { flex-direction: row; align-items: baseline; gap: 10px; padding: 6px 0 2px; }
  .tn-end-row { grid-template-columns: 14px minmax(0, 1fr) minmax(0, 1fr); min-height: 52px; row-gap: 0; }
  .tn-end-fate { grid-column: 2 / -1; padding-bottom: 6px; }
  .tn-cta-hero b { font-size: 32px; }
  .tn-tonight-test { flex-wrap: wrap; }
}

/* =====================================================================
   Gedeelde onderdelen met hun bestaande klassen: knoppen, keuzes, vensters,
   meldingen. Het spelscherm (styles.css) gebruikt deze en kleurt zo mee.
   ===================================================================== */

.btn {
  color: var(--tn-ink);
  background: rgba(238, 223, 191, 0.06);
  border: 1px solid var(--tn-line);
  border-radius: var(--tn-r-s);
  font-weight: 500;
}
.btn:disabled { opacity: 0.4; }
.btn-primary { color: var(--tn-amber-ink); font-weight: 700; background: var(--tn-amber); border-color: var(--tn-amber); box-shadow: var(--tn-sh-cta); }
.btn-ghost { background: transparent; }
.btn-warn { color: var(--tn-wolf-soft); background: rgba(226, 87, 75, 0.08); border-color: rgba(226, 87, 75, 0.6); }
.btn-small { min-height: var(--tn-tap); padding: 6px 14px; font-size: 14.5px; }
.btn-icon { width: var(--tn-tap); height: var(--tn-tap); border-radius: 50%; color: var(--tn-ink); }
.btn-icon .tn-ico { width: 22px; height: 22px; }
.btn-icon:hover { background: rgba(238, 223, 191, 0.08); }

.chip { color: var(--tn-ink); background: var(--tn-key); border: 1px solid rgba(238, 223, 191, 0.16); border-radius: var(--tn-r-s); font-weight: 500; }
.chip-on { color: var(--tn-amber-ink); font-weight: 700; background: var(--tn-amber); border-color: #ffd88a; box-shadow: 0 0 16px -4px rgba(240, 165, 60, 0.7); }
.choice-on { color: var(--tn-amber-ink); font-weight: 700; background: var(--tn-amber); border-color: #ffd88a; }

.notice { color: var(--tn-ink); background: var(--tn-quiet); border: 1px solid rgba(238, 223, 191, 0.13); border-radius: var(--tn-r-s); }
.notice-warn { color: var(--tn-ink); background: rgba(230, 165, 60, 0.09); border: 1px dashed var(--tn-amber); }
.panel-note-warn { color: var(--tn-amber); }
.badge { background: rgba(10, 5, 4, 0.5); }
.badge-uncertain { color: var(--tn-amber); border-color: var(--tn-amber); }
.panel-block { background: var(--tn-quiet); border-color: rgba(238, 223, 191, 0.13); border-radius: var(--tn-r-l); }
.step-instruction { background: var(--tn-panel); border-color: rgba(230, 165, 60, 0.28); border-radius: var(--tn-r-l); }
.narration-block summary { background: var(--tn-quiet); border-color: rgba(238, 223, 191, 0.13); }
.narration { color: var(--tn-ink-strong); background: var(--tn-well); border-color: rgba(238, 223, 191, 0.13); font-style: normal; }
.step-name { letter-spacing: -0.02em; color: var(--tn-ink-strong); }
.step-nav { background: var(--tn-bg); border-top-color: var(--tn-rule); }
.field-label { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tn-ink-faint); }
.timer-display { letter-spacing: -0.03em; color: var(--tn-ink-strong); }

/* Vensters */

.modal { background: rgba(6, 3, 2, 0.76); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-content {
  padding: 18px 20px 20px;
  background: var(--tn-panel);
  border: 1px solid rgba(230, 165, 60, 0.32);
  border-radius: var(--tn-r-l);
  box-shadow: var(--tn-sh-pop);
}
.modal-content h3 { font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--tn-ink-strong); }
.modal-head { margin-bottom: 10px; }
.picker-text { color: var(--tn-ink-dim); }
.option, .player-row { color: var(--tn-ink); background: var(--tn-key); border: 1px solid rgba(238, 223, 191, 0.16); border-radius: var(--tn-r-s); }
.option:hover, .player-row:hover { filter: brightness(1.12); }
.option:active, .player-row:active { background: var(--tn-key); translate: 0 2px; }
.option-sub, .player-role { color: var(--tn-ink-dim); }
.option-warn { color: var(--tn-wolf-soft); border-color: rgba(226, 87, 75, 0.6); }
.player-dead { opacity: 0.7; }
.tn-menu .tn-key-block:last-child { margin-bottom: 0; }
.tn-menu .tn-key { font-size: 16.5px; }

/* Melding */

.toast {
  box-sizing: border-box;
  min-height: 54px;
  padding: 5px 5px 5px 16px;
  color: var(--tn-cream-ink);
  background: var(--tn-cream);
  border: 0;
  border-radius: var(--tn-r-s);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.8);
  font-size: 16px;
}
.toast-text { padding: 6px 0; }
.toast-main { font-weight: 600; }
.toast-note { color: #4b3620; }
.toast .btn { flex: none; min-height: var(--tn-tap); padding: 0 14px; font-size: 14.5px; font-weight: 600; color: var(--tn-cream); background: var(--tn-cream-ink); border: 0; border-radius: 5px; }

.loading { color: var(--tn-ink-dim); background: var(--tn-bg); font-size: 15px; }

/* Klein kaartplaatje bij een rol (uitleg van de aangeraakte kaart, rolverdeling aan het slot). */
.tn-thumb { position: relative; flex: none; width: 26px; height: 26px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.tn-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(241, 227, 196, 0.4); }
.tn-thumb:has(img) { outline: 1px solid rgba(241, 227, 196, 0.35); outline-offset: -1px; background: var(--tn-bg); }
.tn-cardinfo-top { display: flex; align-items: center; gap: 10px; }
.tn-cardinfo-top > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tn-cardinfo-top .tn-thumb { width: 52px; height: 52px; border-radius: 6px; }
.tn-cardinfo-top .tn-thumb img { border-radius: 6px; }
.tn-cardinfo-top .tn-thumb .tn-ico { width: 28px; height: 28px; color: var(--camp); }
.tn-end-row.is-dead .tn-thumb img { filter: grayscale(0.6) brightness(0.8); }

/* =====================================================================
   HET SPELSCHERM: rolverdeling, toneel, geluidstafel
   ===================================================================== */

:root {
  --game-list-w: clamp(196px, 18vw, 264px);
  --game-desk-w: clamp(340px, 34vw, 420px);
}

.tn-btn-warn { color: var(--tn-wolf-soft); border-color: rgba(226, 87, 75, 0.6); background: rgba(226, 87, 75, 0.08); }
.tn-btn-warn .tn-ico { color: var(--tn-wolf-soft); }

#view-night.tn-game {
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  background: var(--tn-bg);
  color: var(--tn-ink);
}
#view-night.tn-game[hidden] { display: none !important; }

/* Breed: drie zones naast elkaar, niets scrolt. De geluidsstrook is hier niet nodig. */
html[data-route="night"] #app { height: 100vh; height: calc(100dvh - var(--safe-top) - var(--safe-bottom)); min-height: 0; overflow: hidden; }
html[data-route="night"] #app > .tn-game { flex: 1 1 0; min-height: 0; }
html[data-layout="wide"][data-route="night"] .sound-strip { display: none; }
html[data-layout="wide"] .tn-game {
  display: grid;
  grid-template-columns: var(--game-list-w) minmax(0, 1fr) var(--game-desk-w);
  overflow: hidden;
}
html[data-layout="wide"] .tn-game.no-desk { grid-template-columns: var(--game-list-w) minmax(0, 1fr); }
.tn-game.no-desk .tn-desk, .tn-game.no-desk #btn-desk-open { display: none; }

/* ---------- Links: de rolverdeling op het opzij geschoven doek ---------- */

.tn-cast {
  position: relative;
  z-index: 7;
  box-sizing: border-box;
  min-height: 0;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--tn-ink);
  background: var(--tn-curtain);
  box-shadow: 14px 0 40px rgba(0, 0, 0, 0.6);
}
.tn-cast.is-armed { box-shadow: 14px 0 40px rgba(0, 0, 0, 0.6), inset 0 0 0 2px var(--tn-amber); }
.tn-cast-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tn-cast-head h2 { margin: 0; font-size: clamp(20px, 1.7vw, 24px); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.tn-cast-close { display: none; }
.tn-cast-counts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: var(--tn-tap);
  margin: 0 -4px;
  padding: 2px 4px;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-cast-counts:hover { background: rgba(241, 227, 196, 0.06); }
.tn-cast-count { display: flex; flex-direction: column; gap: 1px; }
.tn-cast-count > span { display: flex; align-items: center; gap: 5px; color: var(--camp); }
.tn-cast-count .tn-ico { width: 16px; height: 16px; }
.tn-cast-count b { font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: #f6ead0; }
.tn-cast-count small { font-size: 12.5px; font-weight: 500; color: var(--tn-ink-soft); }
.tn-cast-uncertain {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tn-amber);
}
.tn-cast-uncertain[hidden] { display: none; }
.tn-cast-uncertain .tn-ico { width: 15px; height: 15px; }
.tn-cast-status {
  box-sizing: border-box;
  min-height: 30px;
  display: flex;
  align-items: center;
  margin: 0 -4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--tn-ink-soft);
}
.tn-cast-status.is-armed { font-weight: 600; color: var(--tn-amber-ink); background: var(--tn-amber); }
.tn-cast-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(44px, 1fr);
  gap: 3px;
  margin: 0 -4px;
  padding: 1px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tn-cast-row {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  max-height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 8px;
  text-align: left;
  color: #f6ead0;
  background: rgba(241, 227, 196, 0.05);
  border: 1px solid rgba(241, 227, 196, 0.11);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-cast-row:hover { filter: brightness(1.12); }
.tn-cast-row:focus-visible { outline-offset: -2px; }
.tn-cast-lamp { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.tn-cast-lamp .tn-dot { width: 11px; height: 11px; box-shadow: 0 0 8px var(--camp); }
.tn-cast-lamp .tn-ico { width: 18px; height: 18px; }
.tn-cast-plus { display: grid; place-items: center; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; border: 1.5px dashed currentColor; }
.tn-cast-plus .tn-ico { width: 12px; height: 12px; stroke-width: 2.4; }
.tn-cast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.tn-cast-name { font-size: clamp(16px, 1.4vw, 18.5px); font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-cast-role { font-size: clamp(12.5px, 1.06vw, 14px); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--camp); }
.tn-cast-row[data-camp="onbekend"] .tn-cast-role { font-weight: 600; color: #f6ead0; }
.tn-cast-marks { display: flex; gap: 3px; flex: none; }
.tn-cast-marks .tn-ico { width: 16px; height: 16px; stroke-width: 1.7; }
.tn-cast-chev { width: 14px; height: 14px; flex: none; stroke-width: 2; color: #c9b190; }
.tn-cast-row.is-awake { background: rgba(230, 165, 60, 0.17); box-shadow: inset 3px 0 0 var(--tn-amber); }
.tn-cast-row.is-dead { color: #b39c85; }
.tn-cast-row.is-dead .tn-cast-name { text-decoration: line-through; }
.tn-cast-row.is-dead .tn-cast-role, .tn-cast-row.is-dead .tn-cast-chev { color: #b39c85; }
.tn-cast-row[aria-pressed="true"] {
  color: var(--tn-cream-ink);
  background: var(--tn-cream);
  border-color: var(--tn-cream);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.8);
}
.tn-cast-row[aria-pressed="true"] .tn-cast-role, .tn-cast-row[aria-pressed="true"] .tn-cast-chev { color: #5a4630; }
.tn-cast-row[aria-pressed="true"] .tn-cast-lamp .tn-dot { box-shadow: none; outline: 1px solid #5a4630; }
/* Een briefje wacht op een tik: wie kan lichter, wie niet kan gedempt. */
.tn-cast.is-armed .tn-cast-chev { visibility: hidden; }
.tn-cast-row[data-pick="off"] { border-color: rgba(230, 165, 60, 0.55); }
.tn-cast-row[data-pick="other"] { border-style: dashed; }
.tn-cast-row[data-pick="other"] .tn-cast-name { font-weight: 500; }
.tn-cast-row[data-pick="no"] { background: transparent; border-color: transparent; cursor: default; }
.tn-cast-row[data-pick="no"] .tn-cast-name { font-weight: 500; color: #b39c85; }
.tn-cast-row[data-pick="on"] { color: var(--tn-amber-ink); background: var(--tn-amber); border-color: #ffd88a; box-shadow: 0 0 18px -6px rgba(240, 165, 60, 0.9); }
.tn-cast-row[data-pick="on"] .tn-cast-role { color: #4a2c08; }
.tn-cast-row[data-pick="on"] .tn-cast-lamp .tn-dot { box-shadow: none; outline: 1px solid #4a2c08; }

/* ---------- Midden: het toneel ---------- */

.tn-stage {
  --st-ink: #f1e3c4;
  --st-soft: #b8a37f;
  --st-faint: #a8936f;
  --st-line: rgba(230, 165, 60, 0.22);
  --st-accent: var(--tn-amber);
  --st-danger: #e2574b;
  --st-danger-ink: #f0a79e;
  --st-chip: rgba(238, 223, 191, 0.06);
  --st-chip-line: rgba(238, 223, 191, 0.2);
  --st-next-bg: var(--tn-amber);
  --st-next-ink: var(--tn-amber-ink);
  --st-next-shadow: var(--tn-sh-cta);
  --st-on-bg: var(--tn-amber);
  --st-on-ink: var(--tn-amber-ink);
  --speech: clamp(26px, 2.75vw, 42px);
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  padding: clamp(14px, 1.7vw, 26px) clamp(16px, 1.9vw, 34px) clamp(12px, 1.4vw, 20px);
  color: var(--st-ink);
  background: var(--tn-footlight);
}
[data-phase="day"] .tn-stage {
  --st-ink: #27180d;
  --st-soft: #5a4630;
  --st-faint: #6a5536;
  --st-line: rgba(70, 40, 15, 0.26);
  --st-accent: #8a4f0c;
  --st-danger: #9a211c;
  --st-danger-ink: #8a1c18;
  --st-chip: rgba(60, 35, 10, 0.06);
  --st-chip-line: rgba(60, 35, 10, 0.3);
  --st-next-bg: #2a190d;
  --st-next-ink: #f3e4c2;
  --st-next-shadow: 0 10px 26px -12px rgba(40, 20, 5, 0.7);
  --st-on-bg: #2a190d;
  --st-on-ink: #f3e4c2;
  background:
    radial-gradient(90% 55% at 78% -8%, rgba(255, 247, 222, 0.95), rgba(255, 236, 190, 0.35) 45%, transparent 75%),
    radial-gradient(120% 60% at 20% 110%, rgba(170, 110, 50, 0.22), transparent 70%),
    #ecdfc1;
}
[data-phase="day"] .tn-stage button:focus-visible { outline-color: #6a3a05; }

.tn-stage-head { display: flex; align-items: center; gap: 12px; min-height: var(--tn-tap); }
.tn-stage .tn-round { flex: none; color: var(--st-ink); border-color: var(--st-chip-line); background: var(--st-chip); }
.tn-stage-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.tn-stage-title h1 { margin: 0; font-size: clamp(30px, 2.8vw, 42px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; color: var(--st-ink); }
.tn-stage-title span { font-size: clamp(13.5px, 1.15vw, 16px); font-weight: 500; white-space: nowrap; color: var(--st-soft); }
.tn-phases { margin-left: auto; display: flex; align-items: baseline; gap: 14px; font-size: clamp(13px, 1.1vw, 15px); white-space: nowrap; }
.tn-phase { padding-bottom: 2px; font-weight: 500; color: var(--st-soft); }
.tn-phase.is-past { color: var(--st-faint); }
.tn-phase.is-now { font-weight: 600; color: var(--st-ink); box-shadow: inset 0 -2px 0 var(--st-accent); }
.tn-drawer-btns { display: none; gap: 8px; margin-left: auto; }
.tn-stage .tn-drawer-btn { color: var(--st-ink); background: var(--st-chip); border-color: var(--st-chip-line); font-weight: 600; }

.tn-track { display: flex; align-items: flex-end; border-bottom: 1px solid var(--st-line); flex: none; }
.tn-track[data-kind="agenda"] { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); align-items: stretch; }
.tn-wick {
  flex: 1;
  min-width: 0;
  min-height: 62px;
  padding: 0 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: clamp(11.5px, 1vw, 13.5px);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--st-soft);
  background: none;
  border: 0;
  cursor: pointer;
}
.tn-wick .tn-candle { height: 36px; }
.tn-wick .tn-candle-stick { opacity: 0.6; }
.tn-wick.is-done { color: var(--st-faint); }
.tn-wick.is-done .tn-candle-stick { height: 5px; opacity: 0.4; }
.tn-wick.is-next { color: var(--st-ink); }
.tn-wick.is-next .tn-candle-stick { opacity: 0.95; }
.tn-wick.is-lit { font-weight: 600; color: var(--st-ink); box-shadow: inset 0 -3px 0 var(--st-accent); cursor: default; }
.tn-wick.is-lit .tn-candle-stick { opacity: 1; }
.tn-wick-label { min-height: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tn-agenda {
  min-width: 0;
  min-height: 62px;
  padding: 4px 4px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  font-size: clamp(12.5px, 1.05vw, 14px);
  font-weight: 500;
  color: var(--st-soft);
  background: none;
  border: 0;
  border-left: 1px solid var(--st-line);
  cursor: pointer;
}
.tn-agenda b { max-width: 100%; font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; color: var(--st-ink); }
.tn-agenda.is-done b { color: var(--st-soft); }
.tn-agenda.is-now { box-shadow: inset 0 -3px 0 var(--st-danger); cursor: default; }

.tn-stage-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 1vw, 14px); padding: 2px; }
.tn-stage-role { flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tn-stage-role .tn-thumb { width: clamp(40px, 3.7vw, 56px); height: clamp(40px, 3.7vw, 56px); color: var(--st-accent); background: var(--st-chip); border: 1px solid var(--st-chip-line); box-sizing: border-box; }
.tn-stage-role .tn-thumb .tn-ico { width: 55%; height: 55%; }
.tn-stage-role h2 { margin: 0; font-size: clamp(30px, 3.1vw, 48px); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; color: var(--st-accent); }
.tn-stage-cast { font-size: clamp(14.5px, 1.25vw, 17px); font-weight: 500; color: var(--st-soft); }
.tn-stage-todo { flex: none; margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: clamp(15.5px, 1.32vw, 19px); line-height: 1.4; color: var(--st-soft); }
.tn-stage-todo .tn-ico { width: 21px; height: 21px; flex: none; margin-top: 2px; }
.tn-stage-todo .step-instruction { margin: 0; padding: 0; background: none; border: 0; font-size: inherit; color: inherit; text-align: left; }
.tn-speech {
  flex: none;
  margin: 4px 0 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: var(--speech);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.022em;
  text-wrap: pretty;
  color: var(--st-ink);
}
.tn-stage.is-tight .tn-speech { font-size: calc(var(--speech) * 0.86); }
.tn-stage.is-tighter .tn-speech { font-size: max(22px, calc(var(--speech) * 0.74)); line-height: 1.26; }
/* Overdag met een voorstel, de klok of de stemming eronder: de tekst mag een maat kleiner. */
.tn-game[data-step="dag-debat"] .tn-stage, .tn-game[data-step="dag-stemming"] .tn-stage { --speech: clamp(22px, 2.1vw, 32px); }

/* ---------- Briefjes ---------- */

.tn-slips {
  flex: 0 1 auto;
  min-height: 0;
  margin: 4px -4px 0;
  padding: 2px 4px 4px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: none;
  border: 0;
}
.tn-slips[hidden] { display: none; }
.tn-slipbox { flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.tn-slip {
  flex: 1 1 200px;
  min-width: 0;
  box-sizing: border-box;
  min-height: clamp(54px, 4.7vw, 66px);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--st-ink);
  background: transparent;
  border: 1px dashed var(--st-chip-line);
  border-radius: var(--tn-r-s);
}
button.tn-slip { cursor: pointer; }
button.tn-slip:active { translate: 0 2px; }
.tn-slip > .tn-ico { width: 22px; height: 22px; flex: none; color: var(--st-soft); }
.tn-slip-text { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.tn-slip-label { font-size: clamp(12.5px, 1.06vw, 14.5px); font-weight: 500; color: var(--st-soft); }
.tn-slip-value { font-size: clamp(15.5px, 1.32vw, 19px); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--st-soft); }
.tn-slip.is-filled { background: var(--st-chip); border-style: solid; }
.tn-slip.is-filled > .tn-ico { color: var(--st-accent); }
.tn-slip.is-filled .tn-slip-value { font-weight: 600; color: var(--st-ink); }
.tn-slip.is-ask { background: var(--st-chip); border: 2px solid var(--st-accent); }
.tn-slip.is-ask > .tn-ico { color: var(--st-accent); }
.tn-slip.is-ask .tn-slip-label { font-size: clamp(15.5px, 1.32vw, 19px); font-weight: 600; color: var(--st-ink); }
.tn-slip.is-ask .tn-slip-value { font-size: clamp(13px, 1.1vw, 15px); font-weight: 600; color: var(--st-accent); }
.tn-slip[data-arm][aria-pressed="true"] { background: var(--st-chip); border: 2px solid var(--st-accent); box-shadow: 0 0 26px -6px var(--st-accent); }
.tn-slip[data-arm][aria-pressed="true"] > .tn-ico { color: var(--st-accent); }
.tn-slip[data-arm][aria-pressed="true"]:not(.is-ask) .tn-slip-label { font-weight: 600; color: var(--st-accent); }
.tn-slip.is-off { opacity: 0.6; }
.tn-slip.is-off .tn-slip-value { color: var(--st-ink); }
.tn-slip-choice { flex: 1 1 100%; border-style: solid; }
.tn-slip-choice.is-filled > .tn-ico { color: var(--st-accent); }
.tn-slip-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tn-opt, .tn-stagebtn {
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(15px, 1.25vw, 17px);
  font-weight: 600;
  color: var(--st-ink);
  background: var(--st-chip);
  border: 1px solid var(--st-chip-line);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-opt { flex: 1 1 auto; justify-content: center; }
.tn-opt .tn-ico, .tn-stagebtn .tn-ico { width: 20px; height: 20px; flex: none; }
.tn-opt:active, .tn-stagebtn:active { translate: 0 2px; }
.tn-opt:disabled, .tn-stagebtn:disabled { opacity: 0.4; cursor: default; translate: none; }
.tn-opt.is-on, .tn-stagebtn.is-on { color: var(--st-on-ink); background: var(--st-on-bg); border-color: var(--st-on-bg); }
.tn-stagebtn.is-primary { color: var(--st-next-ink); background: var(--st-next-bg); border-color: transparent; box-shadow: var(--st-next-shadow); font-weight: 700; }
.tn-stagebtn.is-quiet { background: transparent; font-weight: 500; }
.tn-slips-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tn-slips-actions .is-primary { margin-left: auto; min-height: 52px; padding: 0 18px; }
.tn-slips-title { flex: 1 1 100%; margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; letter-spacing: -0.01em; color: var(--st-ink); }
.tn-slips-title small { font-size: clamp(13px, 1.1vw, 14.5px); font-weight: 500; color: var(--st-soft); }

.tn-note {
  flex: 1 1 100%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: clamp(14px, 1.2vw, 16.5px);
  line-height: 1.35;
  color: var(--st-soft);
  list-style: none;
}
.tn-note > .tn-ico { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.tn-note b { font-weight: 600; color: var(--st-ink); }
.tn-note.is-warn { color: var(--st-ink); font-weight: 500; }
.tn-note.is-warn > .tn-ico { color: var(--st-danger); stroke-width: 2.2; }
.tn-note-big { font-size: clamp(18px, 1.7vw, 24px); font-weight: 600; color: var(--st-ink); }
.tn-note-big > .tn-ico { width: 26px; height: 26px; }
.tn-wake { padding: 7px 10px; border-left: 3px solid var(--st-accent); background: var(--st-chip); border-radius: 0 var(--tn-r-s) var(--tn-r-s) 0; box-sizing: border-box; }
.tn-wake > .tn-ico { color: var(--st-accent); }

.tn-deaths, .tn-spared-list, .tn-reminders, .tn-verdict { flex: 1 1 100%; list-style: none; margin: 0; padding: 0; }
.tn-deaths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.tn-death {
  box-sizing: border-box;
  min-height: 64px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--st-danger-ink);
  background: rgba(154, 33, 28, 0.08);
  border: 1px solid #9a211c;
  border-radius: var(--tn-r-s);
}
[data-phase="night"] .tn-death { color: #f6d9d2; background: rgba(154, 33, 28, 0.22); }
.tn-death > .tn-ico { width: 28px; height: 28px; flex: none; }
.tn-death-text { flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tn-death-text b { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: -0.01em; }
.tn-death-text span { font-size: clamp(13px, 1.1vw, 15px); }
.tn-death-role { font-weight: 600; }
.tn-death.is-done { color: #fbeeda; background: #9a211c; }
.tn-death-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.tn-death-actions .tn-stagebtn { min-height: 44px; font-size: 14.5px; padding: 0 12px; flex: 1 1 auto; justify-content: center; }
.tn-spared-list { display: flex; flex-direction: column; gap: 4px; }
.tn-spared { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: clamp(14px, 1.2vw, 16.5px); color: var(--st-soft); }
.tn-spared > .tn-ico { width: 19px; height: 19px; flex: none; }
.tn-spared > span { flex: 1; min-width: 0; }
.tn-spared b { font-weight: 600; color: var(--st-ink); }
.tn-spared .tn-stagebtn { min-height: 44px; font-size: 14.5px; padding: 0 12px; flex: none; }

.tn-clock { flex: 1 1 100%; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tn-clock-time { font-size: clamp(84px, 9vw, 150px); font-weight: 600; line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--st-ink); }
.tn-clock-time[data-low="true"], .tn-clock-time[data-state="ended"] { color: var(--st-danger); }
.tn-clock-keys { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 260px; }
.tn-clock-keys .tn-stagebtn { min-height: 52px; }

.tn-votes { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.tn-vote { display: flex; align-items: center; gap: 6px; min-height: 46px; border-bottom: 1px solid var(--st-line); }
.tn-vote-add {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-align: left;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 500;
  color: var(--st-soft);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}
.tn-vote-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-vote-add small { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--st-faint); }
.tn-vote-count { min-width: 26px; text-align: right; font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--st-soft); }
.tn-vote.has-votes .tn-vote-add, .tn-vote.has-votes .tn-vote-count { color: var(--st-ink); }
.tn-vote.is-chosen .tn-vote-add, .tn-vote.is-chosen .tn-vote-count { font-weight: 700; color: var(--st-danger); }
.tn-vote.is-tied .tn-vote-count { color: var(--st-danger); }
.tn-vote-sub { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--st-soft); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.tn-vote-sub:disabled { opacity: 0.3; cursor: default; }
.tn-tie { flex: 1 1 100%; box-sizing: border-box; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; border: 2px solid var(--st-danger); border-radius: var(--tn-r-s); background: var(--st-chip); }
.tn-tie > .tn-ico { width: 24px; height: 24px; flex: none; color: var(--st-danger); stroke-width: 2.2; }
.tn-tie-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: clamp(14px, 1.2vw, 16px); color: var(--st-soft); }
.tn-tie-text b { font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; color: var(--st-ink); }
.tn-tie-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-verdict { display: flex; flex-direction: column; gap: 4px; }
.tn-verdict li { display: flex; align-items: flex-start; gap: 8px; font-size: clamp(14px, 1.2vw, 16.5px); line-height: 1.35; color: var(--st-ink); }
.tn-verdict li .tn-ico { width: 19px; height: 19px; flex: none; margin-top: 1px; color: var(--st-danger); }
.tn-verdict li.is-death { font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; color: var(--st-danger-ink); }
.tn-verdict li.is-death .tn-ico { width: 24px; height: 24px; }
.tn-reminders { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px; }
.tn-reminder {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 6px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--st-soft);
  background: var(--st-chip);
  border: 1px solid var(--st-chip-line);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-reminder .tn-ico { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--st-danger); }
.tn-reminder > span { min-width: 0; display: flex; flex-direction: column; }
.tn-reminder b { font-size: 14.5px; font-weight: 600; color: var(--st-ink); }
.tn-reminder.is-done { opacity: 0.6; }
.tn-reminder.is-done b { text-decoration: line-through; }

/* ---------- De toetsen onder het toneel ---------- */

.tn-stage-nav {
  position: static;
  flex: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  background: none;
  border: 0;
}
.tn-stagekey {
  box-sizing: border-box;
  min-height: clamp(68px, 6.2vw, 92px);
  padding: 0 clamp(14px, 1.4vw, 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 600;
  white-space: nowrap;
  color: var(--st-ink);
  background: var(--st-chip);
  border: 1px solid var(--st-chip-line);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-stagekey-icon { width: clamp(58px, 5.2vw, 78px); padding: 0; }
.tn-stagekey .tn-ico { width: 24px; height: 24px; stroke-width: 1.8; }
.tn-stagekey:active, .tn-next:active { translate: 0 2px; }
.tn-stagekey:disabled { opacity: 0.35; cursor: default; translate: none; }
.tn-next {
  box-sizing: border-box;
  min-width: 0;
  min-height: clamp(68px, 6.2vw, 92px);
  padding: 0 clamp(16px, 1.5vw, 24px) 0 clamp(20px, 1.9vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  color: var(--st-next-ink);
  background: var(--st-next-bg);
  border: 0;
  border-radius: var(--tn-r-s);
  box-shadow: var(--st-next-shadow);
  cursor: pointer;
}
.tn-next-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.tn-next-small { display: flex; align-items: center; gap: 7px; font-size: clamp(13px, 1.15vw, 16.5px); font-weight: 600; white-space: nowrap; overflow: hidden; }
.tn-next-cue { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tn-next-cue[hidden] { display: none; }
.tn-next-cue span { overflow: hidden; text-overflow: ellipsis; }
.tn-next-cue .tn-ico { width: 17px; height: 17px; flex: none; stroke-width: 1.8; }
.tn-next b { font-size: clamp(20px, 2.1vw, 32px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-next > .tn-ico { width: clamp(28px, 2.5vw, 38px); height: clamp(28px, 2.5vw, 38px); flex: none; stroke-width: 1.8; }

/* ---------- Rechts: de geluidstafel ---------- */

.tn-desk {
  position: relative;
  z-index: 6;
  min-width: 0;
  min-height: 0;
  display: flex;
  background: var(--tn-side);
  border-left: 1px solid var(--tn-rule);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
}
.tn-desk-board { flex: 1; min-width: 0; min-height: 0; }
#game-board .sb { --sb-desk-border: none; --sb-desk-radius: 0; }

/* ---------- Het spelerpaneel: schuift vanaf de rolverdeling over het toneel ---------- */

.tn-sheet {
  position: fixed;
  top: var(--safe-top);
  bottom: 0;
  left: 0;
  z-index: 105;
  box-sizing: border-box;
  width: min(392px, 100vw);
  padding: 14px 16px calc(14px + var(--safe-bottom)) 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  color: var(--tn-ink);
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 40px, rgba(0, 0, 0, 0.22) 62px, rgba(0, 0, 0, 0) 84px), linear-gradient(180deg, #3a1210, #230b0a 70%, #180807);
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.7);
  animation: tn-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tn-sheet[hidden] { display: none; }
html[data-layout="wide"][data-route="night"] .tn-sheet { left: var(--game-list-w); width: min(clamp(364px, 33vw, 460px), calc(100vw - var(--game-list-w))); }
@keyframes tn-sheet-in { from { transform: translateX(-40px); opacity: 0; } }
#player-edit { display: flex; flex-direction: column; gap: 9px; }
.tn-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tn-sheet-head h3 { margin: 0; font-size: clamp(23px, 2vw, 28px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tn-sheet-label { margin: 2px 0 -4px; font-size: 13px; font-weight: 600; color: var(--tn-ink-soft); }
.tn-sheet-hint { margin: 0; font-size: 14.5px; color: var(--tn-ink-soft); }
.tn-sheet-warn { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--tn-ink); }
.tn-sheet-warn .tn-ico { flex: none; color: var(--tn-amber); stroke-width: 2.2; }
.tn-rolekeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tn-rolekey {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 62px;
  padding: 6px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--tn-amber-ink);
  background: var(--camp);
  border: 0;
  border-radius: var(--tn-r-s);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 0 rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.tn-rolekey:active { translate: 0 2px; }
.tn-rolekey .tn-thumb { width: 28px; height: 28px; }
.tn-rolekey .tn-thumb .tn-ico { width: 20px; height: 20px; stroke-width: 1.7; }
.tn-rolekey .tn-thumb:has(img) { outline-color: rgba(34, 19, 10, 0.5); }
.tn-rolekey > span:not(.tn-thumb) { overflow-wrap: anywhere; }
.tn-rolekey small { position: absolute; top: 6px; right: 7px; font-size: 12px; font-weight: 600; }
.tn-picks { display: grid; gap: 6px; }
.tn-picks-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tn-picks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tn-pick {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--tn-ink);
  background: transparent;
  border: 1px solid rgba(241, 227, 196, 0.3);
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-pick .tn-ico { width: 18px; height: 18px; flex: none; }
.tn-pick > span { min-width: 0; overflow-wrap: anywhere; }
.tn-pick[data-camp] { border-color: var(--camp); }
.tn-pick-role { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
.tn-pick-role small { font-size: 11.5px; color: var(--tn-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tn-pick[aria-pressed="true"] { font-weight: 600; color: var(--tn-amber-ink); background: var(--tn-cream); border-color: var(--tn-cream); }
.tn-pick[data-camp][aria-pressed="true"] { background: var(--camp); border-color: var(--camp); }
.tn-pick[aria-pressed="true"] .tn-dot { background: var(--tn-amber-ink); box-shadow: none; }
.tn-kill {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #fbeeda;
  background: #9a211c;
  border: 1px solid #9a211c;
  border-radius: var(--tn-r-s);
  cursor: pointer;
}
.tn-kill.is-quiet { background: transparent; border-color: rgba(241, 227, 196, 0.35); }
.tn-kill .tn-ico { width: 22px; height: 22px; }
.tn-sheet-name { display: flex; gap: 6px; align-items: stretch; }
.tn-sheet-name .tn-input { flex: 1; min-width: 0; min-height: 48px; margin: 0; }

/* ---------- Vensters en meldingen op het spelscherm ---------- */

.tn-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.tn-totals-alive { font-size: 14.5px; color: var(--tn-ink-soft); }
.player-status { display: grid; place-items: center; }
.player-status .tn-ico { width: 18px; height: 18px; }
.player-markers { display: inline-flex; gap: 4px; }
.player-markers .tn-ico { width: 17px; height: 17px; }
.option-icon { display: grid; place-items: center; }
.option-icon .tn-thumb { width: 30px; height: 30px; }
.option-icon .tn-ico { width: 20px; height: 20px; color: var(--camp, var(--tn-amber)); }
.panel-details summary { display: flex; align-items: center; gap: 8px; }
.tn-slips-modal { --st-ink: var(--tn-ink); --st-soft: var(--tn-ink-dim); --st-accent: var(--tn-amber); --st-chip: rgba(238, 223, 191, 0.06); --st-chip-line: rgba(238, 223, 191, 0.2); --st-on-bg: var(--tn-amber); --st-on-ink: var(--tn-amber-ink); --st-danger: #e2574b; margin: 0; overflow: visible; }
.modal .tn-btn { justify-content: center; }

/* De melding hangt bovenin het toneel, over de kaarsen: daar dekt hij geen briefjes of toetsen af. */
html[data-route="night"] .toast { top: calc(var(--safe-top) + 12px); bottom: auto; }
html[data-layout="narrow"][data-route="night"] .toast { top: calc(var(--safe-top) + var(--tn-strip-h) + 66px); }
html[data-layout="wide"][data-route="night"] .toast {
  left: calc(var(--game-list-w) + clamp(16px, 1.9vw, 34px));
  right: calc(var(--game-desk-w) + clamp(16px, 1.9vw, 34px));
  width: auto;
  max-width: none;
  transform: none;
}
html[data-layout="wide"][data-route="night"] body.sound-open .toast { left: calc(var(--game-list-w) + 22px); }
html[data-layout="wide"][data-route="night"] .no-desk ~ .toast, html[data-layout="wide"][data-route="night"]:has(.tn-game.no-desk) .toast { right: clamp(16px, 1.9vw, 34px); }

/* ---------- Smal (iPad staand, telefoon): de zijkolommen worden laden ---------- */

html[data-layout="narrow"] .tn-game { display: flex; flex-direction: column; }
html[data-layout="narrow"] .tn-stage { flex: 1; --speech: clamp(24px, 3.7vw, 34px); padding: 14px 16px 12px; }
html[data-layout="narrow"] .tn-desk { display: none; }
html[data-layout="narrow"] .tn-drawer-btns { display: flex; }
html[data-layout="narrow"] .tn-phases { display: none; }
html[data-layout="narrow"] .tn-cast {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  width: min(320px, 88vw);
  padding-top: calc(14px + var(--safe-top));
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}
html[data-layout="narrow"] .tn-game.is-cast-open .tn-cast { transform: none; visibility: visible; }
html[data-layout="narrow"] .tn-cast-close { display: grid; }
html[data-layout="narrow"] .tn-cast-list { grid-auto-rows: minmax(48px, 60px); align-content: start; }
.tn-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(6, 3, 2, 0.6); }
.tn-scrim[hidden], html[data-layout="wide"] .tn-scrim { display: none; }
html[data-layout="narrow"] .tn-stage-title { flex-direction: column; align-items: flex-start; gap: 2px; }
html[data-layout="narrow"] .tn-stage-title h1 { font-size: 26px; }
html[data-layout="narrow"] .tn-stage-role h2 { font-size: clamp(28px, 4.4vw, 40px); }
html[data-layout="narrow"] .tn-clock-time { font-size: clamp(72px, 16vw, 130px); }

@media (max-width: 560px) {
  .tn-drawer-btn span { display: none; }
  .tn-drawer-btn { min-width: 48px; justify-content: center; padding: 0 10px; }
  .tn-votes { grid-template-columns: minmax(0, 1fr); }
  .tn-stage-nav #btn-reroll span { display: none; }
  .tn-stagekey { min-height: 60px; }
  .tn-next { min-height: 60px; }
}
/* Te laag om alles vast te zetten (telefoon liggend, klein venster): de pagina scrolt gewoon. */
@media (max-height: 599px) {
  html[data-layout="narrow"][data-route="night"] #app { height: auto; min-height: 100dvh; overflow: visible; }
  html[data-layout="narrow"] .tn-stage { overflow: visible; }
  html[data-layout="narrow"] .tn-slips { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-sheet { animation: none; }
  html[data-layout="narrow"] .tn-cast { transition: none; }
}

/* Een kaart die de verteller ziet: bekend (laat zien) of nog in te vullen (welke kaart zag je). */
.tn-rolecard { flex: 1 1 100%; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--tn-amber-ink); background: var(--camp); border-radius: var(--tn-r-s); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 0 rgba(0, 0, 0, 0.4); }
.tn-rolecard .tn-thumb { width: clamp(52px, 4.6vw, 68px); height: clamp(52px, 4.6vw, 68px); }
.tn-rolecard .tn-thumb .tn-ico { width: 60%; height: 60%; }
.tn-rolecard-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: clamp(14px, 1.2vw, 16px); font-weight: 500; }
.tn-rolecard-text b { font-size: clamp(22px, 2.1vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.tn-rolecard-text small { font-size: clamp(13px, 1.1vw, 15px); font-weight: 600; }
.tn-cardask { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; box-sizing: border-box; border: 2px solid var(--st-accent); border-radius: var(--tn-r-s); background: var(--st-chip); }
.tn-cardask .tn-rolekeys { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.tn-cardask .tn-rolekey { min-height: 58px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.tn-cardask .tn-rolekey small { position: static; margin-left: auto; }

/* De ochtend: eerst hoeveel er niet meer wakker worden, dan (apart, na een stilte) wie het zijn. */
.tn-speech-lead { display: block; }
.tn-speech-reveal { display: block; margin-top: 0.5em; padding: 0.3em 0 0.3em 0.6em; border-left: 4px solid var(--st-danger); font-weight: 700; color: var(--st-danger-ink); }

/* Volgende ging niet door: een briefje is half ingevuld. De toets zegt waarom, het briefje licht op. */
.tn-next.is-blocked { color: #fbeeda; background: #9a211c; box-shadow: 0 10px 26px -12px rgba(154, 33, 28, 0.9); }
.tn-next.is-blocked b { font-size: clamp(17px, 1.6vw, 24px); white-space: normal; }
.tn-next.is-blocked > .tn-ico { display: none; }
.tn-slip.is-wanted, .tn-slipbox.is-wanted > .tn-slip { border: 2px solid var(--st-danger); box-shadow: 0 0 22px -6px var(--st-danger); }
.tn-speech-beat { display: block; margin-top: 0.55em; padding-top: 0.5em; border-top: 1px solid var(--st-line); }
.tn-speech-next { display: block; margin-top: 0.6em; font-size: clamp(15px, 1.3vw, 18px); font-weight: 500; letter-spacing: 0; color: var(--st-soft); }
.tn-next-text { flex: 1; }
.tn-wick.is-lit .tn-wick-label { overflow: visible; }

/* Het spelerpaneel ligt boven een melding, de keuzelijst boven allebei. */
.tn-sheet { z-index: 210; }
#modal-picker { z-index: 230; }
.tn-vote-add { align-items: center; }
.tn-vote-name { flex: 0 1 auto; min-width: 3ch; }
.tn-vote-add small { flex: 1 1 0; min-width: 0; }
.tn-next-small { flex-wrap: wrap; white-space: normal; row-gap: 0; }

/* ---------- Momenten: één voorleestekst per druk op Volgende ---------- */
/* .tn-aside is wat alleen de verteller mag weten: gestippeld kader, nooit in de voorleestekst. */
.tn-aside { padding: 8px 10px; border: 1px dashed var(--st-chip-line); border-radius: var(--tn-r-s); background: var(--st-chip); }
.tn-aside .tn-slips-title { font-size: clamp(13.5px, 1.15vw, 15.5px); text-transform: uppercase; letter-spacing: 0.06em; }
.tn-aside .tn-slips-title small { text-transform: none; letter-spacing: 0; }
.tn-game:not([data-beat=""]) .tn-slipbox[data-block="morning"], .tn-game:not([data-beat=""]) .tn-slipbox[data-block="vote"] { padding-top: 8px; border-top: 1px dashed var(--st-chip-line); }
/* De tekst is te lang, ook op de kleinste maat: hij scrolt in zijn eigen vak, de briefjes houden hun plek. */
.tn-stage.is-speech-scroll .tn-speech {
  flex: 1 1 0; min-height: 3.9em; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 0 6px 1.3em 0;
  /* onderaan loopt de tekst weg in het perkament: zo zie je dat er nog meer komt */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent);
}
.tn-stage.is-speech-scroll .tn-slips { flex: 0 0 auto; max-height: 190px; }

/* Tekstlengte: drie toetsen naast elkaar, bij Controle en in het menu. */
.tn-length { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 9px 12px 0; border-top: 1px dashed rgba(230, 165, 60, 0.3); }
.tn-length[hidden] { display: none; }
.tn-length-label { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tn-length-label b { font-size: var(--tn-fs-15); font-weight: 500; }
.tn-length-label small { font-size: 13.5px; color: var(--tn-ink-faint); }
.tn-length .tn-seg button { min-height: var(--tn-tap); min-width: 64px; }
.tn-menu .tn-length { padding: 6px 4px 10px; border-top: 0; }
/* Tijdens de momenten noemt de toets het volgende moment, met een naam erin: twee regels mag. */
.tn-game:not([data-beat=""]) .tn-next:not(.is-blocked) b { font-size: clamp(17px, 1.6vw, 25px); line-height: 1.12; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
#check-length { flex-wrap: nowrap; padding-top: 6px; min-height: 50px; }
/* Controle op een lage iPad (1180x820): met de twee extra instellingen blijft het lijstje boven de starttoets leesbaar. */
@media (max-height: 860px) {
  .tn-ritual { padding: 12px 18px 14px; gap: 8px; }
  .tn-ritual > div { gap: 6px; }
  .tn-ritual h2 { font-size: 22px; }
  .tn-ritual ol { gap: 3px; }
  .tn-ritual li { font-size: 15.5px; line-height: 1.25; }
  #check-length { min-height: 48px; padding-top: 4px; }
  #btn-check-spent, #btn-check-siblings { min-height: 46px; padding-top: 5px; }
}
/* De dageraad: de slotzin (hoeveel er niet meer wakker worden) hoort bij het verhaal, maar valt op. */
.tn-speech-count { font-weight: 700; color: var(--st-accent); }
/* Op de dageraad noemt de toets wie er sterven: ook daar twee regels. */
.tn-game[data-step="outro"] .tn-next:not(.is-blocked) b, .tn-game[data-step="dag-slachtoffers"] .tn-next:not(.is-blocked) b, .tn-game[data-step="dag-stemming"] .tn-next:not(.is-blocked) b { font-size: clamp(17px, 1.6vw, 25px); line-height: 1.12; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }

/* ---------- Geluidswoorden: aantikbare zinsdelen in de voorleestekst ---------- */
/* .tn-word is gewone tekst met een fijne amber stippellijn (hij breekt mee over regels), het knopje
   ervoor (.tn-word-btn) is een echte knop met een tikvlak van 44px dat de regel niet hoger maakt.
   .is-playing = korte gloed terwijl het geluid klinkt. Werkt op het nachttoneel en op het dagtoneel. */
.tn-word {
  padding: 0.42em 0.06em;
  margin: 0 -0.06em;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: underline dotted;
  -webkit-text-decoration: underline dotted;
  text-decoration-color: var(--st-accent);
  -webkit-text-decoration-color: var(--st-accent);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.2em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.tn-word-head { white-space: nowrap; }
.tn-word-btn {
  /* Een echte toets van 44 bij 44. De negatieve marge haalt hem terug tot de maat van het icoon, zodat
     de regel niet hoger wordt en de woorden niet uit elkaar schuiven. */
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: calc((0.6em - 44px) / 2) calc((0.6em - 44px) / 2 + 0.16em) calc((0.6em - 44px) / 2) calc((0.6em - 44px) / 2);
  padding: 0;
  display: inline-block;
  vertical-align: baseline;
  font: inherit;
  line-height: 44px;
  text-align: center;
  color: var(--st-accent);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* het icoon blijft een inline element: zo komt er geen regeleinde in de gekopieerde of voorgelezen tekst */
.tn-word-btn .tn-ico { display: inline-block; vertical-align: middle; width: 0.6em; height: 0.6em; stroke-width: 2.3; }
.tn-word-btn:focus-visible { outline: 2px solid var(--st-accent); outline-offset: -8px; }
.tn-word.is-playing { background-color: rgba(230, 165, 60, 0.26); box-shadow: 0 0 0.7em rgba(230, 165, 60, 0.5); }
[data-phase="day"] .tn-word.is-playing { background-color: rgba(138, 79, 12, 0.2); box-shadow: 0 0 0.7em rgba(138, 79, 12, 0.35); }
@media (prefers-reduced-motion: reduce) { .tn-word { transition: none; } }

/* ---------- De afsluiter: de zin die de rol weer laat slapen ---------- */
/* Hoort bij het voorleesscript (zelfde letter, een maat kleiner) en staat onder de briefjes, in hetzelfde scrollende vak. */
.tn-closer { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin-top: 2px; padding: 6px 0 4px 14px; display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--st-accent); }
.tn-closer-label { display: flex; align-items: center; gap: 7px; font-size: clamp(12.5px, 1.06vw, 14.5px); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-accent); }
.tn-closer-label .tn-ico { width: 16px; height: 16px; flex: none; }
.tn-closer-text { margin: 0; font-size: clamp(20px, calc(var(--speech) * 0.72), 30px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; text-wrap: pretty; color: var(--st-ink); }

/* ---------- Niets valt weg achter de toetsen (item 31) ---------- */
/* Het vak met de briefjes (tussen de voorleestekst en de toetsen) scrolt. Is er onder of boven nog
   meer, dan loopt de rand weg in het toneel en wijst een pijltje omlaag: .has-more / .has-above
   (gezet door syncPanelFade in app.js). Het laatste briefje scrolt altijd helemaal in beeld. */
.tn-stage-body { position: relative; }
.tn-slips { --fade-top: 0px; --fade-bottom: 0px; padding-bottom: 6px; }
.tn-slips.has-above { --fade-top: 20px; }
.tn-slips.has-more { --fade-bottom: 40px; }
.tn-slips.has-above, .tn-slips.has-more {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
}
.tn-stage-body.has-more::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 11px;
  height: 11px;
  border-right: 3px solid var(--st-accent);
  border-bottom: 3px solid var(--st-accent);
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

/* Kaarttoetsen: een naam breekt alleen tussen woorden, nooit midden in een woord. Het aantal vrije
   kaarten staat als eigen plaatje ernaast en duwt de naam niet in stukken. */
.tn-rolekey > span:not(.tn-thumb), .tn-pick > span { overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none; }
.tn-rolekey small { white-space: nowrap; padding: 2px 6px; border-radius: 999px; background: rgba(34, 19, 10, 0.16); line-height: 1.2; }
.tn-cardask .tn-rolekeys { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.tn-cardask .tn-rolekey small { flex: none; }
.tn-cardask .tn-rolekey-name { flex: 1 1 auto; min-width: 0; }
.tn-sheet .tn-rolekeys, .tn-sheet .tn-picks-3 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---------- De tussenstand van de stemming (item 32) ---------- */
/* .tn-board-head: hoeveel stemmen er zijn uitgebracht. .tn-board > .tn-score: rij per speler, op stand,
   met een balk die meegroeit (.tn-score-fill, gearceerd .is-extra voor Raaf en Burgemeester), het
   cijfer groot, en een echte min- en plustoets van 44px. .is-lead = koploper, .is-tied = gelijk. */
.tn-board-head { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tn-board-line { font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--st-ink); }
.tn-board-progress { display: block; height: 6px; border-radius: 3px; background: var(--st-chip-line); overflow: hidden; }
.tn-board-progress i { display: block; height: 100%; border-radius: 3px; background: var(--st-accent); transition: width 0.25s ease; }
.tn-board-sum { font-size: clamp(14px, 1.2vw, 16px); font-weight: 500; color: var(--st-soft); }
.tn-votes.tn-board { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 5px 12px; }
.tn-score {
  box-sizing: border-box;
  min-height: 52px;
  padding: 3px 4px 3px 8px;
  gap: 4px;
  border: 1px solid var(--st-chip-line);
  border-left-width: 4px;
  border-radius: var(--tn-r-s);
  background: var(--st-chip);
}
/* De naam met de balk is de plustoets: één tik is één stem. Het plusje rechts laat dat zien. */
.tn-score .tn-vote-add { align-self: stretch; flex-direction: row; align-items: center; gap: 6px; padding: 2px 0; }
.tn-score-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.tn-score-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.tn-score-top small { flex: 1 1 0; min-width: 0; }
/* het vlaggetje hangt op de rand van de rij: het kost de naam en de balk geen ruimte */
.tn-score { position: relative; }
.tn-votes.tn-board { padding-top: 6px; }
.tn-score-flag { position: absolute; top: -9px; right: 52px; white-space: nowrap; line-height: 1.25; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fbeeda; background: #9a211c; }
.tn-score-bar { display: flex; height: 7px; border-radius: 4px; background: var(--st-chip-line); overflow: hidden; }
.tn-score-fill { display: block; flex: none; height: 100%; background: var(--st-soft); transition: width 0.25s ease; }
.tn-score-fill.is-extra { background: repeating-linear-gradient(135deg, var(--st-accent) 0 4px, transparent 4px 7px); }
.tn-score.has-votes .tn-score-fill:not(.is-extra) { background: var(--st-ink); }
.tn-score-plus { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--st-ink); border: 1.5px solid var(--st-chip-line); }
.tn-score-plus .tn-ico { width: 14px; height: 14px; stroke-width: 2.6; }
.tn-score .tn-vote-name { flex: 0 0 auto; max-width: 100%; font-weight: 600; }
.tn-score .tn-vote-add:active .tn-score-plus { translate: 0 2px; }
.tn-score .tn-vote-count { min-width: 30px; text-align: center; font-size: clamp(26px, 2.3vw, 34px); font-weight: 700; }
.tn-score .tn-vote-sub {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--st-ink);
  background: transparent;
  border: 1px solid var(--st-chip-line);
  border-radius: 50%;
  cursor: pointer;
}
.tn-score .tn-vote-sub .tn-ico { width: 20px; height: 20px; stroke-width: 2.2; }
.tn-score .tn-vote-sub:active { translate: 0 2px; }
.tn-score .tn-vote-sub:disabled { opacity: 0.35; translate: none; }
.tn-score.is-lead { border-color: var(--st-danger); background: rgba(154, 33, 28, 0.1); }
[data-phase="night"] .tn-score.is-lead { background: rgba(226, 87, 75, 0.14); }
.tn-score.is-lead .tn-score-fill:not(.is-extra), .tn-score.is-tied .tn-score-fill:not(.is-extra) { background: var(--st-danger); }
.tn-score.is-tied { border-color: var(--st-danger); border-style: dashed; border-left-style: solid; }
.tn-score.is-chosen:not(.is-lead) { border-color: var(--st-danger); }
.tn-slip-static { cursor: default; }
.tn-tally-extra .tn-slip { min-height: 54px; }
.tn-tally-extra .tn-slip-value { white-space: normal; overflow: visible; }
@media (prefers-reduced-motion: reduce) { .tn-board-progress i, .tn-score-fill { transition: none; } }

/* ---------- Ronde 1 van de rooktest (27 november) ---------- */
/* De afsluiter ("Daarna voorlezen") staat buiten het scrollende vak met briefjes, vast boven de
   toetsen: hij valt nooit onder de rand. Het pijltje "er is meer" wijst dan boven de afsluiter. */
.tn-stage-body > .tn-closer { flex: 0 0 auto; margin: 0 0 2px; }
.tn-stage-body.has-closer.has-more::after { bottom: calc(var(--closer-h, 0px) + 12px); }
/* Wat vóór de tekst van de stap wordt voorgelezen (de Wolfshond in de eerste nacht) is een eigen alinea. */
.tn-speech-pre { display: block; margin-bottom: 0.5em; padding-bottom: 0.5em; border-bottom: 1px solid color-mix(in srgb, var(--st-accent) 35%, transparent); }
.tn-speech-main { display: block; }
/* Een lange naam op de toets Volgende breekt over twee regels in plaats van af te kappen. */
.tn-next b.is-long { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: clamp(16px, 1.55vw, 23px); line-height: 1.1; text-wrap: balance; }
/* De rolverdeling scrolt bij veel spelers: een toets onderaan zegt hoeveel er nog onder de rand staan. */
.tn-cast-more { flex: none; min-height: 44px; margin: 4px -4px 0; padding: 6px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--tn-amber-ink); background: var(--tn-amber); border: 0; border-radius: 10px; cursor: pointer; }
.tn-cast-more[hidden] { display: none; }
.tn-cast-more .tn-ico { width: 16px; height: 16px; flex: none; }
/* De voorleestekst scrolt: de toets "Lees verder" ligt rechtsonder over het vak (neemt geen ruimte in). */
.tn-speech-more { flex: none; align-self: flex-end; margin-top: -4px; min-height: 44px; min-width: 44px; padding: 0 14px; display: flex; align-items: center; gap: 7px; font: inherit; font-size: 15px; font-weight: 700; color: var(--tn-amber-ink); background: var(--tn-amber); border: 0; border-radius: 22px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); cursor: pointer; }
.tn-speech-more[hidden] { display: none; }
.tn-speech-more .tn-ico { width: 16px; height: 16px; flex: none; }
/* Ronde 2, bevinding 48: de voorleestekst gaat voor. Past het niet, dan wordt eerst de afsluiter een maat kleiner. */
.tn-stage.is-closer-small .tn-closer-text { font-size: 20px; line-height: 1.24; }
.tn-stage.is-closer-small .tn-closer { padding-top: 3px; padding-bottom: 2px; }
.tn-stage.is-todo-short .tn-stage-todo { cursor: pointer; }
.tn-stage.is-todo-short .step-instruction { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* Ronde 2: een lange naam breekt over twee regels (iets kleiner) voordat hij wordt afgekapt. */
.tn-cast-name.is-long { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 1.08; }
.tn-seatname { white-space: normal; overflow-wrap: anywhere; text-align: center; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#check-seat-list li { white-space: normal; overflow-wrap: anywhere; }
/* Ronde 2, bevinding 52: twee te snelle drukken op rij: de toets dimt kort, zodat je ziet dat hij even wacht. */
.tn-next.is-wait { animation: tn-next-wait 0.6s ease; }
@keyframes tn-next-wait { 0%, 100% { filter: none; } 35% { filter: saturate(0.35) brightness(0.72); } }
/* Ronde 3: scrollen de briefjes toch, dan staat de invoer vooraan en de geheugensteuntjes achteraan. */
.tn-slips.is-squeezed > .tn-note { order: 9; }
/* Ronde 3: de slotzin van de dageraad staat vast onder het scrollende tekstvak. */
.tn-speech-pin { flex: none; margin: 0; }
.tn-speech-pin[hidden] { display: none; }
/* Ronde 3: de kleinste vorm van de briefjes, alleen als het op de ondergrens van de letter nog niet past. */
.tn-stage.is-compact .tn-slips { gap: 5px; }
html[data-layout="wide"] .tn-stage.is-compact .tn-cardask .tn-rolekeys { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 4px; }
html[data-layout="wide"] .tn-stage.is-compact .tn-rolekey { min-height: 44px; padding: 3px 7px; font-size: 14px; }
/* Zonder plaatje: zo past elke kaartnaam in de smalle toets zonder dat een woord uitsteekt. */
html[data-layout="wide"] .tn-stage.is-compact .tn-rolekey .tn-thumb { display: none; }
.tn-stage.is-compact .tn-death { padding-top: 5px; padding-bottom: 5px; }
.tn-stage.is-compact .tn-death-actions { flex: 1 1 auto; justify-content: flex-end; }
.tn-stage.is-compact .tn-note { padding-top: 4px; padding-bottom: 4px; }
.tn-stage.is-compact .tn-cardask { padding-top: 5px; padding-bottom: 5px; gap: 4px; }
.tn-stage.is-compact .tn-cardask .tn-slips-title { margin: 0; }
.tn-stage.is-compact .tn-cardask .tn-slips-actions { margin-top: 0; gap: 4px; }
.tn-stage.is-compact .tn-stage-role { margin-bottom: -4px; }
.tn-stage.is-compact .tn-stage-body { gap: 7px; }
/* ---------- Startscherm en geluidsstrook op smalle en staande schermen (iPad staand, 704 tot 900 breed) ---------- */
@media (max-width: 900px) {
  /* De geluidskaart: de meter staat bij de kop, de tekst krijgt de volle breedte, de toetsen staan eronder naast elkaar. */
  .tn-soundtest { flex-wrap: wrap; align-items: center; }
  .tn-soundtest .tn-eq { flex: none; }
  .tn-soundtest-text { flex: 1 1 260px; min-width: 260px; }
  .tn-soundtest-keys, .tn-soundtest-ask { flex: 1 1 100%; flex-direction: row; align-items: stretch; gap: 8px; }
  .tn-soundtest-keys .tn-key, .tn-soundtest-keys .tn-link, .tn-soundtest-ask .tn-cta, .tn-soundtest-ask .tn-btn { flex: 1 1 0; min-width: 0; min-height: 56px; justify-content: center; }
  /* De geluidsstrook: één nette rij. De woorden bij dempen en volume vallen weg (het pictogram blijft), "Nu:" zakt naar een eigen regel. */
  .sound-strip { flex-wrap: wrap; align-items: center; row-gap: 4px; }
  .sound-strip #btn-sound-mute span, .sound-strip .sound-vol > span, .sound-strip #btn-sound-panel span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sound-strip .btn { min-height: 44px; min-width: 44px; }
  .sound-strip .sound-vol { flex: 1 1 80px; min-width: 70px; max-width: 200px; }
  .sound-strip .sound-vol input { width: 100%; min-width: 0; }
  .sound-strip .sound-now { flex: 1 1 100%; order: 9; text-align: left; }
  .sound-strip .sound-now:empty { display: none; }
}
/* Controle, geluidstest: de uitleg breekt niet meer woord voor woord naast de toets (1024 breed en smaller). */
@media (max-width: 1100px) {
  .tn-tonight-test { flex-wrap: wrap; }
  .tn-tonight-test #check-test-status { flex: 1 1 240px; min-width: 240px; }
}
/* Startscherm, smal en staand: "Verder spelen" staat onder "Nieuw spel", op volle breedte. */
@media (max-width: 900px) {
  .tn-home-actions { display: flex; flex-direction: column; align-items: stretch; grid-template-columns: minmax(0, 1fr); }
  .tn-home-actions > .tn-cta, .tn-home-actions > .tn-resume { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
  .tn-resume-main { width: 100%; }
}
/* Controle, de tafel: een naam breekt nooit binnen het woord. Hij krijgt zijn eigen breedte, iets kleiner als hij lang is. */
.tn-seatname { display: block; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; max-width: none; overflow: visible; text-overflow: clip; font-size: 13.5px; }
/* De stappen in de kop (Spelers, Kaarten, Controle): op een smal scherm houden ze een echte tussenruimte; Terug en Nieuw spel geven toe. */
@media (max-width: 900px) {
  .tn-setup-head .tn-steps { gap: 14px; min-width: 0; flex: 1 1 auto; }
  .tn-setup-head .tn-step { padding-left: 6px; padding-right: 6px; }
  .tn-setup-head .tn-step-label { gap: 5px; }
  .tn-setup-head > .tn-btn, .tn-setup-head > .tn-link, .tn-setup-head > button { flex: 0 1 auto; min-width: 44px; padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 900px) {
  .tn-setup-head-wide { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tn-setup-head .tn-steps { column-gap: 24px; width: 100%; max-width: 400px; justify-self: center; }
}
