/* ==========================================================================
   FOR NOOR • MIDNIGHT VIOLET & GOLD INTERACTIVE EXPERIENCE
   Mobile-Exclusive Romantic Architecture & Fluid Design System
   ========================================================================== */

/* --- Custom Properties & Palette Tokens --- */
:root {
  --bg-deep-abyss: #040209;
  --bg-midnight-violet: #090314;
  --bg-cosmic-purple: #120520;
  --bg-royal-twilight: #1a082c;
  
  --gold-primary: #d4af37;
  --gold-shimmer: #fbeea4;
  --gold-warm: #e6ca65;
  --gold-amber: #b8860b;
  --gold-soft-glow: rgba(212, 175, 55, 0.35);
  --gold-subtle-border: rgba(212, 175, 55, 0.22);

  --rose-stardust: #ffd1dc;
  --lavender-ethereal: #e2caff;
  --text-pure: #ffffff;
  --text-soft: #f2edf8;
  --text-muted: #bdaecf;

  --glass-bg-primary: rgba(18, 7, 32, 0.65);
  --glass-bg-card: rgba(26, 10, 44, 0.55);
  --glass-border: 1px solid rgba(212, 175, 55, 0.22);
  --glass-blur: blur(28px);
  --glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), 0 0 24px -4px rgba(212, 175, 55, 0.12);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script: 'Alex Brush', cursive;

  --ease-celestial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic-soft: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Global Baseline --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html {
  background-color: var(--bg-deep-abyss);
  color: var(--text-soft);
  font-family: var(--font-sans);
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 15%, #180527 0%, #090314 50%, #040209 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Global Ambient Cosmos Canvas --- */
#ambient-cosmos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  z-index: 1;
}

/* --- Master Mobile Container Frame --- */
#app-container {
  position: relative;
  width: 100%;
  max-width: 440px; /* High-end phone proportions when viewed on wider screens */
  height: 100dvh;
  margin: 0 auto;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  z-index: 2;
  scrollbar-width: none;
}

#app-container::-webkit-scrollbar {
  display: none;
}

/* Scroll lock state for intro section */
#app-container.scroll-locked {
  overflow-y: hidden !important;
  touch-action: none;
}

/* --- Floating Music Equalizer Pill --- */
.music-pill {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: 18px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(18, 5, 30, 0.65);
  border: 1px solid var(--gold-subtle-border);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(212, 175, 55, 0.2);
  cursor: pointer;
  transition: all 0.4s var(--ease-celestial);
  opacity: 1;
  transform: translateY(0);
}

.music-pill.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
}

.music-pill:active {
  transform: scale(0.95);
}

.equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.equalizer-bars span {
  width: 2.5px;
  background: linear-gradient(to top, var(--gold-primary), var(--gold-shimmer));
  border-radius: 2px;
  height: 4px;
  animation: eqBounce 1.2s ease-in-out infinite alternate;
}

.music-pill.paused .equalizer-bars span {
  animation-play-state: paused;
  height: 3px !important;
}

.equalizer-bars span:nth-child(1) { animation-duration: 0.8s; height: 10px; }
.equalizer-bars span:nth-child(2) { animation-duration: 1.1s; height: 14px; animation-delay: 0.2s; }
.equalizer-bars span:nth-child(3) { animation-duration: 0.9s; height: 7px; animation-delay: 0.4s; }
.equalizer-bars span:nth-child(4) { animation-duration: 1.3s; height: 12px; animation-delay: 0.1s; }

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

.music-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-warm);
  font-weight: 500;
}

/* --- Section Archetype: 100dvh Scroll Snap Unit --- */
.story-section {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 780px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* --- Shared Glass Card & Vow Styling --- */
.glass-panel {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
}

.glass-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 238, 164, 0.4), transparent);
}

.vow-card {
  width: 100%;
  text-align: center;
  z-index: 10;
  margin-top: 14px;
  transition: transform 0.6s var(--ease-celestial), opacity 0.6s ease;
}

