/* =============================================================
   Saskia's Verborgen Tuin — stijl
   ============================================================= */

:root {
  --forest: #1f3a2d;
  --forest-deep: #14271e;
  --moss: #54745b;
  --sage: #9caf88;
  --sage-light: #d9e0c6;
  --cream: #f7f0df;
  --paper: #fffaf0;
  --gold: #d6ad60;
  --gold-soft: #ecd29c;
  --wood: #7a5236;
  --wood-dark: #56371f;
  --ink: #26312b;
  --ink-soft: rgba(38, 49, 43, 0.78);
  --shadow: rgba(20, 45, 31, 0.22);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 22px;
  --header-h: 60px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--forest);
}

html.has-modal { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }

p { margin: 0; }

button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

/* -------------------------------------------------------------
   Achtergrond
   ------------------------------------------------------------- */
.garden {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.garden > div { position: absolute; }

.garden__sky {
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 250, 240, 0.9) 0%, rgba(255, 250, 240, 0) 60%),
    linear-gradient(180deg, #faf3e1 0%, #f3e8cc 34%, #dfe2c3 66%, #b9c7a2 100%);
}

.garden__night {
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft);
  background:
    radial-gradient(90% 60% at 50% 38%, rgba(214, 173, 96, 0.2) 0%, rgba(214, 173, 96, 0) 60%),
    radial-gradient(120% 80% at 50% 110%, #2c4a38 0%, rgba(44, 74, 56, 0) 70%),
    linear-gradient(180deg, #122219 0%, #1a3226 45%, #1f3a2d 100%);
}

.garden__golden {
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease-soft);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(236, 210, 156, 0.75) 0%, rgba(236, 210, 156, 0) 70%),
    linear-gradient(180deg, #f8ecd2 0%, #f3e3c0 45%, #dcd9b6 100%);
}

.garden__sun {
  top: -18vmax;
  right: -14vmax;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 210, 156, 0.55) 0%, rgba(236, 210, 156, 0.18) 38%, rgba(236, 210, 156, 0) 68%);
  transition: opacity 1.4s var(--ease-soft);
}

.garden__stars {
  inset: 0 0 35% 0;
  opacity: 0;
  transition: opacity 1.8s var(--ease-soft);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 250, 240, 0.9), transparent 60%),
    radial-gradient(1px 1px at 28% 8%, rgba(255, 250, 240, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 22%, rgba(255, 250, 240, 0.8), transparent 60%),
    radial-gradient(1px 1px at 64% 12%, rgba(255, 250, 240, 0.7), transparent 60%),
    radial-gradient(2px 2px at 82% 26%, rgba(236, 210, 156, 0.9), transparent 60%),
    radial-gradient(1px 1px at 90% 6%, rgba(255, 250, 240, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 42%, rgba(255, 250, 240, 0.6), transparent 60%),
    radial-gradient(1px 1px at 36% 38%, rgba(255, 250, 240, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 72% 44%, rgba(255, 250, 240, 0.6), transparent 60%),
    radial-gradient(1px 1px at 96% 52%, rgba(255, 250, 240, 0.5), transparent 60%);
}

.garden__hill {
  left: -20%;
  right: -20%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transition: filter 1.4s var(--ease-soft), transform 1.6s var(--ease);
}

.garden__hill--back {
  bottom: -9vh;
  height: 26vh;
  background: linear-gradient(180deg, rgba(156, 175, 136, 0.55), rgba(84, 116, 91, 0.35));
  transform: translateX(-6%);
}

.garden__hill--front {
  bottom: -14vh;
  height: 24vh;
  left: -10%;
  right: -30%;
  background: linear-gradient(180deg, rgba(84, 116, 91, 0.5), rgba(31, 58, 45, 0.55));
}

.garden__plants {
  bottom: 0;
  width: min(42vw, 280px);
  height: min(44vh, 360px);
  color: var(--forest);
  transition: transform 1.8s var(--ease), opacity 1.4s var(--ease-soft);
}

.garden__plants--left { left: calc(-4vw + var(--safe-left)); }
.garden__plants--right { right: calc(-4vw + var(--safe-right)); transform: scaleX(-1); }

.plant {
  position: absolute;
  bottom: 0;
  fill: currentColor;
  transform-origin: 50% 100%;
}

.plant--sprig { left: 10%; width: 36%; height: 88%; opacity: 0.32; animation: sway 9s ease-in-out infinite; }
.plant--umbel { left: 44%; width: 26%; height: 70%; opacity: 0.26; animation: sway 11s ease-in-out -3s infinite; }
.plant--grass { left: -6%; width: 110%; height: 26%; opacity: 0.38; }

.garden__plants--right .plant--umbel { left: 6%; height: 58%; }
.garden__plants--right .plant--sprig { left: 36%; height: 76%; }

@keyframes sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.8deg); }
}

/* Vuurvliegjes (max. 12) */
.fireflies { inset: 0; }

.fireflies span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5dfa6;
  box-shadow: 0 0 10px 3px rgba(236, 210, 156, 0.75);
  opacity: 0;
  animation: firefly-float 14s ease-in-out infinite, firefly-blink 4.5s ease-in-out infinite;
}

.fireflies span:nth-child(1)  { left: 8%;  top: 72%; animation-delay: 0s, -1s; }
.fireflies span:nth-child(2)  { left: 18%; top: 38%; animation-delay: -3s, -2.2s; animation-duration: 17s, 5s; }
.fireflies span:nth-child(3)  { left: 30%; top: 84%; animation-delay: -6s, -0.6s; }
.fireflies span:nth-child(4)  { left: 42%; top: 22%; animation-delay: -2s, -3.1s; animation-duration: 19s, 6s; }
.fireflies span:nth-child(5)  { left: 55%; top: 66%; animation-delay: -9s, -1.4s; }
.fireflies span:nth-child(6)  { left: 66%; top: 30%; animation-delay: -4s, -2.8s; animation-duration: 16s, 4s; }
.fireflies span:nth-child(7)  { left: 78%; top: 78%; animation-delay: -7s, -0.2s; }
.fireflies span:nth-child(8)  { left: 88%; top: 46%; animation-delay: -1s, -3.6s; animation-duration: 18s, 5.5s; }
.fireflies span:nth-child(9)  { left: 94%; top: 14%; animation-delay: -11s, -1.8s; width: 4px; height: 4px; }
.fireflies span:nth-child(10) { left: 4%;  top: 12%; animation-delay: -5s, -2.4s; width: 4px; height: 4px; }
.fireflies span:nth-child(11) { left: 48%; top: 90%; animation-delay: -8s, -4s; width: 5px; height: 5px; }
.fireflies span:nth-child(12) { left: 72%; top: 8%;  animation-delay: -12s, -0.9s; width: 4px; height: 4px; }

