@font-face {
  font-family: 'Cherry Bomb One';
  src: url('../assets/fonts/cherry-bomb-one-latin-400-normal.woff2') format('woff2');
  font-display: block
}

:root {
  --zone-hud: 9vh;
  --zone-tekst-top: 12vh;
  --zone-tekst-hoogte: 34vh;
  --zone-tekst-links: 12vw;
  --zone-tekst-rechts: 12vw;
  --zone-pop-links: 3vw;
  --zone-pop-breedte: 14vw;
  --zone-pop-hoogte: 28vh;
  --zone-grond: 7vh;
  --zone-praat-links: 15vw;
  --zone-praat-breedte: 29vw;
  --zone-praat-onder: 42vh;
  --zone-praat-top: 50vh;
  --zone-speelstuk-links: 60vw;
  --zone-speelstuk-breedte: 24vw;
  --zone-vriend-rechts: 3vw;
  --zone-vriend-breedte: 11vw;
  --zone-handen-breedte: 34vw;
  --zone-dashboard-breedte: 52vw;
  --zone-decor-onder: 24vh;
  --zone-decor-hoogte: 15vh;
  --zone-decor-links: 22vw;
  --zone-decor-rechts: 72vw;

  --inkt: #2E1760;
  --melk: #FFFBFF;
  --suikerspin: #FF8FC7;
  --fel-roze: #FF5FA8;
  --druif: #7B4DDB;
  --citroen: #FFD84D;
  --mint: #5EE0C0;
  --fout: #FF7A59;
  --land: #FF5A6E;
  /* kleur van het land waar je bent */
  --vinger: #FFCF33;
  /* kleur van de vinger die aan de beurt is */
  --titel: 'Baloo 2', system-ui, sans-serif;
  /* titels, getallen, knoppen */
  --praat: 'Baloo 2', system-ui, sans-serif;
  /* alles wat je leest */
  --typ: 'Baloo 2', system-ui, sans-serif;
  /* de letters die je typt: per land een andere */
  --veer: cubic-bezier(.34, 1.56, .64, 1);
  /* stuitert een beetje door */
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #CDB4FF;
  color: var(--inkt);
  font-family: var(--praat);
  font-weight: 500
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer
}

/* ───────── De wereld: vult het hele scherm, in lagen die los van elkaar bewegen ───────── */
.wereld {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate
}

.laag {
  position: absolute;
  inset: 0;
  pointer-events: none
}

.laag-lucht {
  inset: -3vh -3vw;
  background: url('../assets/img/wereld-rood.webp') center bottom/cover;
  animation: adem 16s ease-in-out infinite alternate
}

@keyframes adem {
  to {
    transform: translateX(-1.6vw)
  }
}

.wolk {
  position: absolute;
  width: 15vw;
  opacity: .5;
  left: 0
}

.wolk img {
  width: 100%;
  display: block
}

.ster {
  position: absolute;
  width: 1.6vmin;
  aspect-ratio: 1;
  background: var(--melk);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkel 2.4s ease-in-out infinite
}

@keyframes twinkel {
  50% {
    transform: scale(.3) rotate(45deg);
    opacity: .3
  }
}

.decor {
  position: absolute;
  bottom: 11vh;
  filter: drop-shadow(0 1.2vh 0 rgba(46, 23, 96, .18));
  transform-origin: 50% 100%;
  animation: wieg 5s ease-in-out infinite alternate
}

@keyframes wieg {
  from {
    transform: rotate(-1.4deg)
  }

  to {
    transform: rotate(1.4deg)
  }
}

/* ───────── De spelers ───────── */
.poppetje {
  position: absolute;
  left: 8vw;
  bottom: 5vh;
  height: 32vh;
  transform-origin: 50% 100%;
  animation: dein 1.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 1.4vh 0 rgba(46, 23, 96, .2))
}

@keyframes dein {
  from {
    transform: translateY(0) scale(1, 1)
  }

  to {
    transform: translateY(-1.2vh) scale(.985, 1.02)
  }
}

@keyframes spring {
  30% {
    transform: translateY(-9vh) scale(.95, 1.08)
  }

  60% {
    transform: translateY(0) scale(1.08, .9)
  }
}

@keyframes schud {

  20%,
  60% {
    transform: translateX(-1.2vw) rotate(-4deg)
  }

  40%,
  80% {
    transform: translateX(1.2vw) rotate(4deg)
  }
}

/* Het praatwolkje: een echte wolk, geen kaartje */
.praat {
  position: absolute;
  left: var(--zone-praat-links);
  bottom: var(--zone-praat-onder);
  width: var(--zone-praat-breedte);
  max-width: var(--zone-praat-breedte);
  pointer-events: none;
  padding: 1.6vh 1.6vw;
  background: var(--melk);
  border-radius: 3.2vh;
  font-size: max(18px, 2.5vh);
  line-height: 1.25;
  box-shadow: 0 .9vh 0 rgba(123, 77, 219, .22), 0 2.4vh 4vh rgba(46, 23, 96, .18);
  transform-origin: 0 100%;
  transform: scale(0) rotate(-6deg);
  transition: transform .35s var(--veer)
}

.praat.aan {
  transform: scale(1) rotate(-2deg)
}

.praat::before,
.praat::after {
  content: '';
  position: absolute;
  background: var(--melk);
  border-radius: 50%
}

.praat::before {
  width: 2.6vh;
  height: 2.6vh;
  left: -1vh;
  bottom: -.6vh
}

.praat::after {
  width: 1.4vh;
  height: 1.4vh;
  left: -2.6vh;
  bottom: -2.2vh
}

