/* ======================================================================
   TapSticky — Rakhi recipient page
   "Constellation" theme — deep midnight backdrop + warm gold accents.
   Layout/structure is identical to Marigold; only palette tokens swap.
   ====================================================================== */

:root {
  /* Palette — midnight */
  --bg-deep:    #050818;            /* near-black space */
  --bg-cream:   #0a0e2e;            /* primary surface (was cream — now midnight) */
  --bg-cream-2: #14193b;            /* slightly raised surfaces */
  --ink:        #f1ecde;            /* primary text — warm cream on dark */
  --ink-soft:   #c4bfae;            /* secondary text */
  --muted:      #8a8eaa;            /* tertiary muted */
  --line:       rgba(241, 236, 222, 0.14);
  --crimson:    #d4554a;            /* lifted for contrast on dark */
  --crimson-deep: #a83a30;
  --gold:       #e9bf6c;            /* warm star-gold */
  --gold-deep:  #c79743;
  --thread:     #d4554a;
  --on-accent:  #050818;            /* dark text on gold buttons */
  --danger:     #d65555;
  --success:    #6d9460;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-paper: 0 18px 48px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.30);
  --shadow-seal: 0 6px 18px rgba(212, 85, 74, 0.45);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--gold); color: var(--bg-deep); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle nebula gradient behind the star canvas */
  background:
    radial-gradient(ellipse at 12% 18%, rgba(212, 85, 74, 0.10), transparent 55%),
    radial-gradient(ellipse at 92% 12%, rgba(94, 80, 178, 0.16), transparent 55%),
    radial-gradient(ellipse at 48% 110%, rgba(233, 191, 108, 0.10), transparent 55%),
    linear-gradient(180deg, #050818 0%, #0a0e2e 60%, #060920 100%);
}

/* Lenis smooth scroll baseline */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

img, video, iframe { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* Hide bg audio element visually */
audio#bgMusic { position: fixed; top: -9999px; left: -9999px; }

/* ======================================================================
   Preview banner
   ====================================================================== */
.preview-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 16px;
  background: var(--bg-deep);
  color: var(--bg-cream);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.preview-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 162, 76, 0.25);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ======================================================================
   Hero canvas + poster
   ====================================================================== */
#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out-expo);
}
#hero-canvas.is-ready { opacity: 0.85; }

.hero-poster {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(192, 57, 43, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 90%, rgba(212, 162, 76, 0.30) 0%, transparent 60%);
  transition: opacity 1.2s var(--ease-out-expo);
}
#hero-canvas.is-ready ~ .hero-poster,
.hero-poster.is-faded { opacity: 0; }

/* ======================================================================
   PIN gate
   ====================================================================== */
.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background:
    radial-gradient(circle at 50% 20%, rgba(212, 162, 76, 0.20), transparent 60%),
    linear-gradient(180deg, #1a0e08 0%, #2a1810 100%);
  color: var(--bg-cream);
  animation: gate-in 0.8s var(--ease-out-expo);
}
@keyframes gate-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pin-gate.is-leaving { opacity: 0; transition: opacity 0.6s var(--ease-out-expo); pointer-events: none; }

.pin-card {
  width: min(420px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.pin-seal {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--crimson) 0%, var(--crimson-deep) 70%);
  box-shadow: var(--shadow-seal), inset 0 0 0 2px rgba(255,255,255,0.06), inset 0 -8px 16px rgba(0,0,0,0.25);
  position: relative;
  animation: seal-breathe 4s ease-in-out infinite;
}
.pin-seal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 1px dashed rgba(250, 243, 231, 0.35);
}
.pin-seal-inner {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: rgba(250, 243, 231, 0.92);
}
@keyframes seal-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.pin-eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(250, 243, 231, 0.6);
}
.pin-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 6vw, 40px);
  margin: 0;
  letter-spacing: -0.01em;
}
.pin-instruction {
  margin: 0;
  font-size: 14px;
  color: rgba(250, 243, 231, 0.7);
}

.pin-inputs {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.pin-inputs input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(250, 243, 231, 0.2);
  border-radius: var(--radius-sm);
  color: var(--bg-cream);
  caret-color: var(--gold);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pin-inputs input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.25);
}
.pin-inputs.is-shake input { animation: shake 0.4s var(--ease-out-expo); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.pin-error {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: #f8b6a8;
}
.pin-note {
  margin: var(--space-4) 0 0;
  font-size: 12px;
  color: rgba(250, 243, 231, 0.45);
  max-width: 32ch;
  line-height: 1.5;
}

@media (max-width: 380px) {
  .pin-inputs input { width: 48px; height: 56px; font-size: 24px; }
}

/* ======================================================================
   Hero
   ====================================================================== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--space-7) var(--space-5);
}

.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 720px;
}

.hero-eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--crimson);
  font-weight: 500;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin: 0 var(--space-3);
  opacity: 0.6;
}

.hero-name {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 500;
  font-size: clamp(48px, 13vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero-name .char {
  display: inline-block;
  transform: translateY(40%);
  opacity: 0;
}

.hero-from {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.hero-from strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
}

.hero-music {
  margin-top: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(31, 20, 11, 0.06);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.hero-music:hover { background: rgba(31, 20, 11, 0.10); }
.music-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.music-bars span {
  width: 3px;
  background: var(--crimson);
  border-radius: 2px;
  height: 30%;
}
.hero-music[aria-pressed="true"] .music-bars span {
  animation: music-bounce 0.9s ease-in-out infinite;
}
.music-bars span:nth-child(1) { animation-delay: 0s; }
.music-bars span:nth-child(2) { animation-delay: 0.15s; }
.music-bars span:nth-child(3) { animation-delay: 0.3s; }
.music-bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes music-bounce {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.hero-scroll {
  margin-top: var(--space-7);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-scroll svg {
  animation: bob 2.4s ease-in-out infinite;
  color: var(--crimson);
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ======================================================================
   Rakhi medallion illustration
   - Mobile: in the natural hero flow above the eyebrow, smaller
   - Desktop: detached, vertically centred on the right edge, larger
   ====================================================================== */
.rakhi-illus-wrap {
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 12px 28px rgba(192, 57, 43, 0.18));
  margin-bottom: var(--space-3);
  align-self: center;
}
.rakhi-illus {
  width: clamp(154px, 35vw, 220px);
  height: auto;
  display: block;
  margin: 0 auto;
  animation: rakhi-spin 90s linear infinite, rakhi-float 7s ease-in-out infinite;
  transform-origin: center;
}
@keyframes rakhi-spin {
  to { transform: rotate(360deg); }
}
@keyframes rakhi-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* Very small phones — keep the medallion modest */
@media (max-width: 380px) {
  .rakhi-illus { width: 132px; }
}