@keyframes firefly-float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(18px, -26px); }
  50% { transform: translate(-12px, -48px); }
  75% { transform: translate(-24px, -18px); }
}

@keyframes firefly-blink {
  0%, 100% { opacity: 0; }
  40%, 60% { opacity: var(--firefly-max, 0.9); }
}

/* Sfeer per scène */
body:not(.is-dark) .fireflies span { --firefly-max: 0.45; background: #e9c983; box-shadow: 0 0 8px 2px rgba(214, 173, 96, 0.45); }
body.is-dark .garden__night { opacity: 1; }
body.is-dark .garden__sun { opacity: 0.25; }
body.is-dark .garden__hill { filter: brightness(0.45) saturate(0.8); }
body.is-dark .garden__plants { color: #0d1a13; }
body.is-dark .plant { opacity: 0.55; }
body[data-scene="5"] .garden__stars { opacity: 1; }
body[data-scene="6"] .garden__golden { opacity: 1; }
body[data-scene="6"] .garden__plants--left { transform: translateX(-38%); }
body[data-scene="6"] .garden__plants--right { transform: scaleX(-1) translateX(-38%); }
body[data-scene="6"] .garden__hill--back { transform: translateX(-12%) translateY(3vh); }
body[data-scene="6"] .garden__hill--front { transform: translateX(8%) translateY(4vh); }

/* Animaties pauzeren als het tabblad niet zichtbaar is */
html.is-doc-hidden *,
html.is-doc-hidden *::before,
html.is-doc-hidden *::after { animation-play-state: paused !important; }

/* -------------------------------------------------------------
   Voortgangsindicator
   ------------------------------------------------------------- */
.progress {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 50%;
  z-index: 20;
  max-width: 80vw;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid rgba(84, 116, 91, 0.16);
  box-shadow: 0 8px 24px -14px var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s linear 0.6s, background-color 1s;
}

.progress.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s, background-color 1s;
}

body.is-dark .progress {
  background: rgba(20, 39, 30, 0.6);
  border-color: rgba(236, 210, 156, 0.18);
}

.progress__list {
  display: flex;
  gap: clamp(4px, 2vw, 10px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress__leaf {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.progress__icon {
  width: 30px;
  height: 30px;
  fill: rgba(84, 116, 91, 0.2);
  stroke: rgba(84, 116, 91, 0.45);
  stroke-width: 1.2px;
  transform: rotate(-18deg);
  transition: fill 0.6s var(--ease), stroke 0.6s, transform 0.6s var(--ease), filter 0.6s;
}

.progress__leaf:nth-child(even) .progress__icon { transform: rotate(16deg); }

body.is-dark .progress__icon { fill: rgba(236, 210, 156, 0.12); stroke: rgba(236, 210, 156, 0.4); }

.progress__check {
  position: absolute;
  width: 14px;
  height: 14px;
  color: var(--paper);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s var(--ease) 0.2s, transform 0.4s var(--ease) 0.2s;
}

.progress__leaf.is-done .progress__icon {
  fill: #a7ad5c;
  stroke: #8a8f45;
  filter: drop-shadow(0 0 5px rgba(214, 173, 96, 0.55));
}

body.is-dark .progress__leaf.is-done .progress__icon { fill: #b8b464; stroke: var(--gold); }

.progress__leaf.is-done .progress__check { opacity: 1; transform: scale(1); }

.progress__leaf.is-new .progress__icon { animation: leaf-pop 0.9s var(--ease); }

.progress.is-celebrating .progress__leaf .progress__icon { animation: leaf-glow 1.6s ease-in-out 2; }
.progress.is-celebrating .progress__leaf:nth-child(2) .progress__icon { animation-delay: 0.12s; }
.progress.is-celebrating .progress__leaf:nth-child(3) .progress__icon { animation-delay: 0.24s; }
.progress.is-celebrating .progress__leaf:nth-child(4) .progress__icon { animation-delay: 0.36s; }
.progress.is-celebrating .progress__leaf:nth-child(5) .progress__icon { animation-delay: 0.48s; }

@keyframes leaf-pop {
  0% { transform: scale(0.6) rotate(-40deg); }
  60% { transform: scale(1.25) rotate(4deg); }
  100% { transform: scale(1) rotate(-18deg); }
}

@keyframes leaf-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(214, 173, 96, 0.5)); }
  50% { filter: drop-shadow(0 0 12px rgba(236, 210, 156, 1)) brightness(1.2); }
}

/* -------------------------------------------------------------
   Knoppen
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s, opacity 0.3s;
}

.btn:active { transform: translateY(1px) scale(0.985); }
.btn:disabled { cursor: default; opacity: 0.55; }

.btn--primary {
  color: var(--paper);
  background-color: var(--moss);
  box-shadow: 0 10px 22px -12px rgba(31, 58, 45, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn--primary:hover:not(:disabled) { background-color: #4a6951; transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(31, 58, 45, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.14); }

.btn--gold {
  color: var(--forest-deep);
  background-color: var(--gold-soft);
  border-color: rgba(214, 173, 96, 0.8);
  box-shadow: 0 10px 28px -12px rgba(214, 173, 96, 0.65);
}

.btn--gold:hover:not(:disabled) { background-color: #f1dcae; transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgba(214, 173, 96, 0.8); }

.btn--ghost-light {
  color: var(--cream);
  background: transparent;
  border-color: rgba(247, 240, 223, 0.35);
}

.btn--ghost-light:hover { border-color: rgba(247, 240, 223, 0.7); background: rgba(247, 240, 223, 0.06); }

.btn--soft {
  color: var(--forest);
  background: rgba(156, 175, 136, 0.22);
  border-color: rgba(84, 116, 91, 0.22);
}

.btn--soft:hover { background: rgba(156, 175, 136, 0.34); }

.btn--quiet {
  color: var(--moss);
  background: transparent;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(84, 116, 91, 0.35);
}

.btn--large { min-height: 54px; padding: 14px 32px; font-size: 17px; }

.btn--glow { animation: btn-glow 2.8s ease-in-out infinite; }

@keyframes btn-glow {
  0%, 100% { box-shadow: 0 10px 28px -12px rgba(214, 173, 96, 0.65), 0 0 0 0 rgba(236, 210, 156, 0.0); }
  50% { box-shadow: 0 10px 28px -12px rgba(214, 173, 96, 0.65), 0 0 0 10px rgba(236, 210, 156, 0.22); }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(84, 116, 91, 0.12); color: var(--forest); }

/* -------------------------------------------------------------
   Scènes
   ------------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
}

.scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(var(--header-h) + var(--safe-top) + clamp(18px, 4vh, 48px))
    calc(16px + var(--safe-right))
    calc(72px + var(--safe-bottom))
    calc(16px + var(--safe-left));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.52s var(--ease), transform 0.52s var(--ease);
}

.scene.is-active { opacity: 1; transform: none; }

.scene.is-leaving {
  opacity: 0;
  transform: translateY(-12px);
  transition-duration: 0.38s;
}

.scene__inner {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scene__head { max-width: 640px; margin: 0 auto clamp(18px, 3.5vh, 32px); }

.eyebrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
}

.eyebrow__count {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}

.eyebrow__place {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(38, 49, 43, 0.62);
}

.scene__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(29px, 7.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--forest);
  text-wrap: balance;
}

.scene__lead {
  max-width: 34ch;
  margin: 12px auto 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.scene__hint {
  min-height: 1.5em;
  margin-top: 6px;
  font-size: 15px;
  color: rgba(38, 49, 43, 0.6);
}

/* Donkere scène (de open plek) */
.scene--night .eyebrow__count { color: var(--gold-soft); }
.scene--night .eyebrow__place { color: rgba(247, 240, 223, 0.7); }
.scene--night .scene__title { color: var(--cream); }
.scene--night .scene__lead { color: rgba(247, 240, 223, 0.82); }

.card,
.paper {
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 60% at 10% 0%, rgba(214, 173, 96, 0.08), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(156, 175, 136, 0.12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(38, 49, 43, 0.014) 0 1px, transparent 1px 3px);
  border: 1px solid rgba(84, 116, 91, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -28px var(--shadow), 0 2px 6px rgba(20, 45, 31, 0.05);
}

.feedback {
  min-height: 1.6em;
  margin-top: 14px;
  font-size: 16px;
  color: var(--moss);
  transition: opacity 0.3s;
}

.feedback.is-soft-error { color: #8a5a2b; }

/* Succesblok na elk geheim */
.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: clamp(18px, 3vh, 28px) auto 0;
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid rgba(214, 173, 96, 0.35);
  box-shadow: 0 20px 44px -30px var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: rise-in 0.8s var(--ease) both;
}

.success__text {
  font-family: var(--serif);
  font-size: clamp(19px, 4.6vw, 23px);
  line-height: 1.4;
  color: var(--forest);
  text-wrap: balance;
}

.success__text strong { font-weight: 700; }

.success__text--big { font-size: clamp(22px, 5.6vw, 28px); }

.success__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6f5a24;
  background: rgba(214, 173, 96, 0.2);
}

.success .btn { margin-top: 6px; }

.success--night {
  background: rgba(20, 39, 30, 0.62);
  border-color: rgba(236, 210, 156, 0.3);
}

.success--night .success__text { color: var(--cream); }
.success--night .success__badge { color: var(--gold-soft); background: rgba(214, 173, 96, 0.16); }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------
   Scène 0 — de poort
   ------------------------------------------------------------- */
.scene--intro {
  overflow: hidden;
  justify-content: center;
  padding-top: calc(28px + var(--safe-top));
  padding-bottom: calc(40px + var(--safe-bottom));
}

.gate-wrap {
  position: relative;
  width: min(100%, 560px);
  min-height: min(84vh, 700px);
  min-height: min(84dvh, 700px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

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

.gate__half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: clamp(12px, 3.4vw, 18px) solid #2f5140;
  background:
    radial-gradient(circle at 20% 30%, rgba(156, 175, 136, 0.16) 0 2px, transparent 3px) 0 0 / 22px 22px,
    linear-gradient(180deg, rgba(214, 173, 96, 0.06), rgba(20, 39, 30, 0));
  box-shadow: inset 0 0 40px rgba(10, 20, 14, 0.35);
  transition: transform 1s var(--ease), opacity 0.9s var(--ease-soft);
}

.gate__half::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid rgba(214, 173, 96, 0.28);
  border-radius: inherit;
  pointer-events: none;
}

.gate__half--left {
  left: 0;
  border-right: 0;
  border-radius: 100% 0 0 18px / min(34vh, 250px) 0 0 18px;
  transform-origin: 0 50%;
}

.gate__half--right {
  right: 0;
  border-left: 0;
  border-radius: 0 100% 18px 0 / 0 min(34vh, 250px) 18px 0;
  transform-origin: 100% 50%;
}

.gate__half--left::before,
.gate__half--right::before {
  content: "";
  position: absolute;
  top: 28%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 10px 2px rgba(236, 210, 156, 0.6), 0 90px 0 -2px rgba(247, 240, 223, 0.7), 0 210px 0 -1px var(--gold-soft);
}

.gate__half--left::before { left: -14px; }
.gate__half--right::before { right: -14px; }

.gate__light {
  position: absolute;
  inset: 8% 6% 0;
  border-radius: 50% 50% 16px 16px / 36% 36% 16px 16px;
  background: radial-gradient(70% 60% at 50% 52%, rgba(236, 210, 156, 0.26) 0%, rgba(236, 210, 156, 0.06) 55%, rgba(236, 210, 156, 0) 75%);
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease-soft);
}

.intro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  padding: clamp(96px, 16vh, 150px) clamp(30px, 9vw, 56px) clamp(36px, 6vh, 56px);
  text-align: center;
  color: var(--cream);
  transition: opacity 0.6s var(--ease-soft), transform 0.9s var(--ease);
}