/* ───────── De tekst hangt in de lucht ───────── */
.woorden {
  position: absolute;
  left: 0;
  right: 0;
  top: 21vh;
  height: 34vh
}

.woord {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  transition: transform .45s var(--veer), opacity .3s, filter .3s
}

.woord.straks {
  transform: translateX(calc(-50% + 34vw)) translateY(3vh) scale(.42);
  opacity: .75;
  filter: saturate(.7)
}


.bel {
  position: relative;
  width: 15vh;
  aspect-ratio: 1;
  margin-bottom: -1.2vh;
  animation: zweef 3.2s ease-in-out infinite alternate
}

.bel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.bel .snoep {
  inset: 22%;
  width: 56%;
  height: 56%;
  object-fit: contain;
  filter: drop-shadow(0 .5vh 0 rgba(46, 23, 96, .2))
}

.bel .schil {
  opacity: .55
}

@keyframes zweef {
  from {
    transform: translateY(0) rotate(-3deg)
  }

  to {
    transform: translateY(-1.6vh) rotate(3deg)
  }
}

.woord.knal .bel {
  animation: knal .3s forwards
}

@keyframes knal {
  60% {
    transform: scale(1.35)
  }

  100% {
    transform: scale(1.7);
    opacity: 0
  }
}

.touwtje {
  width: .5vh;
  height: 2.2vh;
  background: var(--melk);
  border-radius: 1vh;
  opacity: .9
}

.letters {
  display: flex;
  font-family: var(--typ);
  font-weight: var(--typgewicht, 800);
  font-size: clamp(64px, 15vh, 150px);
  line-height: 1;
  white-space: pre
}

.letter {
  display: inline-block;
  position: relative;
  min-width: .34em;
  text-align: center;
  color: var(--melk);
  -webkit-text-stroke: .14em var(--inkt);
  paint-order: stroke fill;
  filter: drop-shadow(0 .06em 0 rgba(46, 23, 96, .28));
  transition: color .15s, transform .2s var(--veer)
}

.letter.klaar {
  color: var(--citroen)
}

@keyframes plop {
  40% {
    transform: scale(1.35) translateY(-.08em)
  }
}

.letter.nu {
  color: var(--vinger);
  position: relative;
  text-shadow: 0 0 .18em var(--vinger);
  transform: none;
  animation: none
}

.letter::after {
  content: '';
  position: absolute;
  left: 15%;
  bottom: -.10em;
  width: 70%;
  height: .055em;
  border-radius: 1em;
  background: var(--vinger);
  opacity: 0;
  box-shadow: 0 0 .14em var(--vinger);
}

.letter.nu::after { opacity: 1; animation: cursor-veer .7s ease-in-out infinite alternate; }

@keyframes cursor-veer {
  to { transform: translateY(3px); }
}

.typ-dein {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.voorbeeld-vak > .typ-dein { padding-top: 6vh; }
.typ-dein .woord:not(.knal) .bel { animation: none; }

@media(prefers-reduced-motion:reduce) {
  .typ-dein, .letter.nu::after { animation: none; }
}

.letter.mis {
  color: var(--fout);
  animation: schud .35s
}

.letter.spatie::after {
  content: '';
  position: absolute;
  width: .5em;
  height: .1em;
  background: currentColor;
  border-radius: 1em;
  box-shadow: 0 0 0 .05em var(--inkt)
}

/* ───────── Wat je verdient staat los in beeld, zonder vakjes ───────── */
.hud {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1.4vw;
  z-index: 5
}

.hud-links {
  left: 2vw;
  top: 2.4vh
}

.hud-rechts {
  right: 2.2vw;
  top: 2.4vh
}

.hud-midden {
  left: 50%;
  top: 2.6vh;
  transform: translateX(-50%);
  gap: 1vw
}

.getal {
  font-family: var(--titel);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: max(26px, 4.6vh);
  color: var(--melk);
  -webkit-text-stroke: .22em var(--inkt);
  paint-order: stroke fill;
  line-height: 1;
  display: inline-block
}

.teller {
  display: flex;
  align-items: center;
  gap: .6vw
}

.teller img {
  height: 6.4vh;
  filter: drop-shadow(0 .6vh 0 rgba(46, 23, 96, .2))
}

.reeks img {
  transform-origin: 50% 90%;
  transition: transform .3s var(--veer), filter .3s;
  filter: grayscale(1) opacity(.6) drop-shadow(0 .6vh 0 rgba(46, 23, 96, .2))
}

.reeks.aan img {
  filter: drop-shadow(0 .6vh 0 rgba(46, 23, 96, .2));
  animation: vlam .5s ease-in-out infinite alternate
}

@keyframes vlam {
  to {
    transform: scale(1.12) rotate(4deg)
  }
}

.reeks .maal {
  font-size: max(20px, 3.2vh);
  margin-left: -.3vw
}

.stapje {
  width: 3vh;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 251, 255, .55);
  box-shadow: inset 0 -.5vh 0 rgba(46, 23, 96, .15)
}

.stapje.af {
  background: var(--land);
  box-shadow: inset 0 -.5vh 0 rgba(46, 23, 96, .22), inset 0 .4vh 0 rgba(255, 255, 255, .5)
}

.stapje.nu {
  width: 4.4vh;
  background: var(--citroen);
  box-shadow: inset 0 -.6vh 0 rgba(46, 23, 96, .22), inset 0 .5vh 0 rgba(255, 255, 255, .6), 0 0 0 .6vh rgba(255, 216, 77, .35);
  animation: wip2 1s ease-in-out infinite alternate
}

@keyframes wip2 {
  to {
    transform: scale(1.12)
  }
}

