/* ==================================================================
   KDK Weekend — diep zeeblauw, goud en terracotta.
   ================================================================== */
:root {
  --sea-900: #08202f;
  --sea-800: #0e2a3d;
  --sea-700: #144056;
  --sand: #f2ede1;
  --sand-dim: #cfc7b4;
  --gold: #e8b93b;
  --terra: #d8543f;
  --mint: #7fb069;
  --line: rgba(242, 237, 225, 0.16);
  --radius: 16px;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Outfit', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* Klassen als .primary-btn zetten display, en winnen het anders van het
   hidden-attribuut. Verborgen is verborgen. */
[hidden] { display: none !important; }
/* Geen vaste hoogte op de body: die zat vast op de vensterhoogte terwijl de
   inhoud langer was, waardoor er onderaan een strook zonder achtergrond
   overbleef. De achtergrond staat ook op html, zodat overscrollen op een
   telefoon nooit wit oplevert. */
html { background: var(--sea-900); }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--sand);
  background:
    radial-gradient(1100px 600px at 15% -10%, #1b5470 0%, transparent 60%),
    radial-gradient(900px 500px at 95% 5%, #4a2a3d 0%, transparent 55%),
    linear-gradient(180deg, var(--sea-800) 0%, var(--sea-900) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;   /* houdt rekening met de balken van een mobiele browser */
  -webkit-font-smoothing: antialiased;
}

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- kop ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--gold); font-size: 1rem; }
.brand-text {
  font-family: var(--display); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.8rem;
}
.brand-text em { font-style: italic; text-transform: none; letter-spacing: 0.02em; color: var(--sand-dim); }

.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.player-chip {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sand-dim); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

.lives { display: flex; gap: 3px; }
.heart { color: rgba(242, 237, 225, 0.2); font-size: 1.05rem; line-height: 1; }
.heart-on { color: var(--terra); text-shadow: 0 0 12px rgba(216, 84, 63, 0.5); }
.heart.small { font-size: 0.8rem; }

.keychain { display: flex; gap: 5px; }
.key {
  width: 24px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--display); font-weight: 700; font-size: 0.9rem;
  color: rgba(242, 237, 225, 0.3); background: rgba(0, 0, 0, 0.18);
}
.key-on {
  color: var(--sea-900); background: linear-gradient(170deg, #f5d271, var(--gold));
  border-color: transparent; box-shadow: 0 4px 14px rgba(232, 185, 59, 0.3);
}

/* ---------- knoppen ---------- */
.primary-btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  color: var(--sea-900); background: linear-gradient(170deg, #f5d271, var(--gold));
  border: none; border-radius: 999px; padding: 13px 30px; cursor: pointer;
  text-decoration: none; transition: transform 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 8px 22px rgba(232, 185, 59, 0.22);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); }
.primary-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.primary-btn.big { padding: 16px 40px; font-size: 1.05rem; margin-top: 10px; }

.ghost-btn {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--sand-dim); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.ghost-btn:hover { color: var(--sand); border-color: var(--sand-dim); }

/* ---------- schermen ---------- */
.view { flex: 1; display: flex; justify-content: center; padding: 30px 16px 44px; }

.screen { width: 100%; max-width: 620px; text-align: center; animation: rise 0.45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}

.display {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.6rem, 11vw, 4.2rem); line-height: 0.94;
  margin: 0 0 20px; letter-spacing: -0.02em;
}
.display.small { font-size: clamp(1.8rem, 8vw, 2.6rem); margin-bottom: 14px; }

.lede { font-size: 1.1rem; margin: 0 0 14px; font-weight: 300; }
.body { color: var(--sand-dim); line-height: 1.65; margin: 0 auto 14px; max-width: 46ch; font-weight: 300; }
.body.muted { font-size: 0.86rem; opacity: 0.72; }
.body strong { color: var(--sand); font-weight: 600; }

/* ---------- welkom ---------- */
.story {
  text-align: left; max-width: 46ch; margin: 0 auto 24px;
  color: var(--sand-dim); line-height: 1.7; font-weight: 300;
}
.story p { margin: 0 0 14px; }
.story p:first-child::first-letter {
  font-family: var(--display); font-weight: 900; font-size: 3rem;
  float: left; line-height: 0.82; padding: 4px 10px 0 0; color: var(--gold);
}

