/* ==========================================================================
   6 jaar — Kyara & Oisín
   ========================================================================== */
:root {
  --ink: #0e0b14;
  --night: #171221;
  --plum: #2a1d33;
  --cream: #f7efe3;
  --muted: rgba(247, 239, 227, .64);
  --faint: rgba(247, 239, 227, .14);
  --rose: #eaa8a2;
  --rose-deep: #b85f5c;
  --gold: #e8c27c;
  --sea: #3d7ea0;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;

  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: #000;
  color: var(--cream);
  font-family: var(--sans);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
body { position: fixed; inset: 0; }
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Scenes ---------- */
.scene {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--st) + 16px) calc(var(--sr) + 24px) calc(var(--sb) + 16px) calc(var(--sl) + 24px);
  background: var(--ink);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--ease), visibility 0s linear .9s;
}
.scene.active { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }

/* ---------- Type ---------- */
.eyebrow {
  font: 600 11px/1.2 var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, min(6.4vw, 12vh), 76px);
  line-height: .98;
  letter-spacing: -.01em;
  margin: 12px 0 14px;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--rose); }
.lead, .hint { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 34ch; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font: 700 15px/1 var(--sans);
  letter-spacing: .03em;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 14px 34px -14px rgba(234, 168, 162, .75);
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .3s, opacity .3s;
}
.btn:active { transform: scale(.95); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn-ghost {
  background: rgba(247, 239, 227, .06);
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(247, 239, 227, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-wide { width: 100%; }

/* ---------- Ambient glows ---------- */
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.glow-a { width: 60vmax; height: 60vmax; left: -22vmax; top: -30vmax; background: radial-gradient(circle, #7b3b55, transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.glow-b { width: 55vmax; height: 55vmax; right: -22vmax; bottom: -30vmax; background: radial-gradient(circle, #24506b, transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

/* ---------- Install ---------- */
.install {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px 48px;
  align-items: center;
  width: min(860px, 100%);
}
.app-icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); margin-bottom: 18px; display: block; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin-bottom: 16px; }
.steps li {
  counter-increment: s;
  display: flex; gap: 14px; align-items: center;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(247, 239, 227, .05);
  box-shadow: inset 0 0 0 1px rgba(247, 239, 227, .09);
  font-size: 15px; line-height: 1.4;
}
.steps li::before {
  content: counter(s);
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rose); color: var(--ink);
  font-weight: 700; font-size: 13px;
}
.steps b { font-weight: 700; color: #fff; }
.steps svg { vertical-align: -4px; color: var(--rose); }
@media (orientation: portrait) {
  .install { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .install-head { display: flex; flex-direction: column; align-items: center; }
  .install-body { width: 100%; max-width: 420px; text-align: left; }
  .lead { margin: 0 auto; }
}

/* ---------- Lock ---------- */
.lock {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px 56px;
  align-items: center;
  width: min(880px, 100%);
}
.lock-form { display: grid; gap: 12px; }
.kb-title { display: none; }
.field { position: relative; }
.field input {
  width: 100%;
  font: 500 18px/1 var(--sans);
  color: var(--cream);
  background: rgba(247, 239, 227, .06);
  border: 1px solid rgba(247, 239, 227, .16);
  border-radius: 16px;
  padding: 16px 54px 16px 18px;
  min-height: 56px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: rgba(247, 239, 227, .38); }
.field input:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(234, 168, 162, .18); background: rgba(247, 239, 227, .09); }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.eye.on { color: var(--rose); }
.lock-error { min-height: 20px; font-size: 14px; color: var(--rose); text-align: center; }
.lock-form.shake { animation: shake .5s; }
.lock.success .lock-form { animation: unlocked .7s var(--ease) forwards; }
@keyframes unlocked { to { opacity: 0; transform: scale(.96); filter: blur(6px); } }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); }
}
/* Toetsenbord open op een liggende telefoon: compacte weergave bovenaan */
body.kb #scene-lock { align-items: flex-start; padding-top: calc(var(--st) + 12px); }
body.kb .lock { grid-template-columns: 1fr; width: min(460px, 100%); }
body.kb .lock-left { display: none; }
body.kb .kb-title { display: block; font: 600 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); text-align: center; }
body.kb .lock-form { grid-template-columns: 1fr auto; gap: 8px; }
body.kb .kb-title, body.kb .lock-error { grid-column: 1 / -1; }
body.kb .btn-wide { width: auto; }
@media (orientation: portrait) and (max-width: 700px) {
  .lock { grid-template-columns: 1fr; text-align: center; }
  .hint { margin: 0 auto; }
}

