@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-opsz.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* PlayFood Kook mee-speler.
 * Fonts en palet uit Roy's definitieve branding (brand/roy-final/PLAYFOOD BRANDING ASSETS/).
 * Alleen de zeven paletkleuren; schaduwen en de achtergrond achter kaarten zijn Olive met transparantie.
 * Beide fonts bestaan alleen in Regular: geen vet, nadruk via grootte en kleur.
 */
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight-latin-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
:root {
  --flour: #FBFAF2;
  --pear: #F1F3CB;
  --olive-oil: #D1E031;
  --lemon: #FFE745;
  --pistachio: #9FEE80;
  --pumpkin: #F7A600;
  --olive: #494C0E;

  --kop: "Newsreader", Georgia, serif;
  /* Koppen iets voller: live vervangt build.sh Quadrant door Newsreader (variabel, opsz 6–72, wght 400–500).
     Quadrant zelf heeft alleen Regular en negeert dit (font-synthesis: none). */
  --kop-w: 500;
  --tekst: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;

  --tap: 64px;
  --r: 18px;
  --schaduw: 0 14px 30px rgb(73 76 14 / 0.18);
  --schaduw-sterk: 0 22px 50px rgb(73 76 14 / 0.3);
  --header: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--flour);
  color: var(--olive);
  font: 400 18px/1.45 var(--tekst);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3 { font-family: var(--kop); font-weight: var(--kop-w); letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
kbd { font: 13px/1 var(--tekst); padding: 3px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .75; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--tap); min-width: var(--tap); padding: 0 24px;
  border: 0; border-radius: 16px;
  background: var(--pear); color: var(--olive);
  font-family: var(--kop); font-weight: var(--kop-w); font-size: 21px; letter-spacing: -0.01em;
  cursor: pointer; touch-action: manipulation; user-select: none;
  transition: transform .12s ease, filter .12s ease, background-color .2s;
}
.btn:active { transform: scale(0.97); filter: brightness(0.94); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2.5px currentColor; }
.btn-go { background: var(--pistachio); }
.btn-huge { min-height: 88px; padding: 0 40px; font-size: 32px; border-radius: 24px; box-shadow: var(--schaduw); }
.btn-round { border-radius: 18px; padding: 0; flex: none; }

.play-icon { width: 26px; height: 30px; background: currentColor; clip-path: polygon(8% 0, 100% 50%, 8% 100%); display: inline-block; }
.is-playing .play-icon { clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0); }

/* ---------- kop ---------- */
.top {
  height: var(--header);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; padding-left: max(20px, env(safe-area-inset-left));
  background: var(--olive-oil);
}
.top-logo { width: 132px; height: auto; flex: none; }
.top-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.1; }
.top-kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
#ep-title { font: var(--kop-w) 22px/1.1 var(--kop); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-mark { display: none; width: 30px; height: auto; flex: none; }
.btn-icon { flex: none; width: 52px; height: 52px; min-width: 0; min-height: 0; padding: 0; border-radius: 16px; background: var(--pear); }
.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.menu {
  position: fixed; z-index: 45; top: calc(var(--header) - 6px); right: 12px;
  min-width: 250px; padding: 8px; border-radius: 18px;
  background: var(--flour); box-shadow: var(--schaduw-sterk);
  display: flex; flex-direction: column; gap: 4px;
}
.menu-wake { margin: 4px 10px 6px; font-size: 15px; }
.menu-wake:empty { display: none; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--pear);
  font: var(--kop-w) 19px/1.2 var(--kop); text-align: left; cursor: pointer;
}
.menu-item small { font: 400 14px/1.2 var(--tekst); }


.timer-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border: 0; border-radius: 18px;
  background: var(--olive); color: var(--lemon);
  font: var(--kop-w) 24px/1 var(--kop); font-variant-numeric: tabular-nums; cursor: pointer;
  box-shadow: var(--schaduw);
}

/* ---------- cover vóór het afspelen ---------- */
.cover {
  position: fixed; inset: 0; z-index: 40;
  display: grid; grid-template-rows: 38dvh auto; align-content: start;
  background: var(--flour);
  overflow-y: auto;
}
.cover-img { position: relative; background: var(--pear); overflow: hidden; }
.cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.cover-text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 22px 22px calc(24px + var(--safe-b));
}
.cover-logo { width: 124px; height: auto; margin-bottom: 2px; }
.cover-kicker { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.cover h1 { font-size: clamp(42px, 9vw, 92px); line-height: .98; }
.cover-with { margin: 2px 0 4px; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.3; }
.cover-tags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.cover-tags li { padding: 7px 13px; border-radius: 8px; background: var(--lemon); font: var(--kop-w) 18px/1.2 var(--kop); rotate: -1.5deg; }
.cover-tags li + li { background: var(--pistachio); rotate: 1deg; }
.cover .btn-huge { align-self: stretch; }
.cover-hint { margin: 4px 0 0; font-size: 16px; max-width: 42ch; }

/* ---------- podium ---------- */
.stage { display: block; }
.watch { background: var(--flour); }

.screen {
  position: relative; container-type: inline-size;
  aspect-ratio: 16 / 9;
  background: var(--olive);
  overflow: hidden;
}
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }

