:root {
  --rose:     #e8547a;
  --rose-lt:  #f9b8cb;
  --blush:    #fde8ef;
  --blush2:   #fcd5e0;
  --petal:    #fff0f5;
  --gold:     #d4956a;
  --gold-lt:  #f5c9a0;
  --mauve:    #c2607a;
  --cream:    #fff8fb;
  --ink:      #3a1828;
  --ink-soft: #6b3050;
  --lavender: #d4a0c0;
  --bg:       #fff0f4;

  --paper-0:  #fff6ee;
  --paper-1:  #f9e2d2;
  --paper-2:  #f2c9b8;

  --rose-deep: #a80f43;

  --ease-out:  cubic-bezier(.2,.7,.2,1);
  --font-heading: "Playfair Display", serif;
  --font-serif: "Cormorant Garamond", serif;
  --font-cursive: "Great Vibes", cursive;
  --font-sans: "Montserrat", sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ height:100%; font-family:var(--font-serif); }

body{
  background:var(--bg);
  color:var(--ink);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  cursor:none;
}

.scene{ position:fixed; inset:0; overflow:hidden; }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ── CUSTOM CURSOR ── */
#cur { position:fixed;width:14px;height:14px;background:var(--rose);border-radius:50%;pointer-events:none;z-index:99999;transform:translate(-50%,-50%);transition:width .25s,height .25s,background .3s;mix-blend-mode:multiply; }
#cur-ring { position:fixed;width:38px;height:38px;border:1.5px solid rgba(232,84,122,0.45);border-radius:50%;pointer-events:none;z-index:99998;transform:translate(-50%,-50%);transition:left .1s ease,top .1s ease; }
body:has(a:hover) #cur, body:has(button:hover) #cur, body:has(.gallery-card:hover) #cur { width:28px;height:28px;background:var(--mauve); }

/* ── PROGRESS ── */
#prog { position:fixed;top:0;left:0;height:3px;z-index:1001;background:linear-gradient(90deg,var(--rose),var(--gold-lt),var(--rose));width:0%;transition:width .05s; }

