/* ==========================================================================
   ROYAL BIRTHDAY LUXURY SUITE — 5K INR CLIENT TEMPLATE DESIGN SYSTEM
   Inspired by: Documents/Vs code, Documents/Aniversery, Documents/Projects/Birthday
   ========================================================================== */

:root {
  /* --- Obsidian & Deep Velvet Wine Color System --- */
  --color-bg-dark: #080608;
  --color-obsidian: #080608;
  --color-bg-obsidian: #080608;
  --color-bg-velvet: #1a000a;
  --color-wine-dark: #1A000A;
  --color-wine: #2A0815;
  --color-bg-wine: #2a0815;
  --color-wine-rich: #3D091E;
  --color-ruby: #7A0F23;
  --color-ruby-bright: #9E132D;

  /* --- Metallic Imperial Gold Gradient System --- */
  --color-gold: #d4af37;
  --color-gold-bright: #ffd700;
  --color-gold-light: #fbeea4;
  --color-gold-highlight: #FFF8D6;
  --color-gold-champagne: #F3E5AB;
  --color-gold-primary: #D4AF37;
  --color-gold-deep: #AA771C;
  --color-gold-dark: #7C5A05;
  --color-gold-glow: rgba(212, 175, 55, 0.45);
  --color-gold-subtle: rgba(212, 175, 55, 0.15);
  --color-border-gold: rgba(212, 175, 55, 0.35);

  /* Legacy numeric tokens preserved */
  --color-gold-1: #fff8d6;
  --color-gold-2: #f3e5ab;
  --color-gold-3: #d4af37;
  --color-gold-4: #aa771c;

  /* --- Text & Semantic Highlights --- */
  --color-text-primary: #FAF7F2;
  --color-text-secondary: #E8D5D8;
  --color-text-muted: #B39A9F;
  --color-text-light: #f8fafc;
  --color-rose: #ff4d6d;
  --color-rose-soft: #ff85a1;
  --color-rose-accent: #ff4d6d;
  --color-blush: #fff0f3;
  --color-parchment: #fcf8f0;

  /* --- Gradients --- */
  --bg-obsidian-wine: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(42, 8, 21, 0.95) 0%, rgba(26, 0, 10, 0.6) 50%, transparent 100%),
    radial-gradient(ellipse 60% 40% at 90% 65%, rgba(61, 9, 30, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(42, 8, 21, 0.3) 0%, transparent 70%),
    radial-gradient(circle at 50% 50%, #1A000A 0%, #080608 100%);

  --gradient-gold-metallic: linear-gradient(135deg, #FFF8D6 0%, #F3E5AB 25%, #D4AF37 55%, #AA771C 85%, #F3E5AB 100%);
  --gradient-gold-text: linear-gradient(135deg, #FFF8D6 0%, #F3E5AB 30%, #D4AF37 60%, #AA771C 90%);
  --gradient-velvet-card: linear-gradient(135deg, rgba(42, 8, 21, 0.72) 0%, rgba(26, 0, 10, 0.88) 100%);
  --gradient-btn-gold: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 40%, #AA771C 80%, #D4AF37 100%);
  --gold-gradient: linear-gradient(135deg, #fff8d6 0%, #f3e5ab 25%, #d4af37 60%, #aa771c 100%);
  --gold-metallic: linear-gradient(135deg, #fff8d6 0%, #f3e5ab 28%, #d4af37 65%, #aa771c 100%);

  /* --- Luxury Typography Stack --- */
  --font-royal: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-heading: 'Cinzel', serif;
  --font-script: 'Pinyon Script', 'Great Vibes', cursive;
  --font-body: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-ui: 'Montserrat', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Montserrat', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-handwriting: 'Dancing Script', cursive;

  /* --- Agency Glassmorphism & Elevation --- */
  --glass-bg: rgba(26, 0, 10, 0.72);
  --glass-card: rgba(38, 7, 17, 0.68);
  --glass-blur: blur(20px) saturate(160%);
  --glass-border: 1px solid rgba(212, 175, 55, 0.28);
  --glass-border-highlight: 1px solid rgba(243, 229, 171, 0.45);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.12), inset 0 0 20px rgba(212, 175, 55, 0.05);

  /* --- 60fps Physics & Easing --- */
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* Audio Visualizer Dynamic Bar Heights */
  --bar-h1: 4px;
  --bar-h2: 4px;
  --bar-h3: 4px;
  --bar-h4: 4px;
}

/* --- Resets & Global Foundation --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  background: var(--bg-obsidian-wine);
  background-color: var(--color-obsidian);
  color: var(--color-text-light);
  padding-bottom: 80px;
}

/* Background Canvas (Petals, Stars, Confetti) */
#fx-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Subtle Tactile Velvet Micro-Noise Overlay */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.038'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.85;
  mix-blend-mode: overlay;
}

/* Metallic Foil Text Shimmer */
.gold-text, .gold-shimmer {
  background-image: var(--gradient-gold-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(212, 175, 55, 0.35));
  display: inline-block;
  animation: goldFlow 6s linear infinite;
}

@keyframes goldFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Gold Filigree Corner Ornaments */
.luxury-card, .season-card, .week-card, .journey-next-panel {
  position: relative;
}

.luxury-card::before, .season-card::before, .week-card::before {
  content: '✦';
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--color-gold-champagne);
  font-size: 0.85rem;
  opacity: 0.65;
  text-shadow: 0 0 8px var(--color-gold-glow);
  pointer-events: none;
  z-index: 2;
}

/* --- Top Navigation Bar & Progress Bar --- */
.royal-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(12, 3, 6, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-gold);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

.royal-nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-gold);
  font-family: var(--font-royal);
  font-size: 1.15rem;
  letter-spacing: 1px;
  font-weight: 700;
  text-shadow: 0 0 12px var(--color-gold-glow);
}