/* Knoppen zijn snoepjes: bol, glanzend, ze veren in */
.snoepknop {
  border: 0;
  height: 7.4vh;
  min-width: 7.4vh;
  padding: 0 2.2vh;
  border-radius: 99vh;
  font-family: var(--titel);
  font-weight: 800;
  font-size: max(18px, 3vh);
  color: var(--melk);
  -webkit-text-stroke: .2em var(--inkt);
  paint-order: stroke fill;
  background: linear-gradient(180deg, #FFB6DB 0, var(--fel-roze) 100%);
  box-shadow: inset 0 .5vh 0 rgba(255, 255, 255, .6), inset 0 -.8vh 0 rgba(46, 23, 96, .22), 0 .8vh 0 var(--inkt), 0 2vh 3vh rgba(46, 23, 96, .25);
}

button > span {
  transition: filter .12s, scale .12s ease-out;
}
.knop-tekst { display: inline-block; pointer-events: none; }
button:enabled:active > span { scale: .96; }

.snoepknop.lila {
  background: linear-gradient(180deg, #E3D3FF 0, #A98BF0 100%)
}

.snoepknop:focus-visible {
  outline: .15vh solid white;
  box-shadow: 0 0 .4vh .4vh #fffbffe6;
  outline-offset: .4vh
}

/* Het snoepvriendje dat je aan het bevrijden bent */
.vriendje {
  position: absolute;
  right: 3vw;
  bottom: 7vh;
  width: 17vh;
  aspect-ratio: 1;
  animation: zweef 4s ease-in-out infinite alternate
}

.vriendje img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain
}



/* ───────── De handschoenen: welke vinger? ───────── */
.handen {
  position: absolute;
  left: 50%;
  bottom: -4vh;
  width: var(--zone-handen-breedte);
  display: flex;
  justify-content: center;
  gap: 4vh;
  transform: translateX(-50%);
  transition: transform .4s var(--veer), opacity .3s;
  filter: drop-shadow(0 1vh 0 rgba(46, 23, 96, .22))
}

.hand {
  position: relative;
  width: 23vh
}

.hand img {
  width: 100%;
  display: block
}

.handen.weg {
  transform: translateX(-50%) translateY(120%);
  opacity: 0
}

.top {
  position: absolute;
  width: 4.4vh;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--vinger);
  box-shadow: 0 0 0 .7vh rgba(255, 251, 255, .9), 0 0 3vh 1.2vh var(--vinger);
  transition: transform .25s var(--veer)
}

.top.aan {
  transform: translate(-50%, -50%) scale(1);
  animation: klop .6s ease-in-out infinite alternate
}

@keyframes klop {
  to {
    box-shadow: 0 0 0 1.1vh rgba(255, 251, 255, .9), 0 0 5vh 2.2vh var(--vinger)
  }
}


/* ───────── Het dashboard van de raket: het toetsenbord komt alleen omhoog als je het nodig hebt ───────── */
.dashboard {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(104vh, var(--zone-dashboard-breedte));
  transform: translate(-50%, 105%);
  transition: transform .5s var(--veer);
  z-index: 6;
  padding: 3vh 3vh 2.4vh;
  border-radius: 6vh 6vh 0 0;
  background: linear-gradient(180deg, rgba(255, 251, 255, .96) 0, rgba(233, 220, 255, .96) 100%);
  box-shadow: 0 -1vh 0 rgba(123, 77, 219, .25), 0 -3vh 6vh rgba(46, 23, 96, .25), inset 0 .8vh 0 #fff
}

.dashboard.open {
  transform: translate(-50%, 0)
}

.rij {
  display: flex;
  justify-content: center;
  gap: .9vh;
  margin-bottom: .9vh
}

.rij:nth-child(2) {
  padding-left: 3vh
}

.rij:nth-child(3) {
  padding-left: 7vh
}

.toets {
  position: relative;
  flex-shrink: 0;
  width: 7.4vh;
  height: 7vh;
  border-radius: 2.2vh;
  display: grid;
  place-items: center;
  font-family: var(--praat);
  font-weight: 800;
  font-size: 3.2vh;
  color: var(--inkt);
  background: linear-gradient(180deg, #fff 0, color-mix(in srgb, var(--k) 38%, #fff) 100%);
  box-shadow: inset 0 .4vh 0 #fff, inset 0 -.7vh 0 color-mix(in srgb, var(--k) 55%, #fff), 0 .5vh 0 color-mix(in srgb, var(--k) 70%, var(--inkt));
  transition: transform .2s var(--veer)
}

.toets > .tastpunt {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  width: 1.8vh;
  height: .5vh;
  border-radius: 1vh;
  background: var(--inkt);
  opacity: .45
}

.toets.doel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--k) 55%, #fff) 0, var(--k) 100%);
  transform: scale(1.28) translateY(-1vh);
  z-index: 2;
  box-shadow: inset 0 .4vh 0 rgba(255, 255, 255, .7), inset 0 -.7vh 0 rgba(46, 23, 96, .2), 0 .6vh 0 var(--inkt), 0 0 4vh 1vh var(--k);
  animation: wip2 .5s ease-in-out infinite alternate
}

.spatiebalk {
  width: 44vh
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important
  }
}

@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/fredoka-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: block
}

