/* Alif — Arabisch leren — opmaak. Mobiel eerst; vanaf 900px een zijbalk links. */
:root {
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Noto Naskh Arabic', 'Segoe UI', 'Geeza Pro', 'Noto Sans Arabic', sans-serif;
  --achtergrond: #FFF8E7; --vlak: #ffffff; --inkt: #2B2D42; --stil: #6c6f80; --lijn: #ECE4D2;
  --primair: #FF6B6B; --primair-donker: #D94F4F; --tweede: #4ECDC4; --accent: #FFD93D; --groen: #6BCB77; --groen-donker: #4FA85B; --rood: #FF4D4D; --rood-donker: #C73A3A; --blauw: #4D96FF; --paars: #845EC2;
  --straal: 22px; --schaduw: 0 6px 20px rgba(43,45,66,.08);
  --achtergrond-beeld: none;
}
body[data-modus="volwassen"] {
  --achtergrond: #F7F5F0; --vlak: #ffffff; --inkt: #1F2A44; --stil: #66708a; --lijn: #E6E2D8;
  --primair: #0E7C86; --primair-donker: #0A5B63; --tweede: #E07A5F; --accent: #F2CC8F; --groen: #5BA57A; --groen-donker: #41825D; --rood: #D9534F; --rood-donker: #B23F3B; --blauw: #3D5A80; --paars: #6D597A;
  --straal: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--inkt); background: var(--achtergrond); min-height: 100vh; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
