/* ════════════════════════════════════════════════════════════════════════
   WIE IS DE MOL? — designsysteem (v3)
   Donker, mysterieus, serieus. Eén stylesheet voor login, speler, admin
   en eliminatiescherm. Vanilla CSS, mobiel-first.

   Tabellen: de desktop-weergave is de browser-default (échte tabel) en
   wordt nergens buiten een media query overschreven. De gestapelde
   kaart-modus voor telefoons staat uitsluitend in @media (max-width:
   767.98px). Een specificiteitsverschil kan de desktop-tabel daardoor
   structureel nooit meer in kaart-modus laten hangen.
   ════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Oppervlakken — bijna-zwart, gelaagd voor diepte */
  --bg: #08090B;
  --bg-raised: #0C0E11;
  --panel: #101319;
  --panel-hover: #151922;
  --border: #1F242E;
  --border-strong: #2A303C;
  --divider: #161A21;

  /* Tekst */
  --text: #E8EAEE;
  --text-dim: #8B93A1;
  --text-faint: #5C6471;

  /* WIDM-groen */
  --accent: #2E7D55;
  --accent-bright: #42C57E;
  --accent-faint: rgba(46, 125, 85, 0.14);
  --accent-line: rgba(66, 197, 126, 0.35);

  /* Rood — uitsluitend functioneel (eliminatie, fouten, destructief) */
  --red: #E0463E;
  --red-soft: #F0857F;
  --red-faint: rgba(224, 70, 62, 0.12);
  --red-solid: #C03A33;

  /* Reveal-vlakken (eliminatiescherm) */
  --safe-core: #1B9D4B;
  --safe-deep: #0F5E2C;
  --elim-core: #C62828;
  --elim-deep: #7C1A14;

  /* Item-kleuren: joker = goud, vrijstelling = blauw */
  --gold: #E0A92E;
  --gold-faint: rgba(224, 169, 46, 0.12);
  --blue: #5B9BD8;
  --blue-faint: rgba(91, 155, 216, 0.12);

  /* Typografie */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Spline Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --fs-xs: 0.72rem;
  --fs-sm: 0.845rem;
  --fs-base: 0.95rem;
  --fs-md: 1.08rem;
  --fs-lg: 1.3rem;
  --fs-title: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);

  /* Spacing (4px-grid) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;

  /* Vorm & diepte */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.025) inset, 0 16px 40px -28px rgba(0, 0, 0, 0.9);
  --shadow-float: 0 24px 64px -24px rgba(0, 0, 0, 0.85);
  --shadow-green: 0 10px 30px -14px rgba(66, 197, 126, 0.45);
  --ring: 0 0 0 3px rgba(66, 197, 126, 0.22);

  /* Lagen */
  --z-bar: 30;
  --z-reveal: 100;
  --z-controls: 200;
  --z-modal: 1000;
  --z-toast: 1100;

  /* Maten */
  --maxw-admin: 1180px;
  --maxw-player: 480px;
  --sidebar-w: 250px;
}

/* ─── 2. Reset & basis ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  /* Eén koele 'bovenlamp' — sfeer zonder spookhuis */
  background-image: radial-gradient(110% 75% at 50% -12%, #0D1015 0%, var(--bg) 62%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

::selection { background: rgba(46, 125, 85, 0.4); color: #fff; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; border-radius: 4px; }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

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

/* ─── 3. Typografie ─────────────────────────────────────────────────── */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-title);
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.page-sub { color: var(--text-dim); font-size: var(--fs-sm); margin-top: var(--sp-1); }

/* Sectiekop met korte groene 'tick' — serieus, editoriaal */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.section-title::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--accent-bright);
  flex: 0 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.mono { font-family: var(--font-mono); }

/* ─── 4. Merk (logo-mark + woordmerk) ───────────────────────────────── */
.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand .mark { flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--accent-bright); }
.brand-context {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─── 5. Knoppen ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s, opacity 0.18s;
}
a.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: linear-gradient(180deg, #379163 0%, var(--accent) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #3DA06D 0%, #338A5E 100%);
  box-shadow: var(--shadow-green);
}

.btn-outline, .btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-faint);
}

.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--panel-hover); }

.btn-danger { background: var(--red-faint); color: var(--red-soft); border-color: transparent; }
.btn-danger:hover:not(:disabled) { border-color: var(--red); color: var(--red-soft); }