/* ---------- Start ---------- */
#scene-start { background: radial-gradient(120% 100% at 30% 110%, #3c2234 0%, var(--ink) 62%); }
.bokeh i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 168, 162, .55), transparent 70%);
  filter: blur(2px);
  animation: float 16s ease-in-out infinite;
  pointer-events: none;
}
.bokeh i:nth-child(1) { width: 18vh; height: 18vh; left: 8%; top: 12%; animation-duration: 19s; }
.bokeh i:nth-child(2) { width: 9vh; height: 9vh; left: 62%; top: 18%; animation-delay: -4s; background: radial-gradient(circle, rgba(232, 194, 124, .5), transparent 70%); }
.bokeh i:nth-child(3) { width: 26vh; height: 26vh; left: 78%; top: 58%; animation-duration: 23s; animation-delay: -9s; }
.bokeh i:nth-child(4) { width: 6vh; height: 6vh; left: 38%; top: 78%; animation-delay: -2s; background: radial-gradient(circle, rgba(232, 194, 124, .6), transparent 70%); }
.bokeh i:nth-child(5) { width: 12vh; height: 12vh; left: 88%; top: 8%; animation-duration: 21s; animation-delay: -12s; background: radial-gradient(circle, rgba(61, 126, 160, .55), transparent 70%); }
.bokeh i:nth-child(6) { width: 4vh; height: 4vh; left: 22%; top: 64%; animation-delay: -7s; }
.bokeh i:nth-child(7) { width: 7vh; height: 7vh; left: 52%; top: 4%; animation-duration: 25s; animation-delay: -15s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0); opacity: .5; }
  50% { transform: translate(3vw, -5vh); opacity: 1; }
}
.start {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
}
.start-six {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(150px, 74vh, 600px);
  line-height: .74;
  letter-spacing: -.04em;
  background: linear-gradient(170deg, #fff8ee 10%, var(--rose) 60%, #9c4b5e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: .04em;
  filter: drop-shadow(0 20px 40px rgba(234, 168, 162, .25));
}
.start-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(54px, 21vh, 150px);
  line-height: .85;
  margin: 6px 0 10px -4px;
}
.start-dates { font-size: 13px; letter-spacing: .14em; color: var(--muted); font-variant-numeric: tabular-nums; }
.start-dates span { color: var(--rose); padding: 0 4px; }
.start-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: clamp(14px, 6vh, 32px); }
.btn-play { padding: 0 32px 0 26px; }
.start-note { margin-top: 12px; font-size: 12px; color: var(--muted); min-height: 1em; }
#scene-start.active .start-six { animation: sixIn 1.8s var(--ease) both; }
#scene-start.active .start-copy > * { animation: fadeUp 1s var(--ease) both; }
#scene-start.active .start-copy > :nth-child(1) { animation-delay: .5s; }
#scene-start.active .start-copy > :nth-child(2) { animation-delay: .65s; }
#scene-start.active .start-copy > :nth-child(3) { animation-delay: .8s; }
#scene-start.active .start-copy > :nth-child(4) { animation-delay: 1s; }
#scene-start.active .start-copy > :nth-child(5) { animation-delay: 1.1s; }
@keyframes sixIn { from { opacity: 0; transform: translateY(4vh) scale(.94); filter: blur(10px) drop-shadow(0 0 0 transparent); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Player (brief + tijdlijn) ---------- */
.player { cursor: pointer; }
.player.is-paused * { animation-play-state: paused !important; }
.pause-ind {
  position: absolute; left: 50%; top: 50%; z-index: 20;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(14, 11, 20, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; transform: scale(.8);
  transition: opacity .25s, transform .25s var(--spring);
  pointer-events: none;
}
.pause-ind i { width: 6px; height: 24px; border-radius: 3px; background: var(--cream); }
.player.is-paused .pause-ind { opacity: 1; transform: none; }

.player-progress {
  position: absolute;
  left: calc(var(--sl) + 6vw); right: calc(var(--sr) + 6vw);
  bottom: calc(var(--sb) + 14px);
  height: 2px; border-radius: 2px;
  background: var(--faint); overflow: hidden;
}
.player-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); }
.tap-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--sb) + 26px);
  text-align: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(247, 239, 227, .4);
  transition: opacity 1s;
  pointer-events: none;
}
.tap-hint.gone { opacity: 0; }

