@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 {
  --nacht: #0d1626; --staal: #2b3a4f; --staal-l: #4a5d78; --goud: #f2c230; --goud-d: #b8860b; --groen: #3ad06b; --rood: #ff4a3d;
  --blauw: #3f8cff; --tekst: #eef4ff; --lcd: #0b2a1a; --lcd-t: #6dff9e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05080f; overflow: hidden; }
body { font-family: 'Andika', 'Trebuchet MS', Arial, sans-serif; color: var(--tekst); -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: var(--nacht); }
#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; color: #222; font-size: 15px; text-align: center; z-index: 99; }
}
button { font-family: inherit; cursor: pointer; color: inherit; border: 0; }
.verborgen { display: none !important; }

/* ---------- decor ---------- */
.kamer { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, #1f3550, #0a1220 70%); background-size: cover; background-position: center; }
.kamer.foto { background-image: var(--foto); }
.kamer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,10,20,0) 30%, rgba(5,10,20,.55) 60%, rgba(5,10,20,.8)); }
.scherm { position: absolute; inset: 0; }

/* ---------- bovenbalk ---------- */
.balk { position: absolute; left: 0; right: 0; top: 0; height: 84px; display: flex; align-items: center; gap: 18px; padding: 0 26px; z-index: 20; }
.balk .titel { font-size: 30px; font-weight: 700; text-shadow: 0 2px 0 #000, 0 0 10px #000, 0 0 18px #000; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knopje { height: 56px; min-width: 56px; padding: 0 18px; border-radius: 14px; background: linear-gradient(#4a5d78, #2b3a4f); box-shadow: 0 4px 0 #111a28, inset 0 1px 0 rgba(255,255,255,.25); font-size: 22px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.knopje:active { transform: translateY(3px); box-shadow: 0 1px 0 #111a28; }
.muntteller { height: 56px; padding: 0 20px 0 10px; border-radius: 30px; background: rgba(0,0,0,.55); border: 2px solid var(--goud-d); display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 700; color: var(--goud); }
.muntteller.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.18); } }
.munticoon { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, #f2c230 35%, #b8860b 75%); box-shadow: inset 0 0 0 3px #9a6f05, inset 0 0 0 6px #f7d65a; position: relative; }
.munticoon::after { content: '★'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9a6f05; font-size: 20px; }

/* ---------- startscherm ---------- */
.logo { position: absolute; left: 720px; top: 70px; width: 820px; text-align: center; }
.logo h1 { margin: 0; font-size: 112px; line-height: 1; letter-spacing: 6px; font-weight: 700; background: linear-gradient(#fff7d0, #f2c230 45%, #a8740a 55%, #f7d65a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #3a2a05) drop-shadow(0 0 24px rgba(242,194,48,.35)); }
.logo p { margin: 6px 0 0; font-size: 28px; color: #c9d6ea; }
.paneel { position: absolute; background: linear-gradient(#1d2a3d, #121c2b); border: 3px solid #3c4f6b; border-radius: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.startpaneel { left: 760px; top: 300px; width: 740px; padding: 26px 34px; }
.rij { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; flex-wrap: wrap; }
.label { font-size: 24px; font-weight: 700; color: #9fb3d1; margin-top: 4px; }
.groepknop { width: 100px; height: 84px; border-radius: 18px; background: linear-gradient(#4a5d78, #2b3a4f); box-shadow: 0 5px 0 #0c1420; font-size: 20px; font-weight: 700; line-height: 1; }
.groepknop b { display: block; font-size: 40px; }
.groepknop.aan { background: linear-gradient(#ffe27a, #f2c230 50%, #c9930a); color: #3a2a05; box-shadow: 0 5px 0 #7a5800, 0 0 22px rgba(242,194,48,.55); }
.schakel { display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(0,0,0,.3); font-size: 22px; text-align: left; width: 100%; }
.schakel .bol { width: 86px; height: 46px; border-radius: 30px; background: #44516a; position: relative; flex: none; transition: background .2s; }
.schakel .bol::after { content: ''; position: absolute; left: 5px; top: 5px; width: 36px; height: 36px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.schakel.aan .bol { background: var(--rood); }
.schakel.aan.groen .bol { background: var(--groen); }
.schakel.aan .bol::after { left: 45px; }
.schakel b { font-size: 24px; }
.schakel small { display: block; color: #9fb3d1; font-size: 18px; }
.grote-knop { height: 92px; padding: 0 46px; border-radius: 22px; font-size: 38px; font-weight: 700; background: linear-gradient(#ffe27a, #f2c230 50%, #c9930a); color: #3a2a05; box-shadow: 0 7px 0 #7a5800, 0 0 30px rgba(242,194,48,.35); }
.grote-knop:active { transform: translateY(4px); box-shadow: 0 3px 0 #7a5800; }
.grote-knop.rood { background: linear-gradient(#ff8a7a, #ff4a3d 50%, #b8231a); color: #fff; box-shadow: 0 7px 0 #6e140e; }
.kleine-knoppen { display: flex; gap: 12px; margin-top: 18px; }
.kleine-knoppen .knopje { font-size: 19px; height: 50px; }

/* ---------- Lotte ---------- */
.lotte { position: absolute; background-size: contain; background-repeat: no-repeat; background-position: bottom center; pointer-events: none; z-index: 6; filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)); }
.lotte.nieuw { animation: lotteIn .35s ease-out; }
@keyframes lotteIn { from { transform: translateY(16px) scale(.97); opacity: .4; } }
.lotte svg { width: 100%; height: 100%; }
.ballon { position: absolute; z-index: 15; max-width: 470px; padding: 16px 22px; border-radius: 22px; background: #fffdf3; color: #1a2233; font-size: 25px; line-height: 1.25; box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.ballon::after { content: ''; position: absolute; left: 34px; bottom: -18px; border: 12px solid transparent; border-top: 14px solid #fffdf3; }
.ballon.leeg { display: none; }

/* ---------- overzicht ---------- */
.kluizen { position: absolute; left: 470px; top: 150px; width: 1090px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.kluiskaart { height: 300px; border-radius: 26px; padding: 20px 24px; text-align: left; background: linear-gradient(#26364d, #182437); border: 3px solid #3c4f6b; box-shadow: 0 10px 0 #0b121d; display: flex; gap: 22px; align-items: center; position: relative; }
.kluiskaart:active { transform: translateY(4px); }
.kluiskaart .mini { width: 170px; height: 170px; flex: none; border-radius: 50%; background: radial-gradient(circle, #8d9bb0 0 18%, #5b6a80 19% 55%, #3a475a 56% 62%, #8d9bb0 63% 70%, #2b3647 71%); box-shadow: 0 6px 14px rgba(0,0,0,.5); position: relative; }
.kluiskaart .mini.foto { background: var(--deur) center/contain no-repeat; box-shadow: none; }
.kluiskaart .mini .wieltje { position: absolute; inset: 25%; background: var(--wiel) center/contain no-repeat; }
.kluiskaart.open .mini::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 30px 6px rgba(242,194,48,.6); }
.kluiskaart h3 { margin: 0 0 6px; font-size: 32px; line-height: 1.1; }
.kluiskaart .sub { font-size: 20px; color: #9fb3d1; }
.kluiskaart .sterren { font-size: 40px; color: #4b5a72; letter-spacing: 4px; margin-top: 10px; }
.kluiskaart .sterren .s { color: var(--goud); text-shadow: 0 0 10px rgba(242,194,48,.6); }
.kluiskaart.dicht { opacity: .5; filter: grayscale(.6); }
.kluiskaart.dicht::after { content: '🔒'; position: absolute; right: 22px; top: 18px; font-size: 40px; }
.kluiskaart .nr { position: absolute; right: 24px; bottom: 16px; font-size: 22px; color: #6f83a3; font-weight: 700; }

/* ---------- spelscherm ---------- */
.deurplek { position: absolute; left: 20px; top: 112px; width: 640px; height: 640px; perspective: 1800px; z-index: 4; }
.binnen { position: absolute; inset: 40px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #ffe68a, #d79a12 50%, #4a2c03); background-size: cover; background-position: center; box-shadow: inset 0 0 60px rgba(0,0,0,.9); }
.binnen.foto { background-image: var(--foto); }
.binnen .gloed { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,230,140,.0), rgba(255,200,60,.0)); }
.deur { position: absolute; inset: 0; transform-origin: 6% 50%; transform-style: preserve-3d; transition: transform 1.8s cubic-bezier(.5,.05,.3,1); }
.deur.open { transform: rotateY(-112deg); }
.deur .plaat { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #9aa7ba 0 30%, #6c7a90 31% 58%, #44526a 59% 64%, #9aa7ba 65% 70%, #2e394b 71%); box-shadow: 0 25px 60px rgba(0,0,0,.7); }
.deur .plaat.foto { background: var(--foto) center/contain no-repeat; box-shadow: none; filter: drop-shadow(0 25px 40px rgba(0,0,0,.7)); }
.deur .wiel { position: absolute; left: 31%; top: 31%; width: 38%; height: 38%; transition: transform .9s cubic-bezier(.3,1.5,.5,1); filter: drop-shadow(0 10px 10px rgba(0,0,0,.6)); }
.deur .wiel.foto { background: var(--foto) center/contain no-repeat; }
.deur .wiel svg { width: 100%; height: 100%; }
.deur .lampjes { position: absolute; inset: 0; }
.lampje { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6a7486, #2a313d); box-shadow: inset 0 0 0 3px #1a1f28; transition: all .3s; }
.lampje.aan { background: radial-gradient(circle at 35% 30%, #d8ffe5, #3ad06b 45%, #137a36); box-shadow: 0 0 16px 4px rgba(58,208,107,.8), inset 0 0 0 3px #0d4f22; }
.deur.schud { animation: schud .45s; }
@keyframes schud { 20% { transform: translateX(-8px) rotate(-1deg); } 40% { transform: translateX(8px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
.deurplek .straal { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 1s; box-shadow: 0 0 120px 40px rgba(255,210,80,.8); }
.deurplek.open .straal { opacity: 1; }

/* timer + alarm */
.timer { position: absolute; left: 700px; top: 98px; width: 330px; height: 92px; border-radius: 18px; background: #0a0a0a; border: 4px solid #3a3a3a; box-shadow: inset 0 0 20px rgba(0,0,0,.9), 0 6px 0 #000; display: flex; align-items: center; justify-content: center; gap: 14px; font-family: 'Courier New', monospace; font-weight: 700; font-size: 66px; color: #ff4a3d; text-shadow: 0 0 14px rgba(255,74,61,.8); z-index: 5; }
.timer.rustig { color: var(--lcd-t); text-shadow: 0 0 12px rgba(109,255,158,.6); font-size: 34px; font-family: inherit; }
.timer.haast { animation: knipper .5s infinite; }
@keyframes knipper { 50% { color: #ffb3ab; background: #3a0606; } }
.sirene { position: absolute; left: 1050px; top: 102px; width: 84px; height: 84px; z-index: 5; }
.sirene .kap { position: absolute; left: 14px; top: 8px; width: 56px; height: 58px; border-radius: 28px 28px 6px 6px; background: radial-gradient(circle at 40% 30%, #7a8ab0, #2d3a5a); box-shadow: inset 0 -6px 0 rgba(0,0,0,.3); }
.sirene .voet { position: absolute; left: 6px; top: 62px; width: 72px; height: 16px; border-radius: 6px; background: #333; }
.sirene.aan .kap { animation: zwaai .6s infinite; }
@keyframes zwaai { 0%,49% { background: radial-gradient(circle at 40% 30%, #bfe0ff, #2f7bff); box-shadow: 0 0 40px 16px rgba(47,123,255,.8); } 50%,100% { background: radial-gradient(circle at 40% 30%, #ffd0cc, #ff2a1a); box-shadow: 0 0 40px 16px rgba(255,42,26,.8); } }
.voortgang { position: absolute; left: 1160px; top: 110px; width: 400px; font-size: 22px; color: #9fb3d1; z-index: 5; }
.voortgang b { color: #fff; font-size: 30px; }

.lcd { position: absolute; left: 700px; top: 212px; width: 860px; height: 200px; border-radius: 24px; background: linear-gradient(#0e3322, #082015); border: 8px solid #2e3a2f; box-shadow: inset 0 0 40px rgba(0,0,0,.9), 0 8px 0 #0b100c; display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 5; }
.lcd::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 5px); pointer-events: none; }
.lcd .woord { font-size: 96px; font-weight: 700; color: var(--lcd-t); text-shadow: 0 0 18px rgba(109,255,158,.75); letter-spacing: 3px; white-space: nowrap; }
.lcd .woord.klein { font-size: 70px; }
.lcd .woord.mini { font-size: 54px; }
.lcd .woord.ruis { color: #2f8f55; text-shadow: none; letter-spacing: 10px; }
.lcd .flitsbalk { position: absolute; left: 0; bottom: 0; height: 10px; background: var(--lcd-t); box-shadow: 0 0 12px var(--lcd-t); }
.lcd .hint { position: absolute; top: 12px; left: 22px; font-size: 20px; color: #3f9b65; }

.vakjes { position: absolute; left: 700px; top: 432px; width: 860px; min-height: 104px; display: flex; justify-content: center; flex-wrap: nowrap; gap: 8px; z-index: 5; }
.vakje { width: 66px; height: 92px; border-radius: 12px; background: #f7f3e6; color: #1a2233; border-bottom: 6px solid #b9b19a; font-size: 58px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.vakjes.smal .vakje { width: 52px; font-size: 46px; }
.vakjes.heelsmal .vakje { width: 40px; font-size: 36px; height: 80px; }
.vakje.cursor { box-shadow: 0 0 0 4px var(--goud); animation: cur 1s infinite; }
@keyframes cur { 50% { box-shadow: 0 0 0 4px rgba(242,194,48,.25); } }
.vakje.goed { background: #c9f7d8; border-color: #2c9a4b; color: #0d5a26; }
.vakje.fout { background: #ffd2cc; border-color: #c4271c; color: #b3190e; animation: schud .4s; }
.vakje.extra { background: #ffd2cc; border-color: #c4271c; color: #b3190e; text-decoration: line-through; }
.vakje.mist { background: transparent; border: 3px dashed #ff8a7a; color: transparent; }
.vakjes.leeg-hint { color: #6f83a3; font-size: 24px; align-items: center; }
.uitleg { position: absolute; left: 700px; top: 548px; width: 860px; text-align: center; font-size: 26px; z-index: 5; }
.uitleg .goedwoord { font-size: 46px; font-weight: 700; letter-spacing: 2px; color: #fff; }
.uitleg .goedwoord .anders { color: var(--goud); text-decoration: underline; text-decoration-thickness: 4px; }

.toetsen { position: absolute; left: 700px; top: 556px; width: 860px; z-index: 5; }
.toetsrij { display: flex; justify-content: center; gap: 8px; margin-bottom: 9px; }
.toets { width: 70px; height: 70px; border-radius: 12px; font-size: 32px; font-weight: 700; background: linear-gradient(#5d6c82, #38455a); box-shadow: 0 5px 0 #141c28, inset 0 1px 0 rgba(255,255,255,.3); color: #fff; }
.toets:active, .toets.druk { transform: translateY(4px); box-shadow: 0 1px 0 #141c28; background: linear-gradient(#7d8ca2, #4a576c); }
.toets.breed { width: 150px; font-size: 24px; }
.toets.ok { width: 190px; background: linear-gradient(#5fe08b, #2c9a4b); box-shadow: 0 5px 0 #145a28; }
.toets.ok:active { box-shadow: 0 1px 0 #145a28; }
.toets.terug { width: 120px; background: linear-gradient(#ff8a7a, #c4271c); box-shadow: 0 5px 0 #6e140e; }
.knoppenrij { position: absolute; left: 700px; top: 800px; width: 860px; display: flex; justify-content: center; gap: 16px; z-index: 5; }
.knoppenrij .grote-knop { height: 74px; font-size: 30px; padding: 0 34px; }

/* overlays */
.laag { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.laag.donker { background: rgba(3,6,12,.82); }
.uitslag { width: 820px; padding: 34px 40px; text-align: center; }
.uitslag h2 { margin: 0 0 10px; font-size: 56px; color: var(--goud); }
.uitslag .sterren { font-size: 90px; letter-spacing: 10px; color: #3a475a; }
.uitslag .sterren .s { color: var(--goud); text-shadow: 0 0 20px rgba(242,194,48,.7); display: inline-block; animation: ster .5s backwards; }
@keyframes ster { from { transform: scale(0) rotate(-90deg); } }
.uitslag p { font-size: 26px; margin: 10px 0; }
.uitslag .knoppen { display: flex; gap: 16px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.uitslag .knoppen .grote-knop { height: 74px; font-size: 28px; padding: 0 30px; }
.uitslag .knoppen .knopje { height: 74px; font-size: 24px; }

.film { position: absolute; inset: 0; z-index: 60; background: #000; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film .sla { position: absolute; right: 30px; bottom: 30px; }
.film .ondertitel { position: absolute; left: 160px; right: 160px; bottom: 40px; text-align: center; font-size: 34px; font-weight: 700; text-shadow: 0 2px 6px #000, 0 0 3px #000; }

.politie { position: absolute; inset: 0; z-index: 50; overflow: hidden; }
.politie .flits { position: absolute; inset: 0; animation: polflits .5s infinite; }
@keyframes polflits { 0%,49% { background: radial-gradient(ellipse at 20% 0%, rgba(47,123,255,.7), transparent 60%); } 50%,100% { background: radial-gradient(ellipse at 80% 0%, rgba(255,42,26,.7), transparent 60%); } }
.politie .agent { position: absolute; right: 10px; bottom: -20px; width: 420px; height: 630px; background-size: contain; background-repeat: no-repeat; background-position: bottom; animation: agentIn .6s cubic-bezier(.3,1.4,.6,1); filter: drop-shadow(0 10px 30px rgba(0,0,0,.8)); }
@keyframes agentIn { from { transform: translateX(600px); } }
.politie .gepakt { position: absolute; left: 0; right: 0; top: 130px; text-align: center; font-size: 150px; font-weight: 700; color: #fff; -webkit-text-stroke: 6px #1a2a6c; text-shadow: 8px 8px 0 #ff2a1a; transform: rotate(-6deg); animation: stempel .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes stempel { from { transform: scale(3) rotate(-6deg); opacity: 0; } }

/* munten in 3D */
.muntlaag { position: absolute; inset: 0; z-index: 45; perspective: 900px; pointer-events: none; overflow: hidden; }
.vliegmunt { position: absolute; left: 0; top: 0; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; transform-style: preserve-3d;
  background: radial-gradient(circle at 35% 28%, #fffbe0, #ffd84a 30%, #e0a512 62%, #8a5d02 100%); box-shadow: inset 0 0 0 6px #a87905, inset 0 0 0 11px #ffe27a, 0 0 18px rgba(255,210,80,.7); }
.vliegmunt::after { content: '★'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a87905; font-size: 44px; }
.glinster { position: absolute; width: 14px; height: 14px; margin: -7px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); pointer-events: none; }

/* eigen lijst */
.lijstpaneel { left: 420px; top: 110px; width: 1120px; padding: 28px 36px; }
.lijstpaneel h2 { margin: 0 0 8px; font-size: 40px; }
.lijstpaneel p { margin: 4px 0 12px; font-size: 22px; color: #c9d6ea; }
.lijstpaneel textarea, .lijstpaneel input { width: 100%; font-family: inherit; font-size: 26px; border-radius: 14px; border: 3px solid #3c4f6b; background: #0b1320; color: #fff; padding: 12px 16px; user-select: text; -webkit-user-select: text; }
.lijstpaneel textarea { height: 300px; resize: none; }
.lijstpaneel .link { font-size: 18px; color: var(--goud); word-break: break-all; margin-top: 10px; user-select: text; -webkit-user-select: text; min-height: 24px; }
.lijstpaneel .melding { color: #ff8a7a; font-size: 22px; min-height: 30px; }

.intro-tekst { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 54px; font-weight: 700; padding: 0 160px; background: radial-gradient(circle at var(--x, 50%) 50%, rgba(255,240,180,.14), transparent 22%), #03060c; }
