/* =========================================================================
   Een klein vraagje… — voor Julie 💌
   Professioneel, mobile-first designsysteem.
   Serif (Fraunces) + sans (Inter), verfijnd blush-palet, gelaagde schaduwen,
   clamp()-schaling, dvh + safe-area, nooit clipping.
   ========================================================================= */

:root {
  /* Palette — verfijnd, warm-romantisch */
  --blush-50:  #fff8f6;
  --blush-100: #fdeef0;
  --blush-200: #f8dde3;
  --rose:      #e05a78;
  --rose-deep: #c8324f;
  --rose-soft: #f4aab8;
  --peach:     #f0a58a;
  --gold:      #d9a441;
  --ink:       #3a2930;
  --ink-2:     #6f5860;
  --ink-3:     #a08a91;
  --surface:   #ffffff;
  --surface-2: #fffafb;
  --line:      rgba(58, 41, 48, 0.09);
  --line-2:    rgba(58, 41, 48, 0.14);

  /* Shadows — gelaagd en zacht */
  --sh-sm: 0 1px 2px rgba(58, 41, 48, 0.06), 0 2px 6px rgba(200, 50, 79, 0.05);
  --sh-md: 0 2px 6px rgba(58, 41, 48, 0.05), 0 12px 26px rgba(200, 50, 79, 0.10);
  --sh-lg: 0 6px 16px rgba(58, 41, 48, 0.07), 0 26px 50px rgba(200, 50, 79, 0.16);

  /* Radius */
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  /* Type */
  --font-sans: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --fs-display: clamp(2rem, 8.5vw, 2.7rem);
  --fs-h1: clamp(1.55rem, 6vw, 2.05rem);
  --fs-h2: clamp(1.25rem, 4.8vw, 1.55rem);
  --fs-body: clamp(1rem, 3.7vw, 1.08rem);
  --fs-sm: 0.9rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tap: 52px; /* min touch target */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--blush-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow: hidden;
  overscroll-behavior: none;
  line-height: 1.5;
}
button { font-family: inherit; color: inherit; }

/* ---------------------------------------------------------------- Background */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 0%, #fff6f3 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 100%, #ffeede 0%, transparent 50%),
    linear-gradient(165deg, var(--blush-100) 0%, var(--blush-200) 100%);
}
.bg-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.38; animation: drift 20s var(--ease) infinite alternate; }
.bg-blob--1 { width: 60vw; height: 60vw; background: #ffc2ce; top: -14%; left: -14%; }
.bg-blob--2 { width: 52vw; height: 52vw; background: #ffd9b8; bottom: -14%; right: -12%; animation-delay: -7s; }
.bg-blob--3 { width: 42vw; height: 42vw; background: #ffb5c4; bottom: 24%; left: 34%; animation-delay: -13s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(5%,-4%) scale(1.1); } }

.floaties { position: absolute; inset: 0; pointer-events: none; }
.floaties span {
  position: absolute; bottom: -10%; font-size: 1.3rem; opacity: 0;
  animation: floatUp linear infinite; will-change: transform, opacity;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  12% { opacity: 0.45; } 88% { opacity: 0.45; }
  100% { transform: translateY(-115vh) rotate(360deg); opacity: 0; }
}

/* ------------------------------------------------------------- Sound toggle */
.sound-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 40;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sh-sm);
  font-size: 1.05rem; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.2s var(--ease);
}
.sound-toggle:active { transform: scale(0.9); }
.sound-toggle__off { display: none; }
.sound-toggle.is-muted .sound-toggle__on { display: none; }
.sound-toggle.is-muted .sound-toggle__off { display: block; }

/* -------------------------------------------------------------------- Stage */
.stage {
  position: relative; z-index: 10;
  height: 100dvh;
  display: grid;
  grid-template: 1fr / 1fr;
}
.screen {
  grid-area: 1 / 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(18px, 5vw, 34px);
  padding-top: max(clamp(18px, 5vw, 34px), calc(env(safe-area-inset-top) + 8px));
  padding-bottom: max(clamp(18px, 5vw, 34px), calc(env(safe-area-inset-bottom) + 8px));
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(0.99);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.screen.is-active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.screen.is-leaving { opacity: 0; transform: translateY(-14px) scale(0.99); }
/* Card-schermen: centreren indien het past, anders scrollbaar (geen clipping) */
.screen > .envelope-wrap,
.screen > .card { margin-block: auto; width: 100%; max-width: 27rem; }

/* --------------------------------------------------------------------- Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: clamp(28px, 7vw, 40px) clamp(22px, 6vw, 34px);
  text-align: center;
}
.card__emoji { font-size: clamp(2.6rem, 11vw, 3.3rem); line-height: 1; margin-bottom: 16px; animation: pop 0.6s var(--ease) both; }
.card__title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.card__title--big { font-size: var(--fs-h2); line-height: 1.25; }
.card__text { font-size: var(--fs-body); line-height: 1.6; color: var(--ink-2); margin-bottom: 26px; }
.card__text--soft { font-size: 0.98rem; margin-bottom: 6px; }
.card__text strong { color: var(--rose-deep); font-weight: 600; }

.signoff {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: 1.4rem; color: var(--rose-deep); line-height: 1.3; margin-top: 14px;
}
.signoff__joke { font-size: 0.9rem; color: var(--ink-3); font-style: normal; font-family: var(--font-sans); }

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

/* -------------------------------------------------------------------- Button */
.btn {
  font-size: 1.02rem; font-weight: 600; letter-spacing: 0.01em;
  border: none; border-radius: var(--r-pill);
  min-height: var(--tap);
  padding: 14px 30px;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.96); }
.btn--primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 22px -8px var(--rose-deep);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -10px var(--rose-deep); }
.btn--ghost { background: transparent; color: var(--ink-3); font-size: 0.92rem; font-weight: 500; min-height: 44px; padding: 10px 20px; }
.btn--ghost:hover { color: var(--rose-deep); }

