/* Pluim — één bewuste wereld: een straat bij avond.
   Donkere indigo grond, lampgeel als enige accent, baksteen als tweede stem. */

:root {
  --nacht: #0f1219;
  --nacht-diep: #090b11;
  --vlak: #171b26;
  --vlak-op: #1f2432;
  --lijn: #2a3040;
  --licht: #e9ebf1;
  --licht-dim: #98a0b2;
  --licht-flauw: #6a7285;
  --lamp: #f0aa4c;
  --lamp-hel: #ffd894;
  --lamp-diep: #b26a12;
  --baksteen: #c9705a;
  --mos: #8fae88;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --balk-h: 62px;
  --veilig-o: env(safe-area-inset-bottom, 0px);
  --veilig-b: env(safe-area-inset-top, 0px);

  /* dvh volgt de krimpende adresbalk van mobiel Safari/Chrome; vh doet dat niet
     en levert daar een app op die net te lang is en meescrollt. */
  --vh: 100dvh;
}
@supports not (height: 100dvh) {
  :root { --vh: 100vh; }
}

* { box-sizing: border-box; }

/* Moet ná niets anders komen dan de reset: elementen met display:flex/grid negeren
   het hidden-attribuut anders volledig. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--nacht);
  color: var(--licht);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: 2.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.42rem; line-height: 1.2; }
p { margin: 0; }

b, strong { font-weight: 650; }

.label {
  display: block;
  font-size: .67rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--lamp);
  font-weight: 600;
}

/* ---------------- knoppen ---------------- */
.knop {
  font: inherit;
  font-size: .88rem;
  font-weight: 550;
  letter-spacing: .03em;
  color: var(--licht);
  background: var(--vlak-op);
  border: 1px solid var(--lijn);
  border-radius: 3px;
  padding: .72rem 1.15rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .08s;
}
.knop { min-height: 46px; }   /* duimformaat: onder ~44px wordt mistikken de norm */
.knop:hover { border-color: var(--licht-flauw); }
.knop:active { transform: translateY(1px); }
.knop-vol {
  background: var(--lamp);
  border-color: var(--lamp);
  color: #241706;
  font-weight: 650;
}
.knop-vol:hover { background: var(--lamp-hel); border-color: var(--lamp-hel); }
.knop-uit { background: transparent; color: var(--licht-dim); }
.knop:disabled { opacity: .45; cursor: default; transform: none; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
}