.nav-brand .crown-icon {
  font-size: 1.4rem;
  animation: crownFloat 3s ease-in-out infinite;
}

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

/* Nav Actions (Music + Config) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Luxury Audio Visualizer Equalizer */
.audio-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  padding: 0 4px;
}

.visualizer-bar {
  width: 3px;
  height: var(--bar-h1, 4px);
  background: var(--gradient-btn-gold, var(--color-gold-bright));
  border-radius: 2px;
  transition: height 0.08s ease;
}

.visualizer-bar:nth-child(1) {
  height: var(--bar-h1, 4px);
}
.visualizer-bar:nth-child(2) {
  height: var(--bar-h2, 4px);
}
.visualizer-bar:nth-child(3) {
  height: var(--bar-h3, 4px);
}
.visualizer-bar:nth-child(4) {
  height: var(--bar-h4, 4px);
}

.audio-visualizer.fallback-anim .visualizer-bar:nth-child(1) {
  animation: barAnim 1s ease-in-out infinite alternate;
}
.audio-visualizer.fallback-anim .visualizer-bar:nth-child(2) {
  animation: barAnim 0.7s ease-in-out infinite alternate 0.2s;
}
.audio-visualizer.fallback-anim .visualizer-bar:nth-child(3) {
  animation: barAnim 1.2s ease-in-out infinite alternate 0.4s;
}
.audio-visualizer.fallback-anim .visualizer-bar:nth-child(4) {
  animation: barAnim 0.9s ease-in-out infinite alternate 0.1s;
}

@keyframes barAnim {
  0% { height: 4px; }
  100% { height: 18px; }
}

.audio-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--color-border-gold);
  border-radius: 30px;
  padding: 4px 10px 4px 6px;
  transition: var(--transition-smooth);
}

.audio-widget:hover {
  background: rgba(212, 175, 55, 0.18);
  box-shadow: 0 0 15px var(--color-gold-glow);
}

/* Shimmering Metallic Gold Foil Animation */
.gold-shimmer {
  background: linear-gradient(120deg, #d4af37 0%, #fff4bf 25%, #ffd700 50%, #d4af37 75%, #fff4bf 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineGold 4s linear infinite;
}

@keyframes shineGold {
  to { background-position: 200% center; }
}

/* Filigree Gold Border Card */
.luxury-card {
  position: relative;
  background: linear-gradient(135deg, rgba(35, 8, 16, 0.8) 0%, rgba(18, 4, 9, 0.92) 100%);
  border: 1px solid var(--color-gold);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 0 20px rgba(212, 175, 55, 0.08);
}

.luxury-card::before, .luxury-card::after {
  content: '✦';
  position: absolute;
  color: var(--color-gold-bright);
  font-size: 0.85rem;
  opacity: 0.7;
}

.luxury-card::before { top: 10px; left: 12px; }
.luxury-card::after { bottom: 10px; right: 12px; }

.audio-play-btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #1a050b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.audio-play-btn:hover {
  transform: scale(1.08);
}