/* --------------------------------------------------------------- Envelope */
.envelope-wrap { display: flex; flex-direction: column; align-items: center; gap: clamp(30px, 9vw, 46px); }
.envelope {
  --w: clamp(244px, 76vw, 312px);
  --h: calc(var(--w) * 0.68);
  --gold: #e9c46a;
  --gold-deep: #c99a3a;
  position: relative; width: var(--w); height: var(--h);
  background: none; border: none; cursor: pointer;
  perspective: 1000px;
  animation: floatEnv 4.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 26px 34px rgba(200, 50, 79, 0.26));
}
@keyframes floatEnv {
  0%,100% { transform: translateY(0) rotate(-1.4deg); }
  50% { transform: translateY(-11px) rotate(1.4deg); }
}

/* Zachte gouden gloed erachter */
.envelope__glow {
  position: absolute; inset: -18% -12%; z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233,196,106,0.5), rgba(224,90,120,0.28) 55%, transparent 75%);
  filter: blur(14px); animation: glowPulse 3.6s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 0.95; transform: scale(1.05); } }

.envelope__back {
  position: absolute; inset: 0; z-index: 1; border-radius: 15px;
  background: linear-gradient(135deg, #f3a4b6 0%, #ea7791 100%);
  box-shadow: inset 0 0 0 1.5px rgba(233,196,106,0.5);
}
.envelope__letter {
  position: absolute; left: 6.5%; right: 6.5%; bottom: 7px; height: 82%; z-index: 2;
  background: linear-gradient(180deg, #fffdfb, #fff4f6);
  border-radius: 10px 10px 7px 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(201,154,58,0.35), 0 3px 8px rgba(200,50,79,0.1);
  transition: transform 0.75s var(--ease);
}
.envelope__letter-deco { color: var(--gold-deep); font-size: 0.9rem; letter-spacing: 0.3em; opacity: 0.8; }
.envelope__heart { font-size: clamp(2rem, 8.5vw, 2.5rem); }
.envelope__letter-sub { font-family: var(--font-serif); font-style: italic; color: var(--ink-3); font-size: 0.9rem; }
.envelope__front {
  position: absolute; inset: 0; z-index: 3; border-radius: 15px;
  background: linear-gradient(135deg, #ee8fa4 0%, #e3627d 100%);
  clip-path: polygon(0 30%, 50% 78%, 100% 30%, 100% 100%, 0 100%);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15);
}
/* onderrand gouden accentlijntjes langs de V */
.envelope__front::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(233,196,106,0.55) 50%, transparent calc(50% + 1px)) no-repeat;
  clip-path: polygon(0 30%, 50% 78%, 100% 30%, 100% 100%, 0 100%);
  opacity: 0;
}
.envelope__flap {
  position: absolute; top: 0; left: 0; right: 0; height: 60%; z-index: 4;
  background: linear-gradient(135deg, #e7758c 0%, #d24d69 100%);
  clip-path: polygon(0 0, 100% 0, 50% 92%);
  transform-origin: top; border-radius: 15px 15px 0 0; overflow: hidden;
  transition: transform 0.7s var(--ease), z-index 0s 0.35s;
}
/* glans-sweep over de flap */
.envelope__shine {
  position: absolute; top: -20%; left: -60%; width: 45%; height: 160%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); animation: sweep 4.5s ease-in-out infinite;
}
@keyframes sweep { 0% { left: -60%; } 22%, 100% { left: 130%; } }