/* ---------------- inloggen ---------------- */
.poort {
  min-height: var(--vh);
  display: grid;
  place-items: center;
  padding: calc(2rem + var(--veilig-b)) 1.15rem calc(2rem + var(--veilig-o));
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(240, 170, 76, .10), transparent 60%),
    var(--nacht);
}
.poort-in { width: 100%; max-width: 27rem; display: flex; flex-direction: column; gap: 1.5rem; }
.merk { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.merk-huis { width: 54px; height: auto; fill: var(--vlak-op); margin-bottom: .55rem; }
.merk-huis .raam { fill: var(--lamp); }
@media (prefers-reduced-motion: no-preference) {
  .merk-huis .raam { animation: aanknippen 2.6s ease-in-out infinite alternate; }
  .merk-huis .raam:nth-of-type(2) { animation-delay: .5s; }
}
@keyframes aanknippen { from { opacity: .55; } to { opacity: 1; } }
.merk-sub { font-family: var(--serif); font-style: italic; color: var(--lamp); font-size: 1rem; }
.poort-lead { color: var(--licht-dim); font-size: .95rem; text-align: center; }

.tabs-mini { display: flex; gap: .4rem; margin-bottom: .3rem; }
.mini {
  flex: 1; font: inherit; font-size: .84rem; font-weight: 550;
  padding: .6rem; min-height: 44px; cursor: pointer;
  background: transparent; color: var(--licht-flauw);
  border: 0; border-bottom: 2px solid var(--lijn);
}
.mini.actief { color: var(--lamp); border-bottom-color: var(--lamp); }

/* ---------------- kaarten & velden ---------------- */
.kaart {
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.uitleg { font-size: .85rem; color: var(--licht-dim); }

.veld { display: flex; flex-direction: column; gap: .34rem; }
.veld > span { font-size: .78rem; color: var(--licht-dim); }
input {
  font: inherit;
  /* Precies 16px: bij iets kleiner zoomt iOS Safari bij elke focus in en
     springt de hele lay-out. Niet verkleinen. */
  font-size: 16px;
  color: var(--licht);
  background: var(--nacht-diep);
  border: 1px solid var(--lijn);
  border-radius: 3px;
  padding: .7rem .8rem;
  width: 100%;
  min-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: var(--licht-flauw); }

.fout { font-size: .85rem; color: var(--baksteen); }
.goed { font-size: .85rem; color: var(--mos); }
.rij { display: flex; gap: .55rem; }
.rij input { flex: 1; }
.rij .knop { white-space: nowrap; }

/* ---------------- app-frame ---------------- */
.app { height: var(--vh); }
.blad {
  display: none;
  height: calc(var(--vh) - var(--balk-h) - var(--veilig-o));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.blad.actief { display: block; }
#blad-kaart.actief { display: block; position: relative; overflow: hidden; }

.bladkop {
  padding: calc(1.5rem + var(--veilig-b)) 1.15rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.voorraad { font-size: .87rem; color: var(--licht-dim); margin-top: .3rem; }
.voorraad b {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--lamp);
  font-variant-numeric: tabular-nums;
  margin-right: .1rem;
}

.lijst { display: flex; flex-direction: column; gap: .5rem; padding: 0 1.15rem 1.5rem; }
.leeg { padding: 1rem 1.15rem; color: var(--licht-dim); font-size: .9rem; }

/* ---------------- kaart (Leaflet) ---------------- */
.kaartvlak { position: absolute; inset: 0; background: var(--nacht-diep); }
.leaflet-container { background: var(--nacht-diep); font-family: var(--sans); }
.leaflet-control-attribution {
  background: rgba(9, 11, 17, .78) !important;
  color: var(--licht-flauw) !important;
  font-size: .62rem !important;
}
.leaflet-control-attribution a { color: var(--licht-dim) !important; }
.leaflet-bar { border: 1px solid var(--lijn) !important; }
.leaflet-bar a {
  background: var(--vlak) !important;
  color: var(--licht) !important;
  border-bottom-color: var(--lijn) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
}
/* Zoomknoppen naar de rechterflank: linksboven botsen ze met de instructiebalk en
   onderaan met het huispaneel. Hier staan ze altijd vrij. */
.leaflet-top.leaflet-left {
  top: 50%;
  left: auto;
  right: 0;
  transform: translateY(-50%);
}

/* een huis = een lampje; de gloed groeit met het aantal pluimen */
.lamp-wrap { background: none; border: 0; }
.lamp {
  --gloed: 10px;
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--lamp-hel), var(--lamp) 58%, var(--lamp-diep));
  box-shadow:
    0 0 0 3px rgba(240, 170, 76, .14),
    0 0 var(--gloed) calc(var(--gloed) * .35) rgba(240, 170, 76, .42),
    0 0 calc(var(--gloed) * 2.6) calc(var(--gloed) * .8) rgba(240, 170, 76, .16);
  cursor: pointer;
}
.lamp.ik {
  background: radial-gradient(circle at 38% 32%, #fff, var(--lamp-hel) 55%, var(--lamp));
  outline: 2px solid rgba(255, 216, 148, .55);
  outline-offset: 3px;
}
.lamp-naam {
  position: absolute; left: 50%; top: 17px; transform: translateX(-50%);
  font-size: .68rem; color: var(--licht-dim); white-space: nowrap;
  text-shadow: 0 1px 4px var(--nacht-diep);
  pointer-events: none;
}

.kruis {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; pointer-events: none; z-index: 500;
}
.kruis::before, .kruis::after {
  content: ''; position: absolute; background: var(--lamp);
}
.kruis::before { left: 50%; top: 0; width: 1px; height: 100%; margin-left: -.5px; }
.kruis::after { top: 50%; left: 0; height: 1px; width: 100%; margin-top: -.5px; }

.zweef {
  position: absolute; left: .9rem; right: .9rem; z-index: 600;
  top: calc(.9rem + var(--veilig-b));
  background: rgba(23, 27, 38, .95);
  border: 1px solid var(--lijn); border-radius: 4px;
  padding: 1rem; display: flex; flex-direction: column; gap: .75rem;
  font-size: .9rem; color: var(--licht-dim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.paneel {
  position: absolute; left: .9rem; right: .9rem; bottom: .9rem; z-index: 600;
  background: rgba(23, 27, 38, .97);
  border: 1px solid var(--lijn); border-radius: 4px;
  padding: 1.15rem; display: flex; flex-direction: column; gap: .55rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* Niet aan .paneel vastklinken: dezelfde sluitknop zit ook in dialogen. */
.sluit {
  background: none; border: 0; color: var(--licht-flauw);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  min-width: 44px; min-height: 44px;   /* raakvlak groot genoeg voor een duim */
  padding: 0;
}
.sluit:hover { color: var(--licht); }
.paneel .sluit { position: absolute; right: .35rem; top: .2rem; }
.paneel-tel { font-size: .87rem; color: var(--licht-dim); }
.paneel-tel b {
  font-family: var(--serif); font-size: 1.35rem; color: var(--lamp);
  font-variant-numeric: tabular-nums; margin-right: .2rem;
}

/* ---------------- vriendenrij ---------------- */
.buur {
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: 4px;
  padding: .9rem 1rem;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem 1rem;
}
.buur .naam { font-family: var(--serif); font-size: 1.05rem; }
.buur .meta { font-size: .78rem; color: var(--licht-flauw); grid-column: 1; }
.buur .knop { grid-column: 2; grid-row: 1 / span 2; }
.buur.vol .knop { opacity: .45; }

.gift {
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: 4px;
  border-left: 3px solid var(--lamp);
  padding: .85rem 1rem; display: flex; flex-direction: column; gap: .25rem;
}
.gift .van { font-family: var(--serif); font-size: 1rem; }
.gift .bericht { font-size: .9rem; color: var(--licht-dim); }
.gift .wanneer { font-size: .72rem; color: var(--licht-flauw); }

/* ---------------- code ---------------- */
.code {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: .14em;
  color: var(--lamp);
  text-align: center;
  background: var(--nacht-diep);
  border: 1px dashed var(--lijn);
  border-radius: 4px;
  padding: .9rem;
  user-select: all;
}

.keuzes { display: flex; flex-direction: column; gap: .4rem; }
.keuzes button {
  font: inherit; font-size: .9rem; text-align: left;
  padding: .68rem .9rem; min-height: 46px; cursor: pointer;
  background: var(--nacht-diep); color: var(--licht-dim);
  border: 1px solid var(--lijn); border-radius: 3px;
}
.keuzes button.actief { border-color: var(--lamp); color: var(--lamp); }

.voet { text-align: center; font-size: .74rem; color: var(--licht-flauw); padding: 1.5rem 0 2rem; }
#blad-jij { padding: 0 1.15rem; }
#blad-jij .bladkop { padding-left: 0; padding-right: 0; }   /* anders dubbele marge */
#blad-jij .kaart, #blad-jij .knop-uit { margin-bottom: .8rem; }
#blad-jij .knop-uit { width: 100%; }

/* ---------------- overlay ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(9, 11, 17, .8);
  display: grid; place-items: end center;
  padding: 1rem;
}
.dialoog {
  width: 100%; max-width: 27rem;
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: 4px;
  padding: 1.35rem; display: flex; flex-direction: column; gap: .85rem;
  margin-bottom: calc(var(--balk-h) + var(--veilig-o));
}
@media (prefers-reduced-motion: no-preference) {
  .dialoog { animation: omhoog .22s ease-out; }
}
@keyframes omhoog { from { transform: translateY(14px); opacity: 0; } }

/* ---------------- tabbalk ---------------- */
.balk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  height: calc(var(--balk-h) + var(--veilig-o));
  padding-bottom: var(--veilig-o);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(15, 18, 25, .96);
  border-top: 1px solid var(--lijn);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.tab {
  font: inherit; font-size: .68rem; letter-spacing: .04em;
  background: none; border: 0; cursor: pointer;
  color: var(--licht-flauw);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .12rem;
}
.tab .ico { font-size: 1.08rem; line-height: 1; }
.tab.actief { color: var(--lamp); }

/* ---------------- huis, versiering, shop ---------------- */
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }

.sub { display: flex; flex-direction: column; gap: .8rem; padding: 0 1.15rem 1.5rem; }

.segment { display: flex; gap: .4rem; padding: 0 1.15rem 1rem; }
.seg {
  flex: 1; font: inherit; font-size: .86rem; font-weight: 550;
  min-height: 44px; cursor: pointer;
  background: var(--vlak); color: var(--licht-dim);
  border: 1px solid var(--lijn); border-radius: 3px;
}
.seg.actief { border-color: var(--lamp); color: var(--lamp); background: var(--vlak-op); }

/* de gevel: foto of standaardhuis, met de versiering als laag erover */
.gevel {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--nacht-diep);
  border: 1px solid var(--lijn);
  border-radius: 4px;
  overflow: hidden;
  touch-action: none;          /* anders scrolt de pagina mee tijdens slepen */
  user-select: none;
}
.gevel > img, .gevel > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Foto en standaardhuis liggen op elkaar; welke je ziet hangt aan deze klasse.
   Het hidden-attribuut is hier onbetrouwbaar omdat het op een <svg> niet aanslaat. */
.gevel:not(.met-foto) > img { display: none; }
.gevel.met-foto > svg { display: none; }
.lagen { position: absolute; inset: 0; }

.sticker {
  position: absolute;
  width: 22%;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  cursor: grab;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
}
.sticker svg { width: 100%; height: auto; display: block; pointer-events: none; }
.sticker.gekozen { outline: 2px dashed var(--lamp); outline-offset: 4px; border-radius: 2px; }
.lagen.kijk .sticker { cursor: default; }

@media (prefers-reduced-motion: no-preference) {
  .rgb circle { animation: rgbdraai 4s linear infinite; }
  .rgb circle:nth-child(2) { animation-delay: .8s; }
  .rgb circle:nth-child(3) { animation-delay: 1.6s; }
  .rgb circle:nth-child(4) { animation-delay: 2.4s; }
  .rgb circle:nth-child(5) { animation-delay: 3.2s; }
  @keyframes rgbdraai {
    0%   { fill: #e8674c; } 25% { fill: #f0aa4c; } 50% { fill: #7fa87a; }
    75%  { fill: #5c7a9c; } 100% { fill: #e8674c; }
  }
  .lichtje { animation: pulseer 2.4s ease-in-out infinite alternate; }
  .lichtje:nth-child(3) { animation-delay: .4s; }
  .lichtje:nth-child(4) { animation-delay: .8s; }
  .lichtje:nth-child(5) { animation-delay: 1.2s; }
  .lichtje:nth-child(6) { animation-delay: 1.6s; }
  @keyframes pulseer { from { opacity: .45; } to { opacity: 1; } }
  .rook { animation: stijg 4.5s ease-out infinite; }
  .rook.r2 { animation-delay: 1.2s; }
  .rook.r3 { animation-delay: 2.4s; }
  @keyframes stijg {
    from { transform: translateY(6px) scale(.7); opacity: .55; }
    to   { transform: translateY(-16px) scale(1.25); opacity: 0; }
  }
}
.rgb circle { fill: #e8674c; }

/* geselecteerde sticker aanpassen */
.sel {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  flex-wrap: wrap;
  background: var(--vlak-op); border: 1px solid var(--lamp); border-radius: 4px;
  padding: .7rem .9rem; font-size: .9rem;
}
.sel-knoppen { display: flex; gap: .4rem; }
.sel-knoppen .knop { padding: .5rem .85rem; min-height: 42px; }

/* wat je bezit, als strip om aan te tikken */
.strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.strip .stuk {
  width: 68px; height: 68px; padding: .5rem;
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: 4px;
  cursor: pointer; display: grid; place-items: center;
}
.strip .stuk svg { width: 100%; height: 100%; }
.strip .stuk.staat { border-color: var(--lamp); opacity: .5; cursor: default; }
.strip .leegtekst { font-size: .88rem; color: var(--licht-flauw); }

/* shop */
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: .6rem; }
.waar {
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: 4px;
  padding: .8rem; display: flex; flex-direction: column; gap: .45rem; align-items: center;
  text-align: center;
}
.waar .beeld { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.waar .beeld svg { width: 74%; height: 74%; }
.waar .wnaam { font-family: var(--serif); font-size: .96rem; line-height: 1.2; }
.waar .wprijs {
  font-size: .8rem; color: var(--lamp); font-variant-numeric: tabular-nums; font-weight: 600;
}
.waar .knop { width: 100%; padding: .55rem; min-height: 42px; font-size: .82rem; }
.waar.bezit { border-color: var(--mos); }
.waar.bezit .wprijs { color: var(--mos); }
.waar .wseizoen {
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--baksteen); font-weight: 600;
}
.waar.pronk { border-color: var(--lamp); }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--balk-h) + var(--veilig-o) + 1rem);
  z-index: 950;
  background: var(--lamp); color: #241706;
  font-size: .88rem; font-weight: 600;
  padding: .65rem 1.1rem; border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: omhoog .2s ease-out; }
}

/* ---------------- kaart + huis onder elkaar ----------------
   De kaart is de context, het huis is waar het om gaat. Op mobiel dus een smalle
   kaartstrook boven en de gevel groot daaronder. */
#blad-kaart.actief {
  display: grid;
  grid-template-rows: 25% minmax(0, 1fr);
}
.kaartvlak { position: relative; inset: auto; grid-row: 1; }
.onderhuis {
  grid-row: 2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: .9rem 1.15rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  border-top: 1px solid var(--lijn);
  background: var(--nacht);
}
.huiskop { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.huiskop-wie h2 { margin-top: .1rem; }
.huiskop-tel { font-size: .82rem; color: var(--licht-dim); white-space: nowrap; }
.huiskop-tel b {
  font-family: var(--serif); font-size: 1.3rem; color: var(--lamp);
  font-variant-numeric: tabular-nums; margin-right: .2rem;
}
.huiskop-acties { flex-wrap: wrap; }
.huiskop-acties .knop { flex: 1 1 auto; }

/* het kruis en de plaats-hint horen bij de kaartstrook, niet bij het hele blad */
#blad-kaart .kruis { top: 12.5%; }
#blad-kaart .zweef { top: calc(.6rem + var(--veilig-b)); }

/* ---------------- muntenmijn ---------------- */
.mijn {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(150deg, rgba(240, 170, 76, .1), transparent 70%), var(--vlak);
  border: 1px solid var(--lijn); border-radius: 4px; padding: 1rem 1.1rem;
}
.mijn-info { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.mijn-groot { font-size: .84rem; color: var(--licht-dim); }
.mijn-groot b {
  font-family: var(--serif); font-size: 1.75rem; color: var(--lamp);
  font-variant-numeric: tabular-nums; margin-right: .25rem;
}
.mijn-balk { height: 6px; border-radius: 3px; background: var(--nacht-diep); overflow: hidden; }
.mijn-balk span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--lamp-diep), var(--lamp));
  transition: width .4s ease;
}
.mijn.vol .mijn-balk span { background: var(--baksteen); }
.mijn .knop { flex: none; }