/* ---------- Brief ---------- */
#scene-letter { background: radial-gradient(ellipse at 50% 42%, #1f1729 0%, #0b0910 72%); }
.letter-stage { position: absolute; inset: 0; }
.beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .22em;
  padding: calc(var(--st) + 24px) calc(var(--sr) + 7vw) calc(var(--sb) + 48px) calc(var(--sl) + 7vw);
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, min(4.2vw, 8.6vh), 58px);
  line-height: 1.16;
  pointer-events: none;
}
.beat .line { opacity: 0; animation: lineIn 1.1s var(--ease) var(--d, 0ms) forwards; text-wrap: balance; max-width: 26em; }
.beat em { font-style: italic; color: var(--rose); }
.beat.size-xl { font-size: clamp(36px, min(7.4vw, 15vh), 110px); font-style: italic; font-weight: 400; }
.beat.style-end .line {
  font: 600 clamp(12px, 2.6vh, 16px)/1 var(--sans);
  letter-spacing: .55em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 22px;
  padding-left: .55em;
}
.beat.style-end .line::before, .beat.style-end .line::after { content: ""; width: 8vw; height: 1px; background: currentColor; opacity: .5; }
.beat.out { animation: beatOut .7s var(--ease) forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes beatOut { to { opacity: 0; transform: translateY(-12px); filter: blur(6px); } }

/* WhatsApp-moment */
.chat {
  width: min(460px, 72vw);
  display: flex; flex-direction: column; gap: 12px;
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(15px, 3.8vh, 22px);
  text-align: left;
}
.chat-date {
  align-self: center;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  background: rgba(247, 239, 227, .07);
  padding: 7px 13px; border-radius: 999px;
  opacity: 0; animation: pop .5s var(--ease) .1s forwards;
}
.bubble {
  max-width: 82%;
  padding: .55em .85em .5em;
  border-radius: 20px;
  line-height: 1.3;
  opacity: 0;
  animation: pop .6s var(--spring) var(--d, 0ms) forwards;
}
.bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #eeb2ab, #d98984);
  color: #2a1218;
  border-bottom-right-radius: 6px;
  transform-origin: bottom right;
}
.bubble .meta { font-size: .62em; opacity: .55; margin-left: 10px; white-space: nowrap; }
.her-slot { position: relative; min-height: 3.6em; }
.typing {
  position: absolute; left: 0; top: 0;
  display: flex; gap: 5px;
  padding: 15px 17px;
  border-radius: 20px; border-bottom-left-radius: 6px;
  background: rgba(247, 239, 227, .12);
  opacity: 0;
  animation: typing 2.1s var(--ease) var(--d, 0ms) forwards;
}
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.bubble.her {
  position: absolute; left: 0; top: 0;
  background: var(--cream); color: var(--ink);
  border-bottom-left-radius: 6px;
  transform-origin: bottom left;
}
.bubble.big { font-family: var(--serif); font-weight: 600; font-size: 2.3em; padding: .12em .5em .02em; letter-spacing: .06em; line-height: 1.1; }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0% { opacity: 0; transform: scale(.7); } 12% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
@keyframes dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Tijdlijn ---------- */
#scene-timeline { padding: 0; background: #0b0910; }
.tl-bg { position: absolute; inset: -60px; }
.tl-bg .layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.tl-bg .layer.photo { filter: blur(30px) saturate(1.25) brightness(.42); transform: scale(1.1); }
.tl-bg .layer.in { opacity: 1; }
.tl-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, .6) 100%); }

.tl-stage { position: absolute; inset: 0; }
.tl-card {
  position: absolute; inset: 0;
  padding: calc(var(--st) + 50px) calc(var(--sr) + 6vw) calc(var(--sb) + 20px) calc(var(--sl) + 6vw);
}
.tl-card.out { animation: cardOut .8s var(--ease) forwards; }
@keyframes cardOut { to { opacity: 0; transform: scale(.98); filter: blur(4px); } }

