/* ============================================================
   app.css — Escape Giessenburg design system
   Bron van waarheid: design-preview.html
   Gebruiksregels: docs/design-system.md
   ============================================================ */


/* ── Design tokens ────────────────────────────────────────── */

:root {
  /* Neutralen */
  --paper:        #F2EDE2;
  --paper-warm:   #EAE3D2;
  --surface:      #FBF8F1;
  --ink:          #15201B;
  --ink-soft:     #2C3A33;
  --mute:         #6B756E;

  /* Groen */
  --willow:       #2C4A3B;
  --willow-deep:  #1B3128;
  --willow-tint:  #C6D2C9;

  /* Oranje */
  --clay:         #B0532E;
  --clay-soft:    #D78460;

  /* Scoreboard donker thema (alleen gebruikt in /scoreboard/) */
  --board-bg:     #0e1d17;
  --board-cream:  #f0ebe0;   /* off-white voor titels op donker */
  --board-warm:   #e8e0d0;   /* off-white voor team-namen */
  --board-mute:   #d4cdb8;   /* gedempt off-white voor timer */

  /* Lijnen */
  --rule:         #1B201D;
  --hairline:     rgba(21, 32, 27, .14);

  /* Type families */
  --serif:        "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans:         "Manrope", ui-sans-serif, system-ui, sans-serif;

  /* Schaal-helpers */
  --step-tight:   1.15;
  --step-loose:   1.55;
}


/* ── Reset + body ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(176, 83, 46, .06), transparent 60%),
    radial-gradient(900px 500px at -5% 110%, rgba(44, 74, 59, .07), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(21, 32, 27, .025) 31px 32px);
  line-height: var(--step-loose);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: var(--clay); }


/* ── Layout shell ─────────────────────────────────────────── */
/* Standaard frame voor een schermpagina. */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  width: 100%;
  max-width: 480px;            /* mobile-first; centreert ook op desktop */
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
}

.screen-wide {                 /* voor scoreboard, admin */
  max-width: 1240px;
  padding: 40px 32px 64px;
}

.screen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* ── Topbar ───────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 18px;
  margin-bottom: 32px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  background: var(--surface);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 12, "SOFT" 30;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1;
}
.brand-text small {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 4px;
}

.meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-link {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  transition: color .15s;
}
.topbar-link:hover { color: var(--ink); }

.btn-sm {
  font-size: 11px;
  padding: 8px 13px;
}


/* ── Typografie-helpers ───────────────────────────────────── */

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1.5px;
  background: var(--clay);
}

.crumb {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
  margin-bottom: 8px;
}
.crumb .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clay);
  margin: 0 6px 2px;
  vertical-align: middle;
}

.h-display {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "SOFT" 50;
  font-weight: 380;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}

h1.title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-weight: 360;
  font-size: clamp(40px, 6.5vw, 80px);
  line-height: .98;
  letter-spacing: -.025em;
  margin: 0 0 24px;
  color: var(--ink);
}
h1.title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--willow);
}

h2.section-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72, "SOFT" 40;
  font-weight: 380;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.02em;
  line-height: 1;
  margin: 0 0 12px;
}
h2.section-title em {
  font-style: italic;
  color: var(--willow);
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
}

h3.screen-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 4px 0 8px;
  color: var(--ink);
}
h3.screen-title em {
  font-style: italic;
  color: var(--clay);
  font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1;
}

.lead {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 44ch;
  line-height: var(--step-loose);
  margin: 0 0 24px;
}
.lead strong { color: var(--ink); font-weight: 600; }

.body-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.muted {
  color: var(--mute);
  font-size: 12px;
}


/* ── Knoppen ──────────────────────────────────────────────── */

.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, opacity .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--ink);        color: var(--surface); }
.btn-clay      { background: var(--clay);       color: var(--surface); }
.btn-secondary { background: var(--paper-warm); color: var(--ink); }
.btn-ghost     { background: transparent;       color: var(--ink); border: 1px solid var(--ink); }

.btn-block {
  width: 100%;
  padding: 14px 16px;
  font-size: 13px;
}


/* ── Form fields ──────────────────────────────────────────── */