/* ---------------- slider ---------------- */
.sel { flex-direction: column; align-items: stretch; gap: .7rem; }
.sel-kop { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.sel-schuif { display: flex; align-items: center; gap: .7rem; font-size: .8rem; color: var(--licht-dim); }
.sel-schuif output {
  font-variant-numeric: tabular-nums; color: var(--lamp); font-weight: 600;
  min-width: 3.2rem; text-align: right;
}
input[type=range] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 30px; background: none; padding: 0; border: 0; min-height: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px; background: var(--nacht-diep);
  border: 1px solid var(--lijn);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -10px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--lamp-hel), var(--lamp) 60%, var(--lamp-diep));
  border: 0; cursor: grab;
  box-shadow: 0 0 10px rgba(240, 170, 76, .4);
}
input[type=range]::-moz-range-track {
  height: 5px; border-radius: 3px; background: var(--nacht-diep); border: 1px solid var(--lijn);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: var(--lamp); box-shadow: 0 0 10px rgba(240, 170, 76, .4); cursor: grab;
}

/* ---------------- wallet-grafiek ---------------- */
.grafiek-wrap { width: 100%; overflow: hidden; }
#wallet-grafiek { width: 100%; height: 190px; display: block; }
.legenda { display: flex; gap: 1.1rem; font-size: .76rem; color: var(--licht-dim); }
.legenda .bol {
  display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .35rem;
}
.legenda .bol.in { background: var(--mos); }
.legenda .bol.uit { background: var(--baksteen); }
.legenda .bol.lijn { background: var(--lamp); border-radius: 50%; }
.walletcijfers { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.walletcijfers div { display: flex; flex-direction: column; gap: .1rem; }
.walletcijfers b {
  font-family: var(--serif); font-size: 1.5rem; color: var(--lamp);
  font-variant-numeric: tabular-nums;
}
.walletcijfers span { font-size: .76rem; color: var(--licht-dim); }

.merk-zij { display: none; }

/* ================= browser: onderbalk wordt zijbalk =================
   Op een breed scherm hoort navigatie niet onderaan te plakken. De balk schuift
   naar links, de inhoud krijgt de rest, en lijsten houden een leesbare breedte. */
@media (min-width: 900px) {
  .app {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    height: var(--vh);
  }

  .balk {
    position: static;
    grid-column: 1;
    grid-row: 1;
    height: var(--vh);
    padding: 1.4rem .7rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .18rem;
    border-top: 0;
    border-right: 1px solid var(--lijn);
    background: var(--nacht-diep);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .merk-zij {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .7rem 1.5rem;
    font-family: var(--serif);
    font-size: 1.16rem;
    letter-spacing: -.01em;
  }
  .merk-zij svg { width: 26px; height: auto; fill: var(--vlak-op); flex: none; }
  .merk-zij .raam { fill: var(--lamp); }

  .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    padding: .68rem .7rem;
    border-radius: 3px;
    font-size: .92rem;
    letter-spacing: 0;
    min-height: 44px;
  }
  .tab .ico { font-size: 1rem; width: 1.1rem; text-align: center; }
  .tab:hover { background: var(--vlak); color: var(--licht); }
  .tab.actief { background: var(--vlak-op); color: var(--lamp); }

  .blad {
    grid-column: 2;
    grid-row: 1;
    height: var(--vh);
  }
  /* lijsten en formulieren blijven leesbaar; de kaart mag alle ruimte pakken */
  .bladkop, .lijst, .sub, .segment, .leeg { max-width: 44rem; }
  #blad-jij { max-width: 44rem; }
  .gevel { max-width: 34rem; }
  .shopgrid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

  /* In de browser is er breedte: kaart links, huis rechts naast elkaar in plaats
     van de 25/75-stapeling van mobiel. */
  #blad-kaart.actief {
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr) 27rem;
  }
  .kaartvlak { grid-column: 1; grid-row: 1; }
  .onderhuis {
    grid-column: 2; grid-row: 1;
    border-top: 0;
    border-left: 1px solid var(--lijn);
    padding: 1.5rem 1.4rem;
  }
  #blad-kaart .kruis { top: 50%; }
  #blad-kaart .zweef { left: 1rem; right: 28rem; }
  .huiskop-acties .knop { flex: 1 1 100%; }

  /* dialogen horen in de browser gecentreerd, niet onderaan geplakt */
  .overlay { place-items: center; }
  .dialoog { margin-bottom: 0; }

  .toast { bottom: 1.6rem; left: auto; right: 1.6rem; transform: none; }
}

/* tussenmaat: nog onderbalk, maar wel gecentreerde inhoud */
@media (min-width: 720px) and (max-width: 899px) {
  .blad { max-width: 46rem; margin: 0 auto; }
  #blad-kaart.actief { max-width: none; }
}