.audio-play-btn.playing {
  animation: discSpin 4s linear infinite;
}

@keyframes discSpin {
  100% { transform: rotate(360deg); }
}

.audio-select {
  background: transparent;
  border: none;
  color: var(--color-gold-light);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  max-width: 110px;
}

.audio-select option {
  background: #1a050b;
  color: #fff;
}

.btn-config-toggle {
  background: transparent;
  border: 1px solid var(--color-border-gold);
  color: var(--color-gold);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.btn-config-toggle:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: rotate(45deg);
}

/* --- Unidirectional Journey Breadcrumb / Step Bar --- */
.journey-stepper {
  width: 100%;
  background: rgba(18, 4, 9, 0.95);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding: 8px 15px;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  scrollbar-width: none;
}

.journey-stepper::-webkit-scrollbar {
  display: none;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.step-indicator .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.step-indicator.active {
  color: var(--color-gold-bright);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-weight: 600;
  box-shadow: 0 0 10px var(--color-gold-glow);
}

.step-indicator.active .step-num {
  background: var(--color-gold-bright);
  color: #120409;
  font-weight: 700;
}

.step-indicator.completed {
  color: var(--color-gold-light);
}

.step-indicator.completed .step-num {
  background: rgba(212, 175, 55, 0.3);
  color: var(--color-gold-bright);
}

.step-arrow {
  color: rgba(212, 175, 55, 0.35);
  font-size: 0.75rem;
}

/* Main Content Wrapper */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 125px auto 40px;
  padding: 0 20px;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--color-border-gold);
  color: var(--color-gold-light);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 15px;
}

.page-title {
  font-family: var(--font-royal);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.page-title .gold-text {
  background: linear-gradient(135deg, #ffd700 0%, #fbeea4 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.page-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-blush);
  max-width: 680px;
  margin: 0 auto;
  opacity: 0.9;
}

/* --- Unidirectional Forward Flow Banner / CTA --- */
.journey-next-panel {
  margin-top: 60px;
  text-align: center;
  padding: 35px 25px;
  background: linear-gradient(135deg, rgba(45, 10, 21, 0.6) 0%, rgba(24, 5, 11, 0.85) 100%);
  border: 1px solid var(--color-border-gold);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.journey-next-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-bright), transparent);
}

.journey-next-panel h3 {
  font-family: var(--font-royal);
  color: var(--color-gold-bright);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.journey-next-panel p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  font-family: var(--font-serif);
}

.btn-journey-next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #b8860b 100%);
  color: #1a050b;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 35px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: var(--transition-bounce);
  cursor: pointer;
  border: none;
}

.btn-journey-next:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
  color: #000;
}

.btn-journey-next .arrow-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.btn-journey-next:hover .arrow-icon {
  transform: translateX(6px);
}

/* Primary Luxury CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #b8860b 100%);
  color: #1a050b;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 35px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: var(--transition-bounce);
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
  color: #000;
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--color-gold-light);
  border: 1px solid var(--color-border-gold);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #fff;
  border-color: var(--color-gold-bright);
}

/* ==========================================================================
   PAGE 0 (INDEX): 3D WAX SEAL ENVELOPE & VIP BOARDING PASS
   ========================================================================== */
.invitation-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  perspective: 1200px;
  padding: 20px 0;
}

.envelope-wrapper {
  position: relative;
  width: min(380px, 92vw);
  max-width: 380px;
  height: 250px;
  cursor: pointer;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  margin-bottom: 50px;
}

.envelope-wrapper:hover {
  transform: scale(1.03) translateY(-4px);
}

.envelope-wrapper.opened {
  transform: translateY(220px);
  cursor: default;
}

.envelope-box {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #5c0b1a 0%, #30050e 100%);
  border-radius: 12px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.9), inset 0 1px 3px rgba(255, 215, 0, 0.2);
  z-index: 10;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.envelope-box::after {
  content: '';
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  pointer-events: none;
}

