/* ============================================================
   SAMEEKSHA, 22 — "The Premiere"
   A midnight cinema. Velvet, tungsten, cream.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,600;1,6..96,400;1,6..96,500&family=Pinyon+Script&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #140a0d;
  --ink-2: #1e0f14;
  --velvet: #4a1420;
  --velvet-2: #6b1f2e;
  --tungsten: #e9c37c;
  --tungsten-2: #f3d9a4;
  --cream: #f4e9d6;
  --rose: #d9899a;
  --muted: rgba(244, 233, 214, 0.55);
  --hair: rgba(244, 233, 214, 0.14);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --w: min(100vw, 480px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body::before {               /* vignette */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 80% at 50% 20%, rgba(107, 31, 46, 0.35), transparent 60%),
              radial-gradient(100% 60% at 50% 110%, rgba(0, 0, 0, 0.7), transparent 60%);
}
body::after {                /* film grain, fixed, cheap */
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 60; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.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(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-2%,3%)} 50%{transform:translate(3%,-2%)} 75%{transform:translate(-1%,-3%)} 100%{transform:translate(2%,1%)} }

#app { position: relative; width: var(--w); height: 100dvh; margin: 0 auto; z-index: 1; }
@media (min-width: 520px) { #app { box-shadow: 0 0 0 1px var(--hair), 0 0 120px rgba(0,0,0,.6); } }

/* ---------- type ---------- */
.eyebrow { font: 600 11px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--tungsten); }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; }
.display i, .display em { font-style: italic; font-weight: 400; }
.script { font-family: var(--script); font-weight: 400; line-height: 1; }
.muted { color: var(--muted); }
h1, h2, h3, p { margin: 0; }
.lead { font-size: 15.5px; color: var(--muted); }
.serif { font-family: var(--display); }

/* ---------- reel header ---------- */
.reel {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 8px 8px;
  pointer-events: none;
  opacity: 0; transition: opacity .6s var(--ease);
}
.reel.is-on { opacity: 1; }
.reel .label { text-align: center; font: 600 10.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.reel .label b { color: var(--tungsten); font-weight: 600; }
.reel button { pointer-events: auto; background: none; border: 0; color: var(--muted); width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 999px; }
.reel button:active { transform: scale(.94); }
.reel button:disabled { opacity: 0; pointer-events: none; }
.reel .bar { grid-column: 1 / -1; height: 1px; background: var(--hair); margin-top: 8px; position: relative; overflow: hidden; }
.reel .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tungsten); width: 0; transition: width .8s var(--ease); }