/* jaar-hoofdstuk */
.year-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.year-num {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(130px, 56vh, 460px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(247, 239, 227, .28);
  letter-spacing: -.02em;
  animation: yearIn 3.6s var(--ease) both;
  pointer-events: none;
}
.year-card .eyebrow, .year-title, .year-sub { position: relative; }
.year-card .eyebrow { animation: fadeUp 1s var(--ease) .3s both; }
.year-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(40px, 15vh, 120px);
  line-height: .95;
  margin: 10px 0 12px;
  animation: lineIn 1.2s var(--ease) .5s both;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.year-sub { color: var(--muted); font-size: clamp(14px, 3.4vh, 19px); animation: fadeUp 1s var(--ease) .9s both; }
@keyframes yearIn { from { opacity: 0; transform: translateY(-50%) scale(1.15); letter-spacing: .12em; } 30% { opacity: 1; } to { opacity: 1; transform: translateY(-50%) scale(1); } }

/* herinnering */
.mem { height: 100%; display: flex; align-items: center; gap: 5vw; }
.mem.flip { flex-direction: row-reverse; }
.mem-photos { flex: 0 1 auto; max-width: 60%; height: 100%; display: flex; align-items: center; justify-content: center; }
.polaroid {
  --ph-h: calc(100vh - 150px - var(--st) - var(--sb));
  --max-w: 46vw;
  --ph-w: min(calc(var(--ph-h) * var(--ar, .8)), var(--max-w));
  flex: none;
  width: calc(var(--ph-w) + 4.4vh);
  background: #fbf7f0;
  padding: 2.2vh 2.2vh 0;
  border-radius: 3px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .75), 0 2px 8px rgba(0, 0, 0, .35);
  transform: rotate(var(--r, 0deg));
  animation: dropIn 1.1s var(--ease) var(--d, 0ms) both;
}
.mem-photos.n2 .polaroid { --ph-h: calc(100vh - 190px - var(--st) - var(--sb)); --max-w: 26vw; }
.mem-photos.n3 .polaroid { --ph-h: calc(100vh - 220px - var(--st) - var(--sb)); --max-w: 19vw; }
.polaroid + .polaroid { margin-left: -9vh; }
.mem-photos.n2 .polaroid:nth-child(2), .mem-photos.n3 .polaroid:nth-child(2) { margin-top: 9vh; }
.mem-photos.n3 .polaroid:nth-child(3) { margin-top: -7vh; }
.ph {
  width: 100%;
  aspect-ratio: var(--ar, .8);
  overflow: hidden;
  background: #e8e0d4;
  position: relative;
}
.ph img, .ph video { width: 100%; height: 100%; object-fit: cover; display: block; animation: kenburns var(--dur, 7s) linear both; }
.ph.empty {
  display: grid; place-items: center;
  background: linear-gradient(150deg, #e9d6cf, #c9b3c4 55%, #9fb6c6);
  color: rgba(42, 29, 51, .55);
  font: 600 clamp(20px, 5vh, 34px)/1 var(--hand);
}
.polaroid figcaption {
  font-family: var(--hand); font-weight: 500;
  color: #3b2e33;
  font-size: clamp(17px, 4.6vh, 30px);
  line-height: 1;
  text-align: center;
  padding: 1.2vh 4px 1.6vh;
  min-height: 6.5vh;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(26px) rotate(calc(var(--r, 0deg) - 7deg)) scale(1.06); } }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

.mem-text { flex: 1 1 0; min-width: 0; max-width: 42ch; }
.mem-text > * { animation: fadeUp 1s var(--ease) both; }
.mem-date { animation-delay: .35s; }
.mem-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, min(5.4vw, 11vh), 76px);
  line-height: 1;
  margin: 1.6vh 0 2vh;
  text-wrap: balance;
  animation-delay: .5s;
}
.mem-caption { font-size: clamp(14px, 3.5vh, 20px); line-height: 1.55; color: var(--muted); text-wrap: pretty; animation-delay: .7s; }

/* tijdlijn-balk */
.tl-bar {
  position: absolute; z-index: 10;
  left: calc(var(--sl) + 6vw); right: calc(var(--sr) + 6vw);
  top: calc(var(--st) + 14px);
  height: 30px;
}
.tl-track { position: absolute; left: 0; right: 0; top: 4px; height: 2px; border-radius: 2px; background: var(--faint); overflow: hidden; }
.tl-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); }
.tl-years button {
  position: absolute; top: -10px;
  transform: translateX(-50%);
  border: 0; background: none;
  padding: 10px 8px 6px;
  font: 600 10px/1 var(--sans);
  letter-spacing: .12em;
  color: rgba(247, 239, 227, .4);
  cursor: pointer;
  transition: color .4s;
}
.tl-years button::before {
  content: ""; display: block;
  width: 8px; height: 8px; border-radius: 50%;
  margin: 0 auto 7px;
  background: #0b0910;
  box-shadow: inset 0 0 0 1.5px rgba(247, 239, 227, .4);
  transition: background .4s, box-shadow .4s, transform .4s var(--spring);
}
.tl-years button.seen { color: var(--muted); }
.tl-years button.seen::before { background: var(--rose); box-shadow: none; }
.tl-years button.current { color: var(--cream); }
.tl-years button.current::before { background: var(--gold); transform: scale(1.4); box-shadow: 0 0 0 4px rgba(232, 194, 124, .2); }