.btn-danger-solid { background: var(--red-solid); color: #fff; border-color: rgba(255, 255, 255, 0.08); }
.btn-danger-solid:hover:not(:disabled) { background: #D24840; }

.btn-gold { background: var(--gold-faint); color: var(--gold); }
.btn-gold:hover:not(:disabled) { border-color: var(--gold); }

.btn-blue { background: var(--blue-faint); color: var(--blue); }
.btn-blue:hover:not(:disabled) { border-color: var(--blue); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: var(--fs-sm); }
.btn-lg { padding: 0.95rem 2rem; font-size: var(--fs-md); border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-icon { padding: 0.55rem; width: 44px; flex: 0 0 auto; }
.btn-icon svg { width: 18px; height: 18px; }

/* ─── 6. Formuliervelden ────────────────────────────────────────────── */
.field { margin-bottom: var(--sp-4); text-align: left; min-width: 0; }
.field label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.field .hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 0.35rem; }

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.68rem 0.9rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  min-height: 44px;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
input[type="number"] { font-family: var(--font-mono); font-size: var(--fs-sm); }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238B93A1' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}
select option { background: #12151B; color: var(--text); }

input[type="radio"] { accent-color: var(--accent-bright); width: 20px; height: 20px; flex: 0 0 auto; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent-bright); width: 20px; height: 20px; cursor: pointer; }

/* Formulier-rij: gestapeld op mobiel, kolommen op desktop */
.form-row { display: grid; gap: var(--sp-3); align-items: end; }
.form-row .field { margin-bottom: 0; }
@media (min-width: 768px) {
  .form-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

/* Inline foutmelding (login e.d.) */
.form-error {
  display: none;
  background: var(--red-faint);
  border: 1px solid rgba(224, 70, 62, 0.35);
  border-radius: var(--radius-sm);
  color: var(--red-soft);
  font-size: var(--fs-sm);
  padding: 0.65rem 0.9rem;
  margin-bottom: var(--sp-4);
  text-align: left;
}
.form-error.show { display: block; }

/* ─── 7. Cards & panelen ────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-panel);
  margin-bottom: var(--sp-5);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.inset {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ─── 8. Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--accent-faint); color: var(--accent-bright); }
.badge-red { background: var(--red-faint); color: var(--red-soft); }
.badge-gold { background: var(--gold-faint); color: var(--gold); }
.badge-blue { background: var(--blue-faint); color: var(--blue); }
.badge-dim { background: rgba(139, 147, 161, 0.12); color: var(--text-dim); }
.badge-plain::before { display: none; }

/* ─── 9. Tabellen (desktop = échte tabel, geen overrides) ───────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-raised);
}
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--divider);
  font-size: var(--fs-sm);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color 0.15s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
td.td-actions { text-align: right; white-space: nowrap; }
td.td-actions .btn + .btn { margin-left: 0.4rem; }

/* ─── 10. Navigatie: zijbalk (desktop) / topbalk + tabs (mobiel) ────── */
.app { min-height: 100dvh; }

.sidebar {
  background: rgba(9, 11, 14, 0.92);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.8rem var(--sp-4);
}
.sidenav { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0 var(--sp-3); scrollbar-width: none; }
.sidenav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: 0.8; }
.nav-item:hover { color: var(--text); text-decoration: none; }
.nav-item.active { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }
.sidebar-foot { display: none; }
.logout-compact { flex: 0 0 auto; }

.main { min-width: 0; padding: var(--sp-4); max-width: var(--maxw-admin); margin: 0 auto; }
.main-head { margin: var(--sp-2) 0 var(--sp-5); }

/* Statcards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-panel);
}
.stat-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.stat-value .badge { vertical-align: 0.2em; }
.stat-value.accent { color: var(--accent-bright); }

/* Tab-inhoud */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── 11. Topbar (speler) ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.8rem var(--sp-4);
  border-bottom: 1px solid var(--divider);
  background: rgba(8, 9, 11, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar .brand { flex: 1 1 auto; min-width: 0; }
.topbar .brand > div { min-width: 0; }
.topbar .brand-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}
/* Smalle telefoons: woordmerk inkorten zodat merk, naam-chip en
   uitlogknop nooit overlappen */
@media (max-width: 480px) {
  .topbar { gap: var(--sp-2); }
  .topbar .brand-context { display: none; }
  .topbar .brand-name { font-size: 0.74rem; letter-spacing: 0.09em; }
  .topbar .brand .mark { width: 26px; height: 26px; }
  .user-chip { max-width: 30vw; }
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 40vw;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); flex: 0 0 auto; }

/* ─── 12. Login ─────────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--sp-6) var(--sp-4);
}
.login-card {
  width: 100%;
  max-width: 392px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-8) var(--sp-8);
  box-shadow: var(--shadow-float);
  text-align: center;
}
.login-card .mark { margin: 0 auto var(--sp-4); }
.login-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}
.login-title em { font-style: normal; color: var(--accent-bright); }
.login-sub { color: var(--text-dim); font-size: var(--fs-sm); margin: var(--sp-2) 0 var(--sp-6); }
.login-foot {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--divider);
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

/* ─── 13. Spelerportaal ─────────────────────────────────────────────── */
.player-shell {
  max-width: var(--maxw-player);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-12);
}

