:root {
  --bg: #140b15;
  --bg-deep: #0d070e;
  --bg-card: #201121;
  --bg-card-alt: #29152b;
  --pink: #e9a9c1;
  --pink-light: #f7d2e0;
  --cream: #fff1e9;
  --muted: #bda4b4;
  --gold: #c9a77f;
  --gold-glow: #e6be94;
  --rose-dark: #6e3352;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.mobile-optimized {
  max-width: 100vw;
}

/* ======================================================== */
/* VINTAGE FILM GRAIN & AMBIENT GLOW                        */
/* ======================================================== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.ambient-glow {
  position: fixed;
  top: -15vh;
  left: -20vw;
  width: 140vw;
  height: 140vh;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 25%, rgba(233, 169, 193, 0.09) 0%, transparent 65%);
}

#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 24;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  animation: fall var(--duration) linear forwards;
  font-size: var(--size);
  color: #f9b3cc;
  text-shadow: 0 0 8px rgba(249, 179, 204, 0.5);
  will-change: transform, opacity;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translate(var(--drift), 115vh) rotate(720deg); opacity: 0; }
}

/* ======================================================== */
/* AUTOPLAY BANNER & MUSIC PLAYER                           */
/* ======================================================== */
.music-prompt-banner {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: rgba(45, 20, 42, 0.92);
  border: 1px solid rgba(233, 169, 193, 0.45);
  color: #fff1f6;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  animation: bannerPulse 2s ease-in-out infinite alternate;
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: nowrap;
}

.music-prompt-banner.hidden {
  opacity: 0;
  transform: translate(-50%, -20px);
  pointer-events: none;
}

@keyframes bannerPulse {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.03); border-color: rgba(233, 169, 193, 0.85); }
}

.music-note-icon {
  color: var(--pink);
  font-size: 13px;
}

/* Netlify Badge & HUD Removal */
netlify-hud,
[data-netlify-site-id],
.netlify-badge,
iframe[src*="netlify"],
div[class*="netlify"],
div[data-netlify-hud],
#netlify-hud,
.netlify-drawer-root {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  bottom: -9999px !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  z-index: -99999 !important;
}