.vow-subtitle {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.vow-static-text,
.vow-typewriter {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--text-pure);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7), 0 0 18px rgba(212, 175, 55, 0.25);
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vow-typewriter::after {
  content: '│';
  font-weight: 200;
  color: var(--gold-shimmer);
  animation: cursorBlink 0.9s infinite;
  margin-left: 2px;
}

.vow-typewriter.finished::after {
  display: none;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* ==========================================================================
   SECTION 1: THE ENTRY PULSE HEART
   ========================================================================== */
.entry-wrapper {
  justify-content: space-around;
  padding: 30px 10px;
}

.section-glow-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(162, 59, 219, 0.28) 0%, rgba(212, 175, 55, 0.12) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.poetic-header {
  text-align: center;
  z-index: 5;
}

.ornament-date {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--gold-warm);
  margin-bottom: 4px;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
  letter-spacing: 0.05em;
}

.whisper-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--text-pure);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 24px rgba(212, 175, 55, 0.3);
  max-width: 320px;
  margin: 0 auto;
}

.heart-interaction-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin: 20px 0;
}

.heart-pulse-container {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 50%;
}

/* SVG Gold Circular Progress Ring */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.ring-track {
  fill: none;
  stroke: rgba(212, 175, 55, 0.15);
  stroke-width: 4;
}

.ring-progress {
  fill: none;
  stroke: url(#gold-gradient);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 540.35; /* 2 * PI * 86 */
  stroke-dashoffset: 540.35;
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
}

/* 3D Heart Hologram & Canvas */
.heart-hologram {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-celestial);
}

.heart-mesh {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: naturalHeartbeat 1.8s infinite ease-in-out;
}

#canvas-heart {
  width: 130px;
  height: 130px;
}

.inner-core-glow {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 238, 164, 0.7) 0%, rgba(212, 175, 55, 0.3) 50%, transparent 80%);
  filter: blur(12px);
  pointer-events: none;
  animation: glowBreathe 1.8s infinite ease-in-out;
}

/* Shockwaves on hold */
.pulse-wave {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
}

.holding .heart-mesh {
  animation: rapidHeartbeat 0.7s infinite ease-in-out;
}

.holding .pulse-wave.wave-1 {
  animation: waveExpand 1.4s infinite linear;
}
.holding .pulse-wave.wave-2 {
  animation: waveExpand 1.4s infinite linear 0.45s;
}
.holding .pulse-wave.wave-3 {
  animation: waveExpand 1.4s infinite linear 0.9s;
}

@keyframes naturalHeartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

@keyframes rapidHeartbeat {
  0% { transform: scale(1); }
  30% { transform: scale(1.18); filter: drop-shadow(0 0 16px rgba(251, 238, 164, 0.9)); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1.22); }
}

@keyframes glowBreathe {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes waveExpand {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; border-color: rgba(255, 240, 180, 0.1); }
}

/* Instructions & Dots */
.hold-prompt-wrap {
  margin-top: 18px;
  text-align: center;
}

.hold-prompt {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-shimmer);
  font-weight: 500;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  transition: all 0.3s ease;
}

.hold-timer-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.hold-timer-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
}

.holding .hold-timer-dots .dot {
  background: var(--gold-shimmer);
  box-shadow: 0 0 8px var(--gold-shimmer);
}

/* Unlocked Transition & Scroll Prompt */
.scroll-invitation {
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.8s var(--ease-celestial);
}

.scroll-invitation.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.invitation-text {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
}

.golden-chevron {
  width: 24px;
  height: 24px;
  color: var(--gold-shimmer);
  animation: chevronBob 1.6s infinite ease-in-out;
}

@keyframes chevronBob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 1; }
}


/* ==========================================================================
   SECTION 2: FIRST TOUCH OF SAFETY (FROST / SCRATCH CANVAS)
   ========================================================================== */
.frosted-glass-frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.scenic-art-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 440px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.2);
  border: 1px solid var(--gold-subtle-border);
  touch-action: none;
}

.base-memory-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  z-index: 5;
  transition: opacity 0.8s var(--ease-celestial);
}