/* The Envelope Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: calc(min(380px, 92vw) / 2) solid transparent;
  border-right: calc(min(380px, 92vw) / 2) solid transparent;
  border-top: 140px solid #7a0f23;
  z-index: 20;
  transform-origin: top;
  transition: transform 0.8s ease-in-out, z-index 0.6s;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,0.6));
}

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

/* Wax Seal Monogram */
.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b 70%, #7c5a05);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7), inset 0 0 10px rgba(82, 8, 8, 0.6);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: #3b050d;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.4);
  transition: opacity 0.4s, transform 0.4s;
  cursor: pointer;
}

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

.envelope-wrapper.opened .wax-seal {
  opacity: 0;
  pointer-events: none;
}

.wax-seal-hint {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  animation: pulseHint 2s infinite ease-in-out;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(4px); }
}

/* The Royal Ticket / Boarding Pass */
.royal-ticket {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: 520px;
  background: linear-gradient(135deg, #fffcf7 0%, #fdf8ee 100%);
  color: #1e060c;
  z-index: 5;
  transition: transform 1.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.7);
  opacity: 0;
  border-radius: 8px;
  border: 2px solid #d4af37;
  overflow: hidden;
  pointer-events: none;
}

.royal-ticket::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 5px;
  pointer-events: none;
}

.envelope-wrapper.opened .royal-ticket {
  transform: translateY(-340px);
  opacity: 1;
  z-index: 100;
  pointer-events: auto;
}

.ticket-header {
  text-align: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.5);
  padding-bottom: 12px;
  width: 100%;
}

.ticket-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  color: #8c6b12;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.ticket-title {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  color: #3b050d;
  margin-top: 6px;
}

.ticket-body {
  margin-top: 15px;
  text-align: center;
  width: 100%;
}

.ticket-recipient {
  font-family: var(--font-script);
  font-size: 2.3rem;
  color: #b21e35;
  line-height: 1.1;
  margin-bottom: 8px;
}

.ticket-msg {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: #4a282f;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Countdown Card */
.countdown-box {
  background: rgba(45, 10, 21, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 20px;
}

.countdown-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: #8c6b12;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cd-unit {
  background: #2a0812;
  color: var(--color-gold-bright);
  padding: 6px 2px;
  border-radius: 6px;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.cd-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.cd-text {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   PAGE 1 (JOURNEY): CINEMATIC TIMELINE
   ========================================================================== */
.timeline-track {
  position: relative;
  max-width: 820px;
  margin: 30px auto 0;
  padding: 20px 0;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--color-gold) 15%, var(--color-gold) 85%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 40px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 40px;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700, #b8860b);
  border: 3px solid #070305;
  box-shadow: 0 0 15px var(--color-gold-glow);
  z-index: 10;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -9px;
}

.timeline-card {
  background: var(--glass-card);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-gold);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.timeline-title {
  font-family: var(--font-royal);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 12px;
}

.timeline-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.timeline-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-blush);
  line-height: 1.6;
  margin-bottom: 10px;
}

.timeline-quote {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--color-gold-light);
  line-height: 1.2;
}

/* ==========================================================================
   PAGE 2 (MEMORIES): 3D POLAROID GALLERY WALL
   ========================================================================== */
.polaroid-filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--color-gold);
  color: #120409;
  font-weight: 700;
  border-color: var(--color-gold);
  box-shadow: 0 0 15px var(--color-gold-glow);
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  padding: 10px 0;
}

.polaroid-card {
  background: #fdfaf4;
  padding: 14px 14px 22px 14px;
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  position: relative;
  text-align: center;
  transform: rotate(var(--rot, 0deg));
}

.polaroid-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: rgba(230, 215, 185, 0.65);
  border-left: 2px dashed rgba(180, 160, 130, 0.4);
  border-right: 2px dashed rgba(180, 160, 130, 0.4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 2;
}

.polaroid-card:hover {
  transform: scale(1.05) rotate(0deg) !y;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 25px var(--color-gold-glow);
  z-index: 20;
}

.polaroid-img-box {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 2px;
  background: #111;
  position: relative;
}

.polaroid-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.polaroid-card:hover .polaroid-img-box img {
  transform: scale(1.08);
}

.polaroid-caption {
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  color: #2b1115;
  margin-top: 14px;
  line-height: 1.2;
}