/* Ultra-Compact Floating Music Jewel */
.music-floating-bar {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(28, 14, 29, 0.88);
  border: 1px solid rgba(233, 169, 193, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px 8px 4px 4px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-width: 170px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-disc-wrap {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.music-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #110813;
  border: 1px solid rgba(233, 169, 193, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-disc.playing { animation: spinDisc 3.5s linear infinite; }
@keyframes spinDisc { 100% { transform: rotate(360deg); } }

.disc-label {
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 85px;
}

.music-title {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.music-bars {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 8px;
}

.music-bars span {
  width: 1.5px;
  height: 2px;
  background: var(--pink);
  border-radius: 1px;
}

.music-bars.active span:nth-child(1) { animation: soundBar 0.8s ease infinite alternate; }
.music-bars.active span:nth-child(2) { animation: soundBar 1.1s ease infinite alternate 0.2s; }
.music-bars.active span:nth-child(3) { animation: soundBar 0.9s ease infinite alternate 0.4s; }

@keyframes soundBar { 0% { height: 2px; } 100% { height: 8px; } }

.music-btn {
  background: var(--pink);
  color: #1a0b1b;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

body.film-open .music-floating-bar,
body.film-open .music-prompt-banner {
  opacity: 0;
  pointer-events: none;
}

/* ======================================================== */
/* TOP NAVIGATION                                           */
/* ======================================================== */
.nav {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(18px + var(--safe-top)) 20px 18px;
  font-size: 9.5px;
  letter-spacing: 0.2em;
}

.logo {
  font-family: Georgia, serif;
  font-size: 24px !important;
  color: var(--cream);
  text-decoration: none;
}
.logo span { color: var(--pink); }

.nav-mid {
  opacity: 0.65;
  font-size: 8.5px;
  letter-spacing: 0.22em;
}

.nav-end {
  color: var(--pink) !important;
  text-decoration: none;
  border-bottom: 1px solid var(--pink);
  padding-bottom: 2px;
  font-size: 8.5px;
  letter-spacing: 0.14em;
}

/* ======================================================== */
/* HERO SECTION (MOBILE-FIRST)                              */
/* ======================================================== */
.hero {
  min-height: 100svh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(85px + var(--safe-top)) 18px 45px;
  background: radial-gradient(ellipse at 50% 25%, #563048 0%, #281427 42%, #140b15 80%);
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(233, 169, 193, 0.12), transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.eyebrow, .section-kicker, .micro {
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.line {
  width: 16px;
  height: 1px;
  background: var(--pink);
}

.pretitle {
  font-family: Georgia, serif;
  font-style: italic;
  color: #f4d7df;
  font-size: clamp(14px, 3.8vw, 18px);
  margin: 15px 0 -8px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(64px, 18vw, 92px);
  letter-spacing: -0.07em;
  line-height: 0.96;
  margin: 0;
}
.dot { color: var(--pink); }

.fairy-emoji {
  display: inline-block;
  font-size: 0.62em;
  vertical-align: middle;
  margin-left: 4px;
  filter: drop-shadow(0 0 14px rgba(233, 169, 193, 0.7));
  animation: fairyGentleFloat 2.6s infinite ease-in-out;
}

@keyframes fairyGentleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}

.hero-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(14px, 3.6vw, 18px);
  color: var(--pink);
  margin: 4px 0 22px;
}

/* Polaroid Hero Frame */
.hero-frame-wrap {
  position: relative;
  display: inline-block;
  margin: 8px auto 20px;
}

.hero-frame {
  width: min(250px, 68vw);
  margin: auto;
  transform: rotate(-2deg);
  border: 7px solid #f6ece7;
  background: #f6ece7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(233, 169, 193, 0.2);
  cursor: pointer;
  transition: transform 0.4s ease;
}

.photo {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #3c2033;
}

.photo-hero { height: clamp(210px, 32svh, 290px); }

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: contrast(1.03) saturate(1.06) brightness(1.02);
}

.frame-caption {
  color: #563449;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  letter-spacing: 0.16em;
  padding: 8px 4px 2px;
}

.caption-heart { color: #c94f78; font-size: 11px; }

.frame-tape {
  position: absolute;
  width: 60px;
  height: 18px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  z-index: 3;
}
.frame-tape.top-left { top: -8px; left: -16px; transform: rotate(-35deg); }
.frame-tape.bottom-right { bottom: -6px; right: -16px; transform: rotate(-30deg); }

.hero-bottom {
  font: italic 14px/1.65 Georgia, serif;
  color: #e9cad8;
  margin: 18px 0 20px;
}
.hero-bottom em { color: var(--cream); font-style: normal; font-weight: 500; }

.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--pink);
  text-decoration: none;
  margin-top: 25px;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.scroll-indicator:hover { opacity: 1; }
.scroll-indicator i { font-size: 16px; font-style: normal; animation: downArrow 1.8s infinite; }
@keyframes downArrow { 50% { transform: translateY(5px); } }

.cake-blow-cta {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.closing-blessing {
  text-align: center;
  padding: 80px 20px 30px;
}

.closing-heart {
  font-size: 32px;
  color: var(--pink);
  margin-bottom: 14px;
}

.closing-quote {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5.5vw, 28px);
  font-style: italic;
  max-width: 420px;
  margin: 0 auto 16px;
  line-height: 1.4;
  color: var(--cream);
}

.closing-author {
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--gold);
  font-weight: 600;
}

.pill {
  border-radius: 40px;
  padding: 15px 28px;
  letter-spacing: 0.14em;
  font-size: 10.5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  font-family: var(--font-sans);
  border: none;
}

.pill-large {
  width: min(340px, 92vw);
  padding: 18px 24px;
  font-size: 11px;
}

.pill-gold {
  background: linear-gradient(135deg, #e9a9c1, #c9a77f);
  color: #170e18;
  box-shadow: 0 10px 30px rgba(201, 167, 127, 0.35), 0 0 20px rgba(233, 169, 193, 0.3);
}

.pill-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}

.pill-small {
  padding: 9px 18px;
  font-size: 9px;
  border: 1px solid rgba(76, 52, 64, 0.35);
  background: rgba(76, 52, 64, 0.08);
  color: #4c3440;
}

.cta-subtext {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
  letter-spacing: 0.06em;
}

/* ======================================================== */
/* STORY STREAM & ACTS                                      */
/* ======================================================== */
.section {
  padding: 70px 20px;
  max-width: 520px;
  margin: 0 auto;
}

.story-act h2 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 12px 0 22px;
}
.story-act h2 em { color: var(--pink); font-style: italic; }

.story-card {
  background: var(--bg-card);
  border: 1px solid rgba(233, 169, 193, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.story-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  min-height: 320px;
  max-height: 440px;
  cursor: pointer;
  overflow: hidden;
}

.story-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.5s ease;
}

.story-img-wrap:hover img {
  transform: scale(1.03);
}

.story-img-wrap img.crop-bottom,
.story-img-wrap[data-lightbox*="06.jpg"] img {
  object-position: center 84% !important;
}

.story-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(20, 10, 22, 0.85);
  border: 1px solid rgba(233, 169, 193, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.story-body {
  padding: 24px 20px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #ebd7e2;
}

.story-body p { margin-bottom: 14px; }
.story-body p:last-child { margin-bottom: 0; }
.story-body strong { color: var(--pink); font-weight: 500; }

.dark-act .story-card {
  background: #190c1a;
  border-color: rgba(201, 167, 127, 0.2);
}

.quiet-quote {
  font: italic 14.5px/1.7 Georgia, serif;
  color: var(--gold-glow);
  border-left: 2px solid var(--pink);
  padding-left: 14px;
  margin: 18px 0 4px;
}

/* Memories Grid */
.memories-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.memory-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.mem-img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(233, 169, 193, 0.35);
}

.mem-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.mem-text h4 {
  font-size: 16px;
  color: var(--cream);
  margin-bottom: 3px;
  font-family: var(--font-serif);
}

.mem-text p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.view-album-cta {
  text-align: center;
  margin-top: 25px;
}

/* ======================================================== */
/* BIRTHDAY & INTERACTIVE CAKE                              */
/* ======================================================== */
.birthday {
  text-align: center;
  padding: 90px 20px 80px;
  background: radial-gradient(ellipse at 50% 35%, #763b58, #321932 50%, #140b15 85%);
  position: relative;
  overflow: hidden;
}

.birthday-spark {
  color: var(--gold);
  letter-spacing: 16px;
  font-size: 12px;
}

.birthday h2 {
  font-family: var(--font-serif);
  font-size: clamp(48px, 13vw, 76px);
  line-height: 1.02;
  margin: 15px 0 10px;
}

.birthday h2 em { color: var(--pink); font-style: italic; }

.birthday-date {
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--pink);
  margin: 20px 0 25px;
}

.birthday-date strong {
  font-size: 26px;
  font-family: Georgia, serif;
}

/* Cake */
.interactive-cake-wrap {
  margin: 20px auto;
  max-width: 320px;
}

.cake-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.cake-candle {
  position: relative;
  width: 12px;
  height: 48px;
  margin-bottom: -4px;
  cursor: pointer;
  z-index: 5;
}

.candle-stick {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #fff, #fff 4px, var(--pink) 4px, var(--pink) 8px);
  border-radius: 4px;
}

.candle-flame {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 22px;
  background: radial-gradient(ellipse at bottom, #ffffff 0%, #ffe066 35%, #ff5e3a 80%, transparent 100%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  box-shadow: 0 0 15px #ffb300, 0 0 30px #ff5722;
  animation: flicker 1.2s ease-in-out infinite alternate;
  transform-origin: 50% 90%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.candle-glow {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 179, 0, 0.45) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 1.6s infinite alternate;
  transition: opacity 0.4s ease;
}

@keyframes glowPulse {
  0% { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.25); }
}

.candle-smoke {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-2deg); }
  50% { transform: translateX(-50%) rotate(3deg); }
  100% { transform: translateX(-50%) rotate(-1deg); }
}

.cake-candle.blown .candle-flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.1);
}