.scratch-canvas.fade-out {
  opacity: 0;
  pointer-events: none;
}

.scratch-hint-shimmer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 5, 24, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 8px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gold-shimmer);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  animation: pulseHint 2s infinite ease-in-out;
  transition: opacity 0.5s ease;
}

.scratch-hint-shimmer.hide {
  opacity: 0;
}

.touch-finger-icon {
  width: 18px;
  height: 18px;
  animation: swipeWiggle 1.8s infinite ease-in-out;
}

@keyframes swipeWiggle {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.03); box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }
}


/* ==========================================================================
   SECTION 3: PROTECTING YOUR SMILE (MAGNETIC PARALLAX 3D)
   ========================================================================== */
.parallax-3d-scene {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  perspective: 1200px;
}

.parallax-chassis {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 440px;
  border-radius: 28px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  touch-action: none;
}

.ambient-photo-halo {
  position: absolute;
  inset: -12px;
  border-radius: 36px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(138, 43, 226, 0.15) 50%, transparent 75%);
  filter: blur(20px);
  z-index: 1;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  will-change: transform;
}

.layer-back {
  transform: translateZ(-35px);
  background: radial-gradient(circle at center, #260e3a 0%, #0d0418 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9);
}

.layer-middle {
  transform: translateZ(10px);
  overflow: hidden;
  border-radius: 26px;
}

.photo-containment {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.depth-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08); /* Room for tilt without exposing edges */
  transition: transform 0.2s ease-out;
}

.specular-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, transparent 45%, rgba(212, 175, 55, 0.15) 100%);
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.layer-front {
  transform: translateZ(45px);
  pointer-events: none;
}

.golden-filigree-frame {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(251, 238, 164, 0.4);
  border-radius: 20px;
  box-shadow: inset 0 0 14px rgba(212, 175, 55, 0.25);
}

.golden-filigree-frame::after {
  content: '✦';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-shimmer);
  font-size: 14px;
  text-shadow: 0 0 8px var(--gold-shimmer);
}

.floating-bokeh-cluster .bokeh {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 238, 164, 0.6), transparent 70%);
  filter: blur(6px);
}

.bokeh.b1 { width: 40px; height: 40px; top: 15%; right: 12%; animation: floatBokeh 4s infinite ease-in-out; }
.bokeh.b2 { width: 60px; height: 60px; bottom: 20%; left: 8%; animation: floatBokeh 5s infinite ease-in-out 1s; }
.bokeh.b3 { width: 30px; height: 30px; bottom: 10%; right: 25%; animation: floatBokeh 3.5s infinite ease-in-out 0.5s; }

@keyframes floatBokeh {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-12px) scale(1.15); opacity: 0.8; }
}

.gentle-hint {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-warm);
  margin-top: 6px;
  opacity: 0.85;
}


/* ==========================================================================
   SECTION 4: WHEN WORDS AREN'T ENOUGH (FADING STARDUST TRAILS)
   ========================================================================== */
.stardust-swirl-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.memory-backdrop-box {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 440px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(138, 43, 226, 0.25);
  border: 1px solid var(--gold-subtle-border);
  touch-action: none;
}

.atmospheric-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.violet-twilight-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, rgba(13, 3, 24, 0.6) 80%, rgba(4, 2, 9, 0.9) 100%);
  pointer-events: none;
}

.stardust-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  z-index: 5;
}

.trail-sparkle-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.sparkle-symbol {
  color: var(--gold-shimmer);
  font-size: 0.8rem;
  animation: twinkle 1.5s infinite alternate;
}

.whisper-hint {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); text-shadow: 0 0 8px var(--gold-shimmer); }
}


/* ==========================================================================
   SECTION 5: DISTANCE IS NOTHING (3D INTERACTIVE POSTCARD)
   ========================================================================== */
.postcard-stage {
  width: 100%;
  max-width: 350px;
  height: 440px;
  perspective: 1400px;
  cursor: pointer;
}

.postcard-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.8), 0 0 28px rgba(212, 175, 55, 0.15);
  border-radius: 24px;
}

