/* ═══════════════════════════════════════════════════════════════
   IsHetAlAfgelast.nl
   Getekende kantine-wereld: perkament, hout, inkt.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Patrick Hand";
  src: url("/fonts/patrick-hand.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* Kleur: inkt, perkament, hout. Afgeleid uit de illustraties. */
  --ink: #2b1a10;
  --ink-2: #5a3e2b;
  --ink-3: #664832;
  --paper: #e9d3a6;
  --paper-hi: #f5e7c7;
  --paper-lo: #d9bd88;
  --cream: #f3e6cb;
  --cream-2: #cdb994;
  --wood-950: #170d08;
  --wood-900: #21140c;
  --wood-800: #2c1b11;
  --wood-700: #3b2517;
  --wood-500: #6b4528;
  --plank: #b98953;
  --plank-hi: #cfa26b;
  --plank-lo: #8f6239;
  --gold: #e7ac3c;
  --gold-hi: #f2c55f;
  --red: #c4392a;
  --red-ink: #8e2216;
  --green: #4f9d2f;
  --green-ink: #2d6a19;
  --focus: #f2c55f;

  --f-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-ui: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Patrick Hand", "Comic Sans MS", cursive;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

  /* Getekende hoeken: net niet symmetrisch, zoals met de hand. */
  --r-hand: 12px 14px 11px 15px / 14px 11px 15px 12px;
  --r-hand-sm: 9px 11px 8px 10px / 10px 8px 11px 9px;
  --line: 2.5px;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --d-1: 140ms; --d-2: 220ms; --d-3: 420ms;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  min-height: 100svh;
  font: 400 1rem/1.5 var(--f-ui);
  color: var(--ink);
  background: var(--wood-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.25;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Ring goud-inkt-goud: de inkt valt op perkament op, het goud op donker hout. */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 8px var(--focus); }

/* Buiten beeld via translate: ook met 200% tekst blijft er niets half zichtbaar. */
/* Officiële algemene afgelasting: zeldzaam, dus mag hij de kantine even wegduwen. */
.status-banner {
  position: relative; z-index: 6;
  display: flex; align-items: flex-start; justify-content: center; gap: var(--s-2);
  padding: 12px clamp(var(--s-4), 4vw, var(--s-6));
  background: var(--red); color: #fff;
  border-bottom: 3px solid var(--ink);
  font-weight: 500; line-height: 1.4;
}
.status-banner .ic { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.status-banner p { max-width: 70ch; }
.status-banner a { color: #fff; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.skip {
  position: absolute; left: var(--s-3); top: var(--s-3); z-index: 100;
  translate: 0 calc(-100% - var(--s-6));
  padding: var(--s-2) var(--s-4); border-radius: var(--r-hand-sm);
  background: var(--gold); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { translate: none; }

/* ═══════════ Scène-systeem ═══════════
   Een .scene is een container. De .stage is de illustratie op "cover"-
   formaat, maar bovenaan verankerd. Kinderen van de scene kunnen zich met
   --sw / --sh / --sx in illustratie-coördinaten plaatsen. */

.scene {
  --ar: 1.79167;
  position: relative;
  min-height: 100svh;
  container-type: inline-size;
  overflow: clip;
  background: var(--wood-900);
  --sw: max(100cqw, 100svh * var(--ar));
  --sh: calc(var(--sw) / var(--ar));
  --sx: calc((100cqw - var(--sw)) / 2);
}

.stage {
  position: absolute;
  top: calc(-1 * var(--lift, 0px));
  left: var(--sx);
  width: var(--sw);
  aspect-ratio: var(--ar);
  container-type: inline-size;
}
.stage picture, .stage img { width: 100%; height: 100%; }
.stage img { object-fit: cover; user-select: none; }
.stage-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Onder de illustratie loopt de vloer door. */
.stage::after {
  content: "";
  position: absolute; left: 0; right: 0; top: calc(100% - 2px);
  height: 100vh;
  background: var(--wood-900);
}
.stage picture { position: relative; display: block; }
.stage picture::after {
  content: "";
  position: absolute; inset: 82% 0 0;
  background: linear-gradient(transparent, var(--wood-900));
  pointer-events: none;
}

/* ═══════════ Topbar ═══════════ */

.topbar {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  padding: max(var(--s-3), env(safe-area-inset-top)) clamp(var(--s-4), 3vw, var(--s-6)) 0;
}
.brand { display: block; border-radius: 10px; }
.brand img {
  width: clamp(118px, 13vw, 190px); height: auto;
  filter: drop-shadow(0 4px 10px rgb(16 9 5 / .45));
}
.topnav { display: flex; gap: var(--s-1); }
.topnav a {
  padding: 10px 14px; border-radius: 999px;
  color: var(--cream); font-weight: 500; font-size: .95rem; text-decoration: none;
  /* Geen backdrop-blur: die moest bij elk regenframe van de kantine opnieuw. */
  background: rgb(23 13 8 / .72);
  transition: background-color var(--d-1) ease;
}
.topnav a:hover { background: rgb(23 13 8 / .8); }

/* ═══════════ Perkamentrol ═══════════
   Uitgeknipt uit de kantine-illustratie (img/scroll.webp, 534x640),
   als border-image zodat hij elke maat aankan. */

.scroll {
  --bx: 64px;
  --bt: calc(var(--bx) * .44);
  --bb: calc(var(--bx) * .6);
  position: relative;
  border-style: solid;
  border-color: transparent;
  border-width: var(--bt) var(--bx) var(--bb);
  border-image: url("/img/scroll.webp") 32 72 44 fill / var(--bt) var(--bx) var(--bb) / 0 stretch;
  filter: drop-shadow(0 18px 28px rgb(16 9 5 / .45));
}

/* ═══════════ Home ═══════════ */

.scene--home .scroll--form {
  /* Precies over de rol in de illustratie; mag naar beneden doorgroeien. */
  --bx: calc(var(--sw) * .056);
  --bt: calc(var(--sw) * .026);
  --bb: calc(var(--sw) * .026);
  z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  width: calc(var(--sw) * .5341);
  min-height: calc(var(--sh) * .49);
  margin: calc(var(--sh) * .4714 - var(--lift, 0px)) auto clamp(var(--s-6), 6vh, var(--s-8));
  padding: clamp(6px, 1.2cqw, 18px) clamp(4px, 1cqw, 14px) clamp(10px, 1.4cqw, 22px);
}

h1, h2, h3 { font-weight: 400; }

.scroll--form h1 {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.2cqw, 3.3rem);
  line-height: 1;
  letter-spacing: .005em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}
.lede {
  max-width: 46ch;
  margin: var(--s-2) auto 0;
  text-align: center;
  color: var(--ink-2);
  font-size: clamp(.95rem, 1.05cqw, 1.06rem);
  line-height: 1.4;
  text-wrap: pretty;
}

.check-form {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-areas:
    "city date"
    "home away"
    "veld cta"
    "remember remember"
    "manual manual";
  gap: var(--s-3) var(--s-4);
  margin-top: clamp(var(--s-4), 1.8cqw, var(--s-5));
}
.field--city { grid-area: city; }
.field--date { grid-area: date; }
.field--home { grid-area: home; }
.field--away { grid-area: away; }
.field--veld { grid-area: veld; }
.btn-cta { grid-area: cta; }
.manual { grid-area: manual; }

.field { display: grid; gap: 5px; min-width: 0; border: 0; padding: 0; }
.field label, .field legend {
  font-weight: 600; font-size: .9rem; color: var(--ink-2); padding: 0;
}
.opt, .unit { font-weight: 400; color: var(--ink-3); font-size: .82rem; }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-hi);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-hand-sm);
  box-shadow: inset 0 2px 0 rgb(43 26 16 / .08);
  transition: background-color var(--d-1) ease, box-shadow var(--d-1) ease;
  appearance: none;
}
.field input::placeholder { color: #7a5c40; font-weight: 400; }
@media (hover: hover) {
  .field input:hover { background: #fbf1da; }
}
.field input:focus { outline: none; background: #fdf6e6; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgb(196 57 42 / .25); }
.field input[type="date"] { min-width: 0; }
.when { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.field input[type="time"] { min-width: 0; width: 8.4em; }
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: .7; cursor: pointer; }

.field-err {
  display: flex; gap: 6px; align-items: center;
  color: var(--red-ink); font-size: .86rem; font-weight: 500;
}

/* Segmented control */
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-hand-sm);
  background: var(--paper-hi);
  overflow: hidden;
  min-height: 48px;
}
.seg label { position: relative; display: grid; }
.seg label + label { border-left: 1.5px solid rgb(43 26 16 / .35); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center;
  padding: 6px 4px;
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
  text-align: center; line-height: 1.1;
  transition: background-color var(--d-1) ease, color var(--d-1) ease;
}
@media (hover: hover) {
  .seg input:hover + span { background: #fbf1da; }
}
.seg input:checked + span { background: var(--ink); color: var(--paper-hi); }
.seg input:focus-visible + span { box-shadow: inset 0 0 0 3px var(--focus), inset 0 0 0 6px var(--ink); }

/* De grote knop: een geverfde plank met inktrand */
.btn-cta {
  align-self: end;
  min-height: 56px;
  padding: 10px 20px;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 1.45cqw, 1.55rem);
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 70%, #d39a2f);
  border: 3px solid var(--ink);
  border-radius: var(--r-hand);
  box-shadow: 0 5px 0 var(--ink), 0 10px 18px rgb(43 26 16 / .3);
  cursor: pointer;
  transition: transform var(--d-1) var(--ease-out), box-shadow var(--d-1) var(--ease-out), filter var(--d-1) ease;
}
@media (hover: hover) {
  .btn-cta:hover { filter: brightness(1.05) saturate(1.05); }
}
.btn-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), 0 4px 8px rgb(43 26 16 / .25); }
.btn-cta:disabled { cursor: progress; filter: saturate(.6); }