/* ---------- Tussenstuk ---------- */
#scene-interlude { background: radial-gradient(ellipse at 50% 50%, #241a2c 0%, var(--ink) 70%); }
.interlude { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(14px, 5vh, 30px); }
.interlude-lines { display: flex; flex-direction: column; align-items: center; gap: .1em; font-family: var(--serif); font-size: clamp(28px, min(5vw, 10.5vh), 72px); line-height: 1.1; }
.interlude-lines p { animation: lineIn 1.2s var(--ease) both; }
.interlude-lines p:last-child:not(:first-child) { font-style: italic; color: var(--rose); }
.count { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 600; }
#interlude-btn { opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .8s, transform .8s var(--ease); }
#interlude-btn.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Cadeaus ---------- */
#scene-gifts { flex-direction: column; gap: clamp(18px, 6vh, 60px); background: radial-gradient(ellipse at 50% 125%, #452737, var(--ink) 66%); }
.gifts-head { text-align: center; }
.gifts-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 11vh, 72px); line-height: 1; margin: 8px 0 8px; }
.gifts-hint { font-size: 14px; color: var(--muted); min-height: 1.4em; transition: opacity .3s; }
.gifts-row { display: flex; align-items: flex-end; justify-content: center; gap: clamp(28px, 8vw, 110px); padding-bottom: 34px; }