.rules {
  text-align: left; max-width: 46ch; margin: 0 auto 26px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.rules p { margin: 0 0 10px; font-size: 0.9rem; line-height: 1.6; color: var(--sand-dim); }
.rules p:last-child { margin: 0; }
.rules strong { color: var(--gold); font-weight: 600; }

.name-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.name-form .text-input { max-width: 260px; text-align: center; }

.text-input {
  font-family: var(--sans); font-size: 1rem; color: var(--sand);
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  border-radius: 999px; padding: 13px 18px; flex: 1;
}
.text-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- spelkop ---------- */
.puzzle-head { margin-bottom: 22px; }
.puzzle-title {
  font-family: var(--display); font-weight: 700; font-style: italic;
  font-size: clamp(1.8rem, 7vw, 2.5rem); margin: 0;
}
.puzzle-sub { margin: 4px 0 14px; font-size: 0.92rem; letter-spacing: 0.04em; color: var(--sand-dim); }

.stage { margin: 6px 0 14px; }
.status { min-height: 1.4em; font-size: 0.9rem; margin: 6px 0 12px; }
.status-bad { color: #f2a094; }
.status-neutral { color: var(--mint); }

.hint { margin-top: 8px; }
.hint-text {
  margin: 12px auto 0; max-width: 44ch; font-size: 0.88rem; color: var(--sand-dim);
  background: rgba(0, 0, 0, 0.22); border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0; padding: 12px 16px; text-align: left; line-height: 1.6;
}
.hint-text strong { color: var(--sand); }

/* ---------- spel 1: touw ---------- */
.rope-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rope-canvas {
  width: 100%; max-width: 330px; aspect-ratio: 320 / 430;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.25));
  border: 1px solid var(--line); border-radius: var(--radius);
  touch-action: manipulation; cursor: crosshair;
}
.rope-tip { font-size: 0.82rem; color: var(--sand-dim); margin: 0; }
.rope-bar { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- de schenkpuzzel ---------- */
.pour-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pour-jugs { display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.pour-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.jug {
  position: relative; width: 74px; padding: 0; overflow: hidden; cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--line);
  border-top: none;
  border-radius: 6px 6px 14px 14px;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.jug:hover { transform: translateY(-2px); }
.jug-active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 185, 59, 0.16); }
.jug-target { border-color: var(--mint); box-shadow: 0 0 18px rgba(127, 176, 105, 0.35); }

.jug-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #f2c14e, #d89b2a);
  transition: height 0.35s cubic-bezier(0.3, 0.9, 0.4, 1);
}
.jug-fill::after {
  content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 7px;
  background: #f7f1e2; border-radius: 50%; opacity: 0.9;
}
.jug-amount {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  color: var(--sand); font-variant-numeric: tabular-nums; line-height: 1;
}
.jug-amount-target { color: var(--mint); }
.jug-cap { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand-dim); }
.pour-col { gap: 6px; }

.pour-info { font-size: 0.85rem; color: var(--sand-dim); margin: 0; }
.pour-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- tussenscherm ---------- */
.interlude { max-width: 540px; }
.interlude-title {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1;
  margin: 0 0 26px; letter-spacing: -0.01em;
}
.interlude-body {
  color: var(--sand); font-weight: 300; line-height: 1.7;
  font-size: 1.02rem; margin: 0 auto 16px; max-width: 42ch;
}
.interlude-body:first-of-type { font-size: 1.15rem; }
.interlude-body:last-of-type {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: 1.3rem; color: var(--gold); margin-top: 26px;
}

/* ---------- de startlichten ---------- */
.start-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.start-panel {
  width: 100%; max-width: 360px; min-height: 250px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.22));
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; touch-action: manipulation; user-select: none;
  transition: border-color 0.12s, background 0.12s;
}
.start-panel-good { border-color: var(--mint); background: rgba(127, 176, 105, 0.12); }
.start-panel-bad { border-color: var(--terra); background: rgba(216, 84, 63, 0.12); }

.start-lights { display: flex; gap: 10px; }
.start-lamp {
  width: 34px; height: 34px; border-radius: 50%;
  background: #14222c; border: 2px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
  transition: background 0.06s linear, box-shadow 0.06s linear;
}
.start-lamp-on {
  background: radial-gradient(circle at 38% 32%, #ff8a72, #d8231a 62%);
  box-shadow: 0 0 22px rgba(216, 35, 26, 0.75), inset 0 2px 5px rgba(255, 255, 255, 0.35);
}

.start-time {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2rem, 9vw, 3rem); line-height: 1; min-height: 3rem;
  color: var(--sand-dim); font-variant-numeric: tabular-nums;
  display: flex; align-items: center;
}
.start-time-good { color: var(--mint); text-shadow: 0 0 24px rgba(127, 176, 105, 0.4); }
.start-time-bad { color: var(--terra); }

