/* Zaagmeester – stijl. Vrolijk, plat, rond, met een donkerbruine omlijning. */

:root {
  --outline: #3b2a20;   --cream: #fff6e4;     --panel: #f4ecdc;
  --wood-light: #f3d4a0; --wood: #e8b878;    --wood-mid: #c98a4b; --wood-dark: #8a5a2b;
  --leaf: #5aa845;      --leaf-dark: #3d7f34; --leaf-light: #8fd16a;
  --yellow: #ffc93c;    --yellow-dark: #e0a21c;
  --red: #e2553f;       --blue: #4aa3df;      --purple: #8e6cd9;
  --metal: #aeb9c2;     --metal-dark: #6b7780; --grass: #7cc95a;

  --rand: 3px solid var(--outline);
  --rond: 16px;
  --schaduw: 0 5px 0 var(--outline);
  --boven-hoogte: 60px;
  --nav-hoogte: 68px;
  --zij-breedte: 96px;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--outline);
  background: var(--grass);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Achtergrond als vaste laag (werkt ook op iPhone, waar background-attachment: fixed niet werkt) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--grass) url('../assets/backgrounds/bg_portrait.svg') center / cover no-repeat;
}
@media (min-width: 900px), (orientation: landscape) {
  body::before { background-image: url('../assets/backgrounds/bg_landscape.svg'); }
}

img { -webkit-user-drag: none; user-select: none; }
button { font-family: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .6em; }