.polaroid-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #7a5860;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ==========================================================================
   PAGE 1 (DAYS): 365 LIGHT DAYS 3D SPACE WARP TUNNEL
   ========================================================================== */
.space-warp-stage {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 550px;
  perspective: 800px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--color-border-gold);
  background: radial-gradient(circle at center, #150309 0%, #050103 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), inset 0 0 50px rgba(0,0,0,0.8);
  margin: 20px 0 40px;
  cursor: grab;
}

.space-warp-stage:active {
  cursor: grabbing;
}

#universe-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.memory-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.memory-node .card-inner {
  position: relative;
  width: min(320px, 85vw);
  padding: 22px 18px;
  background: rgba(35, 8, 16, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--color-gold-glow);
  transform: scale(0.9);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.memory-node.milestone .card-inner {
  background: rgba(45, 10, 21, 0.92);
  border: 2px solid var(--color-gold-bright);
  box-shadow: 0 0 40px var(--color-gold-glow);
  width: min(360px, 90vw);
}

.node-idx {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.node-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.node-text {
  font-family: var(--font-royal);
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.35;
}

.memory-node.milestone .node-text {
  font-size: 1.3rem;
  color: var(--color-gold-light);
}

/* Warp HUD Controls */
.warp-hud {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  z-index: 50;
}

.distance-meter {
  font-family: var(--font-royal);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  color: var(--color-gold-bright);
  text-shadow: 0 0 25px var(--color-gold-glow);
  line-height: 1;
}

.distance-sub {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 5px;
}

.warp-hint {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 50;
  animation: pulseHint 2s infinite ease-in-out;
}

.warp-boost-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  border: none;
  color: #1a050b;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.warp-boost-btn:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   PAGE 2 (MONTHS): 12 SEASONS IN BLOOM
   ========================================================================== */
.months-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin: 30px 0 50px;
}

.season-card {
  background: var(--glass-card);
  border: var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}

.season-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-gold);
  box-shadow: 0 20px 45px rgba(0,0,0,0.8), 0 0 20px var(--color-gold-glow);
}

.season-img-box {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.season-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.season-card:hover .season-img-box img {
  transform: scale(1.08);
}

.season-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(18, 4, 9, 0.85);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-bright);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 15px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.season-body {
  padding: 24px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.season-month {
  font-family: var(--font-royal);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 6px;
}

.season-title {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--color-rose-soft);
  margin-bottom: 12px;
  line-height: 1.1;
}

.season-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-blush);
  line-height: 1.6;
}

/* ==========================================================================
   PAGE 3 (WEEK): 7 DAYS OF DEVOTION WEEK SANCTUARY
   ========================================================================== */
.week-sanctuary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0 50px;
}

.week-card {
  background: linear-gradient(135deg, rgba(45, 10, 21, 0.65) 0%, rgba(20, 4, 9, 0.85) 100%);
  border: 1px solid var(--color-border-gold);
  border-radius: 20px;
  padding: 30px 22px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.week-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-gold);
  box-shadow: 0 25px 50px rgba(0,0,0,0.85), 0 0 25px var(--color-gold-glow);
}

.week-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 15px rgba(255, 77, 109, 0.5));
}

.week-title {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  color: var(--color-gold-bright);
  margin-bottom: 4px;
}

.week-date {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--color-rose);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 12px;
}