.intro__eyebrow {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.intro__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(29px, 7.6vw, 42px);
  line-height: 1.15;
  color: var(--paper);
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(10, 20, 14, 0.5);
}

.intro__text {
  margin-top: 18px;
  color: rgba(247, 240, 223, 0.86);
  text-wrap: pretty;
}

.intro__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.intro__resume-note {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(247, 240, 223, 0.8);
}

.intro__small {
  margin-top: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(247, 240, 223, 0.66);
}

.scene--intro.is-opening .gate__half--left { transform: translateX(-34%) rotateY(28deg); opacity: 0; }
.scene--intro.is-opening .gate__half--right { transform: translateX(34%) rotateY(-28deg); opacity: 0; }
.scene--intro.is-opening .gate__light { transform: scale(1.7); opacity: 0; }
.scene--intro.is-opening .intro { opacity: 0; transform: scale(0.96) translateY(-8px); }

/* -------------------------------------------------------------
   Scène 1 — de boom
   ------------------------------------------------------------- */
.tree {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.tree__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tree__canopy { transform-origin: 50% 60%; animation: canopy-breathe 10s ease-in-out infinite; }

@keyframes canopy-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.leaf-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 210, 156, 0.55) 0%, rgba(236, 210, 156, 0.18) 45%, rgba(236, 210, 156, 0) 70%);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.25s var(--ease);
}

.leaf-btn[data-index="0"] { left: 21%; top: 47%; }
.leaf-btn[data-index="1"] { left: 79%; top: 45%; }
.leaf-btn[data-index="2"] { left: 35%; top: 19%; }
.leaf-btn[data-index="3"] { left: 65%; top: 18%; }