/* ---------- knoppen en panelen ---------- */
.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 14px;
  border: var(--rand);
  border-radius: var(--rond);
  background: var(--cream);
  box-shadow: var(--schaduw);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .06s, box-shadow .06s, background-color .15s;
  user-select: none;
  position: relative;
  top: 0;
}
.knop:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.knop img { width: 24px; height: 24px; flex: none; }
.knop-geel { background: var(--yellow); }
.knop-geel:hover:not(:disabled) { background: #ffd35f; }
.knop-groen { background: var(--leaf); color: #fff; text-shadow: 0 1px 0 var(--outline); }
.knop-groen:hover:not(:disabled) { background: #67b852; }
.knop-paars { background: var(--purple); color: #fff; text-shadow: 0 1px 0 var(--outline); }
.knop-blauw { background: var(--blue); color: #fff; text-shadow: 0 1px 0 var(--outline); }
.knop-rood { background: var(--red); color: #fff; text-shadow: 0 1px 0 var(--outline); }
.knop-groot { min-height: 54px; font-size: 1.15rem; padding: 8px 20px; width: 100%; }
.knop:disabled, .knop.op-slot {
  background: var(--metal);
  color: #4a535a;
  text-shadow: none;
  cursor: not-allowed;
}
.knop .slot { display: none; }
.knop.op-slot .slot { display: inline-block; }

.paneel {
  background: var(--cream);
  border: var(--rand);
  border-radius: 18px;
  box-shadow: 0 6px 0 rgba(59, 42, 32, .35);
  padding: 16px;
}

.sluit-knop {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.sluit-knop img { width: 40px; height: 40px; }

/* ---------- inlogpagina ---------- */
.inlogpagina { display: flex; align-items: center; justify-content: center; padding: 16px; }
.inlog-doos { width: 100%; max-width: 420px; text-align: center; }
.inlog-logo { width: 100%; height: auto; margin-bottom: 12px; filter: drop-shadow(0 4px 0 rgba(59,42,32,.3)); }
.inlog-paneel { text-align: left; }
.tabjes { display: flex; gap: 8px; margin-bottom: 14px; }
.tabje {
  flex: 1;
  min-height: 46px;
  border: var(--rand);
  border-radius: 14px;
  background: var(--panel);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.tabje.actief { background: var(--yellow); box-shadow: inset 0 -4px 0 var(--yellow-dark); }
.inlog-form label { display: block; font-weight: 600; margin-bottom: 12px; }
.inlog-form input {
  display: block;
  width: 100%;
  margin-top: 4px;
  min-height: 46px;
  padding: 8px 12px;
  border: var(--rand);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 1.05rem;
}
.inlog-form input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.inlog-form .knop { margin-top: 6px; }
.foutmelding {
  background: #fde3de;
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  color: #9c2a19;
}
.inlog-voet { margin-top: 14px; font-weight: 600; color: var(--cream); text-shadow: 0 2px 0 var(--outline); }

/* ---------- spelpagina: indeling ---------- */
.spelpagina { overflow-x: hidden; }

#bovenbalk {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--boven-hoogte);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--wood);
  border-bottom: var(--rand);
  box-shadow: 0 4px 0 rgba(59,42,32,.25);
}
.teller {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 2px 8px 2px 4px;
  background: var(--cream);
  border: var(--rand);
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  min-width: 0;
}
.teller img { width: 30px; height: 30px; flex: none; }
.teller-munten { flex: 1 1 auto; }
.teller-munten .tekst { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.teller-munten b { font-size: 1.1rem; }
.teller-munten small { font-size: .72rem; font-weight: 600; color: var(--wood-dark); }
.teller-boost { cursor: pointer; font-family: inherit; color: inherit; }
.teller-boost.actief { background: var(--yellow); animation: pols 1.6s ease-in-out infinite; }
.teller-klein b { font-size: .95rem; }

#navigatie {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  height: calc(var(--nav-hoogte) + var(--veilig-onder));
  padding-bottom: var(--veilig-onder);
  background: var(--wood);
  border-top: var(--rand);
}
.nav-knop {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  min-width: 44px;
}
.nav-knop img { width: 34px; height: 34px; transition: transform .15s; }
.nav-knop.actief { background: var(--wood-light); box-shadow: inset 0 4px 0 var(--yellow-dark); }
.nav-knop.actief img { transform: scale(1.12); }
.nav-stip {
  position: absolute;
  top: 6px; right: calc(50% - 24px);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--outline);
}

#inhoud {
  padding: calc(var(--boven-hoogte) + 12px) 12px calc(var(--nav-hoogte) + var(--veilig-onder) + 16px);
  max-width: 100%;
}
.tab { display: none; }
.tab.actief { display: block; }
.tab-paneel { max-width: 720px; margin: 0 auto 16px; }

@media (min-width: 900px) {
  #bovenbalk { left: var(--zij-breedte); padding: 6px 16px; gap: 10px; }
  .teller-munten { flex: 0 1 auto; min-width: 200px; }
  #navigatie {
    top: 0; bottom: 0; right: auto;
    width: var(--zij-breedte);
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 0;
    border-top: 0;
    border-right: var(--rand);
  }
  .nav-knop { flex: 0 0 88px; font-size: .8rem; }
  .nav-knop.actief { box-shadow: inset 4px 0 0 var(--yellow-dark); }
  .nav-logo { display: block !important; width: 72px; margin: 4px auto 10px; }
  #inhoud { margin-left: var(--zij-breedte); padding: calc(var(--boven-hoogte) + 16px) 16px 24px; }
}
.nav-logo { display: none; }

/* ---------- locatie-tabs ---------- */
.locatie-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}
.locatie-tab {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 4px 12px 4px 6px;
  border: var(--rand);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 4px 0 var(--outline);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
}
.locatie-tab img { width: 30px; height: 38px; object-fit: contain; }
.locatie-tab .slot-icoon { width: 24px; height: 24px; }
.locatie-tab.actief { background: var(--yellow); }
.locatie-tab.dicht { background: #ddd3c2; color: #6d5d50; }
.locatie-tab.dicht.betaalbaar { background: var(--leaf-light); color: var(--outline); animation: pols 1.4s ease-in-out infinite; }
.locatie-tab small { display: block; font-size: .72rem; font-weight: 600; line-height: 1; }
.locatie-tab .naam { line-height: 1.05; text-align: left; }

/* ---------- fabriek ---------- */
.fabriek {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  margin: 0 auto;
}
.station {
  position: relative;
  width: 100%;
  background: var(--cream);
  border: var(--rand);
  border-radius: 18px;
  box-shadow: 0 6px 0 rgba(59,42,32,.35);
  padding: 8px 10px 10px;
}
.station.goud {
  border-color: #8a5a00;
  background: linear-gradient(#fff6e4, #fff0c4);
  box-shadow: 0 0 0 3px var(--yellow), 0 6px 0 rgba(59,42,32,.35);
}
.station-kop { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 700; }
.station-naam { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-lvl {
  flex: none;
  background: var(--wood-dark);
  color: var(--cream);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: .85rem;
}
.station-scene {
  position: relative;
  height: 116px;
  margin: 4px 0 6px;
}
.gebouw-knop {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 62%;
  max-width: 170px;
  aspect-ratio: 192 / 160;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.gebouw-knop img { width: 100%; height: 100%; display: block; transition: transform .1s; }
.gebouw-knop:active img { transform: scale(.94); }
.station.werkt .gebouw-knop img { animation: werk-hobbel .5s ease-in-out infinite; }

/* station 1: bomen links, hut rechts */
.station[data-si="0"] .gebouw-knop { left: auto; right: 0; transform: none; width: 46%; }
.bomen { position: absolute; left: 0; bottom: 0; width: 58%; height: 100%; }
.boom {
  position: absolute;
  bottom: 0;
  width: 40%;
  aspect-ratio: 128 / 160;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  transform-origin: 50% 100%;
}
.boom:nth-child(1) { left: 0; bottom: 6px; z-index: 1; }
.boom:nth-child(2) { left: 28%; z-index: 2; width: 44%; }
.boom:nth-child(3) { left: 58%; bottom: 10px; z-index: 1; width: 36%; }
.boom .boom-img { width: 100%; height: 100%; display: block; transform-origin: 50% 100%; }
.boom.gekapt .boom-img { animation: none; }
.boom.groeit .boom-img { animation: groei .6s cubic-bezier(.3,1.6,.5,1); }
.boom.geraakt .boom-img { animation: schud .3s; }
.bijl {
  position: absolute;
  right: -12%;
  top: 30%;
  width: 55%;
  opacity: 0;
  pointer-events: none;
  transform-origin: 20% 90%;
}
.boom.hakt .bijl { animation: hak .35s ease-out; }

.figuur { position: absolute; bottom: 0; width: 44px; height: 44px; pointer-events: none; transform-origin: 50% 100%; }
.houthakker { left: 44%; z-index: 3; width: 48px; height: 48px; }
.station.werkt .houthakker { animation: wiebel .4s ease-in-out infinite alternate; }
.manager-figuur { right: 2px; z-index: 3; }
.station[data-si="0"] .manager-figuur { right: auto; left: calc(44% + 34px); }
.station.heeft-manager .manager-figuur { animation: knik 2.4s ease-in-out infinite; }

/* station 4: opslag + vrachtwagen */
.station[data-si="3"] .gebouw-knop { left: 0; transform: none; width: 54%; }
.vrachtwagen {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 56%;
  max-width: 170px;
  aspect-ratio: 256 / 128;
  pointer-events: none;
}
.vrachtwagen.rijdt { animation: rijden 1.3s ease-in-out; }

.knelpunt-label {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--outline);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  animation: knipper 1.2s ease-in-out infinite;
  pointer-events: none;
}
.rij-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  z-index: 5;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--outline);
  border-radius: 10px;
  padding: 0 7px;
  font-size: .8rem;
  font-weight: 700;
  pointer-events: none;
}
.station[data-si="0"] .rij-label { left: auto; right: 4px; }
.tik-hint {
  position: absolute;
  top: 18px;
  right: 12%;
  width: 34px;
  pointer-events: none;
  z-index: 4;
  animation: tik-hint 1.1s ease-in-out infinite;
}

.voortgang {
  height: 14px;
  border: 2px solid var(--outline);
  border-radius: 8px;
  background: #e6dccb;
  overflow: hidden;
  margin-bottom: 8px;
}
.voortgang-balk {
  height: 100%;
  width: 100%;
  background: var(--leaf);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.station.heeft-manager .voortgang-balk { background: var(--blue); }

.station-knoppen { display: flex; gap: 6px; }
.upgrade-knop { flex: 1; font-size: .95rem; padding: 4px 8px; }
.upgrade-knop .prijs { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.upgrade-knop small { font-size: .7rem; font-weight: 600; }
.upgrade-knop.betaalbaar { animation: pols 1.6s ease-in-out infinite; }

/* lopende banden */
.band {
  position: relative;
  flex: none;
  width: 52px;
  height: 64px;
  overflow: hidden;
  margin: -2px 0;
  z-index: 1;
}
.band-strook {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 512px;
  height: 48px;
  margin: -24px 0 0 -256px;
  background: url('../assets/buildings/conveyor_tile.svg') 0 0 / 128px 48px repeat-x;
  transform: rotate(90deg);
  animation: band 1s linear infinite;
}
.band.stil .band-strook { animation-play-state: paused; }
.band-item {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 32px;
  margin-left: -20px;
  object-fit: contain;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.2));
}
.band-teller {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: .7rem;
  font-weight: 700;
  background: var(--cream);
  border: 2px solid var(--outline);
  border-radius: 8px;
  padding: 0 4px;
  z-index: 2;
  display: none;
}

@media (min-width: 900px) {
  .fabriek { flex-direction: row; align-items: center; max-width: 1400px; padding-top: 4vh; }
  .station { flex: 1 1 220px; min-width: 150px; max-width: 310px; }
  .station-scene { height: 180px; }
  .band { flex: 1 1 40px; min-width: 36px; max-width: 120px; width: auto; height: 52px; margin: 0 -3px; }
  .band-strook { width: 1024px; margin-left: -512px; transform: none; }
  .band-item { top: 50%; left: 0; margin: -22px 0 0 0; }
  .band-teller { top: auto; bottom: -20px; right: 50%; transform: translateX(50%); }
}

/* ---------- stationpaneel (onderaan op mobiel, rechts op PC) ---------- */
.station-paneel {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 60;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + var(--veilig-onder));
  transform: translateY(105%);
  transition: transform .25s cubic-bezier(.3,.9,.4,1);
  visibility: hidden;
}
.station-paneel.open { transform: translateY(0); visibility: visible; }
@media (min-width: 900px) {
  .station-paneel {
    left: auto;
    top: calc(var(--boven-hoogte) + 12px);
    right: 12px;
    bottom: auto;
    width: 370px;
    max-height: calc(100vh - var(--boven-hoogte) - 24px);
    border-radius: 18px;
    transform: translateX(115%);
  }
  .station-paneel.open { transform: translateX(0); }
}
.paneel-kop { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-right: 44px; }
.paneel-kop img { width: 84px; height: 70px; flex: none; }
.paneel-kop h3 { margin: 0; }
.paneel-kop p { margin: 0; color: var(--wood-dark); font-weight: 600; }
.p-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.p-stat { background: var(--panel); border: 2px solid var(--outline); border-radius: 12px; padding: 6px 10px; }
.p-stat > span { display: block; font-size: .8rem; font-weight: 600; color: var(--wood-dark); }
.p-stat b { font-size: 1.05rem; }
.p-stat .pijl { color: var(--leaf-dark); }
.p-stat.breed { grid-column: 1 / -1; }
.aantal-keuze { display: flex; gap: 6px; margin-bottom: 12px; }
.aantal-keuze .knop { flex: 1; padding: 4px; box-shadow: 0 3px 0 var(--outline); }
.aantal-keuze .knop.actief { background: var(--blue); color: #fff; text-shadow: 0 1px 0 var(--outline); }
.p-manager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 14px;
}
.p-manager img { width: 56px; height: 56px; flex: none; }
.p-manager .tekst { flex: 1; font-weight: 600; line-height: 1.2; }
.p-manager small { display: block; font-weight: 500; color: var(--wood-dark); }

.achtergrond-dimmer {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(59,42,32,.25);
}
@media (min-width: 900px) { .achtergrond-dimmer { background: transparent; } }

/* ---------- lijsten (managers, winkel, vrienden) ---------- */
.lijst { display: flex; flex-direction: column; gap: 8px; }
.rij {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 14px;
}
.rij > img { width: 48px; height: 48px; flex: none; object-fit: contain; }
.rij .tekst { flex: 1; min-width: 0; line-height: 1.2; }
.rij .tekst b { display: block; }
.rij .tekst small { color: var(--wood-dark); font-weight: 600; }
.rij .knop { flex: none; }
.rij.ik { background: #fff0c4; border-color: var(--yellow-dark); box-shadow: 0 0 0 2px var(--yellow); }
.rij.klaar { opacity: .75; }
.plek {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wood-light);
  border: 2px solid var(--outline);
  font-weight: 700;
}
.plek.p1 { background: var(--yellow); }
.plek.p2 { background: #dfe6ea; }
.plek.p3 { background: #e9b37e; }
.kopje { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kopje img { width: 44px; height: 44px; }
.kopje h2, .kopje h3 { margin: 0; }
.uitleg-tekst { color: #5c4636; }
.grote-getal { font-size: 1.6rem; font-weight: 700; }
.knoppenrij { display: flex; flex-wrap: wrap; gap: 8px; }
.knoppenrij .knop { flex: 1 1 160px; }
.leeg { text-align: center; color: var(--wood-dark); font-weight: 600; padding: 12px; }
.instelling { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px dashed #e0d3bd; }
.instelling:last-child { border-bottom: 0; }
.instelling .label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.instelling .label img { width: 36px; height: 36px; }

/* ---------- venster (modal) ---------- */
.modal-achter {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(59,42,32,.55);
  animation: vervaag-in .2s;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: plop-in .3s cubic-bezier(.3,1.5,.5,1);
}
.modal-icoon { width: 96px; height: 96px; margin: -4px auto 6px; display: block; }
.modal .bedrag { font-size: 2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 12px; }
.modal .bedrag img { width: 40px; height: 40px; }
.modal .knoppen { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

/* ---------- meldingen (toasts) ---------- */
#meldingen {
  position: fixed;
  top: calc(var(--boven-hoogte) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 420px;
}
.melding {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: var(--rand);
  border-radius: 14px;
  padding: 6px 14px 6px 8px;
  font-weight: 600;
  box-shadow: 0 4px 0 rgba(59,42,32,.35);
  animation: melding-in .3s cubic-bezier(.3,1.5,.5,1);
}
.melding img { width: 30px; height: 30px; flex: none; }
.melding.weg { animation: melding-uit .3s forwards; }

/* ---------- effecten ---------- */
#fx-laag { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.deeltje { position: absolute; top: 0; left: 0; width: 22px; height: 22px; will-change: transform, opacity; }
.vliegmunt { position: absolute; top: 0; left: 0; width: 28px; height: 28px; will-change: transform, opacity; }
.zweeftekst {
  position: absolute;
  top: 0; left: 0;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--yellow);
  -webkit-text-stroke: 1.5px var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--outline);
  white-space: nowrap;
  will-change: transform, opacity;
}
.teller-munten.ping img { animation: ping .3s; }

/* ---------- uitleg voor nieuwe spelers ---------- */
#uitleg { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
.uitleg-hand { position: absolute; width: 56px; height: 56px; animation: tik-hint 1.1s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.uitleg-ballon {
  position: absolute;
  max-width: 260px;
  background: var(--cream);
  border: var(--rand);
  border-radius: 14px;
  padding: 8px 12px;
  font-weight: 600;
  box-shadow: 0 4px 0 rgba(59,42,32,.35);
}

/* ---------- laadscherm ---------- */
#laadscherm {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--grass);
  font-weight: 700;
  font-size: 1.2rem;
}
#laadscherm img { width: min(80vw, 420px); animation: pols 1.4s ease-in-out infinite; }

/* ---------- debug ---------- */
.debug-knop { position: fixed; top: auto; right: 10px; bottom: calc(var(--nav-hoogte) + var(--veilig-onder) + 10px); z-index: 77; }
.debug-paneel {
  position: fixed;
  right: 10px;
  bottom: calc(var(--nav-hoogte) + var(--veilig-onder) + 66px);
  z-index: 77;
  width: 230px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}
.debug-paneel .knop { min-height: 38px; font-size: .9rem; }
@media (min-width: 900px) {
  .debug-knop { bottom: 12px; }
  .debug-paneel { bottom: 68px; }
}

/* ---------- animaties ---------- */
@keyframes band { from { background-position-x: 0; } to { background-position-x: 128px; } }
@keyframes wiebel { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes knik { 0%, 85%, 100% { transform: translateY(0); } 92% { transform: translateY(-5px); } }
@keyframes werk-hobbel { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, .97); } }
@keyframes hak {
  0% { opacity: 1; transform: rotate(-60deg); }
  60% { opacity: 1; transform: rotate(15deg); }
  100% { opacity: 0; transform: rotate(5deg); }
}
@keyframes schud { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(4deg); } }
@keyframes groei { from { transform: scale(.2); } to { transform: scale(1); } }
@keyframes rijden {
  0% { transform: translateX(0); }
  45% { transform: translateX(140%); opacity: 1; }
  46% { opacity: 0; }
  54% { transform: translateX(-60%); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: translateX(0); }
}
@keyframes knipper { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.1); } }
@keyframes pols { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes tik-hint { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-4px, -8px) scale(.92); } }
@keyframes vervaag-in { from { opacity: 0; } }
@keyframes plop-in { from { transform: scale(.7); opacity: 0; } }
@keyframes melding-in { from { transform: translateY(-20px) scale(.8); opacity: 0; } }
@keyframes melding-uit { to { transform: translateY(-14px); opacity: 0; } }
@keyframes ping { 50% { transform: scale(1.3); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- adminpagina ---------- */
.adminpagina { padding: 16px 12px 40px; }
.admin { max-width: 960px; margin: 0 auto; }
.admin-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-kop img { width: min(320px, 100%); height: auto; filter: drop-shadow(0 3px 0 rgba(59,42,32,.3)); }
.admin-kop .knoppenrij .knop { flex: 0 1 auto; text-decoration: none; }
.admin-melding { font-weight: 600; background: #eaf6e2; border-color: var(--leaf-dark); }
.admin-tegels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tegel { padding: 10px 14px; }
.tegel span { display: block; font-size: .85rem; font-weight: 600; color: var(--wood-dark); }
.tegel b { font-size: 1.6rem; }
.admin-speler { margin-bottom: 14px; }
.admin-speler-kop { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.admin-speler-kop h2 { margin: 0; font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-speler-kop small { font-weight: 600; color: var(--wood-dark); }
.label { font-size: .75rem; padding: 1px 8px; border-radius: 10px; border: 2px solid var(--outline); background: var(--wood-light); }
.label-paars { background: var(--purple); color: #fff; }
.stip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--metal); border: 2px solid var(--outline); vertical-align: -1px; }
.stip.aan { background: var(--leaf); }
.stat-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stat-raster div { background: var(--panel); border: 2px solid var(--outline); border-radius: 12px; padding: 6px 10px; }
.stat-raster span { display: block; font-size: .78rem; font-weight: 600; color: var(--wood-dark); }
.admin-locaties { margin: 10px 0 0; padding-left: 20px; }
.admin-acties { margin-top: 12px; border-top: 2px dashed #e0d3bd; padding-top: 10px; }
.admin-acties summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.admin-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0 12px; }
.admin-form label { flex: 1 1 160px; font-weight: 600; font-size: .9rem; }
.admin-acties .knoppenrij form { flex: 1 1 200px; display: flex; }
.admin-acties .knoppenrij form .knop { flex: 1; }
.veld {
  display: block;
  width: 100%;
  margin-top: 4px;
  min-height: 44px;
  padding: 6px 10px;
  border: var(--rand);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

/* =====================================================================
   Update 1 – "Het Levende Bos"
   ===================================================================== */

/* ---------- bovenbalk en navigatie (6 knoppen) ---------- */
.teller-weer, .teller-reeks { cursor: pointer; font-family: inherit; color: inherit; }
.teller-weer { padding: 2px 6px; }
.teller-reeks b { color: #c4430f; }
.teller-boost.turbo { background: var(--red); color: #fff; }
@media (max-width: 519px) {
  #bovenbalk { gap: 4px; padding: 6px; }
  .teller { padding: 2px 6px 2px 3px; border-radius: 12px; }
  .teller img { width: 24px; height: 24px; }
  .teller-klein b { font-size: .85rem; }
  .teller-munten b { font-size: 1rem; }
  .teller-zaailingen { display: none; }
}
@media (max-width: 399px) {
  .nav-label { display: none; }
  .nav-knop img { width: 36px; height: 36px; }
}
@media (max-width: 899px) {
  .nav-knop { font-size: .66rem; }
}

/* ---------- subtabjes ---------- */
.subtabs {
  display: flex;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto 12px;
  overflow-x: auto;
  padding: 2px 2px 6px;
}
.subtab {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 4px 12px;
  border: var(--rand);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 4px 0 var(--outline);
  font-family: inherit;
  color: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.subtab img { width: 28px; height: 28px; }
.subtab.actief { background: var(--yellow); }
.subtab .nav-stip { top: 2px; right: 4px; }
.subpaneel { display: none; }
.subpaneel.actief { display: block; }
@media (max-width: 399px) {
  .subtab { padding: 4px 8px; font-size: .85rem; }
  .subtab img { width: 24px; height: 24px; }
}

/* ---------- algemene kleine onderdelen ---------- */
.mini-balk {
  height: 10px;
  margin: 4px 0 2px;
  border: 2px solid var(--outline);
  border-radius: 6px;
  background: #e6dccb;
  overflow: hidden;
}
.mini-vul { height: 100%; background: var(--leaf); transform-origin: 0 50%; transform: scaleX(0); }
.vinkje { flex: none; font-size: 1.6rem; color: var(--leaf-dark); font-weight: 700; padding: 0 8px; }
.klein-kopje img { width: 32px; height: 32px; }
.beloning-rij { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1.1rem; margin: 8px 0; }
.beloning-rij img { width: 48px; height: 48px; }
.inline-icoon { width: 28px; height: 28px; vertical-align: middle; }
.knipper { animation: knipper-rood 1s ease-in-out infinite; }
@keyframes knipper-rood { 50% { background-color: #ffd9d2; } }

/* ---------- vrachtwagen in lagen ---------- */
.vrachtwagen > img, .skin-truck > img { position: absolute; display: block; }
.vw-body { left: 0; top: 0; width: 100%; height: 100%; }
.vrachtwagen.rijdt .vw-wiel { animation: wiel-draai .35s linear infinite; }
.vw-vlag {
  position: absolute;
  right: 6%;
  top: -18%;
  width: 26%;
  height: 30%;
  display: none;
  background: linear-gradient(90deg, var(--red) 0 33%, var(--yellow) 33% 66%, var(--blue) 66%);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 85% 100%, 70% 40%, 55% 100%, 40% 40%, 25% 100%, 10% 40%, 0 100%);
  border-top: 3px solid var(--outline);
}
.vrachtwagen.feest .vw-vlag { display: block; }
@keyframes wiel-draai { to { transform: rotate(360deg); } }

/* ---------- bestelbord en bestellingen ---------- */
.bestelbord {
  position: absolute;
  left: 2px;
  top: 0;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.bestelbord img { width: 100%; height: 100%; }
.bestelbord.wacht-op-jou img { animation: pols 1.2s ease-in-out infinite; }
.bestel-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--outline);
  font-size: .7rem;
  font-weight: 700;
  line-height: 14px;
}
.bestel-voortgang {
  position: absolute;
  left: 58px;
  right: 10px;
  top: 38px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
}
.bv-balk { flex: 1; height: 10px; border: 2px solid var(--outline); border-radius: 6px; background: #e6dccb; overflow: hidden; }
.bv-vul { height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }
.bestelling .tekst small { display: block; }

/* ---------- weer en dag/nacht ---------- */
#weer-laag { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.druppel { position: absolute; top: 0; left: 0; width: 14px; height: 14px; will-change: transform; opacity: .85; }
.weer-sneeuw .druppel { width: 16px; height: 16px; }
#flits { position: fixed; inset: 0; z-index: 31; pointer-events: none; background: #fff; opacity: 0; }
#flits.aan { animation: flits .6s ease-out; }
@keyframes flits { 0% { opacity: 0; } 10% { opacity: .7; } 25% { opacity: .1; } 35% { opacity: .5; } 100% { opacity: 0; } }

body::before { transition: filter 2s; }
.weer-regen::before { filter: brightness(.85) saturate(.9); }
.weer-storm::before { filter: brightness(.7) saturate(.8); }
.weer-sneeuw::before { filter: brightness(1.05) saturate(.6); }
.nacht::before { filter: brightness(.6) saturate(.8); }
.nacht.weer-storm::before, .nacht.weer-regen::before { filter: brightness(.5) saturate(.7); }
.weer-storm .boom-img { animation: storm-schud 1.4s ease-in-out infinite; }
.weer-storm .boom:nth-child(2) .boom-img { animation-delay: -.5s; }
.weer-storm .boom:nth-child(3) .boom-img { animation-delay: -.9s; }
@keyframes storm-schud { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(4deg); } }
/* Sneeuw: wit laagje op de daken */
.weer-sneeuw .gebouw-knop::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  top: 6%;
  height: 12%;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #dfe8ee;
  pointer-events: none;
}
/* Nacht: geel raamlicht */
.nacht .gebouw-knop::before {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  top: 40%;
  bottom: 22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 90, .75), rgba(255, 214, 90, 0));
  pointer-events: none;
  z-index: 1;
  animation: raamlicht 3s ease-in-out infinite alternate;
}
@keyframes raamlicht { to { opacity: .6; } }
.nacht .station { background: #f3ead8; }

/* Turbo: alles gaat sneller */
.turbo .band-strook { animation-duration: .3s; }
.turbo .station.werkt .gebouw-knop img { animation-duration: .2s; }
.turbo .teller-munten { box-shadow: 0 0 0 3px var(--red); }

/* ---------- gouden boom ---------- */
.gouden-boom {
  position: absolute;
  bottom: 0;
  z-index: 6;
  width: 34%;
  aspect-ratio: 128 / 160;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: gouden-in .6s cubic-bezier(.3, 1.6, .5, 1);
  touch-action: manipulation;
}
.gouden-boom .gloed { position: absolute; left: -35%; top: -25%; width: 170%; height: 150%; animation: gloed-draai 6s linear infinite; pointer-events: none; }
.gouden-boom .gb-boom { position: relative; width: 100%; height: 100%; animation: gouden-wiebel 1.2s ease-in-out infinite; transform-origin: 50% 100%; }
.gouden-boom.weg { animation: gouden-weg .6s forwards; pointer-events: none; }
@keyframes gouden-in { from { transform: scale(0); } }
@keyframes gouden-weg { to { transform: scale(.4) translateY(30px); opacity: 0; } }
@keyframes gloed-draai { to { transform: rotate(360deg); } }
@keyframes gouden-wiebel { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.05); } }
.zweeftekst.groot { font-size: 2rem; }

/* ---------- hulpdier in de fabriek ---------- */
.huisdier {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
}
.huisdier img { width: 100%; height: 100%; display: block; }
.huisdier-uil { bottom: auto; top: 50%; }

/* ---------- doelen ---------- */
.missie .tekst b { font-size: .98rem; }
.reeks-groot { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.reeks-groot img { width: 56px; height: 56px; }
.reeks-groot b { font-size: 2.6rem; color: #c4430f; line-height: 1; }
.reeks-groot span { font-weight: 600; color: var(--wood-dark); }
.kalender { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kal-dag {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  border: 2px solid var(--outline);
  border-radius: 10px;
  background: var(--panel);
  font-size: .78rem;
  font-weight: 600;
}
.kal-dag b { font-size: 1.05rem; }
.kal-dag.klaar { background: var(--leaf-light); }
.kal-dag.vandaag { box-shadow: 0 0 0 3px var(--yellow); }

/* ---------- hulpdieren ---------- */
.dieren-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dier-kaart {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 14px;
}
.dier-kaart.actief { background: #eaf6e2; border-color: var(--leaf-dark); box-shadow: 0 0 0 3px var(--leaf-light); }
.dier-kaart h3 { margin: 4px 0 0; }
.dier-plaatje { width: 96px; height: 96px; }
.dier-kaart.op-slot .dier-plaatje { filter: grayscale(1) brightness(.8); opacity: .7; }
.dier-niveau { margin: 0; font-weight: 700; color: var(--wood-dark); }
.dier-bonus { font-weight: 700; margin-bottom: 4px; }
.dier-kaart .mini-balk { width: 100%; }
.dier-knoppen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; width: 100%; }
.dier-knoppen .knop { flex: 1 1 100px; }

/* ---------- kennisboom ---------- */
.vrije-zaailingen { display: flex; align-items: center; gap: 6px; font-size: 1.1rem; }
.vrije-zaailingen img { width: 32px; height: 32px; }
.kennisboom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 599px) { .kennisboom { grid-template-columns: 1fr; } }
.kennis-tak { display: flex; flex-direction: column; align-items: stretch; }
.kennis-tak h3 { text-align: center; margin-bottom: 6px; }
.kennis-knop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  margin-bottom: 26px;
  border: var(--rand);
  border-radius: 14px;
  background: var(--metal);
  box-shadow: 0 4px 0 var(--outline);
  font-family: inherit;
  color: var(--outline);
  cursor: pointer;
  text-align: center;
}
.kennis-knop:last-child { margin-bottom: 0; }
/* Lijntje naar de volgende knop */
.kennis-knop:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 6px;
  height: 24px;
  margin-left: -3px;
  background: var(--outline);
  border-radius: 3px;
}
.kennis-knop.gekocht:not(:last-child)::after { background: var(--leaf-dark); }
.kennis-knop small { font-size: .78rem; line-height: 1.2; }
.kennis-knop.beschikbaar { background: var(--cream); }
.kennis-knop.betaalbaar { background: var(--yellow); animation: pols 1.6s ease-in-out infinite; }
.kennis-knop.gekocht { background: var(--leaf-light); }
.kennis-knop.op-slot { opacity: .8; }
.kk-icoon { position: absolute; top: 4px; right: 6px; font-weight: 700; color: var(--leaf-dark); font-size: 1.1rem; }
.kk-icoon img { width: 22px; height: 22px; }
.kk-prijs { display: flex; align-items: center; gap: 4px; font-weight: 700; margin-top: 4px; }
.kk-prijs img { width: 22px; height: 22px; }

/* ---------- kisten ---------- */
.kistenrek { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.kist-plek {
  aspect-ratio: 1;
  border: 2px dashed #cdbb9e;
  border-radius: 12px;
  background: rgba(255, 255, 255, .4);
}
button.kist-plek {
  border: 2px solid var(--outline);
  background: var(--wood-light);
  box-shadow: 0 3px 0 var(--outline);
  padding: 4px;
  cursor: pointer;
  min-height: 44px;
}
button.kist-plek img { width: 100%; height: 100%; animation: kist-hup 2.4s ease-in-out infinite; }
button.kist-plek.kist-goud { background: #ffe9a8; }
@keyframes kist-hup { 0%, 80%, 100% { transform: translateY(0); } 88% { transform: translateY(-6px) rotate(-4deg); } 94% { transform: translateY(0) rotate(3deg); } }
.kist-podium { display: flex; justify-content: center; margin: 4px 0 8px; }
.kist-plaatje { width: 150px; height: 150px; }
.kist-plaatje.schud { animation: kist-schud .4s ease-in-out 3; }
.kist-plaatje.open { animation: kist-open .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kist-schud { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg) scale(1.03); } 75% { transform: rotate(9deg) scale(1.03); } }
@keyframes kist-open { from { transform: scale(.7) translateY(10px); } }
.kist-items { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.kist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 12px;
  font-weight: 700;
  animation: plop-in .4s cubic-bezier(.3, 1.6, .5, 1);
}
.kist-item img { width: 40px; height: 40px; }

/* ---------- skins ---------- */
.skins-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.skin-kaart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 14px;
}
.skin-kaart.gekozen { background: #eaf6e2; border-color: var(--leaf-dark); }
.skin-kaart .knop { width: 100%; }
.skin-truck { position: relative; width: 100%; aspect-ratio: 256 / 128; }
.skin-truck .vw-vlag { display: none; }

/* ---------- vrienden: pictogrammen bij namen ---------- */
.naam-extras { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: middle; flex-wrap: wrap; }
.mini-truck { width: 34px; height: 17px; }
.mini-dier { width: 22px; height: 22px; }
.mini-reeks, .mini-medaille { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; }
.mini-reeks { color: #c4430f; }
.mini-reeks img, .mini-medaille img { width: 20px; height: 20px; }

/* ---------- samen-doel ---------- */
.sd-balk {
  position: relative;
  display: flex;
  height: 26px;
  margin: 8px 0 22px;
  border: var(--rand);
  border-radius: 14px;
  background: #e6dccb;
}
.sd-stuk { height: 100%; border-right: 2px solid rgba(59, 42, 32, .4); }
.sd-stuk:first-child { border-radius: 11px 0 0 11px; }
.sd-stap {
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  font-size: .72rem;
  font-weight: 700;
  color: var(--wood-dark);
  padding-top: 2px;
}
.sd-stap::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  height: 26px;
  border-left: 2px dashed var(--outline);
}
.sd-stap.gehaald { color: var(--leaf-dark); }
.sd-tekst { font-weight: 700; }
.sd-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sd-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; background: var(--panel); border: 2px solid var(--outline); border-radius: 10px; padding: 1px 8px; }
.sd-chip i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--outline); display: inline-block; }
#samendoel .knop { margin-top: 8px; }

/* ---------- weekcompetitie ---------- */
.week-klok { display: flex; align-items: center; gap: 6px; font-size: 1.15rem; }
.week-klok img { width: 30px; height: 30px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.podium-plek {
  flex: 1;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 12px 12px 4px 4px;
  text-align: center;
  word-break: break-word;
}
.podium-plek img { width: 44px; height: 44px; }
.podium-plek.plek-1 { order: 2; min-height: 130px; background: #fff0c4; }
.podium-plek.plek-2 { order: 1; min-height: 110px; }
.podium-plek.plek-3 { order: 3; min-height: 95px; }

/* ---------- nieuws ---------- */
.nieuws-lijst { gap: 10px; }
.nieuws-bericht { padding: 8px 10px; background: var(--panel); border: 2px solid var(--outline); border-radius: 14px; }
.nieuws-kop { display: flex; align-items: center; gap: 10px; }
.nieuws-kop img { width: 40px; height: 40px; flex: none; }
.nieuws-kop .tekst { flex: 1; min-width: 0; line-height: 1.25; }
.nieuws-kop small { display: block; color: var(--wood-dark); font-weight: 600; }
.reacties { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reactie {
  min-width: 44px;
  min-height: 40px;
  padding: 2px 8px;
  border: 2px solid var(--outline);
  border-radius: 18px;
  background: var(--cream);
  font-size: 1.05rem;
  cursor: pointer;
}
.reactie span { font-size: .8rem; font-weight: 700; }
.reactie.gekozen { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow-dark); }

/* ---------- statistieken ---------- */
.stats-lijst { display: flex; flex-direction: column; gap: 6px; }
.stat-rij { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: var(--panel); border: 2px solid var(--outline); border-radius: 12px; }
.stat-rij img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.stat-rij span { flex: 1; font-weight: 600; }
.stat-rij b { font-size: 1.25rem; }

/* =====================================================================
   Update 2 – "Herfst in het Spookbos"
   ===================================================================== */

/* ---------- bovenbalk: pompoenen en seizoen ---------- */
.teller-pompoen { cursor: pointer; font-family: inherit; color: #c4500f; background: #ffe6c7; }
.teller-weer { position: relative; }
.seizoen-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 22px !important;
  height: 22px !important;
  background: var(--cream);
  border: 2px solid var(--outline);
  border-radius: 50%;
}
@media (max-width: 519px) {
  .met-event .teller-pompoen { display: none; }   /* op een smal scherm staan de pompoenen in de banner */
  .met-event .teller-reeks { display: none; }
}

/* ---------- evenement-banner ---------- */
.event-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1400px;
  min-height: 46px;
  margin: 0 auto 10px;
  padding: 4px 12px;
  border: var(--rand);
  border-radius: 14px;
  background: linear-gradient(90deg, #ff8a2b, #ffb347);
  box-shadow: 0 4px 0 var(--outline);
  color: var(--outline);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}
.event-banner > img { width: 32px; height: 32px; flex: none; }
.event-banner span:first-of-type { flex: 1; }
.event-banner-pompoenen { display: flex; align-items: center; gap: 4px; background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 0 8px; }
.event-banner-pompoenen img { width: 22px; height: 22px; }

/* ---------- locatie-tab van het evenement ---------- */
.locatie-tab.event-tab { border-color: #b8460c; background: #ffd9a8; box-shadow: 0 0 0 3px #ff8a2b, 0 4px 0 var(--outline); }
.locatie-tab.event-tab.actief { background: #ff9d47; }
.event-klok { color: #8a2f00; }

/* ---------- Spookbos-sfeer ---------- */
body.spookbos::before { background-image: url('../assets/backgrounds/bg_spooky_portrait.svg'); }
@media (min-width: 900px), (orientation: landscape) {
  body.spookbos::before { background-image: url('../assets/backgrounds/bg_spooky_landscape.svg'); }
}
.event-keten .station { background: #f3e6f7; border-color: #3b2a20; }
.event-keten .station-lvl { background: #6b3fa0; }
.druppel-vleermuis { width: 30px; height: 30px; opacity: 1; }
.druppel-seizoen { width: 18px; height: 18px; opacity: .95; }

/* Lampionpompoenen langs de weg (tussen de stations), met een zachte gele gloed */
.lampion { position: absolute; width: 34px; height: 34px; display: none; z-index: 3; pointer-events: none; filter: drop-shadow(0 0 6px rgba(255, 190, 60, .9)); animation: lampion-gloed 2.2s ease-in-out infinite alternate; }
.met-lampionnen .lampion { display: block; }
.lampion-l { left: -30px; top: 50%; margin-top: -17px; }
.lampion-r { right: -30px; top: 50%; margin-top: -17px; animation-delay: -1.1s; }
@media (min-width: 900px) {
  .lampion-l { left: 50%; top: -30px; margin: 0 0 0 -17px; }
  .lampion-r { left: 50%; right: auto; top: auto; bottom: -32px; margin: 0 0 0 -17px; }
}
@keyframes lampion-gloed { from { filter: drop-shadow(0 0 3px rgba(255, 190, 60, .6)); transform: scale(1); } to { filter: drop-shadow(0 0 12px rgba(255, 200, 70, 1)); transform: scale(1.06); } }
.band { overflow: visible; }
.band-clip { position: absolute; inset: 0; overflow: hidden; }

/* ---------- seizoenen ---------- */
.seizoen-zomer::before { filter: saturate(1.15) brightness(1.04); }
.seizoen-herfst::before { filter: sepia(.25) saturate(1.1) hue-rotate(-12deg); }
.seizoen-winter::before { filter: saturate(.7) brightness(1.06); }
.seizoen-winter .gebouw-knop::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  top: 6%;
  height: 12%;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #dfe8ee;
  pointer-events: none;
}
.nacht.seizoen-herfst::before, .nacht.seizoen-winter::before, .nacht.seizoen-zomer::before { filter: brightness(.6) saturate(.8); }

/* Sequoia valt om: het beeld schudt even */
.beeld-schud { animation: beeld-schud .5s ease-in-out; }
@keyframes beeld-schud { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }

/* ---------- spookjes ---------- */
#spook-laag { position: fixed; inset: 0; z-index: 34; pointer-events: none; overflow: hidden; }
.spookje {
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .8));
  touch-action: manipulation;
}
.spookje img { width: 100%; height: 100%; opacity: .92; }
.spookje.weg { transition: opacity .5s; opacity: 0; }

/* ---------- minigame-knopje bij de houthakkershut ---------- */
.minigame-knopje {
  position: absolute;
  right: 2px;
  top: 0;
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 2px;
  border: 2px solid var(--outline);
  border-radius: 12px;
  background: var(--yellow);
  box-shadow: 0 3px 0 var(--outline);
  cursor: pointer;
}
.minigame-knopje img { width: 100%; height: 100%; }
.station[data-si="0"] .rij-label { right: 50px; }

/* ---------- houthakwedstrijd ---------- */
.minigame {
  position: fixed;
  inset: 0;
  z-index: 78;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  background: rgba(59, 42, 32, .9);
  color: var(--cream);
  user-select: none;
  touch-action: manipulation;
}
.mg-kop { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 1.2rem; font-weight: 700; }
.mg-kop span { display: flex; align-items: center; gap: 6px; background: var(--cream); color: var(--outline); border: var(--rand); border-radius: 14px; padding: 4px 12px; }
.mg-kop img { width: 26px; height: 26px; }
.mg-veld { position: relative; width: min(70vw, 280px); aspect-ratio: 1; }
.mg-blok { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-blok.tril { animation: mg-tril .3s; }
.mg-blok.valt { animation: mg-valt .25s cubic-bezier(.3, 1.6, .5, 1); }
.mg-bijl { position: absolute; right: -6%; top: 0; width: 46%; transform-origin: 20% 90%; transform: rotate(-35deg); }
.mg-bijl.hak { animation: mg-hak .2s ease-out; }
.mg-gloed { position: absolute; right: -25%; top: -20%; width: 90%; opacity: 0; transition: opacity .3s; pointer-events: none; animation: gloed-draai 4s linear infinite; }
.mg-veld.gloeit .mg-gloed { opacity: 1; }
.mg-melding {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--yellow);
  color: var(--outline);
  border: var(--rand);
  border-radius: 14px;
  padding: 6px 14px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.mg-melding.zichtbaar { opacity: 1; }
.mg-balk {
  position: relative;
  width: min(90vw, 460px);
  height: 34px;
  border: var(--rand);
  border-radius: 12px;
  background: #e6dccb;
}
.mg-zone { position: absolute; top: 0; bottom: 0; background: var(--leaf); border-left: 2px solid var(--leaf-dark); border-right: 2px solid var(--leaf-dark); display: flex; justify-content: center; }
.mg-perfect { height: 100%; background: var(--yellow); }
.mg-pijl {
  position: absolute;
  top: -14px;
  width: 0;
  height: 0;
  margin-left: -10px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--red);
  filter: drop-shadow(0 2px 0 var(--outline));
}
.mg-pijl::after { content: ''; position: absolute; left: -2px; top: -2px; width: 4px; height: 44px; background: var(--outline); }
.minigame .knop { color: var(--outline); }
.mg-hint { margin: 0; font-weight: 600; text-align: center; max-width: 420px; }
@keyframes mg-tril { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes mg-valt { from { transform: translateY(-30px); } }
@keyframes mg-hak { 0% { transform: rotate(-35deg); } 50% { transform: rotate(25deg); } 100% { transform: rotate(-35deg); } }
.mg-potjes { font-weight: 600; margin-bottom: 8px; }

/* ---------- vrienden: titel, knoppen, profielkaart ---------- */
.naam-knop {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline dotted rgba(59, 42, 32, .4);
}
.titel-label { display: inline-block; font-size: .72rem; font-weight: 700; color: #6b3fa0; background: #efe6fa; border: 1.5px solid #6b3fa0; border-radius: 8px; padding: 0 6px; margin: 2px 0; }
.titel-label.groot { font-size: .95rem; padding: 2px 10px; }
.rij .tekst small { display: block; }
.vriend-rij { flex-wrap: wrap; }
.vriend-knoppen { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.knop-klein { min-height: 40px; padding: 4px 10px; font-size: .85rem; box-shadow: 0 3px 0 var(--outline); }
.knop-klein img { width: 20px; height: 20px; }
@media (max-width: 519px) {
  .vriend-knoppen { width: 100%; }
  .vriend-knoppen .knop { flex: 1; }
}
.profielkaart { text-align: center; }
.profiel-plaatjes { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 6px 0; }
.profiel-truck { width: 150px !important; }
.profiel-dier { width: 64px; height: 64px; }
.profiel-medailles { display: flex; justify-content: center; gap: 10px; margin: 6px 0; }
.profiel-medaille { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.profiel-medaille img { width: 32px; height: 32px; }
.profiel-raster { text-align: left; margin: 8px 0; grid-template-columns: 1fr 1fr; }
.titel-lijst { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; text-align: left; }
.titel-keuze { display: flex; flex-direction: column; padding: 8px 12px; border: 2px solid var(--outline); border-radius: 12px; background: var(--panel); font-family: inherit; color: inherit; cursor: pointer; text-align: left; }
.titel-keuze small { color: var(--wood-dark); font-weight: 600; }
.titel-keuze.gekozen { background: #efe6fa; border-color: #6b3fa0; }
.titel-keuze.op-slot { opacity: .6; cursor: default; }

/* ---------- event-winkel ---------- */
.event-paneel { border-color: #b8460c; box-shadow: 0 0 0 3px #ff8a2b, 0 6px 0 rgba(59, 42, 32, .35); }
.eventwinkel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.event-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; background: #fff1e0; border: 2px solid var(--outline); border-radius: 14px; text-align: center; }
.event-item.gekocht { background: #eaf6e2; }
.event-item .knop { width: 100%; }
.ei-plaatje { width: 72px; height: 72px; object-fit: contain; }
.event-missie { background: #fff1e0; }

/* ---------- op bezoek ---------- */
.bezoek {
  position: fixed;
  inset: var(--boven-hoogte) 0 calc(var(--nav-hoogte) + var(--veilig-onder)) 0;
  z-index: 36;
  overflow-y: auto;
  padding: 12px;
  background: rgba(124, 201, 90, .25);
}
@media (min-width: 900px) { .bezoek { left: var(--zij-breedte); } }
.bezoek-balk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 1400px; margin: 0 auto 10px; padding: 8px 12px; }
.bezoek-balk > img { width: 36px; height: 36px; }
.bezoek-balk > span { flex: 1 1 200px; font-weight: 600; }
.bezoek-balk .knoppenrij { flex: 1 1 260px; }
.alleen-kijken .gebouw-knop, .alleen-kijken .boom { pointer-events: none; }
.auto-voortgang .voortgang-balk { animation: auto-voortgang 3s linear infinite; }
@keyframes auto-voortgang { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bezoek-dier { animation: bezoek-dier 3s ease-in-out infinite; left: 20%; }
@keyframes bezoek-dier { 0%, 100% { transform: translateX(0) translateY(0); } 50% { transform: translateX(30px) translateY(-6px); } }
.hulp-houthakker { position: absolute; left: 0; bottom: 0; width: 52px; height: 52px; z-index: 7; pointer-events: none; transform-origin: 50% 100%; }
body.op-bezoek .tab.actief { visibility: hidden; }

/* ======================= Update 3: "Elke locatie een eigen wereld" ======================= */
.teller-diploma { cursor: pointer; font-family: inherit; color: inherit; }
@media (max-width: 399px) { .teller-diploma { display: none; } }

/* ---------- achtergrond per locatie ---------- */
body[data-achtergrond="bg_loc2_oak"]::before    { background-image: url('../assets/backgrounds/bg_loc2_oak_portrait.svg'); }
body[data-achtergrond="bg_loc3_birch"]::before  { background-image: url('../assets/backgrounds/bg_loc3_birch_portrait.svg'); }
body[data-achtergrond="bg_loc4_maple"]::before  { background-image: url('../assets/backgrounds/bg_loc4_maple_portrait.svg'); }
body[data-achtergrond="bg_loc5_gold"]::before   { background-image: url('../assets/backgrounds/bg_loc5_gold_portrait.svg'); }
body[data-achtergrond="bg_loc6_bamboo"]::before { background-image: url('../assets/backgrounds/bg_loc6_bamboo_portrait.svg'); }
body[data-achtergrond="bg_loc7_giant"]::before  { background-image: url('../assets/backgrounds/bg_loc7_giant_portrait.svg'); }
@media (min-width: 900px), (orientation: landscape) {
  body[data-achtergrond="bg_loc2_oak"]::before    { background-image: url('../assets/backgrounds/bg_loc2_oak_landscape.svg'); }
  body[data-achtergrond="bg_loc3_birch"]::before  { background-image: url('../assets/backgrounds/bg_loc3_birch_landscape.svg'); }
  body[data-achtergrond="bg_loc4_maple"]::before  { background-image: url('../assets/backgrounds/bg_loc4_maple_landscape.svg'); }
  body[data-achtergrond="bg_loc5_gold"]::before   { background-image: url('../assets/backgrounds/bg_loc5_gold_landscape.svg'); }
  body[data-achtergrond="bg_loc6_bamboo"]::before { background-image: url('../assets/backgrounds/bg_loc6_bamboo_landscape.svg'); }
  body[data-achtergrond="bg_loc7_giant"]::before  { background-image: url('../assets/backgrounds/bg_loc7_giant_landscape.svg'); }
}

/* ---------- wereldkaart ---------- */
.kaart-kop { display: flex; gap: 8px; max-width: 1100px; margin: 0 auto 10px; flex-wrap: wrap; }
.kaart-kop-tegel {
  flex: 1 1 150px; display: flex; flex-direction: column; padding: 6px 12px;
  background: var(--cream); border: var(--rand); border-radius: 14px; box-shadow: 0 4px 0 rgba(59,42,32,.35);
}
.kaart-kop-tegel b { font-size: 1.1rem; }
.kaart-kop-tegel small { font-size: .75rem; font-weight: 600; color: var(--wood-dark); }
.wereld { max-width: 1100px; margin: 0 auto 16px; }
.wereld-kaart {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border: var(--rand); border-radius: 18px; overflow: hidden; background: #8fd3ff;
  box-shadow: 0 6px 0 rgba(59,42,32,.35);
}
.wereld-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wereld-routes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wereld-routes line { stroke: rgba(59,42,32,.35); stroke-width: 4px; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
.wereld-routes line.actief { stroke: #8a5a2b; animation: route-loop 1.2s linear infinite; }
@keyframes route-loop { to { stroke-dashoffset: -18; } }
.kaart-pin {
  position: absolute; transform: translate(-50%, -88%);
  width: 13%; min-width: 64px; max-width: 120px; aspect-ratio: 1 / 1.15;
  border: 0; padding: 0; background: none; cursor: pointer; font-family: inherit; color: inherit;
  transition: transform .15s;
}
.kaart-pin:hover { transform: translate(-50%, -92%) scale(1.06); }
.kaart-pin:active { transform: translate(-50%, -86%) scale(.96); }
.pin-img { position: absolute; left: 20%; top: 0; width: 60%; filter: drop-shadow(0 3px 0 rgba(59,42,32,.4)); }
.pin-boom { position: absolute; left: 33%; top: 6%; width: 34%; height: 30%; object-fit: contain; }
.kaart-pin.dicht .pin-boom { left: 38%; top: 10%; width: 24%; height: 22%; }
.pin-naam {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  white-space: nowrap; font-weight: 700; font-size: clamp(.62rem, 1.4vw, .9rem);
  background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 0 6px;
}
.pin-sterren, .pin-eis {
  position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); white-space: nowrap;
  font-size: clamp(.7rem, 1.6vw, 1rem); line-height: 1; font-weight: 700;
}
.pin-sterren i { font-style: normal; color: rgba(59,42,32,.35); -webkit-text-stroke: 1px var(--outline); }
.pin-sterren i.aan { color: var(--yellow); }
.pin-eis { background: #ddd3c2; border: 2px solid var(--outline); border-radius: 10px; padding: 1px 6px; font-size: clamp(.6rem, 1.3vw, .8rem); }
.kaart-pin.dicht { filter: saturate(.5); }
.kaart-pin.dicht.volgende { filter: none; animation: pin-hop 1.6s ease-in-out infinite; }
@keyframes pin-hop { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }
.kaart-pin.huidig .pin-naam { background: var(--yellow); }
.kaart-pin.meester .pin-img { filter: drop-shadow(0 0 6px #ffd84a) drop-shadow(0 3px 0 rgba(59,42,32,.4)); }
.spook-pin .pin-naam { background: #3b2a40; color: #ffb35c; }
.kaart-mist { position: absolute; left: -30%; top: -10%; width: 160%; opacity: .85; filter: grayscale(1) brightness(1.6); pointer-events: none; animation: mist 6s ease-in-out infinite alternate; }
.spook-pin.mist .pin-img, .spook-pin.mist .pin-boom { filter: grayscale(1) opacity(.6); }
@keyframes mist { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.kaart-truck { position: absolute; width: 6%; min-width: 34px; pointer-events: none; transition: opacity .3s; }
.kaart-truck img:first-child { width: 100%; display: block; }
.kaart-truck-lading { position: absolute; left: 8%; top: -18%; width: 42%; }
.kaart-truck.stil { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .wereld-routes line.actief, .kaart-pin.volgende, .kaart-mist { animation: none; } }

/* ---------- handelsroutes ---------- */
.route-rij {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px;
  background: var(--panel); border: 2px solid var(--outline); border-radius: 14px; flex-wrap: wrap;
}
.route-rij > img { width: 44px; height: 44px; flex: none; }
.route-rij .tekst { flex: 1 1 200px; display: flex; flex-direction: column; min-width: 0; }
.route-rij small { color: #5c4636; font-weight: 500; }
.route-rij.dicht { opacity: .7; }
.route-schuif { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.route-schuif input { flex: 1; accent-color: var(--wood-dark); min-height: 30px; }
.route-wagen .prijs, .lk-prijsknop .prijs, .mk-train .prijs { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.route-wagen .prijs small, .lk-prijsknop .prijs small, .mk-train .prijs small { font-size: .7rem; font-weight: 600; }

/* ---------- locatie-informatie en doelen ---------- */
.loc-info-titel { font-weight: 700; font-size: 1.05rem; color: var(--wood-dark); margin: 0 0 4px; }
.doelen-lijst { display: flex; flex-direction: column; gap: 6px; text-align: left; margin: 10px 0; }
.doel-rij { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border: 2px solid var(--outline); border-radius: 12px; }
.doel-rij .tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doel-rij small { font-size: .78rem; color: #5c4636; font-weight: 600; }
.doel-ster { font-size: 1.8rem; line-height: 1; color: rgba(59,42,32,.25); -webkit-text-stroke: 1px var(--outline); }
.doel-rij.klaar { background: #fff1bf; }
.doel-rij.klaar .doel-ster { color: var(--yellow); }
.doel-balk { height: 10px; margin: 3px 0; border: 2px solid var(--outline); border-radius: 6px; background: #fff; overflow: hidden; }
.doel-balk i { display: block; height: 100%; background: var(--leaf); transform-origin: left; }
.doel-rij.klaar .doel-balk i { background: var(--yellow-dark); }
.eisen { display: flex; gap: 8px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.eis { flex: 1 1 130px; display: flex; flex-direction: column; align-items: center; padding: 8px; background: #f3dcd4; border: 2px solid var(--outline); border-radius: 12px; }
.eis.ok { background: #dff1cf; }
.eis img, .eis span { width: 32px; height: 32px; font-size: 1.6rem; line-height: 32px; text-align: center; }
.eis small { font-weight: 600; color: #5c4636; }

/* ---------- locatiebalk ---------- */
.loc-balk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: 1400px; margin: 0 auto 10px; padding: 6px 8px;
  background: var(--cream); border: var(--rand); border-radius: 16px; box-shadow: 0 4px 0 rgba(59,42,32,.35);
  position: relative;
}
.terug-kaart { flex: none; padding: 4px 10px; min-height: 40px; box-shadow: 0 3px 0 var(--outline); }
.loc-titel { flex: 1 1 120px; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.loc-titel b { font-size: 1.1rem; }
.loc-titel small { font-size: .78rem; font-weight: 600; color: var(--wood-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-sterren {
  flex: none; display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 2px 8px;
  border: var(--rand); border-radius: 12px; background: var(--panel); cursor: pointer; font-family: inherit;
  box-shadow: 0 3px 0 var(--outline);
}
.loc-sterren img { width: 26px; height: 26px; }
.loc-sterren .sterren i { font-style: normal; font-size: 1.3rem; color: rgba(59,42,32,.25); -webkit-text-stroke: 1px var(--outline); }
.loc-sterren .sterren i.aan { color: var(--yellow); }
.loc-doelen { flex: 1 1 100%; }
.loc-doelen .doelen-lijst { margin: 4px 0 2px; }
.loc-vaardigheden { display: flex; gap: 6px; flex-wrap: wrap; }
.vaardigheid-knop {
  --p: 0; position: relative; width: 48px; height: 48px; padding: 0; border-radius: 50%;
  border: var(--rand); cursor: pointer; overflow: hidden;
  background: conic-gradient(var(--leaf-light) calc(var(--p) * 360deg), #c8c0b4 0);
}
.vaardigheid-knop img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; border-radius: 50%; background: var(--cream); }
.vaardigheid-knop .vk-tijd { position: absolute; left: 0; right: 0; bottom: 1px; font-size: .62rem; font-weight: 700; text-align: center; color: var(--outline); text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.vaardigheid-knop.klaar { background: var(--yellow); animation: pols 1.2s ease-in-out infinite; }
.vaardigheid-knop.actief { background: conic-gradient(#ff8a3c calc(var(--p) * 360deg), #ffe0b0 0); box-shadow: 0 0 10px #ff8a3c; }
.vaardigheid-knop.auto { border-color: #2a7fb8; }
.vaardigheid-knop.rang-diamant { box-shadow: 0 0 8px #7fd8ff; }

/* ---------- kaarten van het level ---------- */
.level-kaarten {
  display: flex; gap: 10px; max-width: 1400px; margin: 0 auto 12px;
  overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; align-items: flex-start;
}
.level-kaart { flex: 0 0 min(320px, 86vw); padding: 10px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .level-kaarten { flex-wrap: wrap; overflow: visible; justify-content: center; } .level-kaart { flex: 0 1 340px; } }
.lk-kop { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.lk-kop img { width: 36px; height: 36px; object-fit: contain; }
.lk-body { display: flex; flex-direction: column; gap: 8px; }
.lk-prijsknop { flex: 1 1 120px; justify-content: flex-start; padding: 4px 8px; min-height: 46px; box-shadow: 0 4px 0 var(--outline); font-size: .9rem; }
.lk-prijsknop .valuta-icoon { width: 22px; height: 22px; }
.lk-prijsknop.op-slot .valuta-icoon { display: none; }
.lk-prijsknop.max { opacity: .8; }
.lv-knoppen { display: flex; gap: 6px; flex-wrap: wrap; }
.lk-meter { position: relative; height: 26px; border: var(--rand); border-radius: 12px; background: #fff; overflow: hidden; }
.lk-meter-vul { position: absolute; inset: 0; background: var(--leaf-light); transform-origin: left; transform: scaleX(0); }
.lk-meter-tekst { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.lv-info { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; font-weight: 600; color: #5c4636; }
.lv-info .ok { color: var(--leaf-dark); }
.lv-schuif { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; }
.lv-schuif input { flex: 1; min-width: 60px; accent-color: var(--wood-dark); min-height: 30px; }
.lv-vinkje { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.lv-vinkje input { width: 22px; height: 22px; accent-color: var(--leaf); }
.band-deco { position: absolute; width: 34px; height: 34px; object-fit: contain; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(59,42,32,.35)); }

/* speciale manager */
.lk-manager { flex-direction: row; align-items: center; flex-wrap: wrap; flex-basis: min(260px, 86vw); }
.lk-manager-img { width: 52px; height: 60px; object-fit: contain; }
.lk-manager-img.grijs { filter: grayscale(1) opacity(.6); }
.lk-manager .tekst { flex: 1 1 120px; display: flex; flex-direction: column; min-width: 0; }
.lk-manager small { font-size: .78rem; color: #5c4636; font-weight: 600; }

/* L2 drogen */
.lv-rekken { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.lv-rek { width: 100%; height: 48px; object-fit: contain; }
/* L3 energie */
.lv-ketel { position: relative; height: 80px; display: flex; justify-content: center; }
.lv-ketel-img { height: 80px; }
.lv-stoom { position: absolute; width: 40px; left: calc(50% + 4px); top: -10px; opacity: 0; }
.lv-ketel.stookt .lv-stoom { animation: stoom 1.6s ease-out infinite; }
@keyframes stoom { 0% { opacity: .9; transform: translateY(10px) scale(.6); } 100% { opacity: 0; transform: translateY(-24px) scale(1.3); } }
.lv-energie .lk-meter-vul { background: #ffb347; }
.lv-energie.hoog .lk-meter-vul { background: var(--leaf-light); }
.lv-energie.laag .lk-meter-vul { background: #ff8a7a; }
.lv-streep { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--outline); opacity: .5; z-index: 1; }
/* L4 siroop */
.lv-emmers { display: flex; gap: 6px; justify-content: space-between; }
.lv-emmer { position: relative; flex: 1; height: 96px; border: 2px solid var(--outline); border-radius: 12px; background: #fdf3e0; cursor: pointer; padding: 0; overflow: hidden; }
.lv-esdoorn { position: absolute; left: 10%; top: 2px; width: 80%; height: 70px; object-fit: contain; }
.lv-emmer-img { position: absolute; right: 4px; bottom: 4px; width: 40px; height: 40px; }
.lv-emmer-vul { position: absolute; left: 4px; bottom: 6px; width: 8px; height: 60px; border: 2px solid var(--outline); border-radius: 4px; background: #fff; overflow: hidden; }
.lv-emmer-vul i { position: absolute; inset: 0; background: #c46a1f; transform-origin: bottom; transform: scaleY(0); }
.lv-emmer.vol { background: #ffe9b0; animation: pols 1.2s ease-in-out infinite; }
.lv-flessen .lk-meter-vul { background: #e5a050; }
.lv-markt-prijs { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.lv-markt-prijs b { font-size: 2rem; }
.lv-markt-prijs b.hoog { color: var(--leaf-dark); }
.lv-markt-prijs b.laag { color: var(--red); }
.lv-markt-prijs small { font-size: .78rem; font-weight: 600; color: #5c4636; }
.lv-grafiek { display: flex; align-items: flex-end; gap: 3px; height: 60px; padding: 4px; background: #fff; border: 2px solid var(--outline); border-radius: 10px; }
.lv-grafiek span { flex: 1; background: var(--wood-mid); border-radius: 3px 3px 0 0; min-height: 4px; }
.lv-grafiek span.hoog { background: var(--leaf); }
.lv-grafiek span.laag { background: #e98f7f; }
.lv-grafiek span:last-child { outline: 2px solid var(--outline); }
.lv-verkoop { width: 100%; }
.lv-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; }
.lv-auto input[type=range] { flex: 1; accent-color: var(--wood-dark); }
/* L5 planten */
.lv-vakken { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lv-vak { position: relative; aspect-ratio: 1; border: 2px solid var(--outline); border-radius: 10px; background: #e6cf9f; padding: 0; cursor: pointer; overflow: hidden; }
.lv-vak img { width: 100%; height: 100%; object-fit: contain; }
.lv-vak.leeg { background: #d9be86; }
.lv-vak.leeg::after { content: '+'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: rgba(59,42,32,.5); }
.lv-vak.klaar { background: #f6e7a8; }
.lv-vak.glinster { box-shadow: inset 0 0 10px #ffe14a; animation: glinster 1.4s ease-in-out infinite; }
@keyframes glinster { 50% { filter: brightness(1.25) drop-shadow(0 0 4px #ffe14a); } }
.lv-ring { position: absolute; left: 6%; right: 6%; bottom: 4%; height: 5px; background: rgba(255,255,255,.7); border-radius: 3px; overflow: hidden; }
.lv-ring i { display: block; height: 100%; background: var(--leaf); transform-origin: left; }
.lv-vak.leeg .lv-ring, .lv-vak.klaar .lv-ring { display: none; }
/* L6 rivier */
.lv-rivier { position: relative; height: 70px; border: 2px solid var(--outline); border-radius: 12px; overflow: hidden;
  background: #5fb6e6 url('../assets/stations/st_river_tile.svg') repeat-x center / auto 100%; }
.lv-rivier.hoogwater { background-color: #3d8fc6; box-shadow: inset 0 0 0 4px #9ad6f5; }
.lv-vlot { position: absolute; left: -34%; top: 14px; width: 34%; height: 42px; object-fit: contain; }
.lv-band-rivier .band-clip { background: #5fb6e6 url('../assets/stations/st_river_tile.svg') repeat center / 48px auto; }
.lv-band-rivier .band-strook { opacity: 0; }
.lv-geen-truck .vrachtwagen { visibility: hidden; }
.lv-haven { position: absolute; right: 0; bottom: 0; width: 62%; height: 70%; pointer-events: none; }
.lv-steiger { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.lv-kano { position: absolute; right: 18%; bottom: 8%; width: 48%; }
.lv-kano.vaart { animation: kano-weg 1.6s ease-in forwards; }
@keyframes kano-weg { 0% { transform: translateX(0); opacity: 1; } 70% { transform: translateX(80%); opacity: 1; } 71% { opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
/* L7 dorp */
.lv-kraan { position: relative; height: 90px; }
.lv-kraan-img { position: absolute; left: 0; bottom: 0; height: 90px; }
.lv-kraan-stam { position: absolute; left: 20%; top: 30px; width: 70px; }
.lv-dorp { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lv-kavel { aspect-ratio: 1; border: 2px solid var(--outline); border-radius: 10px; background: #cfe7a8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lv-kavel img { width: 92%; height: 92%; object-fit: contain; }
.lv-kavel.bezig { box-shadow: 0 0 0 3px var(--yellow); }
.lv-kavel.af { background: #b6e08a; }
.lv-kavel.gebouwd img { animation: huis-pop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes huis-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
/* Spookbos: lantaarns */
.lv-lantaarns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lv-lantaarn { position: relative; height: 70px; border: 2px solid var(--outline); border-radius: 12px; background: #2b2233; cursor: pointer; padding: 4px; }
.lv-lantaarn img { width: 100%; height: 50px; object-fit: contain; }
.lv-lantaarn.aan { background: #4a3a55; box-shadow: inset 0 0 14px #ffb84a; }
.lv-lantaarn.bijna { animation: pols .8s ease-in-out infinite; }
.lv-brand { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; }
.lv-brand i { display: block; height: 100%; background: #ffb84a; transform-origin: left; }
.fabriek.lv-donker { position: relative; }
.fabriek.lv-donker .station-scene { filter: brightness(calc(.45 + var(--licht, 0) * .55)); transition: filter .4s; }
.lv-spooklaag { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.lv-spook { position: absolute; width: 56px; height: 56px; border: 0; padding: 0; background: none; cursor: pointer; pointer-events: auto; animation: zweef 1.2s ease-in-out infinite alternate; }
.lv-spook img { width: 100%; height: 100%; filter: drop-shadow(0 0 6px #fff); }
@keyframes zweef { from { margin-top: -6px; } to { margin-top: 6px; } }

/* ---------- uitleg bij een nieuw level ---------- */
.level-intro { position: fixed; inset: 0; z-index: 90; background: rgba(30,20,10,.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.li-kaart { width: min(480px, 100%); display: flex; flex-direction: column; gap: 10px; margin-bottom: calc(var(--nav-hoogte) + var(--veilig-onder)); }
@media (min-width: 900px) { .level-intro { align-items: center; } .li-kaart { margin-bottom: 0; } }
.li-kop { display: flex; flex-direction: column; text-align: center; }
.li-kop b { font-size: 1.4rem; }
.li-kop small { font-weight: 600; color: var(--wood-dark); }
.li-praat { display: flex; align-items: flex-end; gap: 8px; }
.li-manager { width: 90px; flex: none; }
.li-ballon { position: relative; flex: 1; background: #fff; border: var(--rand); border-radius: 16px; padding: 10px 12px; font-weight: 500; min-height: 80px; }
.li-ballon::before { content: ''; position: absolute; left: -12px; bottom: 16px; border: 10px solid transparent; border-right-color: var(--outline); border-left: 0; }
.li-ballon.nieuw { animation: ballon .3s ease-out; }
@keyframes ballon { from { transform: scale(.9); opacity: .3; } to { transform: none; opacity: 1; } }
.li-stippen { display: flex; justify-content: center; gap: 6px; }
.li-stippen i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--outline); background: #fff; }
.li-stippen i.aan { background: var(--yellow); }

/* ---------- kantoor ---------- */
.kantoor-diplomas { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 1.1rem; }
.kantoor-diplomas img { width: 32px; height: 32px; }
.kantoor-balk { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kantoor-balk select { flex: 1 1 140px; min-height: 44px; border: var(--rand); border-radius: 12px; background: var(--panel); font-family: inherit; font-weight: 600; font-size: .95rem; padding: 0 8px; color: inherit; }
.kantoor-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.mk-kaart { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 8px; background: var(--panel); border: 2px solid var(--outline); border-radius: 14px; }
.mk-kaart.rang-zilver { background: linear-gradient(#f4f4f6, #e2e6ea); }
.mk-kaart.rang-goud { background: linear-gradient(#fff6d8, #ffe7a0); }
.mk-kaart.rang-diamant { background: linear-gradient(#eefaff, #cdeeff); box-shadow: 0 0 12px #7fd8ff; animation: diamant 2.4s ease-in-out infinite; }
@keyframes diamant { 50% { box-shadow: 0 0 20px #b9ecff; } }
.mk-kaart.niet-aangenomen { opacity: .75; }
.mk-kaart.tip { outline: 4px solid var(--purple); animation: pols 1s ease-in-out 3; }
.mk-figuur { position: relative; width: 60px; flex: none; }
.mk-img { width: 60px; height: 70px; object-fit: contain; }
.mk-kaart.niet-aangenomen .mk-img { filter: grayscale(1); }
.mk-badge { position: absolute; right: -6px; bottom: -4px; width: 30px; height: 30px; }
.mk-tekst { flex: 1 1 150px; display: flex; flex-direction: column; min-width: 0; }
.mk-tekst small { font-size: .78rem; color: #5c4636; font-weight: 600; }
.mk-niveau { font-size: .85rem; font-weight: 700; margin-top: 2px; }
.mk-balk { height: 8px; border: 2px solid var(--outline); border-radius: 5px; background: #fff; overflow: hidden; margin: 3px 0; }
.mk-balk i { display: block; height: 100%; background: var(--yellow-dark); transform-origin: left; }
.mk-kaart.rang-zilver .mk-balk i { background: #a9b3bb; }
.mk-kaart.rang-diamant .mk-balk i { background: #4fc3f7; }
.mk-vaardigheid { font-size: .78rem; color: #4a3a2e; }
.mk-vaardigheid em { color: #8a7a6e; }
.mk-knoppen { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.mk-knoppen .knop { flex: 1 1 auto; min-height: 42px; box-shadow: 0 3px 0 var(--outline); }
.mk-train b img { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- klassement en profiel ---------- */
.mini-sterren, .mini-huizen { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; }
.mini-kaart { position: relative; width: 100%; aspect-ratio: 16 / 10; border: 2px solid var(--outline); border-radius: 12px; overflow: hidden; margin: 8px 0; }
.mini-kaart img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-pin { position: absolute; transform: translate(-50%, -50%); background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 0 4px; font-size: .7rem; font-weight: 700; color: #d99a00; white-space: nowrap; }
.mini-pin.dicht { background: #ddd3c2; }
.mini-pin.meester { background: var(--yellow); color: var(--outline); }
@media (max-width: 519px) {
  .kaart-pin { min-width: 44px; }
  .pin-naam { font-size: .56rem; padding: 0 3px; }
  .pin-sterren { font-size: .62rem; }
  .pin-eis { font-size: .55rem; padding: 0 3px; }
  .kaart-kop-tegel { flex-basis: 120px; padding: 4px 8px; }
}

/* Telefoon: de wegrijdende vrachtwagen (en de kano) mag de pagina niet breder maken,
   anders schaalt de telefoon alles opnieuw en rekt de onderbalk uit. */
html, .spelpagina { overflow-x: hidden; }
@supports (overflow: clip) { html, .spelpagina { overflow-x: clip; } }
.station.laatste .station-scene { overflow: hidden; }
@supports (overflow: clip) { .station.laatste .station-scene { overflow: visible; overflow-x: clip; } }
.admin-kopje { margin: 12px 0 6px; font-size: 1rem; color: var(--wood-dark); }
.admin-klein { font-size: .85rem; margin: 8px 0 0; }
.admin-locaties li { margin-bottom: 4px; }
.admin-locaties small { color: #5c4636; }
.admin-events { margin-bottom: 16px; }
.admin-events h2 { margin: 0 0 8px; }
.admin-event { border-top: 2px dashed #e0d3bd; padding-top: 8px; margin-top: 8px; }
.admin-event p { margin: 0 0 6px; }
.admin-event small { color: var(--wood-dark); font-weight: 600; }
.admin-event details summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }

/* ======================= Update 4: prestaties ======================= */
/* Medaillon: het lijstje met het icoon klein (55%) in het midden */
.medaillon { position: relative; display: inline-block; width: 64px; height: 64px; flex: none; }
.medaillon .m-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.medaillon .m-icoon { position: absolute; left: 22.5%; top: 19%; width: 55%; height: 55%; object-fit: contain; }
.medaillon.dicht .m-icoon { filter: grayscale(1) opacity(.5); }
.medaillon .m-vraag { position: absolute; left: 0; right: 0; top: 24%; text-align: center; font-size: 1.6rem; line-height: 1; color: #f4ecdc; }
.medaillon.groot { width: 112px; height: 112px; }
.medaillon.groot .m-vraag { font-size: 2.8rem; }
.medaillon.mini { width: 34px; height: 34px; }
.medaillon.mini .m-vraag { font-size: .9rem; }

/* Prestaties-scherm */
.pr-niveau { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pr-niveau-getal {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--yellow); border: var(--rand); font-size: 1.5rem; font-weight: 700;
}
.pr-niveau-tekst { display: flex; flex-direction: column; line-height: 1.2; }
.pr-niveau-tekst small { font-weight: 600; color: var(--wood-dark); }
.pr-balk { height: 14px; }
.pr-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.pr-categorie h3 { margin: 0 0 8px; }
.pr-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pr-knop {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px;
  background: var(--panel); border: 2px solid var(--outline); border-radius: 14px; cursor: pointer; font-family: inherit; color: inherit;
}
.pr-knop b { font-size: .8rem; line-height: 1.1; text-align: center; }
.pr-knop small { font-size: .7rem; font-weight: 600; color: var(--wood-dark); }
.pr-knop.in-kast { box-shadow: 0 0 0 3px var(--yellow); }
.pr-kaart { text-align: center; }
.pr-kaart .pr-balk { margin: 6px auto 2px; max-width: 320px; }
.pr-beloning { font-weight: 700; color: var(--leaf-dark); }
.pr-niveaus { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.pr-niveaus span { display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: .85rem; opacity: .55; }
.pr-niveaus span.gehaald { opacity: 1; }
.pr-niveaus img { width: 40px; height: 40px; }
.pr-niveaus small { font-weight: 600; font-size: .7rem; color: var(--wood-dark); }
.pr-vrienden { display: flex; flex-direction: column; gap: 4px; text-align: left; margin-top: 10px; padding: 8px 10px; background: var(--panel); border: 2px solid var(--outline); border-radius: 12px; }
.pr-vriend { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.pr-vriend em { font-style: normal; font-weight: 700; color: #8a7a6e; }
.pr-vriend em.niv-1 { color: #b06a2c; }
.pr-vriend em.niv-2 { color: #6b7780; }
.pr-vriend em.niv-3 { color: #c48a00; }

/* Melding bovenin: één element dat in beeld schuift */
.prestatie-melding {
  position: fixed; left: 50%; top: calc(var(--boven-hoogte) + 8px); z-index: 85;
  display: flex; align-items: center; gap: 10px; width: min(420px, calc(100vw - 24px)); padding: 8px 14px 8px 8px;
  background: var(--cream); border: var(--rand); border-radius: 18px; box-shadow: 0 6px 0 rgba(59,42,32,.35);
  font-family: inherit; color: inherit; text-align: left; cursor: pointer;
  transform: translate(-50%, -160%); opacity: 0; transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .25s;
  pointer-events: none;
}
.prestatie-melding.zichtbaar { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.prestatie-melding.niv-3 { background: linear-gradient(#fff6d8, #ffe7a0); }
.prestatie-melding.niv-geheim { background: linear-gradient(#efe6ff, #d9c8ff); }
.pm-tekst { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pm-tekst small { font-weight: 700; color: var(--wood-dark); font-size: .75rem; }
.pm-tekst b { font-size: 1rem; }
.pm-tekst em { font-style: normal; font-weight: 600; font-size: .8rem; color: var(--leaf-dark); }
/* Glans over het medaillon (alleen transform en opacity) */
.medaillon.glans { overflow: hidden; border-radius: 50%; }
.medaillon.glans::after {
  content: ''; position: absolute; top: -20%; left: 0; width: 40%; height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  transform: translateX(-150%) rotate(20deg); opacity: 0;
}
.prestatie-melding.zichtbaar .medaillon.glans::after { animation: glans 1.4s .3s ease-in-out 2; }
@keyframes glans { 0% { transform: translateX(-150%) rotate(20deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateX(320%) rotate(20deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prestatie-melding { transition: opacity .2s; } .prestatie-melding.zichtbaar .medaillon.glans::after { animation: none; } }

/* Pronkkast op de profielkaart */
.pronkkast { position: relative; width: min(260px, 100%); aspect-ratio: 240 / 96; margin: 8px auto 0; }
.pk-plank { position: absolute; inset: 0; width: 100%; height: 100%; }
.pk-plek { position: absolute; bottom: 24%; transform: translateX(-50%); width: 24%; }
.pk-plek .medaillon { width: 100%; height: auto; aspect-ratio: 1; }
.pk-niveau { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 8px; font-weight: 600; }
.pk-niveau img { width: 26px; height: 26px; }
.mini-kast { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }

/* =====================================================================
   Update 5 – "Samen Sterk"
   ===================================================================== */

/* ---------- postvak in de bovenbalk ---------- */
.teller-postvak { position: relative; cursor: pointer; font-family: inherit; color: inherit; padding: 2px 6px; }
.postvak-bolletje {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; border: 2px solid var(--outline); border-radius: 11px;
  font-size: .75rem; font-weight: 700; line-height: 1;
}
.teller-postvak.heeft-post img { animation: post-wiebel 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes post-wiebel { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.post-lijst { max-height: 46vh; overflow-y: auto; text-align: left; }
.post-rij .tekst small { display: block; }
.post-bericht { display: block; margin-top: 3px; padding: 4px 8px; background: #fff; border: 2px dashed #c9b28f; border-radius: 10px; font-style: italic; font-size: .85rem; overflow-wrap: anywhere; }
.post-rij.kerst { background: #fde9e6; border-color: #b63d2c; }
.kerst-postvak { position: relative; width: 170px; height: 150px; margin: 0 auto 4px; }
.kp-boom { position: absolute; left: 50%; bottom: 10px; width: 110px; transform: translateX(-50%); }
.kp-pakje { position: absolute; bottom: 0; width: 44px; animation: pakje-hop 1.8s ease-in-out infinite; }
.kp-0 { left: 6px; } .kp-1 { right: 6px; animation-delay: -.4s; } .kp-2 { left: 40px; width: 36px; animation-delay: -.8s; }
.kp-3 { right: 40px; width: 34px; animation-delay: -1.2s; } .kp-4 { left: 64px; width: 30px; animation-delay: -1.5s; }
@keyframes pakje-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.kerst-tekst { font-weight: 600; }

/* ---------- spullen (ruilen, kerstcadeau, inzet) ---------- */
.spul { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.spul img { width: 28px; height: 28px; object-fit: contain; }
.spul-kiezer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; text-align: left; }
.spul-kiezer .veld { flex: 1 1 130px; width: auto; margin-top: 0; }
.spul-kiezer .sk-aantal { flex: 0 1 110px; }
.spul-kiezer small { flex: 1 0 100%; font-weight: 600; color: var(--wood-dark); }
.ruil-venster { text-align: left; }
.ruil-venster h3 { margin: 10px 0 4px; font-size: 1rem; }
.ruil-regel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0; }
.ruil-pijl { font-size: 1.2rem; color: var(--wood-dark); }
.ruil-rij .tekst > b { font-size: .9rem; color: var(--wood-dark); }
.duur-keuze { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: var(--rand); border-radius: 12px; background: var(--cream); font-weight: 600; cursor: pointer; }
.duur-keuze input { accent-color: var(--wood-dark); }

/* ---------- vrienden: alle tabjes zichtbaar ---------- */
.subtabs[data-groep="vrienden"] { flex-wrap: wrap; overflow-x: visible; }
.subtabs[data-groep="vrienden"] .subtab { flex: 1 0 auto; }

/* ---------- duels ---------- */
.duel-balken { display: flex; flex-direction: column; gap: 6px; max-width: 1400px; margin: 0 auto; }
.duel-balken:not(:empty) { margin-bottom: 10px; }
.duel-balk {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 10px;
  background: #fff1ef; border: var(--rand); border-radius: 14px; box-shadow: 0 3px 0 rgba(59,42,32,.35);
  font-family: inherit; color: inherit; cursor: pointer; text-align: left;
}
.duel-balk > img { width: 30px; height: 30px; flex: none; }
.db-wat { flex: none; font-weight: 700; font-size: .85rem; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-strijd { flex: 1; min-width: 0; }
.ds-namen { display: flex; justify-content: space-between; gap: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ds-namen span { overflow: hidden; text-overflow: ellipsis; }
.ds-klok { flex: none; color: var(--wood-dark); font-variant-numeric: tabular-nums; }
.ds-balk { position: relative; height: 12px; margin-top: 2px; border: 2px solid var(--outline); border-radius: 7px; background: var(--red); overflow: hidden; }
.ds-mijn { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-right: 2px solid var(--outline); transition: width .6s; }
.duel-rij.lopend .tekst { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 519px) { .db-wat { display: none; } }

/* ---------- het Vriendenpark ---------- */
body[data-achtergrond="bg_park"]::before { background-image: url('../assets/backgrounds/bg_park_portrait.svg'); }
@media (min-width: 900px), (orientation: landscape) {
  body[data-achtergrond="bg_park"]::before { background-image: url('../assets/backgrounds/bg_park_landscape.svg'); }
}
.park-fases { flex: none; font-weight: 700; background: var(--yellow); border: 2px solid var(--outline); border-radius: 10px; padding: 2px 8px; }
.park-veld {
  position: relative; max-width: 1100px; margin: 0 auto 14px; aspect-ratio: 16 / 10; overflow: hidden;
  border: var(--rand); border-radius: 18px; box-shadow: 0 6px 0 rgba(59,42,32,.35);
  background: #8fd16a url('../assets/backgrounds/bg_park_landscape.svg') center / cover no-repeat;
}
@media (max-width: 699px) {
  .park-veld { aspect-ratio: 4 / 5; background-image: url('../assets/backgrounds/bg_park_portrait.svg'); }
}
.park-boog { position: absolute; left: 50%; bottom: 0; width: 26%; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.park-plek {
  position: absolute; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; color: inherit;
}
.pp-beeld { position: relative; width: 100%; display: block; }
.pp-attractie { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 0 rgba(59,42,32,.25)); }
.park-plek.fase-0 .pp-attractie { opacity: .22; filter: grayscale(1); }
.park-plek.fase-1 .pp-attractie { opacity: .5; filter: grayscale(.6); }
.park-plek.fase-2 .pp-attractie { opacity: .8; filter: grayscale(.2); }
.pp-steiger { position: absolute; left: 50%; bottom: 0; width: 86%; height: 100%; object-fit: contain; object-position: bottom; transform: translateX(-50%); }
.pp-balk { width: 80%; height: 9px; border: 2px solid var(--outline); border-radius: 6px; background: #fff; overflow: hidden; }
.park-plek.af .pp-balk { display: none; }
.pp-balk i { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); transition: transform .6s; }
.pp-naam {
  display: flex; flex-direction: column; align-items: center; line-height: 1; white-space: nowrap;
  font-weight: 700; font-size: clamp(.6rem, 1.3vw, .85rem); background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 2px 6px;
}
.pp-naam small { font-size: .85em; color: var(--wood-dark); }
.park-plek.af .pp-naam { background: var(--yellow); }
.park-plek:hover .pp-beeld { transform: scale(1.03); }
.park-plek:active .pp-beeld { transform: scale(.97); }
.park-bezoeker { position: absolute; width: 4.2%; min-width: 18px; z-index: 3; pointer-events: none; will-change: transform; }
/* Bewegende attracties (inline SVG). transform-box: view-box = draaipunten in de coördinaten van het plaatje */
.park-svg .pk-wiel { transform-box: view-box; transform-origin: 100px 96px; animation: pk-draai 22s linear infinite; }
.park-svg .pk-bakje { transform-box: view-box; animation: pk-draai 22s linear infinite reverse; }
.park-svg .pk-vlag { transform-box: view-box; transform-origin: 80px 8px; animation: pk-wapper .9s ease-in-out infinite alternate; }
.park-svg .pk-blad { transform-box: view-box; transform-origin: 80px 60px; animation: pk-ritsel 2.6s ease-in-out infinite alternate; }
.park-svg .pk-brug { transform-box: view-box; transform-origin: 120px 26px; animation: pk-wiebel 3.2s ease-in-out infinite alternate; }
@keyframes pk-draai { to { transform: rotate(360deg); } }
@keyframes pk-wapper { from { transform: skewY(-10deg) scaleX(.85); } to { transform: skewY(8deg) scaleX(1.05); } }
@keyframes pk-ritsel { 0% { transform: rotate(-1.5deg) scale(1); } 50% { transform: rotate(1deg) scale(1.02); } 100% { transform: rotate(1.8deg) scale(.99); } }
@keyframes pk-wiebel { from { transform: rotate(-1.4deg) translateY(0); } to { transform: rotate(1.4deg) translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .park-svg * { animation: none !important; } }
/* Lijst met attracties onder het park */
.park-lijst { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.park-kaart { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--panel); border: 2px solid var(--outline); border-radius: 14px; }
.park-kaart.af { background: #fff3c4; }
.pk-kop { display: flex; gap: 8px; align-items: center; }
.pk-kop > img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.pk-kop .tekst { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.pk-kop small { font-weight: 600; color: var(--wood-dark); }
.pk-kop .pk-bonus { color: var(--leaf-dark); }
.pk-product { display: flex; gap: 8px; align-items: center; }
.pk-product > img { width: 36px; height: 36px; flex: none; }
.pk-product .tekst { flex: 1; min-width: 0; line-height: 1.15; }
.pk-product small { font-weight: 600; color: #5c4636; font-size: .8rem; }
.pk-top { margin: 0; font-size: .82rem; font-weight: 600; color: #5c4636; }
/* Doneren */
.doneer-keuzes { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.doneer-keuze { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--outline); border-radius: 12px; background: var(--cream); cursor: pointer; }
.doneer-keuze img { width: 36px; height: 36px; }
.doneer-keuze span { display: flex; flex-direction: column; line-height: 1.15; }
.doneer-keuze small { font-weight: 600; color: #5c4636; }
.doneer-keuze.op-slot { opacity: .5; cursor: default; }
.doneer-keuze:has(input:checked) { background: #fff0c4; box-shadow: 0 0 0 2px var(--yellow); }
.doneer-keuze input { accent-color: var(--wood-dark); }
.doneer-aantal { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.doneer-schuif { flex: 1; accent-color: var(--wood-dark); min-height: 34px; }
.doneer-getal { min-width: 70px; text-align: right; font-size: 1.15rem; }
.doneer-snel { justify-content: center; margin-top: 6px; }
/* Op de kaart: een eilandje rechtsonder */
.park-eiland {
  position: absolute; width: 11%; aspect-ratio: 2 / 1; transform: translate(-50%, -45%);
  background: radial-gradient(ellipse at 50% 40%, #8fd16a 0 52%, #f3d4a0 53% 68%, transparent 70%);
  pointer-events: none;
}
.park-pin .pin-naam { background: #fff0c4; }

/* ---------- het Winterwoud ---------- */
body.winterwoud::before { background-image: url('../assets/backgrounds/bg_winter_portrait.svg'); }
@media (min-width: 900px), (orientation: landscape) {
  body.winterwoud::before { background-image: url('../assets/backgrounds/bg_winter_landscape.svg'); }
}
body.winterwoud .event-keten .station { background: #f2f7ff; }
body.winterwoud .event-keten .station-lvl { background: #b63d2c; }
body.met-winterwoud .event-banner { background: linear-gradient(90deg, #f4a3a3, #fff6e4 55%, #a9dbb8); }
body.met-winterwoud .locatie-tab.event-tab { border-color: #8e1f24; background: #f7d5d5; box-shadow: 0 0 0 3px #d8434f, 0 4px 0 var(--outline); }
body.met-winterwoud .locatie-tab.event-tab.actief { background: #ff9a9a; }
.teller-pompoen.winter { color: #a61e2a; background: #ffe6e6; }
/* Sneeuwpoppen langs de weg (zoals de lampionnen) */
.sneeuwpop { position: absolute; width: 30px; height: 40px; display: none; z-index: 3; pointer-events: none; }
.met-sneeuwpop .sneeuwpop { display: block; }
.met-lampionnen.met-sneeuwpop .sneeuwpop { top: auto; bottom: -2px; }
.sneeuwpop-l { left: -30px; top: calc(50% - 20px); }
.sneeuwpop-r { right: -30px; top: calc(50% - 20px); }
@media (min-width: 900px) {
  .sneeuwpop-l { left: calc(50% - 15px); top: -40px; }
  .sneeuwpop-r { left: calc(50% - 15px); right: auto; top: auto; bottom: -42px; }
}
/* Knipperlichtjes in de kerstbomen */
.lv-lichtjes { position: absolute; inset: 0; pointer-events: none; }
.lv-lichtjes i { position: absolute; width: 7%; aspect-ratio: 1; margin: -3.5% 0 0 -3.5%; border-radius: 50%; background: #fff7c0; box-shadow: 0 0 6px 2px rgba(255, 240, 150, .9); animation: lichtje 1.3s ease-in-out infinite; }
.lv-lichtjes.uit { display: none; }
@keyframes lichtje { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
/* Sneeuw op de weg bij de kerstmarkt */
.lv-sneeuwlaag {
  --sneeuw: 0;
  position: absolute; left: 0; right: 0; bottom: 0; height: 40px; z-index: 4;
  padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; color: inherit;
}
.lv-sneeuwlaag i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  background: linear-gradient(#ffffff, #e3eefa); border-top: 2px solid #c8d8ea; border-radius: 14px 14px 6px 6px;
  transform-origin: bottom; transform: scaleY(var(--sneeuw)); opacity: calc(.35 + var(--sneeuw) * .65);
}
.lv-sneeuwlaag span {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); white-space: nowrap;
  font-size: .72rem; font-weight: 700; color: #33506e; background: rgba(255,255,255,.85); border-radius: 8px; padding: 0 6px;
  opacity: 0; transition: opacity .3s;
}
.lv-sneeuwlaag.veel span { opacity: 1; animation: knipper 1.6s ease-in-out infinite; }
.lv-schuif { position: absolute; left: 0; bottom: 4px; width: 30px; height: 30px; z-index: 5; pointer-events: none; opacity: 0; }
.lv-schuif img { width: 100%; height: 100%; }
.lk-sneeuw .lk-meter-vul { background: #cfe3f7; }
.lv-modus { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; font-size: .9rem; }
.lootje-naam { font-size: 1.05rem; margin: 0; }
/* Cadeautje aan een parachuutje */
.spookje.cadeautje { width: 64px; height: 92px; filter: drop-shadow(0 3px 0 rgba(59,42,32,.3)); }
.spookje.cadeautje img { position: absolute; left: 0; bottom: 0; width: 64px; height: 64px; opacity: 1; }
.parachute {
  position: absolute; left: -10px; right: -10px; top: 0; height: 34px;
  background: repeating-linear-gradient(90deg, #e2553f 0 14px, #fff6e4 14px 28px);
  border: 3px solid var(--outline); border-radius: 50% 50% 8px 8px / 100% 100% 8px 8px;
}
.parachute::before, .parachute::after { content: ''; position: absolute; top: 30px; width: 2px; height: 26px; background: var(--outline); }
.parachute::before { left: 14px; transform: rotate(-18deg); transform-origin: top; }
.parachute::after { right: 14px; transform: rotate(18deg); transform-origin: top; }
/* Het rendier: 's nachts een gloeiende neus */
.huisdier-rendier.nacht img { filter: drop-shadow(0 0 6px rgba(255, 60, 60, .9)); }
.doneer-snel { flex-wrap: nowrap; }
.doneer-snel .knop { flex: 1 1 0; }
.ruil-regel small { font-weight: 600; color: var(--wood-dark); }
.rij .ds-namen b { display: inline; }
/* Laatste station van een evenement (kerstmarkt, verkoop): gebouw links, vrachtwagen rechts */
.event-keten .station.laatste .gebouw-knop { left: 0; transform: none; width: 54%; }
body.met-winterwoud .event-paneel { border-color: #8e1f24; box-shadow: 0 0 0 3px #d8434f, 0 6px 0 rgba(59, 42, 32, .35); }
body.met-winterwoud .event-item { background: #f2f7ff; }
body.met-winterwoud .event-item.gekocht { background: #eaf6e2; }