.start-word {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(0.95rem, 4vw, 1.15rem); letter-spacing: 0.16em;
  text-transform: uppercase; min-height: 1.5rem; color: var(--sand);
}
.start-readout { font-size: 0.85rem; color: var(--sand-dim); margin: 0; min-height: 1.2em; }

/* De plagerij mag je niet kunnen missen. */
.start-joke {
  font-family: var(--display); font-weight: 700; font-style: italic;
  font-size: clamp(1.25rem, 5.5vw, 1.75rem); line-height: 1.25;
  margin: 2px auto 0; max-width: 20ch; min-height: 0;
  animation: jokeIn 0.45s cubic-bezier(0.2, 1.3, 0.35, 1) both;
}
.start-joke:empty { display: none; }
.start-joke-bad { color: #f2a094; }
.start-joke-good { color: var(--mint); }
@keyframes jokeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- spel 3: codekraker ---------- */
.code-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.code-history {
  width: 100%; max-width: 340px; max-height: 230px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
}
.code-row-pegs { display: flex; gap: 6px; }
.code-current { display: flex; gap: 10px; }

.peg {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07); font-size: 1.3rem; cursor: pointer;
  display: grid; place-items: center; transition: transform 0.12s;
}
.peg:hover { transform: translateY(-2px); }
.peg-static { width: 26px; height: 26px; font-size: 0.85rem; cursor: default; border-radius: 7px; }
.sym-1 { color: #f2a094; } .sym-2 { color: #6fc3d8; } .sym-3 { color: var(--mint); }
.sym-4 { color: var(--gold); } .sym-5 { color: #c79bd8; } .sym-6 { color: #f2ede1; }

.code-marks { display: flex; gap: 4px; flex-wrap: wrap; max-width: 90px; justify-content: flex-end; }
.mark { width: 11px; height: 11px; border-radius: 50%; }
/* gevuld = raak op de goede plek, open randje = zit er wel in maar elders */
.mark-spot { background: var(--gold); box-shadow: 0 0 8px rgba(232, 185, 59, 0.5); }
.mark-else { background: transparent; border: 1.5px solid var(--sand-dim); }
.mark-none { font-size: 0.72rem; color: var(--sand-dim); }
.code-left { font-size: 0.85rem; color: var(--sand-dim); margin: 0; }
.code-legend {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center;
  font-size: 0.78rem; color: var(--sand-dim); margin: 0;
}
.code-legend .mark { margin-left: 6px; }
.code-legend .mark:first-child { margin-left: 0; }

/* ---------- spel 4: lichten ---------- */
.lights-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lights-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 280px; }
.lamp {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05); cursor: pointer; transition: background 0.18s, box-shadow 0.18s;
}
.lamp-on {
  background: linear-gradient(160deg, #f5d271, var(--gold));
  border-color: transparent; box-shadow: 0 0 22px rgba(232, 185, 59, 0.45);
}
.lights-moves { font-size: 0.85rem; color: var(--sand-dim); margin: 0; }

/* ---------- spel 5: schuifpuzzel ---------- */
.slide-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.slide-board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: 100%; max-width: 260px; padding: 8px;
  background: rgba(0, 0, 0, 0.26); border: 1px solid var(--line); border-radius: 14px;
}
.slide-tile {
  aspect-ratio: 1; border: none; border-radius: 10px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--sea-900);
  background: linear-gradient(160deg, #f7f3e8, #d9d2bf);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); transition: transform 0.1s;
}
.slide-tile:hover:not(:disabled) { transform: translateY(-2px); }
.slide-gap { background: transparent; box-shadow: none; cursor: default; }