@font-face {
  font-family: 'Baloo 2';
  src: url('../assets/fonts/baloo-2-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 800;
  font-display: block
}

@font-face {
  font-family: 'Patrick Hand';
  src: url('../assets/fonts/patrick-hand-latin-400-normal.woff2') format('woff2');
  font-display: block
}

@font-face {
  font-family: 'Young Serif';
  src: url('../assets/fonts/young-serif-latin-400-normal.woff2') format('woff2');
  font-display: block
}

@font-face {
  font-family: 'Special Elite';
  src: url('../assets/fonts/special-elite-latin-400-normal.woff2') format('woff2');
  font-display: block
}

:root {
  --lila: #E9DCFF;
  --poppetje-filter-blauw: hue-rotate(245deg) saturate(1.05);
  --poppetje-filter-groen: hue-rotate(170deg) saturate(.9)
}

[hidden] {
  display: none !important
}

button,
input,
summary,
a {
  touch-action: manipulation
}

button {
  border: 0
}

button:disabled {
  opacity: .5;
  cursor: default
}

:focus-visible {
  outline: .15vh solid white;
  box-shadow: 0 0 .4vh .4vh #fffbffe6;
  outline-offset: .4vh
}

h1:focus, #strip-titel:focus {
  outline: none;
  box-shadow: none
}

h1,
h2,
h3,
p {
  margin: 0
}

h1,
h2,
h3 {
  font-family: var(--titel);
  font-weight: 800
}

p {
  line-height: 1.3
}

small {
  font-size: max(14px, 1.9vh)
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap
}

.snoepknop.rond {
  width: 7.4vh;
  padding: 0;
  flex-shrink: 0
}

.snoepknop.klein {
  height: 6vh;
  font-size: max(16px, 2.5vh)
}

.volledig {
  position: fixed;
  right: 2.2vw;
  top: 2.4vh;
  z-index: 12
}

.hud-rechts {
  right: calc(2.2vw + 9vh)
}

.hud {
  pointer-events: auto
}

.hud-midden {
  padding: 0;
  margin: 0;
  list-style: none
}

.hud .spel-beeld {
  width: 6.4vh;
  height: 6.4vh
}

.wereld-titel {
  position: absolute;
  left: 50%;
  top: 5vh;
  transform: translateX(-50%);
  font-size: 6vh;
  text-align: center;
  white-space: nowrap;
  z-index: 4
}

.knoppen {
  display: flex;
  gap: 2vw;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap
}

.spel-beeld {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%
}

.spel-beeld img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain
}

.beeld-terugval {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: var(--suikerspin)
}

.spel-beeld:has(img:not([hidden]))>.beeld-terugval {
  display: none
}

.poppetje img {
  display: block;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  position: relative
}

.poppetje--blauw img {
  filter: var(--poppetje-filter-blauw)
}

.poppetje--groen img {
  filter: var(--poppetje-filter-groen)
}

.poppetje[data-houding="juich"] {
  animation: spring .7s var(--veer)
}

.poppetje[data-houding="oeps"] {
  animation: schud .45s
}

.pop-terugval {
  position: absolute;
  inset: 20% 10%;
  border-radius: 50%;
  background: var(--fel-roze)
}

.poppetje:has(img:not([hidden])) .pop-terugval {
  display: none
}

.pop-terugval i {
  position: absolute;
  left: 24%;
  top: 30%;
  height: 12%;
  width: 12%;
  background: var(--inkt);
  border-radius: 50%
}

.pop-terugval i+i {
  left: 64%
}

.wolk .spel-beeld {
  height: auto;
  aspect-ratio: 1.7
}

.landdecor .decor {
  position: absolute;
  top: auto;
  bottom: var(--zone-decor-onder);
  height: var(--zone-decor-hoogte);
  width: 18vh
}

.decor-groot {
  left: var(--zone-decor-rechts)
}

.decor-klein {
  left: var(--zone-decor-links);
  animation-delay: -2s
}

.maatje {
  position: static
}

.maatje .poppetje {
  left: 15vw;
  bottom: 10vh;
  height: 36vh
}

.maatje .praat {
  left: 34vw;
  bottom: 43vh;
  max-width: 38vw
}

.wolkpaneel {
  background: var(--melk);
  border-radius: 4vh;
  padding: 3.5vh 3vw;
  box-shadow: 0 2vh 6vh #7b4ddb40;
  font-family: var(--praat);
  font-size: max(18px, 2.5vh);
  color: var(--inkt);
  -webkit-text-stroke: 0
}

.wolkpaneel h2 {
  font-size: 4vh;
  margin-bottom: 2vh
}

.wolkpaneel p {
  margin: 1.5vh 0
}

.modal-laag {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  background: #cdb4ff38;
  backdrop-filter: blur(1vh)
}

.dialoog,
.ontdek-dialoog {
  max-width: 66vw;
  text-align: center
}

.dialoog .knoppen {
  margin-top: 3vh
}

.ontdek-dialoog .medaille {
  height: 25vh
}

.ontdek-dialoog .sticker-groot {
  height: 30vh;
  display: block
}

.ontdek-dialoog .snoepknop {
  margin-top: 2vh
}

.fullscreen-melding,
.opslag-melding {
  position: fixed;
  left: 25vw;
  right: 25vw;
  top: 12vh;
  z-index: 60;
  text-align: center
}

.opslag-melding {
  padding: 2vh;
  border-radius: 4vh;
  background: var(--melk);
  box-shadow: 0 2vh 6vh #7b4ddb40;
  font-size: 2.5vh
}

.gordijn {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden
}

.gordijn.aan {
  pointer-events: auto
}