/* Desktop — float to right edge, scale up, vertical centre */
@media (min-width: 1024px) {
  .rakhi-illus-wrap {
    position: absolute;
    right: 6vw;
    top: 50%;
    transform: translateY(-50%);
    margin-bottom: 0;
    filter: drop-shadow(0 18px 36px rgba(192, 57, 43, 0.18));
  }
  .rakhi-illus { width: clamp(280px, 28vw, 420px); }
}

/* ======================================================================
   Story (scenes)
   ====================================================================== */
.story {
  position: relative;
  z-index: 2;
  padding: 0 var(--space-5) var(--space-9);
  max-width: 720px;
  margin: 0 auto;
}

.scene {
  padding: var(--space-9) 0;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
}
.scene.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.scene-eyebrow {
  margin: 0 0 var(--space-3);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
}
.scene-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-6);
  color: var(--ink);
  text-wrap: balance;
}

/* ======================================================================
   The Sealed Note
   Single parchment letter card. Wax seal sits over the body content; on
   tap, halves crack apart and the body sharpens into view. No 3D rotation,
   no fold, no overflow tricks.
   ====================================================================== */

.letter-stage {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
}

.rakhi-note {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 25, 59, 0.78) 0%, rgba(10, 14, 46, 0.92) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 56px) clamp(22px, 4.5vw, 44px);
  box-shadow: var(--shadow-paper);
  border: 1px solid rgba(31, 20, 11, 0.08);
  cursor: pointer;
  outline: none;
  text-align: left;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.rakhi-note:hover { transform: translateY(-2px); box-shadow: 0 22px 56px rgba(31, 20, 11, 0.20), 0 2px 6px rgba(31, 20, 11, 0.06); }
.rakhi-note:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.rakhi-note[data-state="open"] { cursor: default; transform: none; }

.rakhi-note::before {
  content: "";
  position: absolute;
  inset: clamp(36px, 6vw, 56px) clamp(22px, 4.5vw, 44px);
  background-image: linear-gradient(rgba(31, 20, 11, 0.05) 1px, transparent 1px);
  background-size: 100% 30px;
  background-position: 0 14px;
  opacity: 0.4;
  pointer-events: none;
}

/* Decorative crimson L corners */
.note-corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
  z-index: 2;
}
.note-corner::before,
.note-corner::after {
  content: "";
  position: absolute;
  background: var(--crimson);
  opacity: 0.7;
}
.note-corner::before { top: 0; left: 0; width: 18px; height: 1.5px; }
.note-corner::after  { top: 0; left: 0; width: 1.5px; height: 18px; }
.note-corner--tl { top: 14px;   left: 14px; }
.note-corner--tr { top: 14px;   right: 14px; transform: scaleX(-1); }
.note-corner--bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.note-corner--br { bottom: 14px; right: 14px; transform: scale(-1, -1); }

/* Header (always visible — addressee + stamp) */
.note-header {
  position: relative;
  text-align: center;
  margin-bottom: var(--space-6);
  z-index: 1;
}
.note-stamp {
  display: inline-block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--crimson);
  border: 1px dashed rgba(192, 57, 43, 0.5);
  padding: 5px 14px;
  border-radius: 3px;
  background: rgba(250, 243, 231, 0.5);
}
.note-addr {
  margin: var(--space-3) 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(22px, 4.5vw, 32px);
  color: var(--ink);
  line-height: 1.1;
}
.note-rule {
  display: block;
  width: 60px;
  height: 1px;
  margin: var(--space-3) auto 0;
  background: var(--gold);
  opacity: 0.6;
}

/* Body — initially blurred + hidden, revealed on open */
.note-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) 0;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(8px);
}
.rakhi-note[data-state="opening"] .note-body,
.rakhi-note[data-state="open"]    .note-body {
  transition:
    opacity 0.85s var(--ease-out-expo) 0.35s,
    filter 0.85s var(--ease-out-expo) 0.35s,
    transform 0.85s var(--ease-out-expo) 0.35s;
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* Wax seal — sits over the body */
.note-seal {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(88px, 14vw, 116px);
  aspect-ratio: 1 / 1;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}
.note-seal-half {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.35), transparent 60%),
    radial-gradient(circle at 50% 50%, var(--crimson) 0%, var(--crimson-deep) 100%);
  box-shadow: var(--shadow-seal);
  transition: transform 0.7s var(--ease-out-expo), opacity 0.6s var(--ease-out-expo);
}
.note-seal-half--left  { left: 0;  border-radius: 100% 0 0 100% / 100% 0 0 100%; }
.note-seal-half--right { right: 0; border-radius: 0 100% 100% 0 / 0 100% 100% 0; }
.note-seal-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  color: rgba(250, 243, 231, 0.94);
  z-index: 1;
  transition: opacity 0.4s var(--ease-out-expo);
}
.note-seal-glyph::after {
  content: "";
  position: absolute;
  width: 72%; height: 72%;
  border-radius: 999px;
  border: 1px dashed rgba(250, 243, 231, 0.32);
}

/* Open state for seal */
.rakhi-note[data-state="opening"] .note-seal-glyph,
.rakhi-note[data-state="open"]    .note-seal-glyph { opacity: 0; }
.rakhi-note[data-state="opening"] .note-seal-half--left,
.rakhi-note[data-state="open"]    .note-seal-half--left  { transform: translateX(-110px) rotate(-32deg); opacity: 0; }
.rakhi-note[data-state="opening"] .note-seal-half--right,
.rakhi-note[data-state="open"]    .note-seal-half--right { transform: translateX( 110px) rotate( 32deg); opacity: 0; }

/* Letter content typography (inside .note-body) */
.note-body .letter-greeting {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
}
.note-body .letter-body {
  margin: 0 0 var(--space-4);
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 3.4vw, 18px);
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  flex: 1;
}
.note-body .letter-sign {
  margin: var(--space-4) 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--crimson);
  align-self: flex-end;
}

/* Hint sits below the card */
.env-hint {
  margin: var(--space-4) 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.4s var(--ease-out-expo);
}
.scene--letter:has(.rakhi-note[data-state="open"]) .env-hint,
.scene--letter:has(.rakhi-note[data-state="opening"]) .env-hint { opacity: 0; }

@media (max-width: 480px) {
  .rakhi-note { min-height: 440px; }
  .note-seal { top: 56%; }
}

/* ======================================================================
   Memory (image/video) — interactive polaroids with 3D tilt parallax
   on desktop, simple stack on mobile.
   ====================================================================== */
.memory-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
}

.memory-card {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 460px;
  background: #f4ead8;     /* keep polaroids cream — they read iconic against midnight */
  color: #1f140b;          /* polaroid caption stays dark */
  border-radius: var(--radius-md);
  padding: 12px 12px 36px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(241, 236, 222, 0.08);
  /* CSS-var driven transform stack — JS only writes --tilt-x / --tilt-y */
  --base-rot: -1.2deg;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift-z: 0px;
  transform:
    rotate(var(--base-rot))
    perspective(1000px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    translateZ(var(--lift-z));
  transition:
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo);
  transform-style: preserve-3d;
  will-change: transform;
}
.memory-card:nth-child(2) { --base-rot: 0.8deg; }