.cake-candle.blown .candle-glow {
  opacity: 0;
}

.cake-candle.blown .candle-smoke {
  display: block;
  animation: smokeRising 1.6s ease-out forwards;
}

@keyframes smokeRising {
  0% { opacity: 0.9; transform: translateX(-50%) scale(1); }
  40% { opacity: 0.6; transform: translateX(-70%) translateY(-24px) scale(2.8); }
  100% { opacity: 0; transform: translateX(-30%) translateY(-50px) scale(4.8); }
}

.cake-top {
  width: 150px;
  height: 30px;
  background: #fdf5f2;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.cherry { position: absolute; top: -10px; font-size: 16px; }

.cake-body {
  width: 185px;
  height: 70px;
  background: #733c56;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.cake-cream-layer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;
  background: #fdf5f2;
  border-bottom: 2px solid #e9a9c1;
}

.cake-base {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
}

.cake-text {
  font: italic 14px Georgia, serif;
  color: #fff1f6;
  letter-spacing: 0.14em;
}

.cake-stand {
  width: 220px;
  height: 8px;
  background: #c9a77f;
  border-radius: 5px;
  margin-top: 4px;
}

.cake-wish-prompt {
  margin-top: 14px;
  font-size: 12px;
  color: var(--pink-light);
}

.cake-blown-message {
  margin-top: 18px;
  padding: 18px;
  background: rgba(36, 17, 34, 0.85);
  border: 1px solid var(--gold);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.cake-blown-message h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold-glow);
  margin-bottom: 6px;
}