.manual { margin-top: calc(var(--s-1) * -1); }

/* Onthouden wedstrijd: alleen op dit toestel */
.remember {
  grid-area: remember; justify-self: end;
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: .9rem; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.saved {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  margin-top: var(--s-3); padding: 10px 14px;
  border: 2px dashed rgb(43 26 16 / .35); border-radius: var(--r-hand);
  color: var(--ink);
}
.saved p { flex: 1 1 14em; margin: 0; font-weight: 500; line-height: 1.3; }
.saved-label {
  display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.btn-forget, .weekend-other {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.btn-forget { min-height: 40px; font-size: .9rem; color: var(--ink-2); text-decoration-color: rgb(43 26 16 / .35); }
.teams-toggle {
  display: none; grid-area: teams; justify-self: start; align-items: center; gap: 6px;
  min-height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink-2);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  text-decoration-color: rgb(43 26 16 / .35);
}
.manual summary {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px;
  font-weight: 600; font-size: .92rem; color: var(--ink-2);
  cursor: pointer; list-style: none;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  text-decoration-color: rgb(43 26 16 / .35);
}
.manual summary::-webkit-details-marker { display: none; }
.manual summary .ic { transition: transform var(--d-2) var(--ease-out); }
.manual[open] summary .ic { transform: rotate(180deg); }
.manual summary:hover { color: var(--ink); }
.manual-hint { margin: var(--s-1) 0 var(--s-3); font-size: .9rem; color: var(--ink-2); }
.manual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }

/* ═══════════ Het rekenwerk ═══════════ */

.reken {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 140px) clamp(var(--s-5), 5vw, var(--s-7)) clamp(var(--s-7), 7vw, 104px);
  color: var(--cream);
}
.overline { font-family: var(--f-hand); font-size: 1.4rem; line-height: 1.1; color: var(--gold); }
.reken-head h2 {
  max-width: 17ch;
  margin-top: var(--s-2);
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 1;
  color: var(--paper-hi);
  text-wrap: balance;
}
.reken-lede {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-4) clamp(var(--s-5), 4vw, 56px);
  margin-top: var(--s-6);
}
.reken-lede p { max-width: 52ch; color: var(--cream-2); font-size: 1.08rem; line-height: 1.65; }
.reken-lede strong { color: var(--gold-hi); font-weight: 600; }
.henk-link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--gold-hi);
  text-decoration: underline wavy rgb(242 197 95 / .6); text-underline-offset: 5px;
  transition: color var(--d-1) ease;
}
.henk-link:hover { color: var(--paper-hi); }

.reken-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--s-6), 6vw, 88px);
  margin-top: clamp(var(--s-7), 6vw, 88px);
  align-items: start;
}