.gift {
  --w: clamp(88px, 33vh, 220px);
  --c1: #f0b9b2; --c2: #c86e6c; --rb: #fbf3e6;
  position: relative;
  width: var(--w); height: calc(var(--w) * 1.08);
  border: 0; background: none; padding: 0;
  cursor: pointer;
  transform-origin: 50% 100%;
}
.gift.c-sea { --c1: #6fb0cf; --c2: #2c5f7f; --rb: #f3dc9e; }
.gift.c-gold { --c1: #f4d89a; --c2: #c99545; --rb: #9c3f55; }
.gift.c-plum { --c1: #9a6ba8; --c2: #4b2c5c; --rb: #eaa8a2; }
.gift-glow {
  position: absolute; left: 50%; top: 45%;
  width: 230%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.3);
  background: radial-gradient(circle, rgba(255, 223, 150, .65), rgba(255, 190, 120, .15) 40%, transparent 65%);
  opacity: 0;
  transition: opacity .6s, transform 1s var(--ease);
  pointer-events: none;
}
.gift-box {
  position: absolute; left: 7%; right: 7%; bottom: 0; height: 66%;
  border-radius: 6px 6px 12px 12px;
  background:
    linear-gradient(90deg, transparent 43%, var(--rb) 43%, var(--rb) 57%, transparent 57%),
    linear-gradient(165deg, var(--c1), var(--c2));
  box-shadow: inset 0 -16px 24px rgba(0, 0, 0, .18), inset 0 10px 14px rgba(0, 0, 0, .12), 0 22px 30px -14px rgba(0, 0, 0, .7);
}
.gift-peek {
  position: absolute; left: 50%; bottom: 52%;
  transform: translate(-50%, 40%) scale(.6);
  font-size: calc(var(--w) * .34);
  line-height: 1;
  opacity: 0;
  transition: transform .8s var(--spring) .2s, opacity .4s .2s;
}
.gift-lid {
  position: absolute; left: 0; right: 0; top: 22%; height: 17%;
  z-index: 2;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 42%, var(--rb) 42%, var(--rb) 58%, transparent 58%),
    linear-gradient(165deg, var(--c1), var(--c2));
  filter: brightness(1.07);
  box-shadow: 0 8px 12px -6px rgba(0, 0, 0, .45);
  transform-origin: 15% 100%;
  transition: transform .9s var(--spring), opacity .9s;
}
.gift-bow { position: absolute; left: 50%; bottom: 100%; width: 0; height: 0; }
.gift-bow::before, .gift-bow::after {
  content: ""; position: absolute; bottom: -3px;
  width: calc(var(--w) * .27); height: calc(var(--w) * .19);
  border: calc(var(--w) * .045) solid var(--rb);
  border-radius: 50%;
}
.gift-bow::before { right: -2px; transform: rotate(-24deg); transform-origin: 100% 100%; }
.gift-bow::after { left: -2px; transform: rotate(24deg); transform-origin: 0 100%; }
.gift-tag {
  position: absolute; z-index: 3; right: -4%; bottom: 40%;
  width: calc(var(--w) * .26); height: calc(var(--w) * .26);
  border-radius: 50%;
  background: var(--cream); color: var(--ink);
  display: grid; place-items: center;
  font: 600 calc(var(--w) * .17)/1 var(--hand);
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .5);
  transform: rotate(12deg);
  transition: transform .5s var(--spring), background .4s;
}
.gift-label {
  position: absolute; left: 50%; top: calc(100% + 12px);
  transform: translateX(-50%);
  white-space: nowrap;
  font: 500 clamp(20px, 5.6vh, 30px)/1 var(--hand);
  color: var(--cream);
}
.gift.next { animation: bob 2.4s ease-in-out infinite; }
.gift.next .gift-glow { opacity: .45; transform: translate(-50%, -50%) scale(.75); }
.gift.locked { filter: saturate(.55) brightness(.62); }
.gift.shake { animation: shakeGift .55s ease-in-out; }
.gift.open .gift-lid { transform: translate(-25%, -190%) rotate(-42deg); opacity: 0; }
.gift.open .gift-glow, .gift.done .gift-glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gift.done .gift-glow { opacity: .35; }
.gift.done .gift-lid { transform: translate(-30%, 150%) rotate(-62deg); opacity: 1; }
.gift.done .gift-peek, .gift.open .gift-peek { opacity: 1; transform: translate(-50%, -18%) scale(1); }
.gift.done .gift-tag { background: var(--gold); transform: rotate(0); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shakeGift {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(calc(var(--s, 1) * -4deg)) scale(1.03); }
  40% { transform: rotate(calc(var(--s, 1) * 5deg)); }
  60% { transform: rotate(calc(var(--s, 1) * -4deg)) scale(1.04); }
  80% { transform: rotate(calc(var(--s, 1) * 3deg)); }
}
.gift.nope { animation: nope .45s; }
@keyframes nope { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: calc(var(--st) + 14px) calc(var(--sr) + 20px) calc(var(--sb) + 14px) calc(var(--sl) + 20px);
  background: rgba(8, 6, 12, .62);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden;
  transition: opacity .45s, visibility 0s .45s;
}
.modal.show { opacity: 1; visibility: visible; transition: opacity .45s; }
.modal-card {
  width: min(720px, 100%);
  max-height: 100%;
  overflow: auto;
  background: linear-gradient(168deg, #fdf8f0, #f1e3d1);
  color: var(--ink);
  border-radius: 24px;
  padding: clamp(18px, 5vh, 40px) clamp(20px, 4vw, 44px);
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .8);
  transform: translateY(40px) scale(.92);
  transition: transform .7s var(--spring);
}
.modal.show .modal-card { transform: none; }
.gm { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 40px); align-items: center; }
.gm-media { display: grid; place-items: center; }
.gm-emoji { font-size: clamp(56px, 22vh, 130px); line-height: 1; animation: pop .8s var(--spring) .15s both; }
.gm-img { width: clamp(140px, 30vw, 260px); max-height: 60vh; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
.gm .eyebrow { color: var(--rose-deep); }
.gm-title { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 9.5vh, 58px); line-height: 1; margin: 8px 0 10px; text-wrap: balance; }
.gm-text { font-size: clamp(14px, 3.5vh, 18px); line-height: 1.5; color: #4b3b42; margin-bottom: clamp(12px, 4vh, 24px); max-width: 40ch; text-wrap: pretty; }
.gm .btn { background: var(--ink); color: var(--cream); box-shadow: 0 12px 28px -12px rgba(14, 11, 20, .6); }
.gm-copy > * { animation: fadeUp .8s var(--ease) both; }
.gm-copy > :nth-child(2) { animation-delay: .1s; }
.gm-copy > :nth-child(3) { animation-delay: .2s; }
.gm-copy > :nth-child(4) { animation-delay: .3s; }
.gm.scratch-mode { grid-template-columns: 1fr auto; }
.gm.scratch-mode .gm-media { order: 2; }
.gm .later { opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s var(--ease); }
.gm.revealed .later { opacity: 1; transform: none; }

.scratch {
  position: relative;
  width: clamp(220px, 38vw, 380px);
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 74% 58%, #ffe3a1 0 9%, rgba(255, 200, 120, .55) 10%, transparent 28%),
    linear-gradient(180deg, #2c2347 0%, #9c4a63 45%, #f2985f 62%, #2f5d7c 62.5%, #18324a 100%);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .55);
}
.scratch-reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-shadow: 0 4px 18px rgba(0, 0, 0, .45); }
.scratch-reveal strong { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 11vh, 60px); line-height: 1; }
.scratch-reveal span { font: 700 12px/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: #ffe3a1; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .7s; }
.scratch.done canvas { opacity: 0; pointer-events: none; }

/* ---------- Finale ---------- */
#scene-finale { padding: 0; background: #150f1f; }
#scene-finale::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(14, 11, 20, .5) 0%, rgba(14, 11, 20, .15) 45%, transparent 65%); }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, #24183a 0%, #6b3157 30%, #d9705d 52%, #ffc785 62%); }
.sky-night { position: absolute; inset: 0; background: linear-gradient(180deg, #0c0a1a 0%, #1f1736 40%, #47294a 62%); opacity: 0; }
.stars {
  position: absolute; inset: 0 0 40% 0; opacity: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 46% 22%, #fff, transparent), radial-gradient(1px 1px at 58% 6%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 72% 14%, #fff, transparent), radial-gradient(1px 1px at 86% 26%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 92% 9%, #fff, transparent), radial-gradient(1px 1px at 36% 32%, #fff, transparent),
    radial-gradient(1px 1px at 6% 36%, #fff, transparent), radial-gradient(1.3px 1.3px at 64% 34%, #fff, transparent);
}
.sun {
  position: absolute; left: 70%; top: 22%;
  width: clamp(80px, 24vh, 220px); aspect-ratio: 1;
  margin-left: calc(clamp(80px, 24vh, 220px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff6d2 0%, #ffd986 42%, #ff9c5c 100%);
  box-shadow: 0 0 90px 34px rgba(255, 176, 102, .42), 0 0 220px 80px rgba(255, 140, 90, .22);
}
.sea { position: absolute; left: 0; right: 0; top: 62%; bottom: 0; background: linear-gradient(180deg, #5b4470 0%, #2a2244 45%, #120f22 100%); overflow: hidden; }
.glint {
  position: absolute; left: 70%; top: 0; bottom: 0;
  width: clamp(70px, 20vh, 190px); margin-left: calc(clamp(70px, 20vh, 190px) / -2);
  background: repeating-linear-gradient(180deg, rgba(255, 214, 140, .55) 0 2px, transparent 2px 10px);
  filter: blur(.6px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  animation: glint 3s ease-in-out infinite alternate;
}
.wave {
  position: absolute; left: 0; width: 200%; height: 40px;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  animation: waves 14s linear infinite;
  opacity: .6;
}
.wave.w1 { top: 6%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q50 8 100 20 T200 20 T300 20 T400 20 T500 20 T600 20 T700 20 T800 20' fill='none' stroke='%23ffd9a0' stroke-opacity='.45' stroke-width='1.5'/%3E%3C/svg%3E"); }
.wave.w2 { top: 30%; animation-duration: 20s; animation-direction: reverse; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q100 4 200 20 T400 20 T600 20 T800 20' fill='none' stroke='%23eaa8a2' stroke-opacity='.4' stroke-width='1.5'/%3E%3C/svg%3E"); }
.wave.w3 { top: 58%; animation-duration: 26s; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q66 10 133 20 T266 20 T400 20 T533 20 T666 20 T800 20' fill='none' stroke='%23f7efe3' stroke-opacity='.25' stroke-width='1.5'/%3E%3C/svg%3E"); }
@keyframes waves { to { transform: translateX(-50%); } }
@keyframes glint { from { opacity: .55; transform: scaleX(.9); } to { opacity: 1; transform: scaleX(1.1); } }

.finale-text {
  position: absolute; z-index: 4;
  left: calc(var(--sl) + 7vw);
  top: calc(var(--st) + 7vh);
  bottom: calc(var(--sb) + 7vh);
  display: flex; flex-direction: column; justify-content: center;
  max-width: 54%;
  text-shadow: 0 4px 24px rgba(20, 10, 30, .55);
}
.finale-text h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(48px, min(10vw, 22vh), 170px); line-height: .9; letter-spacing: -.01em; margin: 10px 0 4px; }
.fin-place { font: 700 clamp(12px, 2.8vh, 16px)/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: #ffe3a1; }
.fin-note { margin-top: clamp(12px, 4vh, 26px); font-size: clamp(15px, 3.8vh, 20px); }
.fin-sign { margin-top: clamp(8px, 2.6vh, 18px); font-family: var(--serif); font-style: italic; font-size: clamp(19px, 5vh, 30px); line-height: 1.25; }
.fin-from { font-family: var(--hand); font-style: normal; font-size: 1.15em; color: var(--rose); }
.fin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: clamp(12px, 4.5vh, 30px); }
.fin-actions .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
#scene-finale .f-in { opacity: 0; }
#scene-finale.play .f-in { animation: lineIn 1.4s var(--ease) forwards; }
#scene-finale.play .f-in:nth-child(1) { animation-delay: 1.2s; }
#scene-finale.play .f-in:nth-child(2) { animation-delay: 1.7s; }
#scene-finale.play .f-in:nth-child(3) { animation-delay: 2.4s; }
#scene-finale.play .f-in:nth-child(4) { animation-delay: 3.6s; }
#scene-finale.play .f-in:nth-child(5) { animation-delay: 4.8s; }
#scene-finale.play .f-in:nth-child(6) { animation-delay: 6.4s; }
#scene-finale.play .sun { animation: sunset 40s cubic-bezier(.4, 0, .6, 1) forwards; }
#scene-finale.play .sky-night { animation: toNight 40s ease-in forwards; }
#scene-finale.play .stars { animation: toNight 40s ease-in forwards; animation-delay: 6s; }
@keyframes sunset { from { top: 18%; } to { top: 54%; } }
@keyframes toNight { to { opacity: .82; } }

/* ---------- Draai-melding ---------- */
#rotate {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px; text-align: center;
  background: var(--ink);
}
body.rotate #rotate { display: flex; }
.phone-icon {
  width: 52px; height: 88px; margin-bottom: 18px;
  border: 3px solid var(--cream); border-radius: 12px;
  position: relative;
  animation: rot 2.6s var(--ease) infinite;
}
.phone-icon i { position: absolute; left: 50%; bottom: 6px; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: var(--cream); }
.rotate-title { font-family: var(--serif); font-size: 34px; line-height: 1.05; }
.rotate-title em { color: var(--rose); }
.rotate-sub { color: var(--muted); font-size: 15px; }
@keyframes rot { 0%, 22% { transform: rotate(0); } 52%, 88% { transform: rotate(-90deg); } 100% { transform: rotate(-90deg); } }

/* ---------- Muziek ---------- */
.music-toggle {
  position: fixed; z-index: 60;
  top: calc(var(--st) + 10px); right: calc(var(--sr) + 12px);
  width: 40px; height: 40px; border-radius: 50%;
  border: 0;
  background: rgba(14, 11, 20, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--cream);
  display: grid; place-items: center;
  cursor: pointer;
}
.music-toggle .off { display: none; }
.music-toggle.muted .on { display: none; }
.music-toggle.muted .off { display: block; }

/* ---------- Confetti & korrel ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- Kleine schermen (bv. iPhone SE liggend) ---------- */
@media (max-height: 360px) {
  .tl-card { padding-top: calc(var(--st) + 44px); }
  .mem-caption { font-size: 13px; line-height: 1.45; }
  .gifts-head .eyebrow { display: none; }
}

/* ---------- iPad staand: stapelen ---------- */
@media (orientation: portrait) and (min-width: 600px) {
  .start { flex-direction: column; text-align: center; }
  .start-six { font-size: 38vh; }
  .start-actions { justify-content: center; }
  .mem, .mem.flip { flex-direction: column; justify-content: center; gap: 4vh; }
  .mem-photos { max-width: 100%; height: auto; }
  .polaroid { --ph-h: 46vh; --max-w: 70vw; }
  .mem-photos.n2 .polaroid { --ph-h: 36vh; --max-w: 40vw; }
  .mem-photos.n3 .polaroid { --ph-h: 32vh; --max-w: 28vw; }
  .mem-text { text-align: center; }
  .finale-text { max-width: 86%; top: 10vh; bottom: auto; }
  .sun, .glint { left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .bokeh i, .glow { animation: none; }
}