.postcard-flipper.flipped {
  transform: rotateY(180deg);
}

.postcard-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--gold-subtle-border);
}

/* Postcard Front */
.postcard-front {
  background: #0d0418;
}

.postcard-photo-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.postcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.1);
}

.film-grain-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 4px 4px;
  pointer-events: none;
  opacity: 0.7;
}

.chromatic-aberration-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
  background-size: 100% 3px, 4px 100%;
  pointer-events: none;
}

.vintage-postage-stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 60px;
  height: 72px;
  border: 2px dashed rgba(251, 238, 164, 0.75);
  background: rgba(14, 5, 24, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transform: rotate(4deg);
}

.stamp-postmark {
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--gold-shimmer);
  text-align: center;
  line-height: 1.2;
}

.stamp-rate {
  font-size: 1.6rem;
  color: var(--gold-primary);
  font-family: var(--font-serif);
  line-height: 1;
  margin-top: 2px;
}

.postcard-bottom-tab {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 3, 18, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 16px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  z-index: 5;
}

.flip-action-hint {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold-shimmer);
}

/* Postcard Back */
.postcard-back {
  background: linear-gradient(135deg, #160824 0%, #0d0317 100%);
  transform: rotateY(180deg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.paper-grain {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin: 10px;
  border-radius: 16px;
  pointer-events: none;
}

.postcard-back-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

.postcard-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
  padding-bottom: 10px;
}

.postmark-circle {
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.postal-date {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--gold-shimmer);
  font-style: italic;
}

.postcard-letter-body {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.letter-salutation {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--gold-warm);
  line-height: 1;
}

.letter-vow-quote {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.4;
  color: var(--text-pure);
  font-style: italic;
  border-left: 2px solid var(--gold-primary);
  padding-left: 12px;
}

.letter-whisper {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.letter-signoff {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--gold-warm);
}

.signature-hand {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--gold-shimmer);
  line-height: 1.1;
}

.postcard-back-footer {
  text-align: center;
}

.postcard-vow-label {
  margin-top: 14px;
}


/* ==========================================================================
   SECTION 6: CHOOSING YOU (FLOCKING PARTICLES)
   ========================================================================== */
.flocking-cosmos-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.flock-portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 440px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.25);
  border: 1px solid var(--gold-subtle-border);
  touch-action: none;
}

.flock-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04);
}

.golden-aurora-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(138, 43, 226, 0.2) 75%, rgba(4, 2, 9, 0.85) 100%);
  pointer-events: none;
}

.flocking-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  touch-action: none;
}

.choosing-vow-card {
  margin-top: 12px;
}

.touch-stream-hint {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--gold-shimmer);
  letter-spacing: 0.08em;
  margin-top: 6px;
  opacity: 0.85;
}


/* ==========================================================================
   SHARED INTERACTIVE PORTRAIT CONTAINERS (SECTIONS 7 - 11)
   ========================================================================== */
.photo-containment-round {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 440px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 52px -12px rgba(0, 0, 0, 0.88), 0 0 35px rgba(212, 175, 55, 0.22);
  border: 1px solid var(--gold-subtle-border);
  touch-action: none;
}

.interactive-memory-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.interactive-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  touch-action: none;
}

.vow-longer-text {
  font-size: 1.15rem !important;
  line-height: 1.4 !important;
}


/* ==========================================================================
   SECTION 7: BEING YOUR REASON (WATER RIPPLES)
   ========================================================================== */
.ripple-scene-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.ripple-touch-hint,
.ember-touch-hint,
.sparks-touch-hint,
.bloom-touch-hint,
.collapse-touch-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 5, 24, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 7px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gold-shimmer);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  animation: pulseHint 2.4s infinite ease-in-out;
  transition: opacity 0.4s ease;
}


/* ==========================================================================
   SECTION 8: NEVER LETTING YOU DOWN (SOFT EMBERS)
   ========================================================================== */
.ember-scene-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.amber-warm-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(255, 140, 0, 0.15) 0%, rgba(138, 43, 226, 0.12) 60%, rgba(4, 2, 9, 0.6) 100%);
  pointer-events: none;
}