.cake-blown-message p {
  font-size: 13.5px;
  color: var(--cream);
  line-height: 1.6;
}

.birthday-wishes-text {
  font: italic 16px/1.65 Georgia, serif;
  color: #f2d8e4;
  margin: 25px auto;
  max-width: 400px;
}

.birthday-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ======================================================== */
/* REALISTIC 3D ENVELOPE & UNFOLDING LETTER                 */
/* ======================================================== */
.letter-section {
  padding-bottom: 90px;
}

.letter-intro-text {
  font: italic 14.5px/1.7 Georgia, serif;
  color: var(--muted);
  margin-bottom: 30px;
}

.envelope-scene {
  perspective: 1200px;
  margin: 20px auto 30px;
  display: flex;
  justify-content: center;
}

.real-envelope {
  position: relative;
  width: min(340px, 92vw);
  height: 220px;
  background: #2f172a;
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 25px rgba(233, 169, 193, 0.15);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.env-back {
  position: absolute;
  inset: 0;
  background: #251122;
  border-radius: 10px;
  z-index: 1;
}

/* Tri-folded letter inside pocket */
.folded-letter {
  position: absolute;
  top: 15px;
  left: 5%;
  right: 5%;
  height: 180px;
  background: #fbf5ee;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease;
}

.letter-fold {
  flex: 1;
  border-bottom: 1px dashed rgba(76, 52, 64, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
}

.fold-watermark {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #a47688;
  font-style: italic;
}

.fold-lines {
  width: 70%;
  height: 2px;
  background: rgba(76, 52, 64, 0.15);
  box-shadow: 0 6px 0 rgba(76, 52, 64, 0.15), 0 12px 0 rgba(76, 52, 64, 0.15);
}

.fold-heart { font-size: 18px; color: #a47688; }

/* Envelope Pocket Flaps (Left, Right, Bottom) */
.env-pocket-left {
  position: absolute;
  inset: 0;
  background: #391c33;
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  border-radius: 10px 0 0 10px;
  z-index: 3;
}

.env-pocket-right {
  position: absolute;
  inset: 0;
  background: #361a30;
  clip-path: polygon(100% 0, 50% 50%, 100% 100%);
  border-radius: 0 10px 10px 0;
  z-index: 3;
}

.env-pocket-bottom {
  position: absolute;
  inset: 0;
  background: #44223d;
  clip-path: polygon(0 100%, 50% 50%, 100% 100%);
  border-radius: 0 0 10px 10px;
  z-index: 4;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Top Envelope Flap */
.env-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 125px;
  background: #4f2747;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
  transform-origin: top center;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

/* 3D Wax Seal */
.wax-seal {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #b93b61 0%, #7e1e3b 70%, #4b0e20 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #8e2344;
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.wax-seal:hover { transform: translate(-50%, -50%) scale(1.08); }

.seal-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #ffdce5;
}

.seal-initial {
  font: italic 22px Georgia, serif;
  font-weight: bold;
}

.seal-heart { font-size: 14px; color: #ff9bbb; }

.seal-hint {
  font-size: 7px;
  letter-spacing: 0.12em;
  color: #ffcfdd;
  margin-top: 1px;
}

.postal-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  font-size: 8px;
  color: rgba(255, 241, 246, 0.85);
  font-family: Georgia, serif;
  font-style: italic;
  pointer-events: none;
}

/* ANIMATION STAGES FOR REALISTIC LETTER UNFOLDING */
.real-envelope.opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  pointer-events: none;
}

.real-envelope.opening .env-flap-top {
  transform: rotateX(180deg);
  z-index: 1;
}

.real-envelope.sliding-out .folded-letter {
  transform: translateY(-200px);
}

.envelope-cta-wrap {
  text-align: center;
  margin: -10px auto 25px;
  position: relative;
  z-index: 10;
}

.envelope-open-btn {
  padding: 13px 30px;
  font-size: 11px;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, #d4a574 0%, #b88657 100%);
  color: #170a16;
  font-weight: 600;
  border-radius: 30px;
  box-shadow: 0 8px 30px rgba(212, 165, 116, 0.45), 0 0 20px rgba(233, 169, 193, 0.3);
  cursor: pointer;
  animation: pulseGold 2.2s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(212, 165, 116, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 12px 38px rgba(212, 165, 116, 0.65); }
}

/* Unfolded Letter Paper View */
.unfolded-letter-container {
  width: 100%;
  animation: letterAppear 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterAppear {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.letter-paper {
  background: #fcf7ef;
  color: #4a323f;
  padding: 34px 22px 28px;
  border-radius: 8px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
  position: relative;
  border: 1px solid #ebd9c8;
}

.letter-stamp-photo {
  position: absolute;
  top: 22px;
  right: 20px;
  width: 58px;
  height: 74px;
  padding: 3px;
  background: #fff;
  border: 1.5px dashed #c49ba9;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: rotate(3deg);
  text-align: center;
}

.letter-stamp-photo img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  object-position: center 18%;
}

.letter-stamp-photo span {
  font-size: 7px;
  letter-spacing: 0.1em;
  color: #7b4f65;
  font-weight: 600;
}

.letter-header {
  padding-right: 70px;
  margin-bottom: 20px;
}

.letter-meta {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: #a46d82;
  font-weight: 600;
}

.letter-header h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-top: 4px;
}
.letter-header h3 em { color: #b77b94; }

.letter-whisper {
  font: italic 13px/1.6 Georgia, serif;
  color: #925870;
  margin-top: 6px;
}

.special-para {
  font-size: 17px !important;
  color: #7b2949 !important;
  letter-spacing: 0.02em;
}

.special-name {
  font: italic 22px Georgia, serif !important;
  color: #8e2b52 !important;
  padding-left: 10px;
}

.letter-blessings-list {
  margin: 14px 0 18px 10px;
  border-left: 2px solid #ebd9c8;
  padding-left: 12px;
}

.blessing-line {
  margin-bottom: 8px !important;
  font: italic 14.5px Georgia, serif !important;
  color: #6a3249 !important;
}

.blessing-line em {
  color: #8e2b52;
}

.letter-body {
  font: 15px/2.05 Georgia, serif;
}

.letter-body p { margin-bottom: 18px; }
.letter-body em { color: #8e3e60; font-weight: 500; }

.letter-sign {
  font: italic 20px Georgia, serif;
  color: #9e607c;
  margin-top: 28px;
}

.letter-keepsake-tag {
  text-align: center;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed #e5d1c5;
}

.letter-keepsake-tag span {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: #9e6d80;
  font-weight: 600;
}

/* Footer */
footer {
  padding: 30px 20px calc(80px + var(--safe-bottom));
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ======================================================== */
/* MOBILE FULLSCREEN CINEMATIC FILM LAYER (#film)           */
/* ======================================================== */
.film-launch {
  position: fixed;
  z-index: 35;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 360px);
}

.film-launch button {
  width: 100%;
  border: 1px solid rgba(246, 200, 218, 0.5);
  border-radius: 99px;
  background: rgba(56, 28, 50, 0.94);
  color: #fff0f5;
  padding: 16px 20px;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(233, 169, 193, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.film {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #080509;
  color: #fff2f5;
  display: none;
  overflow: hidden;
  font-family: var(--font-sans);
}

.film.active { display: block; }

.film-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #5d2847 0%, #15091a 65%, #050306 100%);
}

.film-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#ffe3ec88 1px, transparent 1px);
  background-size: 43px 61px;
  opacity: 0.22;
}

.film-stage {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  overflow: hidden;
}

.film-stage.on { opacity: 1; }

/* Photo positioned so eyes and face are ALWAYS visible at top */
.film-photo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #1c0e1e;
}

.film-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16% !important;
  transform-origin: center 25%;
}

/* Instagram-style Tap Zones (Tap Left: Prev, Tap Right: Next) */
.story-touch-left, .story-touch-right {
  position: absolute;
  top: 60px;
  bottom: 120px;
  width: 42%;
  z-index: 9;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.story-touch-left { left: 0; }
.story-touch-right { right: 0; }

.film-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 4, 10, 0.5) 0%, transparent 22%, rgba(8, 4, 10, 0.3) 50%, rgba(8, 4, 10, 0.95) 100%);
}

/* Film Captions: docked at the very bottom, leaving face completely clear */
.film-caption {
  position: absolute;
  bottom: calc(75px + var(--safe-bottom));
  left: 4%;
  right: 4%;
  text-align: center;
  z-index: 10;
  padding: 20px 16px 12px;
  background: linear-gradient(to top, rgba(8, 4, 10, 0.96) 0%, rgba(8, 4, 10, 0.75) 65%, transparent 100%);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.film-kicker {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--pink);
}

.film-caption h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 7.8vw, 38px);
  line-height: 1.1;
  margin: 6px 0 4px;
  font-weight: 400;
}