/* ── GRID BACKGROUND ── */
.grid-bg {
  position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:
    linear-gradient(rgba(232,84,122,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,84,122,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
.grid-bg::after {
  content:'';position:absolute;inset:0;
  background: radial-gradient(ellipse at 50% 0%, rgba(253,229,240,0.7) 0%, transparent 70%);
}

/* ── MUSIC WIDGET ── */
#music {
  position:fixed;bottom:1.8rem;right:1.8rem;z-index:900;
  background:#fff;border:1px solid rgba(232,84,122,.2);
  border-radius:50px;padding:.7rem 1.4rem;
  display:flex;align-items:center;gap:.8rem;
  box-shadow:0 8px 30px rgba(232,84,122,.18);
  cursor:pointer;
}
.vinyl { width:28px;height:28px;border-radius:50%;background:radial-gradient(circle,var(--ink) 28%,var(--rose) 30%,var(--rose) 45%,var(--blush2) 47%);animation:vSpin 2.5s linear infinite paused; }
.vinyl.on { animation-play-state:running; }
@keyframes vSpin { to{transform:rotate(360deg)} }
.eq { display:flex;gap:3px;align-items:flex-end;height:18px; }
.eqb { width:3px;background:var(--rose);border-radius:2px;animation:eqA .6s ease-in-out infinite alternate paused;height:4px; }
.eqb.on { animation-play-state:running; }
.eqb:nth-child(2){animation-duration:.8s}
.eqb:nth-child(3){animation-duration:.5s}
.eqb:nth-child(4){animation-duration:.9s}
@keyframes eqA { to{height:17px} }
#mtog { background:none;border:none;color:var(--rose-lt);font-size:1rem;cursor:pointer;transition:color .3s; }
#mtog:hover { color:var(--rose); }
.msong { font-family:var(--font-sans);font-size:.65rem;color:rgba(58,24,40,.6);letter-spacing:.05em;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }

.person-name {
  color: var(--rose);
  text-shadow: 0 0 12px rgba(232, 84, 122, 0.3);
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.name-edit-badge {
  background: rgba(232, 84, 122, 0.2);
  border: none;
  color: var(--rose);
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.2s ease, background 0.2s ease;
}
.name-edit-badge:hover { transform: scale(1.2); background: rgba(232, 84, 122, 0.4); }

/* ============================================================
   NAME CUSTOMIZER MODAL
   ============================================================ */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  z-index: 200;
}
.modal-dialog::backdrop {
  background: rgba(58, 24, 40, 0.65);
  backdrop-filter: blur(8px);
}
.modal-card {
  background: linear-gradient(145deg, #ffffff, #fde8ef);
  border: 1px solid rgba(232, 84, 122, 0.3);
  border-radius: 24px;
  padding: 28px 32px;
  width: min(90vw, 420px);
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(232, 84, 122, 0.2);
  text-align: center;
}
.modal-title { font-family: var(--font-heading); font-size: 24px; margin-bottom: 8px; color: var(--rose); }
.modal-desc { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.modal-input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(232, 84, 122, 0.3);
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  margin-bottom: 24px;
  text-align: center;
}
.modal-input:focus { border-color: var(--rose); box-shadow: 0 0 12px rgba(232, 84, 122, 0.3); }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(232, 84, 122, 0.4); }
.btn-secondary {
  background: rgba(232, 84, 122, 0.15);
  color: var(--ink);
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary:hover { background: rgba(232, 84, 122, 0.25); }

/* Sparkle Canvas */
.sparkle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

/* ============================================================
   TREE CANVAS
   ============================================================ */
.tree{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  z-index:1;
}

/* ============================================================
   ACT 1 — HERO & ARCHERY
   ============================================================ */
.hero{
  position:absolute; inset:0;
  z-index:3;
  overflow:hidden;
}
.hero__bg{
  position:absolute; inset:0;
  background:
    radial-gradient(120% 88% at 50% 24%, #fff0f5 0%, var(--blush) 38%, var(--blush2) 74%, var(--rose-lt) 100%);
}
.hero__bg::after{
  content:""; position:absolute; left:50%; top:44%;
  width:min(78vw,720px); aspect-ratio:1; transform:translate(-50%,-50%);
  background:radial-gradient(circle, rgba(253,213,224,.55), rgba(249,184,203,.2) 46%, transparent 70%);
  filter:blur(6px);
}

.hero__motes{ position:absolute; inset:0; pointer-events:none; }
.mote{
  position:absolute; border-radius:50%;
  background:radial-gradient(circle, rgba(253,232,239,.9), rgba(249,184,203,.2) 55%, transparent 72%);
  will-change:transform, opacity;
}

.hero__eyebrow{
  position:absolute; top:13%; left:0; right:0;
  text-align:center;
  font-family:var(--font-sans);
  font-size:clamp(11px, 2.2vw, 15px);
  letter-spacing:.35em; text-transform:uppercase;
  color:var(--gold);
  text-shadow:0 1px 10px rgba(253,232,239,.9);
  opacity:0;
}

/* target heart */
.targetWrap{
  position:absolute; top:33%; left:0; right:0;
  display:flex; justify-content:center;
  transform:translateY(-50%);
  pointer-events:none;
}
.target{
  position:relative;
  width:clamp(120px, 27vw, 208px);
  aspect-ratio:100/92;
  will-change:transform;
  transform-origin:50% 60%;
}
.target__heart{ position:absolute; inset:0; display:block; }

.heart__glow{
  position:absolute; left:50%; top:52%;
  width:230%; aspect-ratio:1; transform:translate(-50%,-50%) scale(1);
  border-radius:50%;
  background:radial-gradient(circle, rgba(249,184,203,.6), rgba(232,84,122,.2) 42%, transparent 68%);
  filter:blur(4px);
  pointer-events:none;
  will-change:transform, opacity;
}
.heart__svg{
  width:100%; height:100%; display:block;
  transform-origin:50% 60%;
  filter:
    drop-shadow(0 10px 22px rgba(232,84,122,.34))
    drop-shadow(0 3px 6px rgba(194,96,122,.30));
  will-change:transform;
}

/* bow + arrow */
.archery{
  position:absolute; top:0; left:0;
  width:clamp(100px, 18vw, 168px);
  cursor:grab;
  -webkit-tap-highlight-color:transparent;
  touch-action:none;
  will-change:transform;
}
.archery:active{ cursor:grabbing; }
.archery:focus-visible{ outline:none; }
.bow{
  display:block; width:100%; height:auto;
  filter:drop-shadow(0 12px 18px rgba(90,40,15,.3));
  overflow:visible;
}

.aim{
  position:absolute; left:50%; bottom:32%;
  width:2px; height:190%; margin-left:-1px;
  transform-origin:bottom center;
  background:linear-gradient(0deg, rgba(245,201,160,.6) 0%, rgba(249,184,203,.22) 52%, transparent 78%);
  opacity:0; pointer-events:none;
}

.arrow{
  position:absolute; left:0; right:0; margin-inline:auto;
  bottom:36%;
  width:17.5%; height:auto;
  overflow:visible;
  will-change:transform;
  filter:drop-shadow(0 5px 7px rgba(90,40,15,.36));
}
.arrow__wings{ transform-box:fill-box; transform-origin:50% 90%; }
.arrow__wings .wingL,
.arrow__wings .wingR{ transform-box:fill-box; }
.wingL{ transform-origin:88% 60%; animation:flapL 2.6s ease-in-out infinite; }
.wingR{ transform-origin:12% 60%; animation:flapR 2.6s ease-in-out infinite; }
@keyframes flapL{ 0%,100%{ transform:rotate(0deg); } 50%{ transform:rotate(-11deg); } }
@keyframes flapR{ 0%,100%{ transform:rotate(0deg); } 50%{ transform:rotate(11deg); } }

.hero__hint{
  position:absolute; bottom:8.5%; left:0; right:0;
  text-align:center;
  font-family:var(--font-serif);
  font-weight:600; font-style:italic;
  font-size:clamp(13px, 3.1vw, 19px);
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--mauve);
  opacity:0;
}

/* ACT 2 & 3 */
.flood{
  position:absolute; left:50%; top:50%;
  width:140px; height:140px; margin:-70px 0 0 -70px;
  border-radius:50%;
  background:radial-gradient(circle at 40% 34%, var(--rose-lt), var(--rose) 46%, var(--mauve) 100%);
  z-index:5;
  opacity:0; transform:scale(.001);
  will-change:transform, opacity;
  pointer-events:none;
}

.field{
  position:absolute; inset:0;
  z-index:4;
  opacity:0;
  pointer-events:none;
  overflow:hidden;
  background:
    radial-gradient(120% 100% at 50% 8%, var(--rose-lt) 0%, var(--rose) 42%, var(--mauve) 78%, var(--ink) 100%);
  color:#fff;
}
.blob{
  position:absolute; border-radius:50%;
  filter:blur(46px); opacity:0;
  mix-blend-mode:screen;
  will-change:transform, opacity;
}
.blob--1{ width:58vmax; height:58vmax; left:-18vmax; top:-16vmax;
  background:radial-gradient(circle, rgba(249,184,203,.9), transparent 62%); }
.blob--2{ width:46vmax; height:46vmax; right:-14vmax; top:22vmax;
  background:radial-gradient(circle, rgba(232,84,122,.75), transparent 64%); }
.blob--3{ width:52vmax; height:52vmax; left:24vmax; bottom:-22vmax;
  background:radial-gradient(circle, rgba(194,96,122,.8), transparent 66%); }

.fgrid{
  position:absolute; inset:-6%;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:clamp(38px,7vw,74px) clamp(38px,7vw,74px);
  will-change:transform;
}
.fvignette{
  position:absolute; inset:0;
  background:radial-gradient(128% 96% at 50% 44%, transparent 50%, rgba(58,24,40,.5) 100%);
}

.camera{
  position:absolute; inset:0;
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  gap:clamp(4px,1.2vh,12px);
  padding:0 6vw; text-align:center;
  will-change:transform;
}
.kEyebrow{
  font-family:var(--font-serif);
  font-style:italic; font-weight:500;
  font-size:clamp(15px, 3.6vw, 27px);
  letter-spacing:.08em;
  color:#fde8ef;
  opacity:0; transform:translateY(10px);
  margin-bottom:clamp(2px,1vh,10px);
}

.headline{ font-family:var(--font-heading); line-height:.92; }
.hl__line{ display:block; }
.mask{
  display:inline-block; overflow:hidden;
  padding:.14em .06em;
  margin:-.14em -.06em;
}
.hl__word{
  display:inline-block;
  font-weight:900;
  font-size:clamp(48px, 14vw, 150px);
  letter-spacing:-.02em;
  color:#fff0f5;
  text-shadow:0 6px 34px rgba(58,24,40,.34), 0 2px 3px rgba(90,8,36,.42);
}
.hl__ch{ display:inline-block; will-change:transform; }

.uline{
  width:clamp(150px, 40vw, 380px); height:auto;
  margin-top:clamp(4px,1.4vh,14px);
  color:var(--gold-lt);
  filter:drop-shadow(0 2px 8px rgba(212,149,106,.5));
}
.kSub{
  margin-top:clamp(12px,2.4vh,26px);
  font-family:var(--font-serif);
  font-weight:500; font-style:italic;
  font-size:clamp(14px, 3.4vw, 24px);
  letter-spacing:.05em;
  color:#fde8ef;
  opacity:0; transform:translateY(10px);
}

.bar{
  position:absolute; left:0; right:0; height:16vh;
  background:#280d19; z-index:3; will-change:transform; pointer-events:none;
}
.bar--top{ top:0; }
.bar--bot{ bottom:0; }

.bloom{
  position:absolute; left:50%; top:50%;
  width:60px; height:60px; margin:-30px 0 0 -30px;
  border-radius:50%;
  background:radial-gradient(circle, #fff 0%, #fde8ef 30%, rgba(249,184,203,.85) 55%, rgba(249,184,203,0) 74%);
  z-index:8; opacity:0; transform:scale(.001);
  will-change:transform, opacity; pointer-events:none;
}

/* ============================================================
   ACT 4 — THE/* ============================================================
   ACT 4 — ULTRA-PREMIUM FROSTED GLASS WISH CARD
   ============================================================ */
/* ============================================================
   ACT 4 — ULTRA-PREMIUM FROSTED GLASS WISH CARD
   ============================================================ */
.wish{
  position:absolute;
  left:5vw; bottom:7vh;
  max-width:min(540px, 88vw);
  z-index:6;
  pointer-events:auto;
  color:var(--ink);
  visibility:hidden;
}
.wish.is-in{ visibility:visible; }

.wish-glass-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(253, 226, 236, 0.86) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1.5px solid rgba(232, 84, 122, 0.35);
  border-radius: 32px;
  padding: 2.2rem 2.8rem;
  box-shadow:
    0 30px 80px rgba(168, 15, 67, 0.22),
    0 10px 25px rgba(194, 96, 122, 0.15),
    inset 0 2px 0 #ffffff;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: visible;
}
.wish-glass-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 38px 90px rgba(168, 15, 67, 0.28),
    0 14px 30px rgba(194, 96, 122, 0.2),
    inset 0 2px 0 #ffffff;
}

/* Floating Sparkles */
.card-sparkle {
  position: absolute;
  font-size: 18px;
  pointer-events: none;
  animation: sparkleFloat 3s infinite ease-in-out;
}
.card-sparkle--top-right { top: -12px; right: 18px; animation-delay: 0s; }
.card-sparkle--bottom-left { bottom: -10px; left: 24px; animation-delay: 1.5s; }
@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.85; }
  50% { transform: translateY(-8px) scale(1.25) rotate(12deg); opacity: 1; }
}