.leaf-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(236, 210, 156, 0.6);
  animation: leaf-pulse 2.6s ease-out infinite;
}

.leaf-btn[data-index="1"]::before { animation-delay: -0.7s; }
.leaf-btn[data-index="2"]::before { animation-delay: -1.3s; }
.leaf-btn[data-index="3"]::before { animation-delay: -2s; }

@keyframes leaf-pulse {
  0% { box-shadow: 0 0 0 0 rgba(214, 173, 96, 0.55); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(214, 173, 96, 0); }
}

.leaf-btn__icon {
  width: 46px;
  height: 46px;
  fill: #c9a24f;
  filter: drop-shadow(0 4px 8px rgba(122, 82, 54, 0.35));
  transform: rotate(-24deg);
  transition: fill 0.5s, transform 0.5s var(--ease);
  animation: leaf-wiggle 5s ease-in-out infinite;
}

.leaf-btn[data-index="1"] .leaf-btn__icon { transform: rotate(28deg); animation-delay: -1.5s; }
.leaf-btn[data-index="2"] .leaf-btn__icon { animation-delay: -3s; }
.leaf-btn[data-index="3"] .leaf-btn__icon { transform: rotate(20deg); animation-delay: -4s; }

@keyframes leaf-wiggle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

.leaf-btn:hover { transform: scale(1.08); }
.leaf-btn:active { transform: scale(0.96); }

.leaf-btn__name {
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--forest);
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 4px 10px -6px var(--shadow);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.leaf-btn.is-opened { background: none; }
.leaf-btn.is-opened::before { animation: none; }
.leaf-btn.is-opened .leaf-btn__icon { fill: var(--moss); animation: none; }
.leaf-btn.is-opened .leaf-btn__name { opacity: 1; }

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

.sparks i {
  position: absolute;
  bottom: 42%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f3d99c;
  box-shadow: 0 0 10px 3px rgba(236, 210, 156, 0.8);
  opacity: 0;
}

.tree.is-celebrating .sparks i { animation: spark-rise 2.8s var(--ease-soft) forwards; }

.sparks i:nth-child(1)  { left: 22%; animation-delay: 0s !important; }
.sparks i:nth-child(2)  { left: 34%; animation-delay: 0.2s !important; }
.sparks i:nth-child(3)  { left: 46%; animation-delay: 0.1s !important; }
.sparks i:nth-child(4)  { left: 58%; animation-delay: 0.35s !important; }
.sparks i:nth-child(5)  { left: 70%; animation-delay: 0.15s !important; }
.sparks i:nth-child(6)  { left: 80%; animation-delay: 0.5s !important; }
.sparks i:nth-child(7)  { left: 28%; animation-delay: 0.6s !important; bottom: 55%; }
.sparks i:nth-child(8)  { left: 52%; animation-delay: 0.7s !important; bottom: 60%; }
.sparks i:nth-child(9)  { left: 64%; animation-delay: 0.45s !important; bottom: 52%; }
.sparks i:nth-child(10) { left: 40%; animation-delay: 0.9s !important; bottom: 65%; }
.sparks i:nth-child(11) { left: 74%; animation-delay: 1s !important; bottom: 62%; }
.sparks i:nth-child(12) { left: 18%; animation-delay: 1.1s !important; bottom: 50%; width: 4px; height: 4px; }
.sparks i:nth-child(13) { left: 86%; animation-delay: 1.2s !important; bottom: 44%; width: 4px; height: 4px; }
.sparks i:nth-child(14) { left: 50%; animation-delay: 1.3s !important; bottom: 70%; width: 4px; height: 4px; }

@keyframes spark-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 1; }
  60% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--sx, 8px), -170px) scale(1); }
}

.sparks i:nth-child(odd) { --sx: -14px; }
.sparks i:nth-child(3n) { --sx: 18px; }

/* -------------------------------------------------------------
   Modals (briefje + laatste overlay)
   ------------------------------------------------------------- */
.dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  max-width: none;
  max-height: none;
}

.dialog:focus { outline: none; }

.dialog::backdrop {
  background: rgba(20, 39, 30, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.dialog[open] { animation: dialog-in 0.45s var(--ease) both; }
.dialog[open]::backdrop { animation: fade-in 0.45s var(--ease-soft) both; }
.dialog.is-closing { animation: dialog-out 0.24s var(--ease-soft) both; }
.dialog.is-closing::backdrop { animation: fade-out 0.24s var(--ease-soft) both; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes dialog-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(12px) scale(0.98); }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

.letter-dialog {
  width: min(calc(100vw - 28px), 520px);
  margin: auto;
}

.letter {
  position: relative;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px clamp(22px, 6vw, 42px) 28px;
  text-align: left;
  transform: rotate(-0.6deg);
}

.letter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 90px;
  height: 22px;
  transform: translate(-50%, -40%) rotate(2deg);
  background: rgba(214, 173, 96, 0.35);
  border-radius: 3px;
}

.letter__close { position: absolute; top: 8px; right: 8px; }

.letter__portrait {
  width: 96px;
  height: 120px;
  margin: 0 auto 14px;
  padding: 5px 5px 14px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 18px -10px var(--shadow);
  transform: rotate(2.5deg);
}

.letter__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.letter__title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--moss);
}

.letter__body {
  font-family: var(--serif);
  font-size: clamp(18px, 4.6vw, 20px);
  line-height: 1.6;
  color: var(--ink);
}

.letter__body p + p { margin-top: 14px; }
.letter__greeting { font-weight: 700; }
.letter__closing { font-weight: 700; color: var(--forest); }
.letter__signature { margin-top: 4px !important; font-style: italic; }

.letter .btn { display: flex; margin: 24px auto 0; }

/* -------------------------------------------------------------
   Scène 2 — de vlinders op de tak (logicapuzzel)
   ------------------------------------------------------------- */
.puzzle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  padding: clamp(20px, 5vw, 32px) clamp(16px, 5vw, 32px) clamp(20px, 5vw, 28px);
}

.roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.roles li {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--forest);
  background: rgba(156, 175, 136, 0.22);
}

.riddles--clues .riddles__num { background: var(--moss); }

.branch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 440px;
  margin: 4px 0 12px;
}

.branch::before {
  content: "";
  position: absolute;
  top: 66px;
  left: -3%;
  right: -3%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8a6446, #5e4029);
  box-shadow: 0 3px 6px rgba(40, 24, 12, 0.22);
  transform: rotate(-1deg);
}

.perch {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 100px;
  padding: 6px 2px 8px;
  border: 2px dashed transparent;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, background-color 0.2s;
}