.gordijn-helft {
  position: absolute;
  top: -10vh;
  bottom: -10vh;
  width: 65vw;
  background: radial-gradient(ellipse at center, #ffb6db 40%, #d6b6fa 100%);
  transition: transform .25s ease-in-out;
  filter: drop-shadow(0 1vh 4vh #7b4ddb55)
}

.gordijn-helft:first-child {
  left: -10vw;
  border-radius: 0 45% 45% 0;
  transform: translateX(-105%)
}

.gordijn-helft:last-child {
  right: -10vw;
  border-radius: 45% 0 0 45%;
  transform: translateX(105%)
}

.gordijn.aan .gordijn-helft {
  transform: translateX(0)
}

.gordijn-helft .spel-beeld {
  position: absolute;
  width: 44vw;
  height: 30vh;
  left: 12vw;
  top: var(--y)
}

.gordijn-helft:last-child .spel-beeld {
  left: -8vw
}

.toneel {
  position: absolute;
  inset: 0;
  pointer-events: none
}

.toneel button {
  pointer-events: auto
}

.speler .poppetje {
  left: var(--zone-pop-links);
  bottom: var(--zone-grond);
  height: var(--zone-pop-hoogte);
  width: var(--zone-pop-breedte)
}

.toneel .praat {
  z-index: 4
}

.toneel .woorden,
.toneel .tekstband {
  z-index: 3
}

.level-vriend {
  z-index: 4
}

.vriendje .vriend-figuur {
  position: absolute;
  inset: 17%;
  filter: grayscale(calc(1 - var(--vrij, 0))) opacity(.9)
}

.vriend-bel {
  position: absolute;
  inset: 0;
  opacity: .6
}

.vriend-bel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.vriend-bel path {
  fill: none;
  stroke: var(--melk);
  stroke-width: 2;
  opacity: 0
}

.vriendje.vrij .vriend-figuur {
  inset: 0;
  filter: none
}

.vriendje.vrij .vriend-bel {
  animation: knal .35s forwards
}

.vriendje.vrij {
  --vrij: 1
}

.woord .letters {
  font-size: clamp(64px, var(--woordmaat, 15vh), 150px)
}

.woord:has(.bel) .letters {
  margin-top: .5vh
}

.woord:not(:has(.bel)) {
  top: 8vh
}

.bel .spel-beeld {
  position: absolute
}

.woord.straks .letters {
  font-size: clamp(64px, 15vh, 150px)
}

.woord.komt {
  animation: woord-in .45s var(--veer)
}

.woord.vliegt-weg {
  animation: woord-uit .45s ease-in forwards;
  pointer-events: none
}

.letter.letter-sprong {
  animation: plop .28s var(--veer)
}

@keyframes woord-in {
  from {
    transform: translateX(calc(-50% + 34vw)) scale(.42);
    opacity: .6
  }

  to {
    transform: translateX(-50%) scale(1)
  }
}

@keyframes woord-uit {
  to {
    transform: translateX(calc(-50% - 100vw)) scale(.4) rotate(-12deg);
    opacity: 0
  }
}

.tekstband {
  position: absolute;
  text-align: center;
  font-family: var(--typ);
  font-weight: var(--typgewicht, 800);
  font-size: clamp(34px, 6.5vh, 64px);
  line-height: 1.5
}

.tekst-nevel {
  position: absolute;
  inset: -3vh -3vw;
  background: #fffbffa8;
  filter: blur(4vh);
  border-radius: 50%;
  z-index: -1
}

.tekstband .typ-dein { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.tekst-venster {
  --regel-hoogte: 9.6vh;
  width: 100%;
  min-width: 0;
  height: calc(3.35 * var(--regel-hoogte) + 1vh);
  overflow: visible;
  padding-top: calc(.35 * var(--regel-hoogte) + .5vh);
}
.typtekst { white-space: nowrap; line-height: 1.12; }
.tekstregel {
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--regel-hoogte);
  opacity: .72;
}
.tekstregel.regel-nu { opacity: 1; }
.typwoord {
  white-space: pre;
  display: inline-block
}

.typwoord.woord-straks {
  opacity: .7
}

.typwoord.woord-nu {
  opacity: 1
}

.tekstband .letter {
  -webkit-text-stroke: .10em var(--inkt);
  min-width: 0
}

.tekstband .letter.spatie {
  min-width: .3em
}

.tekstband .spatie::after {
  position: absolute;
  bottom: .1em;
  left: 10%
}

.flits-snoep,
.flits-invoer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center
}

.flits-snoep {
  top: 8vh
}

.flits-invoer {
  top: 23vh;
  font-size: 8vh
}

.flits-snoep.dicht {
  color: var(--suikerspin)
}

.voorbeeld-vak,
.houding-instructie {
  position: absolute;
  left: 25vw;
  right: 25vw;
  top: 19vh;
  text-align: center
}

.voorbeeld-toets {
  justify-content: center
}

.voorbeeld-toets small {
  font-size: 4vh;
  position: absolute;
  top: 16vh
}

.houding-instructie {
  top: 20vh;
  font-size: 3vh
}

.houding-instructie h2 {
  font-family: var(--praat);
  text-shadow: 0 .2vh 1vh var(--melk);
  margin-bottom: 2vh
}

.houding-instructie .snoepknop {
  height: 6vh
}

.dashboard .shift {
  width: 7.4vh;
  font-size: 3.5vh
}

.dashboard .spatiebalk {
  width: 44vh
}

.dashboard .spatiebalk>span {
  font-size: 1.8vh;
  opacity: .65
}

.dashboard[data-uitgebreid="true"] .toets {
  flex-shrink: 0;
  width: 6.4vh;
  height: 5.5vh;
  font-size: 2.8vh
}

.dashboard[data-uitgebreid="true"] .spatiebalk {
  width: 44vh
}

/* Ook de elf toetsen van de cijferrij en de thuisrij passen binnen het bord. */
.dashboard .rij .toets:not(.spatiebalk) { width: min(7.4vh, 3.5vw); }
.dashboard[data-uitgebreid="true"] .rij .toets:not(.spatiebalk) { width: min(6.4vh, 3.5vw); }

.dashboard[data-hulp="kleuren"] .toets>span {
  visibility: hidden
}

.toets.ingedrukt {
  transform: translateY(.6vh) scale(.94);
  animation: none
}

.dashboard[data-kleur="mint"] {
  box-shadow: 0 -1vh 0 var(--mint), 0 -3vh 6vh #2e176040, inset 0 .8vh 0 #fff
}

.dashboard[data-kleur="citroen"] {
  box-shadow: 0 -1vh 0 var(--citroen), 0 -3vh 6vh #2e176040, inset 0 .8vh 0 #fff
}

.dashboard[data-kleur="aardbei"] {
  box-shadow: 0 -1vh 0 var(--fel-roze), 0 -3vh 6vh #2e176040, inset 0 .8vh 0 #fff
}

.dashboard[data-kleur="regenboog"] {
  background: linear-gradient(120deg, #ffe1e9, #fff1b2, #d0fff0, #e9dcff)
}

.stap-uitslag {
  position: absolute;
  inset: 13vh 14vw auto;
  height: 35vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2vh;
  z-index: 9
}

.stap-uitslag strong,
.stap-uitslag small {
  display: block
}

.stap-uitslag strong {
  font-family: var(--titel);
  font-size: 6vh;
  color: var(--melk);
  -webkit-text-stroke: .16em var(--inkt);
  paint-order: stroke fill
}

.stap-uitslag small {
  font-size: 3vh;
  margin: 2vh
}

.stap-uitslag .getal {
  display: block;
  height: 6vh;
  min-width: 28ch;
  font-variant-numeric: tabular-nums;
  animation: score-vliegt .7s var(--veer);
  font-size: 5vh
}

.camera-vliegt .toneel:not(.scene-uit) {
  animation: camera-in .7s ease-in-out
}

.scene-uit {
  animation: camera-uit .7s ease-in-out forwards;
  pointer-events: none !important
}

.scene-uit * {
  pointer-events: none !important
}

@keyframes camera-in {
  from {
    transform: translateX(100vw)
  }

  to {
    transform: translateX(0)
  }
}

@keyframes camera-uit {
  to {
    transform: translateX(-100vw)
  }
}

@keyframes score-vliegt {
  from {
    transform: translateX(80vw) rotate(12deg);
    opacity: 0
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

.deeltjes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10
}

.vliegende-munt {
  position: absolute;
  width: 6vh;
  height: 6vh;
  z-index: 15;
  pointer-events: none;
  animation: munt-vlucht .7s ease-in forwards
}

@keyframes munt-vlucht {
  to {
    transform: translate(var(--munt-x), var(--munt-y)) scale(.5) rotate(240deg);
    opacity: 0
  }
}

#testbalk {
  position: fixed;
  right: 2vw;
  top: 10vh;
  z-index: 50
}

#test-toggle {
  height: 5.5vh;
  min-width: 5.5vh;
  padding: 0 1vh;
  font-size: 2vh
}

#test-opties {
  position: absolute;
  right: 0;
  top: 7vh;
  width: min(96vw, max(44vw, 58vh));
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5vh;
  padding: 2.5vh;
  background: var(--melk);
  border-radius: 4vh;
  box-shadow: 0 2vh 6vh #7b4ddb55
}