.screen {
  /* 1 'videopixel' bij 1080p, zodat label en merkje meeschalen zoals graphics v0.2; met ondergrens voor de telefoon */
  --u: calc(100cqi / 1920);
  --pb: max(8px, calc(72 * var(--u)));
  --ph: max(26px, calc(56 * var(--u)));
  --gap: max(6px, calc(16 * var(--u)));
  --rr: max(8px, calc(18 * var(--u)));
}
.cue {
  position: absolute; left: max(10px, calc(80 * var(--u))); bottom: calc(var(--pb) + var(--ph) + var(--gap));
  display: flex; align-items: center; gap: max(6px, calc(16 * var(--u)));
  min-height: max(36px, calc(100 * var(--u))); max-width: 88%;
  padding: 4px max(12px, calc(34 * var(--u))) 4px max(8px, calc(22 * var(--u)));
  border-radius: var(--rr);
  background: var(--pumpkin); color: var(--olive);
  font: var(--kop-w) max(15px, calc(60 * var(--u)))/1.1 var(--kop); letter-spacing: -0.015em;
  rotate: -2.5deg; transform-origin: 0% 100%;
  box-shadow: 0 calc(22 * var(--u)) calc(50 * var(--u)) rgb(73 76 14 / 0.3);
  pointer-events: none;
}
.cue.anim { animation: cue-in .35s cubic-bezier(.34, 1.7, .5, 1) both; }
.who { position: relative; flex: none; height: max(24px, calc(66 * var(--u))); aspect-ratio: 385 / 457; }
.who[data-fig="spoon-02"] { height: max(26px, calc(72 * var(--u))); aspect-ratio: 533 / 1009; }
.who img, .prog-fig img { position: absolute; inset: 0; width: 100%; height: 100%; }
.who .who-b, .prog-fig .who-b { opacity: 0; }
/* figuurtje kijkt om na 0,9 s, zoals in de graphics */
.cue.anim .who-a { animation: fig-hide 0s .9s forwards; }
.cue.anim .who-b { animation: fig-show 0s .9s forwards; }
.prog.anim .prog-fig .who-a { animation: fig-hide 0s .6s forwards, fig-show 0s 1.4s forwards; }
.prog.anim .prog-fig .who-b { animation: fig-show 0s .6s forwards, fig-hide 0s 1.4s forwards; }
@keyframes fig-hide { to { opacity: 0; } }
@keyframes fig-show { to { opacity: 1; } }
@keyframes cue-in { from { transform: translateY(14px) scale(.85); opacity: 0; } }

/* naamkaartje: Olive vlak, naam in Quadrant (Lemon), sub in Alte Haas (Pumpkin); kinderen met leeftijd */
.namecue {
  position: absolute; left: max(10px, calc(80 * var(--u))); bottom: calc(var(--pb) + var(--ph) + var(--gap));
  display: flex; align-items: baseline; gap: max(8px, calc(18 * var(--u)));
  min-height: max(36px, calc(100 * var(--u))); max-width: 88%;
  padding: 4px max(14px, calc(34 * var(--u))) 4px max(12px, calc(28 * var(--u)));
  align-items: center;
  border-radius: var(--rr); background: var(--olive); color: var(--lemon);
  box-shadow: inset max(5px, calc(12 * var(--u))) 0 0 var(--lemon), 0 calc(22 * var(--u)) calc(50 * var(--u)) rgb(73 76 14 / 0.3);
  padding-left: max(18px, calc(44 * var(--u)));
  rotate: -2.5deg; transform-origin: 0% 100%; pointer-events: none; white-space: nowrap;
}
.namecue.is-kid { box-shadow: inset max(5px, calc(12 * var(--u))) 0 0 var(--pumpkin), 0 calc(22 * var(--u)) calc(50 * var(--u)) rgb(73 76 14 / 0.3); }
.namecue.anim { animation: cue-in .35s cubic-bezier(.34, 1.7, .5, 1) both; }
.nc-name { font: var(--kop-w) max(17px, calc(60 * var(--u)))/1.1 var(--kop); letter-spacing: -0.015em; }
.nc-sub { font: 400 max(13px, calc(36 * var(--u)))/1.1 var(--tekst); color: var(--flour); }
.nc-sub:empty { display: none; }