.field-label {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--clay); }
.input::placeholder { color: var(--mute); opacity: .6; }

/* Grote display-input voor teamnaam etc. */
.input-display {
  font-family: var(--serif);
  font-variation-settings: "opsz" 32, "SOFT" 60;
  font-style: italic;
  font-size: 18px;
  color: var(--willow-deep);
  text-align: center;
  letter-spacing: .005em;
}

/* Antwoord-veld met submit-knop ernaast */
.answer-field {
  display: flex;
  gap: 6px;
}
.answer-field .input {
  flex: 1;
  font-family: var(--serif);
  font-variation-settings: "opsz" 24;
  font-size: 16px;
  letter-spacing: .04em;
}

.input-dashed {                /* "voeg lid toe"-stijl */
  border: 1px dashed var(--mute);
  background: transparent;
  color: var(--mute);
  text-align: center;
}


/* ── Chips & pills ───────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 12px;
  background: var(--willow-tint);
  color: var(--willow-deep);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.chip-close {
  font-style: normal;
  opacity: .55;
  cursor: pointer;
}

.loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--willow-tint);
  color: var(--willow-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.loc-pill svg { width: 11px; height: 11px; }

/* Status-pills voor scoreboard en dashboard */
.status-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.sp-onderweg { background: rgba(44, 74, 59, .35);  color: var(--willow-deep); border: 1px solid rgba(44, 74, 59, .55); }
.sp-bezig    { background: rgba(176, 83, 46, .2);  color: var(--clay);        border: 1px solid rgba(176, 83, 46, .35); }
.sp-klaar    { background: var(--clay);            color: var(--surface); }
.sp-wacht    { background: var(--paper-warm);      color: var(--mute); }

/* Pulserende straf-pill */
.straf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(176, 83, 46, .12);
  border: 1px solid rgba(176, 83, 46, .35);
  border-radius: 999px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 18;
  font-size: 13px;
  color: var(--clay);
  letter-spacing: -.01em;
  animation: pulse 1.6s ease-in-out infinite;
}
.straf-pill svg { width: 10px; height: 10px; }


/* ── Dot-track (route-voortgang) ──────────────────────────── */
/* Gegenereerd door renderDotTrack() uit js/app.js */

.dot-track {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  margin: 14px 0 12px;
}
.dt-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: box-shadow .3s;
}
.dt-dot.done    { background: var(--willow); }
.dt-dot.current {
  background: var(--clay);
  box-shadow: 0 0 0 4px rgba(176, 83, 46, .2);
  animation: pulse 1.8s ease-in-out infinite;
}
.dt-dot.locked  { background: var(--mute); opacity: .28; }
.dt-dot.final {
  background: var(--surface);
  border: 2px solid var(--ink);
  width: 13px;
  height: 13px;
}
.dt-line {
  flex: 1;
  height: 1.5px;
  background: var(--hairline);
  min-width: 4px;
  max-width: 14px;
}
.dt-line.done-line { background: var(--willow); opacity: .4; }


/* ── Letters-collected (eindcode bouwen) ─────────────────── */
/* Gegenereerd door renderLetters() uit js/app.js */

.letters-collected {
  display: flex;
  gap: 9px;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--serif);
  font-variation-settings: "opsz" 24;
  font-size: 20px;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.lc-letter { color: var(--willow-deep); font-weight: 500; }
.lc-blank {
  color: var(--mute);
  opacity: .35;
  border-bottom: 1.5px solid var(--mute);
  width: 16px;
  text-align: center;
  font-size: 18px;
}
.lc-sep { color: var(--mute); opacity: .3; font-size: 14px; }


/* ── Cards & boxes ────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px;
}

.current-box {
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
}
.current-box .curr-label {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 700;
  margin-bottom: 5px;
}
.current-box .curr-name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24;
  font-weight: 500;
  font-size: 17px;
  color: var(--clay);
  letter-spacing: -.01em;
}

.next-locked {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--mute);
  line-height: 1.5;
}
.next-locked svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--mute); }


/* ── Lid-banner (readonly indicator) ─────────────────────── */

.lid-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 8px;
  margin-bottom: 14px;
}
.lid-banner svg { width: 13px; height: 13px; opacity: .7; flex-shrink: 0; }
.lid-banner span { opacity: .75; font-weight: 500; }