#test-opties .snoepknop {
  height: 5vh;
  font-size: 2vh
}

#test-opties label {
  display: flex;
  gap: 1vh;
  align-items: center;
  font-size: 2vh
}

#test-opties p, #test-kind {
  flex-basis: 100%;
  margin: 0;
  font-size: 2vh;
}

#test-kind {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1vh;
}

#test-gehaald {
  width: 5ch;
  font: inherit;
}

#test-open[aria-pressed="true"] {
  background: var(--druif);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--druif);
  width: 2.4vh;
  height: 2.4vh
}

@media(max-aspect-ratio:4/3) {
  .hud {
    gap: 1vw
  }

  .hud .getal {
    font-size: 3.5vh
  }

  .hud .spel-beeld {
    height: 5vh;
    width: 5vh
  }

  .hud-rechts #geluid {
    display: none
  }

  .wereld-titel {
    font-size: 4.5vh;
    top: 13vh
  }

  .dashboard {
    max-width: 96vw;
    padding: 2vh 1vw
  }

  .toets {
    flex-shrink: 0;
    width: 6vw
  }

  .dashboard .spatiebalk {
    width: 35vw
  }

  .dashboard .shift {
    width: 6vw
  }

  .praat {
    max-width: 40vw
  }

  .tekstband {
    left: 5vw;
    right: 5vw;
    top: 30vh
  }

  .hud-midden {
    top: 13vh
  }

  .dialoog,
  .ontdek-dialoog {
    max-width: 90vw
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important
  }

  .vriendje.vrij .vriend-bel {
    display: none
  }

  .gordijn {
    display: none
  }
}

.letter.klaar.letter-sprong {
  animation: plop .28s var(--veer)
}

html {
  font-synthesis: none
}

.reeks-sprong {
  animation: plop .3s var(--veer)
}

.toneel:has(.stap-uitslag:not([hidden]))>.scene {
  opacity: .5
}

.typwoord {
  font-family: var(--typ);
  font-weight: var(--typgewicht, 800)
}

/* Vaste zones, ook wanneer het dashboard in beeld komt. */
.level-wereld #oefenvlak {
  position: absolute;
  left: var(--zone-tekst-links);
  right: var(--zone-tekst-rechts);
  top: var(--zone-tekst-top);
  height: var(--zone-tekst-hoogte);
}

.level-wereld .houding-instructie {
  padding: 3vh 12vw 0;
}

.houding-instructie h2 {
  height: 15vh;
  font-weight: 500;
}