/* voortgangsmerkje: Olive vlak, Pumpkin citroentje en vijf streepjes */
.prog {
  position: absolute; left: max(10px, calc(80 * var(--u))); bottom: var(--pb); height: var(--ph);
  pointer-events: none; filter: drop-shadow(0 calc(10 * var(--u)) calc(22 * var(--u)) rgb(73 76 14 / 0.28));
}
.prog-core {
  position: relative; z-index: 2; height: 100%;
  display: flex; align-items: center; gap: max(6px, calc(12 * var(--u)));
  padding: 0 max(9px, calc(20 * var(--u))); border-radius: var(--rr); background: var(--olive);
}
.prog-fig { position: relative; height: max(15px, calc(30 * var(--u))); aspect-ratio: 541 / 718; }
.prog-dashes { display: flex; gap: max(3px, calc(7 * var(--u))); }
.prog-dashes i { width: max(9px, calc(22 * var(--u))); height: max(4px, calc(8 * var(--u))); border-radius: max(2px, calc(4 * var(--u))); background: var(--pumpkin); opacity: .28; transition: opacity .25s; }
.prog-dashes i.done { opacity: .55; }
.prog-dashes i.now { opacity: 1; }
.prog-clip { position: absolute; z-index: 1; top: 0; left: calc(100% - max(20px, calc(48 * var(--u)))); height: 100%; width: 80cqi; overflow: hidden; }
.prog-ext {
  display: inline-flex; align-items: baseline; gap: max(6px, calc(12 * var(--u))); height: 100%;
  padding: 0 max(12px, calc(28 * var(--u))) 0 max(26px, calc(60 * var(--u)));
  border-radius: var(--rr); background: var(--olive); color: var(--pumpkin); white-space: nowrap;
  align-items: center; transform: translateX(-101%); transition: transform .45s cubic-bezier(.45, 0, .2, 1);
}
.prog.is-out .prog-ext { transform: none; transition-duration: .5s; transition-timing-function: cubic-bezier(.22, 1, .36, 1); }
.prog-ext .k, .prog-ext .s { font: 400 max(12px, calc(28 * var(--u)))/1 var(--tekst); opacity: .85; }
.prog-ext .s { opacity: .5; }
.prog-ext .n { font: var(--kop-w) max(14px, calc(34 * var(--u)))/1 var(--kop); letter-spacing: -0.01em; }

.tap-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 112px; height: 112px; border-radius: 28px; border: 0;
  background: var(--flour); color: var(--olive);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--schaduw-sterk);
}
.tap-play .play-icon { width: 40px; height: 46px; margin-left: 8px; }