/* Status-kaarten (wachten / ingeleverd / afgevallen / fout) */
.state-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
}
.state-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto var(--sp-5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-faint);
  border: 1px solid var(--accent-line);
  color: var(--accent-bright);
}
.state-icon svg { width: 26px; height: 26px; }
.state-icon.is-red { background: var(--red-faint); border-color: rgba(224, 70, 62, 0.4); color: var(--red-soft); }
.state-icon.is-dim { background: rgba(139, 147, 161, 0.1); border-color: var(--border-strong); color: var(--text-dim); }
.state-icon.is-gold { background: var(--gold-faint); border-color: rgba(224, 169, 46, 0.4); color: var(--gold); }
.state-icon.pulse { animation: iconPulse 2.6s ease-in-out infinite; }
@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(66, 197, 126, 0.22); }
  50% { box-shadow: 0 0 0 14px rgba(66, 197, 126, 0); }
}
.state-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: 0.01em;
  margin-bottom: var(--sp-2);
}
.state-text { color: var(--text-dim); font-size: var(--fs-sm); max-width: 34ch; margin: 0 auto; }
.state-extra { margin-top: var(--sp-5); display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }
.state-foot { margin-top: var(--sp-6); font-size: var(--fs-xs); color: var(--text-faint); }

/* Intro (per ronde) */
.intro-meta {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: var(--sp-5) 0;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--text);
}
.meta-chip svg { width: 14px; height: 14px; color: var(--accent-bright); }
.intro-rules {
  list-style: none;
  text-align: left;
  max-width: 300px;
  margin: 0 auto var(--sp-6);
  display: grid;
  gap: 0.55rem;
}
.intro-rules li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.intro-rules svg { width: 15px; height: 15px; margin-top: 0.22em; color: var(--accent-bright); flex: 0 0 auto; }

/* Sticky test-balk: timer + voortgang */
.quiz-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
  margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-4)) var(--sp-5);
  padding: 0.7rem var(--sp-4) 0;
  background: rgba(8, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}
.quiz-bar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  max-width: var(--maxw-player);
  margin: 0 auto;
}
.quiz-progress-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.quiz-timer {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2rem);
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.quiz-timer.warning { color: var(--gold); }
.quiz-timer.danger { color: var(--red); animation: timerPulse 1s ease-in-out infinite; }
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.quiz-track {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  overflow: hidden;
  max-width: var(--maxw-player);
  margin: 0.55rem auto 0;
}
.quiz-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.35s ease;
}