/* ── Hint-box (bij fout antwoord) ─────────────────────────── */

.hint-box {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px;
}
.hint-box-head {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 8px;
}
.hint-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-bottom: 10px;
}
.hint-type-tag {
  font-size: 8px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tag-hint-brief { background: var(--willow-tint); color: var(--willow-deep); }
.tag-hint-loc   { background: var(--clay); color: var(--surface); }


/* ── Aftellings-cijfers (straf, countdown) ───────────────── */

.countdown-num {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-weight: 300;
  font-size: 58px;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--clay);
}
.countdown-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
  display: block;
  margin-top: 2px;
}


/* ── Animaties ────────────────────────────────────────────── */

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176, 83, 46, .4); }
  50%      { box-shadow: 0 0 0 6px rgba(176, 83, 46, 0); }
}


/* ── Footer ───────────────────────────────────────────────── */

.foot {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--mute);
  line-height: 1.6;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 32px;
}
.foot-datum {
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: .02em;
}
.foot a {
  color: var(--clay);
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 83, 46, .35);
  padding-bottom: 1px;
  transition: border-color .15s;
}
.foot a:hover { border-bottom-color: var(--clay); }


/* ── Mobiele chrome (mini-header + footer op /game/*-schermen) ─── */

.game-chrome {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "SOFT" 40;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -.005em;
  border-bottom: 1px solid var(--hairline);
  background: rgba(251, 248, 241, .55);
}
.game-chrome-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.2px solid var(--ink-soft);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.game-chrome-mark svg { width: 9px; height: 9px; }
.game-chrome-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--clay);
  margin: 0 2px;
}
.game-chrome-meta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
  font-style: normal;
}

.game-chrome-foot {
  padding: 12px 18px 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  text-align: center;
  border-top: 1px solid var(--hairline);
  background: rgba(251, 248, 241, .35);
}

/* Bij donkere stap (aanmelden stap 3) chrome semi-transparant maken */
.game-chrome.over-dark,
.game-chrome-foot.over-dark {
  background: transparent;
  color: rgba(255, 255, 255, .55);
  border-color: rgba(255, 255, 255, .08);
}
.game-chrome.over-dark .game-chrome-mark { border-color: rgba(255, 255, 255, .35); }
.game-chrome.over-dark .game-chrome-meta { color: rgba(255, 255, 255, .35); }


/* ── Utility ──────────────────────────────────────────────── */

.flex-spacer { flex: 1; }
.mt-auto { margin-top: auto; }
.center { text-align: center; }
.hidden { display: none !important; }


/* ── Aanmelding: spelcode-invoer (stap-0, backup-route) ──── */

.code-input {
  font-family: var(--serif);
  font-variation-settings: "opsz" 96, "SOFT" 20, "WONK" 0;
  font-weight: 400;
  font-size: 44px;
  letter-spacing: .22em;
  text-align: center;
  text-transform: uppercase;
  color: var(--willow-deep);
  padding: 18px 12px 14px;
}
.code-input::placeholder {
  color: var(--hairline);
  opacity: 1;
  letter-spacing: .22em;
}


/* ── Aanmelding: stap-indicator ───────────────────────────── */

.stap-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.stap-dots span {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--hairline);
}
.stap-dots span.actief { background: var(--clay-soft); }
.stap-dots span.klaar  { background: var(--willow); }


/* ── Aanmelding: welkom-art ───────────────────────────────── */

.welkom-art {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  background: var(--surface);
  position: relative;
  margin: 14px auto 8px;
}
.welkom-art::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed var(--hairline);
}
.welkom-art svg { width: 40px; height: 40px; }


/* ── Aanmelding: welkom-heading ───────────────────────────── */

.welkom-heading {
  font-family: var(--serif);
  font-variation-settings: "opsz" 80, "SOFT" 60;
  font-weight: 360;
  font-size: 28px;
  line-height: .98;
  letter-spacing: -.025em;
  text-align: center;
  margin: 8px 0 4px;
  color: var(--ink);
}
.welkom-heading em {
  font-style: italic;
  color: var(--willow);
  font-variation-settings: "opsz" 80, "SOFT" 100, "WONK" 1;
}
.welkom-sub {
  text-align: center;
  color: var(--mute);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}