/* ---------- scenes ---------- */
.scene {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  padding: 86px 22px 0;
  display: flex; flex-direction: column;
  scrollbar-width: none;
}
[hidden] { display: none !important; }
.scene::-webkit-scrollbar { display: none; }
.scene.is-active { opacity: 1; pointer-events: auto; transform: none; }
.scene.is-leaving { opacity: 0; transform: translateY(-10px); }
.scene-head { margin-bottom: 26px; }
.scene-head h2 { font-size: 34px; margin-top: 10px; }
.scene-head .lead { margin-top: 10px; max-width: 34ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--tungsten); color: var(--ink);
  font: 700 12.5px/1 var(--body); letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 12px 30px -12px rgba(233, 195, 124, .55), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .3s;
  text-decoration: none;
}
.btn:active { transform: scale(.97) translateY(1px); }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px var(--hair); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.next-wrap {
  position: sticky; bottom: 0; margin: auto -22px 0; padding: 44px 22px calc(22px + env(safe-area-inset-bottom)); flex-shrink: 0;
  background: linear-gradient(to top, var(--ink) 55%, transparent);
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.next-wrap .hint { text-align: center; font-size: 12px; color: var(--muted); }
.fade-in { animation: fadeUp .9s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* ============================================================
   SCENE 1 — THE TICKET
   ============================================================ */
#s-ticket { padding: 0; display: flex; flex-direction: column; justify-content: flex-end; }
#s-ticket .hero {
  position: absolute; inset: 0; background: url("assets/art/hero.jpg") center 30% / cover no-repeat;
}
#s-ticket .hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,10,13,.55), rgba(20,10,13,0) 30%, rgba(20,10,13,.2) 55%, var(--ink) 92%);
}
#s-ticket .marquee {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center;
  display: grid; gap: 8px; justify-items: center; animation: fadeUp 1.2s var(--ease) both .2s;
}
#s-ticket .marquee .now { font: 600 10.5px/1 var(--body); letter-spacing: .32em; text-transform: uppercase; color: var(--tungsten); }
#s-ticket .marquee .title { font-family: var(--display); font-style: italic; font-size: 24px; color: var(--cream); }
.ticket {
  position: relative; margin: 0 18px calc(20px + env(safe-area-inset-bottom));
  background: var(--cream); color: var(--ink); border-radius: 14px;
  padding: 18px 20px 20px; box-shadow: var(--shadow);
  animation: fadeUp 1.1s var(--ease) both .5s;
  transform-origin: 50% 100%;
}
.ticket::before, .ticket::after {   /* perforation notches */
  content: ""; position: absolute; top: 58%; width: 20px; height: 20px; border-radius: 50%; background: var(--ink);
}
.ticket::before { left: -10px; } .ticket::after { right: -10px; }
.ticket .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ticket .admit { font: 700 10px/1 var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--velvet-2); }
.ticket .no { font: 600 10px/1 var(--body); letter-spacing: .12em; color: rgba(20,10,13,.5); }
.ticket .name { font-family: var(--display); font-size: 40px; line-height: 1; margin: 10px 0 2px; letter-spacing: -.01em; }
.ticket .name span { font-style: italic; color: var(--velvet-2); }
.ticket .meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px 0 0; margin-top: 12px; border-top: 1px dashed rgba(20,10,13,.28); }
.ticket .meta small { display: block; font: 600 9px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: rgba(20,10,13,.5); margin-bottom: 5px; }
.ticket .meta b { font: 600 13px/1.2 var(--body); }
.ticket .gate { margin-top: 14px; display: grid; gap: 8px; }
.ticket .gate label { font: 600 9px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: rgba(20,10,13,.5); }
.ticket .gate .field { display: flex; gap: 8px; }
.ticket input {
  flex: 1; min-width: 0; height: 48px; border-radius: 10px; border: 1px solid rgba(20,10,13,.25); background: #fff;
  font: 600 18px/1 var(--body); letter-spacing: .3em; text-align: center; color: var(--ink); outline: none;
}
.ticket input:focus { border-color: var(--velvet-2); box-shadow: 0 0 0 3px rgba(107,31,46,.15); }
.ticket .err { font-size: 12px; color: var(--velvet-2); min-height: 16px; }
.ticket .btn { background: var(--velvet); color: var(--cream); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.ticket.is-torn { animation: tear .9s var(--ease) forwards; }
@keyframes tear { 30% { transform: rotate(-2deg) translateX(-6px) } 100% { transform: translateY(140%) rotate(8deg); opacity: 0 } }

/* ============================================================
   SCENE 2 — THE CURTAIN
   ============================================================ */
#s-curtain { padding: 0; display: grid; place-items: center; text-align: center; }
.curtain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.curtain .panel {
  position: absolute; top: 0; bottom: 0; width: 52%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 8px, rgba(255,255,255,.05) 8px 22px, rgba(0,0,0,.25) 22px 36px),
    linear-gradient(180deg, #5a1826, #3c0f19 60%, #2a0a11);
  box-shadow: inset 0 -80px 80px -60px rgba(0,0,0,.8);
  transition: transform 2.2s cubic-bezier(.7,0,.2,1);
}
.curtain .panel.l { left: 0; transform-origin: left; }
.curtain .panel.r { right: 0; transform-origin: right; }
.curtain.is-open .panel.l { transform: translateX(-96%) scaleX(.45); }
.curtain.is-open .panel.r { transform: translateX(96%) scaleX(.45); }
.curtain .valance { position: absolute; top: 0; left: 0; right: 0; height: 56px; background: linear-gradient(180deg, #5a1826, #2a0a11); border-bottom: 3px solid var(--tungsten); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.curtain .valance::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px;
  background: radial-gradient(circle at 12px -2px, transparent 11px, #3c0f19 12px) 0 0 / 24px 14px repeat-x; }
.title-card { position: relative; z-index: 2; padding: 0 28px; opacity: 0; transform: translateY(10px); transition: opacity 1.4s var(--ease) 1.1s, transform 1.4s var(--ease) 1.1s; }
.title-card.is-on { opacity: 1; transform: none; }
.title-card .script { font-size: clamp(64px, 20vw, 92px); color: var(--tungsten-2); text-shadow: 0 6px 30px rgba(233,195,124,.25); margin-bottom: -6px; }
.title-card .name { font-family: var(--display); font-size: clamp(40px, 12vw, 56px); letter-spacing: .02em; }
.title-card .sub { margin-top: 14px; font-family: var(--display); font-style: italic; font-size: 20px; color: var(--muted); }
.title-card .date { margin-top: 22px; line-height: 1.7; }
.title-card .btn { margin-top: 34px; }
.spot { position: absolute; left: 50%; top: -10%; width: 120%; height: 80%; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(233,195,124,.22), transparent 70%); pointer-events: none; }

/* ============================================================
   SCENE 3 — THE CAKE
   ============================================================ */
#s-cake .cake-stage { flex: 1; }
.cake-stage { position: relative; flex: 1; min-height: 380px; display: grid; place-items: end center; padding-bottom: 20px; }
.cake { position: relative; width: 260px; height: 250px; }
.plate { position: absolute; left: 50%; bottom: 0; width: 300px; height: 36px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #f7efe0, #d9c9ad 70%, #b9a687); box-shadow: 0 18px 40px rgba(0,0,0,.6); }
.tier { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, #f4e6cf, #e8d3b0 40%, #d2b98f); box-shadow: inset 0 -12px 20px rgba(0,0,0,.12), 0 10px 20px rgba(0,0,0,.35); overflow: hidden; }
.tier.b { bottom: 18px; width: 240px; height: 96px; }
.tier.t { bottom: 108px; width: 176px; height: 82px; }
.tier::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px;
  background: radial-gradient(circle at 12px 10px, #5a1220 14px, transparent 15px) 0 0 / 30px 30px repeat-x, linear-gradient(#5a1220, #5a1220) top / 100% 12px no-repeat; }
.tier::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255,255,255,.35); }
.slice { position: absolute; left: 50%; bottom: 18px; width: 70px; height: 172px; transform: translateX(-2px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, #e9d2ac, #f4e6cf); box-shadow: 0 10px 30px rgba(0,0,0,.6);
  transition: transform 1.1s var(--ease), opacity .2s; border-radius: 8px; }
.slice::before { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, #5a1220 0 10px, transparent 10px 40px, #5a1220 40px 48px, transparent 48px 88px, #5a1220 88px 98px, transparent 98px); opacity: .9; }
.cake.is-cut .slice { opacity: 1; transform: translate(70px, -26px) rotate(14deg); }
.cake.is-cut .tier.t, .cake.is-cut .tier.b { clip-path: polygon(0 0, 46% 0, 46% 100%, 0 100%, 0 0, 0 0, 0 0, 100% 0, 100% 100%, 62% 100%, 62% 0); }
.candles { position: absolute; left: 50%; bottom: 190px; transform: translateX(-50%); display: flex; gap: 22px; }
.candle { position: relative; width: 34px; height: 64px; display: grid; place-items: end center; }
.candle .num { font-family: var(--display); font-size: 58px; line-height: 1; color: var(--tungsten); font-weight: 600;
  text-shadow: 0 2px 0 #8a6a2e, 0 6px 14px rgba(0,0,0,.5); }
.flame { position: absolute; top: -22px; left: 50%; width: 16px; height: 26px; transform: translateX(-50%);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #fff5cc, #ffb347 45%, #ff6a00 80%, transparent 82%);
  filter: drop-shadow(0 0 14px rgba(255,170,60,.85)); animation: flicker .18s infinite alternate; transform-origin: 50% 100%;
  cursor: pointer; touch-action: none; }
.flame::after { content: ""; position: absolute; inset: -18px; }
@keyframes flicker { from { transform: translateX(-50%) scale(1) rotate(-3deg) } to { transform: translateX(-50%) scale(1.08, .94) rotate(3deg) } }
.candle.is-out .flame { animation: none; opacity: 0; transition: opacity .25s; }
.candle .smoke { position: absolute; top: -30px; left: 50%; width: 6px; height: 40px; opacity: 0; border-radius: 6px;
  background: linear-gradient(to top, rgba(244,233,214,.5), transparent); transform: translateX(-50%); }
.candle.is-out .smoke { animation: smoke 2.4s ease-out forwards; }
@keyframes smoke { 0% { opacity: .9; transform: translate(-50%, 0) scaleY(.4) } 100% { opacity: 0; transform: translate(-30%, -60px) scaleY(1.6) } }
.glow { position: absolute; left: 50%; bottom: 120px; width: 320px; height: 320px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,170,60,.28), transparent 60%); pointer-events: none; transition: opacity 1s; }
.cake-stage.is-dark .glow { opacity: 0; }
.cake-ui { margin-top: 10px; display: grid; gap: 14px; text-align: center; }
.cake-ui .step { font-family: var(--display); font-style: italic; font-size: 22px; min-height: 30px; }
.cake-ui .hint { font-size: 12.5px; color: var(--muted); }
.knife-track { position: relative; height: 56px; border-radius: 999px; background: rgba(244,233,214,.06); box-shadow: inset 0 0 0 1px var(--hair); display: none; }
.knife-track.is-on { display: block; }
.knife-track input { -webkit-appearance: none; appearance: none; width: 100%; height: 56px; margin: 0; background: transparent; touch-action: pan-x; }
.knife-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 84px; height: 52px; border-radius: 999px; cursor: grab;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 52'%3E%3Crect x='2' y='2' width='80' height='48' rx='24' fill='%23e9c37c'/%3E%3Cpath d='M18 26h34l10-6v12l-10-6z' fill='%23140a0d'/%3E%3Crect x='14' y='22' width='10' height='8' rx='2' fill='%23140a0d'/%3E%3C/svg%3E") center / contain no-repeat; }
.knife-track input::-moz-range-thumb { width: 84px; height: 52px; border: 0; border-radius: 999px; background: var(--tungsten); }
.knife-track .lbl { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 600 10px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.cake-done { text-align: center; display: none; }
.cake-done.is-on { display: block; animation: fadeUp 1s var(--ease) both; }
.cake-done .script { font-size: 64px; color: var(--tungsten-2); }
.cake-done .display { font-size: 26px; margin-top: -4px; }

/* ============================================================
   SCENE 4 — THE CAST (sticky stack)
   ============================================================ */
.stack { display: grid; gap: 18px; }
.card {
  position: sticky; top: 86px; background: var(--ink-2); border-radius: 18px; overflow: hidden;
  box-shadow: 0 -1px 0 var(--hair), var(--shadow); transform-origin: 50% 0;
}
.card .ph { position: relative; aspect-ratio: 4 / 5; background: #22141a; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92) contrast(1.04); }
.card .ph .idx { position: absolute; top: 14px; left: 16px; font: 600 10px/1 var(--body); letter-spacing: .25em; color: var(--tungsten); }
.card .body { padding: 18px 20px 24px; }
.card .role { font-family: var(--display); font-size: 30px; line-height: 1.05; margin-top: 8px; }
.card .role i { color: var(--tungsten); }
.card .line { margin-top: 12px; color: var(--muted); font-size: 15px; }
.stack .card:nth-child(2) { top: 98px; } .stack .card:nth-child(3) { top: 110px; } .stack .card:nth-child(4) { top: 122px; }
.stack .card:nth-child(5) { top: 134px; } .stack .card:nth-child(6) { top: 146px; } .stack .card:nth-child(n+7) { top: 158px; }
/* slate placeholder when a photo is missing */
.slate { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: repeating-linear-gradient(135deg, #1c1015 0 14px, #22141a 14px 28px); }
.slate .in { display: grid; gap: 8px; justify-items: center; }
.slate .in b { font-family: var(--display); font-style: italic; font-size: 22px; color: var(--cream); font-weight: 400; }
.slate .in span { font: 600 10px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.slate .in i { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--tungsten); display: grid; place-items: center; font-family: var(--display); font-style: italic; color: var(--tungsten); font-size: 20px; }

/* ============================================================
   SCENE 5 — THE SCENES (film strip)
   ============================================================ */
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -22px; padding: 0 22px 12px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.frame { flex: 0 0 86%; scroll-snap-align: center; background: #0d0709; border-radius: 10px; padding: 22px 12px; position: relative; box-shadow: var(--shadow); }
.frame::before, .frame::after { content: ""; position: absolute; left: 10px; right: 10px; height: 10px;
  background: radial-gradient(circle at 6px 5px, var(--ink) 4px, transparent 4.5px) 0 0 / 20px 10px repeat-x; }
.frame::before { top: 6px; } .frame::after { bottom: 6px; }
.frame .ph { position: relative; aspect-ratio: 3 / 4; background: #22141a; border-radius: 4px; overflow: hidden; }
.frame .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .cap { padding: 16px 6px 4px; }
.frame .cap .t { font-family: var(--display); font-size: 22px; margin-top: 6px; }
.frame .cap .l { color: var(--muted); font-size: 14px; margin-top: 8px; }
.strip-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--hair); transition: background .3s, transform .3s; }
.dots i.is-on { background: var(--tungsten); transform: scale(1.3); }

/* ============================================================
   SCENE 6 — THE SCRIPT (chat timeline)
   ============================================================ */
.chat { display: grid; gap: 14px; }
.chip { justify-self: center; font: 600 10px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); margin-top: 8px; }
.bub { max-width: 84%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.bub.in { opacity: 1; transform: none; }
.bub.A { justify-self: start; background: var(--velvet); color: var(--cream); border-bottom-left-radius: 6px; }
.bub.S { justify-self: end; background: var(--cream); color: var(--ink); border-bottom-right-radius: 6px; }
.bub .who { display: block; font: 600 9.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; opacity: .6; margin-bottom: 6px; }
.note { justify-self: center; text-align: center; font-family: var(--display); font-style: italic; color: var(--tungsten); font-size: 15.5px; max-width: 30ch; padding: 2px 0 6px; }

/* ============================================================
   SCENE 7 — BY THE NUMBERS
   ============================================================ */
.bignum { font-family: var(--display); font-size: clamp(64px, 22vw, 96px); line-height: .95; letter-spacing: -.02em; color: var(--tungsten-2); font-variant-numeric: tabular-nums; }
.bignum + .lead { margin-top: 10px; }
.stats { margin-top: 28px; }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hair); }
.stat:last-child { border-bottom: 1px solid var(--hair); }
.stat .k { font-size: 14px; color: var(--muted); }
.stat .k b { color: var(--cream); font-weight: 600; }
.stat .v { font-family: var(--display); font-size: 28px; color: var(--cream); font-variant-numeric: tabular-nums; }
.stat .v small { font-family: var(--body); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.hours { margin-top: 30px; }
.hours svg { width: 100%; height: 120px; display: block; margin-top: 12px; }
.hours .axis { display: flex; justify-content: space-between; font: 600 9.5px/1 var(--body); letter-spacing: .12em; color: var(--muted); margin-top: 6px; text-transform: uppercase; }

/* ============================================================
   SCENE 8 — THE PHOTODUMP (contact sheet)
   ============================================================ */
.sheet { columns: 2; column-gap: 8px; }
.sheet .cell { break-inside: avoid; margin-bottom: 8px; border-radius: 6px; overflow: hidden; background: #22141a; position: relative; cursor: zoom-in; }
.sheet .cell img { width: 100%; display: block; opacity: 0; transition: opacity .6s; }
.sheet .cell img.ld { opacity: 1; }
.sheet .cell .n { position: absolute; left: 6px; bottom: 5px; font: 600 9px/1 var(--body); letter-spacing: .15em; color: rgba(244,233,214,.7); text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.empty { text-align: center; padding: 60px 20px; display: grid; gap: 10px; justify-items: center; }
.empty img { width: 120px; }
.empty .display { font-size: 24px; font-style: italic; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8,4,6,.96); display: none; flex-direction: column; }
.lightbox.is-on { display: flex; }
.lightbox .stage { flex: 1; display: grid; place-items: center; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 82dvh; object-fit: contain; border-radius: 4px; user-select: none; }
.lightbox .top { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 14px 8px; }
.lightbox .cnt { font: 600 10.5px/1 var(--body); letter-spacing: .2em; color: var(--muted); }
.lightbox .cap { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 24px calc(20px + env(safe-area-inset-bottom)); min-height: 44px; }
.iconbtn { background: none; border: 0; color: var(--cream); width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.iconbtn:active { background: rgba(255,255,255,.06); }

/* ============================================================
   SCENE 9 — 22 THINGS (flip tiles)
   ============================================================ */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; aspect-ratio: 1; perspective: 900px; cursor: pointer; }
.tile .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.tile.is-open .in { transform: rotateY(180deg); }
.tile .f, .tile .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; display: grid; place-items: center; padding: 14px; text-align: center; }
.tile .f { background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); font-family: var(--display); font-size: 34px; color: var(--tungsten); }
.tile .f small { display: block; font: 600 9px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.tile .b { background: var(--cream); color: var(--ink); transform: rotateY(180deg); font-size: 12.5px; line-height: 1.4; font-weight: 500; }
.tile.wide { grid-column: 1 / -1; aspect-ratio: 2.2 / 1; }
.tile.wide .b { font-size: 14px; }
.counter { text-align: center; margin: 18px 0 0; font: 600 10.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   SCENE 10 — OPEN WHEN (envelopes)
   ============================================================ */
.envs { display: grid; gap: 10px; }
.env { border-radius: 14px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.env button { width: 100%; display: grid; grid-template-columns: 54px 1fr 24px; align-items: center; gap: 12px; padding: 12px 14px; background: none; border: 0; color: var(--cream); text-align: left; cursor: pointer; font-family: var(--body); }
.env button img { width: 54px; height: 54px; object-fit: contain; transform: rotate(-6deg); }
.env button .t { font-family: var(--display); font-size: 21px; line-height: 1.1; }
.env button .t small { display: block; font: 600 9.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--tungsten); margin-bottom: 6px; }
.env button .chev { transition: transform .4s var(--ease); color: var(--muted); }
.env.is-open button .chev { transform: rotate(180deg); }
.env .paper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.env.is-open .paper { grid-template-rows: 1fr; }
.env .paper > div { overflow: hidden; }
.env .paper p { margin: 0 16px 18px; padding: 16px; background: var(--cream); color: var(--ink); border-radius: 10px; font-family: var(--display); font-size: 17px; line-height: 1.5; }

/* ============================================================
   SCENE 11 — QUIZ
   ============================================================ */
.quiz { display: grid; gap: 14px; }
.quiz .q { font-family: var(--display); font-size: 24px; line-height: 1.2; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; padding: 14px 16px; border-radius: 12px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); color: var(--cream); border: 0; font: 500 15px/1.35 var(--body); cursor: pointer; transition: transform .15s, background .3s, box-shadow .3s; }
.opt:active { transform: scale(.985); }
.opt.ok { background: var(--tungsten); color: var(--ink); box-shadow: none; }
.opt.no { box-shadow: inset 0 0 0 1px var(--rose); color: var(--rose); }
.opt[disabled] { cursor: default; }
.why { font-family: var(--display); font-style: italic; color: var(--tungsten); font-size: 16px; min-height: 24px; }
.score { text-align: center; padding: 30px 0; display: grid; gap: 8px; }
.score .bignum { font-size: 72px; }

/* ============================================================
   SCENE 12 — THE WISH (lanterns)
   ============================================================ */
#s-wish .sky { flex: 1; }
.sky { position: relative; flex: 1; min-height: 300px; margin: 0 -22px; overflow: hidden; pointer-events: none; }
.lantern { position: absolute; bottom: -80px; left: 50%; transform: translateX(-50%); width: 56px; height: 76px; border-radius: 10px 10px 14px 14px;
  background: radial-gradient(ellipse at 50% 70%, #ffd48a, #e08a2e 70%, #9c4d12); box-shadow: 0 0 40px rgba(255,180,90,.5); opacity: 0; }
.lantern::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 20px; height: 8px; transform: translateX(-50%); background: #4a2a12; border-radius: 4px; }
.lantern.fly { animation: fly 9s ease-out forwards; }
@keyframes fly { 0% { opacity: 0; transform: translate(-50%, 0) } 8% { opacity: 1 } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -110vh) rotate(var(--rot)) } }
.lantern.old { opacity: .55; animation: drift 12s ease-in-out infinite alternate; width: 22px; height: 30px; bottom: auto; }
@keyframes drift { from { transform: translate(-50%, 0) } to { transform: translate(-50%, -14px) } }
.wish-form { display: grid; gap: 10px; }
.wish-form textarea { width: 100%; min-height: 96px; resize: none; padding: 14px 16px; border-radius: 14px; border: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.45 var(--display); outline: none; }
.wish-form .ok { text-align: center; font-family: var(--display); font-style: italic; color: var(--tungsten); font-size: 17px; min-height: 26px; }

/* ============================================================
   SCENE 13 — THE TRAILER (YouTube)
   ============================================================ */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt .play { position: absolute; inset: 0; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.yt .play i { width: 72px; height: 72px; border-radius: 50%; background: var(--tungsten); display: grid; place-items: center; box-shadow: 0 10px 40px rgba(233,195,124,.4); }
.yt .play svg { margin-left: 4px; }

/* ============================================================
   SCENE 14 — THE LETTER
   ============================================================ */
.env-big { display: grid; place-items: center; padding: 20px 0 10px; cursor: pointer; }
.env-big img { width: 220px; transition: transform .6s var(--ease); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-8px) rotate(-1deg) } }
.env-big .tap { font: 600 10.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--tungsten); margin-top: 6px; }
.paper-sheet { display: none; background: var(--cream); color: var(--ink); border-radius: 6px; padding: 30px 24px 36px; box-shadow: var(--shadow); font-family: var(--display); font-size: 17.5px; line-height: 1.6; position: relative; }
.paper-sheet.is-on { display: block; animation: fadeUp 1s var(--ease) both; }
.paper-sheet::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--velvet-2), var(--tungsten)); border-radius: 6px 6px 0 0; }
.paper-sheet p { margin: 0 0 1.1em; white-space: pre-wrap; }
.paper-sheet p:last-child { margin: 0; }
.paper-sheet .caret { display: inline-block; width: 2px; height: 1em; background: var(--velvet-2); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0 } }
.paper-sheet .sig { font-family: var(--script); font-size: 44px; color: var(--velvet-2); margin-top: 6px; }
.skip { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--muted); font: 600 10.5px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; padding: 10px; }

/* ============================================================
   SCENE 15 — CREDITS
   ============================================================ */
#s-credits { padding: 0; display: grid; place-items: center; text-align: center; overflow: hidden; }
.roll { position: absolute; inset: 0; display: grid; align-content: start; gap: 30px; padding: 100dvh 28px 0; animation: roll 42s linear forwards; }
.roll.paused { animation-play-state: paused; }
@keyframes roll { to { transform: translateY(calc(-100% - 100dvh)); } }
.roll .cr small { display: block; font: 600 10px/1 var(--body); letter-spacing: .26em; text-transform: uppercase; color: var(--tungsten); margin-bottom: 8px; }
.roll .cr b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.roll .cr.big b { font-size: 40px; }
.roll .cr.big .script { font-size: 64px; color: var(--tungsten-2); }
.roll img { width: 110px; margin: 0 auto; }
.end { position: relative; z-index: 2; opacity: 0; transition: opacity 1.2s var(--ease); display: grid; gap: 14px; justify-items: center; padding: 0 28px; }
.end.is-on { opacity: 1; }
.end .script { font-size: 52px; color: var(--tungsten-2); }
.end .actions { display: grid; gap: 10px; width: 100%; max-width: 300px; margin-top: 10px; }

/* ---------- music pill ---------- */
.pill {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 70;
  display: none; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(30, 15, 20, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.5);
  color: var(--cream); font: 600 10px/1 var(--body); letter-spacing: .18em; text-transform: uppercase;
}
.pill.is-on { display: inline-flex; }
.pill .eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.pill .eq i { width: 3px; background: var(--tungsten); border-radius: 2px; height: 30%; animation: eq 1s ease-in-out infinite; }
.pill .eq i:nth-child(2) { animation-delay: .2s } .pill .eq i:nth-child(3) { animation-delay: .4s }
.pill.muted .eq i { animation: none; height: 25%; opacity: .45; }
@keyframes eq { 0%,100% { height: 30% } 50% { height: 100% } }

/* ---------- confetti canvas ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 65; }

/* ---------- a11y / motion ---------- */
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  body::after { animation: none; }
}

/* ============================================================
   THE FIRSTS
   ============================================================ */
.firsts { list-style: none; margin: 0; padding: 0; display: grid; }
.first { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair); }
.firsts.play .first { animation: fadeUp .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.first:last-child { border-bottom: 1px solid var(--hair); }
.first .w { font: 600 10.5px/1.7 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--tungsten); }
.first .t { font-family: var(--display); font-size: 17.5px; line-height: 1.35; }

/* ============================================================
   YOUR FAVOURITES
   ============================================================ */
.fav-quote { margin: 0 0 6px; padding: 0 0 22px; border-bottom: 1px solid var(--hair); font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.45; }
.favs { display: grid; }
.fav { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.fav img { width: 84px; height: 84px; object-fit: contain; }
.fav b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.fav p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.fav-close { margin-top: 24px; text-align: center; font-family: var(--display); font-style: italic; color: var(--tungsten); font-size: 20px; }