.film-caption p {
  font: italic clamp(13px, 3.8vw, 15.5px)/1.55 Georgia, serif;
  color: #ffe7f0;
  max-width: 440px;
  margin: auto;
}

/* Top Story Progress Bar */
.film-progress {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 10px;
  right: 10px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  z-index: 16;
  cursor: pointer;
}

.film-progress div {
  height: 100%;
  width: 0;
  background: var(--pink);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--pink);
  transition: width 0.08s linear;
}

/* Top Status Bar */
.film-top {
  position: absolute;
  top: calc(20px + var(--safe-top));
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.16em;
  z-index: 17;
}

.film-badge {
  font-size: 7.5px;
  letter-spacing: 0.18em;
  background: rgba(201, 167, 127, 0.25);
  border: 1px solid var(--gold);
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--gold-glow);
}

.film-title-tag i { color: var(--pink); }

.film-top #filmClose {
  background: rgba(22, 11, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Film Bottom Controls */
.film-controls {
  position: absolute;
  bottom: calc(16px + var(--safe-bottom));
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  z-index: 17;
}

.film-controls button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(28, 16, 30, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
}

.film-controls #filmMute,
.film-controls #filmFX {
  border-radius: 20px;
  font-size: 8.5px !important;
  width: 58px;
  letter-spacing: 0.08em;
}