/* Wax-zegel op de punt van de flap */
.wax-seal {
  position: absolute; z-index: 6; top: 44%; left: 50%;
  width: clamp(52px, 17vw, 66px); height: clamp(52px, 17vw, 66px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ef6d88, #c8324f 62%, #9e2440);
  box-shadow: 0 4px 10px rgba(120,20,45,0.5), inset 0 2px 5px rgba(255,255,255,0.35), inset 0 -3px 6px rgba(120,20,45,0.6);
  display: grid; place-items: center;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), filter 0.5s;
}
.wax-seal::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.45);
}
.wax-seal__mono {
  font-family: var(--font-serif); font-weight: 600; font-style: italic;
  color: rgba(255,255,255,0.92); font-size: clamp(1.5rem, 5.5vw, 1.9rem);
  text-shadow: 0 1px 2px rgba(120,20,45,0.6);
}
.envelope__name {
  position: absolute; bottom: clamp(12px, 4.5vw, 20px); left: 0; right: 0; z-index: 5;
  text-align: center; pointer-events: none;
}
.envelope__name span {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.55rem, 6.2vw, 2rem); line-height: 1;
  background: linear-gradient(100deg, #fff 10%, #ffe9b0 30%, #fff 50%, #ffe9b0 70%, #fff 90%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(160, 30, 60, 0.5));
  animation: shimmerName 3.4s linear infinite;
}
@keyframes shimmerName { to { background-position: 220% center; } }

/* Sparkles rond de envelop */
.sparkles { position: absolute; inset: -14%; z-index: 6; pointer-events: none; }
.sparkles span {
  position: absolute; font-size: 0.8rem; opacity: 0;
  animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: 0; transform: scale(0.5) rotate(0); } 50% { opacity: 0.95; transform: scale(1) rotate(25deg); } }
@keyframes burstOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--bx)), calc(-50% + var(--by))) scale(1.1) rotate(40deg); }
}

/* Openen */
.envelope.is-open { animation: none; }
.envelope.is-open .envelope__flap { transform: rotateX(178deg); z-index: 0; }
.envelope.is-open .envelope__letter { transform: translateY(-62%) scale(1.05); z-index: 7; }
.envelope.is-open .envelope__name { opacity: 0; transition: opacity 0.3s; }
.envelope.is-open .wax-seal { transform: translate(-50%, -50%) scale(1.6) rotate(-16deg); opacity: 0; filter: blur(2px); }

.envelope__hint {
  color: var(--ink-3); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  animation: hintPulse 1.9s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.9; } }
.envelope__hint.is-hidden { opacity: 0; transition: opacity 0.3s; }

/* ---------------------------------------------------------------- Quiz */
.card--quiz { display: flex; flex-direction: column; }
.quiz-progress { display: flex; gap: 7px; justify-content: center; margin-bottom: 22px; }
.quiz-progress span { width: 28px; height: 5px; border-radius: 3px; background: var(--blush-200); transition: background 0.3s; }
.quiz-progress span.is-done { background: var(--rose); }
.quiz-question {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.2rem, 4.6vw, 1.42rem);
  line-height: 1.35; margin-bottom: 22px; min-height: 2.4em;
  display: flex; align-items: center; justify-content: center;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  font-size: 1.02rem; font-weight: 500; min-height: var(--tap); padding: 14px 20px;
  border: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--r-md);
  color: var(--ink); cursor: pointer; transition: all 0.16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.quiz-opt:hover { border-color: var(--rose-soft); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.quiz-opt.is-picked {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff; border-color: transparent; box-shadow: var(--sh-md);
}
.quiz-reaction {
  font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--rose-deep);
  margin-top: 18px; min-height: 1.6em; opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
}
.quiz-reaction.is-show { opacity: 1; transform: none; }