/* Inner image / video — separate Z plane so it floats above the frame on tilt */
.memory-card img,
.memory-card video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  background: #1f140b;
  transform: translateZ(0);
  transition: transform 0.5s var(--ease-out-expo);
}
.memory-card video { object-fit: contain; max-height: 70vh; }

.memory-card figcaption {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  transform: translateZ(0);
  transition: transform 0.5s var(--ease-out-expo), color 0.4s;
}

/* Desktop: tilt becomes interactive, content floats on hover, layout wraps
   gracefully for 1 / 2 / 3+ media cards. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .scene--memory { perspective: 1500px; }
  .memory-stack {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-7);
    justify-content: center;
    align-items: flex-start;
    perspective: 1500px;
  }
  /* flex: grow / shrink / basis. Each card wants ~340px, expands to fill row,
     wraps at ~3-up on wide screens, 2-up on medium. */
  .memory-card {
    flex: 0 1 340px;
    max-width: 460px;
    cursor: pointer;
  }
  /* slightly varied static rotations across more cards */
  .memory-card:nth-child(3) { --base-rot: -0.5deg; }
  .memory-card:nth-child(4) { --base-rot:  1.4deg; }
  .memory-card:nth-child(5) { --base-rot: -1.6deg; }

  /* While hovering, drop the static polaroid tilt — JS-driven tilt takes over */
  .memory-card:hover {
    --base-rot: 0deg;
    --lift-z: 24px;
    box-shadow:
      0 36px 72px rgba(31, 20, 11, 0.30),
      0 6px 16px rgba(31, 20, 11, 0.14);
    z-index: 1;
  }
  .memory-card:hover img,
  .memory-card:hover video {
    transform: translateZ(40px) scale(1.015);
  }
  .memory-card:hover figcaption {
    transform: translateZ(50px);
    color: var(--crimson);
  }
}

/* ======================================================================
   Voice (waveform)
   ====================================================================== */
.voice-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: rgba(20, 25, 59, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}
.voice-play {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--crimson);
  color: var(--bg-cream);
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.35);
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}
.voice-play:hover { transform: scale(1.04); background: var(--crimson-deep); }
.voice-play-icon { width: 26px; height: 26px; }

.voice-body { flex: 1; min-width: 0; }
.voice-wave {
  width: 100%;
  height: 48px;
  margin-bottom: var(--space-2);
}
.voice-meta {
  display: flex;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.voice-from {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
}

/* ======================================================================
   Playlist
   ====================================================================== */
.playlist-card {
  background: rgba(20, 25, 59, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.playlist-card iframe { border: 0; display: block; }

/* ======================================================================
   Album link
   ====================================================================== */
.album-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3);
  background: rgba(20, 25, 59, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
  text-align: left;
}
.album-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-paper);
}
.album-thumb {
  width: 88px; height: 88px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-cream-2);
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; }
.album-content { flex: 1; min-width: 0; }
.album-source {
  margin: 0 0 var(--space-1);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.album-cta {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}

/* ======================================================================
   Wish CTA + modal
   ====================================================================== */
.scene--wish .wish-sub {
  margin: -16px 0 var(--space-6);
  color: var(--ink-soft);
  font-size: 15px;
  font-family: var(--font-display);
  font-style: italic;
}

.wish-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg-cream);
  border: none;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.3s var(--ease-out-expo), background 0.3s;
  box-shadow: 0 10px 30px rgba(31, 20, 11, 0.25);
}
.wish-cta:hover { transform: translateY(-2px); background: var(--crimson); }

.wish-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
}
.wish-modal[hidden] { display: none; }
.wish-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 20, 11, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.25s var(--ease-out-expo);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.wish-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--bg-cream);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-7) var(--space-5) var(--space-5);
  box-shadow: 0 -10px 40px rgba(31, 20, 11, 0.25);
  animation: slide-up 0.4s var(--ease-out-expo);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 720px) {
  .wish-modal { place-items: center; }
  .wish-modal-sheet {
    border-radius: var(--radius-lg);
    padding: var(--space-7) var(--space-6);
    animation: pop-in 0.35s var(--ease-out-expo);
  }
  @keyframes pop-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

.wish-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(31, 20, 11, 0.06);
  border: none;
  font-size: 22px;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.wish-close:hover { background: rgba(31, 20, 11, 0.12); }

.wish-modal-sheet h3 {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.wish-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-3) 0 6px;
  font-weight: 500;
}
.wish-modal-sheet input,
.wish-modal-sheet textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(5, 8, 24, 0.55);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wish-modal-sheet input:focus,
.wish-modal-sheet textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.18);
}
.wish-modal-sheet textarea { min-height: 110px; line-height: 1.5; }

.wish-meta {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 var(--space-4);
  font-variant-numeric: tabular-nums;
}
.wish-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}
.wish-btn-ghost,
.wish-btn-primary {
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.wish-btn-ghost { background: transparent; color: var(--ink); }
.wish-btn-ghost:hover { background: rgba(31, 20, 11, 0.06); }
.wish-btn-primary { background: var(--crimson); color: var(--bg-cream); }
.wish-btn-primary:hover { background: var(--crimson-deep); transform: translateY(-1px); }
.wish-btn-primary[disabled] { opacity: 0.5; pointer-events: none; }

/* ======================================================================
   Toast
   ====================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg-cream);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-out-expo);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { background: var(--danger); }
.toast.is-success { background: var(--success); }

/* ======================================================================
   Footer
   ====================================================================== */
.rakhi-footer {
  position: relative;
  z-index: 2;
  padding: var(--space-7) var(--space-5);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin: var(--space-7) auto 0;
  max-width: 720px;
}
.rakhi-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
}

/* ======================================================================
   Ambient petals (CSS-driven, replaces mind bubbles)
   ====================================================================== */
.ambient-petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.ambient-petals span {
  position: absolute;
  top: -10%;
  width: 14px;
  height: 14px;
  border-radius: 50% 8px 50% 8px;
  background: linear-gradient(135deg, #d4a24c 0%, #a87c2a 100%);
  opacity: 0.35;
  filter: blur(0.3px);
  animation: petal-fall linear infinite;
}
.ambient-petals span:nth-child(1) { left: 6%;  width: 10px; height: 10px; animation-duration: 22s; animation-delay: -2s; }
.ambient-petals span:nth-child(2) { left: 18%; width: 14px; height: 14px; animation-duration: 28s; animation-delay: -8s; }
.ambient-petals span:nth-child(3) { left: 32%; width: 8px;  height: 8px;  animation-duration: 34s; animation-delay: -3s; opacity: 0.25; }
.ambient-petals span:nth-child(4) { left: 47%; width: 12px; height: 12px; animation-duration: 26s; animation-delay: -12s; }
.ambient-petals span:nth-child(5) { left: 62%; width: 10px; height: 10px; animation-duration: 30s; animation-delay: -6s; opacity: 0.3; }
.ambient-petals span:nth-child(6) { left: 76%; width: 16px; height: 16px; animation-duration: 24s; animation-delay: -14s; }
.ambient-petals span:nth-child(7) { left: 88%; width: 9px;  height: 9px;  animation-duration: 32s; animation-delay: -4s; opacity: 0.25; }
.ambient-petals span:nth-child(8) { left: 95%; width: 11px; height: 11px; animation-duration: 27s; animation-delay: -18s; }
@keyframes petal-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.4; }
  100% { transform: translate3d(40px, 110vh, 0) rotate(360deg); opacity: 0; }
}