/* Appgroep-mock: de reden dat deze site bestaat */
.appgroep {
  position: sticky; top: var(--s-5);
  overflow: hidden;
  color: var(--ink);
  background: #e9dfc9;
  border: 3px solid var(--ink);
  border-radius: 22px 26px 20px 24px / 26px 20px 24px 22px;
  box-shadow: 0 6px 0 var(--ink), 0 24px 50px rgb(0 0 0 / .35);
  rotate: -1.2deg;
}
.appgroep-top {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: #2f5e3a; color: var(--paper-hi);
  border-bottom: 3px solid var(--ink);
}
.appgroep-av {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--gold); color: var(--ink);
  font-family: var(--f-display);
}
.appgroep-top strong { display: block; font-weight: 600; line-height: 1.2; }
.appgroep-top small { display: block; font-size: .8rem; opacity: .8; }
.appgroep-log {
  list-style: none;
  display: grid; align-content: end; gap: var(--s-2);
  min-height: 400px;
  padding: var(--s-4) var(--s-3) var(--s-3);
}
.appgroep-log li {
  justify-self: start; max-width: 86%;
  padding: 6px 10px 4px;
  background: var(--paper-hi);
  border: 1.5px solid rgb(43 26 16 / .2);
  border-radius: 4px 14px 14px 14px;
  font-size: .95rem; line-height: 1.35;
}
.appgroep-log b { display: block; font-size: .78rem; font-weight: 600; color: var(--red-ink); }
.appgroep-log time { display: block; text-align: right; font-size: .7rem; color: var(--ink-3); }
.appgroep-log .me { justify-self: end; background: #dcf2c4; border-radius: 14px 4px 14px 14px; }
.appgroep-log .sys {
  justify-self: center; padding: 4px 12px;
  background: rgb(43 26 16 / .08); border-color: transparent; border-radius: 999px;
  font-size: .8rem; color: var(--ink-2);
}
.appgroep-log .is-new { animation: rise var(--d-2) var(--ease-out); }
.appgroep-more {
  display: block; width: calc(100% - 24px); min-height: 44px; margin: 0 12px 12px;
  border: 2px dashed rgb(43 26 16 / .4); border-radius: 12px;
  background: none; cursor: pointer;
  font-weight: 600; font-size: .92rem; color: var(--ink-2);
  transition: background-color var(--d-1) ease, color var(--d-1) ease;
}
.appgroep-more:hover { background: rgb(43 26 16 / .06); color: var(--ink); }
.appgroep-more:active { transform: translateY(1px); }

/* De basisopstelling */
.opstelling h3 { font-family: var(--f-hand); font-size: 1.6rem; line-height: 1.1; color: var(--gold-hi); }
.factors { list-style: none; padding: 0; margin-top: var(--s-3); }
.factors li {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: var(--s-4);
  padding: var(--s-5) 0;
  border-top: 1px solid rgb(243 230 203 / .14);
}
.factors li:last-child { border-bottom: 1px solid rgb(243 230 203 / .14); }
.factors li:nth-child(1) { --w: 1; }
.factors li:nth-child(2) { --w: .72; }
.factors li:nth-child(3) { --w: .6; }
.factors li:nth-child(4) { --w: .45; }
.factors li:nth-child(5) { --w: .34; }
.shirt { position: relative; width: 3.4rem; height: 3.4rem; }
.shirt svg { width: 100%; height: 100%; fill: var(--red); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.shirt b {
  position: absolute; inset: 0;
  display: grid; place-items: center; padding-top: 12%;
  font-family: var(--f-display); font-weight: 400; font-size: 1.3rem;
  color: var(--paper-hi);
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
}
.factors h4 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-3);
  font-weight: 600; font-size: 1.15rem; color: var(--paper-hi);
}
.tag { font-family: var(--f-hand); font-weight: 400; font-size: 1.1rem; color: var(--gold); }
.factors p { max-width: 54ch; margin-top: 2px; color: var(--cream-2); }
.factors .bar {
  display: block; max-width: 360px; height: 8px; margin-top: var(--s-3);
  border-radius: 999px; background: rgb(243 230 203 / .1); overflow: hidden;
}
.factors .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transform-origin: 0 50%;
  transform: scaleX(var(--w));
  transition: transform 1s var(--ease-out);
}
.reken:not(.is-seen) .factors .bar i { transform: scaleX(0); }
.factors li:nth-child(2) .bar i { transition-delay: 90ms; }
.factors li:nth-child(3) .bar i { transition-delay: 180ms; }
.factors li:nth-child(4) .bar i { transition-delay: 270ms; }
.factors li:nth-child(5) .bar i { transition-delay: 360ms; }
.bank { margin-top: var(--s-4); color: var(--cream-2); font-size: .95rem; }
.bank strong { color: var(--paper-hi); font-weight: 600; }

/* ═══════════ Deelband ═══════════ */

.deelband { background: var(--gold); color: var(--ink); border-block: 3px solid var(--ink); }
.deelband-inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-3) clamp(var(--s-5), 5vw, var(--s-8));
  align-items: center;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(var(--s-7), 6vw, 88px) clamp(var(--s-5), 5vw, var(--s-7));
}
.deelband h2 {
  grid-row: span 2;
  max-width: 22ch;
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.04;
  text-wrap: balance;
}
.deelband p { font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.15; }
.deelband .share-row { margin-top: 0; }
.deelband .btn-share { flex-basis: 100%; }
.deelband .btn-net { flex: 1; }

/* ═══════════ Plaatsen ═══════════ */

.places {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(var(--s-7), 6vw, 88px) clamp(var(--s-5), 5vw, var(--s-7)) clamp(var(--s-8), 9vw, 140px);
  color: var(--cream);
}
.places h2 {
  font-family: var(--f-hand); font-size: 1.5rem; color: var(--gold-hi); margin-bottom: var(--s-3);
}
.place-list {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 0;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.25;
}
.place-list li:not(:last-child)::after { content: "·"; margin: 0 .35em; color: var(--wood-500); }
.place-list a {
  color: var(--paper); text-decoration: none;
  transition: color var(--d-1) ease;
}
.place-list a:hover { color: var(--gold-hi); }
.place-list a.more { color: var(--gold); }
.place-list .km { font-family: var(--f-ui); font-size: .9rem; color: var(--cream-2); }

