/* fatbite.css: Win een fatbite, de speelpagina (narrenbesluit 0012, skill fatbite-spel, ontwerp §7).
   Alleen geladen door fatbite.cgi (vierde argument van begin). Krijtpapier van de site; kermisgoud en
   jackpot-roze alleen voor winkel, kisten en pop-up-knoppen. Knipperen hooguit 1x per seconde, en alles
   staat stil bij prefers-reduced-motion. */

.fatbite-pagina { --krijt: #ffc400; --goud: #ffc400; --roze: #ff2e88; --grijs: #6b6b6b; padding-bottom: 7rem; }
.fatbite-pagina.ton-wint { padding-bottom: 2rem; }

/* ---------- de kop ---------- */
.spel-kop { padding-top: 1rem; }
.spel-kop .info {
  position: absolute; right: 0; top: 1rem; width: 48px; height: 48px; padding: 0; border-radius: 50%;
  font: 700 1.3rem/1 var(--kinderhand);
}
.seizoen { margin: 0 auto .5rem; max-width: 40rem; font-size: .95rem; }
.event {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .6rem;
  margin: 0 auto .6rem; padding: .35rem 1rem; background: #fff; border: 4px solid var(--roze);
  border-radius: var(--wiebel-2); font-family: var(--kinderhand); rotate: -1deg;
}
.event .klok { font: 700 1.15rem/1 ui-monospace, monospace; color: #c2185b; }
.event .dubbelpunt { animation: knipper 1s steps(2, jump-none) infinite; }
.event small { flex-basis: 100%; font-size: .85rem; }
.tellers { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.teller { min-height: 44px; padding: .3rem .8rem; font-size: 1rem; gap: .4rem; }
.teller img { width: 1.5rem; height: 1.5rem; }
.teller span[id] { font-weight: 700; }
.vlammetje {
  display: inline-block; width: 1rem; height: 1.3rem; background: #fb8c00; border: 3px solid var(--inkt);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; rotate: 8deg;
}
.uitleg-regel { min-height: 1.5em; margin: .4rem auto 0; max-width: 40rem; font-size: .95rem; }
.speeldag { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; justify-content: center; margin: .25rem auto 0; max-width: 40rem; }
.speeldag p { margin: 0; flex-basis: 100%; }
.speeldag small { font-size: .85rem; }
.geen-js { max-width: 40rem; margin: 1rem auto; padding: 1rem 1.5rem; }

/* ---------- het spel: één kolom, vanaf 48rem twee ---------- */
.spel { max-width: 72rem; margin: 1rem auto 0; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) {
  .spel { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .spel .menu, .spel .onderin { grid-column: 1 / -1; }
}
.paneel { padding: 1rem 1.1rem 1.25rem; text-align: center; }
.fiets-paneel { rotate: -.5deg; }
.kisten-paneel { rotate: .5deg; --krijt: var(--roze); }
.sjaak { font-size: 1.1rem; min-height: 44px; }
.fiets-plek { position: relative; margin: .5rem auto 0; max-width: 20rem; }
.fiets { display: block; width: 100%; height: auto; }
.sticker {
  display: inline-block; margin: .25rem 0 0; padding: .2rem .7rem; background: #e53935; color: #fff;
  border: 3px solid var(--inkt); border-radius: 999px; font: 700 .95rem/1.3 var(--kinderhand); rotate: -3deg;
}
.sticker small { font-weight: 400; font-size: .8rem; }
.sticker.klein { position: absolute; right: .3rem; top: .3rem; font-size: .8rem; rotate: 6deg; }
.onderdelen-tekst { margin: .75rem 0 .25rem; font-family: var(--kinderhand); }
.onderdelen { display: flex; gap: .35rem; justify-content: center; margin: 0; padding: 0; list-style: none; }
.onderdelen .vak {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; min-width: 44px;
  min-height: 44px; padding: 0; font: 700 1rem/1 var(--kinderhand); background: #fff; border: 3px solid var(--inkt);
  border-radius: 8px; box-shadow: none;
}
.onderdelen .heb .vak { background: #90caf9; }
.onderdelen li:last-child .vak { border-style: dashed; }
.grindmuur { margin: .75rem auto 0; max-width: 26rem; font-size: .95rem; }
.grindmuur .tik { min-height: 44px; padding: .2rem .8rem; font-size: .95rem; background: var(--goud); }

/* de hometrainer: de fiets op een standaard van krijt */
.hometrainer { margin-top: 1rem; padding-top: .75rem; border-top: 4px dashed var(--inkt); }
.op-standaard {
  display: block; width: min(14rem, 70%); height: auto; margin: 0 auto; padding-bottom: .6rem;
  border-bottom: 10px solid #8d6e63; border-radius: 0 0 40% 40% / 0 0 12px 12px;
}
.op-standaard.trapt { animation: trap .25s ease; }
@keyframes trap { 50% { translate: 0 -3px; rotate: -1deg; } }
.trap {
  width: 100%; min-height: 64px; margin-top: .75rem; font: 700 1.6rem/1 var(--kinderhand); letter-spacing: .05em;
  background: var(--goud); border-color: var(--inkt); box-shadow: 4px 5px 0 var(--roze);
}
.trap.op { background: #e0e0e0; color: #616161; box-shadow: none; cursor: not-allowed; }
.trap.op::after { content: "\29D7"; margin-left: .5rem; }        /* een zandloper, getekend door het font */
.combo { min-height: 1.5em; margin: .4rem 0 0; font: 700 1.2rem/1.2 var(--kinderhand); color: #c2185b; }
.balk {
  display: flex; gap: 2px; height: 1.1rem; margin: .35rem auto 0; padding: 2px; max-width: 24rem;
  background: #fff; border: 3px solid var(--inkt); border-radius: 8px;
}
.kuit span { flex: 1; border-radius: 3px; background: #eeeeee; }
.kuit span.vol { background: #43a047; }
.kuit-tekst { margin: .25rem 0 0; font-size: .95rem; }
.kuit-op p { margin: .5rem 0; font-family: var(--kinderhand); }
.knoppen { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.knoppen button { font-size: 1rem; }

/* ---------- de kisten, het rad en de pity ---------- */
.welkom {
  margin: 0 0 .75rem; padding: .6rem .8rem; background: #fff8e1; border: 4px solid var(--goud);
  border-radius: var(--wiebel); font: 1.15rem/1.3 var(--kinderhand); box-shadow: 0 0 14px 2px rgba(255, 196, 0, .7);
  animation: schuif .6s ease-out;
}
@keyframes schuif { from { translate: 0 -1.5rem; opacity: 0; } }
.kisten { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .9rem; margin: 0; padding: 0; list-style: none; }
.kist {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .6rem;
  background: #fff; border: 4px solid var(--inkt); border-radius: var(--wiebel-2);
}
.kist img { width: 6rem; height: auto; }
.kist p { margin: 0; font-size: .9rem; line-height: 1.25; }
.kist-zadeltas img { filter: hue-rotate(160deg) saturate(1.3); }
.kist-goud { box-shadow: 0 0 12px 2px rgba(255, 196, 0, .8); }
.kist-goud img { filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.1); }
.kist button { width: 100%; flex-direction: column; gap: 0; font-size: 1.1rem; background: var(--goud); }
.kist button small { font-size: .75rem; line-height: 1.2; }
.kist button.tien { background: #fff; }
.kist button:disabled { background: #eeeeee; color: #616161; cursor: not-allowed; box-shadow: none; }
.kist > small button { font-size: .8rem; min-height: 44px; padding: .2rem .5rem; background: #fff; }

.rad-plek { position: relative; margin: 1rem auto 0; }
.wijzer {
  position: relative; z-index: 1; width: 0; height: 0; margin: 0 auto -.6rem;
  border: .9rem solid transparent; border-top: 1.4rem solid var(--inkt); border-bottom: 0;
}
.rad {
  position: relative; width: min(15rem, 80vw); aspect-ratio: 1; margin: 0 auto; border: 5px solid var(--inkt);
  border-radius: 50%; overflow: hidden;
  background: conic-gradient(var(--goud) 0 45deg, #fff 45deg 90deg, #ffe0b2 90deg 135deg, #fff 135deg 180deg,
    #e3f2fd 180deg 225deg, #fff 225deg 270deg, #f3e5f5 270deg 315deg, #fff 315deg 360deg);
}
.rad::after { content: ""; position: absolute; inset: 42%; background: var(--inkt); border-radius: 50%; }
.rad-vak {
  position: absolute; left: 50%; top: 50%; font: 700 .8rem/1 var(--kinderhand); white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-5.2rem);
}
@media (max-width: 22rem) { .rad-vak { transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-4.2rem); } }
.rad-vak.fatbike-vak { color: #c2185b; }
.rad-tekst { min-height: 1.5em; margin: .6rem 0 .3rem; }
.rad-tekst b { display: block; font: 700 1.4rem/1.2 var(--kinderhand); color: #c2185b; }
.onzichtbaar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kaartjes { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 0; padding: 0; list-style: none; }
.kaartje {
  padding: .35rem .6rem; font-size: .9rem; border: 3px solid var(--inkt); border-radius: 8px; rotate: -1deg;
  background: #eeeeee; transition: background .3s ease;
}
.kaartje:nth-child(even) { rotate: 1deg; }
.kaartje.zeldzaam { background: #90caf9; }
.kaartje.episch { background: #ce93d8; }
.kaartje.goud, .kaartje.legendarisch { background: var(--goud); border-color: var(--roze); }
.kaartje.gratis { background: #fff; border-style: dashed; }
.pity-tekst { margin: 1rem 0 0; font-family: var(--kinderhand); }
.balk.pity { display: block; }
.balk.pity span { display: block; height: 100%; width: 0; background: var(--roze); border-radius: 4px; transition: width .4s ease; }
.wissel { margin-top: 1rem; padding: .75rem; border: 4px dashed var(--inkt); border-radius: var(--wiebel); }
.wissel p { margin: 0 0 .5rem; }
.wissel small { font-size: .78rem; }
.restje { font-size: .85rem; margin: .5rem 0 0; }
button:disabled { opacity: .7; cursor: not-allowed; }

/* ---------- menu, ticker, ouderstrook, uitweg ---------- */
.menu { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .25rem .6rem; scrollbar-width: thin; }
.menu button { flex: 0 0 auto; font-size: 1rem; }
.onderin { text-align: center; }
.ticker { min-height: 1.5em; margin: 0; font-family: var(--kinderhand); }
.verzonnen { margin: .1rem 0 .6rem; }
.ouderstrook { margin: 0 auto; max-width: 40rem; padding: .5rem .8rem; background: #fff; border: 3px solid var(--inkt); border-radius: 10px; font-size: .9rem; }
.uitweg-plek { margin: .6rem 0 0; text-align: center; }
.uitweg {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 .3rem;
  font: 14px/1.2 var(--letter); color: var(--grijs); text-decoration: underline;
}
.fatbite-pagina > .uitweg-plek { margin-top: 1rem; }

/* Bandje rechtsonder, met een wolkje */
.bandje { position: fixed; right: .5rem; bottom: .5rem; z-index: 3; display: flex; align-items: flex-end; gap: .25rem; pointer-events: none; }
.bandje img { width: 4.5rem; height: auto; }
.wolkje {
  max-width: 14rem; margin: 0 0 3rem; padding: .5rem .75rem; background: #fff; border: 3px solid var(--inkt);
  border-radius: var(--wiebel); font: .95rem/1.3 var(--kinderhand); box-shadow: 3px 4px 0 var(--goud);
}
/* toasts (en de nep-pushmelding) rechtsboven */
.toast {
  position: fixed; top: .75rem; right: .75rem; left: auto; z-index: 4; max-width: min(22rem, calc(100vw - 1.5rem));
  padding: .6rem .9rem; background: #fff; border: 4px solid var(--inkt); border-radius: 12px;
  box-shadow: 4px 5px 0 var(--roze); font-size: .95rem;
}
.toast.push { border-radius: 18px; background: #f5f5f5; }

/* ---------- de applauspagina (?doe=cheat) ---------- */
.applaus-vel { max-width: 40rem; margin: 2rem auto; padding: 1.5rem 2rem; text-align: center; }
.applaus-vel img { width: min(8rem, 45%); height: auto; }
.applaus-vel h1 { margin: .5rem 0; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.applaus-vel p { text-align: left; }
.applaus-vel .knoppen { align-items: center; justify-content: space-between; }

/* ---------- de pop-up: onderblad op een telefoon, kaart op een tablet ---------- */
.popup {
  width: 100%; max-width: 100%; margin: auto 0 0; padding: 1rem 1.1rem .6rem; max-height: 88vh; overflow: auto;
  color: var(--inkt); background: var(--papier); border: 5px solid var(--inkt); border-bottom: 0;
  border-radius: 22px 22px 0 0;
}
@media (min-width: 48rem) {
  .popup { width: 28rem; margin: auto; border-bottom: 5px solid var(--inkt); border-radius: var(--wiebel); rotate: -1deg; box-shadow: 8px 10px 0 var(--goud); }
}
.popup::backdrop { background: rgba(43, 43, 43, .55); }
.popup-kop { display: flex; align-items: flex-start; gap: .5rem; }
.popup-kop h2 { flex: 1; margin: .2rem 0 .4rem; font-size: 1.45rem; line-height: 1.2; }
.kruisje { flex: 0 0 auto; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; font-size: 1.6rem; line-height: 1; border-radius: 50%; }
.popup p { margin: .4rem 0; }
.popup .knoppen { margin: .8rem 0 .2rem; }
button.groot { font-weight: 700; background: var(--goud); border-color: var(--inkt); box-shadow: 3px 4px 0 var(--roze); }
button.klein { font-size: .9rem; padding: .2rem .6rem; min-height: 44px; }
.lint .popup-kop h2 {
  padding: .2rem .5rem; color: #fff; background: var(--roze); border: 3px solid var(--inkt); border-radius: 6px; rotate: -2deg;
}
.antwoord { min-height: 1.4em; font-family: var(--kinderhand); }
.planken { display: grid; gap: .6rem; margin: .5rem 0; padding: 0; list-style: none; }
.plank {
  display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; align-items: center; padding: .5rem .6rem;
  background: #fff; border: 3px solid var(--inkt); border-radius: 10px;
}
.plank b { font-family: var(--kinderhand); }
.plank .label { grid-column: 1 / -1; justify-self: start; padding: 0 .4rem; font-size: .75rem; color: #fff; background: #e53935; border-radius: 4px; }
.plank .inhoud, .plank .prijs { font-size: .85rem; grid-column: 1; }
.plank .koopknoppen { grid-column: 2; grid-row: 2 / span 3; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.koop { font-weight: 700; background: var(--goud); box-shadow: 3px 4px 0 var(--roze); font-size: 1rem; }
.voorbeeld { min-height: 44px; font-size: .75rem; padding: 0 .4rem; box-shadow: none; border-width: 2px; }
.voetje { font-size: .85rem; }
.strookje-regels { padding-left: 1.1rem; font-size: .95rem; }
.strookje-regels li { margin: .25rem 0; }
.kansen pre { max-width: 100%; overflow-x: auto; padding: .6rem; font-size: .8rem; background: #fff; border: 3px solid var(--inkt); border-radius: 8px; }
.sporen { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.spoor { padding: .5rem; background: #fff; border: 3px solid var(--inkt); border-radius: 10px; font-size: .85rem; }
.spoor h3 { margin: 0 0 .3rem; font: 700 1rem/1.2 var(--kinderhand); }
.spoor ul { margin: 0 0 .5rem; padding-left: 1rem; }
.spoor.plus { background: #fff8e1; border-color: var(--roze); }
.lijst .jij { font-weight: 700; }
.fluweel { border-color: #b71c1c; box-shadow: 0 6px 0 -2px #b71c1c; }
.reclame .fiets.wazig { width: min(16rem, 80%); margin: 0 auto; filter: blur(2px); }
.reclame-teller { font: 700 2rem/1 var(--kinderhand); text-align: center; }

@keyframes tril { 25% { translate: -3px 0; } 50% { translate: 3px 0; } 75% { translate: -2px 0; } }
.kist.tril { animation: tril .4s ease; }

/* ---------- beweging: de kist trilt, het rad draait; stil als dat gevraagd wordt ---------- */
@media (prefers-reduced-motion: reduce) {
  .event .dubbelpunt, .welkom, .op-standaard.trapt, .kist.tril { animation: none; }
  .rad, .balk.pity span, .kaartje { transition: none; }
  .popup { rotate: 0deg; }
}

/* ---------- meer dopamine op de hometrainer (de eigenaar vroeg erom; dat is de grap) ---------- */
.trap { position: relative; overflow: visible; }
.trap:active { translate: 2px 3px; box-shadow: 1px 1px 0 var(--roze); }
.traptplus {
  position: absolute; left: 50%; top: -.3rem; translate: -50% 0; z-index: 2; pointer-events: none;
  font: 700 1.4rem/1 var(--kinderhand); color: #c2185b; text-shadow: 0 1px 0 #fff;
  animation: traptplus .7s ease-out forwards;
}
.traptplus.groot { font-size: 2.1rem; color: var(--roze); }
@keyframes traptplus { to { translate: -50% -2.6rem; opacity: 0; } }
#t-trapcenten { display: inline-block; }
#t-trapcenten.pop { animation: pop .3s ease; }
@keyframes pop { 40% { scale: 1.4; color: var(--roze); } }

/* ---------- de reclame: een zelfhulpcursus die zichzelf nooit afmaakt ---------- */
.reclame-ad { overflow: hidden; margin: 0 0 .4rem; padding: .7rem .8rem; text-align: center;
  background: linear-gradient(#ffffff, #fff5fa); border: 4px solid var(--roze); border-radius: var(--wiebel); }
.reclame-merk { margin: 0; font: 700 1rem/1 var(--kinderhand); letter-spacing: .05em; color: var(--roze); animation: pulseMerk 1.2s ease-in-out infinite; }
.reclame-kop { margin: .2rem 0; font: 800 clamp(1.1rem, 4vw, 1.4rem)/1.1 var(--kinderhand); }
.reclame-film { position: relative; height: 86px; margin: .3rem 0; overflow: hidden; border-bottom: 4px dashed var(--inkt); }
.reclame-loper { position: absolute; bottom: 2px; left: -130px; width: 120px; height: auto; animation: loper 2.2s linear infinite; }
.reclame-balk { height: .8rem; max-width: 18rem; margin: .3rem auto; overflow: hidden; background: #eee; border: 2px solid var(--inkt); border-radius: 6px; }
.reclame-groei { display: block; height: 100%; width: 2%; background: var(--goud); animation: groei 2.4s ease-in-out infinite; }
.reclame-slogan { margin: .3rem 0 0; font-size: .95rem; }
.reclame-klein { margin: .2rem 0 0; font-size: .75rem; color: #777; }
@keyframes pulseMerk { 50% { scale: 1.08; } }
@keyframes loper { to { transform: translateX(calc(100% + 420px)); } }   /* rijdt eindeloos, komt nergens */
@keyframes groei { 0% { width: 2%; } 70% { width: 92%; } 100% { width: 2%; } }   /* groeit, valt terug, nooit 100% */

@media (prefers-reduced-motion: reduce) {
  .traptplus, #t-trapcenten.pop, .reclame-merk, .reclame-loper, .reclame-groei { animation: none; }
  .reclame-loper { left: 38%; } .reclame-groei { width: 60%; }
}