/* ======================================================================
   Scroll progress + section indicator (desktop only)
   ====================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; right: 16px;
  width: 2px;
  height: 100vh;
  background: rgba(31, 20, 11, 0.08);
  z-index: 60;
  pointer-events: none;
}
.scroll-progress-bar {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--crimson) 0%, var(--gold) 100%);
  transition: height 0.1s linear;
  border-radius: 1px;
}

.section-indicator {
  position: fixed;
  top: 50%;
  right: 36px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 60;
  pointer-events: none;
  font-family: var(--font-display);
  color: var(--ink-soft);
  text-align: right;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo);
  mix-blend-mode: multiply;
}
.section-indicator.is-visible { opacity: 1; }
.section-indicator-num {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 500;
}
.section-indicator-name {
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.section-indicator-name.is-changing { opacity: 0; transform: translateY(6px); }

@media (max-width: 900px), (hover: none) {
  .scroll-progress, .section-indicator { display: none; }
}

/* Magnetic CTA (desktop) */
.wish-cta {
  will-change: transform;
}

/* ======================================================================
   Custom cursor — dot + ring + gold dust trail (desktop only)
   ====================================================================== */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 250;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}
.cursor.is-visible { opacity: 1; }

.cursor-dot {
  position: absolute;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(233, 191, 108, 0.65);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  transition: opacity 0.25s var(--ease-out-expo);
}
/* Hide the dot when hovering anything readable / interactive — it stops
   blocking text. Only visible when moving across empty page area. */
.cursor.is-hover .cursor-dot,
.cursor.is-text  .cursor-dot,
.cursor.is-read  .cursor-dot { opacity: 0; }
.cursor-ring {
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 36px;
  background: rgba(233, 191, 108, 0.08);
  border: 1px solid rgba(241, 236, 222, 0.55);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  will-change: transform, width, height, border-radius, background-color;
  transition:
    width 0.32s var(--ease-out-expo),
    height 0.32s var(--ease-out-expo),
    background-color 0.32s,
    border-color 0.3s,
    border-radius 0.3s;
}
.cursor-label {
  position: absolute;
  top: 0; left: 0;
  transform: translate(20px, -50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  background: var(--bg-cream);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}
.cursor.is-labeled .cursor-label { opacity: 1; }

/* hover variants */
.cursor.is-hover .cursor-ring {
  width: 72px; height: 72px;
  background: rgba(192, 57, 43, 0.16);
  border-color: var(--crimson);
}
.cursor.is-press .cursor-ring {
  width: 20px; height: 20px;
  background: rgba(192, 57, 43, 0.22);
}
.cursor.is-text  .cursor-ring {
  width: 4px; height: 30px;
  background: var(--crimson);
  border-radius: 1px;
  border-color: var(--crimson);
}

/* gold dust trail */
.cursor-trail-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(250, 243, 231, 0.85), rgba(212, 162, 76, 0.55) 60%, rgba(212, 162, 76, 0) 100%);
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 240;
  transform: translate(-50%, -50%);
  animation: trail-fade 700ms ease-out forwards;
}
@keyframes trail-fade {
  0%   { opacity: 0.85; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
}

/* hide native cursor when ours is active */
body.has-cursor,
body.has-cursor *,
body.has-cursor a,
body.has-cursor button,
body.has-cursor [role="button"],
body.has-cursor input,
body.has-cursor textarea,
body.has-cursor .envelope,
body.has-cursor .rakhi-note,
body.has-cursor .reveal-word,
body.has-cursor .reveal-block { cursor: none; }

/* turn off entirely on touch / coarse pointers */
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-trail-dot { display: none !important; }
  body.has-cursor { cursor: auto !important; }
}

/* ======================================================================
   Reveal patterns — hover swaps visible text for a hidden version, in place.
   - .reveal-word : inline (e.g. names → nicknames)
   - .reveal-block: block-level (e.g. whole message → secret message)
   ====================================================================== */
.reveal-word {
  position: relative;
  display: inline-block;
  border-bottom: 1px dashed rgba(192, 57, 43, 0.32);
  transition: color 0.45s var(--ease-out-expo), border-color 0.45s var(--ease-out-expo);
  white-space: nowrap;
}
.reveal-word::after {
  content: attr(data-secret);
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--crimson);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255, 250, 240, 0.7);
}

/* Block reveal — SPOTLIGHT mode.
   Visible text is masked OUT inside the lens; secret is masked IN inside the
   lens. Both share the same lens centre via CSS vars updated by JS. So you
   only ever see a small fragment of the secret near the cursor. */