.level-wereld .voorbeeld-vak {
  padding-top: 6vh;
}

.level-wereld .level-vriend {
  right: var(--zone-vriend-rechts);
  width: min(17vh, var(--zone-vriend-breedte));
  bottom: var(--zone-grond);
}

.toneel>.praat {
  top: var(--zone-praat-top);
  bottom: auto;
  max-height: 24vh;
  font-size: max(18px, 2.3vh);
  transform-origin: 0 0;
  transform: scale(0);
}

.toneel > .praat.aan { transform: scale(1); }

.teller .getal {
  width: 3ch;
  min-width: 3ch;
  text-align: left;
}

.snoep-teller .getal {
  width: 5ch;
  min-width: 5ch;
}

.teller .maal {
  width: 2ch;
  min-width: 2ch;
}

.level-wereld .hud {
  gap: .7vw;
}

.level-wereld .hud-rechts {
  top: 2vh;
  display: grid;
  grid-template-columns: repeat(4, auto);
}

.level-wereld .hud .getal {
  font-size: 3.7vh;
}

.level-wereld .hud .maal {
  font-size: 2.6vh;
}

.level-wereld .hud .spel-beeld {
  width: 4.8vh;
  height: 4.8vh;
}

.level-wereld .hud .snoepknop,
.level-wereld>.volledig {
  height: 6vh;
  min-width: 6vh;
  width: 6vh;
}

.level-wereld .hud-midden {
  left: 44%;
}

.stapje {
  width: 3vh;
  flex-shrink: 0;
}

.stapje.nu {
  width: 3vh;
  transform: scale(1.2);
}

#volgende-stap {
  position: absolute;
  top: 31vh;
}

.letter.spatie:not(.nu)::after {
  opacity: 0;
}

.landdecor .decor img {
  object-position: 50% 100%;
}

.lucht-uit {
  z-index: 0;
  pointer-events: none;
  animation: lucht-vervaag .6s linear forwards;
}

@keyframes lucht-vervaag {
  to {
    opacity: 0;
  }
}

/* Handpassing en lichtjes komen uit proef/toneel.html. */
.ophand {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  transform-origin: 0 0;
  z-index: 3;
  pointer-events: none;
  opacity: .88;
  filter: drop-shadow(0 2px 0 rgba(46, 23, 96, .25));
}

.ophand img {
  width: 100%;
  display: block;
}

.toets.doel {
  z-index: 4;
}

.loper {
  position: absolute;
  left: 0;
  top: 0;
  width: 3.6vh;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--vinger);
  z-index: 5;
  pointer-events: none;
  transform: translate(calc(var(--x0) - 50%), calc(var(--y0) - 50%));
  box-shadow: 0 0 0 .6vh rgba(255, 251, 255, .95), 0 0 3vh 1.2vh var(--vinger);
  animation: reis 1s cubic-bezier(.6, 0, .4, 1) infinite alternate;
}

@keyframes reis {

  0%,
  18% {
    transform: translate(calc(var(--x0) - 50%), calc(var(--y0) - 50%));
  }

  82%,
  100% {
    transform: translate(calc(var(--x1) - 50%), calc(var(--y1) - 50%));
  }
}

.melding {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  font: 800 max(40px, 11vh) var(--titel);
  color: var(--citroen);
  -webkit-text-stroke: .16em var(--inkt);
  paint-order: stroke fill;
  z-index: 8;
  pointer-events: none;
  text-align: center;
}

.melding.aan {
  animation: melding-plop .35s var(--veer);
}

.reeks-melding {
  position: static;
  grid-area: 2 / 1 / 3 / 3;
  contain: inline-size;
  transform: none;
  font-size: 3vh;
  line-height: 1.25;
  text-wrap: balance;
}

@keyframes melding-plop {
  from {
    scale: .3;
  }

  to {
    scale: 1;
  }
}

@media(prefers-reduced-motion:reduce) {
  .lucht-uit {
    display: none;
  }
}

strong,
b {
  font-weight: 700;
}

.getal,
.snoepknop,
.toets {
  font-weight: 800;
}

[data-wolk][role="button"] { cursor: pointer; pointer-events: auto; }

/* Dezelfde verre heuvel loopt gespiegeld door wanneer de camera doorschuift. */
.level-wereld > .laag-lucht:not(.lucht-uit) {
  inset: 0;
  animation: none;
  transform: translateX(var(--camera, 0));
  transition: transform .7s ease-in-out;
}
.level-wereld > .laag-lucht:not(.lucht-uit)::after {
  content: '';
  position: absolute;
  inset: 0;
  left: 100%;
  width: 100%;
  background: inherit;
  transform: scaleX(-1);
}
.ver-landbeeld {
  position: absolute;
  bottom: 42vh;
  width: min(6vw, 9vh);
  opacity: .65;
  filter: brightness(1.18);
  transform: translateX(-50%);
}
/* Links van de tekst en boven het praatwolkje, ook tijdens de race. */
.ver-landbeeld:first-child { bottom: 51vh; }
.landdecor .ver-landbeeld .decor {
  inset: 0;
  width: 100%;
  height: 100%;
  filter: none;
}
.piloot { position: relative; }
.level-wereld[data-fase=spel] { --spel-midden: 44%; --spel-stappen-top: 2.6vh; }
.level-wereld[data-fase=spel] > :is(.stapbolletjes, .hud-rechts, .volledig) { z-index: 19; }
.level-wereld[data-fase=spel] .stapbolletjes { left: var(--spel-midden); top: var(--spel-stappen-top); pointer-events: none; }
@media (max-aspect-ratio: 4/3) {
  .level-wereld[data-fase=spel] { --spel-midden: 50%; --spel-stappen-top: 10vh; }
}
.level-wereld[data-fase=spel] #even-kijken { display: none; }
.level-wereld[data-fase=spel] .hud-rechts #geluid { display: inline-flex; }
.spel-voorproef { display: grid; justify-items: center; gap: 1vh; margin: 0; }
.spel-voorproef .bel { width: 21vh; margin: 0; animation: none; }
.spel-voorproef .spel-icoon { inset: 7%; width: 86%; height: 86%; overflow: hidden; border-radius: 50%; }
.spel-voorproef .schil { inset: 0; }
.spel-voorproef figcaption { font-size: 5vh; }
.level-wereld[data-fase=spel-klaar] .toneel { animation: spel-in .35s ease-out; }
.bord-duim {
  display: none;
  position: absolute;
  width: 10%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--vinger);
  box-shadow: 0 0 0 2px white, 0 0 8px var(--vinger);
}
.beide-duimen .bord-duim { display: block; }
.beide-duimen .ophand { z-index: 5; }
.level-spel { position: absolute; inset: 0; z-index: 18; animation: spel-in .4s ease-out; }
@keyframes spel-in { from { opacity: 0; } }

