@font-face {
  font-family: "Henny Penny";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/henny-penny-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/patrick-hand-latin.woff2") format("woff2");
}

:root {
  --night: #110e27;
  --plum: #33215a;
  --violet: #6a4aa0;
  --lilac: #c9b6f2;
  --hair: #3f86d1;
  --hair-dark: #245a96;
  --rain: #f6c945;
  --rain-dark: #cf9a1c;
  --pink: #f29bb7;
  --rose: #e0607e;
  --thread: #ff8fb1;
  --paper: #f8efdc;
  --paper-2: #efe0c0;
  --ink: #2b1c3d;
  --ink-soft: #6a5781;
  --glow: #c9f59a;
  --radius: 24px;
  --font-display: "Henny Penny", "Comic Sans MS", cursive;
  --font-body: "Patrick Hand", "Comic Sans MS", system-ui, sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .28 0 0 0 0 .16 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --wallpaper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Crect width='72' height='72' fill='%233a2757'/%3E%3Crect width='14' height='72' fill='%23412c62'/%3E%3Crect x='34' width='2' height='72' fill='%234a3470'/%3E%3Cpath d='M48 15 l2 -8 l4.5 4.5 h3 l4.5 -4.5 l2 8 a8.5 7.5 0 1 1 -16 0z' fill='%23503a7a'/%3E%3Ccircle cx='53' cy='16' r='1.3' fill='%23c9f59a' opacity='.55'/%3E%3Ccircle cx='59' cy='16' r='1.3' fill='%23c9f59a' opacity='.55'/%3E%3Cg fill='%235c4588'%3E%3Ccircle cx='56' cy='46.5' r='2.2'/%3E%3Ccircle cx='56' cy='57.5' r='2.2'/%3E%3Ccircle cx='50.5' cy='52' r='2.2'/%3E%3Ccircle cx='61.5' cy='52' r='2.2'/%3E%3C/g%3E%3Ccircle cx='56' cy='52' r='1.8' fill='%23f6c945' opacity='.55'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.3;
  color: #f4efff;
  background: var(--night);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px dashed var(--rain); outline-offset: 4px; }