.perch:hover:not(:disabled),
.branch.is-choosing .perch { border-color: rgba(214, 173, 96, 0.6); }

.perch:disabled { cursor: default; }

.perch__name {
  height: 22px;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: clamp(13px, 3.8vw, 16px);
  line-height: 22px;
  white-space: nowrap;
  color: var(--forest);
}

.perch__butterfly {
  position: relative;
  width: 40px;
  height: 32px;
  opacity: 0.3;
  filter: grayscale(1);
  background: linear-gradient(#3d4b33, #3d4b33) 50% 58% / 3px 58% no-repeat;
  transition: opacity 0.3s, filter 0.3s;
}

.perch__butterfly::before,
.perch__butterfly::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
}

.perch__butterfly::before {
  left: 0;
  background:
    radial-gradient(ellipse 46% 34% at 50% 33%, #e2bd6e 0 94%, transparent 100%),
    radial-gradient(ellipse 32% 26% at 60% 74%, #f3e2b8 0 94%, transparent 100%);
}

.perch__butterfly::after {
  right: 0;
  background:
    radial-gradient(ellipse 46% 34% at 50% 33%, #e2bd6e 0 94%, transparent 100%),
    radial-gradient(ellipse 32% 26% at 40% 74%, #f3e2b8 0 94%, transparent 100%);
}

.perch.is-filled .perch__butterfly { opacity: 1; filter: drop-shadow(0 3px 4px rgba(31, 58, 45, 0.25)); }
.perch.is-right .perch__butterfly { filter: drop-shadow(0 0 8px rgba(236, 210, 156, 0.95)); }
.branch.is-wrong .perch.is-filled .perch__butterfly { animation: shake 0.45s ease-in-out; }

.perch__num {
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(38, 49, 43, 0.55);
}

.puzzle-help {
  margin: 0 0 10px;
  font-size: 14px;
  color: rgba(38, 49, 43, 0.62);
}

.names {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 440px;
  margin-bottom: 18px;
}

.name-chip {
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid rgba(84, 116, 91, 0.22);
  border-radius: 999px;
  background: #fffdf7;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--forest);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.name-chip:hover:not(:disabled) { border-color: rgba(84, 116, 91, 0.45); }

.name-chip[aria-pressed="true"] {
  border-color: var(--gold);
  background: #fff6e2;
  box-shadow: 0 0 0 4px rgba(214, 173, 96, 0.25);
}

.name-chip.is-placed:not([aria-pressed="true"]) { opacity: 0.45; }
.name-chip:disabled { cursor: default; }

.hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.hint__list {
  display: grid;
  gap: 8px;
  max-width: 440px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hint__list li {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--forest);
  background: rgba(214, 173, 96, 0.14);
  border: 1px solid rgba(214, 173, 96, 0.35);
  animation: rise-in 0.5s var(--ease) both;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes pop-in {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* CSS-vlinders */
.butterflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.butterfly {
  position: absolute;
  bottom: -40px;
  left: 50%;
  width: 40px;
  height: 32px;
  opacity: 0;
  --wing: #e2bd6e;
  --wing-low: #f3e2b8;
  background: linear-gradient(#3d4b33, #3d4b33) 50% 58% / 3px 58% no-repeat;
  filter: drop-shadow(0 3px 4px rgba(31, 58, 45, 0.25));
}

.butterfly::before,
.butterfly::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  animation: flap 0.28s ease-in-out infinite alternate;
}

.butterfly::before {
  left: 0;
  transform-origin: 100% 50%;
  background:
    radial-gradient(ellipse 46% 34% at 50% 33%, var(--wing) 0 94%, transparent 100%),
    radial-gradient(ellipse 32% 26% at 60% 74%, var(--wing-low) 0 94%, transparent 100%);
}

.butterfly::after {
  right: 0;
  transform-origin: 0 50%;
  background:
    radial-gradient(ellipse 46% 34% at 50% 33%, var(--wing) 0 94%, transparent 100%),
    radial-gradient(ellipse 32% 26% at 40% 74%, var(--wing-low) 0 94%, transparent 100%);
}

@keyframes flap {
  from { transform: scaleX(1); }
  to { transform: scaleX(0.3); }
}

.butterflies.is-flying .butterfly { animation: fly-up var(--dur, 4s) var(--ease-soft) var(--delay, 0s) forwards; }

.butterfly:nth-child(1) { left: 12%; --dur: 4.2s; --delay: 0s; --drift: 40px; }
.butterfly:nth-child(2) { left: 30%; --dur: 3.6s; --delay: 0.4s; --drift: -30px; --wing: #f1dcae; }
.butterfly:nth-child(3) { left: 50%; --dur: 4.6s; --delay: 0.2s; --drift: 24px; --wing: #b9c7a2; }
.butterfly:nth-child(4) { left: 66%; --dur: 3.9s; --delay: 0.7s; --drift: -44px; }
.butterfly:nth-child(5) { left: 82%; --dur: 4.4s; --delay: 0.3s; --drift: -20px; --wing: #f1dcae; }
.butterfly:nth-child(6) { left: 42%; --dur: 5s; --delay: 1s; --drift: 50px; --wing: #b9c7a2; }

@keyframes fly-up {
  0% { opacity: 0; transform: translate(0, 0) rotate(-8deg); }
  10% { opacity: 1; }
  35% { transform: translate(var(--drift), -32vh) rotate(10deg); }
  65% { transform: translate(calc(var(--drift) * -0.6), -64vh) rotate(-8deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift), -105vh) rotate(6deg); }
}

/* -------------------------------------------------------------
   Scène 3 — de houten kist
   ------------------------------------------------------------- */
.chest-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(22px, 5vw, 34px) clamp(16px, 5vw, 36px) clamp(22px, 5vw, 30px);
}

.chest {
  position: relative;
  width: min(230px, 66%);
  aspect-ratio: 1.3 / 1;
  margin: 8px auto 22px;
  perspective: 700px;
}

.chest__glow {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 20%;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 180, 0.95) 0%, rgba(236, 210, 156, 0.4) 45%, rgba(236, 210, 156, 0) 72%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.9s var(--ease-soft) 0.2s, transform 1.1s var(--ease) 0.2s;
}

.chest__body,
.chest__lid {
  position: absolute;
  left: 0;
  right: 0;
  background-color: var(--wood);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)),
    repeating-linear-gradient(180deg, transparent 0 30%, rgba(40, 24, 12, 0.35) 30% 32%),
    repeating-linear-gradient(90deg, rgba(255, 230, 200, 0.04) 0 6px, rgba(40, 24, 12, 0.05) 6px 9px);
  border: 3px solid var(--wood-dark);
}

.chest__body {
  bottom: 0;
  height: 60%;
  border-radius: 6px 6px 14px 14px;
  box-shadow: 0 16px 22px -14px rgba(40, 24, 12, 0.6), inset 0 -8px 14px rgba(40, 24, 12, 0.25);
}

.chest__lid {
  top: 6%;
  height: 36%;
  z-index: 2;
  border-radius: 48% 48% 6px 6px / 70% 70% 6px 6px;
  transform-origin: 50% 100%;
  transition: transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.chest__band {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 11%;
  background: linear-gradient(90deg, #9a7438, #c9a15a 45%, #8e6a31);
  box-shadow: inset 0 0 0 1px rgba(60, 40, 16, 0.35);
}

.chest__band--left { left: 13%; }
.chest__band--right { right: 13%; }
.chest__lid .chest__band { border-radius: 40% 40% 0 0 / 30% 30% 0 0; }

.chest__lock {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 34%;
  width: 40px;
  height: 46px;
  margin-left: -20px;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(180deg, #e0bd72, #b68b43);
  border: 2px solid #7d5a25;
  box-shadow: 0 4px 8px rgba(40, 24, 12, 0.35);
  transition: transform 0.5s var(--ease), opacity 0.4s;
}

.chest__keyhole {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #3b2a14;
}

.chest__keyhole::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 13px solid #3b2a14;
}

.chest__body::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 0;
  height: 34%;
  border-radius: 50% 50% 6px 6px / 100% 100% 6px 6px;
  background: radial-gradient(ellipse at 50% 100%, #fff0c4 0%, #e6c47f 30%, #6b4a2a 70%, #2e1e10 100%);
  opacity: 0;
  transform: translateY(-78%) scaleY(0.4);
  transform-origin: 50% 100%;
  transition: opacity 0.5s var(--ease-soft) 0.25s, transform 0.7s var(--ease) 0.25s;
}

.chest.is-open .chest__body::before { opacity: 1; transform: translateY(-78%) scaleY(1); }

.chest.is-shaking { animation: shake 0.5s ease-in-out; }

.chest.is-open .chest__lid { transform: translateY(-6px) rotateX(72deg); }
.chest.is-open .chest__glow { opacity: 1; transform: scale(1.25); }
.chest.is-open .chest__lock { transform: translateY(14px) rotate(-12deg); opacity: 0; }

.lock-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.riddles {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.riddles li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.45;
}

.riddles li > span:last-child { padding-top: 2px; }

.riddles strong { letter-spacing: 0.06em; color: var(--forest); }

.riddles__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  background: var(--wood);
}

.digits {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 14px);
  margin-bottom: 18px;
}

.digit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.digit__input {
  width: 58px;
  height: 66px;
  padding: 0;
  border: 2px solid rgba(122, 82, 54, 0.35);
  border-radius: 14px;
  background: #fffdf7;
  box-shadow: inset 0 2px 6px rgba(40, 24, 12, 0.08);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  color: var(--wood-dark);
  caret-color: var(--gold);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.digit__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214, 173, 96, 0.3); }
.digit__input:disabled { opacity: 1; color: var(--moss); border-color: rgba(84, 116, 91, 0.45); background: #eef1e2; -webkit-text-fill-color: var(--moss); }

.digit__num { font-size: 12px; font-weight: 700; color: rgba(122, 82, 54, 0.7); }

.digits.is-wrong .digit__input { border-color: #c28b52; }
.digits .digit__input.is-right { border-color: var(--moss); background: #eef1e2; box-shadow: 0 0 0 3px rgba(84, 116, 91, 0.2); }

.chest-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.chest-reveal__tease {
  font-family: var(--serif);
  font-size: clamp(19px, 4.8vw, 23px);
  line-height: 1.4;
  color: var(--forest);
  text-wrap: balance;
  animation: rise-in 0.7s var(--ease) both;
}

.chest-reveal__text {
  font-family: var(--serif);
  font-size: clamp(18px, 4.4vw, 21px);
  line-height: 1.55;
  color: var(--ink);
  animation: rise-in 0.9s var(--ease) both;
}

/* Polaroid */
.polaroid {
  margin: 0;
  padding: 10px 10px 34px;
  background: #fffefb;
  border-radius: 4px;
  box-shadow: 0 18px 34px -18px rgba(20, 45, 31, 0.5), 0 2px 4px rgba(20, 45, 31, 0.08);
}

.polaroid__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 30%, rgba(214, 173, 96, 0.25), transparent 60%),
    linear-gradient(160deg, #e4e8d2, #c6d0b0);
}

.polaroid__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}

.polaroid__photo img.is-loaded { opacity: 1; }

.polaroid__fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--forest);
  text-align: center;
}

.polaroid__fallback-leaf { width: 34px; height: 80px; fill: rgba(84, 116, 91, 0.5); color: rgba(84, 116, 91, 0.5); }

.polaroid.is-missing .polaroid__fallback { display: flex; }
.polaroid.is-missing img { display: none; }

.polaroid--chest {
  width: min(100%, 360px);
  transform: rotate(-2deg);
  animation: polaroid-rise 1.1s var(--ease) both;
}

@keyframes polaroid-rise {
  from { opacity: 0; transform: translateY(-40px) scale(0.7) rotate(4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(-2deg); }
}

/* -------------------------------------------------------------
   Scène 4 — vang de herinneringen
   ------------------------------------------------------------- */
.catch { width: 100%; max-width: 760px; }

.catch__status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--forest);
}

.catch__timer {
  height: 8px;
  border-radius: 999px;
  background: rgba(84, 116, 91, 0.16);
  overflow: hidden;
}

.catch__timer-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  transform-origin: 0 50%;
  transition: transform 0.25s linear;
}

.catch__field {
  position: relative;
  width: 100%;
  height: clamp(360px, calc(100vh - 370px), 520px);
  height: clamp(360px, calc(100svh - 370px), 520px);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 250, 240, 0.9), rgba(255, 250, 240, 0) 70%),
    radial-gradient(120% 50% at 50% 115%, rgba(156, 175, 136, 0.55), rgba(156, 175, 136, 0) 70%),
    rgba(255, 250, 240, 0.5);
  border: 1px solid rgba(84, 116, 91, 0.22);
  box-shadow: inset 0 0 40px rgba(156, 175, 136, 0.18), 0 20px 40px -30px var(--shadow);
  transition: height 0.6s var(--ease), opacity 0.6s;
}