/* Plaatspagina: seizoensweer */
.places--klimaat { padding-bottom: 0; }
.places p { max-width: 62ch; margin-bottom: var(--s-3); color: var(--cream-2); }
.places .bron { font-size: .85rem; }
.klimaat-tabel {
  width: 100%; max-width: 720px; margin: var(--s-3) 0 var(--s-4);
  border-collapse: collapse; font-variant-numeric: tabular-nums;
}
.klimaat-tabel th, .klimaat-tabel td {
  padding: 8px 10px; border-bottom: 1px solid var(--wood-700); text-align: right;
}
.klimaat-tabel th[scope="row"], .klimaat-tabel thead th:first-child { text-align: left; font-weight: 500; }
.klimaat-tabel thead th { font-family: var(--f-display); font-weight: 400; color: var(--gold-hi); }

/* ═══════════ Uitslag ═══════════
   Drie lagen, elk met een eigen vorm:
   1. scène + bord (de emotie), precies tot de vouw;
   2. scorebord-band met het weer, sluit de eerste viewport af;
   3. keuringsrapport op perkament: stuitproef links, verslag + delen rechts;
   daarna een los extraatje (zondagprogramma of tas-check). */

.scene--result {
  --band: clamp(96px, 13svh, 124px);
  min-height: 0;
  height: max(460px, calc(100svh - var(--band)));
}
.scene--result[data-mood="afgelast"] { --ar: 1.5; }
.scene--result[data-mood="doorgaat"] { --ar: 1.81269; --sx: calc(100cqw - var(--sw)); }
.scene--result::after {
  content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 72px;
  background: linear-gradient(transparent, rgb(23 13 8 / .7));
  pointer-events: none;
}