.reveal-block {
  position: relative;
  --lens-x: -200px;
  --lens-y: -200px;
  --lens-rx: 40px;   /* horizontal radius — scan width */
  --lens-ry: 14px;    /* vertical radius — locks lens to ~one line of text */
}
/* horizontal scan-line on the visible text — line-height-tall ellipse */
.reveal-block-visible {
  display: block;
  -webkit-mask-image: radial-gradient(ellipse var(--lens-rx) var(--lens-ry) at var(--lens-x) var(--lens-y),
                       transparent 0%,
                       transparent 80%,
                       #000 100%);
          mask-image: radial-gradient(ellipse var(--lens-rx) var(--lens-ry) at var(--lens-x) var(--lens-y),
                       transparent 0%,
                       transparent 80%,
                       #000 100%);
}
/* same scan-line for the secret, inverted */
.reveal-block::after {
  content: attr(data-secret);
  position: absolute;
  inset: 0;
  font: inherit;
  font-style: italic;
  color: var(--crimson);
  white-space: pre-wrap;
  text-align: inherit;
  text-shadow: 0 0 6px rgba(255, 250, 240, 0.95), 0 1px 2px rgba(255, 250, 240, 0.7);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse var(--lens-rx) var(--lens-ry) at var(--lens-x) var(--lens-y),
                       #000 0%,
                       #000 80%,
                       transparent 100%);
          mask-image: radial-gradient(ellipse var(--lens-rx) var(--lens-ry) at var(--lens-x) var(--lens-y),
                       #000 0%,
                       #000 80%,
                       transparent 100%);
}

@media (hover: hover) and (pointer: fine) {
  .rakhi-note[data-state="open"] .reveal-word:hover {
    color: transparent;
    border-bottom-color: transparent;
  }
  .rakhi-note[data-state="open"] .reveal-word:hover::after {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spotlight only when the letter is open — disable lens before then */
.rakhi-note:not([data-state="open"]) .reveal-block-visible { -webkit-mask-image: none; mask-image: none; }
.rakhi-note:not([data-state="open"]) .reveal-block::after  { -webkit-mask-image: radial-gradient(circle 0 at -200px -200px, #000, transparent); mask-image: radial-gradient(circle 0 at -200px -200px, #000, transparent); }

/* Don't show the hover affordance until the letter is open */
.rakhi-note:not([data-state="open"]) .reveal-word,
.rakhi-note:not([data-state="open"]) .reveal-block { cursor: inherit; }
.rakhi-note:not([data-state="open"]) .reveal-word { border-bottom-color: transparent; }

/* ----- Touch (no-hover) — tap-to-peek with auto-revert.
   .is-peeking is toggled by JS for ~2.5s on words / ~3s on the message. */
@media (hover: none), (pointer: coarse) {
  .reveal-block-visible { transition: opacity 0.5s var(--ease-out-expo); }
  .reveal-block::after  { transition: opacity 0.4s var(--ease-out-expo); }

  .rakhi-note[data-state="open"] .reveal-block.is-peeking .reveal-block-visible { opacity: 0; }
  .rakhi-note[data-state="open"] .reveal-block.is-peeking::after {
    -webkit-mask-image: none;
            mask-image: none;
  }
  .rakhi-note[data-state="open"] .reveal-word.is-peeking {
    color: transparent;
    border-bottom-color: transparent;
  }
  .rakhi-note[data-state="open"] .reveal-word.is-peeking::after {
    opacity: 1;
    transform: translateY(0);
  }
}

/* One-time touch hint — fades in after the seal breaks (touch only) */
.touch-hint {
  margin: var(--space-3) 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out-expo);
  pointer-events: none;
}
.touch-hint.is-visible { opacity: 0.85; }
.touch-hint.is-fading  { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .touch-hint { display: none; }
}

/* ======================================================================
   Starlight letter (constellation theme override)
   Replaces the .rakhi-note parchment card with text floating in the night
   sky. Each line reveals on scroll with a soft gold glow, like text written
   by stars.
   ====================================================================== */
.scene--letter-stars {
  /* break out of the magazine grid — make this a full-bleed cinematic moment */
  text-align: center;
}
.scene--letter-stars .scene-title { text-align: center; }
.scene--letter-stars .scene-eyebrow { text-align: center; }

.star-letter {
  position: relative;
  width: min(820px, 100%);
  margin: var(--space-7) auto 0;
  padding: var(--space-7) var(--space-5);
  text-align: center;
  font-family: var(--font-display);
  color: var(--ink);
}
/* soft gold-into-night halo behind the text */
.star-letter-glow {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(233, 191, 108, 0.16), transparent 65%),
    radial-gradient(ellipse at 50% 80%, rgba(212, 85, 74, 0.10), transparent 55%);
  filter: blur(8px);
}

.starlight-line {
  position: relative;
  z-index: 1;
  margin: 0 auto var(--space-5);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 3.4vw, 32px);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: rgba(241, 236, 222, 0.92);
  text-shadow:
    0 0 14px rgba(233, 191, 108, 0.28),
    0 0 36px rgba(94, 80, 178, 0.20);
  /* default state — hidden, will be revealed via JS or scroll */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.0s var(--ease-out-expo), transform 1.0s var(--ease-out-expo);
  max-width: 26ch;
}
.starlight-line.is-visible {
  opacity: 1;
  transform: none;
}

/* greeting & sign distinct from body */
.star-letter-greeting {
  font-size: clamp(18px, 2.8vw, 24px);
  color: rgba(241, 236, 222, 0.82);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-6);
}
.star-letter-sign {
  margin-top: var(--space-6);
  font-size: clamp(18px, 2.8vw, 24px);
  color: var(--gold);
  text-shadow:
    0 0 16px rgba(233, 191, 108, 0.55),
    0 0 36px rgba(233, 191, 108, 0.20);
}
.star-letter-sign-mark {
  display: inline-block;
  margin-left: 6px;
  color: var(--gold);
  animation: star-twinkle 2.4s ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}

/* tiny gold "pinpricks" left and right of body lines, like punctuation stars */
.star-letter-body .starlight-line::before,
.star-letter-body .starlight-line::after {
  content: "·";
  display: inline-block;
  margin: 0 0.6em;
  color: rgba(233, 191, 108, 0.5);
  font-weight: bold;
  vertical-align: middle;
  transform: translateY(-0.15em);
}

/* cursor-proximity boost — driven by JS via --proximity (0..1) */
.starlight-line.is-near {
  text-shadow:
    0 0 22px rgba(233, 191, 108, 0.55),
    0 0 60px rgba(233, 191, 108, 0.30),
    0 0 4px rgba(241, 236, 222, 0.6);
  color: rgba(255, 248, 230, 1);
}

/* On constellation theme, the ::before/::after for the eyebrow's dashes need
   to switch from crimson to gold for legibility on the dark background. */
.scene--letter-stars .scene-eyebrow {
  color: var(--gold);
}

/* Mobile — tighter, slightly smaller body lines */
@media (max-width: 640px) {
  .star-letter { padding: var(--space-6) var(--space-4); }
  .starlight-line { font-size: clamp(17px, 4.2vw, 22px); max-width: 22ch; }
  .star-letter-body .starlight-line::before,
  .star-letter-body .starlight-line::after { display: none; }
}

/* Desktop magazine grid breakpoint: the letter scene needs to span all columns
   so the starlight text centres in the viewport. Override the asymmetric L-side
   placement that's normally applied to .scene--letter. */
@media (min-width: 1024px) {
  .scene--letter-stars > * {
    grid-column: 2 / span 10 !important;
    text-align: center;
  }
  .scene--letter-stars::before { display: none; }   /* hide watermark for this scene */
}

/* ======================================================================
   Memory polaroid WebGL overlay (constellation only)
   A canvas is positioned exactly over each photo's <img>, rendering it as
   a textured plane with hover-driven RGB chromatic aberration + ripple
   displacement. The original <img> is dimmed but kept in flow for sizing.
   ====================================================================== */
.memory-card--photo { position: relative; }
.memory-card--photo .memory-fx-canvas {
  position: absolute;
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s var(--ease-out-expo);
  /* Match the photo's cinematic glow — without this the WebGL canvas
     replaces the img and the box-shadow is lost. */
  box-shadow:
    0 0 0 1px rgba(241, 236, 222, 0.10),
    0 0 0 6px rgba(241, 236, 222, 0.03),
    0 0 80px rgba(233, 191, 108, 0.18),
    0 40px 100px rgba(0, 0, 0, 0.7);
}
.memory-card--photo img.is-fx-active {
  opacity: 0.001;          /* keep in layout, but invisible — canvas takes over */
}

/* ======================================================================
   Cinematic preloader (constellation only)
   Full-viewport black overlay where stars assemble into the rakhi mandala,
   then dissolve into the page after ~2.5s.
   ====================================================================== */
.rakhi-preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(ellipse at center, rgba(20, 25, 59, 0.6), rgba(5, 8, 24, 1) 75%);
  pointer-events: all;
  transition: opacity 0.9s var(--ease-out-expo);
}
.rakhi-preloader.is-done {
  opacity: 0;
  pointer-events: none;
}
.rakhi-preloader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* subtle radial pulse behind stars to give a "loading" feel */
.rakhi-preloader-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233, 191, 108, 0.18), transparent 60%);
  animation: preloader-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes preloader-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.4; }
  50%      { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
}
/* hard-disable for reduced motion / small touch devices: instant dismiss */
@media (prefers-reduced-motion: reduce) {
  .rakhi-preloader { display: none; }
}