.wish__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 84, 122, 0.12);
  border: 1px solid rgba(232, 84, 122, 0.3);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 12px rgba(232, 84, 122, 0.1);
}
.sparkle-icon { font-size: 13px; color: var(--rose-deep); }

.wish__eyebrow{
  font-family:var(--font-sans);
  font-weight:700;
  font-size:clamp(11px, 2vw, 13px);
  letter-spacing:.15em; text-transform:uppercase;
  color:var(--rose-deep);
}

.wish__heroWrap{
  position:relative;
  display:block;
  width: 100%;
  margin: 0.4rem 0 0.6rem;
}

.wish__hero{
  font-family:var(--font-cursive);
  line-height:1.05;
  margin:0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.wHero__main {
  font-family: var(--font-cursive);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 68px);
  color: #a80f43;
  background: linear-gradient(135deg, #a80f43 0%, #e8547a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(168, 15, 67, 0.2));
}

.wHero__name {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(40px, 6.5vw, 76px);
  color: #800020;
  background: linear-gradient(135deg, #800020 0%, #e8547a 50%, #c2607a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(128, 0, 32, 0.35));
  margin-top: -8px;
}

.wish__rule{
  display:block; width:clamp(80px, 20vw, 160px); height:4px;
  margin:.6em 0 .8em;
  border-radius:999px;
  background:linear-gradient(90deg, #a80f43, #e8547a, rgba(212,149,106,0));
  box-shadow:0 0 12px rgba(232,84,122,0.5);
  transform-origin:left center;
}

.wish__sub{
  font-family:var(--font-serif);
  font-weight:700; font-style:italic;
  font-size:clamp(15px, 2.8vw, 22px);
  letter-spacing:.02em; color:#4a1c2e;
  text-shadow:0 1px 2px rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.heart-pulse {
  display: inline-block;
  color: var(--rose);
  animation: heartBeat 1.4s infinite ease-in-out;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  40% { transform: scale(1); }
  60% { transform: scale(1.2); }
}

.wish__eyebrow, .wish__rule, .wish__sub, .wish__hero{
  opacity:0; transform:translateY(14px); filter:blur(4px);
  transition:opacity .8s ease, transform .9s var(--ease-out), filter .8s ease;
}
.wish__rule{ transform:translateY(14px) scaleX(.3); }

.wish.is-in .wish__eyebrow,
.wish.is-in .wish__sub,
.wish.is-in .wish__hero{ opacity:1; transform:translateY(0); filter:blur(0); }
.wish.is-in .wish__rule{ opacity:1; transform:translateY(0) scaleX(1); }
.wish.is-in .wish__rule{ transition-delay:0.8s; }
.wish.is-in .wish__sub{ transition-delay:1.0s; }
.wish.is-in .wish__hero{ transition-delay:0.4s; }

/* Next Step Button (Memories Section Unlock) */
.next-step-container {
  margin-top: 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 1.2s, transform 1s ease 1.2s;
  pointer-events: auto;
}
.wish.is-in .next-step-container { opacity: 1; transform: translateY(0); }

.step-next-btn {
  background: linear-gradient(135deg, #e8547a 0%, #a80f43 100%);
  color: white;
  border: none;
  padding: 14px 34px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(168, 15, 67, 0.4);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-next-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 50%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: rotate(30deg);
  transition: left 0.75s ease;
}
.step-next-btn:hover::after {
  left: 130%;
}
.step-next-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 40px rgba(168, 15, 67, 0.6);
}
.step-next-btn--glow {
  animation: pulseStepBtn 2.2s infinite alternate ease-in-out;
}
@keyframes pulseStepBtn { 
  0% { box-shadow: 0 8px 24px rgba(168, 15, 67, 0.4); } 
  100% { box-shadow: 0 14px 40px rgba(232, 84, 122, 0.75), 0 0 22px rgba(249, 184, 203, 0.9); } 
}
@keyframes pulseStepBtn { 0% { box-shadow: 0 6px 20px rgba(232, 84, 122, 0.4); } 100% { box-shadow: 0 12px 35px rgba(249, 184, 203, 0.7); } }

/* REPLAY */
.replay{
  position:absolute; right:20px; bottom:18px; z-index:7;
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 15px 9px 12px; border-radius:999px;
  font:600 12.5px/1 var(--font-sans); letter-spacing:.12em; text-transform:uppercase;
  color:var(--mauve); background:rgba(255,248,251,.72);
  border:1px solid rgba(232,84,122,.18);
  box-shadow:0 6px 20px -8px rgba(194,96,122,.4);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  cursor:pointer; opacity:0; transform:translateY(8px);
  transition:opacity .5s ease, transform .5s var(--ease-out), background .3s ease;
}
.replay.is-shown{ opacity:1; transform:translateY(0); }
.replay:hover{ background:rgba(255,252,248,.92); }
.replay svg{ opacity:.8; }

.grade{ position:absolute; inset:0; z-index:9; pointer-events:none; }
.grade__vignette{
  position:absolute; inset:0;
  background:radial-gradient(125% 95% at 50% 42%, transparent 54%, rgba(58,24,40,.14) 84%, rgba(40,12,22,.3) 100%);
  mix-blend-mode:multiply;
}
.grade__grain{
  position:absolute; inset:0;
  background:url('./textures/grain.png') repeat;
  background-size:300px; opacity:.05; mix-blend-mode:overlay;
}

/* ============================================================
   STEP 4: INTERACTIVE BIRTHDAY CAKE SECTION
   ============================================================ */
.cake-section {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--cream);
  overflow-y: auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.cake-section.hidden { display: none; opacity: 0; pointer-events: none; }

.sec-label {
  font-family: var(--font-sans);
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.sec-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: var(--rose);
  line-height: 1.1;
}

.cake-stage {
  display: inline-block;
  position: relative;
  margin: 1.5rem 0;
}

.cake-svg {
  width: min(340px, 85vw);
  filter: drop-shadow(0 20px 50px rgba(232, 84, 122, 0.25));
}

.blow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 1.1rem 3.2rem;
  background: #fff;
  color: var(--rose);
  border: 2px solid var(--rose);
  border-radius: 60px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(232, 84, 122, 0.18);
  transition: all 0.35s;
}

.blow-btn:hover {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 16px 50px rgba(232, 84, 122, 0.38);
  transform: translateY(-3px);
}
.cake-plate {
  position: absolute;
  bottom: 0;
  width: 320px;
  height: 22px;
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.cake-tier {
  position: relative;
  border-radius: 16px 16px 8px 8px;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.2);
}
.cake-tier--bottom {
  width: 250px;
  height: 90px;
  background: linear-gradient(180deg, var(--rose-lt), var(--rose));
}
.cake-tier--top {
  width: 180px;
  height: 80px;
  background: linear-gradient(180deg, var(--blush), var(--rose-lt));
  margin-bottom: -10px;
  z-index: 2;
}
.cake-frosting {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: #ffffff;
  border-radius: 16px 16px 12px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Candles Layout & Flames */
.candles-wrapper {
  position: absolute;
  top: -45px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-evenly;
  padding: 0 15px;
}
.candle {
  width: 12px;
  height: 48px;
  background: repeating-linear-gradient(45deg, #fff, #fff 6px, var(--rose) 6px, var(--rose) 12px);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.candle:hover { transform: scale(1.15); }
.wick {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: #555;
}
.flame {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #ffee55 0%, #ff8800 60%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 16px #ff8800, 0 0 30px #ffee55;
  animation: flickerFlame 0.8s infinite alternate ease-in-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
@keyframes flickerFlame {
  0% { transform: translateX(-50%) scale(1) rotate(-2deg); }
  100% { transform: translateX(-50%) scale(1.15) rotate(2deg); }
}

.candle.blown .flame { opacity: 0; transform: translateX(-50%) scale(0); pointer-events: none; }
.smoke {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  opacity: 0;
}
.candle.blown .smoke {
  animation: smokeRise 1.2s ease-out forwards;
}
@keyframes smokeRise {
  0% { opacity: 0.8; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(3); filter: blur(4px); }
}

.cake-actions { display: flex; gap: 14px; margin-top: 10px; }
.cake-btn {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232, 84, 122, 0.4);
  transition: all 0.25s ease;
}
.cake-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 25px rgba(232, 84, 122, 0.6); }

.fireworks-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 155;
}

/* Wish Reveal Card & Crystal Heart Break Trigger */
.wish-reveal-card {
  position: absolute;
  z-index: 170;
  background: rgba(255, 248, 251, 0.95);
  color: var(--ink);
  border: 2px solid var(--rose-lt);
  border-radius: 28px;
  padding: 36px 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  animation: popInWish 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.wish-reveal-card.hidden { display: none; }
@keyframes popInWish { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sparkle-badge { background: var(--blush); color: var(--rose); font-size: 13px; font-weight: 700; padding: 4px 14px; border-radius: 999px; display: inline-block; margin-bottom: 12px; }
.wish-reveal-content h3 { font-family: var(--font-heading); font-size: 28px; margin-bottom: 10px; color: var(--rose); }
.wish-reveal-content p { font-family: var(--font-serif); font-size: 18px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 24px; }

.heart-break-trigger { margin-top: 16px; }
.crystal-heart-btn {
  background: rgba(255, 240, 245, 0.95);
  border: 1px solid rgba(232, 84, 122, 0.5);
  padding: 12px 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(232, 84, 122, 0.3);
  position: relative;
  transition: all 0.3s ease;
}
.crystal-heart-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(232, 84, 122, 0.5);
  background: #ffffff;
}
.crystal-heart-svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(232,84,122,0.4)); }
.crystal-heart-text { font-family: var(--font-serif); font-weight: 700; font-size: 15px; color: var(--rose); }
.crystal-heart-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid var(--rose);
  animation: heartPulseRing 2s infinite;
}
@keyframes heartPulseRing { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.15, 1.3); opacity: 0; } }