.piloot, .piloot > svg { display: block; width: 100%; height: 100%; }
.piloot-deint { animation: piloot-deint 2.9s ease-in-out infinite alternate; }
@keyframes piloot-deint { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
.menu-maatje {
  position: absolute;
  left: .8vw;
  bottom: 1vh;
  height: 13vh;
  width: 10vw;
  z-index: 3;
  pointer-events: none;
}
.menu-maatje .poppetje { inset: 0; height: 100%; }
.wereld:has(.medaille-verzameling) .menu-maatje { left: 44vw; }
.poppetje[data-actie], .piloot[data-actie] g > svg { transform-origin: center bottom; }
.piloot[data-actie] g > svg { transform-box: fill-box; }
.poppetje[data-actie]:not([data-actie=tik]) > img, .piloot[data-actie]:not([data-actie=tik]) g image,
.poppetje[data-terugveren] > img, .piloot[data-terugveren] g image {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: pop-wissel .22s ease-out;
}
@keyframes pop-wissel { 30% { scale: 1.02 .94; } 75% { scale: .99 1.025; } }
.poppetje[data-actie=tik], .piloot[data-actie=tik] g > svg { animation: pop-tik .14s ease-out; }
.poppetje[data-actie=zwaai], .piloot[data-actie=zwaai] g > svg { animation: pop-zwaai .8s ease-in-out; }
.poppetje[data-actie=omkijk], .piloot[data-actie=omkijk] g > svg { animation: pop-omkijk .8s ease-in-out; }
.poppetje[data-actie=rek], .piloot[data-actie=rek] g > svg { animation: pop-rek .8s ease-in-out; }
.poppetje:is([data-actie=hup], [data-actie=duim]), .piloot:is([data-actie=hup], [data-actie=duim]) g > svg { animation: pop-hup .42s ease-out; }
.poppetje[data-actie=stap], .piloot[data-actie=stap] g > svg { animation: pop-hup .43s ease-out 2; }
.poppetje[data-actie=oeps], .piloot[data-actie=oeps] g > svg { animation: schud .4s; }
.poppetje[data-actie=voet], .piloot[data-actie=voet] g > svg { animation: pop-voet .7s ease-in-out infinite; }
:is(.poppetje,.piloot)[data-actie=stap]::after,
:is(.poppetje,.piloot)[data-actie=slaap]::after {
  content: '✦ ★ ✧';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--citroen);
  font: 800 3vh var(--titel);
  -webkit-text-stroke: .08em var(--inkt);
  paint-order: stroke fill;
}
:is(.poppetje,.piloot)[data-actie=slaap]::after { content: 'z Z'; color: white; }
@keyframes pop-tik { 50% { scale: 1 .98; } }
@keyframes pop-zwaai { 25%, 65% { rotate: -6deg; } 45% { rotate: 5deg; } }
@keyframes pop-omkijk { 35%, 70% { scale: -1 1; } }
@keyframes pop-rek { 55% { scale: .94 1.10; } 85% { scale: 1.02 .98; } }
@keyframes pop-hup { 45% { translate: 0 -3vh; } 80% { scale: 1.04 .97; } }
@keyframes pop-voet { 55% { rotate: -2deg; } }
@media (prefers-reduced-motion: reduce) {
  .wereld *, .wereld *::after { animation: none !important; transition: none !important; }
}

.hand, .ophand { isolation: isolate; }
.vingerkleur {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.gekleurde-handen .vingerkleur { display: block; }
.handen-klaar { display: grid; align-content: center; justify-items: center; gap: 1vh; }
.handen-klaar h2 { font-size: 7vh; }
.handen-klaar p { font-size: 3.4vh; }
.handen-klaar .nieuwe-toetsen { position: static; }
.nieuwe-toetsen { align-items: center; font: 800 3.6vh var(--titel); }
[data-fase="handen"] .bobbel .tastpunt {
  opacity: 1;
  z-index: 5;
  background: var(--inkt);
  box-shadow: 0 0 .8vh .4vh white;
}
[data-fase="handen"] .bobbel { z-index: 4; }
[data-fase="handen"] .bobbel.gevoeld { background: var(--mint); }
@media (prefers-reduced-motion: no-preference) {
  [data-fase="handen"] .bobbel:not(.gevoeld) .tastpunt { animation: voel-bobbel .7s ease-in-out infinite alternate; }
}
@keyframes voel-bobbel { to { box-shadow: 0 0 1.5vh .9vh var(--citroen); } }