/* ======================================================================
   Mobile spacing pass (≤ 640px)
   Tighten vertical rhythm + side gutters so the page reads well on phones
   without feeling stretched out across many empty viewports.
   ====================================================================== */
@media (max-width: 640px) {
  /* page rhythm */
  .scene { padding: var(--space-7) 0; }                         /* 96 → 48 */
  .story { padding: 0 var(--space-4) var(--space-7); }          /* 24 → 16 sides, 96 → 48 bottom */
  .scene-title { margin-bottom: var(--space-5); }
  .scene-eyebrow { margin-bottom: var(--space-2); letter-spacing: 0.22em; }

  /* hero — keep a full screen but tighten paddings + type */
  .hero { padding: var(--space-6) var(--space-4); min-height: 92svh; }
  .hero-inner { gap: var(--space-3); }
  .hero-eyebrow { font-size: 11px; letter-spacing: 0.26em; }
  .hero-eyebrow::before, .hero-eyebrow::after { width: 18px; margin: 0 var(--space-2); }
  .hero-name { font-size: clamp(40px, 14vw, 96px); line-height: 0.95; }
  .hero-from { font-size: 13px; }
  .hero-music { margin-top: var(--space-4); padding: 9px 16px; font-size: 12px; }
  .hero-scroll { margin-top: var(--space-5); }

  /* sealed note */
  .rakhi-note { padding: clamp(28px, 7vw, 40px) clamp(18px, 5vw, 28px); min-height: 420px; }
  .rakhi-note::before { inset: clamp(28px, 7vw, 40px) clamp(18px, 5vw, 28px); }
  .note-corner { width: 22px; height: 22px; }
  .note-corner--tl { top: 10px; left: 10px; }
  .note-corner--tr { top: 10px; right: 10px; }
  .note-corner--bl { bottom: 10px; left: 10px; }
  .note-corner--br { bottom: 10px; right: 10px; }
  .note-header { margin-bottom: var(--space-5); }
  .env-hint { margin-top: var(--space-3); }

  /* memory cards */
  .memory-card { padding: 8px 8px 26px; max-width: 100%; }
  .memory-card figcaption { font-size: 11px; bottom: 8px; }
  .memory-stack { gap: var(--space-4); }

  /* voice player — stack meta cleanly */
  .voice-card { padding: var(--space-4); gap: var(--space-3); border-radius: var(--radius-md); }
  .voice-play { width: 48px; height: 48px; }
  .voice-play-icon { width: 22px; height: 22px; }
  .voice-meta { flex-wrap: wrap; gap: var(--space-2); }
  .voice-from { width: 100%; text-align: center; order: -1; font-size: 13px; }

  /* spotify */
  .playlist-card { border-radius: var(--radius-md); }

  /* album link — keep horizontal, tighter */
  .album-card { padding: 10px; gap: var(--space-3); }
  .album-thumb { width: 72px; height: 72px; }
  .album-source { font-size: 10px; }
  .album-cta { font-size: 16px; }

  /* wish */
  .scene--wish .wish-sub { margin-top: -10px; margin-bottom: var(--space-5); font-size: 14px; }
  .wish-cta { padding: 14px 22px; font-size: 14px; }

  /* wish modal sheet — tighter on phones */
  .wish-modal-sheet { padding: var(--space-6) var(--space-4) var(--space-4); }
  .wish-modal-sheet h3 { font-size: 21px; margin-bottom: var(--space-4); }
  .wish-modal-sheet textarea { min-height: 96px; }
  .wish-actions { gap: var(--space-2); }
  .wish-btn-ghost, .wish-btn-primary { padding: 11px 18px; font-size: 13px; }

  /* footer */
  .rakhi-footer { padding: var(--space-6) var(--space-4); margin-top: var(--space-6); font-size: 11px; }

  /* preview banner */
  .preview-banner { font-size: 12px; padding: 8px 12px; }

  /* respect iOS safe area at bottom */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
}

/* even tighter for very small phones */
@media (max-width: 380px) {
  .scene { padding: var(--space-6) 0; }
  .story { padding: 0 var(--space-3) var(--space-6); }
  .hero { padding: var(--space-5) var(--space-3); }
  .hero-name { font-size: clamp(38px, 13vw, 72px); }
  .rakhi-note { padding: 24px 16px; min-height: 380px; }
  .rakhi-note::before { inset: 24px 16px; }
  .voice-card { padding: var(--space-3); }
  .voice-play { width: 44px; height: 44px; }
  .album-thumb { width: 64px; height: 64px; }
}

/* ======================================================================
   Reduced motion
   ====================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .scene { opacity: 1; transform: none; }
  .ambient-petals { display: none; }
  #hero-canvas { display: none; }
  .hero-poster { opacity: 0.6; }
  .scroll-progress, .section-indicator { display: none; }
  .cursor, .cursor-trail-dot { display: none; }
  body.has-cursor { cursor: auto; }
  .rakhi-illus { animation: none; }
}

/* ======================================================================
   Desktop layout — magazine-spread asymmetry
   Wider container, scene content shifts left/right alternately, with
   massive Roman-numeral watermarks filling the negative space on the
   opposite side. Mobile and tablet untouched.
   ====================================================================== */
