:root {
  --teal: #15514A;
  --ink: #123B34;
  --paper: #EFEBE0;
  --on-ink: #F7F4EC;
  --ochre: #BA7517;
  --green: #639922;
  --blue: #378ADD;
  --red: #A33D2A;
  --sans: system-ui, "Helvetica Neue", Helvetica, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #000; }
body { font-family: var(--sans); color: var(--on-ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* keuze */
#prompt { position: fixed; left: 0; right: 0; bottom: calc(14vh + var(--sab)); bottom: calc(14svh + var(--sab)); padding: 0 calc(20px + var(--sar)) 0 calc(20px + var(--sal)); text-align: center; z-index: 5; }
#prompt h2 { font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; max-width: 22ch; margin: 0 auto 22px; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
#prompt.dark h2 { color: #111; text-shadow: none; }
#opts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; margin: 0 auto; }
#opts button { background: var(--on-ink); color: var(--ink); font-weight: 700; font-size: 1.05rem; padding: 14px 22px; border-radius: 4px; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s, background-color .15s; }
#opts button:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
#opts button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#opts button.big { background: var(--ochre); color: #fff; font-size: 1.5rem; padding: 18px 44px; letter-spacing: .04em; box-shadow: 0 5px 0 #6b430c; }

#caption { position: fixed; left: 0; right: 0; bottom: calc(6vh + var(--sab)); bottom: calc(6svh + var(--sab)); text-align: center; padding: 0 calc(20px + var(--sar)) 0 calc(20px + var(--sal)); font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 600; z-index: 4; min-height: 1.5em; text-shadow: 0 1px 12px rgba(0,0,0,.7); transition: opacity .3s; pointer-events: none; }
#caption.dark { color: #111; text-shadow: none; }
#hint { position: fixed; top: calc(18px + var(--sat)); left: 0; right: 0; padding: 0 72px; text-align: center; font-size: .9rem; font-weight: 600; opacity: .8; z-index: 4; pointer-events: none; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
#hint.dark { color: #333; text-shadow: none; }

/* lobby */
#lobby { position: fixed; inset: 0; z-index: 6; background: var(--ink); display: grid; grid-template-columns: 5fr 7fr; grid-template-rows: 1fr auto; gap: 4vw; padding: calc(6vh + var(--sat)) calc(6vw + var(--sar)) calc(5vh + var(--sab)) calc(6vw + var(--sal)); padding: calc(6svh + var(--sat)) calc(6vw + var(--sar)) calc(5svh + var(--sab)) calc(6vw + var(--sal)); }
#lobby h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 10px 0 8px; }
.lobby-room { font-size: 1.1rem; font-weight: 600; color: #B9C9C6; }
.stats { margin-top: 5vh; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 1.05rem; max-width: 24em; }
.stats dt { color: #B9C9C6; }
.stats dd { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.stats-note { margin-top: 18px; font-size: .85rem; color: #7FA39D; }
.lobby-right { display: flex; align-items: center; justify-content: center; min-height: 0; }
#retro { width: 100%; max-height: 100%; aspect-ratio: 16 / 10; image-rendering: pixelated; background: #000; border: 6px solid #0b2622; }
.loadbar { grid-column: 1 / -1; }
.loadbar span { display: block; font-weight: 700; margin-bottom: 8px; }
.track { height: 10px; background: #0b2622; }
#loadfill { height: 100%; width: 0; background: #ECCB84; }
@media (max-width: 720px) { #lobby { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; } .stats { margin-top: 3vh; } }
/* liggende telefoon: twee kolommen houden, alles kleiner, zodat schermpje en laadbalk passen */
@media (max-height: 500px) and (orientation: landscape) {
  #lobby { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 3vw; padding-top: calc(16px + var(--sat)); padding-bottom: calc(14px + var(--sab)); }
  #lobby h1 { font-size: 1.6rem; margin: 4px 0; }
  .lobby-room { font-size: .95rem; }
  .stats { margin-top: 10px; gap: 2px 16px; font-size: .9rem; }
  .stats-note { margin-top: 6px; }
}

/* straat-hud */
#hud { position: fixed; top: calc(18px + var(--sat)); left: calc(20px + var(--sal)); z-index: 5; text-align: left; font-weight: 800; pointer-events: none; }
.hud-clock { font-size: 1.3rem; color: #fff; -webkit-text-stroke: 4px #000; paint-order: stroke fill; }
.hud-money { font-size: clamp(2rem, 4vw, 3rem); color: #7BD04A; -webkit-text-stroke: 6px #000; paint-order: stroke fill; letter-spacing: .01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hud-money.zero { color: #E0452F; }
.hud-line { margin-top: 4px; font-size: 1rem; color: #fff; -webkit-text-stroke: 4px #000; paint-order: stroke fill; }

/* club */
#rec { position: fixed; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.rec-frame { height: 86vh; height: 86svh; aspect-ratio: 9 / 16; max-width: 92vw; border: 3px solid #fff; border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); display: flex; flex-direction: column; justify-content: space-between; padding: 18px; font-weight: 800; }
.rec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #E0452F; margin-right: 6px; animation: blink 1s steps(2) infinite; }
.rec-likes { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: 0; } }

/* einde */
#end { position: fixed; inset: 0; z-index: 8; background: var(--ink); display: flex; flex-direction: column; justify-content: center; padding: calc(8vh + var(--sat)) calc(8vw + var(--sar)) calc(8vh + var(--sab)) calc(8vw + var(--sal)); overflow-y: auto; }
#end h2 { font-size: clamp(2rem, 4.5vw, 3.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 26px; max-width: 16ch; }
#end ul { list-style: none; padding: 0; font-size: 1.15rem; line-height: 1.7; color: #B9C9C6; }
#end ul b { color: var(--on-ink); }
.end-knoppen { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 34px; }
#again { background: var(--ochre); color: #fff; font-weight: 800; font-size: 1.1rem; padding: 14px 28px; border-radius: 4px; box-shadow: 0 4px 0 #6b430c; }
#creditsknop { background: transparent; color: var(--on-ink); font-weight: 700; font-size: 1rem; padding: 12px 4px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
#creditsknop:hover { color: #fff; text-decoration-thickness: 2px; }
.end-brand { margin-top: 8vh; font-weight: 700; color: #7FA39D; }

#mute { position: fixed; right: calc(14px + var(--sar)); top: calc(12px + var(--sat)); z-index: 9; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; border-radius: 50%; }
#mute .cross { display: none; }
#mute.off .cross { display: inline; }
#mute.off .wave { display: none; }
#touch { position: fixed; bottom: calc(18px + var(--sab)); left: 0; right: 0; z-index: 6; display: flex; gap: 14px; justify-content: center; }
#touch button { width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 1.4rem; touch-action: none; }
#fade { position: fixed; inset: 0; z-index: 7; background: #000; opacity: 0; pointer-events: none; }

body.touching #caption { bottom: calc(104px + var(--sab)); }
body.touching #prompt { bottom: calc(150px + var(--sab)); }
/* club: de ondertitel boven de likes-teller van het filmkader */
#rec:not([hidden]) ~ #caption { bottom: calc(7vh + 76px); bottom: calc(7svh + 76px); }
#glerr { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 1.2rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .rec-dot { animation: none; }
  #opts button { transition: none; }
}

/* bouwer midden: witte ruimte en bureau */
/* wit: de enige zin en de hint staan boven je handen, in het lege wit */
body.in-wit #caption { bottom: 46vh; bottom: 46svh; font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; color: #222; letter-spacing: .01em; }
body.in-wit #hint { top: auto; bottom: 39vh; bottom: 39svh; padding: 0 24px; color: #555; opacity: .9; font-size: .95rem; }
/* bureau: de vraag aan de telefoon krijgt een donkere scrim, zodat hij niet wegvalt op het bureau */
body.in-bureau #prompt::before { content: ''; position: absolute; left: 0; right: 0; top: -70px; bottom: -14vh; bottom: calc(-14svh - var(--sab)); background: linear-gradient(to bottom, rgba(18,59,52,0), rgba(18,59,52,.78) 38%, rgba(18,59,52,.88)); z-index: -1; pointer-events: none; }
body.in-bureau #caption { bottom: auto; top: calc(22vh + var(--sat)); top: calc(22svh + var(--sat)); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; font-style: italic; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
/* vinden of houden: de knop die je ook maar probeert aan te raken rekt naar je toe */
#opts button.grijp { transform: scale(1.5, 1.25) !important; background: #fff; box-shadow: 0 0 0 100vmax rgba(255,255,255,.55), 0 10px 0 var(--ink); transition: transform .18s cubic-bezier(.2, 1.6, .4, 1), box-shadow .18s ease-out; position: relative; z-index: 2; }
#opts button.weg { opacity: 0; transform: scale(.85); transition: opacity .12s, transform .12s; }
@media (prefers-reduced-motion: reduce) {
  #opts button.grijp { transform: none !important; transition: none; }
  #opts button.weg { transition: none; }
}

/* bouwer slot: straat, club en einde */
/* straat: open-wereld-HUD links bovenin, met minikaart, klok, saldo en balkjes */
#hud.slot-ow { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 14px; align-items: start; transform-origin: 0 0; }
#hud.slot-ow .slot-map { grid-row: 1 / span 3; width: 92px; height: 92px; display: block; }
#hud.slot-ow .hud-clock, #hud.slot-ow .hud-money, #hud.slot-ow .slot-bars { grid-column: 2; }
#hud.slot-ow .hud-line, #hud.slot-ow .slot-echo { grid-column: 1 / -1; }
#hud.slot-ow .hud-line { margin-top: 10px; }
#hud.slot-ow .hud-money { transform-origin: 0 60%; }
.slot-bars { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; width: 150px; }
.slot-bars i { display: block; height: 7px; background: rgba(0,0,0,.55); box-shadow: 0 0 0 2px #000; }
.slot-bars b { display: block; height: 100%; transition: width .5s cubic-bezier(.2, 1.2, .4, 1); }
.slot-bars .b1 b { width: 64%; background: #7BD04A; }
.slot-bars .b2 b { width: 16%; background: var(--blue); }
.slot-bars.vol b { width: 100%; }
.slot-echo { margin-top: 3px; font-size: .82rem; font-weight: 700; color: #fff; -webkit-text-stroke: 3px #000; paint-order: stroke fill; opacity: .85; }
.slot-plus { position: absolute; left: 100%; margin-left: 14px; top: 46px; font-size: 1.3rem; font-weight: 800; color: #7BD04A; -webkit-text-stroke: 4px #000; paint-order: stroke fill; opacity: 0; white-space: nowrap; }
.slot-plus.op { animation: slotPlus 2.4s ease-out forwards; }
#hud.pop { animation: slotPop .16s cubic-bezier(.2, 1.5, .4, 1) both; }
.hud-money.knip { animation: slotKnip .5s linear 4; }
.hud-money.rijk { color: #7BD04A; animation: slotRijk .5s cubic-bezier(.2, 1.6, .4, 1); }
/* flits bij "Pak op": een vlak warm licht over het hele beeld dat in 0,8 s wegtrekt */
.slot-goud { position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: #F3DFA8; }
.slot-goud.aan { animation: slotGoud .8s ease-out; }
@keyframes slotPop { from { transform: scale(1.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slotKnip { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .2; } }
@keyframes slotRijk { from { transform: scale(1.7); } to { transform: none; } }
@keyframes slotPlus { 0% { opacity: 0; transform: translateY(14px); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }
@keyframes slotGoud { from { opacity: 1; } to { opacity: 0; } }
/* straat: de loophint staat op een inktkleurig label, anders verdwijnt witte tekst in de lichte lucht */
body.slot-straat #hint { width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 7px 14px; border-radius: 6px; background: rgba(18,59,52,.82); opacity: 1; text-shadow: none; }
body.slot-straat #hint:empty { display: none; }
/* op touch staat de hint vlak boven de loopknoppen, de bovenrand blijft vrij voor HUD en geluid */
body.slot-straat.touching #hint { top: auto; bottom: calc(96px + var(--sab)); }
@media (max-width: 600px) {
  #hud.slot-ow { column-gap: 10px; }
  #hud.slot-ow .slot-map { width: 70px; height: 70px; }
  .slot-bars { width: 112px; }
  .slot-plus { left: 0; margin-left: 0; top: 132px; font-size: 1.05rem; }
}

/* club: het filmpje is een staand telefoonkader met hartjes en een voortgangsbalk */
#rec .rec-frame { position: relative; }
#rec.pop .rec-frame { animation: slotRec .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.rec-likes.boost { animation: slotBoost .3s cubic-bezier(.2, 1.6, .4, 1); transform-origin: 0 100%; }
.rec-likes .slot-hartje { color: #ff5a7a; margin-right: 6px; }
.slot-prog { position: absolute; left: 18px; right: 18px; top: 8px; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; overflow: hidden; }
.slot-prog b { display: block; height: 100%; background: #fff; transform-origin: 0 0; transform: scaleX(0); }
.slot-hearts { position: absolute; right: 18px; bottom: 64px; width: 1px; height: 1px; pointer-events: none; }
.slot-hearts span { position: absolute; right: 0; bottom: 0; font-size: var(--s, 28px); color: var(--c, #ff5a7a); line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.35); animation: slotHart 1.7s ease-out forwards; }
.slot-strobe { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: #fff; opacity: 0; }
.slot-strobe.aan { animation: slotGoud .14s linear; }
@keyframes slotRec { from { transform: scale(1.12); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slotBoost { from { transform: scale(1.35); } to { transform: none; } }
@keyframes slotHart { 0% { transform: translate(0, 0) scale(.3); opacity: 0; } 14% { transform: translate(0, -24px) scale(1.15); opacity: 1; } 100% { transform: translate(var(--dx, -20px), -300px) scale(.9); opacity: 0; } }

/* einde: de laatste scene loopt vervaagd door achter de tekst, de regels komen een voor een */
#end.slot-door { background: linear-gradient(100deg, rgba(18,59,52,.95) 0%, rgba(18,59,52,.82) 48%, rgba(18,59,52,.3) 100%); }
#end.slot-door h2 { animation: slotIn .8s ease-out both; }
#end.slot-negen h2 { font-size: clamp(2.6rem, 7.2vw, 6.2rem); max-width: 11ch; line-height: .98; }
#end.slot-door li, #end.slot-door #again, #end.slot-door #creditsknop { opacity: 0; animation: slotIn .45s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes slotIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  #end.slot-door { background: linear-gradient(180deg, rgba(18,59,52,.55) 0%, rgba(18,59,52,.9) 42%, rgba(18,59,52,.96) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  #hud.pop, .hud-money.knip, .hud-money.rijk, .slot-plus.op, #rec.pop .rec-frame, .rec-likes.boost { animation: none; }
  .slot-plus.op { opacity: 1; }
  .slot-goud.aan { animation-duration: 1.6s; opacity: 0; }
  .slot-hearts span { animation-name: slotHartRustig; }
  #end.slot-door h2, #end.slot-door li, #end.slot-door #again, #end.slot-door #creditsknop { animation: none; opacity: 1; }
  .slot-bars b { transition: none; }
}
@keyframes slotHartRustig { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }

/* bouwer intro: berg, lobby, vliegtuig, val */
/* berg: scrim onder de keuze, icoontjes in de knoppen, ondertitel op een donkere pil */
.intro-scrim { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(to top, rgba(18,59,52,.62) 0%, rgba(18,59,52,.3) 26%, rgba(18,59,52,0) 52%); transition: opacity .8s, background .8s; }
.intro-scrim.out { opacity: 0; }
#opts button .ico { width: 22px; height: 22px; display: inline-block; vertical-align: middle; margin: -3px 8px -2px -4px; }
body.intro-pill #caption:not(:empty) { width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 8px 18px; border-radius: 999px; background: rgba(18,59,52,.86); text-shadow: none; }

/* lobby: wand van spelschermpjes, tekenregen, paneel met stats, aftelling en spelersfeed */
#lobby.br { display: block; padding: 0; background: #050d0b; overflow: hidden; }
#lobby.br #retrowall, #lobby.br #rain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#lobby.br #retrowall { object-fit: cover; image-rendering: pixelated; filter: brightness(.62) saturate(.9); }
#lobby.br #rain { opacity: .9; }
#lobby.br .br-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 45%, rgba(5,13,11,.75) 100%); }
#lobby.br .br-panel { position: absolute; left: calc(5vw + var(--sal)); top: 50%; transform: translateY(-50%); width: min(430px, 42vw); padding: 28px 30px 26px; background: rgba(18,59,52,.92); border: 1px solid rgba(236,203,132,.35); box-shadow: 0 18px 60px rgba(0,0,0,.5); }
#lobby.br h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); margin: 8px 0 6px; }
#lobby.br .stats { margin-top: 22px; font-size: 1rem; gap: 7px 20px; max-width: none; }
#lobby.br .loadbar { margin-top: 24px; }
#lobby.br .br-count { position: absolute; right: calc(5vw + var(--sar)); top: calc(88px + var(--sat)); text-align: right; text-shadow: 0 2px 16px rgba(0,0,0,.8); }
#lobby.br .br-count span { display: block; font-weight: 700; font-size: 1rem; color: #ECCB84; }
#lobby.br .br-count b { display: block; font-size: clamp(4rem, 9vw, 7.5rem); font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; }
#lobby.br .br-feed { position: absolute; right: calc(5vw + var(--sar)); bottom: calc(5vh + var(--sab)); list-style: none; padding: 0; text-align: right; font-weight: 700; font-size: .95rem; line-height: 1.7; }
#lobby.br .br-feed li { background: rgba(5,13,11,.72); padding: 1px 10px; margin-top: 4px; width: fit-content; margin-left: auto; }
#lobby.br .br-feed li:first-child { color: #ECCB84; }
#lobby.br .br-feed li:nth-child(n+4) { opacity: .55; }
#lobby.br .br-skip { position: absolute; left: calc(5vw + var(--sal)); bottom: calc(3vh + var(--sab)); font-size: .85rem; font-weight: 600; color: #B9C9C6; }
@media (max-width: 720px) {
  #lobby.br .br-panel { left: calc(16px + var(--sal)); right: calc(16px + var(--sar)); width: auto; top: auto; bottom: calc(16px + var(--sab)); transform: none; padding: 20px 20px 18px; }
  #lobby.br .stats { margin-top: 14px; font-size: .95rem; gap: 4px 16px; }
  #lobby.br .loadbar { margin-top: 16px; }
  #lobby.br .br-count { left: calc(16px + var(--sal)); right: auto; top: calc(16px + var(--sat)); text-align: left; }
  #lobby.br .br-count b { font-size: 4.2rem; }
  #lobby.br .br-feed { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #lobby.br .br-panel { top: calc(12px + var(--sat)); bottom: auto; max-height: calc(100% - 24px); transform: none; width: min(400px, 52vw); padding: 14px 18px; overflow: hidden; }
  #lobby.br h1 { font-size: 1.5rem; margin: 2px 0; }
  #lobby.br .stats { margin-top: 8px; font-size: .85rem; gap: 1px 14px; }
  #lobby.br .loadbar { margin-top: 10px; }
  #lobby.br .br-count { top: calc(64px + var(--sat)); left: auto; right: calc(20px + var(--sar)); text-align: right; }
  #lobby.br .br-count b { font-size: 3.4rem; }
  #lobby.br .br-feed, #lobby.br .br-skip { display: none; }
  body .intro-map canvas { width: 84px; height: 84px; }
  body .intro-banner { top: calc(12px + var(--sat)); }
}

/* vliegtuig: genre-HUD met minikaart, meldingen in beeld, een kloppende springknop */
.intro-map { position: fixed; left: calc(18px + var(--sal)); top: calc(18px + var(--sat)); z-index: 5; pointer-events: none; font-weight: 700; font-size: .8rem; color: #F7F4EC; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.intro-map canvas { display: block; width: 132px; height: 132px; border: 2px solid rgba(247,244,236,.85); background: #123B34; margin-bottom: 6px; }
.intro-banner { position: fixed; left: 0; right: 0; top: calc(16vh + var(--sat)); z-index: 5; text-align: center; pointer-events: none; font-weight: 800; font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: -0.01em; color: #fff; -webkit-text-stroke: 5px #123B34; paint-order: stroke fill; padding: 0 20px; }
.intro-banner.go { color: #ECCB84; }
.intro-banner.pop { animation: introPop .35s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes introPop { from { transform: scale(1.35); opacity: 0; } to { transform: none; opacity: 1; } }
body.intro-jump #opts button.big { animation: introPulse 1s ease-in-out infinite; }
/* alleen kleur en schaduw, geen schaal: de knop blijft op zijn plek (ook voor testscripts) */
@keyframes introPulse { 50% { background-color: #d08a22; box-shadow: 0 5px 0 #6b430c, 0 10px 28px rgba(0,0,0,.4); } }
body.intro-jump #hint { top: auto; bottom: calc(14vh - 34px + var(--sab)); bottom: calc(14svh - 34px + var(--sab)); padding: 0 20px; }
@media (max-width: 600px) { .intro-map canvas { width: 84px; height: 84px; } .intro-banner { top: calc(130px + var(--sat)); } }

/* val: "Ik val" wordt groter en komt steeds sneller */
.intro-fall { position: fixed; left: 0; right: 0; top: 42%; z-index: 5; text-align: center; pointer-events: none; font-weight: 800; letter-spacing: -0.02em; color: #F7F4EC; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.intro-fall.pop { animation: introFall .9s ease-out both; }
@keyframes introFall { 0% { transform: scale(.7); opacity: 0; } 15% { transform: scale(1.04); opacity: 1; } 75% { opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.intro-jump #opts button.big, .intro-banner.pop { animation: none; }
  .intro-fall.pop { animation-name: introFallRustig; }
}
@keyframes introFallRustig { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* creditsscherm: bronnen van geluid en muziek, opgebouwd uit het manifest */
#credits { width: min(760px, calc(100% - 32px)); max-height: min(88vh, 900px); max-height: min(88svh, 900px); padding: 0; border: 1px solid rgba(247,244,236,.18); border-radius: 6px; background: var(--ink); color: var(--on-ink); box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; user-select: text; -webkit-user-select: text; }
#credits[open] { display: flex; flex-direction: column; }
#credits::backdrop { background: rgba(5,13,11,.72); }
.credits-kop { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(247,244,236,.14); }
.credits-kop h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; }
#creditsdicht { background: var(--on-ink); color: var(--ink); font-weight: 700; padding: 10px 16px; border-radius: 4px; min-height: 44px; }
#creditsdicht:hover { background: #fff; }
.credits-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; -webkit-overflow-scrolling: touch; }
.credits-body:focus-visible { outline: 3px solid var(--on-ink); outline-offset: -3px; }
.credits-noot { font-size: .95rem; line-height: 1.5; color: #B9C9C6; max-width: 62ch; }
#creditslijst section { margin-top: 22px; }
#creditslijst h3 { font-size: 1.05rem; font-weight: 800; color: #ECCB84; margin-bottom: 8px; }
.credits-groepen { list-style: none; padding: 0; }
.credits-groepen li { padding: 12px 0; border-top: 1px solid rgba(247,244,236,.1); font-size: .95rem; line-height: 1.5; color: #D9E2DF; overflow-wrap: anywhere; }
.credits-groepen li p + p { margin-top: 2px; }
.credits-titel { font-weight: 700; color: var(--on-ink); }
.credits-ids { font-size: .85rem; color: #9FB8B3; }
#credits a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236,203,132,.7); }
#credits a:hover { text-decoration-color: #ECCB84; }
#credits a:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 2px; border-radius: 2px; }
#creditslijst > .credits-noot { margin-top: 22px; }
@media (max-width: 480px) {
  #credits { width: 100%; max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
  .credits-kop { padding: calc(14px + var(--sat)) 16px 12px; }
  .credits-body { padding: 14px 16px calc(24px + var(--sab)); }
}

/* v1: titelscherm. De berg staat er al achter; Start is het eerste gebaar (vanaf dan klinkt het geluid). */
#titel { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: calc(8vh + var(--sat)) calc(7vw + var(--sar)) calc(9vh + var(--sab)) calc(7vw + var(--sal)); padding-bottom: calc(9svh + var(--sab)); transition: opacity .6s ease, transform .6s ease; }
#titel.weg { opacity: 0; transform: translateY(12px); pointer-events: none; }
#titel h1 { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: .95; text-shadow: 0 2px 30px rgba(8,30,26,.45); }
.titel-uitleg { margin-top: 14px; max-width: 30ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 600; line-height: 1.35; color: #EAF1EE; text-shadow: 0 1px 14px rgba(8,30,26,.6); }
#startknop { margin-top: 28px; background: var(--ochre); color: #fff; font-weight: 800; font-size: 1.35rem; padding: 17px 46px; border-radius: 4px; box-shadow: 0 5px 0 #6b430c; transition: transform .08s, box-shadow .08s, background-color .15s; }
#startknop:hover { background: #cf861f; transform: translateY(-2px); box-shadow: 0 7px 0 #6b430c; }
#startknop:active { transform: translateY(3px); box-shadow: 0 2px 0 #6b430c; }
.titel-noot { margin-top: 16px; font-size: .95rem; font-weight: 600; color: #CFE0DB; text-shadow: 0 1px 10px rgba(8,30,26,.6); }
.titel-versie { position: absolute; right: calc(20px + var(--sar)); bottom: calc(16px + var(--sab)); font-size: .8rem; font-weight: 700; color: rgba(247,244,236,.7); }
.intro-scrim.titel { background: linear-gradient(to top, rgba(18,59,52,.88) 0%, rgba(18,59,52,.52) 36%, rgba(18,59,52,0) 70%); }
@media (max-height: 500px) and (orientation: landscape) {
  #titel { padding-bottom: calc(18px + var(--sab)); }
  #titel h1 { font-size: 2.4rem; }
  .titel-uitleg { margin-top: 6px; font-size: 1rem; }
  #startknop { margin-top: 12px; padding: 12px 34px; font-size: 1.15rem; }
  .titel-noot { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { #titel, #startknop { transition: none; } }

/* v1: lobby. Key art van de drop boven in het paneel, zoals op een laadscherm. */
#lobby.br .br-panel { overflow: hidden; }
#lobby.br .br-art { height: 150px; margin: -28px -30px 20px; background: #0b1a3a url(../assets/beeld/key-drop.webp) 78% 46% / 150% auto no-repeat; border-bottom: 1px solid rgba(236,203,132,.35); }
@media (max-width: 720px) { #lobby.br .br-art { height: 96px; margin: -20px -20px 14px; background-size: 135% auto; } }
@media (max-height: 500px) and (orientation: landscape) { #lobby.br .br-art { display: none; } }
@media (max-height: 760px) and (min-width: 721px) { #lobby.br .br-art { height: 104px; } }

/* v1: eerste lading. Tot de eerste scene er staat een rustig woord op de huiskleur. */
#laden { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: var(--ink); color: #B9C9C6; font-weight: 700; font-size: 1.05rem; }
/* v1: eindscherm. Losse scenes direct openen, klein en rustig onder de knoppen. */
.end-scenes { margin-top: 26px; max-width: 34rem; }
.end-scenes p { font-size: .85rem; font-weight: 700; color: #7FA39D; margin-bottom: 6px; }
#scenelijst { display: flex; flex-wrap: wrap; gap: 2px 14px; }
#scenelijst button { background: transparent; color: #B9C9C6; font-weight: 600; font-size: .95rem; padding: 7px 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(185,201,198,.35); }
#scenelijst button:hover { color: #fff; text-decoration-color: #ECCB84; }
#end.slot-door .end-scenes { opacity: 0; animation: slotIn .45s ease-out forwards; animation-delay: var(--d, 0s); }
#end .end-brand { margin-top: 5vh; }
@media (prefers-reduced-motion: reduce) { #end.slot-door .end-scenes { animation: none; opacity: 1; } }