/* ---------- lucht ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 85% 5%, rgba(122, 86, 200, .45), transparent 60%),
    radial-gradient(80% 60% at 5% 95%, rgba(52, 110, 190, .35), transparent 65%),
    linear-gradient(180deg, #100d26 0%, #1a1542 50%, #261b52 100%);
  transition: filter 1.2s ease;
}
body.is-sad .sky { filter: saturate(.5) brightness(.72); }

.star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff9dc;
  box-shadow: 0 0 6px #fff3b0;
  animation: twinkle var(--d) ease-in-out var(--dl) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }

.moon {
  position: absolute;
  top: 3.5%;
  right: 4%;
  width: clamp(100px, 22vw, 165px);
  filter: drop-shadow(0 0 24px rgba(255, 238, 170, .5));
  animation: bob 7s ease-in-out infinite;
}
.moon svg { display: block; width: 100%; overflow: visible; }
.moon .z { font-family: var(--font-display); fill: #fff6cf; animation: zz 3.6s ease-in infinite; opacity: 0; }
.moon .z:nth-of-type(2) { animation-delay: 1.2s; }
.moon .z:nth-of-type(3) { animation-delay: 2.4s; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 0); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(-14px, -26px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eaffa8;
  box-shadow: 0 0 10px 3px rgba(200, 255, 140, .65);
  animation: drift var(--d) ease-in-out infinite alternate, glow 2.6s ease-in-out var(--dl) infinite;
}
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@keyframes glow { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.rain { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
body.is-sad .rain { opacity: 1; }
.rain i {
  position: absolute;
  top: -20vh;
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(transparent, rgba(170, 210, 255, .6));
  animation: fall var(--d) linear var(--dl) infinite;
}
@keyframes fall { to { transform: translateY(130vh); } }

.garden { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 96px; }
.bloom {
  position: absolute;
  bottom: var(--b);
  left: var(--x);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--c) 40%, transparent 72%);
  box-shadow: 0 0 14px 4px color-mix(in srgb, var(--c) 55%, transparent);
  animation: glow 3.2s ease-in-out var(--dl) infinite;
}
.kitty-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 3vw;
}
.kitty-row .kitty { width: var(--w, 58px); pointer-events: auto; cursor: pointer; }
@media (max-width: 560px) {
  .kitty-row .kitty:nth-child(n+5) { display: none; }
  .kitty-row .kitty { width: calc(var(--w, 58px) * .82); }
}

/* ---------- libelle ---------- */
.dragonfly {
  position: fixed;
  z-index: 30;
  top: 22%;
  left: 0;
  width: 54px;
  pointer-events: none;
  animation: fly 26s linear 4s infinite;
  opacity: 0;
}
.dragonfly svg { display: block; width: 100%; transform: rotate(90deg); }
.dragonfly .wings { fill: rgba(190, 228, 255, .55); stroke: #9fd6ff; stroke-width: .8; transform-origin: 40px 26px; animation: flap .09s linear infinite alternate; }
@keyframes flap { to { transform: scaleX(.7); } }
@keyframes fly {
  0% { opacity: 1; transform: translate(-80px, 0); }
  10% { transform: translate(20vw, -6vh); }
  20% { transform: translate(40vw, 4vh); }
  30% { transform: translate(60vw, -4vh); }
  40% { opacity: 1; transform: translate(105vw, 2vh); }
  41%, 100% { opacity: 0; transform: translate(110vw, 0); }
}

/* ---------- algemene opbouw ---------- */
main { position: relative; z-index: 2; }
.scene {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 760px;
  margin: 0 auto;
  padding: 84px 16px 170px;
  text-align: center;
  pointer-events: none;
}
.scene > * { pointer-events: auto; }
.scene.is-active { display: flex; animation: sceneIn .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes sceneIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.title, .title-sm, .note-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fdf3c4;
  margin: 0;
  line-height: 1.05;
  text-shadow: 0 0 22px rgba(201, 182, 242, .55), 0 3px 0 #2a1d52;
}
.title { font-size: clamp(2.4rem, 10vw, 4.4rem); }
.title-sm { font-size: clamp(1.9rem, 7.5vw, 3rem); }
.title:focus, .title-sm:focus { outline: none; }
.wavy .ch { display: inline-block; animation: wave 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
@keyframes wave { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
.eyebrow { margin: 0; color: var(--lilac); font-size: 1.15rem; letter-spacing: .02em; }
.lead { margin: 0; font-size: 1.3rem; color: #e9e1ff; max-width: 32ch; }
.tiny { margin: 0; font-size: 1rem; color: var(--lilac); opacity: .85; }

/* ---------- kaarten & knopen ---------- */
.card {
  position: relative;
  width: 100%;
  background: var(--noise), linear-gradient(170deg, var(--paper), var(--paper-2));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .5) inset, 0 -3px 0 rgba(120, 90, 50, .18) inset, 0 18px 40px rgba(5, 3, 20, .5);
}
.stitched::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2.5px dashed var(--rose);
  border-radius: calc(var(--radius) - 8px);
  opacity: .6;
  pointer-events: none;
}

.sew-btn {
  --c: var(--rain);
  position: absolute;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 56%, rgba(0, 0, 0, .2) 58%, transparent 64%),
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, white), var(--c) 62%);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28), 0 6px 10px rgba(0, 0, 0, .2);
}
.sew-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 39% 39%, #2b1c3d 0 1.7px, transparent 2.2px),
    radial-gradient(circle at 61% 39%, #2b1c3d 0 1.7px, transparent 2.2px),
    radial-gradient(circle at 39% 61%, #2b1c3d 0 1.7px, transparent 2.2px),
    radial-gradient(circle at 61% 61%, #2b1c3d 0 1.7px, transparent 2.2px);
}
.sew-btn::after {
  content: "";
  position: absolute;
  inset: 37%;
  background:
    linear-gradient(45deg, transparent 42%, var(--thread) 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, var(--thread) 42% 58%, transparent 58%);
}

.btn {
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
  transition: transform .15s ease, box-shadow .15s ease, filter .2s;
  touch-action: manipulation;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  border: 2px dashed currentColor;
  opacity: .28;
  pointer-events: none;
}
.btn:active { transform: translateY(3px); }
.btn-yellow { background: linear-gradient(180deg, #ffd968, var(--rain)); color: var(--ink); box-shadow: 0 5px 0 var(--rain-dark), 0 12px 22px rgba(0, 0, 0, .35); }
.btn-yellow:active { box-shadow: 0 2px 0 var(--rain-dark), 0 6px 12px rgba(0, 0, 0, .3); }
.btn-yellow:disabled { cursor: default; }
.btn-yellow.sent { background: linear-gradient(180deg, #ffc4d6, var(--pink)); box-shadow: 0 5px 0 #c9607e, 0 12px 22px rgba(0, 0, 0, .35); }
.btn-blue { background: linear-gradient(180deg, #5aa0e8, var(--hair)); color: #fff; box-shadow: 0 5px 0 var(--hair-dark), 0 12px 22px rgba(0, 0, 0, .35); }
.btn-ghost { background: rgba(44, 33, 88, .82); color: #f4efff; box-shadow: inset 0 0 0 2px rgba(201, 182, 242, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-big { font-size: 1.55rem; padding: 16px 34px; }
.btn-round { width: 52px; height: 52px; padding: 0; flex: none; }
.link { border: 0; background: none; color: var(--lilac); text-decoration: underline dotted; font-size: 1.05rem; padding: 8px; }
.nav-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-col { display: flex; flex-direction: column; gap: 14px; align-items: stretch; width: min(100%, 360px); }

.shake { animation: shake .45s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-1deg); } 40% { transform: translateX(7px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* ---------- voortgang (knoopjes aan een draadje) ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 12px 16px 8px;
  background: rgba(19, 15, 44, .9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.progress::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; border-bottom: 2px dashed rgba(255, 143, 177, .35); }
.progress ol { position: relative; display: flex; justify-content: space-between; max-width: 420px; margin: 0 auto; padding: 0; list-style: none; }
.progress ol::before { content: ""; position: absolute; left: 22px; right: 22px; top: 13px; border-top: 2.5px dashed var(--thread); opacity: .55; }
.progress li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; }
.progress .sew { position: relative; display: block; width: 28px; height: 28px; border-radius: 50%; background: #3a2c5e; box-shadow: inset 0 0 0 2px rgba(201, 182, 242, .5); transition: background .3s, transform .3s; }
.progress small { font-size: .9rem; color: var(--lilac); }
.progress li.done .sew { background: radial-gradient(circle at 35% 30%, #ffc4d6, var(--rose) 65%); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.progress li.done .sew::after { content: "♥"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: #fff; }
.progress li.now .sew { background: radial-gradient(circle at 35% 30%, #fff1b0, var(--rain) 65%); transform: scale(1.15); box-shadow: 0 0 0 4px rgba(246, 201, 69, .25); }
.progress li.now small { color: #fff; }

/* ---------- 0. het deurtje ---------- */
.scene-door {
  position: fixed;
  inset: 0;
  z-index: 20;
  max-width: none;
  min-height: 0;
  padding: 0;
  justify-content: flex-end;
  overflow: hidden;
  pointer-events: auto;
  background: var(--wallpaper) #3a2757;
  background-size: 76px 76px;
}
.scene-door.is-active { animation: none; }
.scene-door::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 70%, transparent 30%, rgba(10, 5, 25, .78) 95%);
}
.wainscot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12vh;
  height: 24vh;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, .18) 18px 20px, transparent 20px 120px),
    linear-gradient(#33244b, #271b3b);
  border-top: 10px solid #5a4380;
  box-shadow: 0 -4px 0 #2a1d40, inset 0 6px 8px rgba(0, 0, 0, .3);
}
.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12vh;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .25) 0 2px, transparent 2px 90px),
    linear-gradient(#4a2c1c, #2a170e);
}
.door-note {
  position: absolute;
  z-index: 3;
  top: max(8vh, 40px);
  left: 50%;
  width: min(86vw, 360px);
  transform: translateX(-50%) rotate(-2deg);
  padding: 26px 20px 18px;
}
.door-note .pin { top: -12px; left: calc(50% - 14px); }
.note-title { font-size: clamp(2rem, 9vw, 2.6rem); color: var(--ink); text-shadow: none; }
.door-note p { margin: 8px 0 0; font-size: 1.3rem; }
.door-note .hint { color: var(--rose); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.03); } }

.door-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: calc(12vh - 4px);
}
.door-cat { width: 78px; margin-bottom: -2px; margin-left: -6px; }
.portrait {
  position: absolute;
  z-index: 2;
  top: calc(50% - 96px);
  left: 50%;
  width: 116px;
  height: 142px;
  margin-left: -58px;
  padding: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ffe9a6, #c9952f 55%, #7a5414);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(90, 60, 10, .5);
  transform: rotate(3deg);
  transform-origin: 50% -30px;
  animation: tilt 6s ease-in-out infinite;
}
.portrait::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34px;
  width: 64px;
  height: 36px;
  margin-left: -32px;
  background: linear-gradient(to top right, transparent 48%, #c9b6f2 49% 51%, transparent 52%) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent 48%, #c9b6f2 49% 51%, transparent 52%) right / 50% 100% no-repeat;
  opacity: .55;
}
.portrait-in {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 12px 10px 18px;
  background: radial-gradient(circle at 50% 40%, #4d6b55, #22362a 75%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .6);
  cursor: pointer;
}
@keyframes tilt { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-2deg); } }
@media (max-height: 700px) { .portrait { display: none; } }
.door-frame {
  position: relative;
  width: 150px;
  height: 204px;
  border-radius: 75px 75px 4px 4px;
  box-shadow: 0 0 0 9px #2c1a12, 0 0 0 13px #573826, 0 20px 30px rgba(0, 0, 0, .55);
  perspective: 700px;
}
.door-inside {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-radial-gradient(ellipse at 50% 58%, transparent 0 12px, rgba(255, 255, 255, .07) 12px 15px),
    radial-gradient(ellipse at 50% 58%, #fff6d0 0 5%, #c9b3ff 13%, #6d4bc4 30%, #2f2a7a 52%, #120d2b 80%);
  overflow: hidden;
}
.door-frame.open .door-inside { animation: insideGlow 1.2s ease-in-out infinite alternate; }
@keyframes insideGlow { to { filter: brightness(1.35) hue-rotate(-12deg); } }
.door {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  border-radius: inherit;
  background:
    var(--noise),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 3px, transparent 3px 11px),
    linear-gradient(90deg, #7d4f33, #9a6644 45%, #7a4b30);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25), inset 0 0 22px rgba(0, 0, 0, .35);
  transform-origin: 0 50%;
  transition: transform 1s cubic-bezier(.6, .05, .3, 1), filter 1s;
}
.door-frame.open .door { transform: rotateY(-108deg); filter: brightness(.6); }
.panel {
  position: absolute;
  left: 17%;
  right: 17%;
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .2), inset 4px 4px 7px rgba(0, 0, 0, .3), inset -2px -2px 3px rgba(255, 255, 255, .1);
}
.panel.p1 { top: 13%; height: 34%; border-radius: 50px 50px 8px 8px; }
.panel.p2 { top: 55%; height: 33%; }
.knob { position: absolute; right: 13%; top: 46%; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a6, #b8862c 70%); box-shadow: 0 2px 2px rgba(0, 0, 0, .4); }
.keyhole {
  position: absolute;
  right: 12%;
  top: 56%;
  width: 17px;
  height: 28px;
  border-radius: 9px;
  background: radial-gradient(circle at 35% 25%, #ffe9a6, #b8862c 75%);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .4);
}
.keyhole::before { content: ""; position: absolute; left: 5.5px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #1a0f08; }
.keyhole::after { content: ""; position: absolute; left: 7px; top: 10px; width: 3px; height: 11px; background: #1a0f08; border-radius: 1px; }
.key-wrap { position: relative; align-self: flex-start; margin-top: -26px; display: flex; flex-direction: column; align-items: center; }
.nail { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8e3f5, #6f6890); box-shadow: 0 2px 2px rgba(0, 0, 0, .5); margin-bottom: -6px; position: relative; z-index: 1; }
.key { border: 0; background: none; padding: 0; width: 52px; transform-origin: 50% 0; animation: swing 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .45)); }
.key svg { display: block; width: 100%; }
@keyframes swing { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-7deg); } }
.key.used { animation: none; }

/* tunnel */
.tunnel {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #fff7d6 0 3%, #c3adff 9%, #5b3cb0 26%, #231a5c 52%, #0a0818 100%);
}
.tunnel.run { animation: tunnelFade 2s ease forwards; }
.tunnel i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70vmax;
  height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  border-radius: 50%;
  border: 3.2vmax solid;
  border-color: #6a48c4 #3f86d1 #8b5fd6 #2c5aa0;
  box-shadow: 0 0 40px rgba(201, 182, 242, .55), inset 0 0 40px rgba(201, 182, 242, .45);
  opacity: 0;
  transform: scale(.02);
}
.tunnel.run i { animation: ring 1.5s cubic-bezier(.55, 0, .9, .55) calc(var(--i) * 110ms) forwards; }
@keyframes ring { 0% { opacity: 0; transform: scale(.02) rotate(0); } 25% { opacity: 1; } 100% { opacity: 1; transform: scale(2.6) rotate(70deg); } }
@keyframes tunnelFade { 0% { opacity: 0; } 15%, 72% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 1. de vraag ---------- */
.scene-ask { justify-content: center; padding-top: 70px; }
.ask-cat-wrap { position: relative; width: min(64vw, 270px); margin: 4px 0 6px; }
.ask-cat { position: relative; width: 100%; }
.hearts-up { position: absolute; inset: -20% -20% 30%; pointer-events: none; }
.hearts-up span { position: absolute; bottom: 0; color: var(--pink); font-size: var(--s); opacity: 0; animation: rise var(--d) ease-in var(--dl) infinite; text-shadow: 0 0 10px rgba(242, 155, 183, .6); }
@keyframes rise { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -190px) scale(1.15) rotate(18deg); } }

/* ---------- katjes ---------- */
.kitty svg { display: block; width: 100%; height: auto; overflow: visible; }
.kitty .tail { transform-box: fill-box; transform-origin: 0% 100%; animation: tail 2.8s ease-in-out infinite; }
.kitty .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; animation-delay: var(--blink, 0s); }
.kitty .look { transition: transform .12s linear; }
@keyframes tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
.kitty.jump { animation: jump .55s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes jump { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-22px) scale(1.06, .95); } }
.kitty .tear { animation: tear 1.8s ease-in infinite; }
@keyframes tear { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.kitty .zzz { font-family: var(--font-display); fill: var(--ink-soft); animation: zz 3s ease-in infinite; opacity: 0; }
.kitty .zzz:nth-of-type(2) { animation-delay: 1.5s; }
.meow {
  position: fixed;
  z-index: 70;
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  transform: translate(-50%, -100%);
  animation: meow 1.4s ease forwards;
}
@keyframes meow { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -130%); } }

/* ---------- 2. kalender ---------- */
.cal-card { max-width: 430px; margin-top: 46px; padding: 22px 16px 18px; }
.peek { position: absolute; width: 92px; left: 26px; top: -66px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 4px 10px; }
.cal-month { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--plum); color: #fff; font-size: 1.7rem; line-height: 1; box-shadow: 0 3px 0 #1c1235; }
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span { font-size: 1rem; color: var(--ink-soft); padding-bottom: 4px; }
.cal-day {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.2rem;
  transition: background .2s, transform .2s;
}
.cal-day.weekend { color: var(--rose); }
.cal-day:disabled { color: rgba(43, 28, 61, .25); cursor: default; text-decoration: line-through; text-decoration-color: rgba(43, 28, 61, .2); }
.cal-day.today::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 2px dashed var(--violet); opacity: .6; }
.cal-day.selected {
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #ffb3c9, var(--rose) 62%);
  box-shadow: 0 3px 0 #a73b58, 0 0 0 3px rgba(224, 96, 126, .25);
  animation: popDay .45s cubic-bezier(.3, 1.8, .6, 1);
}
.cal-day.selected::before { content: "♥"; position: absolute; top: -7px; right: -3px; font-size: .9rem; color: var(--rose); text-shadow: 0 0 0 #fff; animation: bob 1.6s ease-in-out infinite; }
@keyframes popDay { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

.time-card { max-width: 430px; padding: 18px 16px; }
.time-card .label { margin: 0 0 10px; font-size: 1.3rem; }
.loaf { position: absolute; width: 96px; right: 14px; top: -46px; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chip {
  border: 0;
  border-radius: 16px;
  padding: 11px 8px;
  background: rgba(106, 74, 160, .12);
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: inset 0 0 0 2px rgba(106, 74, 160, .25);
  transition: transform .15s, background .2s;
}
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #ffd968, var(--rain)); box-shadow: 0 3px 0 var(--rain-dark); }
.picked { margin: 0; font-size: 1.35rem; color: #fff6cf; min-height: 1.6em; }

/* ---------- 3. plannen ---------- */
.plans-grid { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 4px; }
.plan {
  position: relative;
  width: calc((100% - 14px) / 2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 20px;
  padding: 16px 12px 14px;
  background: var(--noise), linear-gradient(170deg, var(--paper), var(--paper-2));
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(5, 3, 20, .4);
  transition: transform .25s cubic-bezier(.3, 1.5, .6, 1), box-shadow .25s, opacity .25s;
}
.plan::before { content: ""; position: absolute; inset: 6px; border-radius: 15px; border: 2px dashed rgba(106, 74, 160, .3); pointer-events: none; transition: border-color .2s; }
.plan .emo { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 1.9rem; background: radial-gradient(circle at 35% 30%, #fff, #e9dcff); box-shadow: inset 0 -3px 0 rgba(106, 74, 160, .2); }
.plan .t { font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.plan .d { font-size: 1rem; color: var(--ink-soft); line-height: 1.15; }
.plan .num { display: none; top: -10px; right: -8px; width: 34px; height: 34px; --c: var(--rose); }
.plan .num b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: #fff; font-size: 1.2rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.plan .num::before, .plan .num::after { opacity: .35; }
.plan[aria-pressed="true"] { background: var(--noise), linear-gradient(170deg, #fff1f5, #ffd9e4); transform: rotate(-1.5deg) scale(1.03); box-shadow: 0 0 0 3px var(--rose), 0 14px 26px rgba(224, 96, 126, .35); }
.plan[aria-pressed="true"]::before { border-color: var(--rose); }
.plan[aria-pressed="true"] .num { display: block; animation: popDay .4s cubic-bezier(.3, 1.8, .6, 1); }
.plans-grid.full .plan[aria-pressed="false"] { opacity: .55; }
.dock {
  position: sticky;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
  margin-top: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(24, 18, 54, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(201, 182, 242, .25);
}
.dock .btn-yellow { flex: 1; padding: 13px 14px; }
.slots { display: flex; gap: 6px; }
.slot { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px dashed rgba(201, 182, 242, .5); font-size: 1.3rem; }
.slot.filled { border: 0; background: radial-gradient(circle at 35% 30%, #fff, #e9dcff); animation: popDay .4s cubic-bezier(.3, 1.8, .6, 1); }

/* ---------- 4. blijf je slapen? ---------- */
.scene-stay { justify-content: center; }
.stay-stage { display: flex; align-items: flex-end; justify-content: center; gap: 6px; width: 100%; }
.sad-cat { width: clamp(58px, 16vw, 96px); flex: none; }
.sticker-wrap { position: relative; width: clamp(170px, 50vw, 250px); flex: none; }
.sticker { position: relative; display: block; width: 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); animation: sob 1.3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sob { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.02, .97) rotate(-1deg); } 60% { transform: scale(.99, 1.02) rotate(1deg); } }
.sticker.wail { animation: wail .5s ease-in-out 2; }
@keyframes wail { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.05); } 75% { transform: rotate(6deg) scale(1.05); } }
.puddle {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 80%;
  height: 26px;
  margin-left: -40%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(185, 225, 255, .85), rgba(120, 180, 240, .5) 60%, transparent 72%);
  transform: scale(var(--p, .6));
  transition: transform .6s cubic-bezier(.3, 1.5, .6, 1);
}
.drop {
  position: absolute;
  width: 9px;
  height: 13px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(#e6f6ff, #7ec3f2);
  box-shadow: 0 0 6px rgba(160, 215, 255, .8);
  pointer-events: none;
}
.stay-line { min-height: 2.6em; max-width: 36ch; }
.stay-btns { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; min-height: 80px; }
.btn-yes { transform: scale(var(--grow, 1)); transition: transform .35s cubic-bezier(.3, 1.6, .6, 1); }
.btn-yes:active { transform: scale(var(--grow, 1)) translateY(3px); }
.btn-no { font-size: 1.1rem; padding: 10px 20px; }
.btn-no.dodging { position: fixed; z-index: 40; transition: left .28s cubic-bezier(.3, 1.4, .6, 1), top .28s cubic-bezier(.3, 1.4, .6, 1); }
.btn-no.poof { animation: poof .5s forwards; pointer-events: none; }
@keyframes poof { to { opacity: 0; transform: scale(1.8) rotate(25deg); filter: blur(4px); } }

/* ---------- 5. yay ---------- */
.scene-yay { padding-top: 76px; }
.yay-cats { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-bottom: -30px; position: relative; z-index: 1; }
.yay-cats .kitty { width: clamp(70px, 20vw, 100px); }
.yay-cats .kitty:nth-child(2) { width: clamp(84px, 24vw, 120px); }
.kitty.hop { animation: hop 1.1s ease-in-out infinite; }
.kitty.hop:nth-child(2) { animation-delay: .18s; }
.kitty.hop:nth-child(3) { animation-delay: .36s; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px) rotate(-4deg); } 60% { transform: translateY(-14px) rotate(3deg); } }
.ticket { max-width: 430px; padding: 34px 22px 22px; text-align: left; }
.ticket h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; text-align: center; color: var(--rose); }
.ticket .row { display: flex; gap: 12px; align-items: baseline; padding: 10px 2px; border-bottom: 2px dashed rgba(106, 74, 160, .2); font-size: 1.25rem; }
.ticket .row:last-of-type { border-bottom: 0; }
.ticket .ico { flex: none; width: 30px; text-align: center; }
.ticket ol { margin: 2px 0 0; padding-left: 1.4em; }
.ticket .sig { margin: 14px 0 0; text-align: right; font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- effecten ---------- */
.fx { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.paw { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; color: var(--pink); filter: drop-shadow(0 0 6px rgba(242, 155, 183, .7)); animation: paw 1.3s ease-out forwards; }
.paw svg { display: block; width: 100%; height: 100%; }
@keyframes paw { 0% { opacity: 0; transform: rotate(var(--r)) scale(.4); } 15% { opacity: .95; transform: rotate(var(--r)) scale(1); } 100% { opacity: 0; transform: rotate(var(--r)) scale(.9); } }
.confetto { position: absolute; top: -60px; display: block; will-change: transform; }
.confetto svg { display: block; width: 100%; }
.burst { position: absolute; font-size: 1.6rem; color: var(--rose); pointer-events: none; }

.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.15rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
  transform: translate(-50%, -30px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.5, .6, 1), opacity .3s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.music-btn {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 1.3rem;
  background: radial-gradient(circle at 35% 30%, #fff1b0, var(--rain) 65%);
  box-shadow: 0 4px 0 var(--rain-dark), 0 8px 16px rgba(0, 0, 0, .35);
  transition: bottom .3s ease, background .3s;
}
.music-btn::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px dashed rgba(43, 28, 61, .3); }
.music-btn:not(.off) span { animation: bob 1.4s ease-in-out infinite; }
.music-btn.off { background: radial-gradient(circle at 35% 30%, #ece6fa, #9d8fc0 65%); box-shadow: 0 4px 0 #6f6290, 0 8px 16px rgba(0, 0, 0, .35); }
.music-btn.off span { opacity: .55; }
body[data-scene="plans"] .music-btn { bottom: 92px; }

@media (hover: hover) {
  .btn-yellow:hover { filter: brightness(1.05) saturate(1.1); }
  .btn-ghost:hover { background: rgba(60, 46, 115, .9); }
  .cal-day:not(:disabled):not(.selected):hover { background: rgba(106, 74, 160, .14); transform: rotate(-6deg) scale(1.08); }
  .chip:hover { transform: translateY(-2px); }
  .plan[aria-pressed="false"]:hover { transform: translateY(-3px) rotate(-1deg); }
}

@media (max-width: 560px) {
  .moon { width: 88px; top: 10px; right: 10px; transition: opacity .6s; }
  body:not([data-scene="ask"]) .moon { opacity: 0; }
}

@media (min-width: 700px) {
  .scene { padding-top: 96px; }
  .plan { width: calc((100% - 3 * 14px) / 4); }
  .door-frame { width: 170px; height: 232px; border-radius: 85px 85px 4px 4px; }
  .door-cat { width: 96px; }
}
@media (max-height: 640px) {
  .door-note { top: 16px; }
  .wainscot { height: 18vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .dragonfly, .rain { display: none; }
}