/* Typemachine-briefje */
.card__text--type { white-space: pre-line; min-height: 3.2em; }
.card__text--type::after { content: '▍'; color: var(--rose); animation: caret 0.9s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Persoonlijkheidsquiz */
.pquiz-intro { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--ink-2); margin-bottom: 18px; }
.pquiz-result { animation: pop 0.5s var(--ease) both; text-align: center; }
.pquiz-result__emoji { font-size: clamp(3rem, 13vw, 3.8rem); line-height: 1; margin-bottom: 6px; }
.pquiz-result__label { font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.pquiz-result__title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.5rem, 6vw, 1.9rem); color: var(--rose-deep); margin: 4px 0 12px; }
.pquiz-result__text { font-size: var(--fs-body); line-height: 1.55; color: var(--ink-2); margin-bottom: 24px; }
.pquiz-result .btn--primary { width: 100%; }

/* ---------------------------------------------------------------- Level map */
.screen--map { justify-content: flex-start; }
.map-head { text-align: center; width: 100%; max-width: 27rem; margin: 0 auto 10px; flex: none; }
.map-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.25; }
.map-sub {
  color: var(--rose-deep); font-weight: 600; font-size: 0.85rem; margin-top: 10px;
  display: inline-block; padding: 5px 15px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line);
}
.map-scroll { width: 100%; max-width: 27rem; margin: 0 auto; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.map { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 4px 8px 4px; }
/* verbindingslijn door de badges */
.map::before {
  content: ''; position: absolute; left: calc(4px + 27px); top: 34px; bottom: 34px;
  width: 2px; background: repeating-linear-gradient(var(--line-2) 0 6px, transparent 6px 12px);
  z-index: 0;
}
.map-node {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px 16px 12px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-sm);
  cursor: pointer; text-align: left;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.map-node__badge {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--blush-100); border: 2px solid #fff; box-shadow: var(--sh-sm);
  transition: transform 0.2s var(--ease);
}
.map-node__label { flex: 1; font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.map-node.is-locked { cursor: default; opacity: 0.62; box-shadow: none; background: var(--surface-2); }
.map-node.is-locked .map-node__badge { filter: grayscale(0.5); }
.map-node.is-done .map-node__badge { background: linear-gradient(135deg, #f7d489, var(--gold)); }
.map-node.is-done .map-node__label { color: var(--ink-2); }
.map-node.is-done::after { content: 'Klaar'; font-size: 0.72rem; font-weight: 600; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.map-node.is-current {
  border-color: var(--rose-soft); box-shadow: var(--sh-md);
  transform: translateY(-1px);
}
.map-node.is-current .map-node__badge { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); animation: nodePulse 1.7s ease-in-out infinite; }
.map-node.is-current::after { content: 'Speel ▸'; flex: none; font-size: 0.82rem; font-weight: 700; color: #fff; background: var(--rose); padding: 6px 12px; border-radius: var(--r-pill); }
.map-node.is-current:hover { transform: translateY(-3px); }
.map-node--final { border-style: solid; }
.map-node--final .map-node__badge { background: var(--blush-100); font-size: 1.7rem; }
.map-node--final.is-current { border-color: var(--rose); background: linear-gradient(135deg, #fff, #fff2f5); }
.map-node--final.is-current .map-node__badge { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); }
.map-node--final.is-current .map-node__label { color: var(--rose-deep); font-family: var(--font-serif); font-style: italic; }
@keyframes nodePulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(224, 90, 120, 0.45); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(224, 90, 120, 0); }
}

/* ---------------------------------------------------------------- Game host */
.screen--play { justify-content: flex-start; }
.play-head { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 30rem; margin: 0 auto 12px; flex: none; }
.play-back {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-sm);
  font-size: 1.25rem; cursor: pointer; display: grid; place-items: center;
}
.play-back:active { transform: scale(0.9); }
.play-info { flex: 1; min-width: 0; text-align: left; }
.play-title { font-weight: 700; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-hint { font-size: 0.85rem; color: var(--ink-2); margin-top: 2px; min-height: 1.2em; }
.play-badge { flex: none; font-weight: 700; color: var(--rose-deep); background: var(--surface); border: 1px solid var(--line); padding: 7px 13px; border-radius: var(--r-pill); font-size: 0.85rem; }
.play-bar { width: 100%; max-width: 30rem; margin: 0 auto 10px; flex: none; height: 8px; background: var(--blush-200); border-radius: var(--r-pill); overflow: hidden; }
.play-bar__fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--peach), var(--rose-deep)); border-radius: var(--r-pill); transition: width 0.35s var(--ease); }
.play-stage {
  position: relative; width: 100%; max-width: 30rem; margin: 0 auto; flex: 1;
  min-height: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}