/* ==========================================================================
   SECTION 9: THROUGH EVERYTHING (GOLDEN SPARKS TRAIL)
   ========================================================================== */
.sparks-scene-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.stardust-golden-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
  pointer-events: none;
}


/* ==========================================================================
   SECTION 10: EXACTLY WHO YOU ARE (DOUBLE-EXPOSURE BLOOMING FLORAL)
   ========================================================================== */
.bloom-scene-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.bloom-base-photo {
  transition: filter 0.6s ease;
}

.bloom-overlay-canvas {
  mix-blend-mode: screen;
}

.floating-hibiscus-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 6;
}

.floating-hibiscus-petals .petal {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.7;
  filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.6));
  animation: floatPetal 5s infinite ease-in-out;
}

.petal.p1 { top: 12%; left: 10%; animation-duration: 4.8s; }
.petal.p2 { top: 60%; right: 12%; animation-duration: 6.2s; animation-delay: 1.2s; }
.petal.p3 { bottom: 15%; left: 20%; animation-duration: 5.5s; animation-delay: 0.6s; }

@keyframes floatPetal {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-16px) rotate(22deg) scale(1.1); opacity: 0.85; }
}


/* ==========================================================================
   SECTION 11: MY FINAL PROMISE (PARTICLE SINGULARITY COLLAPSE)
   ========================================================================== */
.collapse-scene-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.singularity-core-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 240, 180, 0.9) 0%, rgba(212, 175, 55, 0.5) 30%, rgba(138, 43, 226, 0.3) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transition: all 0.8s var(--ease-celestial);
}

.singularity-core-glow.active {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 1;
}


/* ==========================================================================
   SECTION 12: THE GLOWING GIFT ENVELOPE
   ========================================================================== */
.envelope-wrapper {
  justify-content: space-around;
  padding: 30px 10px;
}

.envelope-stage {
  position: relative;
  width: 100%;
  max-width: 330px;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  margin: 20px 0;
}

.floating-envelope {
  position: relative;
  width: 270px;
  height: 180px;
  cursor: pointer;
  animation: envelopeHover 3.2s infinite ease-in-out;
  touch-action: manipulation;
}

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

.envelope-ambient-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, rgba(138, 43, 226, 0.15) 50%, transparent 75%);
  filter: blur(22px);
  border-radius: 20px;
  pointer-events: none;
}

.envelope-chassis {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(26, 10, 44, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.15);
  overflow: visible;
}

.envelope-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
}

.letter-slip {
  position: absolute;
  top: 15px;
  width: 86%;
  height: 140px;
  background: linear-gradient(135deg, #fdfbf7 0%, #faecd2 100%);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 2;
}

.floating-envelope.opened .letter-slip {
  transform: translateY(-50px);
}

.letter-stamp-heart {
  font-size: 1.6rem;
  color: #c92a2a;
  animation: heartbeatTiny 1.5s infinite ease-in-out;
}

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

.letter-preview-text {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-style: italic;
  color: #3b200b;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(180deg, rgba(38, 15, 64, 0.95) 0%, rgba(26, 10, 44, 0.9) 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.4);
}

.floating-envelope.opened .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.wax-seal {
  position: absolute;
  bottom: 0;
  transform: translateY(50%);
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #f6e27a 0%, #d4af37 60%, #997312 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.6);
  border: 1px solid #fff;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.wax-seal:active {
  transform: translateY(50%) scale(0.92);
}

.seal-initial {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #361a00;
  font-weight: 700;
}

.envelope-glitter-canvas {
  position: absolute;
  top: -50px;
  left: -50px;
  width: calc(100% + 100px);
  height: calc(100% + 100px);
  pointer-events: none;
  z-index: 10;
}

.envelope-action-prompt {
  margin-top: 24px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-shimmer);
  animation: pulseHint 2s infinite ease-in-out;
}


/* ==========================================================================
   SECTION 13: THE BIG SURPRISE FINALE PROPOSAL
   ========================================================================== */