.week-tagline {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* 3D Velvet Proposal Box */
.proposal-section {
  background: var(--glass-card);
  border: 1px solid var(--color-border-gold);
  border-radius: 24px;
  padding: 40px 25px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  margin: 40px 0;
}

.velvet-box {
  width: 120px;
  height: 120px;
  margin: 25px auto;
  background: radial-gradient(circle at 35% 35%, #8a152e, #3d0510);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 2px 6px rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--color-gold);
  transition: transform 0.4s ease;
}

.velvet-box:hover {
  transform: scale(1.08) rotate(-3deg);
}

.velvet-box .box-ring {
  font-size: 3.2rem;
  filter: drop-shadow(0 0 15px #ffd700);
}
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.scratch-card {
  position: relative;
  background: var(--glass-card);
  border: var(--glass-border);
  border-radius: 16px;
  min-height: 180px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease;
}

.scratch-card:hover {
  transform: translateY(-4px);
}

.scratch-reveal {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scratch-card.revealed .scratch-reveal {
  opacity: 1;
  transform: scale(1);
}

.scratch-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.scratch-title {
  font-family: var(--font-royal);
  font-size: 1.05rem;
  color: var(--color-gold-bright);
  margin-bottom: 6px;
}

.scratch-desc {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--color-blush);
  line-height: 1.4;
}

.scratch-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #ffd700, #b8860b 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2b0b14;
  z-index: 5;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scratch-card.revealed .scratch-cover {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.scratch-cover-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
}

.scratch-cover-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Secret Botanical Garden Bloom Game */
.garden-dashboard {
  background: var(--glass-card);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  margin-top: 30px;
}

.garden-pot-stage {
  position: relative;
  width: min(500px, 92vw);
  height: 260px;
  margin: 20px auto;
  background: radial-gradient(circle at 50% 90%, rgba(212, 175, 55, 0.15), transparent 70%);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
}

.sprouted-flower {
  position: absolute;
  font-size: 2rem;
  transform-origin: bottom center;
  animation: bloomGrow 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: none;
}

@keyframes bloomGrow {
  0% { transform: scale(0) translateY(20px); opacity: 0; }
  60% { transform: scale(1.3) translateY(-5px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ==========================================================================
   PAGE 4 (CELEBRATION): INTERACTIVE 3D CAKE & CANDLE BLOWOUT
   ========================================================================== */
.cake-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  position: relative;
  margin: 20px auto;
}

.cake-container {
  position: relative;
  width: 280px;
  height: 220px;
  margin-top: 60px;
  cursor: pointer;
}

.cake-tier {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  border: 2px solid rgba(212, 175, 55, 0.5);
}

.cake-tier.bottom {
  bottom: 0;
  width: 250px;
  height: 80px;
  background: linear-gradient(135deg, #7a152d, #420814);
}

.cake-tier.middle {
  bottom: 70px;
  width: 190px;
  height: 70px;
  background: linear-gradient(135deg, #a82040, #5c0f20);
}

.cake-tier.top {
  bottom: 130px;
  width: 130px;
  height: 60px;
  background: linear-gradient(135deg, #ff85a1, #d43b62);
}

.cake-frosting {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 18px;
  background: #fff8f0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.candle-cluster {
  position: absolute;
  bottom: 190px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 10;
}

.candle {
  position: relative;
  width: 10px;
  height: 45px;
  background: repeating-linear-gradient(45deg, #ffd700, #ffd700 4px, #fff 4px, #fff 8px);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.flame {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at bottom, #fff 20%, #ffd700 50%, #ff4d6d 80%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  box-shadow: 0 0 15px #ffd700, 0 0 30px #ff4d6d;
  animation: flameFlicker 0.25s infinite alternate ease-in-out;
  transform-origin: bottom center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes flameFlicker {
  0% { transform: translateX(-50%) rotate(-2deg) scale(1); }
  100% { transform: translateX(-50%) rotate(2deg) scale(1.1); }
}

.flame.blown-out {
  opacity: 0;
  transform: translateX(-50%) scale(0.2);
  pointer-events: none;
}

.cake-action-bar {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.cake-slice-modal {
  background: var(--glass-card);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 25px;
  max-width: 480px;
  text-align: center;
  margin: 25px auto 0;
  display: none;
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PAGE 5 (LETTER): WAX LETTERS, PARCHMENT SCROLL & COSMIC CLIMAX
   ========================================================================== */
.letter-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.wax-envelope-card {
  background: linear-gradient(135deg, #420814 0%, #20040a 100%);
  border: 1px solid var(--color-border-gold);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.wax-envelope-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--color-gold);
  box-shadow: 0 20px 45px rgba(0,0,0,0.8), 0 0 20px var(--color-gold-glow);
}

.wax-seal-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

/* Masterpiece Parchment Scroll */
.parchment-scroll {
  background: linear-gradient(135deg, #fffcf5 0%, #f6efe0 100%);
  color: #2b0b14;
  border-radius: 12px;
  padding: clamp(25px, 5vw, 45px);
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.85);
  border: 2px solid #d4af37;
  max-width: 800px;
  margin: 0 auto 60px;
}

.parchment-scroll::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  pointer-events: none;
}

.scroll-salutation {
  font-family: var(--font-royal);
  font-size: 1.4rem;
  color: #8c1d30;
  margin-bottom: 20px;
}

.scroll-body {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: #381219;
  margin-bottom: 25px;
}

.scroll-signature {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: #b21e35;
  text-align: right;
  line-height: 1.2;
}

/* Multiverse Climax Box */
.multiverse-climax-box {
  background: radial-gradient(circle at center, rgba(147, 51, 234, 0.18) 0%, rgba(20, 3, 10, 0.85) 100%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 20px;
  padding: 40px 25px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85);
  margin-bottom: 50px;
}

.multiverse-quote {
  font-family: var(--font-royal);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: #f3e8ff;
  line-height: 1.5;
  margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.6);
}

/* ==========================================================================
   MODAL DIALOGS & TEMPLATE CONFIG DRAWER
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 20px;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: linear-gradient(135deg, #260710 0%, #150309 100%);
  border: 1px solid var(--color-gold);
  border-radius: 18px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 30px var(--color-gold-glow);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .modal-sheet {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--color-gold);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s ease;
}

.modal-close-btn:hover {
  transform: scale(1.2);
}

/* Config Drawer (Slide-in) */
.config-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: min(360px, 92vw);
  height: 100vh;
  background: rgba(18, 4, 9, 0.96);
  border-left: 1px solid var(--color-gold);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2500;
  box-shadow: -10px 0 40px rgba(0,0,0,0.85);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 30px 20px;
  overflow-y: auto;
}

.config-drawer.open {
  right: 0;
}

.config-form-group {
  margin-bottom: 18px;
}

.config-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-gold-light);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.config-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.config-input:focus {
  border-color: var(--color-gold-bright);
}

.theme-picker-group {
  margin: 18px 0;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.theme-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-pill:hover, .theme-pill.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-gold-bright);
  color: #fff;
}

.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.btn-share-link {
  width: 100%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid var(--color-border-gold);
  color: var(--color-gold-bright);
  padding: 11px 16px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-share-link:hover {
  background: rgba(212, 175, 55, 0.3);
  box-shadow: 0 0 15px var(--color-gold-glow);
  color: #fff;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gradient-btn-gold);
  color: #0d0205;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.6);
  z-index: 999999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s var(--ease-luxury);
  pointer-events: none;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   CUSTOM LUXURY MAGNETIC CURSOR
   ========================================================================== */
.royal-cursor-dot {
  position: fixed;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--color-gold-highlight, #FFF8D6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease;
  box-shadow: 0 0 10px var(--color-gold-glow, rgba(212, 175, 55, 0.6));
  will-change: transform;
}

.royal-cursor-ring {
  position: fixed;
  top: -18px;
  left: -18px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s var(--ease-luxury, cubic-bezier(0.16, 1, 0.3, 1)), height 0.25s var(--ease-luxury, cubic-bezier(0.16, 1, 0.3, 1)), border-color 0.25s ease, background-color 0.25s ease;
  will-change: transform;
}

.royal-cursor-ring.cursor-hover {
  top: -26px;
  left: -26px;
  width: 52px;
  height: 52px;
  border-color: rgba(255, 215, 0, 0.9);
  background-color: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.royal-cursor-ring.cursor-click {
  top: -14px;
  left: -14px;
  width: 28px;
  height: 28px;
  border-color: #fff8d6;
  background-color: rgba(255, 215, 0, 0.25);
}

@media (hover: none), (pointer: coarse) {
  .royal-cursor-dot, .royal-cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS — MOBILE FIRST AGENCY POLISH
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 90px;
  }

  /* Navigation Bar */
  .royal-nav {
    height: 60px;
    padding: 0 14px;
  }

  .nav-brand {
    font-size: 1rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .audio-select {
    display: none;
  }

  .audio-widget {
    padding: 3px 8px 3px 4px;
    gap: 6px;
  }

  .audio-play-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  /* Unidirectional Stepper */
  .journey-stepper {
    justify-content: flex-start;
    padding: 6px 12px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .step-indicator {
    font-size: 0.72rem;
    padding: 4px 8px;
    flex-shrink: 0;
  }

  .step-arrow {
    font-size: 0.65rem;
    flex-shrink: 0;
  }

  /* Main Wrapper */
  .main-wrapper {
    margin: 110px auto 30px;
    padding: 0 16px;
  }

  .page-title {
    font-size: clamp(1.7rem, 6vw, 2.4rem);
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  /* Chapter 0: Envelope & Ticket */
  .timeline-track::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  .timeline-dot {
    left: 11px !important;
  }

  .royal-ticket {
    height: 540px;
    padding: 20px 14px;
  }

  .envelope-wrapper.opened .royal-ticket {
    transform: translateY(-360px);
  }

  .ticket-recipient {
    font-size: 1.9rem;
  }

  .countdown-grid {
    gap: 4px;
  }

  .cd-unit {
    padding: 5px 2px;
  }

  .cd-number {
    font-size: 1.15rem;
  }

  /* Chapter 1: 365 Days Warp Tunnel */
  .space-warp-stage {
    height: 70vh;
    min-height: 460px;
    border-radius: 18px;
    margin: 15px 0 30px;
  }

  .warp-hud {
    top: 15px;
  }

  .distance-meter {
    font-size: 2.2rem;
  }

  .distance-sub {
    font-size: 0.65rem;
  }

  .memory-node .card-inner {
    width: min(290px, 84vw);
    padding: 18px 14px;
  }

  .memory-node.milestone .card-inner {
    width: min(330px, 88vw);
    padding: 22px 16px;
  }

  /* Chapter 2: 12 Months */
  .months-container {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0 40px;
  }

  .season-card {
    border-radius: 16px;
  }

  .season-img-box {
    height: 200px;
  }

  /* Chapter 3: 7 Days Devotion */
  .week-sanctuary-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 20px 0 40px;
  }

  .week-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .proposal-section {
    padding: 30px 16px;
    margin: 30px auto;
  }

  .velvet-box {
    width: 140px;
    height: 140px;
  }

  /* Chapter 4: Celebration & Cake */
  .cake-container {
    width: 250px;
    height: 200px;
    margin-top: 50px;
  }

  .cake-tier.bottom {
    width: 220px;
    height: 72px;
  }

  .cake-tier.middle {
    width: 170px;
    height: 64px;
    bottom: 64px;
  }

  .cake-tier.top {
    width: 120px;
    height: 54px;
    bottom: 120px;
  }

  .candle-cluster {
    bottom: 174px;
    gap: 12px;
  }

  .cake-action-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 25px auto 0;
  }

  .cake-action-bar button,
  .cake-action-bar .btn-primary,
  .cake-action-bar .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }

  /* Chapter 5: Letters & Climax */
  .letter-vault-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 35px;
  }

  .wax-envelope-card {
    padding: 22px 16px;
  }

  .parchment-scroll {
    padding: 26px 18px;
    margin-bottom: 40px;
  }

  .scroll-salutation {
    font-size: 1.25rem;
  }

  .scroll-signature {
    font-size: 1.8rem;
  }

  .multiverse-climax-box {
    padding: 30px 18px;
  }

  /* CTA Banners */
  .journey-next-panel {
    padding: 26px 16px;
    margin-top: 40px;
  }

  .btn-journey-next,
  .btn-primary {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.98rem;
  }

  /* Customizer Drawer on Mobile */
  .config-drawer {
    width: min(360px, 94vw);
    padding: 24px 16px;
  }

  .config-input {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  }

  /* Modals on Mobile */
  .modal-sheet {
    padding: 24px 16px;
    max-width: 92vw;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 0.9rem;
    max-width: 130px;
  }

  .royal-ticket {
    height: 520px;
    padding: 16px 12px;
  }

  .ticket-title {
    font-size: 1.15rem;
  }

  .ticket-recipient {
    font-size: 1.7rem;
  }

  .ticket-msg {
    font-size: 0.88rem;
  }

  .envelope-wrapper.opened .royal-ticket {
    transform: translateY(-340px);
  }

  .envelope-box {
    border-radius: 10px;
  }

  .wax-seal {
    width: 56px;
    height: 56px;
    font-size: 1.9rem;
  }

  .space-warp-stage {
    height: 60vh;
    min-height: 400px;
  }

  .parchment-scroll {
    padding: 20px 14px;
  }

  .scroll-body {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}