.catch__intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

.catch__words {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catch__words li {
  position: absolute;
  width: max-content;
  transform: translate(-50%, -50%);
}

.word {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 150px;
  padding: 8px 16px;
  border: 1px solid rgba(84, 116, 91, 0.25);
  border-radius: 22px 22px 22px 6px;
  background: rgba(255, 253, 246, 0.95);
  box-shadow: 0 10px 18px -12px var(--shadow);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.2;
  color: var(--forest);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.4s var(--ease-soft), visibility 0s linear 0.4s;
}

.word::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 8px;
  flex: none;
  border-radius: 0 60% 0 60%;
  background: var(--sage);
}

.catch.is-playing .word.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.3s var(--ease-soft), visibility 0s;
  animation: drift var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
}

.word.is-missed {
  visibility: visible;
  color: #8a5a2b;
  border-color: #c28b52;
  animation: missed 0.6s ease-in-out forwards !important;
}

@keyframes missed {
  0% { opacity: 1; transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { opacity: 1; transform: translateX(-3px); }
  100% { opacity: 0; transform: scale(0.9); }
}

.catch__field.is-penalty { animation: penalty 0.6s ease-out; }

@keyframes penalty {
  0% { box-shadow: inset 0 0 0 3px rgba(194, 139, 82, 0.7), 0 20px 40px -30px var(--shadow); }
  100% { box-shadow: inset 0 0 40px rgba(156, 175, 136, 0.18), 0 20px 40px -30px var(--shadow); }
}

.word:hover { border-color: rgba(214, 173, 96, 0.8); }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(var(--r0, -2deg)); }
  25% { transform: translate(var(--dx1, 10px), var(--dy1, -8px)) rotate(var(--r1, 2deg)); }
  50% { transform: translate(var(--dx2, -6px), var(--dy2, 10px)) rotate(var(--r0, -2deg)); }
  75% { transform: translate(var(--dx3, -12px), var(--dy3, -4px)) rotate(var(--r1, 2deg)); }
}

