/* Wistik: speels maar rustig. Eén kolom op telefoon, kaarten met een dikke onderrand als 'drukknop'. */
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(/fonts/baloo-2-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url(/fonts/baloo-2-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(/fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 500; font-display: swap; src: url(/fonts/nunito-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format("woff2"); }

:root {
  --statusbar: #2f4bd8;
  --bg: #eef2ff; --surface: #ffffff; --raised: #f7f9ff; --fg: #1b2559; --muted: #5b6490; --line: #d3dbf5; --line-strong: #b9c4ec;
  --brand: #2f4bd8; --brand-deep: #1f35a8; --on-brand: #ffffff;
  --primary: #2f4bd8; --primary-deep: #1f35a8; --on-primary: #ffffff;
  --accent: #d81b60; --accent-deep: #a3134a; --on-accent: #ffffff; --accent-ink: #c2185b;
  --sun: #ffc83d; --sun-deep: #d99a00; --on-sun: #3a2a00;
  --ok: #0a7050; --ok-bg: #ddf6ec; --bad: #b0350f; --bad-bg: #fde8df; --warn-bg: #fff4d6; --warn: #8a5a00;
  --shadow: 0 1px 0 rgba(27, 37, 89, 0.04), 0 8px 24px -12px rgba(27, 37, 89, 0.25);
  --tik-shadow: rgba(27, 37, 89, 0.14);
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --statusbar: #11152c;
    --bg: #11152c; --surface: #1b2146; --raised: #222a55; --fg: #eef1ff; --muted: #a3abd6; --line: #343c73; --line-strong: #4a5394;
    --brand: #8fa2ff; --brand-deep: #5d73e0; --on-brand: #0e1330;
    --primary: #3b55e0; --primary-deep: #2638a8; --on-primary: #ffffff;
    --accent: #d81b60; --accent-deep: #9e1247; --on-accent: #ffffff; --accent-ink: #ff8ab3;
    --sun: #ffc83d; --sun-deep: #b98200; --on-sun: #3a2a00;
    --ok: #3dd6a0; --ok-bg: #103d30; --bad: #ff8a63; --bad-bg: #4a2015; --warn-bg: #3d3010; --warn: #ffd37a;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
    --tik-shadow: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --statusbar: #11152c;
  --bg: #11152c; --surface: #1b2146; --raised: #222a55; --fg: #eef1ff; --muted: #a3abd6; --line: #343c73; --line-strong: #4a5394;
  --brand: #8fa2ff; --brand-deep: #5d73e0; --on-brand: #0e1330;
  --primary: #3b55e0; --primary-deep: #2638a8; --on-primary: #ffffff;
  --accent: #d81b60; --accent-deep: #9e1247; --on-accent: #ffffff; --accent-ink: #ff8ab3;
  --sun: #ffc83d; --sun-deep: #b98200; --on-sun: #3a2a00;
  --ok: #3dd6a0; --ok-bg: #103d30; --bad: #ff8a63; --bad-bg: #4a2015; --warn-bg: #3d3010; --warn: #ffd37a;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --tik-shadow: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* Ruimte voor de scrollbalk altijd vrijhouden: anders verspringt de bovenbalk tussen korte en lange pagina's. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* Dubbel tikken zoomt niet in (snel tikken op knoppen en antwoorden); knijpen om te zoomen blijft werken. */
html, body, a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }
/* Een woord dat langer is dan de regel (een Duitse samenstelling, een naam zonder spatie) breekt af in plaats van de pagina
   breder te maken. Tekst die past, verandert niet. Flex- en grid-kinderen hebben daarnaast min-width: 0 of anywhere nodig. */
/* De geïnstalleerde app op iOS loopt door tot onder de klok (black-translucent in index.html; de tekst daar is dan altijd wit).
   De pagina begint daarom onder die strook, en een vaste strook erachter houdt de klok leesbaar: de kleur van de bovenbalk bij
   donker, blauw bij licht (wit op de lichte bovenbalk is niet te lezen). In de browser is de strook 0 hoog. */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--statusbar); z-index: 60; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); background: var(--bg); color: var(--fg); font: 500 1.0625rem/1.5 var(--body); min-height: 100vh; min-height: 100dvh; overflow-wrap: break-word; }
/* Sprint (.rennen) vult precies het scherm. Dit is alleen de terugval voor een browser zonder :has(): daar blijft de strook
   onder de klok staan en is Sprint die strook korter. Met :has() (blok van Sprint, "Het landschap loopt door tot de
   bovenrand") gaat de strook weg, loopt het landschap tot de bovenrand en krijgen de knoppen in het landschap de ruimte
   voor de klok (--r-top). */