/* ---------- kluis ---------- */
.anagram { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.slot-row, .tile-bank { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.slot {
  width: 52px; height: 64px; display: grid; place-items: center;
  border: 1px dashed var(--line); border-radius: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.7rem; background: rgba(0, 0, 0, 0.2);
}
.slot-filled { border-style: solid; border-color: var(--sand-dim); cursor: pointer; }
.slot-row-ok .slot { border-color: var(--mint); color: var(--mint); }

.tile {
  width: 46px; height: 52px; font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  color: var(--sea-900); background: var(--sand); border: none; border-radius: 10px;
  cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); transition: transform 0.12s, opacity 0.2s;
}
.tile:hover:not(:disabled) { transform: translateY(-2px); }
.tile-gold { background: linear-gradient(170deg, #f5d271, var(--gold)); }
.tile-used { opacity: 0; pointer-events: none; }

/* ---------- beloning en verlies ---------- */
.reward-title {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(1.5rem, 6vw, 2.1rem); margin: 0 0 20px;
}
.big-letter {
  font-family: var(--display); font-weight: 900; font-size: clamp(5rem, 22vw, 8rem);
  line-height: 1; color: var(--gold); margin: 0 0 18px;
  text-shadow: 0 10px 40px rgba(232, 185, 59, 0.3);
  animation: pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } to { opacity: 1; transform: none; } }

.broken-heart {
  font-size: clamp(3.5rem, 16vw, 5rem); color: var(--terra); line-height: 1; margin-bottom: 10px;
  animation: crack 0.6s ease both;
}
@keyframes crack {
  0% { transform: scale(1.3); opacity: 0; }
  40% { transform: scale(1) rotate(-6deg); opacity: 1; }
  100% { transform: scale(0.92) rotate(3deg); opacity: 0.85; }
}
.lives-left { color: var(--gold); font-size: 0.95rem; margin: 0 0 6px; }

.lock-icon { font-size: 3.4rem; margin-bottom: 12px; }

/* ---------- scorebord ---------- */
.board-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; text-align: left; }
.board-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px;
}
.board-me { border-color: rgba(232, 185, 59, 0.55); background: rgba(232, 185, 59, 0.08); }
.board-rank {
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  color: var(--sand-dim); width: 18px; flex: none;
}
.board-who { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board-name { font-weight: 600; font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-sub { font-size: 0.75rem; color: var(--sand-dim); }
.board-sub-locked { color: var(--terra); }
.board-bar {
  width: 58px; height: 5px; flex: none; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); overflow: hidden;
}
.board-bar-fill { height: 100%; background: linear-gradient(90deg, var(--terra), var(--gold)); }
.board-hearts { display: flex; gap: 2px; flex: none; }
.board-note { font-size: 0.8rem; color: var(--sand-dim); line-height: 1.6; margin: 14px 0 0; }

/* ---------- onthulling ---------- */
.destination {
  font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 10vw, 4rem);
  line-height: 1; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 0 0.28em; justify-content: center;
}
.destination-word {
  display: inline-block; opacity: 0;
  animation: dropIn 0.7s cubic-bezier(0.2, 1.3, 0.3, 1) both;
  background: linear-gradient(120deg, #f7dd93, var(--gold) 55%, var(--terra));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-24px) scale(0.85); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 26px 0; }
.fact {
  background: rgba(0, 0, 0, 0.24); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 5px;
}
.fact-key { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.fact-value { font-size: 0.95rem; }

.countdown { display: flex; gap: 10px; justify-content: center; margin: 4px 0 24px; }
.count-box {
  min-width: 78px; padding: 12px 8px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.count-n { font-family: var(--display); font-weight: 900; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.count-u { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand-dim); }

.packing { margin-bottom: 24px; }
.packing-head { font-family: var(--display); font-style: italic; font-size: 1.1rem; margin: 0 0 12px; }
.packing-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.packing-list li { font-size: 0.85rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--sand-dim); }

/* ---------- voet ---------- */
.footer {
  padding: 10px 16px 16px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.footer-row {
  display: flex; align-items: center; gap: 14px; justify-content: center; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand-dim);
}
.progress { width: min(420px, 100%); height: 3px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--terra), var(--gold)); transition: width 0.5s ease; }

/* ---------- nepadvertenties ---------- */
.ad-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 12, 18, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: adIn 0.2s ease both;
}
.ad-weg { animation: adUit 0.2s ease both; }
@keyframes adIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes adUit { to { opacity: 0; } }