.word.is-caught {
  visibility: visible;
  color: #5b4718;
  background: linear-gradient(180deg, #f6e2b3, #e7c47f);
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(214, 173, 96, 0.25), 0 0 24px rgba(236, 210, 156, 0.8);
  animation: caught 0.9s var(--ease) forwards !important;
  pointer-events: none;
}

.word.is-caught::before { background: #b18a3c; }

@keyframes caught {
  0% { transform: scale(1); opacity: 1; }
  35% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.85) translateY(-26px); opacity: 0; }
}

.catch.is-ended .word:not(.is-caught) { visibility: hidden; pointer-events: none; animation: none !important; }

.catch.is-done .catch__field { height: 0; opacity: 0; border-width: 0; }

.sentence {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px 4px;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--forest);
}

.chip {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: #5b4718;
  background: linear-gradient(180deg, #f6e2b3, #e7c47f);
  border: 1px solid rgba(214, 173, 96, 0.9);
  box-shadow: 0 6px 14px -8px rgba(214, 173, 96, 0.9);
  animation: pop-in 0.5s var(--ease) both;
}

.sentence__sep { margin-right: 4px; }

/* -------------------------------------------------------------
   Scène 5 — de open plek (sterren vormen een huis)
   ------------------------------------------------------------- */
.sky {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 100 / 90;
  margin: 44px auto 34px;
}

.sky__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sky__line {
  fill: none;
  stroke: rgba(236, 210, 156, 0.75);
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 1.5px rgba(236, 210, 156, 0.9));
  transition: stroke-dashoffset 1s var(--ease-soft);
}

.sky__line.is-drawn { stroke-dashoffset: 0; }

.sky__home {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 30%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft), transform 1.6s var(--ease);
}

.sky__home.is-lit { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.sky__home-glow {
  position: absolute;
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 160, 0.7) 0%, rgba(236, 210, 156, 0.25) 40%, rgba(236, 210, 156, 0) 70%);
}

.sky__home-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-soft);
  box-shadow: 0 0 24px rgba(236, 210, 156, 0.6);
  opacity: 0;
  transition: opacity 1s var(--ease-soft);
}

.sky__home-photo.is-loaded { opacity: 1; }

.star {
  position: absolute;
  z-index: 2;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.star[data-star="0"] { left: 24%; top: 46.67%; }
.star[data-star="1"] { left: 24%; top: 86.67%; }
.star[data-star="2"] { left: 76%; top: 86.67%; }
.star[data-star="3"] { left: 76%; top: 46.67%; }
.star[data-star="4"] { left: 50%; top: 13.33%; }

.star:disabled { cursor: default; }

.star__icon {
  position: absolute;
  inset: 12px;
  width: 36px;
  height: 36px;
  fill: rgba(247, 240, 223, 0.22);
  stroke: rgba(247, 240, 223, 0.4);
  stroke-width: 0.8px;
  transition: fill 0.6s, transform 0.6s var(--ease), filter 0.6s, opacity 0.4s;
}

.star:disabled:not(.is-open) .star__icon { opacity: 0.55; }

.star.is-next .star__icon {
  fill: rgba(236, 210, 156, 0.6);
  stroke: var(--gold-soft);
  animation: star-call 2s ease-in-out infinite;
}

@keyframes star-call {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(236, 210, 156, 0.5)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(236, 210, 156, 0.95)); }
}

.star.is-open .star__icon {
  fill: #f3d99c;
  stroke: #fff3d1;
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(236, 210, 156, 0.95));
  animation: star-open 0.8s var(--ease);
}

@keyframes star-open {
  0% { transform: scale(0.6) rotate(-30deg); }
  60% { transform: scale(1.3) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.star__name,
.star__question {
  position: absolute;
  top: calc(100% - 4px);
  left: 50%;
  transform: translate(-50%, 4px);
  font-family: var(--serif);
  font-size: 17px;
  white-space: nowrap;
  color: var(--cream);
  text-shadow: 0 0 12px rgba(236, 210, 156, 0.6);
  opacity: 0;
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease);
}

.star.is-open .star__name { opacity: 1; transform: translate(-50%, 0); }

.star--last { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.star--last .star__icon { inset: 12px; width: 48px; height: 48px; }

.star--last .star__question { font-size: 24px; color: var(--gold-soft); }
.star--last.is-asking .star__question { opacity: 1; transform: translate(-50%, 0); }
.star--last.is-asking .star__icon { animation: star-long-glow 1.9s ease-in-out forwards; fill: #f3d99c; }

@keyframes star-long-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(236, 210, 156, 0.6)); }
  70% { transform: scale(1.35); filter: drop-shadow(0 0 26px rgba(255, 236, 180, 1)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 18px rgba(255, 236, 180, 1)); }
}

.star--last .star__name {
  top: auto;
  bottom: calc(100% - 2px);
  font-size: clamp(24px, 6.5vw, 32px);
  letter-spacing: 0.18em;
  color: var(--gold-soft);
  transform: translate(-50%, 8px);
  text-shadow: 0 0 18px rgba(236, 210, 156, 0.9);
}

.star--last.is-open .star__name { transform: translate(-50%, 0); }
.star--last.is-open .star__question { opacity: 0; }

/* -------------------------------------------------------------
   Finale — voor Saskia
   ------------------------------------------------------------- */