.film-controls span {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: #ffe1ec;
}

/* 3D Door Reveal Screen */
.film-start, .film-end {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  background: radial-gradient(ellipse at center, #8a4868 0%, #351a32 50%, #120b15 100%);
  perspective: 1100px;
}

.film-start[hidden], .film-end[hidden] { display: none; }

.door-arch {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.door-leaf {
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, #1f0f1d, #62304e 48%, #31162a 92%);
  border: 1px solid rgba(217, 172, 131, 0.35);
  display: grid;
  place-items: center;
  transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  backface-visibility: hidden;
}

.door-left { transform-origin: left center; }
.door-right { transform-origin: right center; }

.door-seam {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #d9a880;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  background: #46253c;
  display: grid;
  place-items: center;
  color: #f3c3d4;
  font: 24px Georgia, serif;
  box-shadow: 0 0 30px rgba(255, 191, 214, 0.35);
  z-index: 4;
}

.door-copy {
  position: relative;
  z-index: 5;
  padding: 22px 16px;
  background: rgba(35, 15, 26, 0.85);
  border: 1px solid rgba(233, 197, 163, 0.35);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  max-width: 340px;
  width: 100%;
  transition: opacity 0.5s, transform 0.7s;
}

.film-start.doors-opening .door-left { transform: rotateY(-105deg); }
.film-start.doors-opening .door-right { transform: rotateY(105deg); }
.film-start.doors-opening .door-seam,
.film-start.doors-opening .door-copy { opacity: 0; transform: scale(1.05); }

.door-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 10vw, 48px);
  margin: 10px 0 8px;
}