.finale-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #200835 0%, #0d0317 60%, #040209 100%);
}

.fireworks-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

.finale-content-wrapper {
  justify-content: center;
  position: relative;
  z-index: 20;
}

.proposal-ambient-radiance {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(162, 59, 219, 0.25) 50%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
}

.proposal-main-box {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 14px;
}

.ring-hologram-wrap {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}

.sparkling-diamond-ring {
  width: 60px;
  height: 60px;
  border: 4px solid var(--gold-primary);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.7), inset 0 0 12px rgba(212, 175, 55, 0.4);
  animation: ringFloat 3s infinite ease-in-out;
}

.sparkling-diamond-ring::before {
  content: '💎';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
  animation: diamondShimmer 2s infinite ease-in-out;
}

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

@keyframes diamondShimmer {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)); transform: translateX(-50%) scale(1); }
  50% { filter: drop-shadow(0 0 22px rgba(251, 238, 164, 1)); transform: translateX(-50%) scale(1.1); }
}

.finale-super-title {
  font-family: var(--font-script);
  font-size: 2.1rem;
  color: var(--gold-warm);
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.6);
}

.grand-proposal-heading {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.35;
  font-weight: 300;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
  margin-bottom: 28px;
}

.gold-gradient-text {
  font-weight: 600;
  background: linear-gradient(135deg, #fff7d6 0%, #f6e27a 40%, #d4af37 70%, #ffd1dc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-size: 2.15rem;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.6));
  animation: goldPulseText 2.4s infinite ease-in-out;
}

@keyframes goldPulseText {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.5)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 26px rgba(251, 238, 164, 0.9)); transform: scale(1.02); }
}

.proposal-buttons-zone {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 290px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.proposal-buttons-zone.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  display: none;
}

.proposal-btn {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform 0.25s var(--ease-elastic-soft), box-shadow 0.3s ease;
}

.proposal-btn:active {
  transform: scale(0.94);
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #b8860b 100%);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 0 15px rgba(251, 238, 164, 0.4);
}

.btn-secondary {
  background: rgba(30, 12, 50, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: buttonGleam 2.8s infinite;
}

@keyframes buttonGleam {
  0% { transform: translateX(-100%); }
  40%, 100% { transform: translateX(100%); }
}

.btn-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.btn-primary .btn-text {
  color: #1a0800;
}

.btn-secondary .btn-text {
  color: #fff7d6;
}

/* Celebration Closing Box */
.celebration-closing-box {
  background: rgba(22, 8, 38, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 28px;
  padding: 24px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.3);
  animation: closingFadeUp 1s var(--ease-celestial) forwards;
  margin-top: 10px;
}

.celebration-closing-box.hidden {
  display: none;
}

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

.closing-quote-text {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.35;
  color: #fff;
  font-weight: 400;
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
  margin-bottom: 12px;
}

.closing-signoff {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--gold-shimmer);
  line-height: 1.2;
}

.closing-end-heart {
  font-size: 1.8rem;
  margin-top: 10px;
  animation: heartbeatEnd 1.2s infinite ease-in-out;
}

@keyframes heartbeatEnd {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 12px rgba(255, 50, 50, 0.8)); }
}


/* ==========================================================================
   DESKTOP PREVIEW FRAME WRAPPER
   (When opened on desktop browsers, renders as a sleek luxury device chassis)
   ========================================================================== */
@media (min-width: 600px) {
  body {
    background: radial-gradient(circle at 50% 20%, #1c0930 0%, #0c0316 60%, #030107 100%);
  }
  
  #app-container {
    height: min(880px, 94vh);
    max-height: 880px;
    border-radius: 46px;
    box-shadow: 0 0 0 12px rgba(35, 15, 54, 0.6), 0 0 0 14px rgba(212, 175, 55, 0.25), 0 30px 90px rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
  }

  .story-section {
    height: min(880px, 94vh);
    min-height: min(880px, 94vh);
  }

  .music-pill {
    top: 24px;
    right: max(24px, calc((100vw - 440px) / 2 + 18px));
  }
}