/* ── Aanmelding: teamleden divider + chips ────────────────── */

.divider-meta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
  text-align: center;
  margin: 12px 0 6px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  min-height: 28px;
}


/* ── Spelregels-blok + akkoord ────────────────────────────── */

.spelregels-body {
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  overflow-y: auto;
  max-height: 38vh;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.spelregels-body h2,
.spelregels-body h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 40;
  font-size: 15px;
  color: var(--ink);
  margin: 10px 0 4px;
}
.spelregels-body ul { padding-left: 18px; margin: 4px 0; }
.spelregels-body p  { margin: 0 0 8px; }
.spelregels-body li { margin-bottom: 4px; }

.akkoord-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 14px;
}
.akkoord-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--willow);
  cursor: pointer;
}
.akkoord-row span {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}


/* ── QR-deel-scherm (aanmelden stap 3) ────────────────────── */

.screen-dark {
  background: linear-gradient(175deg, var(--willow-deep) 0%, #111c16 100%);
  color: var(--surface);
}
.screen-dark .crumb { color: var(--willow-tint); }

.deel-title {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}
.deel-head {
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 60;
  font-weight: 360;
  font-style: italic;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-align: center;
  color: #e8dfcc;
  margin: 0 0 14px;
}

.qr-frame {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin: 0 auto 10px;
  width: min(210px, 72vw);
  display: block;
}

.team-code {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 20;
  font-size: 18px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clay-soft);
  text-align: center;
  margin-bottom: 4px;
}
.share-link {
  font-size: 9.5px;
  color: rgba(255, 255, 255, .3);
  text-align: center;
  letter-spacing: .03em;
  word-break: break-all;
  margin-bottom: 14px;
}

.lid-joined {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 10px 12px;
  flex-shrink: 0;
}
.lid-joined-head {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  font-weight: 600;
  margin-bottom: 8px;
}
.lid-avatars { display: flex; gap: 6px; flex-wrap: wrap; }
.lid-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--willow-tint);
  border: 1.5px solid var(--willow);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--willow-deep);
}
.lid-avatar.waiting {
  background: rgba(255, 255, 255, .06);
  border: 1.5px dashed rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .25);
  font-size: 16px;
}

/* Doorgaan-knop in het QR-scherm: begint transparant, wordt clay als leden aanwezig */
.btn-deel {
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .22);
}
.btn-deel.actief {
  background: var(--clay-soft);
  color: var(--surface);
  border: none;
}


/* ── Foto-upload ──────────────────────────────────────────── */
/* Gebruikt op aanmelden stap 4 en foto-opdrachten in fase 3. */

.foto-drop {
  border: 2px dashed var(--mute);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 140px;
}
.foto-drop:hover,
.foto-drop.hover { border-color: var(--clay); }
.foto-drop svg { width: 36px; height: 36px; color: var(--mute); }
.foto-drop p   { font-size: 13px; color: var(--mute); margin: 0; }
.foto-hint     { font-size: 11px; color: var(--mute); opacity: .7; }

.foto-preview {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-warm);
  position: relative;
  flex: 1;
  min-height: 140px;
}
.foto-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.foto-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(21, 32, 27, .55);
  color: var(--surface);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}


/* ── Voortgang-scherm (fase 4) ─────────────────────────────── */

/* Head-block met titel + stats-rij */
.head-block { margin: 4px 0 14px; }
.head-block .stats {
  display: flex;
  gap: 18px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--mute);
}
.head-block .stats b {
  color: var(--ink);
  font-weight: 600;
}

/* Status-regel onder current-box (bv. "Teamleider is bezig…") */
.current-box .curr-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--clay);
  margin-top: 6px;
  font-style: italic;
}
.current-box .curr-status svg { width: 11px; height: 11px; flex-shrink: 0; }

/* Lock-icoon in next-locked */
.next-locked .lock-svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--mute); }


/* ── Opdracht-scherm (fase 3) ─────────────────────────────── */

.opdracht-loc { margin: 6px 0 4px; }