/* ============================================================
   STEP 5: ANIMATED GALLERY & MOMENTS SECTION
   ============================================================ */
.memory-section {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: var(--cream);
  overflow-y: auto;
  padding: 60px 2rem 40px;
  color: var(--ink);
  transition: opacity 0.6s ease;
}
.memory-section.hidden { display: none; opacity: 0; pointer-events: none; }

.shatter-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 185;
}

.memory-container {
  max-width: 1080px;
  margin: 0 auto;
}
.memory-eyebrow { font-family: var(--font-sans); font-size: 0.65rem; font-weight: 400; letter-spacing: 0.45em; text-transform: uppercase; color: var(--gold); }
.memory-title { font-family: var(--font-heading); font-style: italic; font-size: clamp(32px, 5vw, 52px); color: var(--rose); margin: 8px 0; }

/* Gallery Marquee Cards */
.gallery-marquee-wrap { overflow:hidden;margin:2rem -2rem;padding:0.5rem 0; }
.gallery-marquee-wrap:hover .gallery-row { animation-play-state: paused; }
.gallery-row { display:flex;width:max-content;gap:1.5rem;padding:0.6rem 0;animation:galleryScroll 35s linear infinite; }
.gallery-card {
  width:260px;height:325px;flex-shrink:0;border-radius:24px;
  overflow:hidden;position:relative;cursor:pointer;
  box-shadow:0 12px 40px rgba(232,84,122,0.12);
  border:1px solid rgba(232,84,122,0.12);
  background:#fff;
  transition:transform .5s cubic-bezier(.34,1.56,.64,1),box-shadow .4s;
}
.gallery-card:hover { transform:scale(1.03) translateY(-8px);box-shadow:0 24px 50px rgba(232,84,122,0.22); }
.gallery-card img {
  width:100%;height:100%;object-fit:cover;
  transition:transform .75s ease;
  pointer-events:none;
  display:block;
}
.gallery-card:hover img { transform:scale(1.08); }
.gallery-card-overlay {
  position:absolute;inset:0;
  background:linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 50%, transparent 100%);
  opacity:0;transition:opacity .4s ease;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:1.5rem;pointer-events:none;
}
.gallery-card:hover .gallery-card-overlay { opacity:1; }
.gallery-card-overlay h3 {
  font-family:var(--font-heading);font-style:italic;color:#fff;
  font-size:1.25rem;margin-bottom:.2rem;line-height:1.2;
}
.gallery-card-overlay span {
  font-family:var(--font-sans);font-size:.6rem;
  letter-spacing:.2em;color:rgba(255,255,255,0.85);text-transform:uppercase;
}
@keyframes galleryScroll { to{transform:translateX(-50%)} }