/* Catch */
.catch-field { position: absolute; inset: 0; touch-action: none; }
.catch-field.shake { animation: shake 0.32s; }
.heart {
  position: absolute; font-size: clamp(2rem, 8vw, 2.5rem); cursor: pointer; user-select: none;
  will-change: transform; transition: transform 0.08s; -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 4px 6px rgba(200,50,79,0.2));
}
.heart:active { transform: scale(0.82); }
.heart.is-caught { animation: caught 0.4s var(--ease) forwards; pointer-events: none; }
@keyframes caught { to { transform: scale(1.9); opacity: 0; } }
.spark { position: absolute; font-size: 1rem; pointer-events: none; animation: spark 0.6s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }

/* Memory */
.mem-grid { display: grid; gap: clamp(8px, 2.5vw, 12px); width: 100%; max-width: 330px; }
.mem-card { aspect-ratio: 3 / 4; border: none; background: none; padding: 0; cursor: pointer; perspective: 700px; -webkit-tap-highlight-color: transparent; }
.mem-card__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.42s var(--ease); }
.mem-card.is-flipped .mem-card__inner, .mem-card.is-matched .mem-card__inner { transform: rotateY(180deg); }
.mem-card__face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r-sm); font-size: clamp(1.6rem, 7vw, 2rem); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--sh-sm); }
.mem-card__front { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; }
.mem-card__back { background: var(--surface); transform: rotateY(180deg); border: 1px solid var(--line-2); }
.mem-card.is-matched { animation: pop 0.4s var(--ease); }
.mem-card.is-matched .mem-card__back { background: #fff6e6; border-color: var(--gold); }

/* Simon */
.simon { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 3.5vw, 16px); width: min(80vw, 300px); aspect-ratio: 1; }
.simon-pad { border: 3px solid rgba(255,255,255,0.7); border-radius: 20px; cursor: pointer; opacity: 0.85; box-shadow: var(--sh-sm); transition: opacity 0.1s, transform 0.1s, box-shadow 0.1s; -webkit-tap-highlight-color: transparent; }
.simon-pad:active { transform: scale(0.96); }
.simon-pad.is-lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 30px 5px rgba(255,255,255,0.85) inset, var(--sh-md); }
.simon .pad0 { background: #e5687f; }
.simon .pad1 { background: #e6b552; }
.simon .pad2 { background: #6fb7e8; }
.simon .pad3 { background: #7fc98f; }
.simon.shake { animation: shake 0.32s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }

/* Timing — Raak het hart */
.timing { display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 6vw, 34px); width: 100%; }
.timing-track {
  position: relative; width: min(88%, 340px); height: 58px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  overflow: hidden; box-shadow: var(--sh-sm);
}
.timing-track.shake { animation: shake 0.32s; }
.timing-zone {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(224,90,120,0.26), rgba(200,50,79,0.32));
  border-left: 2px solid var(--rose); border-right: 2px solid var(--rose);
}
.timing-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 1.7rem; filter: drop-shadow(0 3px 4px rgba(200,50,79,0.3)); will-change: left; }
.timing-marker.hit { animation: pop 0.25s var(--ease); }
.timing-btn {
  min-height: 56px; padding: 14px 44px; border: none; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff;
  font-size: 1.12rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px -8px var(--rose-deep);
  -webkit-tap-highlight-color: transparent;
}
.timing-btn:active { transform: scale(0.96); }

/* Woordpuzzel */
.word { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 5vw, 22px); width: 100%; }
.word-hint { font-family: var(--font-serif); font-style: italic; color: var(--ink-2); font-size: 1.02rem; text-align: center; }
.word-slots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.word-slot { width: 32px; height: 42px; border-bottom: 3px solid var(--rose-soft); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: var(--rose-deep); }
.word-slot.filled { border-bottom-color: var(--rose); animation: pop 0.3s var(--ease); }
.word-tiles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 320px; }
.word-tile {
  width: 44px; height: 52px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); font-weight: 700; font-size: 1.25rem; color: var(--ink); cursor: pointer;
  box-shadow: var(--sh-sm); transition: transform 0.15s var(--ease), opacity 0.2s, background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.word-tile:hover { border-color: var(--rose-soft); transform: translateY(-2px); }