/* Vraagkaart */
.q-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  padding: var(--sp-6) var(--sp-5);
}
.q-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: var(--sp-3);
}
.q-text {
  font-size: clamp(1.08rem, 1rem + 0.55vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: var(--sp-5);
  overflow-wrap: break-word;
}
.option-list { display: grid; gap: 0.6rem; }
.option-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 0.9rem;
  background: var(--bg-raised);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.option-btn:hover { border-color: var(--accent); }
.opt-key {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.opt-label { flex: 1; overflow-wrap: anywhere; }
.opt-check { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent-bright); opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.option-btn.selected { border-color: var(--accent-bright); background: var(--accent-faint); }
.option-btn.selected .opt-key { background: var(--accent-bright); border-color: var(--accent-bright); color: #06130C; }
.option-btn.selected .opt-check { opacity: 1; transform: scale(1); }

.quiz-nav { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.quiz-nav .btn-back-q { flex: 1; }
.quiz-nav .btn-confirm { flex: 2; }

/* Items-fase */
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}
.item-row + .item-row { margin-top: var(--sp-3); }
.item-info { min-width: 0; }
.item-name { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: var(--fs-base); }
.item-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.item-dot.gold { background: var(--gold); }
.item-dot.blue { background: var(--blue); }
.item-sub { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 2px; }

.stepper { display: flex; align-items: center; gap: 0.6rem; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.stepper button:hover:not(:disabled) { border-color: var(--accent-bright); color: var(--accent-bright); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper .count {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 1.6ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Switch (vrijstelling) */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-pill);
  transition: background-color 0.2s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.2s, background-color 0.2s;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(22px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }

.notice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  text-align: left;
  background: var(--gold-faint);
  border: 1px solid rgba(224, 169, 46, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: var(--fs-sm);
  color: var(--gold);
  margin-bottom: var(--sp-4);
}
.notice svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 0.18em; }

/* ─── 14. Admin: rondekaarten & vragen-editor ───────────────────────── */
.round-head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.round-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); }
.round-meta {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 0.45rem;
}
.round-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.round-meta svg { width: 13px; height: 13px; opacity: 0.7; }
.round-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-left: auto; }
.round-detail { margin-top: var(--sp-4); }

.question-editor {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.question-editor .q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.question-editor .q-head .q-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.option-row {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-bottom: 0.45rem;
}
.option-row input[type="text"] { flex: 1; min-width: 0; min-height: 40px; padding: 0.5rem 0.75rem; font-size: var(--fs-sm); }
.option-row .row-del { flex: 0 0 auto; }
.add-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  margin-top: 0.35rem;
  min-height: 38px;
  transition: border-color 0.15s, color 0.15s;
}
.add-option-btn:hover { border-color: var(--accent); color: var(--accent-bright); }
.editor-help { font-size: var(--fs-xs); color: var(--text-faint); margin-bottom: var(--sp-3); }
/* Vragenbeheer: labels + markering links, knoppen (verplaatsen/invoegen/verwijderen) rechts */
.badge[hidden] { display: none; }   /* badge-display mag het hidden-attribuut niet overstemmen (markering "Antwoord ontbreekt") */
.q-head .q-labels { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; min-width: 0; }
.q-head .q-tools { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.option-row .opt-static { flex: 1; min-width: 0; font-size: var(--fs-sm); cursor: pointer; }
/* Vragen van een gepubliceerde ronde: alleen bekijken */
.q-view-text { font-weight: 600; margin-bottom: var(--sp-3); }
.q-view-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: var(--fs-sm); color: var(--text-dim); }
.q-view-options li.is-correct { color: var(--text); font-weight: 600; }

/* ─── 15. Lege & laad-states ────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-dim);
}
.empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto var(--sp-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 147, 161, 0.08);
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.empty-icon svg { width: 20px; height: 20px; }
.empty-title { font-weight: 600; font-size: var(--fs-base); color: var(--text); margin-bottom: 0.2rem; }
.empty-sub { font-size: var(--fs-sm); }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: var(--sp-6);
  color: var(--text-dim);
  font-size: var(--fs-sm);
}

/* ─── 16. Modals ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(3, 4, 6, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-overlay.open { opacity: 1; }
.modal {
  width: 100%;
  max-width: 420px;
  background: #11141B;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: var(--sp-6);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.18s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}
.modal-message { color: var(--text-dim); font-size: var(--fs-sm); }
.modal-list {
  list-style: none;
  margin: var(--sp-4) 0 0;
  display: grid;
  gap: 0.4rem;
}
.modal-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: var(--fs-sm);
}
.modal-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); flex: 0 0 auto; }
.modal-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}
.modal-actions .btn { width: 100%; }

/* ─── 17. Toasts ────────────────────────────────────────────────────── */
.toast-root {
  position: fixed;
  z-index: var(--z-toast);
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #12151C;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent-bright);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
  color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.25s ease;
}
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 0.18em; }
.toast-success { border-left-color: var(--accent-bright); }
.toast-success svg { color: var(--accent-bright); }
.toast-error { border-left-color: var(--red); }
.toast-error svg { color: var(--red-soft); }
.toast-info { border-left-color: var(--blue); }
.toast-info svg { color: var(--blue); }
.toast.hide { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── 18. Eliminatiescherm (TV) ─────────────────────────────────────── */
.elim-body { overflow: hidden; }
.elim-note { font-size: var(--fs-sm); color: var(--text-faint); max-width: 44ch; }
.corner-back .btn { background-color: rgba(12, 14, 17, 0.88); }
.elim-idle {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  background: radial-gradient(95% 70% at 50% 32%, #0C0F13 0%, #050608 70%);
  text-align: center;
  padding: var(--sp-6);
}
.elim-idle .mark { width: clamp(64px, 9vw, 110px); height: auto; animation: markBreath 5s ease-in-out infinite; }
@keyframes markBreath {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.045); opacity: 1; }
}
.elim-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 5.2vw, 4rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
}
.elim-wordmark em { font-style: normal; color: var(--accent-bright); }
.elim-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.3vw, 1rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.reveal-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-reveal);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2.5rem);
  padding: var(--sp-8);
  transition: background 0.9s ease;
  background: #07080A;
}
.reveal-screen.show { display: flex; }
.reveal-screen.green { background: radial-gradient(120% 120% at 50% 38%, var(--safe-core) 0%, var(--safe-deep) 100%); }
.reveal-screen.red { background: radial-gradient(120% 120% at 50% 38%, var(--elim-core) 0%, var(--elim-deep) 100%); }