.door-copy p {
  font: italic 14px/1.6 Georgia, serif;
  color: #eed4e1;
}

.door-copy button {
  margin-top: 18px;
  padding: 15px 26px;
  border: none;
  background: #f3c1d3;
  color: #2b1424;
  border-radius: 40px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(241, 178, 198, 0.4);
}

/* Canvas & Overlays */
#cinemaCanvas, .cinema-grain, .cinema-flash, #cinemaTransition {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#cinemaCanvas { z-index: 4; opacity: 0.85; }
.cinema-grain { z-index: 5; opacity: 0.12; }
.cinema-flash { z-index: 10; opacity: 0; }
#cinemaTransition { z-index: 7; opacity: 0; }

/* Toast */
#cinemaToast {
  position: absolute;
  z-index: 30;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff1f6;
  background: rgba(55, 30, 51, 0.85);
  border: 1px solid rgba(226, 185, 154, 0.4);
  border-radius: 30px;
  padding: 8px 16px;
  font: 11px var(--font-sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}
#cinemaToast.show { opacity: 1; }

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-modal.active, .lightbox-modal:not([hidden]) { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 6, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 13px;
  cursor: pointer;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-caption { text-align: center; margin-top: 14px; }
.lightbox-caption h4 { font: italic 18px Georgia, serif; color: var(--cream); }
.lightbox-nav { display: flex; gap: 12px; margin-top: 12px; }

.lightbox-nav button {
  background: rgba(36, 21, 37, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
}

.lightbox-nav .lightbox-love {
  border-radius: 30px;
  width: auto;
  padding: 6px 16px;
  font-size: 11px;
  border-color: var(--pink);
  color: var(--pink-light);
}

/* Album Modal */
.album-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: #110913;
  overflow-y: auto;
  padding: calc(20px + var(--safe-top)) 16px 60px;
  display: none;
}
.album-modal.active, .album-modal:not([hidden]) { display: block; }

.album-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.album-close {
  background: rgba(233, 169, 193, 0.15);
  border: 1px solid var(--pink);
  color: var(--cream);
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 9px;
  cursor: pointer;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.album-item {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #251224;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.album-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 8, 16, 0.8) 0%, transparent 60%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  transition: opacity 0.3s;
}

.album-item:hover .album-item-overlay { opacity: 1; }
.album-item-overlay span { font-size: 9px; color: #fff; }

/* ======================================================== */
/* GRAND BIRTHDAY CELEBRATION MODAL & CONFETTI CANVAS       */
/* ======================================================== */
.celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 160;
  display: none;
}

.celebration-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.celebration-modal.active,
.celebration-modal:not([hidden]) {
  display: flex;
}

.celebration-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(38, 16, 36, 0.94) 0%, rgba(10, 4, 12, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.celebration-content {
  position: relative;
  z-index: 2;
  max-width: 440px;
  width: 100%;
  background: linear-gradient(165deg, rgba(62, 30, 56, 0.96), rgba(28, 12, 26, 0.98));
  border: 1px solid rgba(212, 165, 116, 0.65);
  border-radius: 24px;
  padding: 38px 24px 30px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(212, 165, 116, 0.25);
  animation: celebrationPop 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes celebrationPop {
  0% { opacity: 0; transform: scale(0.85) translateY(24px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.celebration-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.celebration-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.celebration-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gold-glow);
  background: rgba(212, 165, 116, 0.16);
  border: 1px solid rgba(212, 165, 116, 0.4);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.celebration-cake-icon {
  font-size: 46px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.65));
  animation: gentleBounce 2.2s infinite ease-in-out;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.celebration-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 8px;
}

.celebration-title em {
  font-style: italic;
  color: var(--pink-light);
  text-shadow: 0 0 20px rgba(233, 169, 193, 0.5);
}

.celebration-date-tag {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 22px;
}

.celebration-wish-card {
  background: rgba(18, 7, 17, 0.7);
  border: 1px solid rgba(233, 169, 193, 0.25);
  border-radius: 16px;
  padding: 22px 18px;
  margin-bottom: 24px;
  text-align: left;
}

.celebration-primary-wish {
  font: italic 16px/1.7 Georgia, serif;
  color: #fff8f0;
  margin-bottom: 14px;
  text-align: center;
}

.celebration-secondary-wish {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.94;
  text-align: center;
}

.celebration-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ======================================================== */
/* SECRET ENTRANCE GATE (LOCK SCREEN)                       */
/* ======================================================== */
.secret-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #351930 0%, #170a18 70%, #0d050d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.secret-gate.unlocked {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
  visibility: hidden;
}

.gate-backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(233, 169, 193, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
}

.gate-card {
  position: relative;
  z-index: 2;
  max-width: 380px;
  width: 100%;
  background: rgba(36, 17, 34, 0.88);
  border: 1px solid rgba(212, 165, 116, 0.55);
  border-radius: 24px;
  padding: 38px 24px 30px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 45px rgba(233, 169, 193, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gate-fairy {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 18px rgba(233, 169, 193, 0.8));
  animation: fairyGentleFloat 2.6s infinite ease-in-out;
}

.gate-tag {
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--gold-glow);
  margin-bottom: 14px;
}

.gate-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 10px;
}

.gate-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 24px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gate-input {
  width: 100%;
  background: rgba(18, 8, 19, 0.8);
  border: 1.5px solid rgba(212, 165, 116, 0.4);
  border-radius: 30px;
  padding: 12px 42px 12px 18px;
  color: #fff;
  font-size: 15px;
  text-align: center;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.gate-input:focus {
  border-color: var(--gold-glow);
  box-shadow: 0 0 16px rgba(212, 165, 116, 0.4);
}

.gate-input-heart {
  position: absolute;
  right: 16px;
  color: var(--pink);
  font-size: 14px;
  pointer-events: none;
}

.gate-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.gate-error {
  margin-top: 14px;
  font-size: 12px;
  color: #ff9bb5;
  animation: shakeX 0.4s ease;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate-hint {
  margin-top: 18px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  opacity: 0.75;
}

/* ======================================================== */
/* ROMANCE VOICE NARRATION & TYPEWRITER                     */
/* ======================================================== */
.letter-voice-bar {
  margin: 14px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.letter-voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  background: linear-gradient(135deg, #d4a574 0%, #b88657 100%);
  color: #170a16;
  font-weight: 600;
  border-radius: 30px;
  box-shadow: 0 6px 20px rgba(212, 165, 116, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.letter-voice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.5);
}

.voice-wave-anim {
  font-size: 14px;
  animation: pulseMic 1.8s infinite ease-in-out;
}

@keyframes pulseMic {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.voice-active-controls {
  display: flex;
  gap: 8px;
}

.voice-ctrl-btn {
  background: rgba(38, 20, 36, 0.85);
  border: 1px solid rgba(212, 165, 116, 0.4);
  color: var(--cream);
  padding: 6px 14px;
  font-size: 9px;
  cursor: pointer;
  border-radius: 20px;
}

.letter-para {
  transition: all 0.4s ease;
  border-radius: 6px;
  padding: 4px 6px;
  min-height: 1.4em;
}

.letter-para.speaking-active {
  background: rgba(233, 169, 193, 0.28) !important;
  color: #1a0815 !important;
  box-shadow: 0 0 24px rgba(212, 165, 116, 0.35) !important;
  transform: scale(1.018);
  font-weight: 500;
}

.type-cursor {
  display: inline-block;
  color: var(--pink);
  font-weight: bold;
  animation: blinkCursor 0.65s infinite alternate;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