.word-tile.used { opacity: 0; pointer-events: none; transform: scale(0.5); }
.word-tile.wrong { background: #ffe1e1; border-color: #e0577a; }
.word.shake { animation: shake 0.32s; }

/* Schuifpuzzel */
.slide { position: relative; width: min(80vw, 300px); aspect-ratio: 1; }
.slide-tile {
  position: absolute; top: 0; left: 0;
  width: calc(100% / var(--n)); height: calc(100% / var(--n));
  border: 3px solid var(--blush-100); border-radius: 13px;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff;
  font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.3rem, 7vw, 1.9rem);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
  transition: transform 0.16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.slide-tile:active { filter: brightness(1.06); }

/* Whack-a-mole — Tik het hart */
.whack { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 3.5vw, 16px); width: min(84vw, 320px); }
.whack-hole {
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #f6dbe3, #f0c3d0 70%, #e6a9bb);
  box-shadow: inset 0 6px 12px rgba(150,60,85,0.28);
  display: grid; place-items: center; overflow: hidden;
}
.whack-pop {
  font-size: clamp(1.6rem, 8vw, 2.2rem); cursor: pointer;
  transform: translateY(120%) scale(0.5); opacity: 0;
  transition: transform 0.16s var(--ease), opacity 0.16s;
  -webkit-tap-highlight-color: transparent;
}
.whack-hole.up .whack-pop { transform: translateY(0) scale(1); opacity: 1; }
.whack.shake { animation: shake 0.32s; }