.btn-back {
  position: absolute; z-index: 6;
  top: max(var(--s-4), env(safe-area-inset-top)); right: clamp(var(--s-4), 3vw, var(--s-6));
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 16px 8px 12px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper-hi); color: var(--ink);
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  transition: transform var(--d-1) var(--ease-out), box-shadow var(--d-1) var(--ease-out);
}
.btn-back:hover { background: #fff6e2; }
.btn-back:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

/* Het uitslagbord: een geschilderde plank, opgehangen aan touw, op de lege muur */
.board {
  position: absolute; z-index: 4;
  left: max(var(--s-5), calc(var(--sx) + var(--sw) * .035));
  top: calc(var(--sh) * .06);
  width: min(calc(var(--sw) * .37), 600px);
  container-type: inline-size;
  transform-origin: 50% -40px;
}
.board-rope {
  position: absolute; left: 12%; right: 12%; bottom: 100%; height: 200px;
  border-inline: 3px solid #4a3020;
  pointer-events: none;
}
.board-plank {
  position: relative;
  padding: 5cqw 6cqw 5.2cqw;
  color: var(--ink);
  background:
    repeating-linear-gradient(176deg, transparent 0 22px, rgb(110 70 35 / .16) 22px 24px, transparent 24px 41px),
    linear-gradient(180deg, var(--plank-hi), var(--plank) 45%, #a8784a);
  border: 3px solid var(--ink);
  border-radius: 14px 18px 12px 20px / 18px 12px 20px 14px;
  box-shadow: inset 0 -6px 0 rgb(90 55 25 / .35), inset 0 3px 0 rgb(255 230 180 / .35), 0 16px 30px rgb(16 9 5 / .45);
}
/* spijkers */
.board-plank::before, .board-plank::after {
  content: ""; position: absolute; top: 12px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9b8a0, #5c4a3a 70%);
  border: 1.5px solid var(--ink);
}
.board-plank::before { left: 10.5%; }
.board-plank::after { right: 10.5%; }

.board-kicker {
  font-family: var(--f-hand);
  font-size: clamp(1rem, 4.4cqw, 1.45rem);
  line-height: 1.15;
  color: #4a2f1c;
  overflow-wrap: anywhere;
}
/* Krijgt focus van het script, niet van de gebruiker: geen ring. */
.board-word:focus { outline: none; box-shadow: none; }
.board-word {
  display: inline-block;
  margin-top: .5cqw;
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 15cqw, 6.2rem);
  line-height: .92;
  letter-spacing: .01em;
  -webkit-text-stroke: max(2px, .55cqw) var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 .9cqw 0 var(--ink);
  transform-origin: 35% 60%;
  rotate: -2deg;
}
.board-word.is-stamped { animation: stamp 560ms var(--ease-out) .12s both; }
@keyframes stamp {
  0% { opacity: 0; scale: 2.4; rotate: -9deg; }
  55% { opacity: 1; scale: .93; rotate: -1deg; }
  75% { scale: 1.03; }
  100% { scale: 1; rotate: -2deg; }
}
.board-hedge {
  display: block; margin-bottom: .6cqw;
  font-family: var(--f-hand); font-size: clamp(1rem, 4.4cqw, 1.45rem); line-height: 1; letter-spacing: 0;
  color: #4a2f1c; -webkit-text-stroke: 0; text-shadow: none;
}
.board-note, .board-horizon { margin-top: 2.6cqw; font-size: clamp(.8rem, 3.1cqw, .95rem); line-height: 1.3; color: #3d2615; }
.board-horizon { margin-top: 1.2cqw; font-weight: 600; }
.board-weekend, .board-shared { margin-top: 1.2cqw; font-size: clamp(.8rem, 3.1cqw, .95rem); line-height: 1.3; color: #3d2615; }
#btn-ics { margin-top: var(--s-4); }
.board-note a { color: var(--ink); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.mood-afgelast .board-word { color: var(--red); }
.mood-doorgaat .board-word { color: #5cb336; }
.mood-twijfel .board-word, .is-early .board-word { color: var(--gold-hi); font-size: clamp(2.2rem, 12cqw, 5rem); }

.board-meter {
  display: flex; align-items: center; gap: 3.5cqw;
  margin-top: 3.5cqw;
}
.thermo {
  position: relative; flex: 1;
  height: max(18px, 5cqw);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #eef3f2;
  overflow: hidden;
  box-shadow: inset 0 3px 0 rgb(255 255 255 / .7);
}
.thermo-fill {
  position: absolute; inset: 0;
  background: var(--thermo, var(--red));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.3s var(--ease-out) .25s;
}
.thermo-fill::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 30%;
  border-radius: 9px; background: rgb(255 255 255 / .35);
}
.board-pct { display: grid; line-height: 1; text-align: right; }
.board-pct strong {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2rem, 10cqw, 4.2rem);
  font-variant-numeric: tabular-nums;
}
.board-pct span { font-size: clamp(.8rem, 3.2cqw, 1rem); font-weight: 600; color: #4a2f1c; }

/* Live-data in de borden van de doorgaat-illustratie (desktop) */
.dg-live { display: none; }
.scene--result[data-mood="doorgaat"] .dg-live { display: block; }
.dg {
  position: absolute;
  display: flex; align-items: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--f-display);
  color: var(--cream);
  font-size: 1.45cqw;
  line-height: 1;
  padding: 0 .35cqw;
}
.dg-home { left: 31.5%; width: 7.2%; top: 24.9%; height: 4.2%; }
.dg-away { left: 40.9%; width: 7.8%; top: 24.2%; height: 4.4%; }
.dg-city { left: 37%; width: 6.7%; top: 29.5%; height: 3.8%; }
.dg-date { left: 36.5%; width: 8.9%; top: 33.6%; height: 4.2%; }
.dg-weather {
  left: 57.4%; width: 15.4%; top: 23.6%; height: 13.4%;
  white-space: pre-line; align-items: center;
  color: var(--ink); font-size: 1.5cqw; line-height: 1.2;
}
.dg-pct {
  left: 87%; width: 8.9%; top: 29.4%; height: 10.6%;
  justify-content: center;
  font-size: 4cqw; color: #8fe06a;
}
.dg-liquid {
  position: absolute; left: 82.85%; width: 1.42%; top: 14.6%; height: 35%;
  border-radius: 1cqw;
  overflow: hidden;
}
.dg-liquid i {
  position: absolute; inset: 0;
  background: var(--thermo, var(--green));
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 1.6s var(--ease-out) .4s;
}

@media (orientation: landscape) {
  /* De illustratie heeft zijn eigen borden: ons bord alleen voor screenreaders. */
  .scene--result[data-mood="doorgaat"] .board {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
}

@media (orientation: portrait) {
  /* Bord bovenaan in de flow, illustratie eronder: bijgesneden tot het verhaal
     (raam + slaper, of de handdruk). */
  .scene--result {
    --sw: 100cqw; --sx: 0px;
    display: flex; flex-direction: column;
    height: auto; min-height: 0;
  }
  .scene--result[data-mood="afgelast"] { --ar: .66667; }
  .scene--result .stage {
    position: relative; top: auto; left: 0; flex: none;
    margin-top: calc(var(--sh) * -.15);
    margin-bottom: calc(var(--sh) * -.2);
  }
  .scene--result[data-mood="doorgaat"] { --sw: 190cqw; --sx: calc(50cqw - var(--sw) * .5); }
  .scene--result[data-mood="doorgaat"] .stage {
    left: var(--sx);
    margin-top: calc(var(--sh) * -.39);
    margin-bottom: calc(var(--sh) * -.03);
  }
  .scene--result[data-mood="doorgaat"] .dg-live { display: none; }

  .board {
    position: relative; order: -1; left: 0; top: 0; width: auto;
    transform-origin: 50% 0;
  }
  .board-rope { display: none; }
  .board-plank {
    padding: calc(max(var(--s-3), env(safe-area-inset-top)) + 58px) var(--s-5) var(--s-5);
    border-width: 0 0 3px;
    border-radius: 0 0 18px 22px / 0 0 14px 18px;
  }
  .board-plank::before, .board-plank::after { top: auto; bottom: 14px; }
  .board-word { font-size: clamp(2.8rem, 14cqw, 4.4rem); }
  .mood-twijfel .board-word, .is-early .board-word { font-size: clamp(2.3rem, 11.5cqw, 3.6rem); }
  .board-pct strong { font-size: clamp(2.2rem, 11cqw, 3.4rem); }
  .btn-back { left: var(--s-4); right: auto; }
}

/* Scorebord: het weer als lichtkrant langs de lijn */
.scorebord {
  position: relative; z-index: 2;
  display: grid; align-items: center;
  min-height: var(--band, 112px);
  color: var(--cream);
  background:
    radial-gradient(circle at 1px 1px, rgb(255 236 200 / .05) 1px, transparent 1.6px) 0 0 / 6px 6px,
    linear-gradient(180deg, var(--wood-800), var(--wood-950));
  border-block: 3px solid var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 220 160 / .12);
}
.conditions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(var(--s-2), 3vw, var(--s-7));
}
.conditions > div { display: grid; justify-items: center; gap: 6px; padding: var(--s-4) var(--s-2); text-align: center; }
.conditions > div + div { border-left: 1px solid rgb(243 230 203 / .14); }
.conditions dt {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cream-2);
}
.conditions dt .ic { width: 20px; height: 20px; color: var(--gold); }
.conditions dd {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 0 18px rgb(242 197 95 / .35);
  font-variant-numeric: tabular-nums;
}
/* Uurweer rond de aftrap: context, het oordeel rekent met de hele dag */
.hours {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(var(--s-2), 3vw, var(--s-7)) var(--s-4);
}
.hours-title {
  margin-bottom: var(--s-2); text-align: center;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-2);
}
.hours-table {
  width: 100%; max-width: 640px; margin: 0 auto;
  border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums;
}
.hours-table th, .hours-table td { padding: 4px 5px; text-align: center; white-space: nowrap; }
.hours-table th[scope="row"] { text-align: left; font-weight: 500; color: var(--cream-2); white-space: normal; }
.hours-table thead th { font-weight: 600; color: var(--cream-2); }
.hours-table .is-kickoff { color: var(--gold-hi); background: rgb(242 197 95 / .12); }
.conditions dd small {
  display: block; margin-top: 4px;
  font-family: var(--f-ui); font-size: .78rem; color: var(--cream-2); text-shadow: none;
}