.reveal-name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(3rem, 12.5vw, 11rem);
  line-height: 1.05;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: clamp(2px, 0.5vw, 10px);
  text-align: center;
  max-width: 94vw;
  overflow-wrap: break-word;
  word-break: break-word;
  text-shadow: 0 4px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-screen.named .reveal-name { opacity: 1; transform: scale(1); }

.reveal-verdict {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.1vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s;
}
.reveal-screen.verdict .reveal-verdict { opacity: 1; transform: translateY(0); }

/* Bediening — discreet aanwezig, vol zichtbaar bij gebruik */
.corner-back {
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: var(--z-controls);
}
.corner-round {
  position: fixed;
  top: var(--sp-4);
  right: var(--sp-4);
  z-index: var(--z-controls);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.corner-round label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.corner-round select { width: auto; min-height: 40px; padding-top: 0.45rem; padding-bottom: 0.45rem; font-size: var(--fs-sm); background-color: rgba(12, 14, 17, 0.92); }

.elim-history {
  position: fixed;
  top: 4.6rem;
  right: var(--sp-4);
  z-index: var(--z-controls);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-left: var(--sp-2);
}
.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  border: 1px solid;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: chipIn 0.3s ease;
}
.history-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.history-chip.green { background: rgba(15, 94, 44, 0.5); border-color: rgba(66, 197, 126, 0.4); color: #7BE3AC; }
.history-chip.red { background: rgba(124, 26, 20, 0.55); border-color: rgba(224, 70, 62, 0.45); color: #F8A8A3; }
@keyframes chipIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.control-bar {
  position: fixed;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-controls);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(10, 12, 16, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 0.6rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 2rem);
  transition: opacity 0.35s ease;
}
.control-bar select { width: 230px; max-width: 38vw; background-color: var(--bg-raised); }
@media (hover: hover) and (pointer: fine) {
  .control-bar { opacity: 0.32; }
  .control-bar:hover, .control-bar:focus-within { opacity: 1; }
  .corner-back .btn, .corner-round { opacity: 0.45; transition: opacity 0.35s ease; }
  .corner-back .btn:hover, .corner-back .btn:focus-visible, .corner-round:hover, .corner-round:focus-within { opacity: 1; }
}

/* Telefoon-fallback voor het eliminatiescherm: clusters mogen niet botsen */
@media (max-width: 767.98px) {
  .control-bar {
    left: var(--sp-3);
    right: var(--sp-3);
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    bottom: var(--sp-3);
  }
  .control-bar select { width: 100%; max-width: none; flex: 1 1 100%; }
  .control-bar .btn { flex: 1; }
  .corner-back { top: var(--sp-3); left: var(--sp-3); }
  .corner-round { top: var(--sp-3); right: var(--sp-3); }
  .corner-round label { display: none; }
  .elim-history { top: 4rem; right: var(--sp-3); max-width: 52vw; }
}

/* ─── 19. Utilities ─────────────────────────────────────────────────── */
.flex { display: flex; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.gap-sm { gap: var(--sp-2); }
.gap-md { gap: var(--sp-4); }
.mt-1 { margin-top: var(--sp-2); }
.mt-2 { margin-top: var(--sp-4); }
.mt-3 { margin-top: var(--sp-6); }
.mb-1 { margin-bottom: var(--sp-2); }
.mb-2 { margin-bottom: var(--sp-4); }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ─── 20. Mobiele tabel-stack (uitsluitend < 768px) ─────────────────── */
@media (max-width: 767.98px) {
  .table-wrap { border: none; border-radius: 0; background: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .table-wrap tbody tr {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-2) var(--sp-4);
    margin-bottom: var(--sp-3);
  }
  .table-wrap tbody tr:hover { background: var(--bg-raised); }
  .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--divider);
    text-align: right;
    min-height: 42px;
  }
  .table-wrap tbody tr td:last-child { border-bottom: none; }
  .table-wrap td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    flex: 0 0 auto;
  }
  .table-wrap td.td-actions { justify-content: flex-end; }
  .table-wrap td.td-actions::before { content: none; }
}