/* Doolhof — maze */
.maze-wrap { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 5vw, 24px); }
.maze {
  position: relative; width: min(70vw, 260px); aspect-ratio: 1;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr);
  gap: 4px; padding: 4px; background: var(--blush-200); border-radius: 16px; touch-action: none;
}
.maze-cell { border-radius: 7px; background: var(--surface); display: grid; place-items: center; font-size: 1.1rem; }
.maze-cell.wall { background: linear-gradient(135deg, #c9a6b2, #a97e8f); box-shadow: inset 0 1px 3px rgba(90,50,65,0.4); }
.maze-cell.goal { background: linear-gradient(135deg, #fff, #ffe6ee); }
.maze-heart {
  position: absolute; top: 4px; left: 4px;
  width: calc((100% - 8px) / var(--cols)); height: calc((100% - 8px) / var(--rows));
  display: grid; place-items: center; font-size: 1.3rem; z-index: 2;
  transition: transform 0.14s var(--ease); pointer-events: none;
}
.dpad {
  display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); gap: 8px;
  grid-template-areas: '. up .' 'left down right';
}
.dpad-btn {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px;
  font-size: 1rem; color: var(--rose-deep); cursor: pointer; box-shadow: var(--sh-sm);
  -webkit-tap-highlight-color: transparent;
}
.dpad-btn:active { transform: scale(0.92); background: var(--blush-100); }
.dpad-btn.up { grid-area: up; } .dpad-btn.down { grid-area: down; }
.dpad-btn.left { grid-area: left; } .dpad-btn.right { grid-area: right; }

/* ---------------------------------------------------------- Big question */
.card__title--big { margin-bottom: 4px; }
.answer-buttons { position: relative; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; min-height: 120px; margin-top: 22px; }
.btn--yes { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; box-shadow: 0 12px 24px -8px var(--rose-deep); font-size: 1.12rem; min-height: 56px; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.btn--no { background: var(--surface); color: var(--ink-3); border: 1px solid var(--line-2); transition: transform 0.25s var(--ease); }
.btn--no.is-fleeing { position: fixed; z-index: 30; box-shadow: var(--sh-md); }

/* ---------------------------------------------------------------- Compose */
.card--compose { text-align: center; }
.compose-progress { display: flex; gap: 7px; justify-content: center; margin-bottom: 20px; }
.compose-progress span { width: 24px; height: 5px; border-radius: 3px; background: var(--blush-200); transition: background 0.3s; }
.compose-progress span.is-done { background: var(--rose); }
.compose-step-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.2rem, 4.6vw, 1.45rem); margin-bottom: 20px; line-height: 1.3; }
.compose-options { display: flex; flex-direction: column; gap: 9px; }
.compose-opt {
  font-size: 1rem; font-weight: 500; min-height: var(--tap); padding: 13px 16px;
  border: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--r-md);
  color: var(--ink); cursor: pointer; text-align: left; display: flex; align-items: center; gap: 13px;
  transition: all 0.15s var(--ease); -webkit-tap-highlight-color: transparent;
}
.compose-opt:hover { border-color: var(--rose-soft); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.compose-opt.is-picked { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; border-color: transparent; box-shadow: var(--sh-md); }
.compose-opt__emoji { font-size: 1.35rem; flex: none; }

.compose-summary { animation: pop 0.5s var(--ease) both; }
.ticket {
  position: relative; background: linear-gradient(155deg, #fff, #fff5f7);
  border-radius: var(--r-lg); padding: 24px 22px 18px; box-shadow: var(--sh-md);
  border: 1px solid var(--line); margin-bottom: 18px; text-align: left; overflow: hidden;
}
.ticket::before, .ticket::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--blush-100); top: 50%; }
.ticket::before { left: -11px; } .ticket::after { right: -11px; }
.ticket__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ticket__label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.ticket__heart { font-size: 1.3rem; }
.ticket__row { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--font-serif); font-style: italic; font-size: 1.7rem; color: var(--rose-deep); padding: 6px 0 14px; border-bottom: 1px dashed var(--line-2); margin-bottom: 14px; }
.ticket__amp { font-size: 1.2rem; color: var(--peach); font-style: normal; }
.ticket__list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.ticket__list li { display: flex; align-items: center; gap: 13px; font-size: 1rem; font-weight: 500; }
.ticket__list li span.ic { font-size: 1.2rem; width: 1.6rem; text-align: center; flex: none; }
.ticket__perf { text-align: center; margin-top: 16px; font-size: 0.86rem; color: var(--ink-3); }
.compose-summary .btn--primary { width: 100%; margin-bottom: 6px; }
.compose-summary .btn--ghost { width: 100%; }

/* ---------------------------------------------------------------- Confetti */
/* Expliciete CSS-grootte, ontkoppeld van de teken-buffer (width/height in px):
   anders neemt <canvas> zijn buffergrootte (schermbreedte × pixelratio) als
   CSS-breedte → op gsm 2-3× te breed → hele pagina zoomt uit. */
.countdown {
  margin: 4px 0 18px; padding: 16px 14px;
  background: linear-gradient(150deg, #fff, #fff4f7);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-sm);
}
.countdown__label { font-size: 0.86rem; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.countdown__row { display: flex; justify-content: center; gap: 8px; }
.countdown__unit {
  flex: 1; max-width: 66px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 4px; box-shadow: var(--sh-sm);
}
.countdown__unit span { display: block; font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.3rem, 6vw, 1.7rem); color: var(--rose-deep); line-height: 1.1; }
.countdown__unit small { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.love-note { font-size: 1rem; line-height: 1.62; color: var(--ink-2); text-align: center; margin-bottom: 20px; padding: 0 4px; }
.love-note strong { color: var(--rose-deep); font-weight: 600; }
.screen--done .btn--primary { width: 100%; margin-bottom: 14px; }

.confetti-canvas {
  position: fixed; inset: 0; display: block;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 50;
}

/* ---------------------------------------------------------------- Toast */
.toast {
  position: fixed; left: 50%; top: max(18%, calc(env(safe-area-inset-top) + 60px));
  transform: translate(-50%, -10px); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.98rem; box-shadow: var(--sh-lg);
  opacity: 0; transition: opacity 0.35s, transform 0.35s; pointer-events: none;
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.12s !important; }
  .bg-blob, .envelope { animation: none !important; }
}