/* Keuringsrapport op perkament */
.rapport {
  --bx: clamp(30px, 4.5vw, 64px);
  z-index: 2;
  width: min(100% - 12px, 1200px);
  margin: var(--s-5) auto 0;
  padding: var(--s-4) clamp(0px, 1.5vw, var(--s-4)) var(--s-3);
}
.rapport-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-6) clamp(var(--s-5), 3.5vw, var(--s-7));
  align-items: start;
}
.stuit-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.stuit-head h2 { font-family: var(--f-display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1; }
.stuit-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-hand);
  overflow: hidden;
  background: #b9cdd4;
  box-shadow: 0 4px 0 var(--ink);
}
.stuit-frame canvas { width: 100%; height: 100%; cursor: pointer; touch-action: manipulation; }
.stuit-drop, .btn-tiny {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 40px; padding: 6px 14px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper-hi); color: var(--ink);
  font-weight: 600; font-size: .9rem;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  transition: transform var(--d-1) var(--ease-out), box-shadow var(--d-1) var(--ease-out), background-color var(--d-1) ease;
}
.stuit-drop:hover, .btn-tiny:hover { background: #fff6e2; }
.stuit-drop:active, .btn-tiny:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.stuit figcaption { margin-top: var(--s-3); font-size: .95rem; color: var(--ink-2); }
.stuit-tip { font-family: var(--f-hand); font-size: 1.05rem; color: var(--ink-3); }

.verslag .fun {
  max-width: 24ch;
  font-family: var(--f-hand);
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  line-height: 1.15;
  text-wrap: balance;
}
.verslag h3 {
  margin-top: var(--s-5);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.why { max-width: 52ch; margin-top: 6px; color: var(--ink-2); text-wrap: pretty; }

.weights { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: var(--s-3); }
.weights li {
  display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(48px, 1fr) auto;
  align-items: center; gap: var(--s-3);
  font-size: .92rem;
}
.w-name { font-weight: 600; }
.weights .bar {
  height: 12px; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper-hi);
}
.weights .bar i {
  display: block; height: 100%;
  background: var(--ink-3);
  transform-origin: 0 50%;
  transform: scaleX(var(--w, 0));
  animation: grow 1s var(--ease-out) .5s both;
}
@keyframes grow { from { transform: scaleX(0); } }
.w-omhoog .bar i { background: var(--red); }
.w-omlaag .bar i { background: var(--green); }
.w-dir { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.w-dir .ic { width: 15px; height: 15px; }
.w-omhoog .w-dir .ic { color: var(--red-ink); }
.w-omlaag .w-dir .ic { color: var(--green-ink); }

.share-box {
  grid-column: 1 / -1;
  padding-top: var(--s-5);
  border-top: 2px dashed rgb(43 26 16 / .35);
}
.share-box h3 {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.share-strip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-4) var(--s-5); align-items: center;
  margin-top: var(--s-3);
}
.share-strip .share-row { margin-top: 0; flex-wrap: nowrap; }
.chat-preview {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  padding: var(--s-3);
  border: 2px solid rgb(43 26 16 / .5); border-radius: 14px;
  background: #e2d6bc;
}
.bubble {
  max-width: 95%;
  padding: 8px 12px;
  background: #dcf2c4;
  border: 2px solid var(--ink);
  border-radius: 14px 4px 14px 14px;
  font-size: .97rem; line-height: 1.4;
}
.share-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.btn-share, .btn-net {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  border: 2.5px solid var(--ink); border-radius: var(--r-hand);
  font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--d-1) var(--ease-out), box-shadow var(--d-1) var(--ease-out), background-color var(--d-1) ease;
}
.btn-share { flex: 1 1 auto; padding: 10px 20px; background: #2b7337; color: var(--paper-hi); }
.btn-share:hover { background: #317e3d; }
.btn-net { width: 52px; padding: 0; background: var(--paper-hi); color: var(--ink); }
.btn-net:hover { background: #fff6e2; }
.btn-share:active, .btn-net:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }

.fineprint { margin-top: var(--s-5); text-align: center; font-size: .82rem; color: var(--ink-3); }

/* Het extraatje */
.extra {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-5) clamp(var(--s-5), 6vw, var(--s-8));
  max-width: 1180px; margin: 0 auto;
  padding: clamp(var(--s-7), 7vw, 104px) clamp(var(--s-5), 5vw, var(--s-7)) clamp(var(--s-8), 8vw, 120px);
  color: var(--cream);
}
.extra-head h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02;
  color: var(--paper-hi);
  text-wrap: balance;
}
.extra-head p { max-width: 40ch; margin-top: var(--s-3); color: var(--cream-2); }
.extra-body .btn-tiny { margin-top: var(--s-4); }

.programma { list-style: none; padding: 0; }
.programma li {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s-4); align-items: baseline;
  padding: var(--s-4) 0;
  border-top: 1px solid rgb(243 230 203 / .14);
  font-size: 1.1rem;
}
.programma li:last-child { border-bottom: 1px solid rgb(243 230 203 / .14); }
.programma time { font-family: var(--f-display); font-size: 1.45rem; color: var(--gold); font-variant-numeric: tabular-nums; }

.tas { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tas li { position: relative; }
.tas input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tas label {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 18px 8px 12px;
  border: 2px solid rgb(243 230 203 / .35); border-radius: 999px;
  color: var(--cream); font-weight: 500;
  cursor: pointer;
  transition: background-color var(--d-1) ease, color var(--d-1) ease, border-color var(--d-1) ease, transform var(--d-1) var(--ease-out);
}
.tas label .ic { width: 20px; height: 20px; padding: 1px; border: 2px solid currentColor; border-radius: 6px; stroke: transparent; }
.tas input:hover + label { border-color: var(--gold); }
.tas input:active + label { transform: scale(.97); }
.tas input:checked + label { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.tas input:checked + label .ic { stroke: var(--ink); stroke-width: 3; }
.tas input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.tas-done { margin-top: var(--s-4); font-family: var(--f-hand); font-size: 1.7rem; color: var(--gold-hi); animation: rise var(--d-3) var(--ease-out); }

/* ═══════════ Veldkeuring (laden + onthulling) ═══════════ */

.keuring {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: var(--s-4);
  background: radial-gradient(120% 90% at 50% 40%, rgb(44 27 17 / .95), rgb(16 9 5 / .985));
  animation: fade-in var(--d-2) var(--ease-out);
}
.keuring.is-leaving { opacity: 0; transition: opacity 360ms var(--ease-out); }
.keuring-inner {
  width: min(100%, 760px);
  display: grid; gap: var(--s-5);
}
#keuring-canvas {
  width: 100%; aspect-ratio: 16 / 9;
  border: 3px solid var(--ink);
  border-radius: 16px 20px 14px 22px / 20px 14px 22px 16px;
  background: #b9cdd4;
  box-shadow: 0 24px 60px rgb(0 0 0 / .45);
}
.keuring-text { text-align: center; color: var(--cream); }
.keuring-text h2 { font-family: var(--f-display); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1; color: var(--paper-hi); }
.steps {
  list-style: none; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-3);
  font-weight: 500; color: rgb(243 230 203 / .55);
}
.steps li { display: inline-flex; align-items: center; gap: 8px; transition: color var(--d-2) ease; }
.steps li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor;
  transition: background-color var(--d-2) ease, border-color var(--d-2) ease;
}
.steps li.is-busy { color: var(--cream); }
.steps li.is-busy::before { border-color: var(--gold); border-top-color: transparent; animation: spin .7s linear infinite; }
.steps li.is-done { color: var(--cream); }
.steps li.is-done::before { background: var(--gold); border-color: var(--gold); }
.keuring-chat {
  display: inline-block; max-width: 36ch;
  margin-top: var(--s-4); padding: 6px 14px;
  background: #dcf2c4; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 14px 14px 14px 4px;
  font-size: .95rem; line-height: 1.35;
}
.keuring-chat b { color: var(--red-ink); font-weight: 600; }
.keuring-chat.is-new { animation: rise var(--d-2) var(--ease-out); }
.keuring-verdict {
  margin-top: var(--s-3);
  font-family: var(--f-hand); font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.15;
  color: var(--gold-hi);
  animation: rise var(--d-3) var(--ease-out);
}
.keuring-skip {
  position: absolute; bottom: max(var(--s-4), env(safe-area-inset-bottom)); left: 50%; translate: -50% 0;
  min-height: 44px; padding: 8px 18px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; color: rgb(243 230 203 / .8);
  text-decoration: underline; text-underline-offset: 3px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ═══════════ Easter eggs ═══════════ */

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

.hotspots { position: absolute; inset: 0; z-index: 2; }
.hotspot {
  position: absolute;
  padding: 0; border: 0; border-radius: 40%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--d-2) ease;
}
.hotspot:hover { background: radial-gradient(closest-side, rgb(255 228 160 / .28), transparent); }
.hs--m { display: none; }
@media (orientation: portrait) {
  .hs--d { display: none; }
  .hs--m { display: block; }
}