/* bediening: tijdlijn bovenaan de rij (telefoon) of ertussen (iPad), nooit over elkaar */
.controls {
  display: grid; align-items: center; gap: 4px 12px; padding: 6px 16px 12px;
  grid-template-columns: auto auto 1fr auto auto;
  grid-template-areas: "seek seek seek seek seek" "back play clock speed note";
}
.seek { grid-area: seek; }
#back10 { grid-area: back; }
#playpause { grid-area: play; }
.clock { grid-area: clock; }
#note-open { grid-area: note; }
#speed { grid-area: speed; }
.btn-speed { min-width: 64px; height: 56px; padding: 0 12px; border-radius: 16px; font-size: 20px; font-variant-numeric: tabular-nums; }
.btn-speed.is-fast { background: var(--olive); color: var(--lemon); }
/* versies (alleen voor makers) */
.ver-chip {
  flex: none; max-width: 40vw; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px;
  background: var(--olive); color: var(--lemon); font: 400 15px/1 var(--tekst);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.menu-label { margin: 10px 10px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.menu-version-list { display: flex; flex-direction: column; gap: 4px; }
.menu-version[aria-pressed="true"] { background: var(--olive); color: var(--flour); }
.menu-version[aria-pressed="true"] small { color: var(--lemon); }
/* niet-interactieve versie: alleen video en tijdlijn */
body.is-plain .chapters, body.is-plain .prog, body.is-plain .seek-pauses, body.is-plain .seek-chapters { display: none; }
body.is-plain .step { cursor: default; opacity: .85; }
#back10 { width: var(--tap); height: var(--tap); flex-direction: column; gap: 0; line-height: 1; }
#back10 .back-icon { font-size: 26px; font-family: var(--tekst); }
#back10 small { font-size: 13px; font-family: var(--tekst); }
.btn-play { width: 68px; height: 68px; background: var(--olive); color: var(--flour); box-shadow: var(--schaduw); }
.btn-play .play-icon { margin-left: 5px; }
.btn-play.is-playing .play-icon { margin-left: 0; width: 24px; }

/* Tijdlijn: dun spoor met hoofdstuk-onderbrekingen; pauzes als stipjes erboven, vrij van de schuifknop */
.seek { position: relative; height: 52px; min-width: 80px; }
.seek-track { position: absolute; left: 0; right: 0; top: 32px; height: 8px; translate: 0 -50%; border-radius: 4px; background: var(--pear); overflow: hidden; }
.seek-fill { height: 100%; width: 0; background: var(--olive); }
.seek-chapters { position: absolute; inset: 0; }
.gap { position: absolute; top: 0; bottom: 0; width: 3px; translate: -50% 0; background: var(--flour); }
.seek-pauses { position: absolute; left: 0; right: 0; top: 6px; height: 12px; pointer-events: none; }
.pdot { position: absolute; top: 3px; width: 14px; height: 6px; translate: -50% 0; border-radius: 3px; background: var(--pumpkin); }
.pdot-freeze { background: var(--olive); }
.seek input {
  position: absolute; left: 0; right: 0; top: 12px; height: 40px; width: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; touch-action: none;
}
.seek input::-webkit-slider-runnable-track { height: 40px; background: transparent; }
.seek input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 30px; margin-top: 5px; border-radius: 6px;
  background: var(--olive); border: 4px solid var(--flour); box-shadow: 0 2px 6px rgb(73 76 14 / .35);
}
.seek input::-moz-range-thumb { width: 12px; height: 24px; border-radius: 6px; background: var(--olive); border: 4px solid var(--flour); }
.seek input::-moz-range-track { background: transparent; }
.clock { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-note { min-height: 52px; padding: 0 16px; gap: 8px; font-size: 18px; background: var(--lemon); }
.btn-note .pen { font-family: var(--tekst); font-size: 20px; }

/* afsluiting zonder nummer (bv. Proeven): zelfde chip, zonder cijfer */
.chapter-extra { min-width: 0; padding-left: 16px; }
.step-extra .step-name { padding-left: 2px; }

/* stappen: horizontale strook met scroll-snap; de rand vervaagt alleen waar nog meer staat */
.chapters {
  position: relative;
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px;
  padding: 2px 16px 12px; scrollbar-width: none;
}
.chapters::-webkit-scrollbar { display: none; }
.chapters.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chapters.more-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px); mask-image: linear-gradient(to right, transparent, #000 28px); }
.chapters.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.chapter {
  position: relative; flex: none; scroll-snap-align: start;
  display: flex; align-items: center; gap: 10px;
  min-height: 64px; min-width: 128px; max-width: 220px; padding: 8px 16px 12px 8px;
  border: 0; border-radius: var(--r); background: var(--pear);
  text-align: left; cursor: pointer; overflow: hidden; touch-action: manipulation;
}
.chapter:last-child { margin-right: 16px; }
.chapter-num {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--flour); font: var(--kop-w) 19px/1 var(--kop);
}
.chapter-name { font: 400 16px/1.2 var(--tekst); }
.chapter::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: var(--p, 0%);
  background: var(--olive-oil); transition: width .25s linear; opacity: 0;
}
.chapter.is-current { background: var(--olive); color: var(--flour); }
.chapter.is-current .chapter-num { background: var(--olive-oil); color: var(--olive); }
.chapter.is-current::after { opacity: 1; }

/* ---------- recept ---------- */
.recipe { padding: 8px 16px calc(32px + var(--safe-b)); }
.tabs {
  display: flex; gap: 4px; padding: 5px; margin-bottom: 18px;
  background: var(--pear); border-radius: 20px;
}
.tab {
  flex: 1 1 auto; min-width: 0; min-height: var(--tap); padding: 0 8px;
  border: 0; border-radius: 15px; background: transparent;
  font: var(--kop-w) 17px/1.1 var(--kop); cursor: pointer; touch-action: manipulation;
}
.tab[aria-selected="true"] { background: var(--olive); color: var(--flour); }
.panel h3 { font-size: 23px; margin: 22px 0 8px; }

.stepper {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 16px; border-radius: 20px; background: var(--pear);
}
.stepper-val { flex: 1; font: var(--kop-w) 30px/1 var(--kop); font-variant-numeric: tabular-nums; }
.stepper-val small { font: 400 18px/1 var(--tekst); margin-left: 4px; }
.btn-step { width: 64px; height: 64px; border-radius: 14px; padding: 0; font-size: 36px; line-height: 1; background: var(--olive-oil); }