.scene--finale { padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); }

.finale {
  position: relative;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finale__photos {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: clamp(150px, 42vw, 210px);
  margin-bottom: -26px;
}

.finale-photo {
  position: absolute;
  top: 10px;
  width: 42%;
  padding: 6px 6px 20px;
  animation: photo-in 1.2s var(--ease) both;
}

.finale-photo .polaroid__photo { aspect-ratio: 1 / 1; }

.finale-photo:nth-child(1) { left: 2%;  transform: rotate(-9deg); top: 26px; animation-delay: 0.3s; }
.finale-photo:nth-child(2) { left: 22%; transform: rotate(-3deg); animation-delay: 0.5s; z-index: 1; }
.finale-photo:nth-child(3) { left: 38%; transform: rotate(4deg); top: 4px; animation-delay: 0.7s; z-index: 2; }
.finale-photo:nth-child(4) { left: 56%; transform: rotate(10deg); top: 24px; animation-delay: 0.9s; }
.finale-photo:nth-child(n+5) { display: none; }

@keyframes photo-in {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}

.finale-letter {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 600px;
  padding: clamp(30px, 7vw, 56px) clamp(22px, 7vw, 60px) clamp(30px, 6vw, 48px);
  text-align: center;
}

.finale-letter__title {
  margin: 0 0 clamp(20px, 4vw, 30px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1.05;
  color: var(--forest);
}

.finale-letter__body {
  font-family: var(--serif);
  font-size: clamp(19px, 4.8vw, 22px);
  line-height: 1.65;
  color: var(--ink);
}

.finale-letter__body > * + * { margin-top: 1.05em; }

.finale-letter__love { font-size: 1.12em; color: var(--forest); }
.finale-letter__names { font-style: italic; color: var(--moss); }
.finale-letter__again { margin-top: 1.8em !important; }

.finale-letter__choice {
  margin-top: 0.3em !important;
  font-size: clamp(30px, 8.4vw, 44px);
  line-height: 1.2;
  font-style: italic;
  color: #8a6a26;
}

.finale-letter__body.is-armed > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s var(--ease-soft), transform 1.1s var(--ease);
}

.finale-letter__body.is-armed > .is-shown { opacity: 1; transform: none; }

.finale__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  animation: rise-in 0.9s var(--ease) both;
}

/* Laatste overlay */
.final-dialog {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  inset: 0;
}

.final-dialog::backdrop { background: rgba(10, 20, 14, 0.85); }

.final {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
  overflow: hidden;
  text-align: center;
  color: var(--cream);
  background: radial-gradient(70% 55% at 50% 45%, #3b4a2a 0%, #1f3a2d 55%, #10201a 100%);
}

.final__glow {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 130vmin;
  height: 130vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 160, 0.42) 0%, rgba(236, 210, 156, 0.14) 35%, rgba(236, 210, 156, 0) 65%);
  animation: final-breathe 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes final-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

.final__title {
  position: relative;
  margin: 0;
  max-width: 14ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 10vw, 72px);
  line-height: 1.12;
  color: var(--paper);
  text-shadow: 0 0 30px rgba(236, 210, 156, 0.5);
  text-wrap: balance;
  animation: rise-in 1.4s var(--ease) 0.2s both;
}

.final__text {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 4.4vw, 21px);
  color: rgba(247, 240, 223, 0.82);
  animation: rise-in 1.4s var(--ease) 0.9s both;
}

.final__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  animation: rise-in 1.2s var(--ease) 1.8s both;
}

/* -------------------------------------------------------------
   Easter egg + toast
   ------------------------------------------------------------- */
.egg {
  position: fixed;
  right: calc(6px + var(--safe-right));
  bottom: calc(6px + var(--safe-bottom));
  z-index: 15;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--moss);
  opacity: 0.38;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.3s, color 0.6s;
}

.egg svg { width: 15px; height: 15px; fill: currentColor; }
.egg:hover { opacity: 0.7; }
body.is-dark .egg { color: var(--gold-soft); }
.egg.is-beat svg { animation: beat 0.35s var(--ease); }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.45); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(64px + var(--safe-bottom));
  z-index: 30;
  max-width: min(90vw, 420px);
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 16px;
  text-align: center;
  color: var(--forest);
  background: var(--paper);
  border: 1px solid rgba(214, 173, 96, 0.5);
  box-shadow: 0 16px 34px -18px rgba(20, 45, 31, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s;
}

body.is-restarting main,
body.is-restarting .progress { opacity: 0; transition: opacity 0.5s; }

/* -------------------------------------------------------------
   Grotere schermen
   ------------------------------------------------------------- */
@media (min-width: 600px) {
  .names { grid-template-columns: repeat(4, 1fr); }
  .word { max-width: 190px; font-size: 17px; }
}

@media (min-width: 1180px) {
  .finale__photos {
    position: absolute;
    inset: 0;
    max-width: none;
    height: auto;
    margin: 0;
  }

  .finale-photo { width: 200px; padding: 8px 8px 28px; }
  .finale-photo:nth-child(n+5) { display: block; }

  .finale-photo:nth-child(1) { left: calc(50% - 300px - 250px); top: 2%;  transform: rotate(-6deg); }
  .finale-photo:nth-child(2) { left: calc(50% + 300px + 40px);  top: 6%;  transform: rotate(5deg); }
  .finale-photo:nth-child(3) { left: calc(50% - 300px - 230px); top: 27%; transform: rotate(4deg); }
  .finale-photo:nth-child(4) { left: calc(50% + 300px + 60px);  top: 31%; transform: rotate(-5deg); }
  .finale-photo:nth-child(5) { left: calc(50% - 300px - 260px); top: 52%; transform: rotate(-3deg); animation-delay: 1.1s; }
  .finale-photo:nth-child(6) { left: calc(50% + 300px + 30px);  top: 56%; transform: rotate(6deg); animation-delay: 1.3s; }
  .finale-photo:nth-child(7) { left: calc(50% - 300px - 220px); top: 76%; transform: rotate(5deg); animation-delay: 1.5s; }
  .finale-photo:nth-child(8) { left: calc(50% + 300px + 55px);  top: 80%; transform: rotate(-4deg); animation-delay: 1.7s; }
}

/* Lage schermen (telefoon liggend) */
@media (max-height: 520px) and (orientation: landscape) {
  .catch__field { height: 420px; }
  .gate-wrap { min-height: 0; }
  .intro { padding-top: 64px; }
}

/* -------------------------------------------------------------
   Minder beweging
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .fireflies,
  .sparks,
  .butterflies { display: none; }

  .fireflies span { animation: none !important; }
  .scene, .scene.is-leaving { transform: none; }
  .finale-letter__body.is-armed > * { opacity: 1; transform: none; }
}
