@font-face {
  font-family: "Lilita One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/lilita-one-latin.woff2) format("woff2");
}
:root {
  --display: "Lilita One", ui-rounded, system-ui, sans-serif;
  --vb: env(safe-area-inset-top);
  --vo: env(safe-area-inset-bottom);
  --letter: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  --inkt: #2B2D42;
  --grijs: #9A9CB0;
  --wit: #FFFFFF;
  --hart: #F0525B;
  --held: #3A62D6;
  --accent: #2E8C58;
  --bg: #7CC8A4;
  --schaduw: 0 3px 0 rgba(0, 0, 0, 0.1);
  --veer: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--bg); color: var(--inkt); font-family: var(--letter);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
body { position: fixed; inset: 0; transition: background-color .5s; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

#doek { position: fixed; inset: 0; display: block; touch-action: none; }

/* Balk bovenin, witte kaartjes zoals een scorebord */
.balk {
  position: fixed; left: 0; right: 0; top: 0; z-index: 5;
  display: flex; gap: 10px; padding: calc(var(--vb) + 10px) 14px 0;
  pointer-events: none;
}
.kaart {
  background: var(--wit); border-radius: 16px; box-shadow: var(--schaduw);
  display: flex; align-items: center; justify-content: center;
}
.kaart-level { flex-direction: column; width: 64px; height: 58px; }
.kaart-level .label { font-size: 9px; letter-spacing: .12em; color: var(--grijs); font-weight: 800; }
.kaart-level b { font-size: 24px; line-height: 1; font-weight: 900; margin-top: 2px; }
.kaart-doel { flex: 1; height: 58px; justify-content: space-around; padding: 0 8px; }
.doel { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.doel b { min-width: 2.2ch; }
.ic { width: 22px; height: 22px; }
.ic-hart { fill: var(--hart); }
.ic-kist { fill: #E3E5EE; transition: fill .3s; }
.doel-kist.open .ic-kist { fill: #FFC93C; }
.doel-kist.open .ic-kist rect:last-child { fill: #9A5326; }
.ic-tijd { fill: none; stroke: var(--grijs); stroke-width: 2.4; stroke-linecap: round; }
.ic-schot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--held); box-shadow: inset 0 0 0 4px #CFDAF8; }
.ic-schot.groot { width: 26px; height: 26px; box-shadow: inset 0 0 0 6px #CFDAF8; }
.doel.pop { animation: pop .35s var(--veer); }
.doel.schud { animation: schud .3s; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes schud { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Knoppen onderin, op een wit dienblad */
.knoppen {
  position: fixed; left: 50%; bottom: calc(var(--vo) + 12px); z-index: 5; transform: translateX(-50%);
  display: flex; justify-content: center; align-items: center; gap: 22px;
  background: var(--blad, #fff); border-radius: 26px; padding: 10px 22px 14px; box-shadow: 0 5px 0 rgba(0, 0, 0, .12);
}
.rond { position: relative; display: flex; flex-direction: column; align-items: center; transition: transform .15s var(--veer); }
.rond:active { transform: scale(.88); }
.rond-ic {
  width: 52px; height: 52px; border-radius: 50%; background: var(--tint, #EEF0F6);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08);
}
#knop-opnieuw { --tint: var(--tint1, #FFE7A8); } #knop-schiet { --tint: var(--tint2, #D5E0FB); } #knop-menu { --tint: var(--tint3, #E6E8F1); }
.rond-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--inkt); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rond-groot .rond-ic { width: 62px; height: 62px; }
.rond .tel {
  position: absolute; bottom: -8px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--wit); box-shadow: 0 0 0 2px #E3E5EE; font-weight: 900; font-size: 13px; line-height: 22px; text-align: center;
}
.rond.uit .rond-ic > * { opacity: .35; }
.rond.vol .rond-ic { animation: gloei 1.4s ease-in-out infinite; }
.rond.schud { animation: schud .3s; }
@keyframes gloei { 0%, 100% { box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 0 0 0 rgba(58,98,214,.45); } 50% { box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 0 0 9px rgba(58,98,214,0); } }

/* Toast met de naam van het level */
.toast {
  position: fixed; left: 50%; top: calc(var(--vb) + 82px); z-index: 6;
  transform: translate(-50%, -30px) scale(.6); opacity: 0;
  background: var(--wit); border-radius: 999px; padding: 8px 20px; box-shadow: var(--schaduw);
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
  transition: transform .45s var(--veer), opacity .25s;
}
.toast span { font-size: 10px; letter-spacing: .14em; color: var(--grijs); font-weight: 800; }
.toast b { font-size: 18px; font-weight: 900; }
.toast.aan { transform: translate(-50%, 0) scale(1); opacity: 1; }

.hint {
  position: fixed; left: 50%; bottom: calc(var(--vo) + 108px); z-index: 6;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(43, 45, 66, .86); color: #fff; font-weight: 800; font-size: 15px;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  transition: transform .4s var(--veer), opacity .3s;
}
.hint.aan { transform: translate(-50%, 0); opacity: 1; }

/* Schermen */
.scherm {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--vb) + 20px) 20px calc(var(--vo) + 20px);
}
.scherm-dim { background: rgba(30, 32, 52, .45); animation: infaden .25s; }
@keyframes infaden { from { opacity: 0; } }

.titel { display: flex; gap: 0; margin-top: -20px; }
.titel span {
  display: flex; align-items: center; justify-content: center;
  width: min(15vw, 64px); height: min(15vw, 64px); margin: 0 -3px; border-radius: 50%;
  background: var(--k); color: #fff; font-weight: 900; font-size: min(9.5vw, 40px); line-height: 1;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .16), 0 5px 0 rgba(0, 0, 0, .12);
  animation: letter 2.4s var(--veer) infinite;
}
.titel span:nth-child(odd) { transform: translateY(6px); }
.titel span:nth-child(2) { animation-delay: .08s; }
.titel span:nth-child(3) { animation-delay: .16s; }
.titel span:nth-child(4) { animation-delay: .24s; }
.titel span:nth-child(5) { animation-delay: .32s; }
.titel span:nth-child(6) { animation-delay: .40s; }
@keyframes letter { 0%, 70%, 100% { translate: 0 0; rotate: 0deg; } 80% { translate: 0 -16px; rotate: -8deg; } 90% { translate: 0 3px; rotate: 4deg; } }
.onder { color: var(--wit); font-weight: 800; font-size: 16px; margin: 18px 24px 0; opacity: .95; text-align: center; max-width: 300px; text-shadow: 0 2px 0 rgba(0,0,0,.12); }

.mascotte { position: relative; width: 120px; height: 150px; margin: 34px 0 34px; }
.m-lijf {
  position: absolute; left: 10px; top: 8px; width: 100px; height: 100px; border-radius: 50%;
  background: var(--held); animation: hup .9s cubic-bezier(.3, 0, .4, 1) infinite alternate; transform-origin: 50% 100%;
  box-shadow: 0 6px 0 #25409A;
}
.m-lijf::before { display: none; }
.m-lijf i { position: absolute; top: 34px; width: 22px; height: 26px; border-radius: 50%; background: #fff; animation: knip 3.7s infinite; }
.m-lijf i::after { content: ""; position: absolute; left: 6px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--inkt); }
.m-lijf i:first-child { left: 26px; } .m-lijf i:last-child { left: 54px; }
.m-voet { position: absolute; top: 96px; width: 30px; height: 26px; border-radius: 50%; background: #25409A; animation: hup .9s cubic-bezier(.3, 0, .4, 1) infinite alternate; animation-duration: .9s; }
.m-voet:nth-of-type(2) { left: 22px; } .m-voet:nth-of-type(3) { left: 68px; animation-delay: -.45s; }
.m-schaduw { position: absolute; left: 20px; top: 128px; width: 80px; height: 14px; border-radius: 50%; background: rgba(0, 0, 0, .13); animation: schaduw .9s cubic-bezier(.3, 0, .4, 1) infinite alternate; }
@keyframes hup { from { transform: translateY(0) scale(1.06, .94); } to { transform: translateY(-22px) scale(.96, 1.04); } }
@keyframes schaduw { from { transform: scale(1); } to { transform: scale(.7); opacity: .6; } }
@keyframes knip { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

.pil {
  pointer-events: auto; min-width: 220px; height: 60px; border-radius: 999px; margin: 6px 0;
  font-weight: 900; font-size: 20px; letter-spacing: .06em; box-shadow: 0 5px 0 rgba(0, 0, 0, .14);
  transition: transform .15s var(--veer), box-shadow .15s;
}
.pil:active { transform: translateY(4px) scale(.97); box-shadow: 0 1px 0 rgba(0, 0, 0, .14); }
.pil-hoofd { background: var(--wit); color: var(--accent); }
.pil-zacht { background: transparent; color: var(--wit); box-shadow: inset 0 0 0 4px #fff; }
.paneel .pil-zacht { background: #EEF0F6; color: var(--inkt); }

.paneel {
  background: var(--wit); border-radius: 30px; padding: 28px 24px 22px; width: min(340px, 100%);
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 8px 0 rgba(0, 0, 0, .12);
  animation: paneelIn .5s var(--veer);
}
.paneel h2 { margin: 0 0 16px; font-size: 32px; font-weight: 900; letter-spacing: .02em; }
.paneel .pil { width: 100%; }
@keyframes paneelIn { from { transform: translateY(60px) scale(.7); opacity: 0; } }
.schakel { margin-top: 10px; font-weight: 800; color: var(--grijs); padding: 10px; }

.winst-sterren { display: flex; gap: 6px; margin: 4px 0 14px; height: 90px; align-items: flex-end; }
.winst-held { position: relative; width: 90px; height: 70px; margin: -80px 0 0; }
.winst-held .m-lijf { left: 5px; top: 0; width: 80px; height: 80px; animation: juich .5s cubic-bezier(.3,0,.4,1) infinite alternate; }
.winst-held .m-lijf::before { left: 14px; top: 12px; }
.winst-held .m-lijf i { top: 24px; width: 18px; height: 21px; animation: none; }
.winst-held .m-lijf i::after { left: 5px; top: 4px; width: 9px; height: 9px; }
.winst-held .m-lijf i:first-child { left: 20px; } .winst-held .m-lijf i:last-child { left: 42px; }
.winst-held .m-lijf b { position: absolute; left: 28px; top: 48px; width: 24px; height: 12px; border-radius: 0 0 12px 12px; background: var(--inkt); }
@keyframes juich { from { transform: translateY(0) scale(1.08, .92); } to { transform: translateY(-18px) scale(.95, 1.05); } }
.lint { position: relative; margin: 6px -38px 0; padding: 10px 40px 14px; background: var(--accent); color: #fff;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); }
.lint h2 { margin: 0 !important; font-size: 30px; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.ster {
  width: 64px; height: 64px; display: block; background: #E3E5EE;
  clip-path: polygon(50% 0, 63% 33%, 98% 36%, 71% 58%, 80% 94%, 50% 74%, 20% 94%, 29% 58%, 2% 36%, 37% 33%);
  transform: scale(0);
}
.ster:nth-child(2) { width: 84px; height: 84px; }
.ster.aan { background: #FFC93C; }
.ster.in { animation: sterIn .55s var(--veer) forwards; }
@keyframes sterIn { 0% { transform: scale(0) rotate(-120deg); } 100% { transform: scale(1) rotate(0); } }
.winst-regels { display: flex; gap: 8px; width: 100%; margin-bottom: 14px; }
.winst-regels div { flex: 1; background: #F3F4F8; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.winst-regels span { font-size: 10px; letter-spacing: .1em; color: var(--grijs); font-weight: 800; text-transform: uppercase; }
.winst-regels b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* Levelkeuze: een kaart met de werelden als eilanden en de levels als stops op een pad */
#scherm-levels { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-left: 0; padding-right: 0; }
.kop { position: sticky; top: calc(-20px - var(--vb)); z-index: 3; width: 100%; max-width: 440px; display: flex; align-items: center; gap: 12px; padding: calc(var(--vb) + 20px) 16px 18px; margin-top: calc(-20px - var(--vb)); color: var(--wit); background: linear-gradient(var(--bg) 72%, transparent); }
.kop h2 { flex: 1; margin: 0; font-size: 30px; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.12); }
.terug { width: 48px; height: 48px; border-radius: 50%; background: var(--wit); box-shadow: var(--schaduw); display: flex; align-items: center; justify-content: center; }
.terug svg { width: 24px; height: 24px; fill: none; stroke: var(--inkt); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sterren-totaal { font-weight: 900; font-size: 18px; display: flex; align-items: center; gap: 6px; background: var(--wit); color: var(--inkt); padding: 8px 14px; border-radius: 999px; box-shadow: var(--schaduw); }
.sterren-totaal::before { content: ""; width: 20px; height: 20px; background: #FFC93C; clip-path: polygon(50% 0, 63% 33%, 98% 36%, 71% 58%, 80% 94%, 50% 74%, 20% 94%, 29% 58%, 2% 36%, 37% 33%); }
.kaartbak { position: relative; width: 100%; max-width: 440px; flex-shrink: 0; }
.eiland { position: absolute; left: 14px; right: 14px; border-radius: 48px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .12), 0 6px 0 rgba(0, 0, 0, .1); overflow: hidden; }
.eiland svg.deco { position: absolute; inset: 0; width: 100%; height: 100%; }
.eiland-naam { position: absolute; z-index: 2; padding: 6px 16px; border-radius: 999px; background: var(--wit); color: var(--inkt);
  font-weight: 900; font-size: 14px; letter-spacing: .08em; box-shadow: var(--schaduw); display: flex; gap: 8px; align-items: center; }
.eiland-naam small { color: var(--grijs); font-size: 12px; }
.pad { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.stop {
  position: absolute; z-index: 2; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  background: var(--wit); color: var(--inkt); font-weight: 900; font-size: 26px;
  box-shadow: inset 0 -6px 0 #E3E5EE, 0 5px 0 rgba(0, 0, 0, .15);
  display: flex; align-items: center; justify-content: center; transition: transform .15s var(--veer);
}
.stop:active { transform: scale(.9); }
.stop.dicht { background: rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .9); box-shadow: inset 0 -6px 0 rgba(0,0,0,.08); }
.stop.dicht svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.stop .mini { position: absolute; bottom: -14px; display: flex; gap: 1px; }
.stop .mini i { width: 17px; height: 17px; background: #E3E5EE; clip-path: polygon(50% 0, 63% 33%, 98% 36%, 71% 58%, 80% 94%, 50% 74%, 20% 94%, 29% 58%, 2% 36%, 37% 33%); }
.stop .mini i:nth-child(2) { transform: translateY(-4px); }
.stop .mini i.aan { background: #FFC93C; }
.stop.nu { animation: wenk 1.2s ease-in-out infinite; box-shadow: inset 0 -6px 0 #E3E5EE, 0 5px 0 rgba(0,0,0,.15), 0 0 0 6px rgba(255,255,255,.45); }
.stop .hier { position: absolute; top: -40px; width: 38px; height: 38px; border-radius: 50%; background: var(--held); animation: hup .6s cubic-bezier(.3,0,.4,1) infinite alternate; }
.stop .hier::before, .stop .hier::after { content: ""; position: absolute; top: 12px; width: 9px; height: 11px; border-radius: 50%; background: #fff; box-shadow: inset 2px -3px 0 var(--inkt); }
.stop .hier::before { left: 9px; } .stop .hier::after { left: 20px; }
@keyframes wenk { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

@media (min-width: 700px) {
  .balk { max-width: 520px; margin: 0 auto; }
}

/* In de opnames voor screenshots doen we alsof er een notch en een thuisbalk zijn. */
html.nep-iphone { --vb: 47px; --vo: 34px; }

/* Stickerletters: wit met een dikke donkere rand en een harde schaduw. Eigen letterstijl van de titels. */
.sticker, .paneel h2, .kop h2, .lint h2, .pil {
  -webkit-text-stroke: 0; paint-order: stroke fill;
}
.kop h2, .lint h2, #scherm-pauze h2 {
  color: #fff; -webkit-text-stroke: 7px var(--inkt); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--inkt); letter-spacing: .03em; transform: rotate(-2deg);
}
.pil-hoofd { background: var(--accent); color: #fff; -webkit-text-stroke: 5px rgba(0,0,0,.25); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), 0 5px 0 rgba(0,0,0,.14); font-size: 22px; }
.pil-zacht { color: #fff; -webkit-text-stroke: 4px rgba(0,0,0,.18); }
#scherm-start .pil-hoofd { background: #fff; color: var(--accent); -webkit-text-stroke: 0; box-shadow: inset 0 -6px 0 #E3E5EE, 0 5px 0 rgba(0,0,0,.14); }

/* Winst: een eigen scène in de kleur van de wereld, met de held groot in beeld. */
#scherm-winst { background: linear-gradient(var(--lucht, #BDEBD6), var(--bg)); animation: infaden .3s; overflow: hidden; }
#scherm-winst::before {
  content: ""; position: absolute; left: 50%; top: 32%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(rgba(255,255,255,.16) 0 10deg, transparent 10deg 20deg);
  animation: draai 24s linear infinite;
}
@keyframes draai { to { transform: rotate(360deg); } }
#scherm-winst .paneel { background: none; box-shadow: none; position: relative; padding-top: 0; }
#scherm-winst .winst-held { width: 150px; height: 150px; margin: 0 0 6px; }
#scherm-winst .winst-held .m-lijf { left: 0; top: 0; width: 150px; height: 150px; box-shadow: 0 9px 0 #25409A; }
#scherm-winst .winst-held .m-lijf::before { left: 26px; top: 24px; width: 34px; height: 20px; }
#scherm-winst .winst-held .m-lijf i { top: 46px; width: 32px; height: 38px; }
#scherm-winst .winst-held .m-lijf i::after { left: 9px; top: 7px; width: 16px; height: 16px; }
#scherm-winst .winst-held .m-lijf i:first-child { left: 38px; } #scherm-winst .winst-held .m-lijf i:last-child { left: 80px; }
#scherm-winst .winst-held .m-lijf b { left: 52px; top: 92px; width: 46px; height: 22px; border-radius: 0 0 23px 23px; }
#scherm-winst .lint { margin: 0 0 4px; background: none; clip-path: none; padding: 0; }
#scherm-winst .lint h2 { font-size: 46px; }
#scherm-winst .ster { background: #fff; opacity: .35; }
#scherm-winst .ster.aan { opacity: 1; background: #FFC93C; filter: drop-shadow(0 4px 0 #D9942B); }
#scherm-winst .winst-regels div { background: rgba(255,255,255,.9); }
#scherm-winst .pil-zacht { box-shadow: inset 0 0 0 4px #fff; background: transparent; color: #fff; }

/* Ronde 4: display-letter, gevulde tweede knoppen, winst op het landschap van de wereld. */
.titel span, .kop h2, .lint h2, .paneel h2, .pil, .kaart-level b, .doel b, .toast b, .stop, .eiland-naam, .winst-regels b, .sterren-totaal, .rond .tel {
  font-family: var(--display); font-weight: 400;
}
.titel span { font-size: min(10.5vw, 44px); padding-top: 3px; }
.kop h2, .lint h2, #scherm-pauze h2 { -webkit-text-stroke: 6px var(--inkt); text-shadow: 0 4px 0 var(--inkt); letter-spacing: .02em; }
.pil { letter-spacing: .04em; font-size: 24px; }
.pil-hoofd { -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.pil-zacht, .paneel .pil-zacht, #scherm-winst .pil-zacht {
  background: rgba(255, 255, 255, .92); color: var(--inkt); -webkit-text-stroke: 0; text-shadow: none;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.08), 0 4px 0 rgba(0,0,0,.12); font-size: 20px;
}
#scherm-start .pil-zacht { background: rgba(0, 0, 0, .14); color: #fff; box-shadow: none; }
.ic-stap { fill: var(--grijs); }
/* Startscherm: titel bovenin, de held in het midden, de knoppen in het onderste derde. */
#scherm-start { justify-content: space-between; padding-top: calc(var(--vb) + 56px); padding-bottom: calc(var(--vo) + 40px); }
#scherm-start .mascotte { margin: 0; }
#scherm-start .knoppenblok { display: flex; flex-direction: column; align-items: center; }
#scherm-start .onder { color: #fff; text-shadow: none; opacity: .9; }
#scherm-winst { background: rgba(255, 255, 255, .08); justify-content: center; }
#scherm-winst::before { display: none; }
#scherm-winst .winst-regels { gap: 10px; margin: 6px 0 20px; }
#scherm-winst .winst-regels div { padding: 12px 6px; border-radius: 18px; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
#scherm-winst .winst-regels span { font-size: 12px; }
#scherm-winst .winst-regels b { font-size: 30px; }
#scherm-winst .winst-regels .goed b { color: #2E9E5B; }
#scherm-winst .winst-regels .goed span::after { content: " ✓"; }
.titelblok { display: flex; flex-direction: column; align-items: center; }