/* GALLERY LIGHTBOX MODAL OVERLAY */
#g-modal-ov {
  position:fixed;inset:0;z-index:60000;
  background:rgba(30,10,20,0.75);backdrop-filter:blur(24px);
  display:flex;align-items:center;justify-content:center;
  padding:1.5rem;
  opacity:0;pointer-events:none;transition:opacity .4s ease;
}
#g-modal-ov.show { opacity:1;pointer-events:all; }
.g-modal-card {
  background:rgba(255,255,255,0.96);border-radius:36px;
  max-width:820px;width:100%;overflow:hidden;
  box-shadow:0 50px 100px rgba(0,0,0,0.4);
  border:1px solid rgba(255,255,255,0.3);
  display:flex;flex-direction:row;position:relative;
  transform:scale(.9) translateY(20px);
  transition:transform .55s cubic-bezier(0.34,1.56,0.64,1);
}
#g-modal-ov.show .g-modal-card { transform:scale(1) translateY(0); }
.g-modal-img-wrap {
  width:50%;min-height:460px;position:relative;overflow:hidden;
}
.g-modal-img-wrap img {
  width:100%;height:100%;object-fit:cover;display:block;
}
.g-modal-content {
  width:50%;padding:3rem 2.8rem;display:flex;flex-direction:column;
  justify-content:center;position:relative;
  background:linear-gradient(135deg,#ffffff 0%,#fff0f5 100%);
}
.g-modal-sub {
  font-family:var(--font-sans);font-size:.62rem;
  letter-spacing:.25em;color:var(--gold);text-transform:uppercase;margin-bottom:.4rem;
}
.g-modal-title {
  font-family:var(--font-heading);font-style:italic;
  font-size:2.2rem;font-weight:900;color:var(--rose);margin-bottom:.2rem;line-height:1.15;
}
.g-modal-date {
  font-family:var(--font-sans);font-size:.65rem;
  letter-spacing:.18em;color:var(--ink-soft);opacity:.6;text-transform:uppercase;margin-bottom:1.4rem;display:block;
}
.g-modal-divider {
  width:48px;height:2px;background:var(--rose-lt);opacity:.5;margin-bottom:1.4rem;
}
.g-modal-note {
  font-family:var(--font-serif);font-style:italic;
  font-size:1.2rem;line-height:1.85;color:var(--ink-soft);
}
.g-modal-emojis {
  margin-top:1.8rem;font-size:1.3rem;color:var(--rose);opacity:.6;
}
.g-modal-close {
  position:absolute;top:1.2rem;right:1.5rem;
  background:rgba(255,255,255,0.9);width:38px;height:38px;border-radius:50%;
  border:none;font-size:1.1rem;color:var(--rose);cursor:pointer;
  display:flex;align-items:center;justify-content:center;z-index:10;
  box-shadow:0 4px 15px rgba(0,0,0,0.12);transition:all .3s ease;
}
.g-modal-close:hover { background:#fff;transform:scale(1.1);color:var(--mauve); }

/* Add Custom Memory Box */
.add-memory-box {
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed rgba(232, 84, 122, 0.3);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  backdrop-filter: blur(10px);
  margin-top: 2rem;
}
.add-memory-box h3 { font-family: var(--font-heading); font-size: 22px; color: var(--rose); margin-bottom: 6px; }
.add-memory-box p { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.memory-input-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}
.memory-input-group .modal-input { margin-bottom: 0; flex: 1; min-width: 220px; text-align: left; }

@media(max-width:768px) {
  .g-modal-card { flex-direction:column;max-height:90vh;overflow-y:auto; }
  .g-modal-img-wrap { width:100%;height:260px;min-height:260px; }
  .g-modal-content { width:100%;padding:2rem 1.8rem; }
  .gallery-card { width:220px;height:275px; }
}