body::before { content: ''; position: fixed; inset: 0; background: var(--achtergrond-beeld); opacity: .55; z-index: -1; pointer-events: none; }
body.donkere-achtergrond { --inkt: #ffffff; --stil: #d7d9f0; }
body.donkere-achtergrond::before { opacity: 1; }
body.donkere-achtergrond .kaart, body.donkere-achtergrond .wereld, body.donkere-achtergrond .dagdoel-kaart, body.donkere-achtergrond .ballon { --inkt: #2B2D42; --stil: #6c6f80; color: var(--inkt); }
[lang="ar"] { font-family: var(--font-ar); font-weight: 400; }
h1, h2 { margin: .4em 0 .3em; line-height: 1.15; }
h1 { font-size: 1.6rem; font-weight: 900; }
h2 { font-size: 1.1rem; font-weight: 800; margin-top: 1.2em; }
p { margin: .4em 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
input[type="text"], input[type="search"] { font: inherit; }
.stil-tekst { color: var(--stil); font-size: .9rem; }
.licht { color: rgba(255,255,255,.85) !important; }
#scherm { padding: 0 16px 96px; max-width: 640px; margin: 0 auto; }
.pagina { padding-top: 4px; }
.intro-tekst { color: var(--stil); margin-bottom: 1em; }

/* ---------- knoppen ---------- */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: 12px 20px; border-radius: 16px; font-weight: 800; font-size: 1rem; background: var(--vlak); color: var(--inkt); box-shadow: 0 4px 0 var(--lijn); transition: transform .08s, box-shadow .08s; min-height: 48px; }
.knop:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lijn); }
.knop.primair { background: var(--primair); color: #fff; box-shadow: 0 4px 0 var(--primair-donker); }
.knop.goedknop { background: var(--groen); color: #fff; box-shadow: 0 4px 0 var(--groen-donker); }
.knop.foutknop { background: var(--rood); color: #fff; box-shadow: 0 4px 0 var(--rood-donker); }
.knop.stil { background: var(--vlak); box-shadow: 0 4px 0 var(--lijn); }
.knop.groot { font-size: 1.1rem; padding: 14px 24px; min-height: 56px; }
.knop.breed { width: 100%; }
.knop:disabled { opacity: .45; }
.knoppen-rij { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.knoppen-rij.gevaar .knop { color: var(--rood); }
.terug { color: var(--stil); font-weight: 700; padding: 8px 0; }
.dicht { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; color: var(--stil); background: var(--vlak); box-shadow: var(--schaduw); }

/* ---------- kaarten ---------- */
.kaart { background: var(--vlak); border-radius: var(--straal); padding: 16px; box-shadow: var(--schaduw); margin: 12px 0; }
.kaart.feest { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #FFF3C4, #FFE0A3); color: #5a4300; font-weight: 700; animation: pop .4s ease-out; }
body[data-modus="volwassen"] .kaart.feest { background: linear-gradient(135deg, #E3F4F4, #CFE8EA); color: #0A5B63; }
.kaart.weetje { border-left: 6px solid var(--accent); }
.kaart.weetje p { margin: .3em 0 0; color: var(--stil); }
.uitlegkaart { font-size: 1.05rem; line-height: 1.55; }
.sticker-emoji { font-size: 2.4rem; }

/* ---------- kopbalk ---------- */
.kopbalk { display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; flex-wrap: wrap; }
.stat { background: var(--vlak); border-radius: 999px; padding: 6px 12px; font-weight: 800; box-shadow: var(--schaduw); font-size: .95rem; white-space: nowrap; }
.stat.doel { margin-left: auto; }
.kop-avatar { padding: 0; }
.avatar { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--vlak); box-shadow: var(--schaduw); font-size: 1.6rem; }
.avatar.groot { width: 84px; height: 84px; font-size: 3rem; }
.av-hoed { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: .9em; line-height: 1; }
.av-vriend { position: absolute; bottom: -4px; right: -8px; font-size: .6em; line-height: 1; }

/* ---------- navigatie ---------- */
#nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--vlak); border-top: 1px solid var(--lijn); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
.nav-merk { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 14px; font-size: .72rem; font-weight: 800; color: var(--stil); min-width: 56px; }
.tab-ico { font-size: 1.5rem; line-height: 1; position: relative; }
.tab.actief { color: var(--primair); background: color-mix(in srgb, var(--primair) 12%, transparent); }
.badge { position: absolute; top: -6px; right: -12px; background: var(--rood); color: #fff; font-size: .65rem; font-weight: 900; border-radius: 999px; padding: 2px 6px; min-width: 18px; text-align: center; }

/* ---------- start en nieuw profiel ---------- */
.start { text-align: center; padding-top: 40px; }
.start-held { margin-bottom: 20px; }
.start-logo { width: 104px; height: 104px; margin: 0 auto 10px; border-radius: 28px; box-shadow: 0 10px 30px rgba(132,94,194,.3); }
.start-sub { font-weight: 800; color: var(--primair); margin: -4px 0 6px; }
.start p { color: var(--stil); max-width: 420px; margin: 8px auto 0; }
.profielen { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 10px 0 18px; }
.profiel-kaart { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--vlak); border-radius: var(--straal); padding: 16px 10px; box-shadow: var(--schaduw); transition: transform .1s; }
.profiel-kaart:hover { transform: translateY(-2px); }
.pk-naam { font-weight: 900; font-size: 1.05rem; }
.pk-sub { font-size: .78rem; color: var(--stil); }
.start-voet { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; font-size: .85rem; color: var(--stil); font-weight: 700; }
.nieuw { padding-top: 10px; }
.veld { display: block; margin: 10px 0; }
.veld span { display: block; font-weight: 800; margin-bottom: 6px; }
.veld input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--lijn); background: var(--vlak); font-size: 1.1rem; font-weight: 700; }
.veld input:focus { outline: none; border-color: var(--primair); }
.modus-keuze { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.modus-kaart { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px; border-radius: var(--straal); background: var(--vlak); border: 3px solid transparent; box-shadow: var(--schaduw); cursor: pointer; font-size: .85rem; color: var(--stil); }
.modus-kaart b { color: var(--inkt); font-size: 1.1rem; }
.modus-kaart input { position: absolute; opacity: 0; }
.modus-kaart:has(input:checked) { border-color: var(--primair); background: color-mix(in srgb, var(--primair) 8%, var(--vlak)); }
.modus-kaart.kind:has(input:checked) { border-color: #FF6B6B; }
.modus-kaart.volwassen:has(input:checked) { border-color: #0E7C86; }
.mk-emoji { font-size: 2.6rem; }
.avatar-keuze { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.av-optie { cursor: pointer; }
.av-optie input { position: absolute; opacity: 0; }
.av-optie span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-size: 1.6rem; background: var(--vlak); border: 3px solid transparent; }
.av-optie:has(input:checked) span { border-color: var(--primair); transform: scale(1.1); }
.doel-keuze { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.doel-optie { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 16px; background: var(--vlak); border: 3px solid transparent; cursor: pointer; font-size: .8rem; color: var(--stil); box-shadow: var(--schaduw); }
.doel-optie b { color: var(--inkt); font-size: 1rem; }
.doel-optie input { position: absolute; opacity: 0; }
.doel-optie:has(input:checked), .doel-optie.aan { border-color: var(--primair); }
.schud { animation: schud .4s; }

/* ---------- thuis (kind) ---------- */
.jamal-rij { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 14px; }
.jamal { font-size: 3.4rem; line-height: 1; animation: deinen 3s ease-in-out infinite; }
.jamal.groot { font-size: 4.5rem; }
.ballon { position: relative; background: var(--vlak); border-radius: 20px; padding: 12px 16px; box-shadow: var(--schaduw); font-weight: 800; flex: 1; }
.ballon::before { content: ''; position: absolute; left: -10px; bottom: 14px; border: 8px solid transparent; border-right-color: var(--vlak); }
.dagdoel-kaart { display: flex; align-items: center; gap: 14px; background: var(--vlak); border-radius: var(--straal); padding: 14px 16px; box-shadow: var(--schaduw); margin-bottom: 18px; }
.dagdoel-kaart > div:nth-child(2) { flex: 1; }
.ring { width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--groen) calc(var(--pct) * 1%), var(--lijn) 0); display: grid; place-items: center; flex-shrink: 0; }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--vlak); display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
.wereld { background: var(--vlak); border-radius: var(--straal); padding: 14px; margin: 14px 0; box-shadow: var(--schaduw); border-top: 8px solid var(--wk); }
.wereld.opslot { opacity: .55; }
.wereld-kop { display: flex; align-items: center; gap: 12px; }
.wereld-emoji { font-size: 2.2rem; }
.wereld-sticker { margin-left: auto; font-size: 2rem; animation: pop .5s; }
.slot { margin-left: auto; font-size: 1.4rem; }
.pad { display: flex; flex-direction: column; gap: 6px; margin-top: 26px; }
.pad-stap { display: flex; flex-direction: column; align-items: center; width: 50%; }
.pad-stap.rechts { align-self: flex-end; }
.bol { position: relative; width: 74px; height: 74px; border-radius: 50%; background: var(--wk); color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.18); display: grid; place-items: center; transition: transform .08s; }
.bol:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.bol.opslot { background: #d9d9de; box-shadow: 0 6px 0 #bdbdc4; }
.bol.klaar { background: var(--groen); box-shadow: 0 6px 0 var(--groen-donker); }
.bol.baas { width: 86px; height: 86px; background: linear-gradient(135deg, #FFD93D, #FF9F43); box-shadow: 0 6px 0 #D98B2B; }
.bol.baas.klaar { background: linear-gradient(135deg, #6BCB77, #4FA85B); }
.bol.volgende { animation: pulse 1.6s ease-in-out infinite; }
.bol-emoji { font-size: 1.9rem; }
.bol-sterren { position: absolute; bottom: -4px; font-size: .75rem; color: #FFD93D; text-shadow: 0 1px 1px rgba(0,0,0,.4); letter-spacing: -1px; }
.bol-label { position: absolute; top: -22px; background: var(--inkt); color: #fff; font-size: .65rem; font-weight: 900; padding: 3px 8px; border-radius: 999px; animation: zweef 1.2s ease-in-out infinite; }
.bol-naam { font-size: .78rem; font-weight: 800; color: var(--stil); margin-top: 8px; text-align: center; }

/* ---------- thuis (volwassen) ---------- */
.vandaag { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v-kaart { margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.v-kaart.klik { transition: transform .1s; }
.v-kaart.klik:hover { transform: translateY(-2px); }
.v-kaart.primair-kaart { grid-column: 1 / -1; background: linear-gradient(135deg, var(--primair), var(--blauw)); color: #fff; }
.v-getal { font-size: 1.8rem; font-weight: 900; color: var(--primair); line-height: 1; }
.balk { height: 12px; background: var(--lijn); border-radius: 999px; overflow: hidden; flex: 1; }
.balk.dun { height: 6px; margin-top: 6px; }
.balk-vul { height: 100%; background: var(--groen); border-radius: 999px; transition: width .4s; }
.hoofdstuk { background: var(--vlak); border-radius: var(--straal); box-shadow: var(--schaduw); margin: 10px 0; border-left: 6px solid var(--wk); overflow: hidden; }
.hoofdstuk summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.hoofdstuk summary::-webkit-details-marker { display: none; }
.hs-emoji { font-size: 1.8rem; }
.hs-tekst { flex: 1; display: flex; flex-direction: column; }
.hs-pijl { font-size: 1.6rem; color: var(--stil); transition: transform .2s; }
.hoofdstuk[open] .hs-pijl { transform: rotate(90deg); }
.lessen { border-top: 1px solid var(--lijn); }
.les-rij { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--lijn); }
.les-rij:last-child { border-bottom: 0; }
.les-rij:hover { background: color-mix(in srgb, var(--wk) 8%, transparent); }
.les-rij.volgende { background: color-mix(in srgb, var(--wk) 12%, transparent); }
.lr-emoji { font-size: 1.4rem; width: 32px; text-align: center; }
.lr-tekst { flex: 1; display: flex; flex-direction: column; }
.lr-status { font-weight: 900; color: var(--groen); font-size: 1.1rem; }
.les-rij:not(.klaar) .lr-status { color: var(--stil); }

/* ---------- les ---------- */
body[data-scherm="les"] #scherm { padding-bottom: 140px; }
.les-kop { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; position: sticky; top: 0; background: var(--achtergrond); z-index: 5; }
.les-kop .dicht { position: static; width: 36px; height: 36px; flex-shrink: 0; }
.les-teller, .timer { font-weight: 900; color: var(--stil); min-width: 44px; text-align: right; }
.timer { color: var(--primair); font-size: 1.1rem; }
.timer.bijna { color: var(--rood); animation: pulse .8s infinite; }
.oef { padding-top: 6px; }
.vraag { font-size: 1.25rem; font-weight: 900; margin: 6px 0 14px; }
.prompt { background: var(--vlak); border-radius: var(--straal); padding: 18px; text-align: center; box-shadow: var(--schaduw); margin-bottom: 16px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.prompt-ar { font-size: 2.4rem; line-height: 1.4; }
.prompt-ar.groot { font-size: 4.5rem; line-height: 1.3; }
.prompt-emoji { font-size: 3.4rem; line-height: 1.1; }
.prompt-tekst { font-size: 1.4rem; font-weight: 900; }
.prompt-sub { color: var(--stil); font-size: 1rem; }
.spreek-klein { position: absolute; top: 10px; right: 10px; font-size: 1.3rem; width: 40px; height: 40px; border-radius: 50%; background: var(--achtergrond); }
.luister-knop { width: 96px; height: 96px; border-radius: 50%; background: var(--primair); color: #fff; font-size: 3rem; box-shadow: 0 6px 0 var(--primair-donker); margin: 6px auto; }
.luister-knop.klein { width: 52px; height: 52px; font-size: 1.6rem; background: var(--vlak); color: var(--inkt); box-shadow: 0 4px 0 var(--lijn); position: absolute; right: 14px; bottom: 14px; margin: 0; }
.luister-knop:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--primair-donker); }
.opties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optie { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 12px; background: var(--vlak); border-radius: var(--straal); box-shadow: 0 4px 0 var(--lijn); border: 3px solid transparent; font-weight: 800; font-size: 1.05rem; transition: transform .08s; text-align: center; }
.optie:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lijn); }
.optie-emoji { font-size: 2.4rem; line-height: 1.1; }
.optie-ar { font-size: 2.2rem; line-height: 1.4; }
.optie.optie-ar .optie-ar { font-size: 3rem; }
.optie-sub { font-size: .8rem; color: var(--stil); font-weight: 700; }
.optie.is-goed { color: #1f6b2e; border-color: var(--groen); background: #EAF9EC; box-shadow: 0 4px 0 var(--groen-donker); animation: pop .3s; }
.optie.is-fout { color: #8a2424; border-color: var(--rood); background: #FFECEC; box-shadow: 0 4px 0 var(--rood-donker); animation: schud .4s; }
.optie.is-gekozen { color: #1F2A44; border-color: var(--blauw); background: #EAF2FF; }
.optie.is-klaar { opacity: .45; color: #1f6b2e; border-color: var(--groen); background: #EAF9EC; }
.optie:disabled:not(.is-goed):not(.is-fout) { opacity: .6; }
.koppel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kolom { display: flex; flex-direction: column; gap: 12px; }
.kolom .optie { min-height: 74px; }
.bouw-vak { min-height: 84px; background: var(--vlak); border-radius: var(--straal); box-shadow: inset 0 0 0 3px var(--lijn); display: flex; align-items: center; justify-content: center; padding: 10px 16px; margin-bottom: 16px; font-size: 2.6rem; }
.bouw-vak.is-goed { box-shadow: inset 0 0 0 3px var(--groen); background: #EAF9EC; }
.bouw-vak.is-fout { box-shadow: inset 0 0 0 3px var(--rood); background: #FFECEC; }
.bouw-leeg { font-size: .9rem; color: var(--stil); font-family: var(--font); }
.tegels { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; direction: rtl; }
.tegel { width: 66px; height: 66px; border-radius: 16px; background: var(--vlak); box-shadow: 0 4px 0 var(--lijn); font-size: 2.2rem; display: grid; place-items: center; transition: transform .08s; }
.tegel:disabled { opacity: .25; }
.tegel:active:not(:disabled) { transform: translateY(3px); }
.oef-voet { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.oef-voet .knop.groot { flex: 1; }
.teken-houder { background: var(--vlak); border-radius: var(--straal); box-shadow: var(--schaduw); padding: 10px; display: grid; place-items: center; }
.teken-houder canvas { width: min(100%, 300px); height: auto; touch-action: none; border-radius: 16px; background: #fff; cursor: crosshair; }
.teken-houder.klein { margin-top: 12px; }
.teken-houder.klein canvas { width: min(100%, 220px); }
.intro-kaart { background: var(--vlak); border-radius: var(--straal); padding: 22px 16px; text-align: center; box-shadow: var(--schaduw); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.intro-ar { font-size: 5.5rem; line-height: 1.2; color: var(--primair); }
.intro-emoji { font-size: 4rem; line-height: 1.1; }
.intro-naam { font-size: 1.5rem; font-weight: 900; }
.intro-klank { color: var(--stil); }
.intro-tip { font-size: .85rem; color: var(--paars); font-weight: 800; }
.vormen-rij { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.vormen-rij span { display: flex; flex-direction: column; align-items: center; background: var(--achtergrond); border-radius: 14px; padding: 8px 12px; min-width: 60px; }
.vormen-rij b { font-size: 2rem; font-weight: 400; line-height: 1.3; }
.vormen-rij i { font-style: normal; font-size: .7rem; color: var(--stil); font-family: var(--font); font-weight: 800; }
.voorbeeld { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 12px; background: var(--achtergrond); border-radius: 18px; padding: 10px 14px; margin-top: 10px; width: 100%; text-align: left; }
.vb-emoji { grid-row: 1 / 3; grid-column: 1; font-size: 2.4rem; }
.vb-ar { font-size: 1.8rem; line-height: 1.3; text-align: right; grid-column: 2; justify-self: start; }
.vb-nl { grid-column: 2; color: var(--stil); font-weight: 700; font-size: .9rem; }
.vb-luister { grid-row: 1 / 3; grid-column: 3; font-size: 1.5rem; }

/* ---------- feedback ---------- */
.feedback { position: fixed; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; animation: omhoog .25s ease-out; }
.feedback.goed { background: #D7F5DC; color: #1f6b2e; }
.feedback.fout { background: #FFE0E0; color: #8a2424; }
.fb-tekst { flex: 1; min-width: 180px; font-size: 1.05rem; }
.fb-correct { font-weight: 700; margin-top: 2px; }
.fb-correct [lang="ar"] { font-size: 1.4rem; }
.fb-uitleg { font-size: .9rem; opacity: .85; margin-top: 2px; }
.feedback > * { max-width: 640px; }
.feedback .knop { min-width: 140px; }

/* ---------- resultaat ---------- */
.resultaat { text-align: center; padding-top: 24px; }
.res-kop h1 { font-size: 1.8rem; }
.sterren-groot { font-size: 3.4rem; line-height: 1; margin: 6px 0 14px; }
.ster { color: #e2dfd5; display: inline-block; margin: 0 2px; }
.ster.aan { color: #FFC928; animation: ster .5s ease-out both; text-shadow: 0 3px 0 #d9a51a; }
.res-cijfers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.cijfer { background: var(--vlak); border-radius: 16px; padding: 12px 6px; box-shadow: var(--schaduw); display: flex; flex-direction: column; align-items: center; }
.cijfer b { font-size: 1.4rem; font-weight: 900; }
.cijfer span { font-size: .78rem; color: var(--stil); font-weight: 700; }
.profiel .res-cijfers, .pagina .res-cijfers { grid-template-columns: repeat(4, 1fr); }
.schatkist { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border-radius: var(--straal); background: linear-gradient(135deg, #FFD93D, #FF9F43); color: #5a3a00; font-weight: 900; font-size: 1.1rem; box-shadow: 0 6px 0 #D98B2B; margin: 12px 0; animation: pulse 1.4s infinite; }
.schatkist.open { animation: pop .4s; background: linear-gradient(135deg, #6BCB77, #4ECDC4); color: #0f3d2e; box-shadow: 0 6px 0 #3f9a8d; }
.kist { font-size: 2.6rem; }
.res-knoppen { display: flex; gap: 10px; margin-top: 18px; }
.res-knoppen .knop { flex: 1; }

/* ---------- herhalen, alfabet, woorden, winkel, profiel ---------- */
.herhaal-kaart { display: flex; align-items: center; gap: 14px; }
.hk-getal { font-size: 2.4rem; font-weight: 900; color: var(--primair); min-width: 56px; text-align: center; }
.letter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.letter-tegel { display: flex; flex-direction: column; align-items: center; background: var(--vlak); border-radius: 18px; padding: 10px 4px; box-shadow: 0 4px 0 var(--lijn); border: 3px solid transparent; }
.letter-tegel.geleerd { border-color: var(--groen); }
.lt-ar { font-size: 2.4rem; line-height: 1.3; }
.lt-naam { font-size: .75rem; font-weight: 800; color: var(--stil); }
.zoekveld { width: 100%; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--lijn); background: var(--vlak); font-size: 1rem; margin: 6px 0 10px; }
.woord-rij { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--vlak); border-radius: 16px; padding: 10px 14px; margin: 6px 0; box-shadow: var(--schaduw); text-align: left; }
.wr-ar { font-size: 1.7rem; min-width: 110px; text-align: right; line-height: 1.3; }
.wr-nl { flex: 1; }
.wr-luister { color: var(--stil); }
.winkel-avatar { display: flex; justify-content: center; margin: 10px 0; }
.winkel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.winkel-item { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--vlak); border-radius: 18px; padding: 12px 8px; box-shadow: 0 4px 0 var(--lijn); border: 3px solid transparent; font-size: .9rem; text-align: center; }
.winkel-item.aan { border-color: var(--groen); }
.winkel-item.heeft:not(.aan) { border-color: var(--lijn); }
.wi-emoji { font-size: 2.4rem; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--achtergrond); }
.wi-prijs { font-size: .8rem; color: var(--stil); font-weight: 800; }
.profiel-kop { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.profiel-kop h1 { margin: 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dag { display: flex; flex-direction: column; align-items: center; background: var(--vlak); border-radius: 12px; padding: 8px 2px; font-size: .75rem; font-weight: 800; color: var(--stil); }
.dag b { font-size: 1.1rem; }
.dag.aan { background: var(--groen); color: #fff; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--vlak); border-radius: 18px; padding: 12px 6px; text-align: center; font-size: .75rem; box-shadow: var(--schaduw); opacity: .5; }
.sticker.aan { opacity: 1; border: 3px solid var(--accent); }
.sticker span { font-size: 2.2rem; }
.schakel { display: flex; align-items: center; justify-content: space-between; background: var(--vlak); border-radius: 14px; padding: 12px 14px; margin: 6px 0; font-weight: 700; }
.schakel input { width: 24px; height: 24px; accent-color: var(--primair); }
.over { margin-top: 24px; }

/* ---------- modaal, melding, confetti ---------- */
#modaal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.modaal-achter { position: absolute; inset: 0; background: rgba(20, 22, 40, .45); }
.modaal-vak { position: relative; width: min(100%, 440px); max-height: 92vh; overflow: auto; background: var(--achtergrond); border-radius: var(--straal); padding: 16px; animation: pop .25s; }
.modaal-vak .dicht { top: 8px; right: 8px; z-index: 2; }
.melding { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 30px); background: var(--inkt); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; max-width: min(92vw, 480px); z-index: 50; opacity: 0; transition: opacity .3s, transform .3s; text-align: center; }
.melding.zichtbaar { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* ---------- animaties ---------- */
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes schud { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes zweef { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes deinen { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
@keyframes omhoog { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ster { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.3) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- breed scherm: zijbalk links ---------- */
@media (min-width: 900px) {
  body:not([data-scherm="start"]):not([data-scherm="nieuw"]):not([data-scherm="inloggen"]):not([data-scherm="les"]) #scherm { margin-left: 240px; max-width: 760px; padding: 0 32px 40px; }
  #nav { top: 0; bottom: 0; right: auto; width: 220px; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 20px 14px; border-top: 0; border-right: 1px solid var(--lijn); }
  .nav-merk { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; }
  .merk-logo { width: 36px; height: 36px; border-radius: 10px; }
  .merk-naam { font-weight: 900; font-size: 1.2rem; }
  .tab { flex-direction: row; gap: 12px; font-size: 1rem; padding: 12px 14px; justify-content: flex-start; }
  .tab-ico { font-size: 1.4rem; }
  body[data-scherm="les"] #scherm { max-width: 720px; }
  .opties { grid-template-columns: repeat(4, 1fr); }
  .opties:has(.optie:nth-child(4):last-child) .optie { min-height: 120px; }
  .letter-grid { grid-template-columns: repeat(7, 1fr); }
  .pad-stap { width: 33%; }
  .pad-stap.rechts { align-self: center; }
  .pad { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 16px; }
  .pad-stap, .pad-stap.rechts { width: auto; min-width: 120px; align-self: auto; }
  .feedback { left: 240px; }
  body[data-scherm="les"] .feedback { left: 0; }
  .vandaag { grid-template-columns: 1fr 1fr 1fr; }
  .v-kaart.primair-kaart { grid-column: auto; }
  .hoofdstukken { display: grid; grid-template-columns: 1fr; gap: 0; }
  .start-logo { width: 128px; height: 128px; }
}

/* ---------- niveaus ---------- */
.niveau { margin: 22px 0 8px; }
.niveau.opslot { opacity: .6; }
.niveau-kop { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--straal); background: linear-gradient(135deg, var(--inkt), #3a3f6b); color: #fff; box-shadow: var(--schaduw); margin-bottom: 10px; }
body[data-modus="volwassen"] .niveau-kop { background: linear-gradient(135deg, #1F2A44, #0E7C86); }
.niveau-kop .stil-tekst { color: rgba(255,255,255,.75); }
.niveau-kop.klaar { background: linear-gradient(135deg, #4FA85B, #6BCB77); }
.niveau-kop.opslot { background: #b9bcc9; }
.nk-nr { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; flex-shrink: 0; }
.nk-tekst { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.niveau-kop .balk { background: rgba(255,255,255,.25); }
.niveau-kop .balk-vul { background: #FFD93D; }

/* ---------- voorlezen (kleuters) en stem ---------- */
.lees-voor { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primair); color: #fff; font-size: 1.1rem; vertical-align: middle; margin-left: 6px; box-shadow: 0 3px 0 var(--primair-donker); }
.lees-voor:active { transform: translateY(2px); box-shadow: none; }
.voorlezer-keuze { display: none; margin-top: 10px; }
.nieuw:has(input[name="modus"][value="kind"]:checked) .voorlezer-keuze { display: flex; }
body.voorlezer .vraag { font-size: 1.35rem; }
body.voorlezer .optie { min-height: 110px; }
body.voorlezer .optie-emoji { font-size: 3rem; }
body.voorlezer .optie.optie-ar .optie-ar { font-size: 3.4rem; }
.optie.optie-plaatje .optie-emoji { font-size: 3rem; }
.stem-banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-left: 6px solid var(--accent); }
.stem-banner > span { font-size: 1.8rem; }
.modaal-vak h2 { margin-top: 4px; }
.modaal-vak h3 { font-size: 1rem; margin: 14px 0 4px; }
.modaal-vak ol { margin: 0; padding-left: 20px; }
.modaal-vak li { margin: 4px 0; }
.tegel.breed { width: auto; min-width: 66px; padding: 0 14px; }

/* ---------- reisoverzicht ---------- */
.reis { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--vlak); border-radius: var(--straal); padding: 12px 14px; box-shadow: var(--schaduw); margin: 4px 0 8px; }
.reis-stap { display: flex; flex-direction: column; align-items: center; width: 46px; text-decoration: none; color: var(--stil); font-weight: 900; font-size: .7rem; }
.rs-emoji { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: var(--lijn); color: #fff; }
.reis-stap.klaar .rs-emoji { background: var(--groen); }
.reis-stap.bezig .rs-emoji { background: var(--primair); animation: pulse 1.6s ease-in-out infinite; }
.reis-stap.opslot { opacity: .6; }
.reis-tekst { flex: 1; min-width: 140px; font-size: .9rem; color: var(--stil); }

/* ---------- klanken bij een letter ---------- */
.klanken-rij { display: flex; gap: 8px; justify-content: center; margin: 6px 0; flex-wrap: wrap; }
.klank-knop { display: flex; flex-direction: column; align-items: center; background: var(--achtergrond); border-radius: 14px; padding: 6px 12px; min-width: 62px; box-shadow: 0 3px 0 var(--lijn); }
.klank-knop b { font-size: 2rem; font-weight: 400; line-height: 1.3; }
.klank-knop i { font-style: normal; font-size: .75rem; color: var(--stil); font-weight: 800; }
.klank-knop:active { transform: translateY(2px); box-shadow: none; }

/* ---------- donkere stand (volwassenen, volgt het apparaat) ---------- */
@media (prefers-color-scheme: dark) {
  body[data-modus="volwassen"] { --achtergrond: #121826; --vlak: #1c2436; --inkt: #e9edf5; --stil: #9aa5bf; --lijn: #2b3650; --primair: #2BA3AE; --primair-donker: #1b7d86; --schaduw: 0 6px 20px rgba(0,0,0,.35); }
  body[data-modus="volwassen"] .kaart.feest { background: linear-gradient(135deg, #1e3a3d, #244a4d); color: #cfeff1; }
  body[data-modus="volwassen"] .feedback.goed { background: #1f4a2a; color: #d7f5dc; }
  body[data-modus="volwassen"] .feedback.fout { background: #5a2323; color: #ffe0e0; }
  body[data-modus="volwassen"] .teken-houder canvas { background: #fff; }
  body[data-modus="volwassen"] .niveau-kop.opslot { background: #3a4257; }
  body[data-modus="volwassen"] .bouw-vak.is-goed, body[data-modus="volwassen"] .optie.is-goed { background: #1f4a2a; color: #d7f5dc; }
  body[data-modus="volwassen"] .bouw-vak.is-fout, body[data-modus="volwassen"] .optie.is-fout { background: #5a2323; color: #ffe0e0; }
  body[data-modus="volwassen"] .optie.is-gekozen { background: #27365a; color: #e9edf5; }
  body[data-modus="volwassen"] .optie.is-klaar { background: #1f4a2a; color: #d7f5dc; }
  body[data-modus="volwassen"] .modaal-achter { background: rgba(0,0,0,.6); }
}

/* ---------- account en gast ---------- */
.keuze-kaarten { display: grid; gap: 12px; margin: 18px 0; }
.keuze-kaart { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px; border-radius: var(--straal); background: var(--primair); color: #fff; box-shadow: 0 6px 0 var(--primair-donker); text-align: center; transition: transform .08s; }
.keuze-kaart span:last-child { font-size: .9rem; opacity: .9; font-weight: 600; }
.keuze-kaart b { font-size: 1.15rem; }
.keuze-kaart.stil { background: var(--vlak); color: var(--inkt); box-shadow: 0 6px 0 var(--lijn); }
.keuze-kaart.stil span:last-child { color: var(--stil); opacity: 1; }
.keuze-kaart:active { transform: translateY(4px); box-shadow: none; }
.kk-emoji { font-size: 2.4rem; }
.account-balk { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: var(--vlak); border-radius: 999px; padding: 8px 16px; margin: 6px auto 14px; font-size: .9rem; font-weight: 700; box-shadow: var(--schaduw); max-width: 520px; }
.account-balk.gast { background: #FFF3C4; color: #5a4300; }
.link { background: none; color: var(--primair); font-weight: 800; text-decoration: underline; padding: 4px 6px; }
.link.breed { display: block; width: 100%; text-align: center; margin-top: 8px; }
.gast-banner { border-left-color: #FFB703; }
.nieuw .knop.breed { margin-top: 10px; }
.nieuw code { background: var(--lijn); padding: 2px 6px; border-radius: 6px; }
@media (min-width: 600px) { .keuze-kaarten { grid-template-columns: 1fr 1fr; } }