@media (min-width: 1024px) {
  .story {
    max-width: 1280px;
    padding: 0 var(--space-8) var(--space-9);
  }

  /* Each scene becomes a 12-col grid, content placed asymmetrically.
     A massive ::before watermark fills the opposite side of the spread. */
  .scene {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--space-6);
    padding: var(--space-9) 0;
    text-align: left;
    overflow: visible;
  }
  .scene > * {
    position: relative;
    z-index: 2;
  }
  .scene .scene-eyebrow,
  .scene .scene-title {
    text-align: left;
    margin-left: 0;
  }

  /* Watermark numerals — huge, faint, decorative chapter markers */
  .scene::before {
    content: "";
    position: absolute;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(160px, 22vw, 280px);
    line-height: 0.78;
    letter-spacing: -0.04em;
    color: rgba(192, 57, 43, 0.07);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transition: transform 0.6s var(--ease-out-expo);
  }

  /* True L → R → L → R alternation. Watermark always on opposite side.
     II Letter   LEFT  · wm RIGHT
     III Memory  RIGHT · wm LEFT
     IV Voice    LEFT  · wm RIGHT
     V Playlist  RIGHT · wm LEFT
     VI Album    LEFT  · wm RIGHT
     VII Wish    centred · wm behind */

  /* II — The Letter */
  .scene--letter > *           { grid-column: 1 / span 7; }
  .scene--letter::before       { content: "II";  right: -20px; top: 8%; }

  /* III — The Memory */
  .scene--memory > *           { grid-column: 6 / span 7; text-align: left; }
  .scene--memory > .scene-eyebrow,
  .scene--memory > .scene-title { text-align: left; }
  .scene--memory::before       { content: "III"; left: -20px; top: 8%; }

  /* IV — In Their Voice */
  .scene--voice > *            { grid-column: 1 / span 7; }
  .scene--voice::before        { content: "IV";  right: -20px; top: 8%; }

  /* V — Our Soundtrack */
  .scene--playlist > *         { grid-column: 6 / span 7; }
  .scene--playlist::before     { content: "V";   left: -20px; top: 12%; }

  /* VI — More Memories */
  .scene--album > *            { grid-column: 1 / span 7; }
  .scene--album::before        { content: "VI";  right: -20px; top: 8%; }

  /* VII — A Blessing (content centered, watermark behind) */
  .scene--wish > *             { grid-column: 3 / span 8; text-align: center; }
  .scene--wish::before         { content: "VII"; left: 50%; top: 12%; transform: translateX(-50%); color: rgba(192, 57, 43, 0.05); }
  .scene--wish .scene-eyebrow,
  .scene--wish .scene-title    { text-align: center; }

  /* Memory stack — narrower constraint now (cols 6-12), so tighter gap and
     allow the polaroids to wrap to a single column when only ~750px wide. */
  .memory-stack {
    gap: var(--space-5);
    justify-content: flex-start;
  }
  .memory-card { flex: 0 1 320px; }

  /* HERO — oversize name, left-aligned, full bleed */
  .hero { padding: var(--space-9) var(--space-8); }
  .hero-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    align-items: flex-start;
    text-align: left;
    gap: var(--space-5);
  }
  .hero-eyebrow {
    text-align: left;
  }
  .hero-eyebrow::before { display: none; }   /* drop the centring dashes */
  .hero-name {
    font-size: clamp(96px, 16vw, 220px);
    margin-left: -0.04em;                    /* optical alignment */
  }
  .hero-from { font-size: 17px; margin-top: var(--space-2); }
  .hero-music { align-self: flex-start; }
  .hero-scroll { align-self: center; margin-top: var(--space-8); }
}

/* Wider screens — bigger watermarks + a subtle parallax drift */
@media (min-width: 1440px) {
  .scene::before { font-size: clamp(200px, 24vw, 340px); }
  .story { max-width: 1360px; }
}

/* ======================================================================
   COSMIC RESTRUCTURE — full-bleed cinematic layout (mobile-first)
   Overrides the inherited magazine grid to make each scene a 100svh
   full-viewport moment with no chrome. The persistent fixed canvas runs
   behind everything; HTML overlays just hold text, photos, controls.
   ====================================================================== */

/* canvas + body bg already fixed-positioned. Strengthen them as the
   "permanent cosmos" backdrop across the whole page. */
#hero-canvas { opacity: 0.95 !important; }
.hero-poster { display: none; }       /* not needed — canvas covers */

/* Strip ALL chrome — no scroll progress bar, no section indicator,
   no Roman watermarks. The cosmos is the navigation. */
.scroll-progress,
.section-indicator { display: none !important; }
.scene::before     { display: none !important; }   /* watermarks off */

/* Story container: no max-width, no centring — full-bleed children */
.story {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
}

/* Default scene — compact, centred, dense. NOT full-bleed.
   Endless 100svh per section reads as empty scroll. We promote only
   selected scenes (hero, letter, wish) to true cinematic moments. */
.scene {
  padding: clamp(64px, 10vh, 120px) clamp(20px, 5vw, 48px) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  grid-template-columns: none !important;
}
.scene > * {
  grid-column: auto !important;
  width: 100%;
  max-width: min(820px, 100%);
  text-align: center !important;
}

/* CINEMATIC MOMENTS — these earn the full viewport. Three only. */
.hero,
.scene--letter-stars,
.scene--wish {
  min-height: 100svh;
}

/* GSAP cinematic reveals manage opacity per child element. The scene container
   itself stays visible — its children do the dance. */
.scene {
  opacity: 1 !important;
  transform: none !important;
}

/* ======================================================================
   Photo lightbox — click any memory polaroid to zoom into fullscreen.
   Cinematic backdrop blur + scale-in entrance. Esc / click-outside to dismiss.
   ====================================================================== */
.memory-card--photo {
  cursor: zoom-in;
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 24, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
  cursor: zoom-out;
  padding: clamp(20px, 5vh, 60px) clamp(20px, 5vw, 60px);
}
.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.photo-lightbox-img {
  max-width: 92vw;
  max-height: 86svh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgba(241, 236, 222, 0.10),
    0 0 80px rgba(233, 191, 108, 0.18),
    0 30px 100px rgba(0, 0, 0, 0.7);
  transform: scale(0.85);
  opacity: 0;
  transition:
    transform 0.7s var(--ease-out-expo),
    opacity 0.5s var(--ease-out-expo);
  display: block;
  cursor: zoom-out;
}
.photo-lightbox.is-open .photo-lightbox-img {
  transform: scale(1);
  opacity: 1;
}
.photo-lightbox-close {
  position: absolute;
  top: clamp(16px, 4vh, 32px);
  right: clamp(16px, 4vw, 32px);
  width: 52px; height: 52px;
  border: 1px solid rgba(241, 236, 222, 0.28);
  background: rgba(20, 25, 59, 0.7);
  color: var(--ink);
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 1;
  font-family: inherit;
}
.photo-lightbox-close:hover {
  background: rgba(20, 25, 59, 0.95);
  border-color: var(--gold);
  transform: scale(1.06);
}
@media (hover: none), (pointer: coarse) {
  .photo-lightbox-close { width: 56px; height: 56px; }
}

