@font-face { font-family: 'Andika'; src: url(andika-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Andika'; src: url(andika-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --inkt: #23283a; --wit: #fffdf7; --papier: #fff8e8; --rails: #6b5444; --groen: #2c9a4b; --rood: #d93a32;
  --blauw: #2f6fd6; --geel: #e9b100; --knop: #ffcf3f; --knop-d: #c99400; --paneel: #fffdf7;
  --lw: #e9b100; --zn: #2f6fd6; --bn: #2c9a4b; --ww: #d93a32; --p: #d93a32; --o: #2f6fd6; --w: #d93a32; --s: #23283a; --l: #2c9a4b; --m: #ee7a12; --b: #8a4fc7;
  --fs: 46px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1f3b52; overflow: hidden; }
body { font-family: 'Andika', 'Trebuchet MS', Arial, sans-serif; color: var(--inkt); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#buiten { position: fixed; inset: 0; }
#stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; background: #9fd6f0; }
#draai { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  #draai { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: 12px; background: #fff; font-size: 15px; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.3); z-index: 99; }
}
button { font-family: inherit; cursor: pointer; color: inherit; }
.verborgen { display: none !important; }

/* ---------- decor: station ---------- */
.decor { position: absolute; inset: 0; overflow: hidden; }
.decor .lucht { position: absolute; inset: 0; background: linear-gradient(#78c2ea, #b9e3f6 55%, #e9f7fc 75%); }
.decor .wolk { position: absolute; background: #fff; border-radius: 60px; opacity: .92; box-shadow: 46px -20px 0 8px #fff, 100px 4px 0 -2px #fff; animation: drijf 60s linear infinite; }
.decor .wolk.w1 { left: 380px; top: 70px; width: 170px; height: 48px; }
.decor .wolk.w2 { left: 1080px; top: 130px; width: 130px; height: 38px; opacity: .75; animation-duration: 80s; animation-direction: reverse; }
@keyframes drijf { 50% { transform: translateX(90px); } }
.decor .heuvel { position: absolute; border-radius: 50% 50% 0 0; }
.decor .h1 { left: -200px; top: 420px; width: 1000px; height: 360px; background: #8ccf6e; }
.decor .h2 { left: 600px; top: 450px; width: 1300px; height: 340px; background: #7ac25e; }
.decor .perron { position: absolute; left: 0; right: 0; top: 640px; bottom: 0; background: linear-gradient(#c9b79a, #b19e80); border-top: 10px solid #e8e0cf; }
.decor .perron::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, #f2c94c 0 40px, #23283a 40px 80px); opacity: .85; }
.decor .rails { position: absolute; left: 0; right: 0; top: 612px; height: 28px; background:
  linear-gradient(#8a8f99, #8a8f99) 0 2px / 100% 5px no-repeat, linear-gradient(#8a8f99, #8a8f99) 0 18px / 100% 5px no-repeat,
  repeating-linear-gradient(90deg, var(--rails) 0 16px, transparent 16px 54px); }
.decor .bord { position: absolute; right: 60px; top: 520px; width: 200px; height: 58px; border-radius: 10px; background: #1d4f8c; color: #fff; font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; text-align: center; box-shadow: 0 4px 0 #12345e; line-height: 1.05; padding: 0 8px; }
.decor .bord::after { content: ''; position: absolute; left: 96px; top: 58px; width: 8px; height: 62px; background: #59616e; }
.decor .foto { position: absolute; left: 0; right: 0; top: 0; height: 900px; background-size: cover; background-position: center; }

/* ---------- topbalk ---------- */
.top { position: absolute; left: 0; right: 0; top: 0; height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: rgba(255,253,247,.88); box-shadow: 0 2px 10px rgba(0,0,0,.12); z-index: 20; font-size: 24px; }
.top .titel { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .titel small { font-weight: 400; color: #5b6275; margin-left: 8px; }
.ikoon { width: 50px; height: 50px; border-radius: 14px; border: 0; background: #fff; box-shadow: 0 3px 0 #c9c2b0; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.ikoon:active { transform: translateY(2px); box-shadow: 0 1px 0 #c9c2b0; }
.voortgang { display: flex; gap: 6px; }
.voortgang i { width: 18px; height: 18px; border-radius: 50%; background: #e5ddc8; display: block; }
.voortgang i.goed { background: var(--groen); }
.voortgang i.fout { background: #f0a43a; }
.harten { font-size: 28px; letter-spacing: 2px; }
.harten .weg { filter: grayscale(1); opacity: .35; }
.tijdbalk { position: absolute; left: 0; right: 0; top: 66px; height: 10px; background: rgba(0,0,0,.08); z-index: 19; }
.tijdbalk div { height: 100%; width: 100%; background: linear-gradient(90deg, #2c9a4b, #f2c94c 60%, #d93a32); transform-origin: left; }

/* ---------- Daan ---------- */
.daan { position: absolute; z-index: 6; }
.daan img, .daan svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.daan.praat { animation: praat .5s ease-in-out infinite alternate; }
@keyframes praat { to { transform: translateY(-4px) rotate(-1deg); } }
.daan.juich { animation: juich .45s ease-in-out 3 alternate; }
@keyframes juich { to { transform: translateY(-26px) rotate(3deg); } }
.spel .daan { left: 22px; top: 80px; width: 230px; height: 240px; }

.ballon { position: absolute; left: 268px; top: 96px; right: 36px; min-height: 96px; max-height: 210px; padding: 18px 70px 18px 26px; background: var(--wit); border-radius: 26px; box-shadow: 0 6px 0 rgba(0,0,0,.12); font-size: 30px; line-height: 1.3; z-index: 7; }
.ballon::before { content: ''; position: absolute; left: -26px; top: 40px; border: 16px solid transparent; border-right: 26px solid var(--wit); }
.ballon .luister { position: absolute; right: 14px; top: 14px; }
.ballon .proef { display: block; margin-top: 8px; font-size: 27px; color: #39415a; }
.ballon .proef b { color: var(--inkt); }

/* ---------- de trein ---------- */
.treinbaan { position: absolute; left: 0; right: 0; top: 300px; height: 330px; z-index: 5; }
.trein { position: absolute; left: 30px; bottom: 16px; display: flex; align-items: flex-end; transition: transform 1.1s cubic-bezier(.45,.05,.3,1); }
.trein.weg-rechts { transform: translateX(1700px); }
.trein.weg-links { transform: translateX(-1900px); }
.trein.schud { animation: schud .35s; }
@keyframes schud { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.loc { width: 170px; height: 200px; flex: none; position: relative; margin-right: 6px; }
.loc svg { width: 100%; height: 100%; display: block; }
.wagens { display: flex; align-items: flex-end; gap: 0; position: relative; }
.wagen { position: relative; background: var(--papier); border: 5px solid #8a5a3a; border-radius: 16px 16px 10px 10px; padding: 18px 18px 0; min-height: 190px; display: flex; flex-direction: column; box-shadow: inset 0 -10px 0 #f0e2c4; margin-bottom: 26px; }
.wagen::before, .wagen::after { content: ''; position: absolute; bottom: -34px; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(#9aa0aa 0 8px, #3d424d 9px 15px, #5b616c 16px); }
.wagen::before { left: 20px; } .wagen::after { right: 20px; }
.wagens.split .wagen + .wagen { margin-left: 34px; }
.wagens.split .wagen + .wagen .koppel { position: absolute; left: -41px; bottom: 26px; width: 40px; height: 10px; background: #5b616c; border-radius: 4px; }
.wagens.split .wagen + .wagen .streepje { position: absolute; left: -24px; top: -6px; width: 8px; height: 120px; background: var(--s); border-radius: 4px; }
.rij { display: flex; align-items: baseline; font-size: var(--fs); line-height: 1.15; white-space: nowrap; height: 1.3em; }
.woord { position: relative; padding: 2px 4px; border-radius: 10px; transition: background .2s, color .2s, transform .5s; cursor: pointer; z-index: 2; }
.woord.punt { padding: 0 2px; cursor: default; }
.woord.gekozen { background: rgba(35,40,58,.14); box-shadow: inset 0 0 0 3px rgba(35,40,58,.45); }
.woord.licht { animation: licht .9s ease-in-out infinite alternate; }
@keyframes licht { from { background: rgba(255,214,64,.25); } to { background: rgba(255,214,64,.75); } }
.woord.vast { cursor: default; }
.woord.nieuw { animation: nieuw .8s; color: var(--p); }
@keyframes nieuw { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
.woord.fout { text-decoration: line-through; text-decoration-color: var(--rood); text-decoration-thickness: 4px; opacity: .7; }
.woord.vraagwoord { background: rgba(255,214,64,.85) !important; box-shadow: 0 0 0 4px #e9b100; animation: wiebel .8s ease-in-out infinite alternate; }
@keyframes wiebel { to { transform: translateY(-6px); } }
.gat { width: .28em; align-self: stretch; position: relative; z-index: 3; }
.kiesgaten .gat { cursor: pointer; width: .55em; }
.kiesgaten .gat::before { content: ''; position: absolute; left: 50%; top: 10%; bottom: 10%; border-left: 3px dotted rgba(35,40,58,.3); }
.kiesgaten .gat:hover::after { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 6px; margin-left: -3px; border-radius: 3px; background: rgba(35,40,58,.25); }
.gat.streep::after { content: '' !important; position: absolute; left: 50%; top: -10px; bottom: -10px; width: 6px; margin-left: -3px; border-radius: 3px; background: var(--s) !important; }
.gat.mis::after { background: var(--rood) !important; }
.lijnen { position: relative; height: 104px; flex: none; }
.lijn { position: absolute; height: 6px; border-radius: 3px; transform-origin: left; animation: trek .5s ease-out; }
.lijn.dubbel { height: 16px; background: transparent !important; }
.lijn.dubbel::before, .lijn.dubbel::after { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 3px; background: var(--kl); }
.lijn.dubbel::before { top: 0; } .lijn.dubbel::after { bottom: 0; }
@keyframes trek { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.label { position: absolute; transform: translateX(-50%); font-size: 24px; font-weight: 700; padding: 0 8px; border-radius: 8px; color: #fff; white-space: nowrap; animation: plop .4s; }
@keyframes plop { from { transform: translateX(-50%) scale(0); } }
.woordtint { position: absolute; z-index: 1; border-radius: 10px; opacity: .18; }

/* ---------- onderpaneel ---------- */
.paneel { position: absolute; left: 30px; right: 30px; top: 660px; height: 220px; display: flex; flex-direction: column; gap: 14px; z-index: 8; }
.opdracht { font-size: 28px; font-weight: 700; background: rgba(255,253,247,.92); border-radius: 18px; padding: 10px 20px; align-self: flex-start; display: flex; align-items: center; gap: 14px; }
.opdracht .stapjes { display: flex; gap: 6px; }
.opdracht .stapjes span { font-size: 20px; padding: 2px 10px; border-radius: 10px; background: #eee6d2; color: #6c6250; }
.opdracht .stapjes span.nu { background: var(--inkt); color: #fff; }
.opdracht .stapjes span.af { color: #fff; }
.knoppen { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.knop { border: 0; border-radius: 18px; font-size: 28px; font-weight: 700; padding: 14px 26px; background: var(--knop); box-shadow: 0 6px 0 var(--knop-d); }
.knop:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--knop-d); }
.knop.groot { font-size: 34px; padding: 18px 40px; }
.knop.wit { background: #fff; box-shadow: 0 6px 0 #c9c2b0; }
.knop.groen { background: #3dbb63; color: #fff; box-shadow: 0 6px 0 #23843f; }
.knop.paars { background: #ece2fa; box-shadow: 0 6px 0 #b9a5d8; }
.knop[disabled] { opacity: .45; pointer-events: none; }
.knoppen .rechts { margin-left: auto; }
.knop.soort { color: #fff; min-width: 120px; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.knop.soort small { display: block; font-size: 16px; font-weight: 400; opacity: .9; }

/* terugvalkaart */
.kaart { position: absolute; left: 30px; right: 30px; bottom: 18px; min-height: 200px; max-height: 330px; background: var(--wit); border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 20px 28px; z-index: 30; display: flex; gap: 24px; align-items: center; animation: omhoog .35s ease-out; border-top: 10px solid var(--kl, #f2c94c); }
@keyframes omhoog { from { transform: translateY(120%); } }
.kaart .tekst { flex: 1; font-size: 27px; line-height: 1.35; }
.kaart .tekst h3 { margin: 0 0 6px; font-size: 30px; }
.kaart .tekst .proef { display: inline-block; margin: 6px 0; padding: 6px 14px; background: #f4efe2; border-radius: 12px; }
.kaart .tekst .stappen { font-size: 22px; color: #5b6275; margin-top: 6px; }
.kaart .acties { display: flex; flex-direction: column; gap: 14px; flex: none; }

/* ---------- schermen ---------- */
.scherm { position: absolute; inset: 0; }
.midden { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.bordje { background: var(--wit); border-radius: 30px; box-shadow: 0 10px 0 rgba(0,0,0,.15); padding: 30px 40px; }

.start .daan { left: 70px; top: 150px; width: 400px; height: 480px; }
.start .kop { position: absolute; left: 500px; top: 96px; right: 60px; }
.start .kop .nr { display: inline-block; font-size: 26px; font-weight: 700; background: #1d4f8c; color: #fff; border-radius: 12px; padding: 4px 14px; }
.start .kop h1 { margin: 10px 0 4px; font-size: 64px; line-height: 1.05; }
.start .kop p { margin: 0; font-size: 28px; color: #3b4258; }
.kaartjes { position: absolute; left: 500px; top: 330px; right: 60px; display: flex; gap: 24px; }
.kaartje { flex: 1; background: var(--wit); border-radius: 22px; padding: 18px 20px; box-shadow: 0 8px 0 rgba(0,0,0,.14); border: 0; text-align: left; position: relative; font-size: 24px; min-height: 196px; display: flex; flex-direction: column; }
.kaartje::before { content: ''; position: absolute; left: -12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #b5dff2; }
.kaartje .lv { font-size: 20px; color: #6b6f7d; font-weight: 700; }
.kaartje h3 { margin: 4px 0 8px; font-size: 30px; line-height: 1.1; }
.kaartje .ster { font-size: 34px; margin-top: auto; letter-spacing: 3px; }
.kaartje .ster .leeg { filter: grayscale(1); opacity: .3; }
.kaartje.dicht { opacity: .55; }
.kaartje.dicht::after { content: '🔒'; position: absolute; right: 16px; top: 14px; font-size: 30px; }
.kaartje:not(.dicht):hover { transform: translateY(-4px); }
.startknoppen { position: absolute; left: 500px; top: 570px; display: flex; gap: 18px; }
.legenda { position: absolute; left: 500px; right: 60px; bottom: 36px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 21px; }
.legenda span { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,253,247,.9); border-radius: 12px; padding: 4px 12px; }
.legenda i { width: 32px; height: 7px; border-radius: 4px; display: inline-block; }

/* uitleg (bewegende uitleg) */
.uitleg { position: absolute; inset: 0; z-index: 40; }
.uitleg .daan { left: 22px; top: 80px; width: 230px; height: 240px; }
.uitleg .ondertitel { position: absolute; left: 268px; right: 36px; top: 96px; min-height: 120px; padding: 18px 26px; background: var(--wit); border-radius: 26px; font-size: 31px; line-height: 1.3; box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.uitleg .ondertitel::before { content: ''; position: absolute; left: -26px; top: 40px; border: 16px solid transparent; border-right: 26px solid var(--wit); }
.uitleg .bediening { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 14px; z-index: 9; align-items: center; }
.uitleg .bolletjes { display: flex; gap: 8px; margin: 0 10px; }
.uitleg .bolletjes i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.6); display: block; }
.uitleg .bolletjes i.nu { background: var(--inkt); }
.uitleg .vraagbel { position: absolute; left: 50%; top: 250px; transform: translateX(-50%); font-size: 36px; font-weight: 700; background: #fff4c2; border: 4px solid #e9b100; border-radius: 22px; padding: 8px 26px; z-index: 9; animation: plop2 .4s; white-space: nowrap; }
@keyframes plop2 { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
.uitleg .grotekaart { position: absolute; left: 50%; top: 380px; transform: translateX(-50%); font-size: 54px; background: var(--wit); border-radius: 26px; padding: 26px 50px; box-shadow: 0 10px 0 rgba(0,0,0,.15); z-index: 9; white-space: nowrap; animation: plop2 .4s; }
.uitleg .grotekaart.klein { font-size: 38px; }
.filmpje.los { position: absolute; inset: 0; background: #000; z-index: 70; display: flex; align-items: center; justify-content: center; }
.filmpje.los video { width: 100%; height: 100%; object-fit: cover; }
.filmpje.los .knop { position: absolute; right: 30px; bottom: 30px; }
.uitleg .filmpje { position: absolute; inset: 0; background: #000; z-index: 50; display: flex; align-items: center; justify-content: center; }
.uitleg .filmpje video { width: 100%; height: 100%; object-fit: cover; }
.uitleg .filmpje .knop { position: absolute; right: 30px; bottom: 30px; }

/* overlay-schermen */
.overlay { position: absolute; inset: 0; background: rgba(20,32,48,.55); z-index: 60; display: flex; align-items: center; justify-content: center; }
.overlay .bordje { max-width: 1100px; font-size: 28px; text-align: center; }
.overlay h2 { margin: 0 0 10px; font-size: 52px; }
.overlay .rijknop { display: flex; gap: 18px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.grootster { font-size: 90px; letter-spacing: 8px; }
.grootster .leeg { filter: grayscale(1); opacity: .3; }
.kleuren { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 30px; text-align: left; margin: 16px 0; font-size: 24px; }
.kleuren label { display: flex; align-items: center; gap: 12px; }
.kleuren input[type=color] { width: 54px; height: 40px; border: 0; background: none; padding: 0; }
.instel { display: flex; flex-direction: column; gap: 10px; text-align: left; font-size: 26px; margin: 10px 0; }
.instel label { display: flex; gap: 12px; align-items: center; }
.instel input[type=checkbox] { width: 28px; height: 28px; }

/* diploma */
.diploma { width: 1080px; padding: 40px 60px; background: #fffdf2; border: 14px double #c99a3c; border-radius: 20px; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.3); position: relative; }
.diploma h2 { font-size: 60px; margin: 0; color: #1d4f8c; }
.diploma .wie { font-size: 40px; border: 0; border-bottom: 3px dashed #c99a3c; background: transparent; text-align: center; font-family: inherit; width: 70%; margin: 18px 0; }
.diploma .wat { font-size: 32px; }
.diploma .stempel { position: absolute; right: 40px; bottom: 30px; width: 150px; height: 150px; border-radius: 50%; border: 6px solid #d93a32; color: #d93a32; font-weight: 700; font-size: 24px; display: flex; align-items: center; justify-content: center; transform: rotate(-14deg); text-align: center; line-height: 1.05; }
@media print {
  body * { visibility: hidden; }
  .diploma, .diploma * { visibility: visible; }
  .diploma { position: fixed; left: 0; top: 0; }
  .diploma .knop, .diploma .ikoon { display: none; }
}