/* Fout-feedback rij onder antwoord-veld */
.fout-rij {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(176, 83, 46, .08);
  border: 1px solid rgba(176, 83, 46, .25);
  border-radius: 10px;
  font-size: 12px;
  color: var(--clay);
  line-height: 1.4;
}

/* Kruis-icoon bij fout antwoord */
.wrong-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clay);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.wrong-mark-sm { width: 22px; height: 22px; font-size: 12px; }
.wrong-mark-big {
  width: 72px;
  height: 72px;
  font-size: 36px;
  box-shadow: 0 0 0 6px rgba(176, 83, 46, .12);
}

/* Check-cirkel bij juist antwoord */
.check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--willow);
  color: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px rgba(44, 74, 59, .12);
}
.check-circle svg { width: 36px; height: 36px; }
.check-circle-gold {
  background: linear-gradient(135deg, var(--clay) 0%, var(--clay-soft) 100%);
  box-shadow: 0 0 0 6px rgba(176, 83, 46, .15);
}

/* Hint-inhoud — getoond na koop */
.hint-inhoud {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--paper-warm);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Straftijd-blok: timer + label gecentreerd */
.straf-timer-wrap {
  text-align: center;
  margin: 18px 0 6px;
}
.straf-timer-wrap .countdown-num { display: block; }


/* ── Juist-scherm: reveal-kaarten ─────────────────────────── */

.reveal-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 18px 0 6px;
}
.reveal-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
}
.reveal-label {
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 700;
  margin-bottom: 6px;
}
.ltr-card .reveal-letter {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0;
  font-weight: 400;
  font-size: 72px;
  line-height: 1;
  color: var(--clay);
  letter-spacing: -.04em;
}
.loc-card {
  background: var(--paper-warm);
  border-color: var(--willow);
}
.loc-card .reveal-loc {
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 60;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  line-height: 1.1;
  color: var(--willow-deep);
}
.loc-card .reveal-loc-hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 8px 0 0;
  line-height: 1.5;
}


/* ── Minigame: badges + anagram-tegels ─────────────────────── */

.mini-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--willow-tint);
  color: var(--willow-deep);
  margin-bottom: 4px;
}
.mini-badge-clay {
  background: rgba(176, 83, 46, .12);
  color: var(--clay);
}

/* Slots waar letters in komen */
.answer-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 14px;
  min-height: 48px;
}
.ans-slot {
  width: 38px;
  height: 46px;
  border-radius: 8px;
  border: 1.5px dashed var(--mute);
  background: transparent;
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 40;
  font-weight: 500;
  font-size: 22px;
  color: var(--willow-deep);
  letter-spacing: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ans-slot.gevuld {
  background: var(--willow-tint);
  border: 1.5px solid var(--willow);
}

/* Letterpool */
.letter-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
}
.ltr-tile {
  width: 38px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  background: var(--surface);
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 40;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.ltr-tile:hover { transform: translateY(-1px); }
.ltr-tile.op {
  opacity: .25;
  cursor: default;
}
.ltr-tile:disabled { cursor: default; }

.btn-mini-reset {
  align-self: center;
  font-size: 11px;
  padding: 6px 12px;
  margin-bottom: 6px;
}


/* ── Wacht-scherm: aftikkende puntjes + klokicoon ─────────── */

.wacht-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--willow);
  background: var(--willow-tint);
  color: var(--willow-deep);
  display: grid;
  place-items: center;
  margin: 0 auto;
  animation: pulse 2.2s ease-in-out infinite;
}
.wacht-icon svg { width: 32px; height: 32px; }

.wacht-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
}
.wacht-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--willow);
  opacity: .3;
  animation: wachtPuls 1.4s ease-in-out infinite;
}
.wacht-dots span:nth-child(2) { animation-delay: .2s; }
.wacht-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes wachtPuls {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1.1);  }
}


/* ── Afgewezen-scherm: reden-blok ─────────────────────────── */

.afwijs-box {
  background: rgba(176, 83, 46, .07);
  border: 1px solid rgba(176, 83, 46, .25);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 18px 0 8px;
}
.afwijs-label {
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 700;
  margin-bottom: 4px;
}


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 620px) {
  .screen { padding: 24px 18px 40px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}