.ingredients, .tools { list-style: none; margin: 0; padding: 0; }
.ing {
  width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 2px;
  border: 0; border-bottom: 2px dotted var(--olive-oil); background: transparent;
  font: 400 19px/1.3 var(--tekst); text-align: left; cursor: pointer; touch-action: manipulation;
}
.ingredients li:last-child .ing { border-bottom: 0; }
.ing .check { width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 2.5px var(--olive); }
.ing-qty { flex: none; min-width: 64px; font: var(--kop-w) 21px/1.2 var(--kop); font-variant-numeric: tabular-nums; }
.ing[aria-pressed="true"] .ing-qty, .ing[aria-pressed="true"] .ing-name { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .6; }
.ing[aria-pressed="true"] .check { background: var(--olive); }
.ing[aria-pressed="true"] .check::after { content: ""; position: absolute; left: 7px; top: 6px; width: 11px; height: 6px; border-left: 3px solid var(--flour); border-bottom: 3px solid var(--flour); rotate: -45deg; }
.tools li { padding: 8px 2px 8px 26px; position: relative; font-size: 18px; }
.tools li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 9px; height: 9px; border-radius: 2px; background: var(--pumpkin); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step {
  width: 100%; min-height: var(--tap); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  border: 0; border-radius: var(--r); background: var(--pear);
  cursor: pointer; touch-action: manipulation;
}
.step-head { display: flex; align-items: center; gap: 12px; }
.step-num { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--flour); font: var(--kop-w) 20px/1 var(--kop); }
.step-name { flex: 1; font: var(--kop-w) 21px/1.15 var(--kop); }
.step-tip { font-size: 17px; line-height: 1.35; padding: 8px 10px; border-radius: 10px; background: var(--flour); }
.step-tip strong { font-family: var(--kop); font-weight: 400; }
.tip-freeze { background: var(--lemon); }
.step.is-current { background: var(--olive); color: var(--flour); box-shadow: var(--schaduw); }
.step.is-current .step-num { background: var(--olive-oil); color: var(--olive); }
.step.is-current .step-tip { color: var(--olive); }

.about-title { font-size: 38px; }
.about-sub { margin: 6px 0 14px; font-size: 19px; }
.tags { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 8px; background: var(--lemon); font: var(--kop-w) 18px/1.2 var(--kop); }
.tag:nth-child(2n) { background: var(--pistachio); }
.about-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.about-list dt { font-family: var(--kop); }
.about-list dd { margin: 0; }

/* ---------- pauzekaart ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, var(--safe-b));
  background: rgb(73 76 14 / .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  animation: fade .2s ease both;
}
@keyframes fade { from { opacity: 0; } }
.card {
  width: min(780px, 100%); max-height: 100%;
  display: flex; flex-direction: column;
  border-radius: 30px; background: var(--flour);
  box-shadow: var(--schaduw-sterk);
  overflow: hidden;
  animation: card-in .45s cubic-bezier(.25, 1.4, .5, 1) both;
}
@keyframes card-in { from { transform: translateY(40px) scale(.92) rotate(-2deg); opacity: 0; } }
.card-scroll { overflow-y: auto; padding: 30px 32px 10px; -webkit-overflow-scrolling: touch; }
.card-tag {
  display: block; width: fit-content; margin-bottom: 14px; padding: 7px 14px; border-radius: 8px;
  background: var(--olive); color: var(--lemon);
  font: var(--kop-w) 19px/1.1 var(--kop); rotate: -2deg;
}
.card-title { font-size: clamp(42px, 7.4vw, 80px); margin-bottom: 14px; }
.card-body { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; max-width: 30ch; }
.card-body:empty { display: none; }
.card-est { margin: 14px 0 0; font-size: 18px; }
.card-actions { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; }
.card-actions .btn-ghost { min-height: var(--tap); font-size: 21px; }

.btn-done {
  min-height: 120px; width: 100%;
  border-radius: 24px; background: var(--pistachio); color: var(--olive);
  font-size: clamp(36px, 6vw, 56px); box-shadow: 0 8px 0 rgb(73 76 14 / .25);
}
.btn-done:active { transform: translateY(4px); box-shadow: 0 4px 0 rgb(73 76 14 / .25); }
.btn-timer { min-height: 104px; width: 100%; border-radius: 24px; background: var(--olive); color: var(--lemon); font-size: clamp(24px, 3.6vw, 34px); box-shadow: 0 8px 0 rgb(73 76 14 / .25); }
.icon-check { width: .9em; height: .5em; border-left: .14em solid currentColor; border-bottom: .14em solid currentColor; rotate: -45deg; translate: 0 -.12em; }
.icon-play { width: .62em; height: .72em; background: currentColor; clip-path: polygon(8% 0, 100% 50%, 8% 100%); }
.icon-camera {
  width: 1em; height: .72em; border-radius: .14em; background: currentColor;
  -webkit-mask: radial-gradient(circle at 50% 55%, transparent .19em, #000 .2em);
  mask: radial-gradient(circle at 50% 55%, transparent .19em, #000 .2em);
}

/* FREEZE: Lemon, met wat tover-sterretjes */
.card[data-kind="freeze"] { background: var(--lemon); }
.card[data-kind="freeze"] .card-tag { background: var(--olive); color: var(--lemon); }
.card[data-kind="freeze"] .card-title { position: relative; display: inline-block; animation: freeze-pop .6s .1s cubic-bezier(.2, 1.6, .4, 1) both; }
.card[data-kind="freeze"] .card-title::after { content: "✦"; position: absolute; right: -.7em; top: -.25em; font-size: .5em; color: var(--pumpkin); animation: twinkle 1.6s ease-in-out infinite; }
.card[data-kind="freeze"] .card-scroll { background: radial-gradient(circle at 92% 12%, var(--flour) 0 60px, transparent 61px), radial-gradient(circle at 84% 30%, var(--pear) 0 16px, transparent 17px); }
@keyframes freeze-pop { 0% { transform: scale(.6) rotate(-6deg); } 60% { transform: scale(1.08) rotate(2deg); } 100% { transform: none; } }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.7) rotate(20deg); } }