body .rennen { height: calc(100vh - env(safe-area-inset-top, 0px)); height: calc(100dvh - env(safe-area-inset-top, 0px)); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
a { color: var(--brand); font-weight: 700; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Koppen krijgen na een paginawissel de focus (tabindex=-1); alleen met het toetsenbord een rand. */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
/* Een kop is geen knop: nooit een rand, ook niet als de browser de focus als "toetsenbord" ziet (iOS na typen van de code). */
html :is(h1, h2, h3, h4, h5, h6)[tabindex="-1"]:is(:focus, :focus-visible) { outline: none; box-shadow: none; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* De vaste live-regio (ui.js) bovenaan: onderaan de body maakte hij de pagina 1 pixel langer dan het scherm. */
#sr-live { top: 0; }

/* ---------- Layout ---------- */
.shell { min-height: calc(100vh - env(safe-area-inset-top, 0px)); min-height: calc(100dvh - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.topbar .spacer { flex: 1; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 24px; flex: 1; }
.wrap.narrow { max-width: 640px; }
.wrap.wide { max-width: 1120px; }
body:has(.wrap.wide) .topbar-in { max-width: 1120px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Een knop met een naam erin ("Ja, … gaat oefenen") mag afbreken in plaats van uit het venster te steken. */
.row > .grow { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Past een deel niet naast het andere, dan krijgt het een eigen regel en breekt een lang woord ("Toetsplan: <lange titel>"). */
.between > * { min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grid-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.eyebrow { font: 800 0.78rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Merk ---------- */
.topbar .brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--fg); font: 800 1.45rem/1 var(--display); letter-spacing: -0.01em; }
.topbar .brand svg { width: 34px; height: 34px; flex: none; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1.05rem/1.2 var(--display); padding: 0.65rem 1.15rem; border-radius: 16px; border: 2px solid var(--line-strong); border-bottom-width: 5px; background: var(--surface); color: var(--fg); text-decoration: none; transition: transform 0.08s; min-height: 48px; text-align: center; }
.btn:active:not([disabled]) { transform: translateY(2px); border-bottom-width: 3px; }
/* App: primaire acties in merkblauw. Roze alleen voor de grote knop op de landingspagina (.cta). */
.btn.primary, .btn.brand { background: var(--primary); border-color: var(--primary-deep); color: var(--on-primary); }
.btn.cta { background: var(--accent); border-color: var(--accent-deep); color: var(--on-accent); }
.btn.sun { background: var(--sun); border-color: var(--sun-deep); color: var(--on-sun); }
.btn.good { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.btn.meh { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; border-bottom-width: 2px; min-height: 44px; padding: 0.4rem 0.7rem; }
.btn.sm { font-size: 0.95rem; padding: 0.4rem 0.8rem; min-height: 44px; border-bottom-width: 4px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[disabled]:is(.primary, .brand, .cta, .sun, .good) { background: color-mix(in srgb, var(--line) 65%, var(--surface)); border-color: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 4px 0; min-height: 44px; color: var(--brand); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.iconbtn { border: 0; background: none; font-size: 1.25rem; font-weight: 800; color: var(--muted); width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; }
.iconbtn:hover { background: var(--raised); }

/* ---------- Kaarten ---------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* Een kaart is een knop: lang indrukken op een iPhone opent geen voorvertoning van de link (met Open, Kopieer link, Deel),
   selecteert geen tekst en tilt de kaart niet op om te slepen. */
.card.tap { text-align: left; border-bottom-width: 5px; transition: transform 0.12s, border-color 0.12s; color: inherit; text-decoration: none;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.card.tap:hover { border-color: var(--brand); transform: translateY(-2px); }
.card.tap:active { transform: translateY(2px); border-bottom-width: 3px; }
.card.hero { background: var(--primary); border-color: var(--primary-deep); color: var(--on-primary); border-bottom-width: 6px; }
.card.hero .muted { color: inherit; opacity: 0.85; }
.card.sunny { background: var(--sun); border-color: var(--sun-deep); color: var(--on-sun); border-bottom-width: 6px; }
.card.sunny .muted { color: inherit; opacity: 0.8; }
.card.note { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.card-title { font: 700 1.15rem/1.2 var(--display); overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: 800 0.78rem/1 var(--body); padding: 5px 9px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); color: var(--fg); white-space: nowrap; }
.chip.brand { background: var(--primary); color: var(--on-primary); border-color: transparent; }
/* Met een naam ("Alleen voor …"): nooit breder dan de regel; een lange naam loopt door op de volgende regel. */
.chip.brand { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
/* Het vakje heeft een vaste maat, dus de emoji ook (px, niet rem): bij "Extra groot" stak hij anders uit zijn vakje. */
.avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: var(--raised); border: 2px solid var(--line); flex: none; }
.avatar.lg { width: 76px; height: 76px; font-size: 45px; border-radius: 22px; }
.avatar.sm { width: 36px; height: 36px; font-size: 21px; border-radius: 11px; }

.meter { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; flex: 1 1 auto; min-width: 40px; }
.meter > i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width 0.4s ease-out; }
/* Twee lagen: kent (vol) en geoefend (40%, met dunne streepjes zodat het ook zonder kleur te zien is). */
.meter.two { display: flex; }
.meter.two > i { border-radius: 0; flex: none; }
.meter.two > i:first-child { border-radius: 6px 0 0 6px; }
.meter.two > i.near { background: color-mix(in srgb, var(--ok) 40%, transparent); background-image: repeating-linear-gradient(-45deg, transparent 0 3px, color-mix(in srgb, var(--ok) 25%, transparent) 3px 5px); border-radius: 0 6px 6px 0; }
.meter.sun > i { background: var(--sun); }
.meter.thin { height: 6px; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; min-width: 0; }
.field > span.hint { font-weight: 600; color: var(--muted); font-size: 0.88rem; }
.input, select.input, textarea.input { width: 100%; font: 700 1.05rem var(--body); padding: 0.65rem 0.85rem; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); min-height: 48px; }
.input:focus { outline: 3px solid var(--brand); outline-offset: 2px; border-color: var(--brand); }
textarea.input { min-height: 140px; resize: vertical; font-weight: 600; line-height: 1.45; }
.input.big { font-size: 1.35rem; padding: 0.75rem 0.95rem; border-width: 3px; border-radius: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); flex: none; }
/* Uitgeschakeld (bv. Voorlezen bij Geen geluid): grijs, maar nog goed leesbaar (--muted haalt 4,5:1). */
.check.off, .check.off label { color: var(--muted); cursor: not-allowed; }
.form-error { background: var(--bad-bg); color: var(--bad); border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.verify-note { background: var(--warn-bg); border-color: var(--warn); }
/* Waarschuwing bij een gescande foto die misschien niet geschikt is voor kinderen. */
.danger-note { background: var(--bad-bg); border-color: var(--bad); }
.danger-note b { color: var(--bad); }
.pin { display: flex; gap: 10px; justify-content: center; }
.pin input { width: 56px; height: 64px; text-align: center; font: 800 1.8rem var(--display); border-radius: 16px; border: 3px solid var(--line-strong); background: var(--surface); }
.pin input:focus { outline: 3px solid var(--brand); outline-offset: 2px; border-color: var(--brand); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { flex: 1 1 120px; background: var(--surface); border: 2px solid var(--line-strong); border-bottom-width: 4px; border-radius: 14px; padding: 9px 10px; font-weight: 800; min-height: 46px; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: var(--brand); border-bottom-width: 2px; color: var(--fg); box-shadow: inset 0 0 0 1px var(--brand); transform: translateY(2px); }
.seg button[aria-pressed="true"]::before { content: "✓\00a0" / ""; color: var(--brand); }
/* Licht of donker: drie plaatjes (halve cirkel, zon, maan). */
.theme-seg button { flex: 1 1 64px; display: inline-flex; align-items: center; justify-content: center; }
.theme-seg svg { flex: none; }
/* Tekstgrootte als schuif: kleine a links, grote A rechts. */
.size-slider { display: flex; align-items: center; gap: 12px; }
.size-slider input { flex: 1; min-width: 0; min-height: 44px; margin: 0; font-size: 1rem; accent-color: var(--brand); }
.size-a, .size-A { font: 800 1rem/1 var(--display); color: var(--fg); flex: none; }
.size-A { font-size: 1.7rem; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
/* Zonder binnenruimte: een emoji is breder dan de letters, en past zo midden in het vakje (ook op 320 pixels). */
.avatars button { aspect-ratio: 1; font-size: 1.7rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); padding: 0; }
.avatars button[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: 0 0 0 2px var(--brand); }

/* Lijst-editor */
.editor-rows { display: flex; flex-direction: column; gap: 8px; }
.erow { display: grid; grid-template-columns: 28px 1fr 1fr 40px; gap: 8px; align-items: start; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 8px; }
.erow .n { font: 800 0.85rem var(--body); color: var(--muted); padding-top: 12px; text-align: right; }
.erow .input { min-height: 44px; font-size: 1rem; padding: 0.5rem 0.65rem; border-radius: 11px; }
.erow .more { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Minstens 16px: kleinere letters in een veld laten een iPhone inzoomen bij het tikken, en dan schuift de pagina opzij. */
.erow .more .input { font-size: 1rem; font-weight: 600; min-height: 44px; }
.erow-head { display: grid; grid-template-columns: 28px 1fr 1fr 40px; gap: 8px; padding: 0 10px; font: 800 0.8rem var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
/* Regels uit "Foto's toevoegen": rand, tint en het label "nieuw" (schermlezers horen "(nieuw)" in het veld) tot er is opgeslagen. */
.erow.new { position: relative; border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); margin-top: 6px; }
.erow.new::before { content: "nieuw" / ""; position: absolute; top: -11px; left: 10px; font: 800 0.72rem/1 var(--body); background: var(--primary); color: var(--on-primary); border-radius: 6px; padding: 3px 7px; }
.add-photos { gap: 12px; }
.add-photos.scanning { padding: 20px 14px; gap: 10px; }
@media (max-width: 520px) {
  .erow, .erow-head { grid-template-columns: 1fr 40px; }
  .erow .n, .erow-head .n { display: none; }
  .erow > .input:nth-of-type(1) { grid-column: 1; }
  .erow > .input:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .erow .del { grid-row: 1; grid-column: 2; }
  .erow .more { grid-column: 1 / 3; grid-template-columns: 1fr; }
  .erow-head span:nth-child(3) { display: none; }
}

/* Foto's */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: var(--raised); max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 6px; right: 6px; border: 0; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-weight: 800; padding: 2px 9px; }
.thumbs.many { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.thumbs.many .thumb { border-radius: 10px; }
.thumb button { min-width: 28px; min-height: 28px; }
.thumbs.many .thumb button { top: 3px; right: 3px; padding: 0 7px; }
.scan-tips { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.pick-info { margin: 0; }
.quota-short { overflow-wrap: anywhere; }
.drop { border: 3px dashed var(--line-strong); border-radius: var(--r); padding: 26px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; background: var(--surface); }
.drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.scanning { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 30px 10px; }
.scanbar { width: min(320px, 100%); height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; position: relative; }
.scanbar i { position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--brand); border-radius: 6px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }

/* ---------- Oefenen ---------- */
.pbar { display: flex; align-items: center; gap: 12px; }
.pbar .meter { height: 14px; border-radius: 7px; }
.streak { font: 800 1rem var(--display); min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.qcard { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 22px 18px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.ask { font: 800 0.85rem var(--body); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.prompt { font: 700 2rem/1.15 var(--display); overflow-wrap: anywhere; text-wrap: balance; }
.prompt.long { font-size: 1.45rem; }
.prompt.xlong { font-size: 1.2rem; }
/* Opmerking bij een woord: blijft bij elkaar (inline-block), maar een lange opmerking loopt door op de volgende regel. */
.tag { display: inline-block; max-width: 100%; font: 800 0.72rem var(--body); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; vertical-align: middle; letter-spacing: 0.03em; overflow-wrap: anywhere; }
.say { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--line-strong); background: var(--raised); border-radius: 12px; padding: 4px 12px; font-weight: 800; font-size: 0.92rem; min-height: 44px; min-width: 44px; }
.say.big { font-size: 1.2rem; padding: 12px 22px; border-radius: 18px; border-bottom-width: 5px; min-height: 60px; }
.answer { display: flex; flex-direction: column; gap: 12px; }
.acc { display: flex; flex-wrap: wrap; gap: 6px; }
.acc button { min-width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line-strong); border-bottom-width: 4px; background: var(--surface); font: 700 1.1rem var(--body); }
.fb { border-radius: 16px; padding: 12px 14px; font-weight: 700; display: flex; flex-direction: column; gap: 3px; }
.fb.ok { background: var(--ok-bg); color: var(--ok); }
.fb.no { background: var(--bad-bg); color: var(--bad); }
.fb strong { font: 800 1.2rem var(--display); }
.fb .right { color: var(--fg); font-size: 1.15rem; }
.opts { display: grid; gap: 10px; }
.opts:focus, .cols:focus { outline: none; }
.opts:focus-visible, .flash-answers:focus-visible, .flash:focus-visible, .cols:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 18px; }
.opt .grow { flex: 1; min-width: 0; }
.opt .mark { font: 800 1.3rem/1 var(--display); flex: none; }
.qhead { font: inherit; letter-spacing: normal; margin: 0; overflow-wrap: anywhere; }
.qhead .prompt { display: block; }
.retype { color: var(--fg); }
/* Sneltoetsen alleen tonen op apparaten met muis en toetsenbord. */
.keyhint { display: none; color: var(--muted); font-size: 0.85rem; text-align: center; }
@media (hover: hover) and (pointer: fine) { .keyhint { display: block; } }
.opt { text-align: left; font: 700 1.1rem var(--body); padding: 0.85rem 1rem; border-radius: 16px; border: 2px solid var(--line-strong); border-bottom-width: 5px; background: var(--surface); overflow-wrap: anywhere; display: flex; gap: 12px; align-items: center; min-height: 58px; }
.opt kbd { font: 800 0.8rem var(--body); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.opt.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.opt.no { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.flash { min-height: 230px; justify-content: center; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.flash .back { border-top: 2px dashed var(--line); padding-top: 12px; margin-top: 6px; width: 100%; color: var(--fg); }
/* Flitskaart: de luisterknop direct achter het woord, midden op de regel. Een lange zin loopt door naast de knop.
   Elke regel is minstens zo hoog als de knop, en de achterkant staat er vóór het omdraaien al (onzichtbaar): niets verspringt. */
.sayline { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-height: 44px; }
.sayline > :not(.say) { min-width: 0; }
.sayline > .say { flex: none; }
.flash .back.unseen { visibility: hidden; }
.hint { color: var(--muted); font-size: 0.92rem; text-align: center; }
/* Koppelen: puzzelstukjes. Links een nopje aan de rechterkant, rechts een uitsparing aan de linkerkant.
   Een goed paar klikt in elkaar: het antwoord staat dan in de rij van zijn vraag (subgrid: even hoog). */
.cols { --gap: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--gap); }
.cols > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; grid-row: span var(--rows, 1); }
@supports (grid-template-rows: subgrid) { .cols > div { display: grid; grid-template-rows: subgrid; } }
.tile { position: relative; font: 700 1rem var(--body); color: var(--fg); padding: 0.7rem 0.6rem; border-radius: 14px; border: 2px solid var(--line-strong); border-bottom-width: 4px; background: var(--surface); overflow-wrap: anywhere; min-height: 58px; }
.tile[data-side="r"] { padding-left: calc(0.6rem + 5px); }
/* Nopje: rondje in de kleur van de tegel, midden op de rechterrand; alleen het deel buiten de tegel is te zien. */
.tile[data-side="l"]::after { content: ""; position: absolute; top: 50%; left: calc(100% - 11px); width: 24px; height: 24px; margin-top: -12px; border: 2px solid; border-color: inherit; border-radius: 50%; background: inherit; clip-path: inset(-3px -3px -3px 11px); }
/* Uitsparing: hetzelfde rondje in de kleur van de achtergrond, midden op de linkerrand. */
.tile[data-side="r"]::before { content: ""; position: absolute; top: 50%; left: -13px; width: 24px; height: 24px; margin-top: -12px; border: 2px solid; border-color: inherit; border-radius: 50%; background: var(--bg); clip-path: inset(-3px -3px -3px 11px); }
.tile.sel { border-color: var(--primary-deep); background: var(--primary); color: var(--on-primary); }
/* Gevonden: de twee helften schuiven tegen elkaar (randen over elkaar), nopje in de uitsparing. */
.tile.joined { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); cursor: default; }
.tile.joined[data-side="l"] { left: calc(var(--gap) / 2 + 1px); z-index: 2; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.tile.joined[data-side="r"] { left: calc(var(--gap) / -2 - 1px); z-index: 1; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
/* Niet alleen aan de kleur te zien: een vinkje voor het woord. */
.tile.joined[data-side="l"]::before { content: "✓ " / ""; font-weight: 800; }
.line { min-height: 64px; border-bottom: 3px dashed var(--line-strong); display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; align-items: center; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.word { font: 700 1.1rem var(--body); padding: 0.45rem 0.8rem; border-radius: 12px; border: 2px solid var(--line-strong); border-bottom-width: 4px; background: var(--surface); }
.word.used { border-style: dashed; border-bottom-width: 2px; background: transparent; color: var(--muted); text-decoration: line-through 2px; }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
.pop { animation: pop 0.3s; }
@keyframes pop { 0% { transform: scale(0.95); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
.young .prompt { font-size: 2.3rem; }
.young .opt { font-size: 1.25rem; min-height: 66px; }

.end { align-items: center; text-align: center; gap: 12px; }
.stars { font-size: 2.8rem; letter-spacing: 0.1em; color: var(--sun); line-height: 1; }
.stars .off { color: var(--line); }
.grade { font: 800 4.4rem/1 var(--display); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; width: 100%; }
.tbl { width: 100%; border-collapse: collapse; text-align: left; }
.tbl th { font: 800 0.78rem var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 6px 8px; }
.tbl td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }

/* ---------- Statistieken ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi > b { font: 800 2rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.kpi small { font-weight: 700; font-size: 0.82rem; }
.kpi small.up { color: var(--ok); }
.kpi small.down { color: var(--bad); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 700 11px var(--body); }
.chart .bar { fill: var(--brand); }
.chart .bar.today { fill: var(--accent-ink); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { fill: var(--line); }

/* ---------- Landing: banden over de volle breedte, inhoud tot 1200px (public/app/views/landing.js) ---------- */
.landing { --gutter: clamp(16px, 4vw, 32px); --band-pad: clamp(56px, 8.5vw, 128px); --wave-h: clamp(22px, 3.6vw, 52px); flex: 1; display: flex; flex-direction: column; }
.band { position: relative; padding-block: var(--band-pad); }
.band-bg { background: var(--bg); }
.band-surface { background: var(--surface); }
.band-blue { background: var(--primary); color: var(--on-primary); }
.band-in { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.landing h2 { font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
.landing h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
.band-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; max-width: 720px; margin: 0 auto clamp(28px, 4.5vw, 56px); }
.band-lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--muted); max-width: 40em; }
.band-surface .card { background: var(--raised); }
/* Golvende rand: een SVG in de kleur van de band ernaast. */
.wave { position: absolute; left: 0; width: 100%; height: var(--wave-h); display: block; pointer-events: none; }
.wave-bottom { bottom: -1px; }
.wave-top { top: -1px; }
.fill-bg { fill: var(--bg); }
.fill-surface { fill: var(--surface); }
.band:has(> .wave-top) { padding-top: calc(var(--band-pad) + var(--wave-h) * 0.5); }
/* Bovenbalk: zachte schaduw zodra je scrolt. */
.landing-shell .topbar { transition: box-shadow 0.2s ease-out; }
.landing-shell[data-scrolled] .topbar { box-shadow: var(--shadow); }
/* Openbare pagina's met PublicNav (landing, demo): de balk is even breed als de landing, het logo staat op dezelfde lijn
   als de kop. Smaller dan 381px blijft de balk zoals hij was (12px rand, zie hieronder). Ingelogd: 960px. */
.topbar.wide { --gutter: clamp(16px, 4vw, 32px); }
.topbar.wide .topbar-in { max-width: calc(1200px + 2 * var(--gutter)); }
@media (min-width: 381px) { .topbar.wide .topbar-in { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); } }

/* 1. Kop: licht, met de voorbeeldkaart en Tik; op een telefoon komt de kaart direct na de knoppen. */
.band-hero { padding-block: clamp(20px, 5vw, 72px) calc(clamp(40px, 6vw, 88px) + var(--wave-h)); overflow: hidden;
  background: radial-gradient(42rem 26rem at 88% 6%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 70%),
    radial-gradient(26rem 18rem at 2% 98%, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 14px; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; }
.band-hero h1 { font-size: clamp(2.15rem, 1.4rem + 3.6vw, 3.75rem); }
.band-hero .lead { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.22rem); color: var(--muted); max-width: 34em; }
.hero-demo { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; margin: 8px auto 0; }
.hero-demo::before { content: ""; position: absolute; z-index: -1; inset: 26% -5% -4% 8%; border-radius: 30px; background: color-mix(in srgb, var(--brand) 14%, transparent); transform: rotate(4deg); }
.hero-demo::after { content: ""; position: absolute; z-index: -1; left: -16px; bottom: 12%; width: 56px; height: 56px; border-radius: 50%; background: var(--sun); }
.hero-demo .hero-tik { align-self: flex-end; margin: 0 18px -14px 0; position: relative; z-index: 1; }
.demo-card { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 6px; border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
/* Telefoon en tablet (één kolom): de voorbeeldkaart direct na de knoppen, de stappen eronder. */
@media (max-width: 859px) {
  .hero-demo { order: 1; }
  .hero-flow { order: 2; justify-content: center; margin-top: 6px; }
}
@media (max-width: 599px) {
  .band-hero .hero-chip { font-size: 0.85rem; padding: 6px 10px; }
  .hero-demo .hero-tik { margin-bottom: -18px; }
  .hero-demo .demo-card { padding: 14px; gap: 8px; }
  .hero-demo .demo-card .prompt { font-size: 1.4rem; }
  .hero-demo .input.big { font-size: 1.08rem; padding: 0.5rem 0.75rem; min-height: 44px; }
  .hero-demo .hero-tik .buddy { --s: 60px !important; }
  .hero-demo .hero-tik .bubble { font-size: 0.98rem; }
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); column-gap: clamp(40px, 5vw, 80px); row-gap: 22px; }
  .hero-copy, .hero-flow, .hero-cta { grid-column: 1; }
  .hero-demo { grid-column: 2; grid-row: 1 / span 3; max-width: 470px; margin: 0 auto; }
  .hero-copy { gap: 18px; }
}
/* 2. Waar je op kunt rekenen */
.band.trust { padding-block: clamp(36px, 5vw, 64px); }
.trust-list { list-style: none; display: grid; gap: 20px 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .trust-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust-list li { display: flex; gap: 14px; align-items: flex-start; }
.trust-list li > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trust-list b { font: 700 1.12rem/1.2 var(--display); }
.trust-ico { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--brand); }
.ico-svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 3. Zo werkt het: drie kaarten, elk met een klein plaatje boven de tekst en een groot nummer op de rand.
   Telefoon: onder elkaar; tablet: plaatje links; breed: drie naast elkaar. */
.how .band-head .eyebrow { color: var(--brand); }
.how-steps { list-style: none; padding: 0; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
.how-step { --tint: var(--brand); padding: 0; gap: 0; overflow: hidden; border-bottom-width: 5px; box-shadow: var(--shadow); }
.how-check { --tint: var(--sun); }
.how-play { --tint: var(--ok); }
.how-scene { position: relative; height: 212px; display: grid; place-items: center; padding: 16px 16px 44px; overflow: hidden; border-bottom: 2px solid var(--line);
  background: radial-gradient(90% 100% at 90% 0%, color-mix(in srgb, var(--tint) 30%, transparent), transparent 70%), color-mix(in srgb, var(--tint) 10%, var(--bg)); }
.how-snap .how-scene { padding: 0; background: #10142c; }
.how-play .how-scene { padding-top: 10px; padding-bottom: 54px; }
.how-scene .snap { position: absolute; inset: 0; }
.how-scene .check-card { transform: rotate(-1.5deg); }
.how-arena { width: 100%; max-width: 290px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px; }
.how-arena .game-card { transform: rotate(-1.5deg); }
.how-cheer { display: flex; flex-direction: column; align-items: center; margin: 0 -4px -16px 0; }
.how-cheer .bubble { margin: 0 0 4px; padding: 5px 10px; font-size: 0.95rem; white-space: nowrap; }
.how-cheer .bubble::before { left: calc(50% - 6px); bottom: -8px; transform: rotate(-45deg); }
.how-body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 46px 22px 26px; }
.how-num { position: absolute; top: -34px; left: 20px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--sun); color: var(--on-sun); border-bottom: 5px solid var(--sun-deep); font: 800 2.4rem/1 var(--display); box-shadow: 0 0 0 4px var(--surface); }
.how-time { position: absolute; top: 14px; right: 18px; font-size: 0.82rem; padding: 6px 10px; background: color-mix(in srgb, var(--tint) 13%, var(--surface)); border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); }
.how-label { font: 800 0.78rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.landing .how-step h3 { font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.65rem); font-weight: 800; }
@media (min-width: 640px) and (max-width: 959px) {
  .how-steps { max-width: 780px; }
  .how-step { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .how-scene { height: auto; min-height: 230px; padding-right: 46px; border-bottom: 0; border-right: 2px solid var(--line); }
  .how-body { justify-content: center; padding: 26px 24px 26px 50px; }
  .how-num { top: 22px; left: -34px; }
  .how-time { position: static; order: -1; }
}
@media (min-width: 960px) { .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); max-width: none; } }
/* De plaatjes: camera boven een bladzijde, de lijst om na te kijken, een meerkeuzevraag. */
.snap { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 14px 14px 58px; background: #10142c; overflow: hidden; }
.snap-page { width: 86%; max-width: 250px; padding: 12px 14px 10px; border-radius: 6px; background: #fbf8ee; color: #2a2f4a; transform: rotate(-4deg); box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.7); font: 600 0.8rem/1.2 var(--body); }
.snap-h { font: 800 0.82rem/1.2 var(--display); color: #a3134a; border-bottom: 2px solid #e4dec9; padding-bottom: 4px; margin-bottom: 6px; }
.snap-page ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.snap-page li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #d9d2bb; padding-bottom: 3px; }
.snap-page li span:first-child { font-style: italic; font-weight: 700; }
.snap-finder { position: absolute; inset: 12px 9% 58px; }
.snap-finder i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--sun); }
.snap-finder i:nth-child(1) { top: 0; left: 0; border-width: 4px 0 0 4px; border-top-left-radius: 8px; }
.snap-finder i:nth-child(2) { top: 0; right: 0; border-width: 4px 4px 0 0; border-top-right-radius: 8px; }
.snap-finder i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 8px; }
.snap-finder i:nth-child(4) { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 8px; }
.snap-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 50px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); }
.snap-shutter { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #10142c, 0 0 0 6px #fff; }
.check-card, .game-card { width: 100%; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-width: 0; }
.check-card { max-width: 280px; font: 700 0.8rem/1.2 var(--body); }
.check-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.check-head b { font: 700 1rem/1.1 var(--display); }
.check-head .chip { font-size: 0.7rem; padding: 4px 7px; }
.check-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 18px; gap: 6px; align-items: center; padding: 4px 6px 4px 9px; border-radius: 9px; border: 2px solid var(--line); white-space: nowrap; }
.check-row > span { overflow: hidden; text-overflow: ellipsis; }
.check-row i { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font: 800 0.7rem/1 var(--body); font-style: normal; background: var(--ok-bg); color: var(--ok); }
.check-row.edit { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.check-row.edit i { background: var(--brand); color: var(--on-brand); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--brand); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.game-card .ask { font-size: 0.68rem; }
.game-q { font: 700 1.25rem/1.1 var(--display); margin-bottom: 2px; }
.game-card .opt { min-height: 0; padding: 5px 10px; gap: 8px; font-size: 0.86rem; border-bottom-width: 3px; border-radius: 11px; }
.game-card .opt .mark { font-size: 0.95rem; }
/* Hoog contrast: duidelijke randen, geen tinten. */
.a11y-contrast :is(.check-card, .check-row, .game-card, .how-scene) { border: 2px solid var(--fg); }
.a11y-contrast :is(.how-scene, .check-row.edit) { background: var(--bg); }

/* 4. Dit kan Wistik: rijen met tekst en een groot voorbeeld, afwisselend links en rechts */
.feature-rows { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 120px); }
.feature-row { display: grid; gap: 28px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .feature-row { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); }
  .feature-row:nth-child(even) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .feature-row:nth-child(even) .feature-visual { order: -1; }
}
.feature-text { display: flex; flex-direction: column; gap: 14px; max-width: 34em; min-width: 0; }
.feature-text .eyebrow { color: var(--brand); }
.landing .feature-text h3 { font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.15rem); font-weight: 800; }
.feature-lead { font-size: 1.1rem; color: var(--muted); }
.game-chips { gap: 8px; }
.meet-tik.tik-note { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--sun) 16%, var(--surface)); border: 2px solid color-mix(in srgb, var(--sun) 55%, var(--line)); }
.tik-note h4 { margin: 0; font: 700 1.2rem/1.2 var(--display); }
/* Podium voor een voorbeeld: --bg (in donker donkerder dan de band), met een gloed in een Wistik-kleur. */
.stage { --tint: var(--brand); position: relative; container-type: inline-size; border-radius: 32px; padding: clamp(20px, 4vw, 48px) clamp(14px, 3.5vw, 44px); min-width: 0; border: 2px solid var(--line);
  background: radial-gradient(70% 60% at 100% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%),
    radial-gradient(55% 55% at 0% 100%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%), var(--bg); }
.stage-play { --tint: var(--sun); }
.stage-test { --tint: var(--accent); }
.stage-parent { --tint: var(--ok); }
.stage .card { background: var(--surface); }
.mock { position: relative; min-width: 0; pointer-events: none; }
.mock-card { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); min-width: 0; }
/* (a) foto → lijst */
.mock-scan { display: grid; gap: 12px; align-items: center; justify-items: center; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 500px) { .mock-scan { grid-template-columns: minmax(0, 0.95fr) auto minmax(0, 1.05fr); gap: 14px; } }
.mock-photo { position: relative; width: 100%; max-width: 270px; padding: 20px 18px 18px; background: #fbf8ee; color: #2a2f4a; border-radius: 8px; transform: rotate(-3deg); font: 600 0.9rem/1.2 var(--body);
  box-shadow: 0 16px 30px -16px rgba(27, 37, 89, 0.5), 0 1px 0 rgba(27, 37, 89, 0.08); }
.page-h { font: 800 0.95rem/1.2 var(--display); color: #a3134a; border-bottom: 2px solid #e4dec9; padding-bottom: 6px; margin-bottom: 8px; }
.page-lines { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.page-lines li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #d9d2bb; padding-bottom: 4px; }
.page-lines li span:first-child { font-style: italic; font-weight: 700; }
.frame { position: absolute; width: 22px; height: 22px; border: 0 solid var(--brand); }
.frame.tl { top: -9px; left: -9px; border-width: 4px 0 0 4px; border-radius: 8px 0 0 0; }
.frame.tr { top: -9px; right: -9px; border-width: 4px 4px 0 0; border-radius: 0 8px 0 0; }
.frame.bl { bottom: -9px; left: -9px; border-width: 0 0 4px 4px; border-radius: 0 0 0 8px; }
.frame.br { bottom: -9px; right: -9px; border-width: 0 4px 4px 0; border-radius: 0 0 8px 0; }
.scanline { position: absolute; left: 4px; right: 4px; top: 60%; height: 3px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 14px 3px color-mix(in srgb, var(--brand) 45%, transparent); }
.mock-arrow { width: 44px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
@container (min-width: 500px) { .mock-arrow { transform: none; } }
.mock-list { width: 100%; max-width: 300px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.mock-list .card-title { font-size: 1.05rem; }
.mock-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 6px; align-items: center; padding: 6px 9px; border-radius: 11px; border: 2px solid var(--line); font: 700 0.86rem/1.2 var(--body); overflow-wrap: anywhere; }
.mock-row i { font-style: normal; font-weight: 800; color: var(--ok); text-align: center; }
.mock-row.edit { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.mock-row.edit i { color: var(--brand); }
.mock-btn { align-self: stretch; margin-top: 2px; }
/* (b) spelletjes: koppelen (dezelfde puzzelstukjes als in het spel) en meerkeuze, Tik op de rand */
.mock-play { display: flex; flex-direction: column; gap: 14px; max-width: 440px; margin-inline: auto; }
.mock-play .tile { display: flex; align-items: center; gap: 4px; min-height: 46px; padding: 0.45rem 0.55rem; font-size: 0.95rem; }
.mock-play .tile[data-side="r"] { padding-left: calc(0.55rem + 5px); }
.mock-play .tile[data-side="r"]::before { background: var(--surface); }
.mock-play .cols { --gap: 18px; gap: 8px var(--gap); }
.mock-play .cols > div { gap: 8px; }
.mock-play .opt { min-height: 46px; padding: 0.5rem 0.8rem; font-size: 1rem; border-bottom-width: 4px; }
.mock-mc { gap: 8px; }
.mock-tik { align-self: flex-end; margin: -4px 20px -26px 0; position: relative; z-index: 1; }
.mock-q { font: 700 1.45rem/1.15 var(--display); margin: -4px 0 2px; }
.mock-tik .bubble { font-size: 1rem; }
/* (c) proeftoets en toetsplan */
.mock-test { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-inline: auto; align-items: center; }
@container (min-width: 460px) { .mock-test { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); } }
.mock-grade { align-items: center; text-align: center; gap: 6px; transform: rotate(-2deg); }
.mock-grade .grade { font-size: 3.6rem; }
.mock-plan { gap: 10px; }
.mock-plan .between b { font-size: 0.95rem; }
.mock-plan .known-row .meter { flex: 1; }
.mock-days { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mock-days li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 7px; border-radius: 12px; border: 2px solid var(--line); font: 800 0.75rem/1 var(--body); color: var(--muted); }
.mock-days li b { font: 800 1rem/1 var(--display); color: var(--fg); }
.mock-days li.done { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.mock-days li.done b { color: var(--ok); }
.mock-days li.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); }
.mock-days li.today b { color: var(--brand); }
.mock-days li.test { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
/* (d) ouderoverzicht */
.mock-parent { max-width: 400px; margin-inline: auto; }
.mock-parent .preview-card { border-bottom-width: 5px; transform: rotate(1.2deg); }
.mock-hard { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
/* Ook handig: drie kleine kaarten */
.extras { list-style: none; padding: 0; margin-top: clamp(56px, 8vw, 112px); display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .extras { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.feature { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.feature .ico { font-size: 1.6rem; line-height: 1.2; }
.feature h3 { font-size: 1.05rem; }
@media (min-width: 760px) { .feature { padding: 20px; gap: 6px; } .feature .ico { font-size: 1.9rem; } .feature h3 { font-size: 1.15rem; } }
.extras .tap-link { align-self: flex-start; }

/* 5. Waarom het werkt */
.why-grid { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.why-card { padding: 24px 22px; border-bottom-width: 5px; gap: 10px; }
.why-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.in-wistik { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border-radius: 12px; padding: 10px 12px; }
.why-src { margin-top: auto; }
.sources { text-align: center; margin-top: 28px; }
/* Telefoon: icoon links van de kop, zodat de kaarten niet zo lang worden. */
@media (max-width: 819px) {
  .why-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 20px 18px; }
  .why-ico { width: 48px; height: 48px; font-size: 1.4rem; }
  .why-card > :not(.why-ico, h3) { grid-column: 1 / -1; }
}

/* 6. In getallen (blauwe band) */
.numbers-h { text-align: center; margin-bottom: clamp(28px, 4vw, 52px); }
.numbers { list-style: none; padding: 0; display: grid; gap: 32px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: center; }
@media (min-width: 900px) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.numbers li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.big-num { font: 800 clamp(2.1rem, 1.4rem + 3vw, 3.8rem)/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.big-num .count { display: inline-block; text-align: right; }
.numbers li > span { font-weight: 700; max-width: 14em; }

/* 7. Reviews (alleen het lokale voorbeeld, zie landing-data.js) */
.review-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: calc(-1 * clamp(8px, 2vw, 24px)) auto clamp(24px, 3.5vw, 40px); }
.review-avg { font: 800 2.6rem/1 var(--display); }
.stars-row { display: inline-flex; gap: 2px; font-size: 1.3rem; line-height: 1; color: var(--sun-deep); }
.stars-row .off { color: var(--line-strong); }
.chip.sample { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.review-grid { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.review { padding: 22px; border-bottom-width: 5px; gap: 10px; }
.review blockquote { margin: 0; font-size: 1.04rem; }
.review-who { margin-top: auto; font-weight: 800; }
.review-note { margin-top: 24px; }

/* 8-10. Prijzen, vragen, afsluiter */
.pricing .band-head { margin-bottom: 0; }
.faq-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.closing { padding-bottom: var(--band-pad); }
.closing-in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.closing-copy { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 36em; }
.closing-copy > p { font-size: 1.15rem; font-weight: 700; }
.closing .cta-row { width: 100%; align-items: center; }
@media (max-width: 420px) { .closing .cta-row { align-items: stretch; } }
@media (min-width: 760px) {
  .closing-in { flex-direction: row; justify-content: center; text-align: left; gap: 44px; }
  .closing-copy { align-items: flex-start; }
  .closing .cta-row { align-items: flex-start; }
}

/* Hoog contrast: duidelijke randen, geen gloed of tinten. */
.a11y-contrast .band + .band { border-top: 2px solid var(--fg); }
.a11y-contrast .band-hero, .a11y-contrast .stage { background: var(--bg); }
.a11y-contrast .hero-demo::before, .a11y-contrast .hero-demo::after, .a11y-contrast .scanline { display: none; }
.a11y-contrast :is(.stage, .mock-card, .mock-list, .mock-row, .mock-days li, .trust-ico, .why-ico, .tik-note, .in-wistik, .chip.sample) { border: 2px solid var(--fg); }
.a11y-contrast :is(.tik-note, .in-wistik, .trust-ico, .why-ico) { background: var(--bg); }

/* Rustig inkomen bij het scrollen (public/app/reveal.js). Zonder data-reveal-on is alles gewoon zichtbaar.
   Alleen het binnenkomen beweegt (data-shown); verbergen gebeurt meteen, buiten beeld. */
[data-reveal-on] [data-reveal]:not([data-shown]) { opacity: 0; transform: translateY(20px); }
[data-reveal-on] [data-reveal="fade"]:not([data-shown]) { transform: none; }
[data-reveal-on] [data-reveal][data-shown] { transition: opacity 0.6s ease-out var(--reveal-delay, 0ms), transform 0.6s ease-out var(--reveal-delay, 0ms); }
@media (prefers-reduced-motion: reduce) { [data-reveal-on] [data-reveal] { opacity: 1 !important; transform: none !important; } }
.a11y-calm [data-reveal-on] [data-reveal] { opacity: 1 !important; transform: none !important; }
@media print { [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* Footer: merk en drie kolommen links; op de landing even breed als de inhoud. */
.footer { border-top: 1px solid var(--line); padding: 28px max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); color: var(--muted); font-size: 0.95rem; background: var(--bg); }
.footer-in { max-width: 960px; margin: 0 auto; display: grid; gap: 20px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .footer-in { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.landing-shell .footer { padding-top: clamp(36px, 5vw, 64px); padding-bottom: calc(clamp(36px, 5vw, 64px) + env(safe-area-inset-bottom, 0px)); }
.landing-shell .footer-in { max-width: 1200px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font: 800 1.35rem/1 var(--display); }
.footer-logo svg { flex: none; }
.footer-cols { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.footer-h { font: 700 1.05rem/1.2 var(--display); color: var(--fg); margin-bottom: 2px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
@media (pointer: fine) { .footer-links a { min-height: 36px; } }
.prose { max-width: 65ch; display: flex; flex-direction: column; gap: 12px; }
.prose ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Overlay ---------- */
/* Melding: zo breed als de tekst, tot 90% van het scherm. Zonder width: max-content kreeg hij (door left: 50%) maar de halve
   schermbreedte en werd een korte zin op een telefoon een smal torentje. */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 4px 4px 4px 16px; border-radius: 14px; font-weight: 800; z-index: 50; width: max-content; max-width: min(90vw, 460px); box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; }
.toast-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-weight: 800; }
.toast-x:focus-visible { outline-color: var(--bg); }
.modal-bg { overscroll-behavior: contain; position: fixed; inset: 0; background: rgba(10, 14, 40, 0.5); z-index: 40; display: grid; place-items: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.modal { background: var(--surface); border-radius: 22px; padding: 20px; width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 6px; min-width: 220px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 20; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 10px 12px; min-height: 44px; border-radius: 10px; font-weight: 700; color: var(--fg); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--raised); }
/* Confetti valt achter de kaarten: kop en score blijven leesbaar. */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--muted); font-weight: 800; }
.empty { text-align: center; padding: 26px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }

@media (max-width: 420px) {
  .prompt { font-size: 1.7rem; }
  .prompt.long { font-size: 1.3rem; }
  .young .prompt { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Kent nu, verschillen, jonge kinderen ---------- */
.known-row { flex-wrap: nowrap; gap: 8px; }
.known-row .meter { flex: 1; min-width: 60px; }
.improved { font: 800 1.15rem var(--display); color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 4px 14px; }
.diffline { display: flex; flex-direction: column; gap: 2px; color: var(--fg); font-weight: 700; }
.diff { font-size: 1.1rem; letter-spacing: 0.02em; }
.diff del { color: var(--bad); text-decoration: line-through 2px; background: var(--bad-bg); border-radius: 3px; }
.diff ins { color: var(--ok); text-decoration: underline 2px; text-underline-offset: 3px; background: var(--ok-bg); border-radius: 3px; }
.young .ask { font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--fg); }
.young-tiles { grid-template-columns: repeat(2, 1fr); }
.young-tiles .card { align-items: center; justify-content: center; min-height: 130px; text-align: center; }
.young-tiles .card span:first-child { font-size: 2.6rem !important; }
.young-tiles .card-title { font-size: 1.3rem; }
.btn.wraptext { white-space: normal; line-height: 1.15; }
@media (max-width: 520px) {
  .btn.wraptext { font-size: 0.85rem; padding: 0.35rem 0.6rem; }
  /* Tabel als kaartjes onder elkaar, zodat niets wegvalt op een telefoon. */
  .tbl.stackable thead { display: none; }
  .tbl.stackable tr { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
  .tbl.stackable td { border-top: 0; padding: 0 4px; }
  .tbl.stackable td.num { text-align: left; white-space: normal; }
  .tbl.stackable td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 700; }
  /* Woord en vertaling (lijstpagina, eindscherm, gedeelde lijst, Meer lijsten): twee even brede kolommen, zodat alle
     vertalingen recht onder elkaar staan. Een lang woord breekt binnen zijn eigen kolom. De status of soort (derde cel)
     staat eronder, in de kolom van het antwoord: zo houden de woorden de hele breedte. */
  .tbl.pairs tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
  .tbl.pairs thead tr { border-top: 0; padding: 0 0 4px; }
  .tbl.pairs th { padding: 0 4px; }
  .tbl.pairs th.num { display: none; }
  .tbl.pairs td { border-top: 0; padding: 0 4px; }
  .tbl.pairs td.num { grid-column: 2; text-align: left; white-space: normal; }
  .tbl.pairs td.num:empty { display: none; }
}

/* ---------- Toegankelijkheid (per kind, via klassen op <html>) ---------- */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="xlarge"] { font-size: 125%; }
html.a11y-readable { --display: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; --body: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; }
html.a11y-readable body { letter-spacing: 0.03em; word-spacing: 0.12em; line-height: 1.6; }
/* Hoofdletters lezen lastiger: geen kapitalen-labels. */
html.a11y-readable :is(.ask, .eyebrow, .how-label, .tbl th, .erow-head) { text-transform: none; letter-spacing: 0.02em; }
html.a11y-readable .prompt { letter-spacing: 0.02em; }

:root.a11y-contrast {
  --bg: #ffffff; --surface: #ffffff; --raised: #ffffff; --fg: #000000; --muted: #000000; --line: #000000; --line-strong: #000000;
  --brand: #1a2fb0; --brand-deep: #000000; --on-brand: #ffffff;
  --primary: #1a2fb0; --primary-deep: #000000; --on-primary: #ffffff;
  --accent: #a3003a; --accent-deep: #000000; --on-accent: #ffffff; --accent-ink: #a3003a;
  --sun: #ffd84d; --sun-deep: #000000; --on-sun: #000000;
  --ok: #00603f; --ok-bg: #ffffff; --bad: #a10000; --bad-bg: #ffffff; --warn-bg: #ffffff; --warn: #000000;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root.a11y-contrast:not([data-theme="light"]) {
    --bg: #000000; --surface: #000000; --raised: #000000; --fg: #ffffff; --muted: #ffffff; --line: #ffffff; --line-strong: #ffffff;
    --brand: #a8b8ff; --brand-deep: #ffffff; --on-brand: #000000;
    --primary: #a8b8ff; --primary-deep: #ffffff; --on-primary: #000000;
    --accent: #ff8ab3; --accent-deep: #ffffff; --on-accent: #000000; --accent-ink: #ff8ab3;
    --sun: #ffd84d; --sun-deep: #ffffff; --on-sun: #000000;
    --ok: #6dffc0; --ok-bg: #000000; --bad: #ffa585; --bad-bg: #000000; --warn-bg: #000000; --warn: #ffffff;
  }
}
:root.a11y-contrast[data-theme="dark"] {
  --bg: #000000; --surface: #000000; --raised: #000000; --fg: #ffffff; --muted: #ffffff; --line: #ffffff; --line-strong: #ffffff;
  --brand: #a8b8ff; --brand-deep: #ffffff; --on-brand: #000000;
  --primary: #a8b8ff; --primary-deep: #ffffff; --on-primary: #000000;
  --accent: #ff8ab3; --accent-deep: #ffffff; --on-accent: #000000; --accent-ink: #ff8ab3;
  --sun: #ffd84d; --sun-deep: #ffffff; --on-sun: #000000;
  --ok: #6dffc0; --ok-bg: #000000; --bad: #ffa585; --bad-bg: #000000; --warn-bg: #000000; --warn: #ffffff;
}
.a11y-contrast :is(.card, .kpi, .qcard, .chip, .fb, .form-error, .tag, .modal, .menu, .toast) { border: 2px solid var(--fg); }
.a11y-contrast :is(.btn, .opt, .tile, .word, .input, .say, .seg button, .acc button, .avatars button) { border-color: var(--fg); }
.a11y-contrast .muted, .a11y-contrast .card.hero .muted, .a11y-contrast .card.sunny .muted { opacity: 1; }
.a11y-contrast .meter { background: transparent; border: 2px solid var(--fg); }
.a11y-contrast :focus-visible, .a11y-contrast .input:focus { outline: 4px solid var(--fg); outline-offset: 3px; box-shadow: 0 0 0 7px var(--bg); }
.a11y-contrast .toast { background: var(--bg); color: var(--fg); }

/* Geen geluid: nergens luisterknoppen. */
.a11y-nosound .say { display: none !important; }
/* Rustig: geen beweging (net als prefers-reduced-motion). */
.a11y-calm *, .a11y-calm *::before, .a11y-calm *::after { animation: none !important; transition: none !important; }
.a11y-calm .card.tap:hover, .a11y-calm .card.tap:active, .a11y-calm .btn:active:not([disabled]) { transform: none; }
.a11y-calm #confetti { display: none; }
.a11y-box summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-height: 32px; }
.a11y-box[open] summary { margin-bottom: 4px; }
.iconbtn.gear-mini svg { display: block; }
.tap-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 520px) {
  /* Grote tekst op een telefoon: het woord Wistik wijkt, het logo blijft. */
  html[data-text] .topbar .brand span { display: none; }
  html[data-text] .topbar-in { gap: 8px; }
}

/* ---------- Dagdoel en badges ---------- */
.goal { flex-direction: row; align-items: center; gap: 14px; }
.goal-title { font: 700 1.15rem/1.2 var(--display); }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.6s; }
.ring-fg.full { stroke: var(--ok); }
.ring-num { fill: var(--fg); font: 800 17px var(--display); }
.ring-unit { fill: var(--muted); font: 800 9px var(--body); }
.badges { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { background: var(--surface); border: 2px solid var(--sun-deep); border-bottom-width: 5px; border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; min-width: 0; }
.badge.locked { border-color: var(--line-strong); border-style: dashed; border-bottom-width: 2px; background: transparent; }
.badge.locked .badge-icon { filter: grayscale(1); opacity: 0.6; }
.badge-icon { font-size: 2rem; line-height: 1; }
.badge-name { font: 700 1rem/1.15 var(--display); }
.new-badges .badge-icon { font-size: 2.2rem; }
.avatars button.locked { border-style: dashed; background: transparent; font-size: 1.1rem; }
.new-badges { text-align: left; width: 100%; align-self: stretch; }
.plan { gap: 8px; }
.sharecode { font: 800 2.4rem/1 var(--display); letter-spacing: 0.18em; text-align: center; padding: 14px; border: 3px dashed var(--line-strong); border-radius: var(--r); background: var(--raised); font-variant-numeric: tabular-nums; }
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.checklist .tick { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; font-weight: 800; color: var(--on-brand); }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); }
.checklist li.done > .stack > span:first-child { color: var(--muted); text-decoration: line-through; }
.offline-badge { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45; background: var(--fg); color: var(--bg); font: 800 0.85rem var(--body); padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow); pointer-events: none; }

/* ======================================================================
   Design-pass: verfijning (layout, kaarten, spel, eindscherm, laden)
   ====================================================================== */
.nowrap { white-space: nowrap; }
.h3 { font-size: 1.1rem; }
.chev { font: 800 1.35em/1 var(--display); color: var(--brand); }
.card.hero .chev { color: inherit; }
.chip > span[aria-hidden="true"] { line-height: 1; font-size: 0.95em; }
.chip.near { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
/* Gemist woord bij een jong kind ("woord · vertaling"): mag over meer regels, nooit breder dan de kaart. */
.chip.big { font-size: 0.95rem; padding: 8px 12px; white-space: normal; flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; }
.chips { gap: 6px; }

/* Twee kolommen op een groot scherm: hoofdkolom met lijsten, zijkolom met dagdoel en aanrader. */
.home-grid { display: flex; flex-direction: column; gap: 24px; }
.main-col, .side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.main-col { gap: 24px; }
@media (min-width: 960px) {
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
  .home-grid > .side-col { grid-column: 2; grid-row: 1; position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); }
  .home-grid > .main-col { grid-column: 1; grid-row: 1; }
}
.hello { display: flex; gap: 14px; align-items: center; }
.hello h1 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
/* Avatar naast de begroeting: knop naar Mijn profiel. Ziet er hetzelfde uit; alleen een handje en een duwtje, net als tikken op je maatje. */
.hello-avatar { flex: none; display: grid; padding: 0; border: 0; border-radius: 22px; background: none; line-height: 0; cursor: pointer; }
.hello-avatar:hover .avatar, .hello-avatar:focus-visible .avatar { border-color: var(--brand); }
.hello-avatar:active { transform: scale(0.96); }
.a11y-calm .hello-avatar:active { transform: none; }
.a11y-contrast .hello-avatar .avatar { border-color: var(--fg); }

/* Lijstkaarten: compacter, vak als chip in de kaart. */
.grid.lists { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card.tap { gap: 8px; padding: 14px 16px; }
.card.tap .card-title { font-size: 1.12rem; }
/* "Meer lijsten" rechts naast de kop Mijn lijsten; past het niet, dan eronder. Het venster: vier keuzes onder elkaar. */
.mine-head { row-gap: 8px; }
.mine-head .btn { flex: none; margin-left: auto; }
.more-opt { flex-direction: row; align-items: center; gap: 14px; text-align: left; width: 100%; color: inherit; font: inherit; }
.more-ico { font-size: 1.7rem; line-height: 1; flex: none; }
/* Meer lijsten: alle vakken als tegels; een vak zonder lijsten is grijs en geen knop. */
.subj-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.subj-grid > li { display: flex; min-width: 0; }
.card.subj { flex: 1; min-width: 0; gap: 4px; padding: 14px; }
.subj .card-title { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.subj-ico { font-size: 1.8rem; line-height: 1; }
.empty-subj { background: var(--raised); border-style: dashed; color: var(--muted); box-shadow: none; }
.empty-subj .subj-ico { filter: grayscale(1); opacity: 0.55; }
/* Lijsten per vak: kop per vak, en filterknoppen. Een gekozen knop krijgt een ✓-bolletje dat niets verschuift. */
.vak-filter { gap: 8px; padding-top: 6px; }
.vak-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--fg); font: 800 0.92rem var(--body); }
.vak-chip:hover { border-color: var(--brand); }
.vak-chip[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--brand); }
.vak-chip[aria-pressed="true"]::after { content: "✓" / ""; position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; background: var(--primary); color: var(--on-primary); }
.a11y-contrast .vak-chip { border-color: var(--fg); }
.a11y-contrast .vak-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--fg); }
.vak-group { gap: 10px; }
/* Bibliotheek: de niveautitel en "jouw niveau" blijven naast elkaar zolang het past, anders onder elkaar. */
.lib-level h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Voorbeeldlijsten (ouder en demo): per vak een kop, daaronder per niveau een kleine kop. */
.starters-subj { gap: 10px; }
.starters-subj + .starters-subj { margin-top: 14px; }
.starters-level { gap: 8px; }
.starters-level h3 { font: 700 1rem/1.3 var(--body); color: var(--muted); }
.stack > .vak-group + .vak-group { margin-top: 8px; }
/* Past een lange vaknaam (Maatschappijleer, Levensbeschouwing) niet naast "Nieuwe lijst", dan gaat de knop eronder, rechts.
   Anders brak de naam midden in het woord, of liep hij over de knop heen. */
.vak-head { flex-wrap: wrap; align-items: center; row-gap: 2px; }
.vak-head h3 { font-size: 1.2rem; min-width: 0; }
.vak-head h3 .small { font-family: var(--body); font-weight: 700; white-space: nowrap; }
.vak-head .btn { flex: none; margin-left: auto; }

/* Dagdoel */
.goal { flex-direction: column; align-items: stretch; gap: 12px; }
.goal-top { display: flex; align-items: center; gap: 14px; }
.goal-know { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Ouderoverzicht */
.grid.kids { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kid-card { position: relative; gap: 12px; transition: border-color 0.12s; }
.kid-card:hover { border-color: var(--brand); }
.kid-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kid-head .grow { flex: 1; min-width: 0; }
.kid-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.kid-foot .linkbtn { font-weight: 700; }
.stretch { text-decoration: none; gap: 6px; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kid-card :is(button, .iconbtn) { position: relative; z-index: 1; }
.add-card { align-items: center; justify-content: center; min-height: 150px; text-align: center !important; border-style: dashed; }
.add-plus { font-size: 1.8rem; line-height: 1; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); }
/* Knoppenregel: de knoppen van een scherm of venster staan onderaan in .actions. In de code eerst grijs (Terug, Annuleren),
   de blauwe knop als laatste: die staat dus altijd rechts. Eén blauwe knop alleen staat ook rechts, één grijze links. */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actions > :only-child:is(.primary, .brand, .cta) { grid-column: -2; }
/* Smalle telefoon: twee knoppen naast elkaar passen niet ("📚 Voorbeelden"), dan onder elkaar. */
@media (max-width: 359px) { .actions { grid-template-columns: minmax(0, 1fr); } }
.actions .btn { width: 100%; min-width: 0; padding-inline: 0.6rem; overflow-wrap: anywhere; }
/* Breed scherm: de knoppen worden niet eindeloos breed; grijs links, blauw rechts. Een rij van meer dan twee (ouderoverzicht) naast elkaar. */
@media (min-width: 720px) {
  .actions { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: space-between; }
  .actions:has(> :nth-child(3)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.famcode { font: 800 1.05rem var(--body); }
.famcode span { letter-spacing: 0.08em; user-select: all; }

/* ---------- Klaslink en klaslabel ----------
   De klaslink (/k en /k/<code>), het venster "Klas toevoegen", het label van de klas op een lijstkaart en het blokje Klassen
   in het profiel van een kind. Kleuren komen uit de vaste variabelen, dus licht, donker en hoog contrast gaan vanzelf mee;
   er beweegt hier niets. */
.klas-head { gap: 2px; }
.klas-know { gap: 6px; }
.klas-code { text-transform: uppercase; letter-spacing: 0.12em; }
.klas-code::placeholder { letter-spacing: 0.04em; text-transform: none; }
.klas-card { background: var(--raised); gap: 4px; }
.klas-keep { margin-top: 4px; }
.klas-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.klas-note { font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.klas-note b { color: var(--fg); }
/* Voor wie? Een lange naam breekt af; een kind dat er al in zit, staat er grijs bij. */
.klas-who button { min-width: 0; overflow-wrap: anywhere; }
.klas-who button:disabled { background: var(--raised); border-style: dashed; color: var(--muted); cursor: default; }
.klas-who button:disabled .small { display: block; font-weight: 700; }
/* Klassen in het profiel van een kind: naam en docent links, Weghalen rechts. */
.klas-rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.klas-rows li { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; min-width: 0; }
.klas-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.klas-row .stack { gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.klas-row .btn { flex: none; }
.klas-rows p { overflow-wrap: anywhere; }
.a11y-contrast .klas-rows li { border-color: var(--fg); }
/* Een melding met een lange naam van een klas of kind (zonder spaties) breekt af en steekt niet uit beeld. */
.toast > span { min-width: 0; overflow-wrap: anywhere; }
.onboarding { gap: 14px; }
.checklist .tick { color: var(--muted); font: 800 0.85rem var(--body); }
.checklist li.done .tick { color: var(--on-primary); }
.checklist li .btn { align-self: flex-start; }

/* Lijstpagina: richting als segmenten, alleen Slim oefenen vol, Proeftoets met een gele rand links. */
.seg.dirs button { flex: 1 1 140px; }
.modes .mode { padding: 14px; }
.mode-ico { font-size: 1.7rem; line-height: 1.1; }
.card.mode.star { border-left: 6px solid var(--sun); padding-left: 12px; }
.card.hero .muted { opacity: 0.9; }

/* Scannen */
.drop-ico { font-size: 2.2rem; line-height: 1; }
.more-opts summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.more-opts[open] summary { margin-bottom: 8px; }

/* ---------- Spel ---------- */
.pcount { font: 800 0.95rem var(--display); color: var(--muted); min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.pbar .streak:empty { display: none; }
.pbar .streak { min-width: 0; }
.fb-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font: 700 1.1rem/1.3 var(--body); padding: 10px 14px; border-radius: 14px; min-height: 48px; }
/* Het goede antwoord kan lang zijn: dan breekt het af in plaats van uit beeld te steken (de luisterknop houdt zijn maat). */
.fb-line > span { min-width: 0; }
.fb-line b { font-family: var(--display); font-size: 1.15em; }
.fb-line.ok { color: var(--ok); background: var(--ok-bg); }
.fb-line.no { color: var(--fg); background: var(--surface); border: 2px solid var(--line); }
.fb-line.no .x { color: var(--bad); font-weight: 800; }
.fb-line.soft { color: var(--fg); background: var(--warn-bg); }
.fb-line .say { margin-left: auto; }
/* Cijfertoetsen alleen met muis en toetsenbord. */
.opt kbd { display: none; }
@media (hover: hover) and (pointer: fine) { .opt kbd { display: inline-block; } }
@media (min-width: 960px) { .prompt { font-size: clamp(28px, 4vw, 44px); } .prompt.long { font-size: clamp(24px, 3vw, 34px); } }

/* ---------- Eindscherm ---------- */
.end h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.missed-young h2 { font-size: 1.2rem; }

/* ---------- Badges ---------- */
.badges { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 360px) and (max-width: 719px) { .badges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .badge { padding: 10px 6px; } .badge-desc { display: none; } .badge.noprog .badge-desc { display: block; } }
.badge.earned { border: 2px solid var(--sun); border-bottom: 5px solid var(--sun-deep); background: color-mix(in srgb, var(--sun) 12%, var(--surface)); }
.badge.locked { background: var(--surface); border: 2px dashed var(--line-strong); }
.badge.locked .badge-icon { filter: grayscale(1); opacity: 0.55; }
.badge-name { overflow-wrap: anywhere; }
.badge-desc { font-size: 0.82rem; color: var(--muted); }
.badge-state { font: 800 0.78rem var(--body); color: var(--ok); }
.badge-prog { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; font: 700 0.78rem var(--body); color: var(--muted); }
.badge-prog .meter { width: 100%; flex: none; }
.lock-av { position: relative; display: grid; place-items: center; }
.lock-av > span { filter: grayscale(1); opacity: 0.45; font-size: 1.5rem; }
.lock-av > i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 0.85rem; }
.avatars button[aria-disabled="true"] { cursor: help; }
/* "Mijn profiel" (kind): avatar en naam. Jonge kinderen (6 t/m 9) krijgen grotere avatars, velden en knoppen. */
.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-dlg.young .avatars { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.profile-dlg.young .avatars button { font-size: 2.3rem; border-radius: 18px; }
.profile-dlg.young .lock-av > span { font-size: 1.9rem; }
.profile-dlg.young .btn { min-height: 58px; font-size: 1.2rem; }
.profile-dlg.young .field label { font-size: 1.1rem; }

/* ---------- Voortgang (ouder) ---------- */
.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi.wide { grid-column: 1 / -1; gap: 6px; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kpi-of { font: 700 1rem var(--body); color: var(--muted); }
.kpi .meter { flex: none; height: 12px; }
.kpi-sub { color: var(--muted); }
.near-line { color: var(--ok); }
.info { position: relative; }
.info summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; margin: -10px -10px -10px 0; }
.info summary::-webkit-details-marker { display: none; }
.info summary > span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font: 800 0.8rem/1 var(--display); color: var(--muted); }
.info[open] { flex-basis: 100%; }
.info[open] summary { margin-left: auto; }
.info p { color: var(--fg); background: var(--raised); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.chart .goal-line { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .goal-label { fill: var(--ok); }
.rounds { list-style: none; padding: 0; display: flex; flex-direction: column; }
.rounds li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.rounds li:first-child { border-top: 0; }
.round-ico { font-size: 1.4rem; width: 40px; height: 40px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.round-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.score { flex: none; font: 800 1rem var(--display); font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.score.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.score.mid { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

/* ---------- Landing ---------- */
/* Eén hoofdknop met de demo als tekstlink eronder (landing: kop, Zo werkt het, afsluiter). Smal: knop over de hele breedte. */
.cta-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cta-row > .btn { min-width: min(100%, 300px); }
.try-demo { font-weight: 700; color: var(--fg); }
.try-demo a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; }
.band-blue .try-demo, .band-blue .try-demo a { color: inherit; }
@media (max-width: 420px) { .cta-row { align-items: stretch; text-align: center; } .hero-cta .reassure { text-align: center; } }
.reassure { font-weight: 700; }
.preview-card { box-shadow: var(--shadow); gap: 12px; }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; padding-bottom: 2px; border-bottom: 2px solid var(--line); }
.mini-bars span { flex: 1; background: var(--brand); border-radius: 5px 5px 0 0; opacity: 0.85; }
.mini-bars span.today { background: var(--accent-ink); }
.mini-bars span.zero { background: var(--line-strong); }
@media (max-width: 380px) { .topbar-in { gap: 4px; padding-inline: 12px; } .topbar .btn.ghost, .topbar .btn.sm { padding-inline: 0.5rem; font-size: 0.92rem; } }

/* ---------- Laden: skeletkaarten ---------- */
.loading { display: block; place-items: normal; padding: 8px 0; color: var(--muted); font-weight: 800; }
.loading-text { display: block; text-align: center; margin-bottom: 14px; }
.skeleton { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sk-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.sk-line { display: block; height: 12px; border-radius: 6px; background: var(--line); background-image: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 100%); background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer 1.4s linear infinite; }
.sk-line.w40 { width: 40%; height: 18px; } .sk-line.w55 { width: 55%; } .sk-line.w70 { width: 70%; } .sk-line.w85 { width: 85%; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Hoog contrast: nieuwe onderdelen ook met duidelijke randen. */
.a11y-contrast :is(.fb-line, .score, .round-ico, .sk-card, .add-plus) { border: 2px solid var(--fg); }
.a11y-contrast .seg button[aria-pressed="true"] { border-width: 3px; box-shadow: none; }
.a11y-contrast .meter.two > i.near { background: transparent; background-image: repeating-linear-gradient(-45deg, var(--ok) 0 2px, transparent 2px 5px); }
.a11y-contrast .badge.earned { border-color: var(--fg); background: var(--surface); }
.demo-card .prompt { font-size: 1.7rem; }
.a11y-contrast .btn[disabled] { background: var(--bg); color: var(--fg); border-style: dashed; }

/* ---------- Bèta, landing (stappen, vragen), footer ---------- */
.topbar .brand { flex: none; }
.hero-chip { align-self: flex-start; }
.flow { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }
.flow li { display: flex; align-items: center; gap: 6px; }
.flow li:not(:last-child)::after { content: "→" / ""; color: var(--muted); font-weight: 800; }
/* In de bovenbalk staat links het logo met de naam en rechts één ding (Inloggen, of je avatar): dat past ook op 320 pixels. */
/* De menuknop is je eigen avatar: kind een dier, ouder een rondje met een poppetje. */
.menu-avatar { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 14px; flex: none; }
.menu-avatar .avatar { width: 40px; height: 40px; font-size: 23px; line-height: 1; border-radius: 13px; overflow: hidden; }
.menu-avatar:hover .avatar, .menu-avatar[aria-expanded="true"] .avatar { border-color: var(--brand); }
.menu-avatar:has(.person), .menu-avatar .avatar.person { border-radius: 50%; }
.avatar.person { background: var(--primary); border-color: var(--primary-deep); color: var(--on-primary); }
.a11y-contrast .menu-avatar .avatar { border-color: var(--fg); }
/* Een lang e-mailadres zonder spaties breekt af in plaats van de pagina breder te maken. */
.email { overflow-wrap: anywhere; }
/* Het menu: bovenaan klein van wie het is; past altijd op het scherm en scrolt zelf als het te lang is. */
.menu { max-width: calc(100vw - 24px); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }
/* Submenu (Instellingen): klapt uit in het menu zelf, iets ingesprongen. */
.menu > * { flex: none; }
.avatar.lg.person { border-radius: 50%; }
.menu-who { margin: 0 0 4px; padding: 6px 12px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; font-weight: 800; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.a11y-contrast .menu-who { color: var(--fg); border-bottom-color: var(--fg); }
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 1040px; margin-inline: auto; }
@media (min-width: 900px) { .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; align-items: start; } .faq-col { gap: 14px; } }
.faq summary { cursor: pointer; font: 700 1.05rem/1.3 var(--display); min-height: 44px; display: flex; align-items: center; }
.faq details[open] summary { margin-bottom: 6px; }
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.ai-note { color: var(--fg); background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.a11y-contrast :is(.ai-note, .faq details) { border: 2px solid var(--fg); }

/* ---------- Prijzen (landing) ---------- */
.topbar .btn.wide-only { display: none; }
@media (min-width: 760px) { .topbar .btn.wide-only { display: inline-flex; } }
.pricing-lead { font-size: 1.08rem; max-width: 40em; }
.plans { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding-top: 4px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; } }
.plan { position: relative; gap: 16px; padding: 22px 18px 18px; border-bottom-width: 5px; }
.plan-head { display: flex; flex-direction: column; gap: 4px; }
.plan h3 { font-size: 1.3rem; }
.price { font-weight: 700; color: var(--muted); }
.price b { font: 800 2.2rem/1.05 var(--display); color: var(--fg); margin-right: 4px; letter-spacing: -0.01em; }
.ticks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: "✓" / ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font: 800 0.8rem/1 var(--body); }
.plan-cta { margin-top: auto; }
.plan.featured { border-color: var(--brand); border-bottom-color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: var(--shadow); }
.plan-tag { position: absolute; top: 0; left: 16px; transform: translateY(-50%); background: var(--primary); color: var(--on-primary); font: 800 0.8rem/1 var(--body); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.price-facts { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .price-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.price-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.price-facts li b { color: var(--fg); }
.price-facts li > span:first-child { font-size: 1.2rem; line-height: 1.25; flex: none; }
.beta-pay { color: var(--muted); text-align: center; font-weight: 700; }
/* Eén plek voor alle prijzen: de kaarten voor gezinnen en die voor docenten, elk met een kort label erboven. */
.pricing .plans-h { color: var(--brand); text-align: center; margin-bottom: -12px; }
.a11y-contrast .plan-tag, .a11y-contrast .ticks li::before { border: 2px solid var(--fg); }

/* ---------- Voor docenten: de pagina /docenten (views/docenten.js) en de rij op de landing ---------- */
/* Twee prijskaarten naast elkaar (in plaats van drie). */
@media (min-width: 760px) { .plans.two { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; } }
/* Voorbeeld van een klas: naam, klascode en lijsten. Versiering, dus niet aan te tikken. */
.klas-demo { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 6px; border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transform: rotate(-1.5deg); pointer-events: none; }
.klas-name { font: 700 1.5rem/1.1 var(--display); }
.klas-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.klas-code b { font: 800 1.35rem/1 var(--display); letter-spacing: 0.12em; }
.klas-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 14px; border: 2px solid var(--line); font-weight: 700; }
.klas-line span:first-child { min-width: 0; }
.klas-line span:last-child { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.mock-klas { max-width: 520px; margin-inline: auto; }
.feature-text .tap-link { align-self: flex-start; }
/* Plaatjes bij de drie stappen: het veld voor de naam van de klas, en de QR-code met de klascode (een nep-QR, alleen een plaatje). */
.scene-form { width: calc(100% - 28px); max-width: 270px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transform: rotate(-1.5deg); font: 800 0.8rem var(--body); }
.scene-form .fake-input { border: 2px solid var(--brand); border-radius: 11px; padding: 8px 10px; font: 700 1.05rem var(--body); }
.scene-share { display: flex; align-items: center; gap: 14px; min-width: 0; }
.qr { display: block; flex: none; border-radius: 12px; border: 2px solid var(--line); }
.scene-share .qr { transform: rotate(3deg); box-shadow: var(--shadow); }
.scene-share .klas-code { flex-direction: column; align-items: flex-start; gap: 4px; }
.scene-share .klas-code span { font: 800 0.72rem var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* Lastigste vragen van een lijst: de vraag, hoe vaak hij fout ging en een balk. */
.hard { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hard li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hard .qa { font-weight: 800; overflow-wrap: anywhere; }
.hard .qa span { font-weight: 600; color: var(--muted); }
.hard .pct { font: 800 0.95rem var(--display); color: var(--bad); white-space: nowrap; }
.hard .meter { grid-column: 1 / -1; height: 8px; }
.hard .meter > i { background: var(--bad); }
/* Privacyband: de kop links, drie punten rechts (op een telefoon onder elkaar). */
.priv { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.priv-copy { display: flex; flex-direction: column; gap: 14px; max-width: 34em; }
.priv-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.priv-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--raised); border: 2px solid var(--line); font-weight: 700; }
.priv-list li > span:first-child { font-size: 1.5rem; line-height: 1.1; flex: none; }
.priv-list li > span:last-child { min-width: 0; }
.priv-list small { display: block; font-weight: 600; color: var(--muted); font-size: 0.9rem; }
@media (min-width: 900px) { .priv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
/* Waarom het werkt op /docenten: vier kaarten (twee naast elkaar, breed vier) en een lijst met bronnen. */
@media (min-width: 820px) { .why-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .why-grid.four .why-card { padding: 22px 18px; } }
@media (min-width: 1100px) { .why-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.src-list { list-style: none; padding: 0; margin: 12px auto 0; max-width: 62em; display: flex; flex-direction: column; gap: 6px; }
.src-list a { display: inline-block; padding: 4px 0; overflow-wrap: anywhere; }
/* Hoog contrast: duidelijke randen, geen tinten. */
.a11y-contrast :is(.klas-demo, .klas-code, .klas-line, .scene-form, .qr, .priv-list li) { border: 2px solid var(--fg); }
.a11y-contrast .klas-code { background: var(--bg); }
html.a11y-readable .scene-share .klas-code span { text-transform: none; letter-spacing: 0.02em; }

/* Wistik op je telefoon (landing) en de pagina /installeren */
.install-band { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo title" "text text" "btn btn"; gap: 12px 14px; align-items: center; padding: 20px; }
.install-band > .install-logo { grid-area: logo; }
.install-band > h2 { grid-area: title; }
.install-band > p { grid-area: text; }
.install-band > .btn { grid-area: btn; justify-self: start; }
@media (min-width: 760px) {
  .install-band { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo title btn" "logo text btn"; gap: 4px 20px; padding: 24px; }
  .install-band > h2 { align-self: end; }
  .install-band > p { align-self: start; }
}
.install-logo { display: grid; place-items: center; flex: none; }
.install-logo svg { display: block; filter: drop-shadow(0 6px 10px rgba(27, 37, 89, 0.18)); }
.install .lead { font-size: 1.1rem; }
.howto { list-style: none; counter-reset: h; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.howto li { counter-increment: h; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.6; }
.howto li::before { content: counter(h); width: 34px; height: 34px; border-radius: 11px; background: var(--sun); color: var(--on-sun); display: grid; place-items: center; font: 800 1.1rem var(--display); }
.howto li > span { padding-top: 3px; min-width: 0; }
.key { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; max-width: 100%; padding: 2px 8px; min-height: 30px; border-radius: 9px; border: 1.5px solid var(--line-strong); border-bottom-width: 3px; background: var(--raised); color: var(--brand); font-weight: 800; line-height: 1.2; }
.key .glyph { flex: none; }
.key span { color: var(--fg); }
.install-now { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.done-note { display: block; background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.platform h3 { font-size: 1.1rem; }
.kids-note { flex-direction: row; align-items: center; gap: 16px; background: var(--warn-bg); border-color: color-mix(in srgb, var(--sun) 45%, var(--line)); }
.a11y-contrast :is(.key, .install-band, .kids-note) { border: 2px solid var(--fg); }
.card.platform { gap: 16px; }
.nowrap > .key { white-space: normal; }
/* Uitklapvragen: een pijltje dat meedraait, zodat je ziet dat er meer is. */
.faq summary { gap: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; border-right: 3px solid var(--muted); border-bottom: 3px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform 0.15s; }
.faq details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details.card { gap: 0; padding-block: 8px; }
.faq details.card[open] { padding-bottom: 16px; }
.pricing h2, .install h2 { scroll-margin-top: 84px; }

/* ---------- Tik, de buddy (public/app/buddy.js) ---------- */
.buddy { display: inline-block; width: var(--s, 64px); height: var(--s, 64px); flex: none; line-height: 0; }
.buddy svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tik .t-shadow { fill: var(--tik-shadow); }
.tik .t-fig { transform-box: view-box; transform-origin: 60px 110px; }
.tik .t-blink { transform-box: fill-box; transform-origin: center; animation: tik-blink 5.2s infinite; }
.tik .t-wave { transform-box: view-box; animation: tik-wave 1.6s ease-in-out infinite; }
.tik .t-sprout { transform-box: view-box; animation: tik-wob 2.8s ease-in-out infinite; }
.tik .t-spark { transform-box: fill-box; transform-origin: center; animation: tik-twinkle 1.8s ease-in-out infinite; }
.tik.m-hop .t-fig { animation: tik-hop 1.3s ease-in-out infinite; }
.tik.m-nod .t-fig { animation: tik-nod 2.4s ease-in-out infinite; }
.tik.m-sway .t-fig { animation: tik-sway 3.2s ease-in-out infinite; }
.tik.m-proud .t-fig { animation: tik-proud 3s ease-in-out infinite; }
@keyframes tik-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }
@keyframes tik-wave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(10deg); } }
@keyframes tik-wob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(7deg); } }
@keyframes tik-twinkle { 0%, 100% { transform: scale(0.6); opacity: 0.6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes tik-hop { 0%, 100% { transform: translateY(0); } 40%, 55% { transform: translateY(-6px); } }
@keyframes tik-nod { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-4px); } 80% { transform: translateY(0); } 87% { transform: translateY(-1.5px); } }
@keyframes tik-sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(2.5deg); } }
@keyframes tik-proud { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
/* Je maatje (een venster over de startpagina): het voorbeeld, een rij met de vijf maatjes, een rij met zes geheime maatjes op slot, dan tabs per vakje en de dingen van één vakje (omlopend); onderaan Annuleren en Opslaan. */
.maatje-dlg { gap: 12px; }
.maatje-dlg h2 { margin: 0; }
.modal:has(.maatje-dlg) { padding: 16px; }
.maatje { display: flex; flex-direction: column; gap: 10px; }
.maatje-top { display: flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); }
/* Vaste kolommen: de rijen lopen nooit anders om, dus de spullen eronder schuiven niet weg. */
.maatje-who { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.maatje-dlg .maatje-who:not(.maatje-secrets) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.maatje-secrets .who { justify-content: center; min-height: 40px; padding: 3px 0; }
.who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; min-height: 44px; padding: 4px 0 3px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--fg); font: 800 0.7rem/1.2 var(--body); overflow: hidden; }
/* Grote tekst of het leesbare lettertype: rijen van drie, anders passen de namen niet in de tegels (de geheime maatjes hebben geen naam en blijven op één rij). */
html:is([data-text="large"], [data-text="xlarge"], .a11y-readable) .maatje-who:not(.maatje-secrets) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.who .buddy { max-width: 100%; }
.who .tik * { animation: none !important; }
.who.locked:not(.secret) .buddy { filter: grayscale(1); opacity: 0.45; }
.who .pick-lock { right: 2px; top: 1px; font-size: 0.7rem; }
/* "Binnenkort" onder de naam van een maatje dat er nog niet is (Luna): klein, zodat het in de smalle tegel past. */
.who-soon { font-size: 0.58rem; line-height: 1.1; letter-spacing: -0.03em; white-space: nowrap; }
html:is([data-text="large"], [data-text="xlarge"], .a11y-readable) .who-soon { font-size: 0.7rem; letter-spacing: 0; }
.who.secret .buddy { color: var(--fg); opacity: 0.82; }
.who.secret svg text { font-family: var(--display); fill: var(--bg); }
.who[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: 0 0 0 2px var(--brand); }
.who.locked { border-style: dashed; background: transparent; color: var(--muted); cursor: help; }
.maatje-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.maatje-tabs button { min-height: 44px; padding: 4px 2px; border: 0; border-bottom: 4px solid var(--line); background: none; color: var(--muted); font: 800 0.95rem var(--body); overflow-wrap: anywhere; }
.maatje-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--brand); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 76px; padding: 5px 2px 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); font: 700 0.74rem/1.2 var(--body); overflow-wrap: anywhere; }
.pick[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: 0 0 0 2px var(--brand); }
.pick.locked { border-style: dashed; background: transparent; cursor: help; color: var(--muted); }
.pick.locked .buddy { filter: grayscale(1); opacity: 0.45; }
.pick-lock { position: absolute; right: 5px; top: 4px; font-style: normal; font-size: 0.85rem; }
.picks .tik * { animation: none !important; }
.a11y-contrast :is(.pick, .who, .maatje-top) { border-color: var(--fg); }
.a11y-contrast .maatje-tabs button[aria-selected="true"] { border-bottom-color: var(--fg); }
@media (max-width: 359px) { .pick { width: 66px; } .maatje-who { gap: 4px; } .who { font-size: 0.64rem; } .who-soon { font-size: 0.5rem; } }
/* In het venster vullen de dingen de breedte: drie naast elkaar op een smalle telefoon, vier op een gewone. */
.maatje-dlg .picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
.maatje-dlg .pick { width: auto; }
@media (max-width: 359px) { .maatje-dlg .pick { font-size: 0.7rem; } .maatje-dlg .maatje-tabs button { font-size: 0.84rem; } }
/* Het maatje op de startpagina van het kind is een knop naar "Je maatje": ziet er hetzelfde uit, alleen een handje en een duwtje. */
.buddy-tap { flex: none; padding: 0; border: 0; border-radius: 16px; background: none; line-height: 0; cursor: pointer; }
.buddy-tap:active { transform: scale(0.96); }
.a11y-calm .buddy-tap:active { transform: none; }
/* Op een blauwe kaart: een witte rand eromheen. */
.buddy.rim svg { filter: drop-shadow(1.3px 0 0 #fff) drop-shadow(-1.3px 0 0 #fff) drop-shadow(0 1.3px 0 #fff) drop-shadow(0 -1.3px 0 #fff); }
/* Tekstballon naast Tik. */
.talk { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.bubble { position: relative; min-width: 0; margin-bottom: 14px; padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line-strong); color: var(--fg); font: 700 1.08rem/1.3 var(--display); overflow-wrap: anywhere; text-align: left; }
.bubble::before { content: ""; position: absolute; left: -8px; bottom: 10px; width: 13px; height: 13px; background: inherit; border-left: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); border-radius: 0 0 0 4px; transform: rotate(45deg); }
.talk.sm { gap: 8px; }
.talk.sm .bubble { font-size: 0.98rem; padding: 6px 10px; margin-bottom: 8px; }
.talk.sm .bubble::before { width: 11px; height: 11px; left: -7px; bottom: 8px; }
.a11y-contrast .bubble, .a11y-contrast .bubble::before { border-color: var(--fg); }
/* Tik tijdens een spel: vaste plek boven de vraag, de hele ronde. Zijn ballon blijft staan tot het volgende antwoord.
   De ruimte is zo hoog als de langste zin (onzichtbare kopieën in dezelfde cel): er verspringt niets als de zin wisselt.
   Hij zit nergens voor, is niet aan te klikken en pakt de focus niet. Rustig en "minder beweging": stil (zie boven). */
.tik-dock { pointer-events: none; user-select: none; }
.tik-slot { flex: 1; min-width: 0; display: grid; align-items: end; justify-items: start; }
.tik-slot > .bubble { grid-area: 1 / 1; }
.tik-slot > .ghost { visibility: hidden; }
.tik-dock .bubble:not(.ghost) { transform-origin: 0 100%; animation: tik-say 0.3s ease-out; }
@keyframes tik-say { from { transform: scale(0.9); opacity: 0.3; } to { transform: none; opacity: 1; } }
/* Bij elke reactie beweegt hij even (twee keer), daarna staat hij stil met zijn gezicht; alleen knipperen gaat door. */
.tik-dock .tik :is(.t-fig, .t-spark, .t-sprout, .t-wave) { animation-iteration-count: 2; }
.tik-end { justify-content: center; max-width: 100%; }
/* Landing: kennismaken met Tik (in "Waarom Wistik", ver van de prijzen). */
.meet-tik { flex-direction: row; align-items: center; gap: 16px; }
.meet-tik .stack { gap: 4px; min-width: 0; }
.meet-tik h3 { font-size: 1.25rem; }
@media (max-width: 380px) { .meet-tik { gap: 10px; padding: 14px; } .meet-tik .buddy { --s: 64px !important; } }
/* Demo: Tik groet, met daarnaast de knop "Geluid aan" (standaard uit). */
.demo-tik { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.demo-tik .sound-toggle { margin-bottom: 8px; }
.btn.sound-toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary-deep); color: var(--on-primary); }
.iconbtn.sound-toggle[aria-pressed="true"] { background: var(--raised); color: var(--fg); }

/* ---------- Inlogpagina's: formulier rechts, Tik links (AuthShell in views/auth.js) ----------
   Breed (900px en meer): links een blauw vlak met een grote Tik, zijn zin en wat ouders aan Wistik hebben; rechts het
   formulier, midden in de hoogte. Het vlak vult het scherm onder de bovenbalk; de footer staat eronder.
   Smaller: geen vlak, alleen een kleine Tik met zijn zin boven de kop; het formulier blijft bovenaan.
   Tik is versiering: hij zwaait twee keer en staat dan stil (alleen knipperen gaat door); bij Rustig en "minder
   beweging" helemaal stil (zie boven). */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-main { display: flex; justify-content: center; min-width: 0; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.auth-form { width: 100%; max-width: 440px; min-width: 0; }
/* Inlogpagina: wie logt er in? Grote knoppen naast elkaar; komt er een rol bij, dan past die er vanzelf naast. */
.who-pick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.who-pick button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 10px 8px; background: var(--surface); color: var(--fg);
  border: 2px solid var(--line-strong); border-bottom-width: 4px; border-radius: 18px; font: 800 1.15rem/1.1 var(--display); }
.who-pick button[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.who-icon { display: grid; place-items: center; width: 30px; font-size: 1.6rem; line-height: 1; color: var(--brand); }
.a11y-contrast .who-pick button { border-color: var(--fg); }
.a11y-contrast .who-pick button[aria-pressed="true"] { border-width: 4px; box-shadow: none; }
.auth-mini { margin-bottom: -6px; }
.auth-side { display: none; }
.auth .tik :is(.t-fig, .t-spark, .t-sprout, .t-wave) { animation-iteration-count: 2; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "side main"; min-height: calc(100vh - 65px - env(safe-area-inset-top, 0px)); min-height: calc(100dvh - 65px - env(safe-area-inset-top, 0px)); }
  .auth-main { grid-area: main; align-items: center; padding: 48px clamp(24px, 4vw, 64px) 64px; }
  /* Aanmelden (zonder footer): minder witruimte, zodat de pagina op 1280x800 niet scrollt. */
  .auth.no-foot .auth-main { padding-top: 24px; padding-bottom: 24px; }
  .auth-mini { display: none; }
  .auth-side { grid-area: side; display: flex; align-items: center; justify-content: center; position: relative; isolation: isolate; overflow: hidden;
    /* Onder extra ruimte: daar staat de zon, die komt nooit achter tekst. */
    padding: 56px clamp(24px, 4vw, 64px) 128px; color: var(--on-primary);
    /* Achtergrondkleur = de lichtste kleur van het vlak: daartegen wordt het contrast van de tekst gemeten. */
    background-color: var(--primary);
    background-image: radial-gradient(color-mix(in srgb, var(--on-primary) 9%, transparent) 1.6px, transparent 2.2px),
      linear-gradient(170deg, transparent 35%, color-mix(in srgb, var(--primary-deep) 70%, transparent));
    background-size: 22px 22px, auto; }
  /* Speelse vormen in Wistik-kleuren, ver van de tekst: een zon linksonder en een zachte ring rechtsboven. */
  .auth-side::before { content: ""; position: absolute; z-index: -1; left: -70px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: var(--sun); opacity: 0.9; }
  .auth-side::after { content: ""; position: absolute; z-index: -1; right: -110px; top: -110px; width: 300px; height: 300px; border-radius: 50%; border: 36px solid color-mix(in srgb, var(--on-primary) 10%, transparent); }
}
.auth-side-in { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 420px; }
.auth-bubble { position: relative; max-width: 100%; margin-bottom: 18px; padding: 12px 22px; border-radius: 22px; background: var(--surface); color: var(--fg); text-align: center;
  font: 800 clamp(1.45rem, 0.9rem + 1.1vw, 2rem)/1.15 var(--display); text-wrap: balance; overflow-wrap: anywhere; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.45); }
.auth-bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 20px; height: 20px; margin-left: -10px; background: inherit; border-radius: 0 0 5px 0; transform: rotate(45deg); }
/* Een zachte lichte schijf achter Tik, met een witte rand om hem heen: zo valt hij niet weg op het blauw. */
.auth-stage { display: grid; place-items: center; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--on-primary) 24%, transparent) 0 46%, color-mix(in srgb, var(--on-primary) 8%, transparent) 68%, transparent 70%); }
.auth-perks { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; font: 700 1.1rem/1.35 var(--body); }
.auth-perks li { display: flex; gap: 12px; align-items: flex-start; }
.auth-tick { flex: none; width: 26px; height: 26px; margin-top: -1px; border-radius: 8px; display: grid; place-items: center; background: var(--sun); color: var(--on-sun); font: 800 0.9rem/1 var(--body); }
/* Hoog contrast: effen blauw, geen stippen, gloed of vormen; duidelijke randen. */
.a11y-contrast .auth-side { background-image: none; }
.a11y-contrast .auth-side::before, .a11y-contrast .auth-side::after { display: none; }
.a11y-contrast .auth-stage { background: none; }
.a11y-contrast :is(.auth-bubble, .auth-tick) { border: 2px solid var(--fg); box-shadow: none; }
.a11y-contrast .auth-bubble::after { border: solid var(--fg); border-width: 0 2px 2px 0; }

/* Bovenbalk: de knop van de pagina waar je bent (aria-current), alleen met een streep eronder: zelfde maat en plek. */
.topbar .btn[aria-current="page"] { text-decoration: underline 3px; text-decoration-color: var(--brand); text-underline-offset: 6px; }

/* Foto's van een kind die op de ouder wachten (views/kidscan.js). */
.req-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.req-thumbs a { display: block; width: 60px; height: 80px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: var(--raised); flex: none; }
.req-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-req { border-color: var(--brand); }
.scan-req .row .btn { flex: 1 1 120px; }
.scan-req .card-title, .req-sub { overflow-wrap: anywhere; }
.kid-waiting ul { list-style: none; margin: 0; padding: 0; }
.kid-waiting li > span:first-child { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.a11y-contrast .req-thumbs a { border-color: var(--fg); }

/* Overhoor Tik: het antwoord van het maatje als regel in een schrift; rustige feedback als het kind zich vergist. */
.tik-wrote { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 0 0; padding: 10px 16px; border: 2px dashed var(--line); border-radius: 16px; min-width: min(100%, 14rem); max-width: 100%; }
.tik-wrote b { font: 800 1.5rem/1.2 var(--display); overflow-wrap: anywhere; }
.tik-wrote b.long { font-size: 1.2rem; }
.tik-wrote b.xlong { font-size: 1rem; }
.fb.soft { background: var(--warn-bg); color: var(--fg); }
.mode-ico .buddy { display: block; }
.check > span { min-width: 0; overflow-wrap: anywhere; }
/* Samen overhoren op afstand (views/samen.js) */
.samen-wait { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; text-align: center; }
.samen-wait > * { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.samen-wait.short { min-height: 0; padding: 8px 0; }
.samen-wait .btn { min-width: min(240px, 100%); }
.samen-wait .talk { text-align: left; }
.samen-brand { display: flex; align-items: center; gap: 8px; font: 800 1.25rem var(--display); margin-bottom: 14px; }
.samen-answer { width: 100%; background: var(--ok-bg); border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.samen-answer .ask { color: var(--ok); }
.samen-judge .btn { min-height: 64px; font-size: 1.15rem; flex: 1 1 130px; }
.samen-emo .btn { flex: 1 1 0; font-size: 2rem; min-height: 72px; }
.big-emo { font-size: 4rem; line-height: 1; }
.samen-line { font-size: 1.2rem; }
.samen-invite .btn { align-self: flex-start; min-width: 140px; }
.samen-open { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.samen-who button { flex: 1 1 96px; }
.a11y-contrast .samen-answer { border: 2px solid var(--fg); }

/* ---------- Sprint (views/rennen.js; in de code "rennen") ----------
   Staand: het landschap (de rest van de hoogte), daaronder de vraag. Telefoon op zijn kant: landschap links, vraag rechts.
   Geen bovenbalk, net als bij de andere spellen. Elke wereld (bos, strand, sneeuw, woestijn en de vier van ronde 4) heeft een eigen dag- en
   nachtpalet dat het thema van de app volgt (ook de eigen themaknop). Het bos is het palet van .rennen zelf; de andere
   werelden staan eronder, per wereld (data-scene) met dezelfde namen. */
.rennen {
  --r-heart: #e5403a; --r-heart-off: #c9cfe6; --r-scrim: rgba(27, 37, 89, 0.42);
  --r-sky-top: #7cc8f7; --r-sky-bot: #dcf2ff; --r-sun-disc: #ffd95e; --r-cloud: #ffffff;
  --r-hill-far: #a9d9a1; --r-tree-far: #82c28c; --r-tree-mid: #3f9a5a; --r-tree-mid-2: #2f8049; --r-trunk: #7a4f33;
  --r-grass: #5db85a; --r-grass-dark: #3f9a46; --r-soil: #b98353; --r-soil-dark: #9a6a41;
  --r-wood: #a0683f; --r-wood-light: #e2b583; --r-rock: #9aa3b8; --r-rock-light: #c6ccdc; --r-cap: #e5403a; --r-stem: #fff3dc;
  --r-ground-shadow: rgba(27, 37, 89, 0.18);
  height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(170px, 1fr) minmax(0, auto);
  grid-template-areas: "scene" "panel"; overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rennen {
    --r-heart: #ff6b63; --r-heart-off: #3a4272; --r-scrim: rgba(6, 9, 26, 0.6);
    --r-sky-top: #1a2350; --r-sky-bot: #4d5192; --r-sun-disc: #f4f0cf; --r-cloud: #6c72a8;
    --r-hill-far: #2f4a5c; --r-tree-far: #2a4f4a; --r-tree-mid: #1f4a3a; --r-tree-mid-2: #173b2e; --r-trunk: #3d2a20;
    --r-grass: #2f7a45; --r-grass-dark: #245f37; --r-soil: #5a3d2a; --r-soil-dark: #47301f;
    --r-wood: #7d5232; --r-wood-light: #c49a6c; --r-rock: #6f7795; --r-rock-light: #9aa2bf; --r-cap: #d13a33; --r-stem: #e6dcc6;
    --r-ground-shadow: rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] .rennen {
  --r-heart: #ff6b63; --r-heart-off: #3a4272; --r-scrim: rgba(6, 9, 26, 0.6);
  --r-sky-top: #1a2350; --r-sky-bot: #4d5192; --r-sun-disc: #f4f0cf; --r-cloud: #6c72a8;
  --r-hill-far: #2f4a5c; --r-tree-far: #2a4f4a; --r-tree-mid: #1f4a3a; --r-tree-mid-2: #173b2e; --r-trunk: #3d2a20;
  --r-grass: #2f7a45; --r-grass-dark: #245f37; --r-soil: #5a3d2a; --r-soil-dark: #47301f;
  --r-wood: #7d5232; --r-wood-light: #c49a6c; --r-rock: #6f7795; --r-rock-light: #9aa2bf; --r-cap: #d13a33; --r-stem: #e6dcc6;
  --r-ground-shadow: rgba(0, 0, 0, 0.35);
}
.rennen[data-scene="strand"] { --r-sky-top: #5cc3f5; --r-sky-bot: #d8f3ff; --r-sun-disc: #ffd95e; --r-cloud: #ffffff; --r-hill-far: #2fa7c9; --r-tree-far: #8fdcec; --r-tree-mid: #3aa55c; --r-tree-mid-2: #2c8a4b; --r-trunk: #8a6240; --r-grass: #dcc48d; --r-grass-dark: #9bb86a; --r-soil: #f3dfae; --r-soil-dark: #e2cb93; --r-wood: #b98a55; --r-wood-light: #e3c27c; --r-rock: #9aa3b8; --r-rock-light: #c6ccdc; --r-cap: #e5403a; --r-stem: #fff3dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="strand"] { --r-sky-top: #141c45; --r-sky-bot: #3f4a8a; --r-sun-disc: #f4f0cf; --r-cloud: #5c639c; --r-hill-far: #1d3f66; --r-tree-far: #3b6a93; --r-tree-mid: #1f5a44; --r-tree-mid-2: #17473a; --r-trunk: #4a3626; --r-grass: #6f6548; --r-grass-dark: #4d6a48; --r-soil: #8a7c5a; --r-soil-dark: #726648; --r-wood: #6d5236; --r-wood-light: #a8946a; --r-rock: #6f7795; --r-rock-light: #9aa2bf; --r-cap: #d13a33; --r-stem: #e6dcc6; } }
:root[data-theme="dark"] .rennen[data-scene="strand"] { --r-sky-top: #141c45; --r-sky-bot: #3f4a8a; --r-sun-disc: #f4f0cf; --r-cloud: #5c639c; --r-hill-far: #1d3f66; --r-tree-far: #3b6a93; --r-tree-mid: #1f5a44; --r-tree-mid-2: #17473a; --r-trunk: #4a3626; --r-grass: #6f6548; --r-grass-dark: #4d6a48; --r-soil: #8a7c5a; --r-soil-dark: #726648; --r-wood: #6d5236; --r-wood-light: #a8946a; --r-rock: #6f7795; --r-rock-light: #9aa2bf; --r-cap: #d13a33; --r-stem: #e6dcc6; }
.rennen[data-scene="sneeuw"] { --r-sky-top: #9fc9ee; --r-sky-bot: #eaf5ff; --r-sun-disc: #fff1b0; --r-cloud: #ffffff; --r-hill-far: #dbe9f7; --r-tree-far: #9fc0c9; --r-tree-mid: #3f8f7a; --r-tree-mid-2: #2f7566; --r-trunk: #6b4a35; --r-grass: #ffffff; --r-grass-dark: #cfdff0; --r-soil: #e6eef8; --r-soil-dark: #c9d8ea; --r-wood: #8e5f3d; --r-wood-light: #dcb488; --r-rock: #8fa3bf; --r-rock-light: #d9e6f5; --r-cap: #e5403a; --r-stem: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="sneeuw"] { --r-sky-top: #131b44; --r-sky-bot: #3b4682; --r-sun-disc: #f4f0cf; --r-cloud: #5a6198; --r-hill-far: #5f6f9c; --r-tree-far: #2f4a5c; --r-tree-mid: #1f4a48; --r-tree-mid-2: #173b3b; --r-trunk: #3d2a20; --r-grass: #c5d2ea; --r-grass-dark: #8e9cc0; --r-soil: #9aa8cc; --r-soil-dark: #7f8db4; --r-wood: #7d5232; --r-wood-light: #c49a6c; --r-rock: #66769a; --r-rock-light: #a9b6d6; --r-cap: #d13a33; --r-stem: #e8eefc; } }
:root[data-theme="dark"] .rennen[data-scene="sneeuw"] { --r-sky-top: #131b44; --r-sky-bot: #3b4682; --r-sun-disc: #f4f0cf; --r-cloud: #5a6198; --r-hill-far: #5f6f9c; --r-tree-far: #2f4a5c; --r-tree-mid: #1f4a48; --r-tree-mid-2: #173b3b; --r-trunk: #3d2a20; --r-grass: #c5d2ea; --r-grass-dark: #8e9cc0; --r-soil: #9aa8cc; --r-soil-dark: #7f8db4; --r-wood: #7d5232; --r-wood-light: #c49a6c; --r-rock: #66769a; --r-rock-light: #a9b6d6; --r-cap: #d13a33; --r-stem: #e8eefc; }
.rennen[data-scene="woestijn"] { --r-sky-top: #6fc3f2; --r-sky-bot: #ffe9c4; --r-sun-disc: #ffd24a; --r-cloud: #ffffff; --r-hill-far: #f0c58a; --r-tree-far: #e3a765; --r-tree-mid: #4f9d57; --r-tree-mid-2: #3b8247; --r-trunk: #6b4a35; --r-grass: #f2b866; --r-grass-dark: #b98a3f; --r-soil: #e09a4f; --r-soil-dark: #c47f3a; --r-wood: #9b6a3f; --r-wood-light: #e0b47c; --r-rock: #c0603f; --r-rock-light: #e08a66; --r-cap: #ff6f9f; --r-stem: #fff3dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="woestijn"] { --r-sky-top: #1a1b47; --r-sky-bot: #5a4a82; --r-sun-disc: #f4f0cf; --r-cloud: #6a6aa0; --r-hill-far: #5a4666; --r-tree-far: #4d3a52; --r-tree-mid: #24543c; --r-tree-mid-2: #1b4331; --r-trunk: #33241c; --r-grass: #8a6744; --r-grass-dark: #5f4a2e; --r-soil: #6e4f36; --r-soil-dark: #573d29; --r-wood: #6d4a2e; --r-wood-light: #b08a5e; --r-rock: #7a4234; --r-rock-light: #a8644f; --r-cap: #d85a8a; --r-stem: #e6dcc6; } }
:root[data-theme="dark"] .rennen[data-scene="woestijn"] { --r-sky-top: #1a1b47; --r-sky-bot: #5a4a82; --r-sun-disc: #f4f0cf; --r-cloud: #6a6aa0; --r-hill-far: #5a4666; --r-tree-far: #4d3a52; --r-tree-mid: #24543c; --r-tree-mid-2: #1b4331; --r-trunk: #33241c; --r-grass: #8a6744; --r-grass-dark: #5f4a2e; --r-soil: #6e4f36; --r-soil-dark: #573d29; --r-wood: #6d4a2e; --r-wood-light: #b08a5e; --r-rock: #7a4234; --r-rock-light: #a8644f; --r-cap: #d85a8a; --r-stem: #e6dcc6; }
/* Vier werelden die bij een maatje horen (ronde 4); elk maatje kan er rennen. --r-glow is wat er licht geeft (ramen, sterren, lava). */
/* De wereld van Robbie: een stad met fabrieken en tandwielen. */
.rennen[data-scene="robotstad"] { --r-sky-top: #8fb6d9; --r-sky-bot: #e3eef5; --r-sun-disc: #ffe08a; --r-cloud: #ffffff; --r-hill-far: #b9c6d6; --r-tree-far: #8e9db3; --r-tree-mid: #5f6f8a; --r-tree-mid-2: #4b5a75; --r-trunk: #e08a2e; --r-grass: #f2b632; --r-grass-dark: #3a4257; --r-soil: #8a94a8; --r-soil-dark: #6f7990; --r-wood: #7a5a3a; --r-wood-light: #c9a06a; --r-rock: #7d8799; --r-rock-light: #b4bdcc; --r-cap: #ff7a2e; --r-stem: #fff3dc; --r-glow: #ffe27a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="robotstad"] { --r-sky-top: #10142e; --r-sky-bot: #2e3566; --r-sun-disc: #f4f0cf; --r-cloud: #4a5182; --r-hill-far: #262d52; --r-tree-far: #1f2647; --r-tree-mid: #323a5c; --r-tree-mid-2: #283050; --r-trunk: #b86f2a; --r-grass: #b98a2a; --r-grass-dark: #1a1f38; --r-soil: #3d4563; --r-soil-dark: #2e3550; --r-wood: #5c4430; --r-wood-light: #a08258; --r-rock: #5a6382; --r-rock-light: #8891ae; --r-cap: #e0692a; --r-stem: #e6dcc6; --r-glow: #ffd24a; } }
:root[data-theme="dark"] .rennen[data-scene="robotstad"] { --r-sky-top: #10142e; --r-sky-bot: #2e3566; --r-sun-disc: #f4f0cf; --r-cloud: #4a5182; --r-hill-far: #262d52; --r-tree-far: #1f2647; --r-tree-mid: #323a5c; --r-tree-mid-2: #283050; --r-trunk: #b86f2a; --r-grass: #b98a2a; --r-grass-dark: #1a1f38; --r-soil: #3d4563; --r-soil-dark: #2e3550; --r-wood: #5c4430; --r-wood-light: #a08258; --r-rock: #5a6382; --r-rock-light: #8891ae; --r-cap: #e0692a; --r-stem: #e6dcc6; --r-glow: #ffd24a; }
/* De wereld van Luna: een maantuin met sterren. Licht is de schemering, donker de nacht. */
.rennen[data-scene="maannacht"] { --r-sky-top: #6a5bb5; --r-sky-bot: #f7b6c8; --r-sun-disc: #fff6d8; --r-cloud: #f9d6e3; --r-hill-far: #a58fc9; --r-tree-far: #7f74b5; --r-tree-mid: #4f5f9a; --r-tree-mid-2: #3f4d85; --r-trunk: #4a3a5e; --r-grass: #5fae8e; --r-grass-dark: #3f8a72; --r-soil: #7a6a9a; --r-soil-dark: #64558a; --r-wood: #6b4a5e; --r-wood-light: #c9a0b0; --r-rock: #8f8fb8; --r-rock-light: #c2c2e0; --r-cap: #ff8fc7; --r-stem: #fff3dc; --r-glow: #fff2a8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="maannacht"] { --r-sky-top: #070a24; --r-sky-bot: #27306b; --r-sun-disc: #f6f2d8; --r-cloud: #3a4180; --r-hill-far: #1e2a55; --r-tree-far: #182348; --r-tree-mid: #153a48; --r-tree-mid-2: #102e3c; --r-trunk: #2a2038; --r-grass: #1f6a5c; --r-grass-dark: #17524a; --r-soil: #2f2a52; --r-soil-dark: #241f42; --r-wood: #4a3446; --r-wood-light: #9a7a8a; --r-rock: #565a8a; --r-rock-light: #8a8fc0; --r-cap: #e06ab0; --r-stem: #e6dcc6; --r-glow: #fff2a8; } }
:root[data-theme="dark"] .rennen[data-scene="maannacht"] { --r-sky-top: #070a24; --r-sky-bot: #27306b; --r-sun-disc: #f6f2d8; --r-cloud: #3a4180; --r-hill-far: #1e2a55; --r-tree-far: #182348; --r-tree-mid: #153a48; --r-tree-mid-2: #102e3c; --r-trunk: #2a2038; --r-grass: #1f6a5c; --r-grass-dark: #17524a; --r-soil: #2f2a52; --r-soil-dark: #241f42; --r-wood: #4a3446; --r-wood-light: #9a7a8a; --r-rock: #565a8a; --r-rock-light: #8a8fc0; --r-cap: #e06ab0; --r-stem: #e6dcc6; --r-glow: #fff2a8; }
/* De wereld van Vonk: vulkanen, zwarte rots en gloeiende lava. */
.rennen[data-scene="vulkaan"] { --r-sky-top: #f29a4a; --r-sky-bot: #ffe3a8; --r-sun-disc: #fff1b0; --r-cloud: #b9a8a0; --r-hill-far: #8a5a52; --r-tree-far: #6e4640; --r-tree-mid: #4a3432; --r-tree-mid-2: #3a2828; --r-trunk: #2a1c1c; --r-grass: #5a4440; --r-grass-dark: #3a2a28; --r-soil: #6b4f48; --r-soil-dark: #523a34; --r-wood: #3a2a26; --r-wood-light: #7a5a4a; --r-rock: #4a3a3a; --r-rock-light: #7a6462; --r-cap: #ff5a1f; --r-stem: #ffe27a; --r-glow: #ff8a1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="vulkaan"] { --r-sky-top: #1a0c14; --r-sky-bot: #5a1f24; --r-sun-disc: #f4c9a0; --r-cloud: #4a3038; --r-hill-far: #3a1a22; --r-tree-far: #2c141c; --r-tree-mid: #201018; --r-tree-mid-2: #180c12; --r-trunk: #100808; --r-grass: #33222a; --r-grass-dark: #20141a; --r-soil: #2a1a20; --r-soil-dark: #1e1218; --r-wood: #2a1a18; --r-wood-light: #5a4038; --r-rock: #5c4650; --r-rock-light: #8c7280; --r-cap: #ff5a1f; --r-stem: #ffd86a; --r-glow: #ff7a1f; } }
:root[data-theme="dark"] .rennen[data-scene="vulkaan"] { --r-sky-top: #1a0c14; --r-sky-bot: #5a1f24; --r-sun-disc: #f4c9a0; --r-cloud: #4a3038; --r-hill-far: #3a1a22; --r-tree-far: #2c141c; --r-tree-mid: #201018; --r-tree-mid-2: #180c12; --r-trunk: #100808; --r-grass: #33222a; --r-grass-dark: #20141a; --r-soil: #2a1a20; --r-soil-dark: #1e1218; --r-wood: #2a1a18; --r-wood-light: #5a4038; --r-rock: #5c4650; --r-rock-light: #8c7280; --r-cap: #ff5a1f; --r-stem: #ffd86a; --r-glow: #ff7a1f; }
/* De wereld van Bubbel: een koraalrif. De lucht is hier het water (boven licht, onder diep). */
.rennen[data-scene="onderwater"] { --r-sky-top: #7fe0e8; --r-sky-bot: #2a9ccf; --r-sun-disc: #ffffff; --r-cloud: #ffffff; --r-hill-far: #3f8fc0; --r-tree-far: #2f78ad; --r-tree-mid: #2fae7a; --r-tree-mid-2: #ff7f9f; --r-trunk: #8a5a3a; --r-grass: #e8d49a; --r-grass-dark: #3f9a6a; --r-soil: #f0deaa; --r-soil-dark: #d9c48c; --r-wood: #8a5a34; --r-wood-light: #d9a85a; --r-rock: #6f88a8; --r-rock-light: #a8c0dc; --r-cap: #ff8a3d; --r-stem: #ffffff; --r-glow: #ffd95e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rennen[data-scene="onderwater"] { --r-sky-top: #123a66; --r-sky-bot: #060f2e; --r-sun-disc: #cfe6ff; --r-cloud: #6fa0d0; --r-hill-far: #0f2a50; --r-tree-far: #0c2244; --r-tree-mid: #156a55; --r-tree-mid-2: #b0507a; --r-trunk: #4a3626; --r-grass: #6f6a58; --r-grass-dark: #1f5a48; --r-soil: #5a5a66; --r-soil-dark: #484854; --r-wood: #5c3e26; --r-wood-light: #a07a44; --r-rock: #3f4f72; --r-rock-light: #6f82a8; --r-cap: #d9702f; --r-stem: #cfe6ff; --r-glow: #f4d060; } }
:root[data-theme="dark"] .rennen[data-scene="onderwater"] { --r-sky-top: #123a66; --r-sky-bot: #060f2e; --r-sun-disc: #cfe6ff; --r-cloud: #6fa0d0; --r-hill-far: #0f2a50; --r-tree-far: #0c2244; --r-tree-mid: #156a55; --r-tree-mid-2: #b0507a; --r-trunk: #4a3626; --r-grass: #6f6a58; --r-grass-dark: #1f5a48; --r-soil: #5a5a66; --r-soil-dark: #484854; --r-wood: #5c3e26; --r-wood-light: #a07a44; --r-rock: #3f4f72; --r-rock-light: #6f82a8; --r-cap: #d9702f; --r-stem: #cfe6ff; --r-glow: #f4d060; }
/* Het landschap loopt door tot de bovenrand, ook onder de klok van de geïnstalleerde app. Eerst stond daar de gekleurde
   strook van de rest van de app (body::before, --statusbar): boven een lichte lucht leek dat een vervaagde rand. In Sprint
   gaat die strook dus weg en begint de pagina helemaal bovenaan; de ruimte voor de klok (--r-top) komt precies één keer
   terug, bij de knoppen in het landschap (en liggend bij de vraag). Een browser zonder :has() houdt de oude strook. */
@supports selector(:has(a)) {
  body:has(.rennen) { padding-top: 0; }
  body:has(.rennen)::before { display: none; }
  body:has(.rennen) .rennen { --r-top: env(safe-area-inset-top, 0px); height: 100vh; height: 100dvh; }
}
.run-scene { grid-area: scene; position: relative; overflow: hidden; min-height: 0; min-width: 0; background: var(--r-sky-bot); }
.run-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
.run-runner { position: absolute; left: 0; top: 0; width: 100px; height: 100px; transform-origin: 50% 62%; will-change: transform; pointer-events: none; }
.run-fig, .run-fig svg { width: 100%; height: 100%; display: block; overflow: visible; max-width: none; }
.run-runner .t-shadow { display: none; }
.run-bubble { position: absolute; left: 0; top: 0; transform: translate(0, -100%); background: var(--surface); color: var(--fg); border: 2px solid var(--line-strong);
  border-radius: 14px; padding: 2px 12px; font: 800 1.05rem/1.4 var(--display); white-space: nowrap; pointer-events: none; animation: run-say 0.22s ease-out; }
.run-bubble::after { content: ""; position: absolute; left: 14px; bottom: -9px; width: 14px; height: 14px; background: var(--surface);
  border: solid var(--line-strong); border-width: 0 2px 2px 0; transform: rotate(45deg); border-bottom-right-radius: 3px; }
@keyframes run-say { from { transform: translate(0, -100%) scale(0.85); opacity: 0.2; } to { transform: translate(0, -100%); opacity: 1; } }
/* Hartjes, meters en pauze rechtsboven in het landschap; de muziekknop linksboven. */
.run-hud { position: absolute; top: calc(8px + var(--r-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 10px;
  border-radius: 14px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); }
.run-hearts { display: flex; gap: 3px; }
.run-hearts svg { width: 22px; height: 22px; display: block; }
.run-hearts path { fill: var(--r-heart); }
.run-hearts .off path { fill: var(--r-heart-off); }
.run-hearts .pop { animation: run-heart 0.5s ease-out; }
@keyframes run-heart { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.run-meters { font: 800 1.1rem/1 var(--display); min-width: 3.4em; text-align: right; }
.run-pausebtn, .run-mute { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line-strong); border-bottom-width: 4px; background: var(--surface); padding: 0; }
.run-mute { position: absolute; top: calc(8px + var(--r-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); font-size: 1.15rem; line-height: 1; }
.run-pausebtn svg { width: 16px; height: 16px; fill: var(--fg); }
/* Startscherm: de wereld kiezen, bovenaan in het midden van het landschap. Pijltjes van 44 pixels. */
.run-world { position: absolute; top: calc(8px + var(--r-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px;
  border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); max-width: calc(100% - 20px); }
.run-arrow { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line-strong); border-bottom-width: 4px; background: var(--surface); padding: 0; touch-action: manipulation; }
.run-arrow svg { width: 16px; height: 16px; fill: var(--fg); }
.run-arrow:active { transform: translateY(2px); border-bottom-width: 2px; }
.run-world-name { font: 800 1.1rem/1.1 var(--display); min-width: 6.6em; text-align: center; overflow-wrap: anywhere; }

/* Sprint: Tik leunt voorover, zakt een tikje bij elke stap, de voeten stappen en de armen zwaaien. Robbie glijdt rechtop. */
.run-fig.run svg { animation: run-bob 0.21s ease-in-out infinite; transform-origin: 50% 92%; }
.run-fig.run :is(.t-foot-l, .t-foot-r) { animation: run-stride 0.42s linear infinite; }
.run-fig.run .t-foot-r { animation-delay: -0.21s; }
.run-fig.run :is(.t-arm-l, .t-arm-r) { transform-box: view-box; animation: run-pump 0.42s ease-in-out infinite alternate; }
.run-fig.run .t-arm-l { transform-origin: 32px 70px; }
.run-fig.run .t-arm-r { transform-origin: 88px 70px; animation-delay: -0.42s; }
@keyframes run-bob { 0%, 100% { transform: translateY(0) rotate(7deg); } 50% { transform: translateY(-2.5%) rotate(7deg); } }
@keyframes run-stride { 0% { transform: translate(8px, 0); } 55% { transform: translate(-8px, 0); } 78% { transform: translate(0, -7px); } 100% { transform: translate(8px, 0); } }
@keyframes run-pump { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.run-fig.slide svg { transform-origin: 50% 92%; animation: run-glide 0.5s ease-in-out infinite alternate; }
@keyframes run-glide { from { transform: translateY(0); } to { transform: translateY(-2%); } }
.rennen.paused .run-fig, .rennen.paused .run-fig * { animation-play-state: paused !important; }

.run-pause { position: absolute; inset: 0; display: grid; place-items: center; background: var(--r-scrim); padding: 16px; z-index: 2; }
.run-pause-card { background: var(--surface); border-radius: 20px; padding: 18px 20px; display: grid; gap: 10px; width: min(300px, 100%); text-align: center; }
.run-pause-card h2 { font: 800 1.5rem/1.1 var(--display); }

.run-panel { grid-area: panel; min-width: 0; min-height: 0; background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; max-height: 66vh; max-height: 66dvh;
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.run-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.run-panel h1 { font-size: 1.65rem; line-height: 1.05; }
.run-panel h2 { font-size: 1.05rem; }
.run-lead { color: var(--muted); font-weight: 700; }
/* Maatjes op slot en de geheime maatjes zijn hier geen knop: wel te zien, niet aan te tikken. */
.run-who .who.locked { cursor: default; }
/* Wie er rent: de vijf maatjes op één rij en de zes geheime eronder, net als in Je maatje. 30 kolommen: een maatje is er
   6 breed, een geheim maatje 5. Grote tekst of het leesbare lettertype: rijen van drie (de regel bij .maatje-who). */
html:not([data-text="large"], [data-text="xlarge"], .a11y-readable) .run-who { grid-template-columns: repeat(30, minmax(0, 1fr)); }
html:not([data-text="large"], [data-text="xlarge"], .a11y-readable) .run-who > .who { grid-column: span 6; }
html:not([data-text="large"], [data-text="xlarge"], .a11y-readable) .run-who > .who.secret { grid-column: span 5; }
.run-q { text-align: center; display: grid; gap: 2px; justify-items: center; }
.run-qlabel { font: 700 0.95rem/1.2 var(--body); color: var(--muted); }
.run-panel h1.run-prompt { font: 800 2.1rem/1.1 var(--display); letter-spacing: 0; overflow-wrap: anywhere; }
.run-panel h1.run-prompt.long { font-size: 1.5rem; }
.run-panel h1.run-prompt.xlong { font-size: 1.15rem; }
.run-reveal { font: 800 1.1rem/1.3 var(--display); color: var(--ok); background: var(--ok-bg); border-radius: 12px; padding: 3px 12px; visibility: hidden; min-height: 1.3em; box-sizing: content-box; overflow-wrap: anywhere; }
.run-reveal.show { visibility: visible; animation: run-say-in 0.25s ease-out; }
@keyframes run-say-in { from { transform: scale(0.9); opacity: 0.3; } to { transform: none; opacity: 1; } }
.run-opts { display: grid; gap: 10px; }
.run-opts:focus { outline: none; }
.run-opts.n2, .run-opts.n4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.run-opt { display: flex; align-items: center; justify-content: center; gap: 8px; font: 800 1.35rem/1.15 var(--display); min-height: 62px; padding: 0.4rem 0.6rem; border-radius: 16px; border: 2px solid var(--line-strong);
  border-bottom-width: 5px; background: var(--surface); color: var(--fg); transition: transform 0.08s, background 0.2s, opacity 0.2s; overflow-wrap: anywhere; min-width: 0; touch-action: manipulation; }
.run-opt > span:first-child { min-width: 0; }
.run-opt .mark { font-size: 1.2rem; flex: none; }
.run-opts.n2 .run-opt { min-height: 88px; font-size: 1.7rem; }
.run-opts.n3 .run-opt { min-height: 54px; }
.rennen .run-opts.long .run-opt { font-size: 1.1rem; }
.rennen .run-opts.xlong .run-opt { font: 700 0.95rem/1.2 var(--body); min-height: 54px; }
.run-opt:active:not([disabled]) { transform: translateY(2px); border-bottom-width: 3px; }
.run-opt.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.run-opt.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); animation: run-shake 0.35s; }
.run-opt.dim { opacity: 0.45; }
@keyframes run-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.run-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.run-stat { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 8px 6px; text-align: center; min-width: 0; }
.run-stat b { display: block; font: 800 1.5rem/1.1 var(--display); }
.run-stat span { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.run-missed { display: grid; gap: 6px; }
.run-badge { display: inline-block; background: var(--r-heart); color: #fff; border-radius: 999px; padding: 0 10px; font: 800 0.85rem/1.6 var(--display); vertical-align: middle; }
.a11y-contrast :is(.run-opt, .run-stat, .run-pausebtn, .run-mute, .run-hud, .run-bubble, .run-world, .run-arrow) { border-color: var(--fg); }
@media (orientation: landscape) and (max-height: 600px) {
  .rennen { grid-template-columns: minmax(0, 1fr) minmax(290px, 42%); grid-template-rows: minmax(0, 1fr); grid-template-areas: "scene panel"; }
  .run-panel { max-height: none; border-top: 0; border-left: 1px solid var(--line); padding-top: calc(10px + var(--r-top, 0px)); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: 16px; }
  .run-inner { gap: 10px; }
  .run-panel h1.run-prompt { font-size: 1.8rem; }
  .run-panel h1.run-prompt.long { font-size: 1.35rem; }
  .run-opts.n2 .run-opt { min-height: 72px; }
}

/* ---------- Beginscherm en lijsten (ronde 3, groep A) ---------- */
/* Het maatje zegt bovenaan wat er te doen is: zijn groet en de volgende lijst, met één knop in de ballon. */
.buddy-top .bubble { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.buddy-top .bubble p { margin: 0; }
.buddy-top .bt-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font: 700 0.98rem/1.3 var(--body); }
.buddy-top .bt-next b { font-weight: 800; }
.buddy-top.no-buddy .bubble::before { display: none; }
/* Ouderoverzicht: de ingangen boven de lijsten. Naast elkaar als het past, anders onder elkaar. */
.list-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.list-entry .btn { width: 100%; padding-inline: 0.6rem; }
/* Een lijstkaart naar links vegen: daarachter staat Verwijderen. pan-y: omhoog en omlaag scrollt de browser zelf, zijwaarts
   vegen is voor de kaart (de pagina schuift dus nooit opzij). De kaart blijft altijd binnen zijn eigen vak (ook tijdens het
   terugschuiven); de 6 pixels rondom zijn ruimte voor de focusrand en het duwtje bij aanwijzen. */
.swipe-row { position: relative; display: flex; min-width: 0; padding: 6px; margin: -6px; border-radius: calc(var(--r) + 6px); overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.swipe-card { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; transition: transform 0.18s ease-out; }
.swipe-card > .card { flex: 1; }
.swipe-row.dragging .swipe-card { transition: none; }
/* Een kaart die je kunt vegen, beweegt alleen opzij. Het duwtje omlaag bij indrukken (en omhoog bij aanwijzen) zou hem
   tijdens het vegen scheef voor de rode knop zetten. */
.swipe-row .card.tap:active, .swipe-row.dragging .card.tap, .swipe-row.open .card.tap { transform: none; border-bottom-width: 5px; }
@media (hover: none) { .swipe-row .card.tap:hover { transform: none; } }
.swipe-del { position: absolute; inset: 6px 6px 6px auto; width: 104px; padding: 0 6px; border: 0; border-radius: var(--r); background: var(--bad); color: var(--surface); font: 800 0.95rem var(--body); cursor: pointer; visibility: hidden; transition: visibility 0s 0.18s; }
.swipe-row.open .swipe-del, .swipe-row.dragging .swipe-del { visibility: visible; transition: none; }
.a11y-calm .swipe-card { transition: none; }
.a11y-calm .swipe-del { transition: none; }
/* Datumveld: op een iPhone is het van zichzelf breder dan de andere velden. Zonder de eigen opmaak van de browser volgt het
   de breedte van het vak, net als de rest. */
.input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* ---------- Vaste knoppen onderaan ---------- */
/* De knoppenrij onderaan een pagina of venster (knoppenregel) blijft in beeld terwijl je scrolt. Alleen de laatste rij van
   het scherm: een rij midden op een pagina (een formulier op Profiel) scrolt gewoon mee. Dichte achtergrond in de kleur
   van de pagina of het venster, een dunne rand erboven, en onderaan ruimte voor de streep van de iPhone. */
.wrap > .actions:last-child { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line);
  margin-inline: -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
/* De rij sluit de pagina af: de ruimte onder de inhoud zit nu in de rij zelf. */
.wrap:has(> .actions:last-child) { padding-bottom: 0; }
/* Met Tab komt een veld of knop niet achter de rij terecht, en een melding staat erboven. */
html:has(.wrap > .actions:last-child) { scroll-padding-bottom: 96px; }
body:has(.wrap > .actions:last-child) .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
/* In een venster plakt de rij onderaan het venster zelf. bottom: -20px, want de browser rekent vanaf de binnenkant van de
   rand (padding) van het venster; zo staat de rij tegen de onderrand, ook tijdens het scrollen. */
.modal { scroll-padding-bottom: 88px; }
.modal > .actions:last-child, .modal > :is(.stack, form) > .actions:last-child, .modal .actions.stick { position: sticky; bottom: -20px; z-index: 2;
  background: var(--surface); border-top: 1px solid var(--line); margin-inline: -20px; padding: 10px 20px; }
.modal > .actions:last-child, .modal > :is(.stack, form) > .actions:last-child { margin-bottom: -20px; padding-bottom: 20px; }
/* Je maatje heeft een smallere rand (16px, meer plek voor de tegels): de vaste rij volgt die rand. */
.modal:has(.maatje-dlg) > .stack > .actions:last-child { bottom: -16px; margin-inline: -16px; margin-bottom: -16px; padding: 10px 16px 16px; }

/* ---------- Voortgang: een dag kiezen in de grafiek ---------- */
.chart .hit { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.chart .hit:focus-visible { stroke: var(--brand); stroke-width: 2; }
.chart .hit[aria-pressed="true"] { fill: color-mix(in srgb, var(--brand) 9%, transparent); }

/* ---------- Mijn badges als venster ---------- */
/* Twee kolommen, met de uitleg erbij: in een venster is er op elke breedte plek voor. */
.modal .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.modal .badge { padding: 10px 6px; }
.modal .badge-desc { display: block; }

/* ---------- Tijdlijn en Uitleggen (spellen voor de zaakvakken) ---------- */
/* Tijdlijn met jaartallen: een groeiende tijdbalk. Links het jaar, dan de stip op de lijn, dan de gebeurtenis.
   Tussen de gebeurtenissen staat een knop "Hier". --yr is de breedte van de kolom met jaren (breder bij "500 v.Chr."). */
.tl { --yr: 56px; position: relative; display: flex; flex-direction: column; gap: 6px; }
.tl.wide { --yr: 92px; }
.tl:focus { outline: none; }
.tl::before { content: ""; position: absolute; left: calc(var(--yr) + 16px); top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--line); }
.tl-ev { display: grid; grid-template-columns: var(--yr) 24px minmax(0, 1fr); align-items: center; column-gap: 6px; }
.tl-yr { font: 800 1.1rem/1 var(--display); text-align: right; }
.tl.wide .tl-yr { font-size: 0.95rem; }
.tl-dot { justify-self: center; position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); }
.tl-ring { justify-self: center; position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px dashed var(--line-strong); }
.tl-card { min-width: 0; padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tl-ev.new .tl-card { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.tl-ev.new .tl-dot { background: var(--ok); }
.tl-ev.new .tl-yr { color: var(--ok); }
.tl-ev.fix .tl-card { background: var(--warn-bg); border-color: var(--warn); }
.tl-ev.fix .tl-dot { background: var(--warn); }
.tl-slot { min-height: 44px; padding: 6px 12px; border: 2px dashed var(--line-strong); border-radius: 14px; background: transparent; color: var(--brand); font: 700 1rem var(--display); text-align: left; }
.tl-slot:hover { background: var(--raised); border-color: var(--brand); }
.tl-mark { padding: 6px 12px; border-radius: 14px; border: 2px dashed var(--bad); background: var(--bad-bg); color: var(--bad); font-weight: 800; }
/* Tijdlijn met tijdvakken: alle tien op volgorde, met nummer, naam en jaren. */
.opts.tv { gap: 8px; }
.opts.tv .opt { min-height: 50px; padding: 8px 12px; }
.tv-n { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--raised); border: 2px solid var(--line-strong); font: 800 1rem/1 var(--display); }
.opt.ok .tv-n { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.opt.no .tv-n { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.tv-name { display: flex; flex-direction: column; line-height: 1.2; }
.tv-name small { font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.opt.ok .tv-name small, .opt.no .tv-name small { color: inherit; }
/* Uitleggen: het tekstvak, wat het kind typte (herkende woorden gemarkeerd), de kernpunten met een vinkje en het voorbeeld. */
textarea.input.explain-text { min-height: 150px; font-size: 1.0625rem; }
.hint.left { text-align: left; }
/* Twee velden naast elkaar op een breed scherm (aanmelden als docent: wachtwoord en school). */
.field-row { display: grid; gap: 12px; align-items: start; }
@media (min-width: 900px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt.kp .grow { line-height: 1.3; }
.opt .box { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 9px; font: 800 1.05rem/1 var(--display); color: var(--muted); }
.opt.on { border-color: var(--primary); }
.opt.on .box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.opt.ok .box { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.opt.miss { border-style: dashed; border-color: var(--ok); }
.opt.miss .box { border-color: var(--ok); }
.opt.kp:disabled { opacity: 1; }
.model { background: var(--raised); }
.model .ask, .mine .ask { margin: 0; }
.mine p:not(.ask), .model p:not(.ask) { white-space: pre-wrap; overflow-wrap: anywhere; }
.mine mark { background: color-mix(in srgb, var(--sun) 50%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.kp-head { font: 700 1.15rem var(--display); }
.kp-head:focus { outline: none; }
/* Lijstpagina: de kernpunten onder het voorbeeldantwoord van een uitlegvraag. */
.kp-list { margin: 4px 0 0; padding-left: 1.2em; }
/* Editor: kernpunten onder een regel (een uitlegvraag). */
.erow .kps { grid-column: 2 / 4; display: grid; gap: 8px; }
.erow .kps .input { font-size: 1rem; font-weight: 600; min-height: 44px; }
.erow .kps .small { margin: 0; }
@media (max-width: 520px) { .erow .kps { grid-column: 1 / 3; } }
/* De uitleg na een antwoord is een hele zin: het teken blijft ervoor staan, de zin loopt ernaast door. */
.fb-line.tl-fb { flex-wrap: nowrap; align-items: flex-start; }
.fb-line.tl-fb > span:first-child { flex: none; }

/* ---------- Docent: inloggen, Mijn klassen, een klas, "Zo oefent je klas" en het Schooljaarpakket (views/docent.js) ---------- */
/* Inlogpagina met drie rollen: op een smalle telefoon (320) iets compacter, anders past "Docent" niet in de knop. */
@media (max-width: 379px) {
  .who-pick { gap: 6px; }
  .who-pick button { gap: 4px; padding-inline: 4px; font-size: 1rem; }
  .who-pick .who-icon { width: 24px; font-size: 1.3rem; }
}
/* Onder de 340 pixels nog een fractie kleiner, zodat "Docent" niet tegen de rand van zijn knop staat. */
@media (max-width: 339px) {
  .who-pick button { gap: 3px; padding-inline: 3px; font-size: 0.94rem; }
  .who-pick .who-icon { width: 22px; font-size: 1.15rem; }
}
/* De QR-code van de klaslink: altijd donker op wit, ook in het donkere thema (anders leest een scanner hem niet). */
.qr { display: block; flex: none; background: #fff; border-radius: 12px; border: 2px solid var(--line); }
.qr-big { width: min(100%, 55vh, 480px); height: auto; aspect-ratio: 1; }
/* Deel met je klas. */
.share { gap: 14px; }
.share-in { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.share-in .grow { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.share .code { font: 800 1.7rem/1 var(--display); letter-spacing: 0.14em; user-select: all; }
.share .link { font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
/* Toon op het bord: alles in het midden, de QR en de klascode groot (op een groot scherm een breder venster). */
.modal:has(.board) { width: min(600px, 100%); }
.board { align-items: center; text-align: center; }
.board h2 { overflow-wrap: anywhere; }
.board > .actions { align-self: stretch; }
.board-link { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; }
.board-link span { font-weight: 800; color: var(--muted); overflow-wrap: anywhere; }
.board-link b { font: 800 2.4rem/1 var(--display); letter-spacing: 0.14em; margin-right: -0.14em; }
/* "＋ Lijst toevoegen" onderaan de klas: op een smalle telefoon zonder het plusje, dan past de knop op één regel. */
@media (max-width: 419px) { .plus-wide { display: none; } }
/* Instellingen van een klas: het blok Nieuw schooljaar. */
.year-box { background: var(--raised); }
/* Zo oefent je klas: twee getallen, en de lastigste vragen met een balkje. */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--raised); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font: 800 1.9rem/1 var(--display); }
.stat span { font-size: 0.85rem; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.hard { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hard li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hard .qa { font-weight: 800; overflow-wrap: anywhere; }
.hard .qa span { font-weight: 600; color: var(--muted); }
.hard .pct { font: 800 0.95rem var(--display); color: var(--bad); white-space: nowrap; }
.hard .meter { grid-column: 1 / -1; height: 8px; }
.hard .meter > i { background: var(--bad); }
.too-few { text-align: center; padding: 22px 14px; border: 2px dashed var(--line-strong); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--muted); }
.too-few b { color: var(--fg); font: 700 1.15rem var(--display); }
/* Schooljaarpakket: twee prijskaarten naast elkaar (in plaats van drie). */
@media (min-width: 760px) { .plans.two { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; } }
/* Hoog contrast: duidelijke randen, geen tinten. */
.a11y-contrast :is(.qr, .stat, .too-few) { border: 2px solid var(--fg); }
.a11y-contrast :is(.stat, .year-box) { background: var(--bg); }
.a11y-contrast :is(.share .link, .board-link span, .stat span, .too-few, .hard .qa span) { color: var(--fg); }