.ad-shell {
  position: relative; width: 100%; max-width: 420px;
  background: #0f1b24; border: 1px solid rgba(242, 237, 225, 0.14);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.ad-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(242, 237, 225, 0.1);
}
.ad-top-links { display: flex; align-items: center; gap: 7px; }
.ad-label {
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #0f1b24; background: #d9d2bf; border-radius: 3px; padding: 2px 6px; font-weight: 600;
}
.ad-info {
  width: 16px; height: 16px; border-radius: 50%; padding: 0; line-height: 1;
  font-size: 0.6rem; font-family: Georgia, serif;
  color: var(--sand-dim); background: transparent;
  border: 1px solid rgba(242, 237, 225, 0.35); cursor: pointer;
}
.ad-skip {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--sand-dim); background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(242, 237, 225, 0.2); border-radius: 999px;
  padding: 5px 12px; cursor: default; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ad-skip-klaar { color: var(--sand); border-color: var(--sand); cursor: pointer; }

.ad-body { min-height: 260px; display: flex; align-items: center; justify-content: center; }

.ad-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; }
.ad-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(242, 237, 225, 0.18); border-top-color: var(--sand-dim);
  animation: adSpin 0.8s linear infinite;
}
@keyframes adSpin { to { transform: rotate(360deg); } }
.ad-loading-tekst { font-size: 0.85rem; color: var(--sand-dim); margin: 0; }
.ad-retry {
  font-family: var(--sans); font-size: 0.8rem; color: var(--sand);
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 16px; cursor: pointer;
}

.ad-media { position: relative; width: 100%; background: #000; }
.ad-media video { display: block; width: 100%; max-height: 52vh; object-fit: contain; }
.ad-sound {
  position: absolute; left: 10px; bottom: 14px;
  font-family: var(--sans); font-size: 0.7rem; color: #fff;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px; padding: 5px 11px; cursor: pointer;
}
.ad-timer {
  position: absolute; right: 10px; bottom: 14px;
  font-size: 0.7rem; color: #fff; background: rgba(0, 0, 0, 0.55);
  border-radius: 4px; padding: 3px 7px; font-variant-numeric: tabular-nums;
}
.ad-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.2); }
.ad-progress-fill { height: 100%; width: 0; background: #e8b93b; }

.ad-banner {
  width: 100%; padding: 32px 24px; text-align: left;
  background: linear-gradient(150deg, var(--ad-kleur), #0f1b24 130%);
}
.ad-banner-merk {
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75); margin-bottom: 10px;
}
.ad-banner-kop {
  font-family: var(--display); font-weight: 900; font-size: 1.5rem;
  line-height: 1.1; margin: 0 0 10px; color: #fff;
}
.ad-banner-tekst { font-size: 0.9rem; line-height: 1.55; color: rgba(255, 255, 255, 0.85); margin: 0; }

.ad-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(242, 237, 225, 0.1);
}
.ad-sponsor { font-size: 0.72rem; color: var(--sand-dim); }
.ad-cta {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: #0f1b24;
  background: var(--sand); border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  white-space: nowrap;
}
.ad-id {
  margin: 0; padding: 6px 12px 8px; font-size: 0.6rem;
  color: rgba(242, 237, 225, 0.3); letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.25);
}
.ad-dev { margin: 10px auto 12px; }

.ad-toast {
  position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85); color: var(--sand); font-size: 0.8rem;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap; max-width: 90%;
}

@media (max-width: 480px) {
  .ad-shell { max-width: 100%; }
  .ad-banner { padding: 26px 18px; }
  .ad-banner-kop { font-size: 1.3rem; }
}

/* ---------- ontwikkelknop ---------- */
.dev-skip {
  display: block; margin: 26px auto 0;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(242, 237, 225, 0.45);
  background: transparent; border: 1px dashed rgba(242, 237, 225, 0.3);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.dev-skip:hover { color: var(--sand); border-color: var(--sand-dim); }

/* ---------- fouten ---------- */
.shake { animation: shake 0.35s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(4px); }
  50% { transform: translateX(-5px); }
}

/* ---------- telefoon ---------- */
@media (max-width: 480px) {
  .view { padding: 22px 14px 36px; }
  .topbar { padding: 10px 14px; }
  .peg { width: 40px; height: 40px; font-size: 1.15rem; }
  .start-lamp { width: 28px; height: 28px; }
  .start-lights { gap: 8px; }
  .jug { width: 62px; }
  .slot { width: 46px; height: 56px; font-size: 1.45rem; }
  .tile { width: 42px; height: 48px; }
  .count-box { min-width: 66px; }
  .board-row { padding: 10px 11px; gap: 9px; }
  .story p:first-child::first-letter { font-size: 2.6rem; }
}

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