.blackout {
  position: absolute; inset: 0; z-index: 1;
  background: rgb(10 6 3);
  opacity: 0; pointer-events: none;
}
.blackout.is-on { animation: stroom 2.2s steps(1, end) both; }
@keyframes stroom {
  0% { opacity: .82; } 8% { opacity: .25; } 12% { opacity: .82; }
  72% { opacity: .82; } 76% { opacity: .3; } 80% { opacity: .82; } 92% { opacity: .4; } 100% { opacity: 0; }
}

.egg-bubble {
  position: fixed; z-index: 90;
  max-width: min(320px, 82vw);
  padding: 10px 16px;
  background: #fbf3df; color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 18px 20px 16px 22px;
  box-shadow: 0 4px 0 var(--ink);
  font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.15;
  pointer-events: none;
  opacity: 0; transform: translateY(6px) scale(.96);
  transition: opacity 160ms ease, transform 240ms var(--ease-out);
}
.egg-bubble.is-on { opacity: 1; transform: none; }
.egg-bubble::after {
  content: ""; position: absolute; left: var(--tail, 24px); bottom: -11px;
  width: 16px; height: 16px;
  background: #fbf3df;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
.egg-bubble.is-below::after { bottom: auto; top: -11px; transform: translateX(-50%) rotate(225deg); }

/* De deelsticker op de perkamentrol */
.sticker {
  position: absolute; z-index: 3; top: -18px; right: -22px;
  display: grid; place-content: center; justify-items: center; gap: 3px;
  width: 108px; height: 108px; padding: 8px;
  border: 3px solid var(--ink); border-radius: 50%;
  background: #2b7337; color: var(--paper-hi);
  box-shadow: 0 4px 0 var(--ink), 0 10px 22px rgb(16 9 5 / .35);
  font-family: var(--f-display); font-size: .95rem; line-height: 1; text-align: center;
  rotate: 12deg;
  cursor: pointer;
  animation: wiebel 6s var(--ease-out) 2.5s infinite;
  transition: scale var(--d-1) var(--ease-out), background-color var(--d-1) ease;
}
.sticker .ic { width: 26px; height: 26px; }
.sticker:hover { background: #317e3d; scale: 1.06; }
.sticker:active { scale: .96; }
@keyframes wiebel {
  0%, 84%, 100% { rotate: 12deg; }
  87% { rotate: 2deg; } 90% { rotate: 20deg; } 93% { rotate: 7deg; } 96% { rotate: 14deg; }
}

.field-hint { font-family: var(--f-hand); font-size: 1.05rem; line-height: 1.15; color: var(--red-ink); }

html.balbezit, html.balbezit body, html.balbezit a, html.balbezit button, html.balbezit summary {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='%23fbfaf4' stroke='%232b1a10' stroke-width='2'/%3E%3Cpath d='M14 9l4.8 3.5-1.8 5.6h-6l-1.8-5.6z' fill='%232b1a10'/%3E%3Cpath d='M14 9V3M18.8 12.5l5.4-2M17 18.1l3.4 4.6M11 18.1l-3.4 4.6M9.2 12.5l-5.4-2' stroke='%232b1a10' stroke-width='1.6'/%3E%3C/svg%3E") 14 14, pointer;
}
.kickball {
  position: fixed; z-index: 80;
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='%23fbfaf4' stroke='%232b1a10' stroke-width='2'/%3E%3Cpath d='M14 9l4.8 3.5-1.8 5.6h-6l-1.8-5.6z' fill='%232b1a10'/%3E%3Cpath d='M14 9V3M18.8 12.5l5.4-2M17 18.1l3.4 4.6M11 18.1l-3.4 4.6M9.2 12.5l-5.4-2' stroke='%232b1a10' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  animation: kick 900ms cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes kick {
  50% { transform: translate(calc(var(--dx) * .55), -130px) rotate(400deg); }
  100% { transform: translate(var(--dx), 30px) rotate(760deg) scale(.6); opacity: 0; }
}
.foam {
  position: fixed; z-index: 80;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid var(--ink); border-radius: 50%;
  background: #fdf8ea;
  scale: var(--s, 1);
  pointer-events: none;
  animation: foam 1.1s var(--ease-out) both;
}
@keyframes foam { to { transform: translate(var(--d), -100px); opacity: 0; } }
.parade {
  position: fixed; left: 0; bottom: 0; z-index: 85;
  width: 100vw; height: min(300px, 42vh);
  pointer-events: none;
}

/* ═══════════ Melding ═══════════ */

.toast {
  position: fixed; z-index: 60;
  /* Bovenin: onderin lag hij op kleine schermen over de checkknop. */
  left: 50%; top: max(var(--s-5), env(safe-area-inset-top));
  translate: -50% 0;
  display: flex; align-items: flex-start; gap: var(--s-2);
  width: min(100% - 32px, 520px);
  padding: 14px 18px;
  border: 2.5px solid var(--ink); border-radius: var(--r-hand);
  background: var(--paper-hi); color: var(--ink);
  font-weight: 500; line-height: 1.4;
  box-shadow: 0 5px 0 var(--ink), 0 18px 40px rgb(0 0 0 / .35);
  animation: rise var(--d-2) var(--ease-out);
}
.toast .ic { color: var(--red); margin-top: 2px; }

/* ═══════════ Footer ═══════════ */

.site-footer {
  display: grid; justify-items: center; gap: var(--s-3);
  padding: var(--s-8) var(--s-5) max(var(--s-7), env(safe-area-inset-bottom));
  background: var(--wood-950);
  color: var(--cream-2); text-align: center; font-size: .92rem;
}
.site-footer img { width: 132px; height: auto; opacity: .9; }
.site-footer nav { display: flex; gap: var(--s-5); }
.site-footer a { color: var(--cream); text-decoration-color: rgb(243 230 203 / .3); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--gold-hi); }
.site-footer .credit { font-size: .8rem; opacity: .7; }

/* ═══════════ Tekstpagina's (plaatsen, sponsor, privacy) ═══════════ */

.doc { --ar: 1.79167; min-height: auto; padding-bottom: var(--s-8); }
.doc .stage { filter: brightness(.55) saturate(.9); }
.doc .scroll {
  --bx: clamp(38px, 6vw, 70px);
  z-index: 2;
  width: min(100% - 16px, 820px);
  margin: clamp(120px, 22vh, 220px) auto 0;
  padding: var(--s-3) clamp(var(--s-1), 2vw, var(--s-5)) var(--s-5);
}
.doc h1 { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.02; text-wrap: balance; }
.doc h2 { font-family: var(--f-display); font-size: 1.5rem; margin-top: var(--s-6); }
.doc h3 { font-weight: 600; font-size: 1.08rem; margin-top: var(--s-4); }
.doc p, .doc li, .doc dd { max-width: 66ch; line-height: 1.6; }
.doc p { margin-top: var(--s-3); }
.doc ul, .doc ol { margin-top: var(--s-3); padding-left: 1.2em; }
.doc dt { font-weight: 600; margin-top: var(--s-4); }
.doc dd { margin-top: 2px; color: var(--ink-2); }
.doc .scroll a { color: var(--red-ink); text-underline-offset: 3px; }
.doc .doc-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.doc .scroll .doc-links a {
  display: inline-block; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; background: var(--paper-hi);
}
.doc .scroll .doc-links a:hover { background: var(--gold-hi); }

/* ═══════════ Responsief ═══════════ */

@media (orientation: portrait) {
  .scene--home { --ar: .55814; }
  .scene--home .scroll--form {
    --bx: calc(var(--sw) * .0807);
    --bt: calc(var(--sw) * .05);
    --bb: calc(var(--sw) * .04);
    width: max(calc(var(--sw) * .6836), min(100cqw - 16px, 560px));
    margin-top: calc(var(--sh) * .3416);
    min-height: calc(var(--sh) * .485);
    justify-content: flex-start;
    padding-top: clamp(8px, 4cqw, 40px);
    padding: 8px 2px 14px;
  }
  .scroll--form h1 { font-size: clamp(1.75rem, 8.2cqw, 2.6rem); }
  .lede { font-size: .95rem; }
  .topnav a:first-child { display: none; }
}

@media (orientation: portrait) and (max-width: 640px) {
  .check-form {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "city city"
      "date date"
      "home away"
      "veld veld"
      "cta cta"
      "remember remember"
      "manual manual";
    gap: var(--s-3);
  }
  .manual-grid { grid-template-columns: 1fr 1fr; }
  .manual-grid .field:first-child { grid-column: 1 / -1; }
  .sticker { width: 80px; height: 80px; top: -84px; right: 2px; font-size: .78rem; }
  .sticker .ic { width: 20px; height: 20px; }
}

@media (max-width: 1100px) {
  .share-strip { grid-template-columns: 1fr; }
  .share-strip .share-row { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .reken-lede, .reken-grid, .deelband-inner, .rapport-grid, .extra { grid-template-columns: 1fr; }
  .appgroep { position: static; rotate: -.6deg; }
  .appgroep-log { min-height: 0; }
  .deelband h2 { grid-row: auto; }
}

@media (max-width: 640px) {
  .conditions { grid-template-columns: 1fr 1fr; }
  .conditions > div:nth-child(3) { border-left: 0; }
  .conditions > div:nth-child(n + 3) { border-top: 1px solid rgb(243 230 203 / .14); }
  .stuit-frame { aspect-ratio: 4 / 3; }
  .weights li { grid-template-columns: minmax(0, 1fr) auto; }
  .weights .bar { grid-column: 1 / -1; grid-row: 2; }
  .share-row .btn-share { flex-basis: 100%; }
  .btn-net { flex: 1; }
}

/* Laptop-hoogte: schuif de illustratie omhoog (lucht eraf) zodat de knop
   boven de vouw blijft. */
@media (orientation: landscape) {
  .scene--home { --lift: clamp(0px, var(--sh) * .4714 + 470px - 100svh, var(--sh) * .14); }
}

/* Lage landschapsschermen (telefoon dwars): illustratie mag krimpen */
@media (orientation: landscape) and (max-height: 520px) {
  .scene { --sw: max(100cqw, 640px * var(--ar)); }
}

/* Lage telefoons: teamvelden achter een knop en minder lucht, zodat de
   knop "Is het al afgelast?" boven de vouw blijft. */
@media (orientation: portrait) and (max-width: 640px) and (max-height: 760px) {
  .check-form { gap: var(--s-2); }
  .check-form:not(.show-teams) {
    grid-template-areas: "city city" "date date" "teams teams" "veld veld" "cta cta" "remember remember" "manual manual";
  }
  .check-form:not(.show-teams) .field--home, .check-form:not(.show-teams) .field--away { display: none; }
  .check-form:not(.show-teams) .teams-toggle { display: inline-flex; }
  .lede { margin-top: var(--s-1); font-size: .86rem; line-height: 1.3; }
  .check-form { margin-top: var(--s-3); }
  .field { gap: 3px; }
  .seg { min-height: 44px; }
  .btn-cta { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .steps li.is-busy::before { animation: none; border-top-color: var(--gold); }
}