/* Hero is a header, not .scene — match it to the same full-bleed feel */
.hero {
  min-height: 100svh;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-inner {
  align-items: center !important;
  text-align: center !important;
  max-width: min(820px, 100%) !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
.hero-eyebrow { text-align: center !important; }
.hero-eyebrow::before { display: inline-block !important; }
.hero-name {
  font-size: clamp(56px, 16vw, 180px) !important;
  text-align: center !important;
  margin-left: 0 !important;
  line-height: 0.92 !important;
}
.hero-from { text-align: center; }
.hero-music, .hero-scroll { align-self: center !important; }

/* Section eyebrow + title — bigger, bolder, centred for full-bleed */
.scene-eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  margin-bottom: var(--space-4);
  color: var(--gold);
}
.scene-title {
  font-size: clamp(40px, 9vw, 96px) !important;
  line-height: 1.0 !important;
  margin-bottom: var(--space-7) !important;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Letter scene — already starlight, full-bleed override */
.scene--letter-stars {
  text-align: center !important;
}
.scene--letter-stars > * { grid-column: auto !important; max-width: min(880px, 100%); }
.starlight-line {
  font-size: clamp(22px, 5vw, 44px) !important;
  line-height: 1.4 !important;
  max-width: min(720px, 92vw) !important;
}
.star-letter-greeting,
.star-letter-sign { font-size: clamp(18px, 3vw, 28px) !important; }

/* Memory section — Lusion-style project cards.
   Intro slice (eyebrow + title) gets a 60svh "header" feel.
   Each .memory-project (photo or video) gets its own ~95svh viewport with
   tags above + media in the middle + title with arrow below. */
.scene--memory {
  padding: 0 !important;
  align-items: stretch;
  min-height: auto;
}
.scene--memory-intro {
  min-height: 45svh;
  display: grid;
  place-items: center;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 5vw, 48px);
  text-align: center;
}
.scene--memory-intro .scene-title {
  margin: 0 !important;
}
.memory-stack {
  flex-direction: column !important;
  gap: 0 !important;
  width: 100%;
  perspective: none !important;
}

/* Each project = its own ~75svh viewport, mobile-first */
.memory-project {
  width: 100% !important;
  max-width: none !important;
  min-height: 75svh;
  margin: 0 !important;
  padding: clamp(24px, 4vh, 48px) clamp(20px, 5vw, 48px);
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  --base-rot: 0deg !important;
  transform: none !important;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  row-gap: clamp(16px, 3vh, 32px);
  position: relative;
}

/* Tag line — small caps, letter-spaced, like Lusion's project tags */
.memory-project-tags {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.memory-project-tag-sep { opacity: 0.5; }

/* Media — large, centred, with cinematic glow */
.memory-project-media {
  width: 100%;
  max-width: min(640px, 86vw);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.memory-project-media img,
.memory-project-media video {
  width: 100%;
  height: auto;
  max-height: 70svh;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgba(241, 236, 222, 0.10),
    0 0 0 6px rgba(241, 236, 222, 0.03),
    0 0 80px rgba(233, 191, 108, 0.18),
    0 40px 100px rgba(0, 0, 0, 0.7);
}
.memory-project-media video {
  background: #000;
  max-height: 60svh;
}

/* Title with arrow indicator — Lusion-style "→ Title" */
.memory-project-title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}
.memory-project-arrow {
  display: inline-block;
  font-style: normal;
  font-size: 0.85em;
  color: var(--gold);
  transform: translateX(0);
  transition: transform 0.4s var(--ease-out-expo), color 0.3s;
}
.memory-project:hover .memory-project-arrow {
  transform: translateX(8px);
  color: var(--ink);
}

/* Lightbox cursor only on photo projects (videos have native controls) */
.memory-card--video { cursor: default; }
.memory-card--photo { cursor: zoom-in; }

/* Desktop refinement — wider, larger type */
@media (min-width: 900px) {
  .memory-project-media { max-width: min(900px, 70vw); }
  .memory-project-tags { font-size: 12px; letter-spacing: 0.24em; }
  .memory-project-title { font-size: clamp(28px, 4vw, 56px); }
}

/* Reduced motion — disable arrow translate */
@media (prefers-reduced-motion: reduce) {
  .memory-project:hover .memory-project-arrow { transform: none; }
}

/* Voice scene */
.scene--voice .voice-card {
  background: rgba(20, 25, 59, 0.5) !important;
  width: min(640px, 100%) !important;
  max-width: 640px !important;
}

/* Playlist scene */
.scene--playlist .playlist-card {
  width: min(640px, 100%);
  background: rgba(20, 25, 59, 0.5) !important;
}

/* Album scene */
.scene--album .album-card {
  width: min(540px, 100%);
  background: rgba(20, 25, 59, 0.5) !important;
}

/* Wish scene — single CTA centred in space */
.scene--wish .wish-sub {
  font-size: clamp(15px, 2.5vw, 18px);
  margin: var(--space-3) auto var(--space-7);
  max-width: 38ch;
}
.scene--wish .wish-cta {
  padding: 18px 36px !important;
  font-size: 16px !important;
  letter-spacing: 0.04em;
  background: var(--gold) !important;
  color: var(--bg-deep) !important;
  box-shadow:
    0 0 0 1px rgba(241, 236, 222, 0.2),
    0 0 36px rgba(233, 191, 108, 0.40),
    0 12px 36px rgba(0, 0, 0, 0.5) !important;
}
.scene--wish .wish-cta:hover {
  background: var(--ink) !important;
  color: var(--gold) !important;
  transform: translateY(-2px) !important;
}

/* Footer — minimal, centred, fades into the cosmos */
.rakhi-footer {
  min-height: auto;
  padding: clamp(32px, 5vh, 64px) clamp(20px, 5vw, 48px) clamp(32px, 6vh, 60px) !important;
  border-top: none !important;
  display: grid;
  place-items: center;
  text-align: center;
}

/* Mobile spacing pass tightening — already mobile-first by default */
@media (max-width: 480px) {
  .scene-title { font-size: clamp(36px, 11vw, 56px) !important; }
  .starlight-line { font-size: clamp(20px, 5.5vw, 28px) !important; }
  .memory-card img, .memory-card video { max-width: 84vw; }
}

/* Desktop: undo the mobile-tight values, give type more air */
@media (min-width: 1024px) {
  .hero-name { font-size: clamp(96px, 14vw, 220px) !important; }
  .scene-title { font-size: clamp(56px, 7vw, 112px) !important; }
  .starlight-line { font-size: clamp(28px, 3vw, 42px) !important; }
}

/* Edit pill — owner affordance on the published page (sits above the PIN gate) */
.edit-pill {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(15, 17, 50, 0.78);
  color: #e9e7ff;
  font: 600 12px/1 "Inter", -apple-system, system-ui, sans-serif;
  text-decoration: none;
  letter-spacing: 0.02em;
  border: 1px solid rgba(233, 231, 255, 0.18);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.edit-pill:hover {
  background: rgba(15, 17, 50, 0.92);
  border-color: rgba(233, 231, 255, 0.32);
  transform: translateY(-1px);
}
.edit-pill:active { transform: translateY(0); }
.edit-pill svg { display: block; }
@media (min-width: 1024px) { .edit-pill { top: 22px; right: 22px; padding: 9px 18px 9px 14px; font-size: 13px; } }