/* ─── 21. Breakpoints omhoog (mobiel-first verruiming) ──────────────── */
@media (min-width: 480px) {
  .main { padding: var(--sp-5); }
}

@media (min-width: 768px) {
  .main { padding: var(--sp-6); }
  .main-head { margin-bottom: var(--sp-6); }
  .card { padding: var(--sp-6); }
  .modal-actions { flex-direction: row; justify-content: flex-end; }
  .modal-actions .btn { width: auto; min-width: 120px; }
  .toast-root { left: auto; right: var(--sp-5); top: var(--sp-5); bottom: auto; width: 360px; }
  .player-shell { padding-top: var(--sp-8); }
  .quiz-bar { margin-top: calc(-1 * var(--sp-8)); }
  .state-card { padding: var(--sp-12) var(--sp-10); }
}

/* Compactere bediening op echte muis-apparaten */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .btn { min-height: 38px; }
  .btn-sm { min-height: 32px; }
  .btn-lg { min-height: 52px; }
  .btn-icon { width: 38px; padding: 0.45rem; }
  input[type="text"], input[type="password"], input[type="number"], select { min-height: 40px; }
  .option-row input[type="text"] { min-height: 36px; }
}

/* Desktop: échte dashboard-shell met vaste zijbalk */
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid var(--divider);
    background: #0A0C0F;
    padding: var(--sp-5) var(--sp-3) var(--sp-4);
  }
  .sidebar-top { padding: 0 var(--sp-2) var(--sp-5); }
  .logout-compact { display: none; }
  .sidenav { flex-direction: column; gap: 0.3rem; overflow: visible; padding: 0; }
  .nav-item {
    border-bottom: none;
    border-left: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.85rem;
  }
  .nav-item.active {
    background: var(--accent-faint);
    border-left-color: var(--accent-bright);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  .sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-top: auto;
    padding: var(--sp-4) var(--sp-2) 0;
    border-top: 1px solid var(--divider);
  }
  .sidebar-foot .user-chip { max-width: 100%; align-self: flex-start; }
  .main { padding: var(--sp-8) var(--sp-10); margin: 0; max-width: none; }
  .main > .tab-content, .main-head, .main > .loading-row { max-width: var(--maxw-admin); }
}

/* ─── 22. Toegankelijkheid: minder beweging ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Go-live: wachtwoordmodal en database-tab ─────────────────────── */
.password-reveal {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4);
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
}
.password-reveal code {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 1.25rem; letter-spacing: 0.08em;
  color: var(--accent-bright); user-select: all; word-break: break-all;
}
.check-row { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text); cursor: pointer; margin-top: var(--sp-2); }
input[type="file"] { width: 100%; color: var(--text-dim); font-size: var(--fs-sm); }
input[type="file"]::file-selector-button {
  margin-right: var(--sp-3); padding: 0.45rem 0.9rem; font: inherit; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text); background: var(--panel-hover); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
}
