/* Halloween in Koudenhoven — twee thema's: .kids (19–20 uur) en .scary (vanaf 20 uur) */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Fredoka', system-ui, sans-serif; color: var(--text); background: #000;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
body.loading .view { visibility: hidden; }

/* ---------- themakleuren ---------- */
body.kids {
  --text: #f4ecff; --muted: rgba(244, 236, 255, .65);
  --bg: #1a0b2e; --panel: #1b0c30; --panel-2: #2a1147; --line: rgba(255, 178, 87, .28);
  --accent: #ff8a1f; --accent-2: #ffb257; --accent-ink: #2a0f00; --good: #6bdc8b; --good-ink: #0d2a16;
  --title-font: 'Creepster', cursive; --body-font: 'Fredoka', sans-serif;
  /* kaart */
  --m-bg: #1d0f33; --m-b: #34204f; --m-be: #45306a; --m-s: #5a4185; --m-se: #2a1846; --m-m: #6e4f9e;
  --m-g: #1f3a2e; --m-w: #1f3563; --m-p: #8d74b8; --m-lbl: #d7c6f2; --m-dim: rgba(8, 3, 16, .55); --m-edge: #ff8a1f;
  --route: #ff8a1f; --you: #4fc3ff;
}
body.scary {
  --text: #e9f5e4; --muted: rgba(233, 245, 228, .6);
  --bg: #050606; --panel: #0b0d0b; --panel-2: #0f130f; --line: #1d3a0c;
  --accent: #9dff5c; --accent-2: #9dff5c; --accent-ink: #071300; --good: #9dff5c; --good-ink: #071300;
  --blood: #d0101c; --blood-2: #ff4655;
  --title-font: 'Nosifer', cursive; --body-font: 'Rubik', sans-serif;
  --m-bg: #060807; --m-b: #131815; --m-be: #1c241e; --m-s: #222b25; --m-se: #0a0d0b; --m-m: #2a332d;
  --m-g: #0c1c0e; --m-w: #0c2a0e; --m-p: #3c5a36; --m-lbl: #7fa276; --m-dim: rgba(0, 0, 0, .6); --m-edge: #9dff5c;
  --route: #d0101c; --you: #9dff5c;
  font-family: 'Rubik', system-ui, sans-serif;
}