.card[data-kind="prep"] { background: var(--pear); }
.prep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 20px; }
.prep-item {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 14px;
  border: 0; border-radius: 14px; background: var(--flour); text-align: left; cursor: pointer; font-size: 18px;
  touch-action: manipulation;
}
.prep-item .ing-qty { min-width: 0; font-size: 19px; }
.check { flex: none; width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 3px var(--olive); position: relative; }
.prep-item[aria-pressed="true"] { background: var(--pistachio); }
.prep-item[aria-pressed="true"] .ing-name { text-decoration: line-through; text-decoration-thickness: 2px; }
.prep-item[aria-pressed="true"] .check { background: var(--olive); }
.prep-item[aria-pressed="true"] .check::after { content: ""; position: absolute; left: 8px; top: 7px; width: 13px; height: 7px; border-left: 3.5px solid var(--flour); border-bottom: 3.5px solid var(--flour); rotate: -45deg; }

.card[data-kind="timer"] { background: var(--flour); }
.countdown { margin-top: 18px; }
.countdown-time { display: block; font: var(--kop-w) clamp(64px, min(16vw, 15vh), 150px)/1 var(--kop); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.countdown-bar { display: block; height: 16px; margin-top: 12px; border-radius: 8px; background: var(--pear); overflow: hidden; }
.countdown-fill { display: block; height: 100%; width: 0; background: var(--pumpkin); transition: width .25s linear; }

.card[data-kind="alarm"] { background: var(--olive); color: var(--lemon); animation: card-in .45s cubic-bezier(.25, 1.4, .5, 1) both, wiggle .5s .5s ease-in-out 6; }
.card[data-kind="alarm"] .card-tag { background: var(--lemon); color: var(--olive); }
@keyframes wiggle { 25% { rotate: -1.5deg; } 75% { rotate: 1.5deg; } }

/* eindscherm */
.card[data-kind="end"] { background: var(--olive-oil); }
.card[data-kind="end"] .card-tag { background: var(--olive); color: var(--olive-oil); }
.end-extra { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 20px; margin-top: 6px; }
.end-next { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 18px; background: var(--flour); rotate: -1deg; }
.end-next-label { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.end-next-title { font: var(--kop-w) clamp(30px, 4.6vw, 46px)/1 var(--kop); }
.end-next-title::first-letter { text-transform: uppercase; }
.end-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.end-mark { width: 84px; height: auto; }
.end-logo { width: 96px; height: auto; }
.end-timer { grid-column: 1 / -1; margin: 6px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--olive); color: var(--lemon); }
.end-photo-msg { grid-column: 1 / -1; margin: 10px 0 0; font-size: 18px; }
.end-photo-msg.is-on { padding: 10px 14px; border-radius: 12px; background: var(--flour); }

.wake-video { position: fixed; width: 2px; height: 2px; left: 0; bottom: 0; opacity: .01; pointer-events: none; }

/* ---------- dialogen: testverslag en opmerkingen ---------- */
.log {
  width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 24px; background: var(--flour); color: var(--olive);
  box-shadow: var(--schaduw-sterk);
}
.log::backdrop { background: rgb(73 76 14 / .55); }
.log-inner { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.log h2 { font-size: 36px; }
.log-field { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.log-field input, .note-dlg textarea {
  min-height: 56px; padding: 12px 14px; border: 2px solid var(--olive-oil); border-radius: 12px;
  font: 400 19px/1.4 var(--tekst); color: var(--olive); background: var(--flour); resize: vertical;
}
.log-text { margin: 0; max-height: 42dvh; overflow: auto; padding: 14px; border-radius: 12px; background: var(--pear); font: 13px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.log-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.log-actions .btn-go { flex: 1 1 260px; }
.log-msg { margin: 0; min-height: 1.4em; }

/* ---------- reviewmodus ---------- */
.count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--olive); color: var(--flour); font: 400 16px/1 var(--tekst); }
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 0; }
.chip { padding: 6px 10px; border-radius: 8px; background: var(--pear); font-size: 15px; line-height: 1.3; }
.chip-time { background: var(--olive); color: var(--lemon); font-variant-numeric: tabular-nums; }
.chip:empty { display: none; }
.notes-meta { margin: -6px 0 0; font-size: 15px; }
.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 52dvh; overflow-y: auto; }
.notes-empty { padding: 14px; border-radius: 12px; background: var(--pear); }
.note-item { padding: 14px; border-radius: 16px; background: var(--pear); display: flex; flex-direction: column; gap: 8px; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.note-t { font: var(--kop-w) 24px/1 var(--kop); font-variant-numeric: tabular-nums; }
.note-shotlbl { padding: 4px 10px; border-radius: 8px; background: var(--olive); color: var(--lemon); font-size: 15px; }
.note-at { margin-left: auto; font-size: 14px; }
.note-body { margin: 0; font-size: 19px; white-space: pre-wrap; }
.note-why { margin: 0; font-size: 15px; padding-left: 10px; box-shadow: inset 3px 0 0 var(--olive-oil); }
.note-actions { display: flex; gap: 8px; }
.note-actions .btn { min-height: 52px; font-size: 18px; padding: 0 18px; }

/* vragenlijst voor de ouder: één telefoonscherm, grote tikvlakken */
.card[data-kind="survey"] { background: var(--pear); }
.card[data-kind="survey"] .card-scroll { padding: 16px 18px 4px; }
.card[data-kind="survey"] .card-tag { display: none; }
.card[data-kind="survey"] .card-title { font-size: clamp(28px, 6vw, 40px); margin-bottom: 2px; }
.survey { display: flex; flex-direction: column; gap: 10px; }
.survey-intro { margin: 0; font-size: 14px; }
.sq { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sq legend { padding: 0; margin-bottom: 4px; font: var(--kop-w) 17px/1.2 var(--kop); }
.sq-row { display: flex; gap: 6px; }
.sq-scale .sq-opt, .sq-choice .sq-opt { flex: 1 1 0; }
.sq-steps { overflow-x: auto; scrollbar-width: none; padding-right: 24px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.sq-choice .sq-opt { font-size: 18px; padding: 0 6px; }
.sq-steps::-webkit-scrollbar { display: none; }
.sq-opt {
  min-height: 48px; min-width: 48px; padding: 0 12px; border: 0; border-radius: 14px;
  background: var(--flour); color: var(--olive); font: var(--kop-w) 20px/1 var(--kop); cursor: pointer; touch-action: manipulation;
}
.sq-opt[aria-pressed="true"] { background: var(--olive); color: var(--lemon); }
.sq-steps .sq-opt { flex: none; min-height: 40px; font: 400 15px/1 var(--tekst); white-space: nowrap; }
.sq-ends { display: flex; justify-content: space-between; font-size: 13px; margin-top: -2px; }
.sq-text {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 2px solid var(--olive-oil); border-radius: 12px;
  background: var(--flour); color: var(--olive); font: 400 16px/1.3 var(--tekst); resize: none;
}
textarea.sq-text { height: 42px; transition: height .15s; }
textarea.sq-text:focus { height: 84px; }
/* Later en Versturen naast elkaar */
.card[data-kind="survey"] .card-actions { flex-direction: row-reverse; padding: 10px 14px 14px; }
.btn-send { flex: 1; min-height: 60px; border-radius: 18px; background: var(--pistachio); font-size: 24px; }
.card[data-kind="survey"] .card-actions .btn-ghost { min-height: 60px; font-size: 18px; padding: 0 18px; }
.btn-survey { min-height: 64px; width: 100%; border-radius: 18px; background: var(--olive); color: var(--lemon); font-size: 22px; }
.end-survey-done { grid-column: 1 / -1; margin: 8px 0 0; font-size: 17px; }
.card[data-kind="thanks"] { background: var(--olive-oil); }

/* melding dat we anoniem meten (alleen zichtbaar als de speltest-backend aan staat) */
.measure-note { margin: 18px 2px 0; font-size: 14px; line-height: 1.4; opacity: .8; }
.measure-note::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--pistachio); vertical-align: 1px; }
.measure-wide { display: none; }

/* ---------- telefoon staand: video blijft bovenin staan ---------- */
@media (max-width: 819px) {
  :root { --header: 56px; }
  .top { gap: 10px; padding: 0 8px 0 14px; }
  .top-logo, .top-kicker { display: none; }
  .top-mark { display: block; }
  #ep-title { font-size: 20px; }
  /* loopt de oven-timer, dan krijgt die de ruimte in de kop */
  .top:has(#timer-pill:not([hidden])) .top-title { visibility: hidden; }
  .watch { position: sticky; top: 0; z-index: 10; box-shadow: 0 10px 20px -14px rgb(73 76 14 / .35); }
  .controls { padding: 0 12px 8px; gap: 2px 10px; }
  .btn-play { width: 64px; height: 64px; }
  .btn-note { width: 56px; height: 56px; padding: 0; border-radius: 16px; }
  .btn-note .lbl { display: none; }
  .btn-speed { min-width: 56px; padding: 0 8px; }
  /* in reviewmodus is de rij voller: alleen de huidige tijd */
  body.is-review .clock .tot { display: none; }
  .ver-chip { display: none; } /* op de telefoon staat de versie in het menu; de titel gaat voor */
  .chapters { padding: 0 12px 10px; scroll-padding-inline: 12px; }
  .chapter:last-child { margin-right: 12px; }
  .chapter-name { font-size: 15px; }
  .card-scroll { padding: 22px 20px 6px; }
  .card-actions { padding: 12px 14px 14px; }
  .btn-done { min-height: 104px; }
  .tab { font-size: 17px; }
  .end-mark { width: 60px; }
  .end-logo { width: 76px; }
  .menu { left: 12px; right: 12px; }
  /* opmerking als bottom sheet (YouTube, Fabric) */
  dialog.note-dlg { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: var(--safe-b); }
}
@media (pointer: coarse) { kbd { display: none; } }
@media (max-width: 400px) {
  .tab { font-size: 15px; padding: 0 5px; }
}

/* cover: iPad liggend en groter, foto links, tekst rechts */
@media (orientation: landscape) and (min-width: 700px) {
  .cover { grid-template-rows: none; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); align-content: stretch; }
  .cover-text { justify-content: center; padding: 40px 48px; gap: 12px; }
  .cover .btn-huge { align-self: flex-start; min-width: 320px; }
  .cover-logo { width: 180px; margin-bottom: 10px; }
}

/* ---------- iPad liggend en groter: video links, recept rechts ---------- */
@media (min-width: 820px) and (orientation: landscape), (min-width: 1100px) {
  body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  .stage {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(350px, 32vw, 420px);
    gap: 20px; padding: 18px 20px 0;
  }
  .watch { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .screen {
    /* zo groot mogelijk, maar bediening en hoofdstukken moeten eronder passen */
    width: min(100%, calc((100dvh - var(--header) - 18px - 196px) * 16 / 9));
    margin: 0 auto; border-radius: 22px; box-shadow: var(--schaduw);
  }
  .controls { padding: 10px 0 12px; grid-template-columns: auto auto 1fr auto auto auto; grid-template-areas: "back play seek clock speed note"; }
  .chapters { padding: 4px 4px 18px; margin: 0 -4px; scroll-padding-inline: 4px; }
  .chapter:last-child { margin-right: 0; }
  .recipe {
    min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
    padding: 16px 16px calc(24px + var(--safe-b));
    margin-bottom: 18px;
    background: var(--pear); border-radius: 26px;
  }
  .recipe .tabs, .recipe .stepper, .recipe .step { background: var(--flour); }
  .recipe .step.is-current { background: var(--olive); }
  .recipe .step-num { background: var(--pear); }
  .tab { font-size: 15px; padding: 0 4px; }
  .prep-list { grid-template-columns: repeat(2, 1fr); }
  .measure-wide { display: block; margin: 0 4px; }
  .measure-wide[hidden] { display: none; }
  .measure-narrow { display: none; }
}

/* telefoon liggend: alleen video + bediening, recept onder de vouw */
@media (orientation: landscape) and (max-height: 500px) {
  .stage { grid-template-columns: minmax(0, 1fr) 280px; padding-top: 8px; gap: 12px; }
  .top { height: 52px; }
  :root { --header: 52px; }
  .screen { width: min(100%, calc((100dvh - 52px - 8px - 150px) * 16 / 9)); }
  .chapters { padding-bottom: 8px; }
  .chapter { min-height: 64px; }
  .controls { padding: 6px 0; }
  .card-title { font-size: 38px; }
  .card-body { font-size: 20px; }
  .btn-done { min-height: 80px; font-size: 34px; }
  .cover-text { padding: 20px 28px; }
  .cover h1 { font-size: 40px; }
  .cover-logo, .cover-hint { display: none; }
  .cover .btn-huge { min-height: 72px; }
}

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

/* Newsreader (live) koos op grote maten automatisch de dunne display-snit (opsz 72): "erg skinny".
   Vaste optische maat 24 geeft vollere letters met minder contrast, dichter bij Quadrant Text.
   Niet-variabele fonts (Quadrant, Inter Tight) negeren dit. Na 'font'-shorthands, daarom !important. */
*, *::before, *::after { font-variation-settings: "opsz" 24 !important; }

/* live: testverslag-knop alleen in reviewmodus; de meting gaat naar de backend */
body:not(.is-review) #log-open { display: none !important; }