.view { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; overflow: hidden; background: var(--bg); }
body.kids .view { background: radial-gradient(ellipse at 70% 0%, #3b1d63 0%, #1a0b2e 55%, #0b0614 100%); }

/* ---------- basiskaart (SVG) ---------- */
.basemap .bg { fill: var(--m-bg); }
.basemap .g { fill: var(--m-g); }
.basemap .w { fill: var(--m-w); }
.basemap .b { fill: var(--m-b); stroke: var(--m-be); stroke-width: .6; }
.basemap .p { fill: none; stroke: var(--m-p); stroke-width: 1; stroke-dasharray: 2 2.5; opacity: .45; }
.basemap .se { fill: none; stroke: var(--m-se); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.basemap .s { fill: none; stroke: var(--m-s); stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; }
.basemap .m { fill: none; stroke: var(--m-m); stroke-width: 10; stroke-linecap: round; }
.basemap .dim { fill: var(--m-dim); }
.basemap .edge { fill: none; stroke: var(--m-edge); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .55; }
.basemap .lbl { fill: var(--m-lbl); font: 600 8.5px var(--body-font); letter-spacing: .6px; text-anchor: middle; stroke: var(--m-bg); stroke-width: 2.5px; paint-order: stroke; }
.basemap .kerkhof { display: none; }
body.scary .basemap .kerkhof { display: inline; }
.basemap .kerkhof text { fill: #7fa276; font: 500 8.5px 'Rubik'; letter-spacing: 1.5px; text-anchor: middle; }
body.scary .basemap .w { filter: url(#glow); }

.leaflet-container { background: var(--m-bg); font-family: var(--body-font); }
.leaflet-control-attribution { background: rgba(0, 0, 0, .45) !important; color: rgba(255, 255, 255, .55) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: rgba(255, 255, 255, .75) !important; }
.leaflet-bottom { bottom: calc(250px + var(--safe-bottom)); }

/* route */
.route-todo { stroke: var(--route); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }
.route-done { stroke: var(--good); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
body.scary .route-todo { stroke-dasharray: none; stroke-width: 5; filter: drop-shadow(0 0 4px #ff2433); }
body.scary .route-done { stroke: #7a0a12; opacity: .9; }
.drip i { display: block; width: 5px; height: 16px; margin-left: .5px; background: var(--blood); border-radius: 2px 2px 3px 3px / 2px 2px 6px 6px; opacity: .9; animation: drip 3.5s ease-in infinite; transform-origin: top; }
@keyframes drip { 0%, 60% { transform: scaleY(.6); } 85% { transform: scaleY(1.15); } 100% { transform: scaleY(.6); } }

/* huizen */
.hpin { background: none; border: 0; }
.pin { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 16px var(--body-font); transition: transform .15s; }
.pin:active { transform: scale(.92); }
body.kids .pin { background: var(--accent); color: var(--accent-ink); border: 3px solid #1d0f33; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
body.kids .pin.st-done { background: var(--good); color: var(--good-ink); }
body.kids .pin.st-next { box-shadow: 0 0 0 4px rgba(255, 138, 31, .35), 0 0 18px rgba(255, 138, 31, .8); animation: pulse 1.6s ease-in-out infinite; }
body.scary .pin { background: #16040a; color: var(--blood-2); border: 2.5px solid var(--blood); box-shadow: 0 0 14px rgba(208, 16, 28, .55); }
body.scary .pin.st-done { border-color: var(--good); box-shadow: 0 0 14px rgba(157, 255, 92, .5); font-size: 15px; }
body.scary .pin.st-next { animation: pulse 1.2s ease-in-out infinite; box-shadow: 0 0 22px rgba(255, 36, 51, .95); }
body.kids .pin.contest:not(.st-done) { background: #e6249c; color: #fff; border-color: #ffd23f; box-shadow: 0 0 0 2px #ffd23f, 0 2px 10px rgba(230, 36, 156, .8); }
body.scary .pin.contest:not(.st-done) { background: #ffd23f; color: #16040a; border-color: #ffd23f; box-shadow: 0 0 16px rgba(255, 210, 63, .8); }
.pdf-btn { display: flex; align-items: center; justify-content: center; height: 44px; margin-top: 10px; border-radius: 14px; font-weight: 700; font-size: 15px; text-decoration: none; color: inherit; border: 2px solid currentColor; }
@media (max-height: 720px) { #btn-pdf, .legend { display: none; } }
.pin-stem { stroke: #fff; stroke-width: 1.5; stroke-opacity: .75; fill: none; }
.legend { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; opacity: .95; position: relative; z-index: 3; }
.legend i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #ffd23f; flex: none; }
body.kids .legend i { background: #e6249c; }
body.scary .legend i { background: #ffd23f; }
.pin u { pointer-events: none; position: absolute; bottom: -8px; left: -8px; text-decoration: none; font-size: 15px; line-height: 1; }
.pin em { pointer-events: none; position: absolute; top: -12px; right: -12px; font-style: normal; font-size: 17px; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.start-pin { background: none; border: 0; }
.start-pin i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--good); border: 2px solid var(--m-bg); }
.start-pin b { position: absolute; left: 17px; top: -9px; font: 700 12px var(--body-font); color: var(--good); text-shadow: 0 0 3px var(--m-bg), 0 0 3px var(--m-bg); }
.you { background: none; border: 0; }
.you i { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--you); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--you) 30%, transparent); }
.you-acc { fill: var(--you); fill-opacity: .12; stroke: var(--you); stroke-opacity: .4; stroke-width: 1; }

/* ---------- AFTELLEN ---------- */
.sky { position: absolute; inset: 0; pointer-events: none; }
.stars { position: absolute; inset: 0; opacity: .8; background-image:
  radial-gradient(1.5px 1.5px at 30px 60px, #fff, transparent), radial-gradient(1px 1px at 120px 30px, #fff, transparent),
  radial-gradient(1.5px 1.5px at 200px 90px, #ffe9c2, transparent), radial-gradient(1px 1px at 330px 150px, #fff, transparent),
  radial-gradient(1px 1px at 60px 180px, #fff, transparent), radial-gradient(1.5px 1.5px at 260px 40px, #fff, transparent),
  radial-gradient(1px 1px at 170px 200px, #fff, transparent), radial-gradient(1px 1px at 360px 260px, #fff, transparent); animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .45; } }
.moon { position: absolute; top: calc(118px + var(--safe-top)); right: 26px; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #ffd98a 60%, #e8b45a);
  box-shadow: 0 0 40px 10px rgba(255, 210, 120, .35), 0 0 120px 40px rgba(255, 170, 60, .15); }
.bat { position: absolute; font-size: 22px; filter: brightness(0); animation: fly 6s ease-in-out infinite; }
.b1 { top: calc(150px + var(--safe-top)); right: 150px; }
.b2 { top: calc(200px + var(--safe-top)); right: 70px; font-size: 15px; animation-delay: -2s; }
.b3 { top: calc(110px + var(--safe-top)); right: 120px; font-size: 13px; animation-delay: -4s; }
@keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(-14px, -10px) rotate(8deg); } }
.cd-wrap { position: absolute; inset: 0; overflow-y: auto; padding: calc(48px + var(--safe-top)) 18px calc(24px + var(--safe-bottom)); }
.kicker { font: 600 14px var(--body-font); letter-spacing: 4px; text-transform: uppercase; color: var(--accent-2); padding-left: 6px; }
.title-kids { font: 400 clamp(40px, 13vw, 54px)/1 'Creepster'; color: var(--accent); text-shadow: 0 0 18px rgba(255, 138, 31, .55), 0 4px 0 #7a2e00; margin: 8px 0 0 4px; letter-spacing: 1px; }
.card { background: rgba(40, 18, 70, .72); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(6px); }
body.scary .card { background: #0c0f0c; border-color: #1c261a; }
.cd-card { margin-top: 92px; padding: 16px 12px; position: relative; }
.cd-lead { text-align: center; font-size: 16px; }
.digits { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.digit { width: 88px; text-align: center; }
.digit b { display: block; height: 74px; font: 400 50px/74px 'Creepster'; color: var(--accent-2); background: linear-gradient(180deg, #2c1150, #170830); border-radius: 16px; border: 1px solid rgba(255, 178, 87, .35); box-shadow: inset 0 -30px 30px rgba(0, 0, 0, .35), 0 0 22px rgba(255, 138, 31, .25); }
.digit small { display: block; margin-top: 6px; font-size: 13px; opacity: .7; }
.locked { position: relative; height: 124px; border-radius: 20px; overflow: hidden; margin-top: 18px; }
.locked-map svg { width: 100%; height: 124px; filter: blur(3px); transform: scale(1.1); }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(11, 6, 20, .45); text-align: center; line-height: 1.3; }
.lock-ic { font-size: 28px; animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.lock span { font-size: 13px; opacity: .8; }
.timeline { margin-top: 12px; padding: 4px 18px; }
.tl { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.tl:last-child { border-bottom: 0; }
.tl time { font: 700 16px var(--body-font); color: var(--accent-2); width: 50px; flex: none; }
.tl .ic { font-size: 22px; width: 28px; text-align: center; flex: none; }
.tl p { font-size: 15px; line-height: 1.25; }
.tl p small { display: block; opacity: .6; font-size: 12.5px; }
.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 18px; font: 600 18px var(--body-font); }
.btn-ghost { border: 2px solid rgba(255, 178, 87, .5); color: #ffcf96; margin-top: 12px; }
.btn-main { background: linear-gradient(180deg, #ffa53d, #ff7a00); color: var(--accent-ink); box-shadow: 0 6px 0 #a34700, 0 10px 30px rgba(255, 122, 0, .35); }
body.scary .btn-main { background: var(--accent); box-shadow: 0 6px 0 #3c7a14, 0 10px 30px rgba(157, 255, 92, .25); font-weight: 700; }
.btn-main:disabled { filter: grayscale(1) brightness(.6); box-shadow: none; }
.btn-main:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 #a34700; }

/* ---------- APP ---------- */
.map { position: absolute; inset: 0; z-index: 0; }
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 500; padding: calc(16px + var(--safe-top)) 18px 26px; pointer-events: none; }
body.kids .topbar { background: linear-gradient(180deg, rgba(11, 6, 20, .95) 45%, rgba(11, 6, 20, 0)); }
body.scary .topbar { background: linear-gradient(180deg, rgba(5, 6, 6, .98) 50%, rgba(5, 6, 6, 0)); padding-top: calc(52px + var(--safe-top)); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font: 600 13px var(--body-font); }
body.kids .pill { background: var(--accent); color: var(--accent-ink); }
body.scary .pill { background: #1a0306; color: var(--blood-2); border: 1px solid #7a0a12; }
.topbar h1 { margin-top: 8px; line-height: 1.05; }
body.kids .topbar h1 { font: 400 clamp(22px, 7.4vw, 30px)/1.05 'Creepster'; color: var(--accent-2); letter-spacing: .5px; }
body.scary .topbar h1 { font: 400 clamp(20px, 6.6vw, 27px)/1.15 'Nosifer'; color: var(--blood); text-shadow: 0 0 14px rgba(208, 16, 28, .7), 0 2px 0 #3d0006; }
.topbar .sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
body.scary .topbar .sub { color: var(--accent); opacity: .85; }

.locate { position: absolute; right: 14px; bottom: calc(262px + var(--safe-bottom)); z-index: 600; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.locate.on { box-shadow: 0 0 0 3px var(--you), 0 4px 14px rgba(0, 0, 0, .5); }

.sheet { position: absolute; left: 0; right: 0; bottom: calc(66px + var(--safe-bottom)); z-index: 550; border-radius: 26px 26px 0 0; padding: 10px 18px 16px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -12px 40px rgba(0, 0, 0, .6); }
body.scary .sheet { border-top: 2px solid #3c7a14; box-shadow: 0 -10px 40px rgba(124, 255, 58, .12); }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 0 auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sheet-head b { font-size: 18px; }
.sheet-head span { color: var(--muted); font-size: 14px; white-space: nowrap; }
body.scary .sheet-head span { color: var(--blood-2); }
.progress { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 8px 0 12px; }
.progress i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .6s; }
body.kids .progress i { background: linear-gradient(90deg, #ff7a00, #ffc46b); }
body.scary .progress i { background: linear-gradient(90deg, #7a0a12, #ff2433); box-shadow: 0 0 12px #ff2433; }
.next { display: flex; width: 100%; text-align: left; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px; }
body.kids .next { background: rgba(255, 138, 31, .12); border: 1px solid rgba(255, 138, 31, .35); }
body.scary .next { background: rgba(208, 16, 28, .08); border: 1px solid rgba(208, 16, 28, .45); }
.next .num, .row .num, .vnum { border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; }
.next .num { width: 46px; height: 46px; font-size: 18px; }
body.kids .next .num, body.kids .vnum { background: var(--accent); color: var(--accent-ink); }
body.scary .next .num, body.scary .row .num, body.scary .vnum { background: #16040a; border: 2px solid var(--blood); color: var(--blood-2); box-shadow: 0 0 14px rgba(208, 16, 28, .45); }
.next .txt { flex: 1; min-width: 0; line-height: 1.25; }
.next .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next .txt small { display: block; color: var(--muted); font-size: 13px; }
.mini-btn { padding: 10px 14px; border-radius: 14px; font: 600 14px var(--body-font); background: var(--accent); color: var(--accent-ink); flex: none; }

.navbar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 700; display: flex; justify-content: space-around; padding: 6px 0 calc(8px + var(--safe-bottom)); background: #12071f; border-top: 1px solid rgba(255, 255, 255, .06); }
body.scary .navbar { background: #040504; border-top-color: #1d3a0c; }
.navbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; opacity: .55; min-width: 70px; padding: 4px; }
.navbar button span { font-size: 22px; }
.navbar button.on { opacity: 1; color: var(--accent-2); }

/* panelen (scores / uitslag / info) */
.panel { position: absolute; inset: 0; bottom: calc(66px + var(--safe-bottom)); z-index: 650; overflow-y: auto; background: var(--bg); padding: calc(78px + var(--safe-top)) 18px 24px; }
body.kids .panel { background: radial-gradient(ellipse at 70% 0%, #2d1650 0%, #1a0b2e 60%); }
body.scary .panel { background: radial-gradient(ellipse 80% 40% at 50% 100%, rgba(124, 255, 58, .08), transparent), #050606; }
.panel-title { font: 400 26px/1.2 var(--title-font); color: var(--accent); }
body.scary .panel-title { color: var(--blood); text-shadow: 0 0 14px rgba(208, 16, 28, .6); font-size: 24px; }
.panel-sub { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.warn { margin-bottom: 12px; padding: 11px 14px; border-radius: 14px; font-size: 14px; }
body.kids .warn { background: rgba(255, 138, 31, .12); border: 1px solid rgba(255, 138, 31, .35); color: #ffd7aa; }
body.scary .warn { background: #1a0306; border: 1px solid #7a0a12; color: #ffb3b9; }
.row { display: flex; width: 100%; text-align: left; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; margin-bottom: 9px; }
body.kids .row { background: rgba(40, 18, 70, .72); border: 1px solid var(--line); }
body.scary .row { background: #0c0f0c; border: 1px solid #1c261a; }
.row .num { width: 40px; height: 40px; }
body.kids .row .num { background: var(--accent); color: var(--accent-ink); }
.row .txt { flex: 1; min-width: 0; line-height: 1.25; font-size: 15px; }
.row .txt small { display: block; color: var(--muted); font-size: 12.5px; }
.row .score { font: 400 26px var(--title-font); color: var(--accent); min-width: 56px; text-align: right; }
body.scary .row .score { color: #9dff5c; text-shadow: 0 0 10px rgba(157, 255, 92, .6); }
.row .score.add { font: 600 13px var(--body-font); text-shadow: none; }
.row .score.none { opacity: .4; }
.row.todo { border-style: dashed !important; }
.row.unseen { opacity: .7; }
.row.fav { border-color: var(--accent) !important; box-shadow: 0 0 18px rgba(255, 138, 31, .3); }
body.scary .row.fav { border-color: var(--blood) !important; box-shadow: 0 0 20px rgba(208, 16, 28, .3); }
.crown { font-size: 11px; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
body.scary .crown { background: var(--blood); color: #fff; }
.empty, .muted { color: var(--muted); }
.small { font-size: 12.5px; }
.info-card { padding: 16px 18px; margin-top: 12px; line-height: 1.45; }
.info-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--accent-2); }
.info-card.small { font-size: 13px; color: var(--muted); }
.info-card.small p + p { margin-top: 6px; }
.info-card a { color: inherit; }
.how { padding-left: 20px; }
.how li { margin: 4px 0; }

/* uitslag */
.counting { text-align: center; padding-top: 40px; }
.counting p { margin-top: 10px; }
.big-ic { font-size: 64px; animation: wiggle 3s infinite; }
.cd-small { font: 400 56px 'Nosifer'; color: var(--accent); margin: 20px 0; text-shadow: 0 0 20px rgba(157, 255, 92, .5); }
.winner { text-align: center; }
.w-kicker { letter-spacing: 4px; font-size: 13px; color: var(--accent); }
.trophy { font-size: 64px; margin-top: 6px; filter: drop-shadow(0 0 20px rgba(255, 210, 74, .8)); animation: pulse 2s ease-in-out infinite; }
.w-title { font: 400 22px/1.2 'Nosifer'; color: #ffd24a; text-shadow: 0 0 18px rgba(255, 210, 74, .6), 0 2px 0 #5a3d00; margin-top: 6px; }
.w-name { font: 700 28px var(--body-font); margin-top: 12px; }
.w-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.w-meta b { color: var(--accent); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 26px 0 10px; }
.pod { width: 31%; max-width: 120px; }
.pod .who { font-size: 13px; line-height: 1.2; margin-bottom: 8px; }
.pod .who b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.pod .blk { border-radius: 14px 14px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 10px; font: 400 32px 'Nosifer'; }
.p1 .blk { height: 170px; background: linear-gradient(180deg, #ffd24a, #b8860b); color: #3a2400; box-shadow: 0 0 50px rgba(255, 210, 74, .45); }
.p2 .blk { height: 118px; background: linear-gradient(180deg, #d9e2d5, #7d8a78); color: #1d2419; }
.p3 .blk { height: 86px; background: linear-gradient(180deg, #d98a4a, #7a4214); color: #2a1200; }
.pod .blk small { font-size: 16px; margin-top: 4px; }
.all-title { margin: 26px 0 10px; font-size: 17px; color: var(--accent); }
.ranking { text-align: left; }
.rrow { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #0c0f0c; border: 1px solid #1c261a; margin-bottom: 6px; font-size: 14.5px; }
.rrow .rk { font-weight: 700; color: var(--accent); text-align: center; }
.rrow .ra { font-weight: 700; }
.rrow .rv { color: var(--muted); font-size: 12.5px; }
.winner .muted { margin-top: 14px; }

/* ---------- SPEL ---------- */
.btn-game { margin-top: 12px; background: linear-gradient(180deg, #4b6bff, #2b3fd0); color: #fff; box-shadow: 0 6px 0 #1b2690, 0 10px 30px rgba(75, 107, 255, .35); }
.game { z-index: 1500; display: flex; flex-direction: column; background: #0b0614 !important; user-select: none; -webkit-user-select: none; }
body.scary .game { background: #050606 !important; }
.g-hud { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 4px; }
.g-hud > div { line-height: 1.05; }
.g-hud small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.g-hud b { font: 400 22px 'Creepster'; color: var(--accent-2); }
body.scary .g-hud b { font-family: 'Nosifer'; font-size: 16px; color: var(--accent); }
.g-hud button { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 17px; flex: none; }
.g-hud .g-lives { flex: 1; text-align: right; font-size: 16px; letter-spacing: 1px; }
.g-title { text-align: center; font: 400 26px 'Creepster'; color: var(--accent); letter-spacing: 1px; text-shadow: 0 0 14px rgba(255, 138, 31, .5); }
body.scary .g-title { font-family: 'Nosifer'; font-size: 20px; color: var(--blood); text-shadow: 0 0 14px rgba(208, 16, 28, .7); }
#g-canvas { flex: 1; width: 100%; min-height: 0; display: block; }
.g-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; background: rgba(0, 0, 0, .72); border: 2px solid var(--accent); border-radius: 20px; padding: 16px 24px; min-width: 220px; pointer-events: auto; }
.g-msg > b { display: block; font: 400 32px 'Creepster'; color: var(--accent-2); letter-spacing: 2px; }
body.scary .g-msg > b { font-family: 'Nosifer'; font-size: 24px; color: var(--blood-2); }
.g-msg span { display: block; margin-top: 4px; color: var(--text); }
.g-btns { display: grid; gap: 8px; margin-top: 14px; }
.g-btns .btn { height: 48px; font-size: 17px; margin: 0; }
.g-foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 12px calc(10px + var(--safe-bottom)); }

/* spel: menu, toplijst, power-ups */
.g-fx { text-align: center; font: 600 13px var(--body-font); color: #fff6a0; min-height: 18px; white-space: pre; }
.game #g-canvas, .game .g-hud, .game .g-title, .game .g-fx, .game .g-foot, .g-msg:not(.wide) { touch-action: none; }
.g-msg.wide { touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: rgba(8, 3, 16, .94); width: min(92%, 380px); max-height: calc(100% - 190px); top: calc(50% + 35px); overflow-y: auto; padding: 16px 18px; }
.g-msg .g-btns.two { grid-template-columns: 1fr 1fr; }
.g-howto { margin-top: 14px; text-align: left; font-size: 13px; line-height: 1.55; color: var(--muted); }
.g-howto b { display: block; font: 600 14px var(--body-font); color: var(--accent-2); letter-spacing: 0; margin-bottom: 2px; }
.g-lines { margin-top: 10px; font-size: 16px; line-height: 1.6; }
.g-lines b { font: 700 16px var(--body-font); color: var(--accent); display: inline; letter-spacing: 0; }
.g-save { display: grid; gap: 8px; margin-top: 14px; text-align: left; }
.g-save label { font-size: 13px; color: var(--muted); }
.g-save input { font: 600 17px var(--body-font); padding: 11px 12px; border-radius: 12px; border: 2px solid var(--accent); background: rgba(0, 0, 0, .5); color: var(--text); width: 100%; }
.g-save .btn { height: 48px; font-size: 16px; }
.g-save label small { display: block; font-size: 11.5px; opacity: .8; }
.g-board .g-st { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(157, 255, 92, .18); color: #9dff5c; }
#g-street { font: 600 16px var(--body-font); padding: 11px 10px; border-radius: 12px; border: 2px solid var(--accent); background: rgba(0, 0, 0, .5); color: var(--text); width: 100%; }
#g-street option { color: #000; }
.g-err { color: #ff9b9b; font-size: 13px; min-height: 1em; text-align: center; }
.g-board { list-style: none; margin-top: 12px; text-align: left; display: grid; gap: 5px; }
.g-board li { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 15px; }
.g-board li.me { background: rgba(255, 138, 31, .25); outline: 2px solid var(--accent); }
.g-board li.empty { display: block; text-align: center; color: var(--muted); }
.g-board .rk { text-align: center; font-weight: 700; }
.g-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-board .lv { font-size: 11px; color: var(--muted); }
.g-board .sc { font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.g-me { margin-top: 10px; font-size: 14px; }
.g-me b { display: inline; font: 700 15px var(--body-font); color: var(--accent); letter-spacing: 0; }
.g-loading { margin-top: 10px; color: var(--muted); }

/* op het beginscherm zetten */
.btn-install { margin-top: 10px; border: 2px solid var(--accent); color: var(--accent-2); background: rgba(255, 138, 31, .12); }
.info-card .btn-install { margin-top: 10px; height: 48px; font-size: 16px; }
.vote.install { z-index: 1960; }
#install-dim { z-index: 1950; }
.inst-head { display: flex; gap: 14px; align-items: center; margin-top: 4px; padding-right: 36px; }
.inst-head img { border-radius: 15px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); flex: none; }
.inst-head h3 { font: 600 20px/1.2 var(--body-font); }
.inst-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.inst-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 18px 0 12px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.inst-tabs button { padding: 9px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.inst-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.inst-steps { list-style: none; display: grid; gap: 10px; }
.inst-steps li { display: flex; gap: 12px; align-items: center; font-size: 16px; line-height: 1.35; }
.inst-steps li > span { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.inst-steps b { color: var(--accent-2); }
.ios-share { width: 20px; height: 20px; vertical-align: -4px; color: #4da3ff; }
.install .hint { margin-top: 14px; }

/* in de agenda zetten */
#cal-dim { z-index: 1950; }
.cal-title { font: 600 22px var(--body-font); margin-top: 4px; }
.cal-when { color: var(--muted); font-size: 15px; margin-top: 4px; }
.cal-opts { display: grid; gap: 9px; margin-top: 16px; }
.cal-opt { display: flex; gap: 14px; align-items: center; padding: 13px 14px; border-radius: 16px; text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.cal-opt span { font-size: 26px; width: 34px; text-align: center; flex: none; }
.cal-opt b { display: block; font-size: 16px; }
.cal-opt small { display: block; color: var(--muted); font-size: 13px; }
.cal-opt.best { border: 2px solid var(--accent); background: rgba(255, 138, 31, .14); }
.cal-opt.best b::after { content: '  · aanbevolen'; font-weight: 500; font-size: 12px; color: var(--accent-2); }

/* geheim level */
.btn-secret { background: linear-gradient(180deg, #3b2a6b, #1c1238); color: #ffe9a8; border: 2px solid #ffd24a; box-shadow: 0 0 16px rgba(255, 210, 74, .35); font-weight: 700; }
.g-lock { margin: 4px auto 0; font-size: 14px; color: #ffe9a8; }
.g-story { margin-top: 10px; font-size: 15px; line-height: 1.4; font-style: italic; color: #e8dcff; }
.g-gold { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 210, 74, .15); border: 1px solid #ffd24a; font-size: 14px; line-height: 1.4; }
.g-gold b { display: inline !important; font: 700 14px var(--body-font) !important; color: #ffd24a !important; letter-spacing: 0 !important; }
.g-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.g-tabs button { padding: 8px 6px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.g-tabs button.on { background: #ffd24a; color: #2a1a00; }
.btn-time { border-color: #ffd24a !important; color: #ffe9a8 !important; }
.g-msg .g-btns + .g-btns { margin-top: 8px; }
.g-board li.empty small { display: block; margin-top: 4px; font-size: 12.5px; }
.g-tabs button:not(.on) { border: 1px solid rgba(255, 210, 74, .45); }
.g-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
#g-code { text-transform: uppercase; letter-spacing: 3px; text-align: center; }
#v-game.secret .g-title { font-family: 'Nosifer'; font-size: 14px; color: #ffd24a; text-shadow: 0 0 14px rgba(255, 210, 74, .6); }

.btn-story { border-color: #9dff5c !important; color: #d6ffbd !important; }
.g-story-text { text-align: left; margin-top: 6px; font-size: 14.5px; line-height: 1.5; }
.g-story-text p { margin: 8px 0; }
.g-story-text h4 { margin: 14px 0 2px; font: 600 15.5px var(--body-font); color: var(--accent-2); }

.g-steps { padding-left: 20px; margin: 6px 0 4px; }
.g-steps li { margin: 5px 0; }
.parchment { position: relative; margin: 16px 2px 6px; padding: 18px 16px 16px; color: #3b2410; font-family: Georgia, 'Times New Roman', serif;
  background: radial-gradient(ellipse at 30% 20%, #fbf0d0 0%, #f0dca8 55%, #d9bb7c 100%);
  border-radius: 6px 12px 8px 14px / 14px 6px 12px 8px;
  box-shadow: inset 0 0 28px rgba(120, 70, 20, .55), inset 0 0 4px rgba(90, 50, 10, .6), 0 6px 18px rgba(0, 0, 0, .6);
  transform: rotate(-.6deg); }
.parchment::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: .35;
  background: radial-gradient(circle at 85% 12%, rgba(110, 60, 20, .5) 0 14px, transparent 26px), radial-gradient(circle at 12% 88%, rgba(110, 60, 20, .45) 0 10px, transparent 22px); }
.parchment .pa-title { font: 400 21px/1.15 'Creepster', cursive; color: #7a1d0a; text-align: center; letter-spacing: .5px; }
.parchment .pa-intro { font-style: italic; font-size: 13.5px; text-align: center; opacity: .85; margin: 6px 0 4px; }
.parchment h5 { font: 700 15px Georgia, serif; color: #7a1d0a; margin: 12px 0 2px; }
.parchment p { font-size: 14.5px; line-height: 1.5; margin: 4px 0; color: #3b2410; }
.parchment .pa-end { margin-top: 12px; font-style: italic; }
.g-story-text > p b, .g-steps b { font-weight: 700; color: #ff9b9b; }

/* ---------- SCORE GEVEN ---------- */
.dim { position: fixed; inset: 0; z-index: 900; background: rgba(5, 2, 10, .62); }
.vote { position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; max-width: 520px; margin: 0 auto; border-radius: 30px 30px 0 0; padding: 12px 22px calc(24px + var(--safe-bottom)); transform: translateY(100%); transition: transform .25s ease-out; }
.vote.on { transform: none; }
body.kids .vote { background: linear-gradient(180deg, #2a1147, #160827); border-top: 2px solid var(--accent); }
body.scary .vote { background: linear-gradient(180deg, #0f130f, #050606); border-top: 2px solid var(--blood); }
.close { position: absolute; top: 12px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 16px; }
.vote-head { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding-right: 36px; }
.vnum { width: 52px; height: 52px; font-size: 22px; }
.vote h3 { font: 600 22px/1.15 var(--body-font); }
.vsub { color: var(--muted); font-size: 14px; }
.vnote { margin-top: 10px; font-size: 14px; color: var(--muted); font-style: italic; }
.q { text-align: center; margin: 18px 0 4px; font-size: 17px; }
.meter { display: flex; justify-content: center; gap: 2px; font-size: clamp(18px, 6vw, 25px); margin: 6px 0 2px; }
.meter span { transition: filter .2s, transform .2s; }
.meter span.off { filter: grayscale(1) brightness(.45); opacity: .5; transform: scale(.85); }
.wheel { position: relative; height: 116px; margin: 6px -22px 0; outline: none; }
.wheel:focus-visible .ring { outline: 3px solid #fff; outline-offset: 4px; }
.wheel .ring { position: absolute; left: 50%; top: 50%; width: 98px; height: 98px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; }
body.kids .wheel .ring { background: radial-gradient(circle, #ff9a2e, #e06400); box-shadow: 0 0 0 6px rgba(255, 138, 31, .2), 0 0 40px rgba(255, 138, 31, .6); }
body.scary .wheel .ring { background: radial-gradient(circle, #2a0206, #0a0001); border: 3px solid var(--blood); box-shadow: 0 0 30px rgba(208, 16, 28, .7), inset 0 0 20px rgba(208, 16, 28, .6); }
.track { position: relative; display: flex; align-items: center; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); }
.track::-webkit-scrollbar { display: none; }
.track .spacer { flex: 0 0 calc(50% - 36px); }
.track .n { flex: 0 0 72px; text-align: center; scroll-snap-align: center; font: 700 30px var(--body-font); cursor: pointer; user-select: none; transition: color .15s; will-change: transform; }
.track .n.sel { font-family: 'Creepster'; font-weight: 400; }
body.kids .track .n.sel { color: var(--accent-ink); }
body.scary .track .n.sel { font-family: 'Nosifer'; font-size: 22px; color: var(--blood-2); text-shadow: 0 0 8px var(--blood); }
.swipe { text-align: center; font-size: 12.5px; color: var(--muted); }
.verdict { text-align: center; font: 600 20px var(--body-font); color: var(--accent-2); margin: 12px 0 16px; min-height: 26px; }
.link { display: block; margin: 12px auto 0; font-size: 14px; color: var(--muted); text-decoration: underline; }
.hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- SLIJM + OVERGANG ---------- */
#slime { position: fixed; top: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto; z-index: 800; pointer-events: none; height: calc(70px + var(--safe-top)); display: none; filter: drop-shadow(0 4px 8px rgba(124, 255, 58, .35)); }
#slime svg { position: absolute; bottom: 0; }
body.scary #slime { display: block; }
body.scary #slime::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: var(--safe-top); background: #b6ff6a; }
body.scary.panel-open #slime { opacity: .95; }

#transition { position: fixed; inset: 0; z-index: 2000; background: #000; display: grid; place-items: center; text-align: center; overflow: hidden; cursor: pointer; }
#transition .tr-slime { position: absolute; top: 0; left: 0; right: 0; transform: translateY(-100%); }
#transition.go .tr-slime { animation: slimefall 3.2s .4s cubic-bezier(.5, 0, .7, 1) forwards; }
@keyframes slimefall { 0% { transform: translateY(-100%); } 40% { transform: translateY(0) scaleY(1); } 100% { transform: translateY(0) scaleY(3); transform-origin: top; } }
.tr-text { position: relative; padding: 20px; }
.tr-text small { display: block; color: #9dff5c; letter-spacing: 3px; font: 500 15px 'Rubik'; opacity: 0; }
.tr-text b { display: block; font: 400 clamp(30px, 10vw, 44px)/1.25 'Nosifer'; color: #d0101c; text-shadow: 0 0 24px rgba(208, 16, 28, .9); margin: 14px 0; opacity: 0; }
.tr-text span { font: 400 13px 'Rubik'; color: rgba(255, 255, 255, .5); opacity: 0; }
#transition.go small { animation: fadein .6s .2s forwards; }
#transition.go b { animation: flicker 1.6s .7s forwards, shake .5s 1.2s 3; }
#transition.go span { animation: fadein .6s 2.4s forwards; }
#transition.out { opacity: 0; transition: opacity .6s; }
@keyframes fadein { to { opacity: 1; } }
@keyframes flicker { 0% { opacity: 0; } 10% { opacity: 1; } 15% { opacity: .1; } 25% { opacity: 1; } 30% { opacity: .2; } 45%, 100% { opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-6px, 3px) rotate(-1deg); } 40% { transform: translate(5px, -4px) rotate(1deg); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(4px, 3px); } }

/* ---------- toast + testmodus ---------- */
#toast { position: fixed; left: 50%; top: calc(20px + var(--safe-top)); transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; z-index: 3000; padding: 12px 18px; border-radius: 14px; background: #fff; color: #1a0b2e; font: 600 15px var(--body-font); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); transition: transform .3s, visibility .3s; max-width: 90vw; text-align: center; }
#toast.on { transform: translate(-50%, 0); visibility: visible; }
.preview-bar { position: fixed; right: 8px; top: calc(8px + var(--safe-top)); z-index: 2500; background: #ffe14d; color: #222; font: 600 12px system-ui; padding: 6px 10px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.preview-bar button { margin-left: 6px; text-decoration: underline; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 521px) { body { background: #0b0614; } body.scary { background: #000; } }
#v-game:not([hidden]) ~ .preview-bar { display: none; }
#vote-note { margin-bottom: 14px; }
