/* ============================================================================
   INTERACTIVE BIRTHDAY CELEBRATION PORTAL v5
   Theme: Bright Pink · Glassmorphism All Pages · Pin-Prick Balloons · Realistic FW
   ============================================================================ */

:root {
  /* Bright Pastel Pink Core - MORE PINK */
  --bg-main: #ffe0f0;
  --bg-page: radial-gradient(circle at 50% 20%, #fff5fa 0%, #ffe0f0 40%, #ffc1e3 75%, #ffaad4 100%);
  --bg-card: rgba(255, 255, 255, 0.78);
  --border-card: rgba(255, 130, 190, 0.45);
  --border-glow: rgba(240, 50, 150, 0.6);

  /* Accents - brighter pinks */
  --pink-hot: #f0259a;
  --pink-mid: #f472b6;
  --pink-soft: #fbb6d6;
  --rose-deep: #c2185b;
  --rose-red: #e91e63;
  --gold: #f59e0b;
  --gold-light: #fde68a;
  --violet-soft: #c084fc;
  --sky-blue: #38bdf8;
  --text-dark: #1e0a14;
  --text-mid: #6b1a35;
  --text-light: #9f4e6e;

  /* Fonts */
  --font-h: 'Space Grotesk', sans-serif;
  --font-b: 'Outfit', sans-serif;
  --font-hw: 'Caveat', cursive;

  /* Sizing */
  --radius-card: 26px;
  --radius-pill: 999px;
  --radius-sm: 14px;

  /* Shadows */
  --shadow-card: 0 10px 36px rgba(240, 37, 154, 0.18), 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 26px 65px rgba(240, 37, 154, 0.35), 0 8px 24px rgba(0, 0, 0, 0.09);
  --shadow-btn: 0 6px 24px rgba(240, 37, 154, 0.45);
  --shadow-btn-hover: 0 12px 38px rgba(240, 37, 154, 0.68);

  /* Easing */
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ────────────────── RESET ────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow: hidden; height: 100%; }

body {
  font-family: var(--font-b);
  background: var(--bg-main);
  color: var(--text-dark);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ────────────────── CANVASES ────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: transparent !important;
}

/* ────────────────── PAGE STACK (ZOOM-IN / ZOOM-OUT) ────────────────── */
.page-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  perspective: 1200px;
}

/* Base page state */
.page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.75);
  transition: opacity 0.55s var(--ease), transform 0.6s var(--ease), filter 0.55s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
  transform-origin: center center;
}

/* GLASSMORPHISM BACKGROUND OVERLAY - applies to ALL pages */
.glass-page-bg {
  position: absolute;
  inset: 0;
  background: rgba(255, 240, 248, 0.35);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  z-index: 2;
  pointer-events: none;
}

/* Active visible page */
.page.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
  filter: blur(0px);
  z-index: 10;
}

/* ZOOM-OUT (Outgoing forward) */
.page.zoom-out-forward {
  opacity: 0;
  transform: scale(0.65);
  filter: blur(8px);
  pointer-events: none;
  z-index: 5;
}

/* ZOOM-IN (Incoming forward: starts big, zooms into normal scale) */
.page.zoom-in-forward {
  opacity: 0;
  transform: scale(1.4);
  filter: blur(10px);
  pointer-events: none;
}

/* ZOOM-OUT (Outgoing backward: zooms toward user) */
.page.zoom-out-backward {
  opacity: 0;
  transform: scale(1.4);
  filter: blur(8px);
  pointer-events: none;
  z-index: 5;
}

/* ZOOM-IN (Incoming backward: starts small, zooms up into normal scale) */
.page.zoom-in-backward {
  opacity: 0;
  transform: scale(0.65);
  filter: blur(8px);
  pointer-events: none;
}

/* ────────────────── PAGE INNER ────────────────── */
.page-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 980px;
  padding: 76px 24px 32px;
  gap: 20px;
  position: relative;
  z-index: 10;
}

/* ────────────────── LIQUID GLASS CARD ────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
}

/* Glassmorphism panels for universe text and other sections */
.universe-glass-panel {
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.section-glass-header {
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  margin-bottom: 8px;
}

.finale-glass-panel {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

/* 3D Tilt Card */
.tilt-card {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  transform-style: preserve-3d;
}

.tilt-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: perspective(900px) rotateX(4deg) rotateY(-4deg) scale(1.03) translateY(-4px);
}

/* ────────────────── TYPOGRAPHY & GRADIENTS ────────────────── */
.pink-grad {
  background: linear-gradient(135deg, #c2185b 0%, #f0259a 50%, #e91e63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gold-grad {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 55%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(240, 37, 154, 0.35);
  border-radius: var(--radius-pill);
  padding: 6px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-mid);
  box-shadow: 0 4px 14px rgba(240,37,154,0.14);
  backdrop-filter: blur(12px);
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink-hot);
  box-shadow: 0 0 10px var(--pink-hot);
  animation: pulse-dot 1.4s infinite;
}

@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0.45; }
}

.section-header { text-align: center; max-width: 680px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-h);
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: var(--pink-hot);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}
.section-sub { font-size: 1rem; color: var(--text-light); }

/* ────────────────── BUTTONS WITH 3D HOVER ────────────────── */
button, .cta-btn {
  font-family: var(--font-h);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s ease;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #f0259a, #c2185b);
  color: #fff;
  font-size: 1.02rem;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.06) rotateX(3deg);
  box-shadow: var(--shadow-btn-hover);
  background: linear-gradient(135deg, #f472b6, #f0259a);
}

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

.gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  font-size: 1.02rem;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45);
}

.gold-btn:hover {
  transform: translateY(-4px) scale(1.06) rotateX(3deg);
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.65);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(240, 37, 154, 0.35);
  color: var(--text-mid);
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--pink-hot);
  transform: translateY(-3px) scale(1.03) rotateX(2deg);
  box-shadow: 0 8px 24px rgba(240, 37, 154, 0.25);
}

.btn-arrow { display: inline-block; transition: transform 0.3s; }
.primary-btn:hover .btn-arrow, .gold-btn:hover .btn-arrow { transform: translateX(6px); }

/* ────────────────── MUSIC PLAYER ────────────────── */
.music-player {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid rgba(240, 37, 154, 0.38);
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 24px rgba(240, 37, 154, 0.28);
  backdrop-filter: blur(20px) saturate(180%);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.music-player:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 32px rgba(240, 37, 154, 0.45);
}

.music-disc {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fce4ec, #f48fb1);
  border: 2px solid var(--pink-hot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
}

.music-disc.spinning { animation: spin-disc 2.5s linear infinite; }
@keyframes spin-disc { to { transform: rotate(360deg); } }

.music-meta { display: flex; flex-direction: column; }
.music-name { font-size: 0.85rem; font-weight: 800; color: var(--text-dark); white-space: nowrap; }
.music-hint { font-size: 0.68rem; color: var(--text-light); }

.music-play-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-hot), var(--rose-deep));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 3px 12px rgba(240, 37, 154, 0.5);
  transition: transform 0.2s;
}
.music-play-btn:hover { transform: scale(1.15); }

.music-arrow-hint {
  position: absolute;
  bottom: -64px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  animation: bounce-hint 1.5s ease-in-out infinite;
}

.arrow-bubble {
  background: var(--pink-hot);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(240, 37, 154, 0.45);
}
.arrow-tip { color: var(--pink-hot); font-size: 1rem; margin-right: 14px; }

/* ────────────────── PAGE DOTS ────────────────── */
.page-dots {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(240, 37, 154, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.page-dot.active-dot {
  background: var(--pink-hot);
  transform: scale(1.6);
  box-shadow: 0 0 12px rgba(240, 37, 154, 0.75);
}

/* ────────────────── ARROW HINTS ────────────────── */
.page-arrow-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.bounce-hint { animation: bounce-hint 1.6s ease-in-out infinite; }
@keyframes bounce-hint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.arrow-label { font-size: 0.82rem; font-weight: 700; color: var(--pink-hot); }
.arrow-down { font-size: 1.4rem; color: var(--pink-hot); }
.big-arrow { font-size: 2rem; }
.bottom-hint { margin-top: 16px; }

.inline-hint { display: flex; flex-direction: row; align-items: center; gap: 6px; margin-top: 8px; }
.arrow-right { font-size: 1.4rem; color: var(--pink-hot); animation: bounce-right 1.6s infinite; }
@keyframes bounce-right { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }


/* ────────────────── DEV BAR ────────────────── */
.dev-bar {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(240, 37, 154, 0.3);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.75rem;
  backdrop-filter: blur(16px);
}
.dev-label { color: #9f4e6e; font-weight: 700; }
.dev-chip {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(240, 37, 154, 0.3);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-mid);
  font-size: 0.75rem;
  cursor: pointer;
}
.active-chip {
  background: var(--pink-hot);
  border-color: var(--pink-hot);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(240, 37, 154, 0.5);
}

/* ═══ PAGE 0: LANDING & COUNTDOWN ═══ */
.page-heading {
  font-family: var(--font-h);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.18;
  background: linear-gradient(135deg, #831843, #f0259a, #e91e63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.clock-row { display: flex; align-items: center; gap: 10px; }
.clock-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid rgba(240, 37, 154, 0.32);
  border-radius: var(--radius-card);
  padding: 14px 18px 10px;
  min-width: 72px;
  box-shadow: 0 6px 20px rgba(240, 37, 154, 0.16);
  backdrop-filter: blur(18px);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.clock-block:hover {
  transform: translateY(-4px) scale(1.08) rotateX(4deg);
  box-shadow: 0 14px 36px rgba(240, 37, 154, 0.28);
}
.clock-num {
  font-family: var(--font-h);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #c2185b, #f0259a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.clock-lbl {
  font-size: 0.65rem;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--pink-hot);
  margin-top: 6px;
  text-transform: uppercase;
}
.clock-sep {
  font-family: var(--font-h);
  font-size: 2rem;
  font-weight: 800;
  color: var(--pink-hot);
  animation: blink-sep 1s infinite;
  margin-bottom: 8px;
}
@keyframes blink-sep { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }

.bday-banner {
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid rgba(240, 37, 154, 0.4);
  border-radius: var(--radius-card);
  padding: 22px 34px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 32px rgba(240, 37, 154, 0.28);
}
.bday-emoji { font-size: 2.5rem; margin-bottom: 6px; }
.bday-banner-title {
  font-family: var(--font-h);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, #c2185b, #f0259a, #e91e63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bday-banner-sub { font-size: 1rem; color: var(--text-light); margin-top: 4px; }

/* ═══ PAGE 1: LAUNCH & TITLE ═══ */
.portal-ring-decor {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: spin-ring 12s linear infinite;
}
.ring-1 { width: 380px; height: 380px; border-color: rgba(240, 37, 154, 0.28); animation-duration: 12s; }
.ring-2 { width: 530px; height: 530px; border-color: rgba(244, 114, 182, 0.18); animation-direction: reverse; animation-duration: 18s; }
.ring-3 { width: 660px; height: 660px; border-color: rgba(251, 207, 232, 0.16); animation-duration: 24s; }
@keyframes spin-ring { to { transform: translate(-50%, -50%) rotate(360deg); } }

.reveal-card { padding: 48px 40px; text-align: center; max-width: 700px; z-index: 1; }
.dimension-tag {
  display: inline-block;
  font-family: var(--font-h);
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  color: var(--pink-hot);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-display-title {
  font-family: var(--font-h);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 16px;
  color: var(--text-dark);
}
.pink-divider {
  width: 100px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--pink-hot), transparent);
  margin: 0 auto 16px;
  border-radius: 2px;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--rose-deep);
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 0.98rem;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ═══ UNIVERSE PAGES: SIDE-BY-SIDE LAYOUT ═══ */
.universe-page { align-items: stretch; }
.universe-layout {
  padding-top: 80px !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  width: 100%;
  max-width: 1080px;
  height: 100%;
  align-items: center;
  padding: 80px 32px 32px;
  position: relative;
  z-index: 5;
}

.universe-media-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

/* Video Shell & Video Fit fixes */
.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: calc(100vh - 175px);
  border-radius: 22px;
  overflow: hidden;
  /* Dark glass background for letterboxing effect so videos aren't cropped */
  background: rgba(10, 5, 8, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(240, 37, 154, 0.28);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

.universe-num-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 5;
  font-family: var(--font-h);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-hot), var(--rose-deep));
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(240, 37, 154, 0.45);
}

/* Fit the video perfectly inside without cropping */
.universe-vid { 
  width: 100%; 
  height: 100%; 
  object-fit: contain; /* ensures whole video is visible */
  display: block; 
}

.vid-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, #fff5f8, #fce4ec);
  padding: 24px;
  text-align: center;
  border: 2px dashed rgba(240, 37, 154, 0.38);
  border-radius: 20px;
  z-index: 2;
}
.vid-placeholder.hidden { display: none; }

.vp-icon { font-size: 3.5rem; animation: bounce-icon 2s ease-in-out infinite; }
@keyframes bounce-icon {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.08); }
}

.vp-badge {
  font-family: var(--font-h);
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--pink-hot);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}
.chef-badge { background: #fb923c; }
.foodie-badge { background: var(--rose-red); }
.moana-badge { background: #0ea5e9; }
.dancer-badge { background: var(--violet-soft); }
.queen-vp-badge { background: var(--gold); }

.vp-file {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--pink-hot);
  background: rgba(240, 37, 154, 0.1);
  padding: 4px 12px;
  border-radius: 8px;
  word-break: break-all;
}

.standalone-play-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.vid-ctrl {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1493 0%, #ff2a9d 45%, #f43f5e 100%) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  cursor: pointer;
  font-size: 1.15rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-left: 3px; /* Optical center for triangle ▶ */
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease, filter 0.22s ease !important;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(240, 37, 154, 0.8), 0 0 24px rgba(253, 230, 138, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  animation: vid-play-btn-subtle-glow 1.5s infinite ease-in-out !important;
  outline: none;
}

@keyframes vid-play-btn-subtle-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 0 12px rgba(240, 37, 154, 0.75),
      0 0 20px rgba(253, 230, 138, 0.4),
      inset 0 1px 2px rgba(255, 255, 255, 0.8);
    filter: brightness(1.02);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 
      0 0 22px rgba(240, 37, 154, 1),
      0 0 35px rgba(253, 230, 138, 0.8),
      0 0 8px #ffffff,
      inset 0 1.5px 3px #ffffff;
    filter: brightness(1.22);
  }
}

.vid-ctrl:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 0 26px rgba(240, 37, 154, 1), 0 0 42px rgba(253, 230, 138, 0.9) !important;
}

.vid-ctrl.is-playing {
  animation: none !important;
  padding-left: 0 !important;
  background: rgba(28, 12, 40, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 14px rgba(240, 37, 154, 0.5), 0 3px 10px rgba(0, 0, 0, 0.45) !important;
  filter: brightness(1) !important;
}

/* Revealed Next Universe button spring entrance */
@keyframes pop-in-next-btn {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(10px);
  }
  70% {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.universe-next-btn.revealed-next-btn {
  animation: pop-in-next-btn 0.45s var(--ease-spring) forwards !important;
}

/* Text Panel */
.universe-text-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.universe-tag-chip {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-h);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pink-hot);
  background: rgba(240, 37, 154, 0.12);
  border: 1px solid rgba(240, 37, 154, 0.32);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

.donald-chip { color: #d97706; background: rgba(217,119,6,0.12); border-color: rgba(217,119,6,0.35); }
.chef-chip { color: #ea580c; background: rgba(234,88,12,0.12); border-color: rgba(234,88,12,0.35); }
.foodie-chip { color: #e11d48; background: rgba(225,29,72,0.12); border-color: rgba(225,29,72,0.35); }
.moana-chip { color: #0284c7; background: rgba(2,132,199,0.12); border-color: rgba(2,132,199,0.35); }
.dancer-chip { color: #9333ea; background: rgba(147,51,234,0.12); border-color: rgba(147,51,234,0.35); }
.queen-chip { color: #b45309; background: rgba(180,83,9,0.12); border-color: rgba(180,83,9,0.35); }

.universe-name {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
}
.queen-title {
  color: #ffffff !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 0 20px rgba(240, 37, 154, 0.8), 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

.universe-quote {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-style: italic;
  color: var(--rose-deep);
  line-height: 1.4;
  border-left: 3px solid var(--pink-soft);
  padding-left: 14px;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.u-badge {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(240, 37, 154, 0.24);
  border-radius: var(--radius-pill);
  color: var(--text-mid);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s;
}
.u-badge:hover { transform: translateY(-3px) scale(1.05) rotateX(3deg); box-shadow: 0 6px 14px rgba(240, 37, 154, 0.22); }

.universe-nav-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* ═══ RICH THEMED BACKGROUNDS ═══ */
.theme-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.theme-particle {
  position: absolute;
  user-select: none;
  pointer-events: none;
  animation: float-around var(--dur, 8s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes float-around {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.9); opacity: 0.35; }
  50% { transform: translate(var(--tx, 30px), var(--ty, -50px)) rotate(18deg) scale(1.15); opacity: 0.65; }
  100% { transform: translate(var(--tx2, -20px), var(--ty2, -90px)) rotate(-15deg) scale(0.95); opacity: 0.3; }
}

/* MOANA */
.moana-moon {
  position: absolute;
  top: 30px;
  right: 60px;
  width: 90px; height: 90px;
  border-radius: 50%;
  box-shadow: 18px 10px 0 0 #fde68a, 0 0 35px rgba(253, 230, 138, 0.45);
  animation: moon-glow 4s ease-in-out infinite alternate;
}
@keyframes moon-glow {
  0% { filter: drop-shadow(0 0 10px rgba(253, 230, 138, 0.4)); }
  100% { filter: drop-shadow(0 0 25px rgba(253, 230, 138, 0.8)); }
}

.moana-waves {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  overflow: hidden;
}

.ocean-wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,90 350,-40 500,50 C650,140 900,10 1200,40 L1200,120 L0,120 Z' fill='%2338bdf8' opacity='0.25'/%3E%3C/svg%3E") repeat-x;
  animation: wave-slide 10s linear infinite;
}
.ocean-wave:nth-child(2) {
  bottom: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,110 400,-10 600,60 C800,130 1000,20 1200,50 L1200,120 L0,120 Z' fill='%237dd3fc' opacity='0.35'/%3E%3C/svg%3E") repeat-x;
  animation: wave-slide 14s linear infinite reverse;
}
.ocean-wave:nth-child(3) {
  bottom: 0px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C180,10 380,80 580,30 C780,-20 980,70 1200,20 L1200,120 L0,120 Z' fill='%23bae6fd' opacity='0.45'/%3E%3C/svg%3E") repeat-x;
  animation: wave-slide 8s linear infinite;
}
@keyframes wave-slide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.palm-decor {
  position: absolute;
  bottom: 20px; left: 10px;
  font-size: 5rem;
  opacity: 0.28;
  transform-origin: bottom left;
  animation: palm-sway 5s ease-in-out infinite alternate;
}
@keyframes palm-sway { 0% { transform: rotate(0deg); } 100% { transform: rotate(6deg); } }

/* DANCER */
.disco-spotlight {
  position: absolute;
  top: -100px;
  width: 280px;
  height: 600px;
  background: radial-gradient(ellipse at top, rgba(240, 37, 154, 0.3), rgba(192, 132, 252, 0.18), transparent 70%);
  transform-origin: top center;
  animation: spotlight-sweep 6s ease-in-out infinite alternate;
  pointer-events: none;
}
.disco-spotlight-2 {
  right: 15%;
  background: radial-gradient(ellipse at top, rgba(56, 189, 248, 0.28), rgba(240, 37, 154, 0.2), transparent 70%);
  animation-duration: 8s;
  animation-delay: -3s;
}
@keyframes spotlight-sweep {
  0% { transform: rotate(-25deg); }
  100% { transform: rotate(25deg); }
}

.equalizer-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 100px;
  padding: 0 20px;
  opacity: 0.35;
}
.eq-bar {
  width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--pink-hot), var(--violet-soft), var(--sky-blue));
  animation: eq-pulse var(--dur, 0.8s) ease-in-out infinite alternate;
}
@keyframes eq-pulse { 0% { height: 12px; } 100% { height: var(--h, 75px); } }

/* ═══ PAGE 8: SCRAPBOOK GALLERY ═══ */
.gallery-inner { justify-content: flex-start; padding-top: 20px; gap: 16px; overflow-y: auto; }
.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 960px;
}
.polaroid-card {
  background: rgba(255,255,255,0.88);
  padding: 12px 12px 18px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
  position: relative;
  backdrop-filter: blur(8px);
}
.polaroid-card::before {
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 20px;
  background: rgba(240, 37, 154, 0.5);
  border-left: 1.5px dashed rgba(255,255,255,0.6);
  border-right: 1.5px dashed rgba(255,255,255,0.6);
  border-radius: 3px;
}
.polaroid-card:hover {
  transform: rotate(0deg) scale(1.08) translateY(-8px) rotateX(3deg);
  box-shadow: 0 20px 45px rgba(240, 37, 154, 0.35);
  z-index: 10;
}
.polaroid-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.polaroid-mock {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, #fce4ec, #f8bbd9);
  border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.pm-icon { font-size: 2rem; }
.pm-label { font-size: 0.72rem; font-weight: 700; color: var(--rose-deep); text-align: center; }
.pm-file { font-size: 0.6rem; color: var(--pink-hot); font-family: monospace; }
.polaroid-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.polaroid-caption { font-family: var(--font-hw); font-size: 1.25rem; font-weight: 700; color: #1e0a14; line-height: 1.1; }
.polaroid-stamp {
  font-family: var(--font-h); font-size: 0.62rem; font-weight: 800;
  color: var(--rose-red); background: #ffe4e6;
  border: 1px dashed var(--rose-red); padding: 2px 6px; border-radius: 4px;
  transform: rotate(-4deg); text-transform: uppercase;
}

/* Lightbox */
.lightbox-dialog { border: none; background: transparent; max-width: 90vw; max-height: 90vh; margin: auto; }
.lightbox-dialog::backdrop { background: rgba(15,2,8,0.88); backdrop-filter: blur(18px); }
.lightbox-inner {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(28px);
  border: 1.5px solid rgba(240,37,154,0.38);
  border-radius: var(--radius-card);
  padding: 24px;
  max-width: 560px;
  position: relative;
  box-shadow: 0 24px 60px rgba(240,37,154,0.38);
}
.lb-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(240,37,154,0.15); border: none;
  color: var(--rose-deep); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.lb-close:hover { background: var(--pink-hot); color: #fff; transform: scale(1.1); }
.lb-media {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm);
  overflow: hidden; background: #fce4ec; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.lb-media img { width: 100%; height: 100%; object-fit: contain; }
.lb-caption { font-family: var(--font-hw); font-size: 1.5rem; color: var(--text-dark); margin-bottom: 10px; }
.lb-nav { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(240,37,154,0.22); padding-top: 10px; }
.lb-nav-btn {
  padding: 6px 16px; border-radius: var(--radius-pill);
  background: rgba(240,37,154,0.12); border: 1px solid rgba(240,37,154,0.28);
  color: var(--rose-deep); font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.lb-nav-btn:hover { background: var(--pink-hot); color: #fff; }

/* ═══ PAGE 9: MAGIC WISH HAT 🎩✨ ═══ */
.magic-hat-inner {
  justify-content: space-between;
  align-items: center;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(10px, 1.8vh, 20px) 16px clamp(12px, 2.2vh, 24px);
  position: relative;
  z-index: 2;
}

.magic-hat-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto clamp(4px, 0.8vh, 8px) !important;
  text-align: center !important;
  max-width: 600px !important;
  width: 100% !important;
  padding: clamp(6px, 1vh, 10px) 18px !important;
  flex-shrink: 0 !important;
  background: rgba(22, 14, 38, 0.6) !important;
  border: 1.5px solid rgba(236, 72, 153, 0.3) !important;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.magic-hat-header .section-tag {
  display: inline-block !important;
  margin: 0 auto 2px !important;
  font-size: clamp(0.68rem, 1vw, 0.78rem) !important;
  padding: 2px 12px !important;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(139, 92, 246, 0.25)) !important;
  border: 1px solid rgba(244, 114, 182, 0.45) !important;
  color: #ffd166 !important;
  border-radius: var(--radius-pill) !important;
  letter-spacing: 0.08em !important;
}

.magic-hat-header .section-title {
  margin: 1px 0 3px !important;
  font-size: clamp(1.25rem, 2.7vw, 1.7rem) !important;
  font-weight: 800 !important;
  text-align: center !important;
  background: linear-gradient(135deg, #ffffff 15%, #ffd166 45%, #f472b6 75%, #c084fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 14px rgba(244, 114, 182, 0.5)) !important;
}

.magic-hat-header .section-sub {
  margin: 0 0 4px !important;
  font-size: clamp(0.74rem, 1.3vw, 0.86rem) !important;
  color: rgba(255, 230, 245, 0.95) !important;
  text-shadow: 0 0 10px rgba(240, 37, 154, 0.5) !important;
  text-align: center !important;
}

.magic-nav-btn {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #d97706 100%) !important;
  border: 1.5px solid rgba(254, 240, 138, 0.65) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.45), 0 0 12px rgba(244, 63, 94, 0.3) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.magic-nav-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.65), 0 0 18px rgba(254, 240, 138, 0.5) !important;
}

.score-pill {
  display: inline-block !important;
  margin-top: 2px !important;
  padding: 3px 16px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(240, 37, 154, 0.35) !important;
  border-radius: var(--radius-pill) !important;
  font-size: clamp(0.74rem, 1.3vw, 0.84rem) !important;
  font-weight: 700 !important;
  color: var(--rose-deep) !important;
  box-shadow: 0 4px 14px rgba(240, 37, 154, 0.14) !important;
  backdrop-filter: blur(10px) !important;
}

/* ═══ TWO-PANEL COMPACT MAGIC LAYOUT (LIKE MEMORY BLOOM TREE) ═══ */
.compact-magic-layout {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: clamp(10px, 1.6vw, 18px) !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* 🎩 LEFT PANEL: COMPACT MAGIC HAT & RIBBON-PULLING WITH TUTORIAL */
.magic-hat-panel {
  width: clamp(240px, 28vw, 340px) !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(8px, 1.4vh, 14px) !important;
  background: rgba(22, 10, 36, 0.82) !important;
  border: 1.5px solid rgba(240, 37, 154, 0.45) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(240, 37, 154, 0.25) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

/* 📜 RIGHT PANEL: 6 EXISTING WISHES REVEALED ONE-BY-ONE */
.magic-wishes-panel {
  flex: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: clamp(8px, 1.4vh, 14px) clamp(10px, 1.6vw, 16px) !important;
  background: rgba(22, 10, 36, 0.82) !important;
  border: 1.5px solid rgba(240, 37, 154, 0.45) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(240, 37, 154, 0.25) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.wishes-panel-header {
  margin-bottom: clamp(4px, 0.8vh, 8px) !important;
  text-align: left !important;
  flex-shrink: 0 !important;
}

.wishes-panel-tag {
  display: inline-block !important;
  font-family: var(--font-h) !important;
  font-size: clamp(0.62rem, 0.9vw, 0.72rem) !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  color: #f472b6 !important;
  text-transform: uppercase !important;
}

.wishes-panel-title {
  margin: 1px 0 0 !important;
  font-family: var(--font-h) !important;
  font-size: clamp(0.92rem, 1.4vw, 1.18rem) !important;
  font-weight: 800 !important;
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

/* 🌟 WISH REVEAL STAGE (SINGLE PLAYFUL POPUP IN ORDER - NEVER A LIST) */
.wish-reveal-stage {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 0 !important;
  position: relative !important;
  padding: clamp(6px, 1.2vh, 12px) clamp(8px, 1.4vw, 14px) !important;
  box-sizing: border-box !important;
}

/* 📜 INITIAL PLACEHOLDER (BEFORE ANY PULL) */
.wish-placeholder-card {
  width: 100% !important;
  max-width: 440px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: clamp(14px, 2.6vh, 28px) clamp(16px, 2.4vw, 24px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px dashed rgba(255, 215, 0, 0.45) !important;
  border-radius: 20px !important;
  box-sizing: border-box !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

.placeholder-magic-icon {
  font-size: clamp(2.4rem, 4.8vh, 3.4rem) !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
  animation: float-icon 2.5s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4)) !important;
}

@keyframes float-icon {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-8px) rotate(3deg); }
}

.placeholder-title {
  font-family: var(--font-h) !important;
  font-size: clamp(1rem, 1.6vw, 1.25rem) !important;
  color: #ffd700 !important;
  margin: 4px 0 6px !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

.placeholder-desc {
  font-family: var(--font-h) !important;
  font-size: clamp(0.76rem, 1.1vw, 0.88rem) !important;
  color: rgba(255, 230, 245, 0.9) !important;
  margin: 0 0 10px !important;
  line-height: 1.35 !important;
}

.placeholder-hint-badge {
  display: inline-block !important;
  padding: 4px 14px !important;
  border-radius: 999px !important;
  background: rgba(240, 37, 154, 0.22) !important;
  border: 1px solid rgba(240, 37, 154, 0.55) !important;
  color: #ffb6db !important;
  font-family: var(--font-h) !important;
  font-size: clamp(0.68rem, 0.92vw, 0.78rem) !important;
  font-weight: 700 !important;
  animation: hint-badge-pulse 2s ease-in-out infinite !important;
}

@keyframes hint-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(240, 37, 154, 0.3); }
  50% { transform: scale(1.04); box-shadow: 0 0 16px rgba(240, 37, 154, 0.7); }
}

/* 🎀 PLAYFUL POPUP CARD: SHOWS ONLY ONE WISH AT A TIME */
.wish-popup-card {
  width: 100% !important;
  max-width: 480px !important;
  background: linear-gradient(145deg, rgba(32, 12, 54, 0.95), rgba(18, 6, 32, 0.98)) !important;
  border: 2px solid rgba(255, 114, 182, 0.75) !important;
  border-radius: 22px !important;
  padding: clamp(12px, 2.2vh, 22px) clamp(16px, 2.5vw, 26px) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 35px rgba(240, 37, 154, 0.35), inset 0 0 16px rgba(255, 215, 0, 0.12) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.wish-popup-card.popup-bounce {
  animation: playful-wish-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes playful-wish-pop {
  0% { transform: scale(0.82) translateY(20px); opacity: 0; }
  55% { transform: scale(1.06) translateY(-4px); opacity: 1; }
  80% { transform: scale(0.97) translateY(1px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.wish-popup-sparkles {
  font-size: 0.9rem !important;
  color: #ffd700 !important;
  text-shadow: 0 0 8px #ffd700 !important;
  animation: sparkles-spin 3s linear infinite !important;
}

.wish-popup-badge {
  font-family: var(--font-h) !important;
  font-size: clamp(0.72rem, 1vw, 0.84rem) !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  color: #ffd700 !important;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.7) !important;
  text-transform: uppercase !important;
  margin: 2px 0 4px !important;
}

.wish-popup-icon {
  font-size: clamp(2.8rem, 5.5vh, 4rem) !important;
  line-height: 1 !important;
  margin: 4px 0 8px !important;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)) !important;
  animation: wish-emoji-bounce 2s ease-in-out infinite alternate !important;
}

@keyframes wish-emoji-bounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.08); }
}

.wish-popup-text {
  font-family: var(--font-h) !important;
  font-size: clamp(0.92rem, 1.3vw, 1.15rem) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(0, 0, 0, 0.8) !important;
  line-height: 1.4 !important;
  margin: 4px 0 12px !important;
}

/* Mini dots indicator along bottom: progress only, never a list */
.wish-popup-dots {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(6px, 1vw, 10px) !important;
  margin-top: 2px !important;
}

.wish-mini-dot {
  width: clamp(22px, 3.2vh, 28px) !important;
  height: clamp(22px, 3.2vh, 28px) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: clamp(0.68rem, 0.9vw, 0.78rem) !important;
  font-weight: 800 !important;
  font-family: var(--font-h) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  transition: all 0.3s ease !important;
  user-select: none !important;
}

.wish-mini-dot.revealed {
  background: rgba(240, 37, 154, 0.3) !important;
  color: #fff !important;
  border-color: rgba(240, 37, 154, 0.6) !important;
  cursor: pointer !important;
}

.wish-mini-dot.active {
  background: linear-gradient(135deg, #f0259a, #ffd700) !important;
  color: #fff !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.85) !important;
  transform: scale(1.18) !important;
}

/* Smooth spring reset for ribbon track */
.ribbon-pull-track.smooth-reset .ribbon-body,
.ribbon-pull-track.smooth-reset .ribbon-tip-handle {
  transition: all 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* 🎩 INTERACTIVE ZONE (HAT + RIBBON + CAKE + TUTORIAL) */
.magic-hat-interactive-zone {
  position: relative;
  width: min(340px, 90vw);
  height: clamp(230px, 35vh, 290px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  user-select: none;
}

/* 👆 TUTORIAL OVERLAY */
.magic-hat-tutorial {
  position: absolute;
  bottom: clamp(140px, 20vh, 185px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.magic-hat-tutorial.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-15px);
}

.tutorial-hand-anim {
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  animation: tutorial-grab-pull 2s ease-in-out infinite;
}

@keyframes tutorial-grab-pull {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
  25% {
    transform: translateY(16px) scale(0.92);
    opacity: 1;
  }
  70% {
    transform: translateY(-55px) scale(0.92);
    opacity: 1;
  }
  85% {
    transform: translateY(-60px) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-60px) scale(1);
    opacity: 0;
  }
}

.tutorial-text-badge {
  background: rgba(18, 7, 34, 0.92);
  border: 1.5px solid rgba(255, 215, 0, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(240, 37, 154, 0.6);
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-h);
  font-weight: 800;
  font-size: clamp(0.78rem, 2.1vw, 0.92rem);
  padding: 6px 16px;
  white-space: nowrap;
  animation: tutorial-badge-pulse 2s ease-in-out infinite;
}

@keyframes tutorial-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 25px rgba(255, 215, 0, 0.85); }
}

/* 🎀 RIBBON PULL TRACK & DRAGGABLE HANDLE */
.ribbon-pull-track {
  position: absolute;
  bottom: clamp(94px, 13.5vh, 120px);
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: clamp(130px, 20vh, 175px);
  z-index: 25;
  pointer-events: none;
}

.ribbon-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(24px, 4vw, 30px);
  height: var(--ribbon-h, 24px);
  background: linear-gradient(180deg, #ff2a85 0%, #ff7300 25%, #ffd700 50%, #00f2fe 75%, #9d4edd 100%);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 18px rgba(255, 42, 133, 0.65), inset 0 0 10px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ribbon-texture {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 4px,
    transparent 4px,
    transparent 8px
  );
}

.ribbon-stars {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 4px #ffd700;
}

.ribbon-tip-handle {
  position: absolute;
  bottom: var(--ribbon-h, 24px);
  left: 50%;
  transform: translate(-50%, 50%);
  width: clamp(52px, 8vw, 64px);
  height: clamp(52px, 8vw, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  z-index: 28;
  outline: none;
}

.ribbon-tip-handle:active,
.ribbon-tip-handle.is-dragging {
  cursor: grabbing;
}

.ribbon-tip-pulse {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: ribbon-tip-pulse 1.3s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(255, 42, 133, 0.85));
  transition: transform 0.15s ease;
}

@keyframes ribbon-tip-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 42, 133, 0.75));
  }
  100% {
    transform: scale(1.22) translateY(-3px);
    filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.95)) drop-shadow(0 0 12px rgba(255, 42, 133, 0.9));
  }
}

.ribbon-tip-icon {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1;
}

.ribbon-pull-arrow {
  font-size: 0.82rem;
  margin-top: -6px;
  animation: bounce-arrow 0.9s ease-in-out infinite alternate;
}

@keyframes bounce-arrow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.ribbon-tip-aura {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(240, 37, 154, 0) 70%);
  pointer-events: none;
}

/* 🎩 MAGICIAN TOP HAT */
.magician-hat-wrap {
  position: relative;
  width: clamp(170px, 28vw, 220px);
  height: clamp(115px, 16vh, 145px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.magician-hat-wrap.hat-magic-shake {
  animation: hat-magic-shake 0.85s ease-in-out forwards;
}

@keyframes hat-magic-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-8deg) scale(1.08) translateY(-6px); }
  30% { transform: rotate(8deg) scale(1.12) translateY(-10px); }
  45% { transform: rotate(-7deg) scale(1.12) translateY(-8px); }
  60% { transform: rotate(6deg) scale(1.08) translateY(-5px); }
  75% { transform: rotate(-3deg) scale(1.04) translateY(-2px); }
  90% { transform: rotate(2deg) scale(1.02); }
}

.magician-hat {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.45));
}

.hat-opening {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  height: clamp(26px, 3.8vh, 34px);
  border-radius: 50%;
  background: #0a0418;
  border: 2px solid rgba(192, 132, 252, 0.65);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 16px rgba(168, 85, 247, 0.6);
  z-index: 10;
  overflow: hidden;
}

.hat-opening-void {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #000 0%, #17072e 80%, #2e0854 100%);
}

.hat-opening-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(240, 37, 154, 0.45) 0%, transparent 70%);
  animation: cosmic-opening-glow 2.5s ease-in-out infinite alternate;
}

@keyframes cosmic-opening-glow {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

.hat-crown {
  position: absolute;
  top: clamp(13px, 1.9vh, 17px);
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  height: clamp(65px, 9vh, 85px);
  background: linear-gradient(90deg, #100624 0%, #200f42 25%, #3c1a74 50%, #1e0d3f 75%, #0d041c 100%);
  border-radius: 0 0 6px 6px;
  box-shadow: inset 0 8px 15px rgba(0, 0, 0, 0.6), inset 0 -4px 10px rgba(0, 0, 0, 0.4);
  z-index: 8;
  overflow: hidden;
}

.hat-crown-shading {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
}

.hat-band {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(18px, 2.5vh, 24px);
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 25%, #f43f5e 50%, #d97706 75%, #fbbf24 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hat-buckle {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.hat-brim {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: clamp(24px, 3.4vh, 32px);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #3a1a6e 0%, #1e0d3d 50%, #0c0419 90%);
  border: 2px solid rgba(192, 132, 252, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.4);
  z-index: 9;
}

/* 🎂 RISING MINI CAKE */
.mini-magic-cake-wrap {
  position: absolute;
  bottom: clamp(94px, 13.5vh, 120px);
  left: 50%;
  transform: translate(-50%, 20px) scale(0);
  opacity: 0;
  z-index: 35;
  pointer-events: none;
  transition: transform 0.8s var(--ease-spring), opacity 0.6s ease;
}

.mini-magic-cake-wrap.cake-rising {
  transform: translate(-50%, -24px) scale(1);
  opacity: 1;
  animation: mini-cake-float 3s ease-in-out infinite alternate 0.8s;
}

@keyframes mini-cake-float {
  0% { transform: translate(-50%, -24px) scale(1); }
  100% { transform: translate(-50%, -36px) scale(1.06); }
}

.mini-magic-cake {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mini-cake-candle {
  font-size: 1.25rem;
  margin-bottom: -6px;
  z-index: 2;
  animation: candle-flicker 0.6s infinite alternate;
}

@keyframes candle-flicker {
  0% {
    transform: scale(1) rotate(-3deg);
    filter: drop-shadow(0 0 8px #ffb703);
  }
  100% {
    transform: scale(1.15) rotate(3deg);
    filter: drop-shadow(0 0 16px #ff006e) drop-shadow(0 0 8px #ffd166);
  }
}

.mini-cake-body {
  font-size: clamp(3.2rem, 7vw, 4.2rem);
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(240, 37, 154, 0.65));
}

.mini-cake-sparkles {
  font-size: 0.95rem;
  color: #ffd700;
  text-shadow: 0 0 8px #fff;
  animation: sparkles-spin 3s linear infinite;
  margin-top: 2px;
}

@keyframes sparkles-spin {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
  100% { transform: scale(0.9) rotate(360deg); opacity: 0.7; }
}

/* ✨ MAGICAL PARTICLES & SMOKE LAYER */
.hat-particles-layer {
  position: absolute;
  inset: -40px -60px;
  pointer-events: none;
  z-index: 28;
  overflow: visible;
}

.magic-particle {
  position: absolute;
  pointer-events: none;
  font-size: 1.45rem;
  user-select: none;
  animation: fly-particle var(--dur, 1.2s) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fly-particle {
  0% {
    transform: translate(0, 0) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--tx, 0px), var(--ty, -100px)) scale(1.35) rotate(var(--rot, 30deg));
    opacity: 0;
  }
}

.magic-smoke {
  position: absolute;
  pointer-events: none;
  user-select: none;
  width: clamp(36px, 6vw, 54px);
  height: clamp(36px, 6vw, 54px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 250, 0.75) 0%, rgba(240, 180, 230, 0.45) 40%, rgba(200, 150, 220, 0) 70%);
  filter: blur(4px);
  animation: smoke-billow var(--dur, 1.6s) ease-out forwards;
}

@keyframes smoke-billow {
  0% {
    transform: translate(0, 0) scale(0.3);
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--tx, 0px), var(--ty, -120px)) scale(2.3);
    opacity: 0;
  }
}

/* 🌟 MAKE A WISH BUTTON GLOW PULSE */
#cake-unlock-btn.magic-pulse-btn {
  animation: magic-btn-pop 0.5s var(--ease-spring) forwards, magic-btn-glow 1.5s infinite alternate;
}

@keyframes magic-btn-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 📱 RESPONSIVE ADJUSTMENTS FOR PAGE 9 (MAGIC HAT) */
@media (max-width: 768px) {
  #page-9 .magic-hat-inner {
    padding: 6px 8px 10px !important;
    gap: 4px !important;
    justify-content: space-between !important;
  }

  .magic-hat-header {
    margin-bottom: 2px !important;
    padding: 4px 74px 4px 12px !important;
    max-width: 98% !important;
  }

  .magic-hat-header .section-tag {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
    letter-spacing: 1px !important;
  }

  .magic-hat-header .section-title {
    font-size: clamp(0.88rem, 3.8vw, 1.05rem) !important;
    margin: 1px 0 !important;
    white-space: nowrap !important;
  }

  .magic-hat-header .section-sub {
    display: none !important;
  }

  .score-pill {
    margin-top: 2px !important;
    padding: 2px 10px !important;
    font-size: 0.72rem !important;
  }

  .compact-magic-layout {
    gap: 6px !important;
  }

  /* Left Panel in Mobile: Compact Hat & Ribbon */
  .magic-hat-panel {
    width: clamp(105px, 29vw, 135px) !important;
    padding: 4px 2px !important;
    border-radius: 12px !important;
  }

  .magic-hat-interactive-zone {
    max-height: 100% !important;
  }

  .magician-hat-wrap {
    width: clamp(90px, 24vw, 110px) !important;
    height: clamp(65px, 9.5vh, 78px) !important;
  }

  .hat-opening {
    height: 18px !important;
  }

  .hat-crown {
    top: 9px !important;
    height: 44px !important;
  }

  .hat-band {
    height: 12px !important;
  }

  .hat-buckle {
    font-size: 0.75rem !important;
  }

  .hat-brim {
    height: 16px !important;
  }

  .ribbon-pull-track {
    bottom: clamp(52px, 8vh, 65px) !important;
    width: 36px !important;
    height: clamp(75px, 12vh, 95px) !important;
  }

  .ribbon-body {
    width: 18px !important;
  }

  .ribbon-tip-handle {
    width: 36px !important;
    height: 36px !important;
  }

  .ribbon-tip-icon {
    font-size: 1.35rem !important;
  }

  .ribbon-pull-arrow {
    font-size: 0.68rem !important;
  }

  .magic-hat-tutorial {
    bottom: clamp(95px, 14.5vh, 125px) !important;
    gap: 3px !important;
  }

  .tutorial-text-badge {
    font-size: 0.62rem !important;
    padding: 2px 6px !important;
    max-width: 95px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }

  .tutorial-hand-anim {
    font-size: 1.3rem !important;
  }

  .mini-magic-cake-wrap {
    bottom: clamp(52px, 8vh, 65px) !important;
  }

  .mini-cake-body {
    font-size: 2.2rem !important;
  }

  .mini-cake-candle {
    font-size: 0.9rem !important;
  }

  /* Right Panel in Mobile: Playful Popup Wish Reveal Area */
  .magic-wishes-panel {
    padding: 6px 8px !important;
    border-radius: 14px !important;
  }

  .wishes-panel-header {
    margin-bottom: 2px !important;
  }

  .wishes-panel-tag {
    font-size: 0.55rem !important;
  }

  .wishes-panel-title {
    font-size: 0.84rem !important;
  }

  .wish-reveal-stage {
    padding: 2px 4px !important;
  }

  .wish-placeholder-card {
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }

  .placeholder-magic-icon {
    font-size: 1.8rem !important;
    margin-bottom: 2px !important;
  }

  .placeholder-title {
    font-size: 0.82rem !important;
    margin: 2px 0 !important;
  }

  .placeholder-desc {
    font-size: 0.66rem !important;
    line-height: 1.2 !important;
    margin: 0 0 6px !important;
  }

  .placeholder-hint-badge {
    font-size: 0.58rem !important;
    padding: 2px 8px !important;
  }

  .wish-popup-card {
    padding: 8px 10px !important;
    border-radius: 14px !important;
  }

  .wish-popup-sparkles {
    font-size: 0.75rem !important;
  }

  .wish-popup-badge {
    font-size: 0.65rem !important;
    margin: 1px 0 3px !important;
  }

  .wish-popup-icon {
    font-size: 2.1rem !important;
    margin: 2px 0 4px !important;
  }

  .wish-popup-text {
    font-size: 0.76rem !important;
    line-height: 1.26 !important;
    margin: 2px 0 8px !important;
  }

  .wish-popup-dots {
    gap: 4px !important;
    margin-top: 2px !important;
  }

  .wish-mini-dot {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.6rem !important;
  }

  #page-9 .page-nav-row {
    margin-top: 2px !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #page-9 .page-nav-row .cta-btn {
    padding: 6px 14px !important;
    font-size: 0.76rem !important;
  }
}

/* ═══ PAGE 10: CAKE CUTTING ═══ */
#page-10 .cake-page-inner,
.cake-page-inner {
  justify-content: flex-start !important;
  align-items: center !important;
  min-height: 100vh !important;
  height: 100vh !important;
  padding-top: clamp(36px, 7vh, 70px) !important;
  gap: clamp(12px, 2vh, 22px) !important;
  box-sizing: border-box !important;
}

#page-10 .section-header {
  text-align: center !important;
  flex-shrink: 0 !important;
}

#page-10 .section-header h2,
#page-10 .section-header .cake-main-title {
  color: #ffffff !important;
  font-family: var(--font-h) !important;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem) !important;
  font-weight: 800 !important;
  text-shadow: 0 0 20px rgba(240, 37, 154, 0.9), 0 0 35px rgba(253, 230, 138, 0.6), 0 2px 8px rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
}

#page-10 .section-header p,
#page-10 .section-header .section-sub,
#page-10 #cake-subtitle {
  font-family: var(--font-b) !important;
  font-size: 1rem !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3) !important;
  margin: 0 !important;
  text-align: center !important;
}

.cake-scene {
  position: relative;
  width: 230px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}
.cake-scene:hover { transform: scale(1.05) translateY(-4px); }
.cake-scene:active { transform: scale(0.97); }

.candle-wrap {
  position: absolute;
  top: -52px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  z-index: 10;
}
.candle-body {
  width: 12px; height: 38px;
  background: linear-gradient(135deg, #fff9c4, #f9a825);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset -3px 0 6px rgba(0,0,0,0.15);
}
.flame-wrap {
  position: relative;
  width: 14px; height: 24px;
  animation: flicker 0.8s ease-in-out infinite alternate;
}
@keyframes flicker {
  0% { transform: scaleX(1) scaleY(1) rotate(-1deg); }
  100% { transform: scaleX(0.85) scaleY(1.1) rotate(2deg); }
}
.flame-outer {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 24px;
  background: radial-gradient(ellipse at bottom, #ff9800, #ff5722, transparent);
  border-radius: 50% 50% 20% 20%; filter: blur(1px);
}
.flame-inner {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 7px; height: 14px;
  background: radial-gradient(ellipse at bottom, #fff9c4, #fff176, transparent);
  border-radius: 50% 50% 20% 20%;
}
.flame-wrap.blown-out { display: none; }

.cake-layer { position: relative; border-radius: 14px; margin: 0 auto; overflow: visible; }
.cake-top {
  width: 135px; height: 54px;
  background: linear-gradient(160deg, #ff80b0, #e91e8c, #c2185b);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(233,30,140,0.35);
  display: flex; align-items: center; justify-content: center;
}
.cake-mid {
  width: 185px; height: 60px;
  background: linear-gradient(160deg, #f06292, #e91e8c, #ad1457);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(233,30,140,0.3);
}
.cake-bot {
  width: 230px; height: 66px;
  background: linear-gradient(160deg, #ec407a, #d81b60, #880e4f);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(216,27,96,0.35);
}
.cake-plate {
  width: 250px; height: 16px;
  background: linear-gradient(135deg, #f8bbd9, #fce4ec);
  border-radius: 50%;
  margin: 0 auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.frosting-top, .frosting-mid, .frosting-bot {
  position: absolute;
  top: -8px; left: 10px; right: 10px;
  height: 12px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  filter: drop-shadow(0 2px 4px rgba(255,255,255,0.5));
}
.frosting-top::before, .frosting-mid::before, .frosting-bot::before {
  content: '';
  position: absolute;
  bottom: -10px; left: 0; right: 0; height: 18px;
  background: radial-gradient(ellipse 14px 12px at 14px 0, rgba(255,255,255,0.88) 50%, transparent 51%),
              radial-gradient(ellipse 14px 12px at 42px 0, rgba(255,255,255,0.88) 50%, transparent 51%),
              radial-gradient(ellipse 14px 12px at 70px 0, rgba(255,255,255,0.88) 50%, transparent 51%),
              radial-gradient(ellipse 14px 12px at 98px 0, rgba(255,255,255,0.88) 50%, transparent 51%),
              radial-gradient(ellipse 14px 12px at 126px 0, rgba(255,255,255,0.88) 50%, transparent 51%);
}
.cake-deco {
  font-size: 0.9rem;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 5;
}

.knife-anim {
  position: absolute;
  top: 10px; right: -50px;
  font-size: 2.8rem;
  transform: rotate(45deg);
  animation: knife-cut 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 25;
}
@keyframes knife-cut {
  0% { right: -50px; top: 10px; opacity: 0; }
  40% { opacity: 1; }
  70% { right: 50px; top: 30px; }
  100% { right: 65px; top: 52px; opacity: 0.6; }
}

.cut-line {
  position: absolute;
  top: 20px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  animation: cut-line-in 0.4s ease forwards;
  z-index: 15;
}
@keyframes cut-line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.cake-scene.cut .cake-top { transform: translateX(10px) rotate(3deg); transition: transform 0.6s ease; }
.cake-scene.cut .cake-mid { transform: translateX(-8px) rotate(-2deg); transition: transform 0.6s ease 0.1s; }
.cake-scene.cut .cake-bot { transform: translateY(4px) rotate(1deg); transition: transform 0.6s ease 0.2s; }

.cake-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fade-in 0.6s ease;
}
.wish-pill {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,224,240,0.92));
  border: 1.5px solid rgba(240,37,154,0.4);
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rose-deep);
  box-shadow: 0 6px 20px rgba(240,37,154,0.28);
  backdrop-filter: blur(14px);
}

/* ═══ PAGE 11: GRAND FINALE ═══ */
.finale-inner {
  flex-direction: row !important;
  gap: 44px;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 40px;
  max-width: 1060px;
}

.crown-float {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  animation: float-crown 3s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(245,158,11,0.8));
}
@keyframes float-crown {
  0%,100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  50% { transform: translateX(-50%) translateY(-10px) rotate(5deg); }
}

.queen-frame {
  width: 230px; min-width: 230px; height: 230px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--pink-hot);
  box-shadow: 0 0 35px rgba(240,37,154,0.55), inset 0 0 20px rgba(240,37,154,0.28);
  position: relative;
  background: #fce4ec;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.queen-img { width: 100%; height: 100%; object-fit: cover; }
.queen-fallback { display: none; flex-direction: column; align-items: center; gap: 6px; padding: 12px; text-align: center; }

.finale-text { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.finale-lead { font-size: 1.05rem; font-style: italic; color: var(--text-light); }
.finale-title {
  font-family: var(--font-h);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, #b45309, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.finale-bday { font-family: var(--font-h); font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; }

.letter-card { padding: 28px 28px 24px; text-align: left; position: relative; }
.letter-quote {
  position: absolute; top: 8px; left: 18px;
  font-size: 3.5rem; color: rgba(240,37,154,0.22);
  font-family: var(--font-h); line-height: 1; pointer-events: none;
}
.letter-body { font-size: 0.98rem; line-height: 1.8; color: var(--text-dark); position: relative; z-index: 1; }
.letter-from { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.from-line { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(240,37,154,0.38)); }
.from-name { font-size: 0.95rem; color: var(--text-mid); }
.finale-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ────────────────── UTILITIES ────────────────── */
.hidden { display: none !important; }
@keyframes fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ────────────────── MOBILE RESPONSIVE ────────────────── */
@media (max-width: 768px) {
  .universe-layout {
    grid-template-columns: 1fr !important;
    padding: clamp(50px, 7vh, 62px) 14px 14px !important;
    gap: clamp(8px, 1.2vh, 12px) !important;
    align-content: center !important;
  }
  .universe-media-panel { gap: 6px !important; }
  .vid-ctrl {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    font-size: 1rem !important;
  }
  .video-shell { max-height: 38vw !important; aspect-ratio: 16/9 !important; }
  .universe-text-panel { gap: 8px !important; padding: 12px 14px !important; }
  .universe-name { font-size: clamp(1.3rem, 3.8vw, 1.7rem) !important; }
  .universe-quote { font-size: 0.82rem !important; }
  .badge-row { gap: 6px !important; }
  .u-badge { font-size: 0.72rem !important; padding: 3px 8px !important; }
  .universe-vid { object-fit: contain; }
  .finale-inner { flex-direction: column !important; padding: 72px 20px 30px; gap: 22px; }
  .queen-frame { width: 150px; min-width: 150px; height: 150px; }
  .polaroid-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .music-player .music-meta { display: none; }
  .clock-row { gap: 6px; }
  .clock-block { min-width: 60px; padding: 10px 8px 8px; }
  .clock-sep { font-size: 1.6rem; }
  .cake-scene { width: 180px; }
  .cake-bot { width: 180px; }
  .cake-mid { width: 148px; }
  .cake-top { width: 110px; }
  .magic-wish-card { padding: 8px 12px; }
}

@media (max-width: 390px) {
  .clock-block { min-width: 52px; padding: 8px 6px; }
  .clock-num { font-size: 1.7rem; }
  .clock-lbl { font-size: 0.55rem; }
  .polaroid-grid { grid-template-columns: 1fr 1fr; }
  .page-dots { display: none; }
}

/* === CAKE PAGE DARK MODE === */
#page-10 {
  transition: background-color 1.5s ease, background-image 1.5s ease;
}
#page-10.cake-dark-mode {
  background: #050505 !important;
}
#page-10.cake-dark-mode .glass-page-bg {
  opacity: 0.05 !important;
}
#page-10.cake-dark-mode .theme-bg {
  opacity: 0 !important;
}
#page-10.cake-dark-mode h2, #page-10.cake-dark-mode p {
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(255,255,255,0.3);
}

/* === LIGHTWEIGHT PAGE-RELATED FLOATING EMOJIS (PAGES 0–11) === */
.page-floating-emojis {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none !important;
  user-select: none !important;
  z-index: 1; /* Strictly behind .page-inner (z-index: 10) */
}

.floating-emoji {
  position: absolute;
  pointer-events: none !important;
  user-select: none !important;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  opacity: var(--base-opacity, 0.22);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  animation: floatEmojiDrift var(--dur, 14s) ease-in-out var(--delay, 0s) infinite alternate;
  will-change: transform, opacity;
  line-height: 1;
}

@keyframes floatEmojiDrift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(0.92);
    opacity: var(--base-opacity, 0.2);
  }
  50% {
    transform: translate(var(--tx, 20px), var(--ty, -35px)) rotate(var(--rot, 12deg)) scale(1.08);
    opacity: calc(var(--base-opacity, 0.2) * 1.35);
  }
  100% {
    transform: translate(var(--tx2, -18px), var(--ty2, -65px)) rotate(calc(var(--rot, 12deg) * -1)) scale(0.95);
    opacity: calc(var(--base-opacity, 0.2) * 0.85);
  }
}

/* === FLOATING BG BALLOONS === */
.bg-balloon {
  position: absolute;
  bottom: -10%;
  font-size: 2.5rem;
  opacity: 0.4;
  animation: floatUp 12s linear infinite;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.bg-balloon:nth-child(even) {
  animation-duration: 15s;
  font-size: 3.5rem;
  filter: blur(1px);
}
.bg-balloon:nth-child(3n) {
  animation-duration: 18s;
  font-size: 1.8rem;
  opacity: 0.6;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(-10deg) translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-120vh) rotate(15deg) translateX(50px); opacity: 0; }
}

/* === BOKEH === */
.bg-bokeh {
  position: absolute;
  bottom: -5%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  opacity: 0.3;
  animation: floatBokeh 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes floatBokeh {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  50% { opacity: 0.4; }
  100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

/* Fix for Gallery Header Cutoff */
#page-8 .section-glass-header { margin-top: 80px; }

/* Music Player Hero Mode */
.global-music-player.hero-mode {
  top: 50% !important;
  right: 50% !important;
  transform: translate(50%, -100%) scale(1.6) !important;
  box-shadow: 0 0 40px rgba(240, 37, 154, 0.6) !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
  animation: pulseHuge 2s infinite;
}
@keyframes pulseHuge {
  0% { box-shadow: 0 0 20px rgba(240, 37, 154, 0.4); transform: translate(50%, -100%) scale(1.6); }
  50% { box-shadow: 0 0 60px rgba(240, 37, 154, 0.8); transform: translate(50%, -100%) scale(1.65); }
  100% { box-shadow: 0 0 20px rgba(240, 37, 154, 0.4); transform: translate(50%, -100%) scale(1.6); }
}

/* Hide Tap to begin when music is not playing */
.hide-until-music {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 1s ease;
}
.show-after-music {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Gallery page - section header padding fix */
#page-8 .gallery-inner { padding-top: 90px !important; }
#page-8 .section-glass-header { margin-top: 0 !important; }

/* Universe intro page (page-1) - no overflow cut */
#page-1 .page-inner { padding-top: 80px; }

/* ============================================
   GALLERY PAGE - force header to be visible
   ============================================ */
#page-8 .gallery-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow-y: auto !important;
  padding-top: 24px !important;
  gap: 16px !important;
}
#page-8 .section-glass-header {
  width: 90% !important;
  max-width: 840px !important;
  margin-bottom: 8px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}
#page-8 .polaroid-grid {
  flex-shrink: 0;
  width: 90%;
  max-width: 960px;
}

/* Fix flex center overflow cutoff for gallery and long pages */
#page-8 {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding-top: 0 !important;
}
#page-8 .gallery-inner {
  justify-content: flex-start !important;
  margin-top: 0 !important;
  padding-top: 90px !important;
}

/* ==========================================================================
   ✨ COSMIC STARRY COMET THEME OVERHAUL
   ========================================================================== */
html, body {
  background: radial-gradient(ellipse at 50% 85%, #3d1430 0%, #1a0820 45%, #080514 85%, #05030e 100%) fixed !important;
  color: #fce7f3;
}

.page {
  background: transparent !important;
}

.glass-page-bg {
  background: radial-gradient(circle at 50% 50%, rgba(240, 37, 154, 0.08) 0%, rgba(10, 6, 24, 0.6) 70%, rgba(5, 3, 14, 0.95) 100%) !important;
}

/* Rich Dark Glassmorphism */
.glass-card, .universe-glass-panel, .section-glass-header, .finale-glass-panel {
  background: rgba(18, 10, 30, 0.68) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 120, 185, 0.22) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 35px rgba(240, 37, 154, 0.15) !important;
}

.page-heading, .hero-display-title, .universe-name, .section-title, .finale-title {
  color: #fff !important;
  text-shadow: 0 0 24px rgba(240, 37, 154, 0.6), 0 2px 10px rgba(0, 0, 0, 0.8) !important;
}

.hero-tagline, .universe-quote, .section-sub, .bm-wish-text {
  color: #fbcfe8 !important;
}

.hero-sub, .bday-banner-sub, .finale-sub, .finale-lead {
  color: #e2e8f0 !important;
}

.pill-tag, .dimension-tag, .universe-tag-chip, .section-tag, .tree-tag {
  background: rgba(240, 37, 154, 0.22) !important;
  border: 1px solid rgba(240, 37, 154, 0.45) !important;
  color: #ffb6db !important;
}

/* ── COUNTDOWN PAGE (PAGE 0) STYLISH CATCHY HEADING & COHESIVE PALETTE ── */
#landing-heading {
  font-family: 'Righteous', var(--font-h), cursive, sans-serif !important;
  font-size: clamp(2.3rem, 5.4vw, 3.8rem) !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  text-align: center !important;
  line-height: 1.22 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  text-shadow: 
    0 0 14px rgba(255, 255, 255, 0.95),
    0 0 30px rgba(240, 37, 154, 0.9),
    0 0 60px rgba(240, 37, 154, 0.7),
    0 0 85px rgba(253, 230, 138, 0.45),
    0 3px 12px rgba(0, 0, 0, 0.9) !important;
  filter: none !important;
  margin: 0 !important;
}

#landing-heading .landing-highlight {
  display: block;
  margin-top: clamp(6px, 1.2vh, 12px);
  color: #fde68a !important;
  -webkit-text-fill-color: #fde68a !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  text-shadow: 
    0 0 14px rgba(253, 230, 138, 0.95),
    0 0 30px rgba(245, 158, 11, 0.9),
    0 0 60px rgba(240, 37, 154, 0.75),
    0 3px 12px rgba(0, 0, 0, 0.9) !important;
}

.clock-block {
  background: linear-gradient(165deg, rgba(38, 16, 52, 0.8) 0%, rgba(18, 7, 28, 0.9) 100%) !important;
  border: 1.5px solid rgba(253, 230, 138, 0.42) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 22px rgba(240, 37, 154, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 0 16px rgba(253, 230, 138, 0.08) !important;
  backdrop-filter: blur(22px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s var(--ease), border-color 0.28s ease !important;
}

.clock-block:hover {
  transform: translateY(-4px) scale(1.06) !important;
  border-color: rgba(253, 230, 138, 0.85) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 34px rgba(240, 37, 154, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.55) !important;
}

.clock-num {
  font-family: 'Righteous', var(--font-h), sans-serif !important;
  background: linear-gradient(180deg, #ffffff 15%, #fff0f7 65%, #fde68a 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 14px rgba(240, 37, 154, 0.8)) drop-shadow(0 0 24px rgba(253, 230, 138, 0.45)) !important;
  text-shadow: none !important;
  line-height: 1 !important;
}

.clock-lbl {
  color: #fde68a !important;
  font-family: var(--font-b) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 2.2px !important;
  text-shadow: 0 0 8px rgba(253, 230, 138, 0.5) !important;
  margin-top: 8px !important;
  text-transform: uppercase !important;
}

.clock-sep {
  color: #fde68a !important;
  text-shadow: 0 0 14px rgba(253, 230, 138, 0.85), 0 0 25px rgba(240, 37, 154, 0.5) !important;
  font-weight: 800 !important;
}

#page-0 .pill-tag {
  background: rgba(45, 18, 55, 0.72) !important;
  border: 1px solid rgba(253, 230, 138, 0.42) !important;
  color: #fff0f7 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(240, 37, 154, 0.28) !important;
  letter-spacing: 1px !important;
}

#page-0 .pill-tag .live-dot {
  background: #fde68a !important;
  box-shadow: 0 0 8px #fde68a, 0 0 16px #f59e0b !important;
}

/* ==========================================================================
   💝 PULL-AND-RELEASE HEART CORD (Page 0)
   ========================================================================== */
.heart-pull-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  position: relative;
  z-index: 100;
  user-select: none;
  touch-action: none;
}

.pull-string {
  width: 3px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(253, 230, 138, 0.9), rgba(240, 37, 154, 0.9));
  box-shadow: 0 0 10px rgba(240, 37, 154, 0.6);
  transform-origin: top center;
  transition: height 0.1s ease-out;
}

.pull-heart {
  width: 68px;
  height: 68px;
  background: radial-gradient(circle at 35% 35%, #ff7ab8, #f0259a 65%, #9d174d 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: grab;
  box-shadow: 0 8px 25px rgba(240, 37, 154, 0.7), 0 0 20px rgba(253, 230, 138, 0.5);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  animation: pulse-heart-glow 2s infinite ease-in-out;
}

.pull-heart:active {
  cursor: grabbing;
}

@keyframes pulse-heart-glow {
  0%, 100% { box-shadow: 0 8px 25px rgba(240, 37, 154, 0.7), 0 0 20px rgba(253, 230, 138, 0.4); transform: scale(1); }
  50% { box-shadow: 0 12px 35px rgba(240, 37, 154, 0.95), 0 0 35px rgba(253, 230, 138, 0.8); transform: scale(1.06); }
}

.pull-instruction {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(253, 230, 138, 0.6);
}

.pull-arrow-anim {
  animation: bounce-arrow 1.2s infinite alternate ease-in-out;
  font-size: 1.2rem;
}

@keyframes bounce-arrow {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

/* Floral Burst Transition Canvas/Overlay */
.floral-burst-item {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 2rem;
  animation: floral-fly 1.2s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes floral-fly {
  0% { transform: translate(0, 0) scale(0.2) rotate(0deg); opacity: 1; }
  80% { opacity: 0.9; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1.4) rotate(var(--rot)); opacity: 0; }
}

/* ==========================================================================
   🌳 PAGE 8: GALLERY & BLOOMING HEART TREE
   ========================================================================== */
.gallery-split-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

@media (max-width: 990px) {
  .gallery-split-wrapper {
    flex-direction: column;
    align-items: center;
  }
}

.blooming-tree-card {
  flex-shrink: 0;
  width: 360px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blooming-tree-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(240, 37, 154, 0.35) !important;
}

.tree-header {
  text-align: center;
  margin-bottom: 8px;
}

.tree-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 2px;
  text-shadow: 0 0 12px rgba(240, 37, 154, 0.6);
}

.tree-sub {
  font-size: 0.78rem;
  color: #fbcfe8;
  margin: 0;
}

.tree-canvas-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 120, 185, 0.15);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   🎂 PAGE 10: MULTI-STAGE BAKING CAKE SEQUENCE
   ========================================================================== */
.cake-ready-flash {
  position: absolute;
  inset: -30px;
  border-radius: 30px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(240, 37, 154, 0.4) 60%, transparent 80%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.4s ease-out;
}

.cake-ready-flash.flash-active {
  opacity: 1;
  animation: ready-pulse 0.7s forwards ease-out;
}

@keyframes ready-pulse {
  0% { opacity: 0; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.2); }
}

.cake-layer {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.cake-layer.hidden-tier {
  opacity: 0;
  transform: translateY(-80px) scale(0.6);
  pointer-events: none;
}

.cake-layer.stacked-tier {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   💌 PAGE 11: PLAYFUL WAX-SEALED 3D ENVELOPE
   ========================================================================== */
.envelope-interactive-wrap {
  width: 100%;
  max-width: 620px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 30;
}

.envelope-body {
  width: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, #2b1030 0%, #1f0a24 100%);
  border: 1px solid rgba(255, 120, 185, 0.35);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(240, 37, 154, 0.25);
  position: relative;
  cursor: pointer;
  overflow: visible;
  padding: 30px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.envelope-body:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(240, 37, 154, 0.4);
}

.envelope-wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  background: radial-gradient(circle at 35% 35%, #ffd27a, #d97706 70%, #92400e 100%);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 18px rgba(253, 230, 138, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: transform 0.3s ease, opacity 0.4s ease;
  animation: seal-wobble 3s infinite ease-in-out;
}

@keyframes seal-wobble {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  25% { transform: translate(-50%, -50%) rotate(-3deg) scale(1.04); }
  75% { transform: translate(-50%, -50%) rotate(3deg) scale(1.04); }
}

.envelope-wax-seal.broken {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
  pointer-events: none;
}

.seal-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.seal-stamp {
  font-size: 0.55rem;
  font-weight: 900;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.envelope-folded-letter {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: blur(10px);
  opacity: 0.15;
  transform: scale(0.95);
  pointer-events: none;
}

.envelope-body.unsealed .envelope-folded-letter {
  filter: blur(0px);
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.envelope-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(253, 230, 138, 0.5);
  animation: hint-float 2s infinite ease-in-out;
}

@keyframes hint-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.envelope-body.unsealed + .envelope-prompt {
  display: none;
}

#enter-btn { margin-top: 18px !important; z-index: 50; }
.page-dots { z-index: 1000; }


/* ==========================================================================
   ✨ HIGH-CONTRAST READABLE FONT COLORS FOR ALL BOXES
   ========================================================================== */
.letter-body {
  color: #ffffff !important;
  font-size: 1.05rem !important;
  line-height: 1.75 !important;
  font-weight: 500 !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.envelope-folded-letter {
  background: rgba(28, 12, 38, 0.92) !important;
  border: 1px solid rgba(255, 182, 219, 0.35) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(240, 37, 154, 0.15) !important;
}

.envelope-folded-letter .letter-body {
  color: #ffffff !important;
  font-size: 1.02rem !important;
}

.letter-from, .from-name {
  color: #fde68a !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6) !important;
}

.from-line {
  background: linear-gradient(90deg, #f0259a, #ffd27a) !important;
}

.universe-quote {
  color: #fde68a !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  text-shadow: 0 0 14px rgba(253, 230, 138, 0.5) !important;
}

.universe-name {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(240, 37, 154, 0.8), 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

.hero-tagline {
  color: #fde68a !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(253, 230, 138, 0.5) !important;
}

.hero-sub, .finale-sub, .bday-banner-sub {
  color: #f8fafc !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.finale-lead {
  color: #fbcfe8 !important;
  font-weight: 700 !important;
}

.u-badge {
  color: #ffffff !important;
  background: rgba(240, 37, 154, 0.4) !important;
  border: 1px solid rgba(255, 182, 219, 0.5) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 8px rgba(240, 37, 154, 0.6) !important;
}

.bm-wish-text {
  color: #ffffff !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

/* ==========================================================================
   👑 PAGE 11: FIX HEADER CUTOFF
   ========================================================================== */
#page-11 {
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#page-11 .finale-inner {
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   🌸 PAGE 8: INTERACTIVE MEMORY SHOWCASE & TREE STAGE
   ========================================================================== */
.gallery-stage-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 1060px;
  margin: 12px auto 0;
}

@media (max-width: 880px) {
  .gallery-stage-wrapper {
    flex-direction: column;
    align-items: center;
  }
}

.blooming-tree-card {
  width: 320px;
  flex-shrink: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 120, 185, 0.35) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blooming-tree-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(240, 37, 154, 0.45) !important;
}

.tree-tap-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6);
  animation: pulse-hint 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-hint {
  0% { transform: scale(0.98); opacity: 0.85; }
  100% { transform: scale(1.04); opacity: 1; }
}

.memory-showcase-box {
  width: 100%;
  max-width: 580px;
  min-height: 440px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 182, 219, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.showcase-teaser {
  text-align: center;
  padding: 20px;
}

.teaser-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 12px;
  animation: bounce-teaser 2s infinite ease-in-out;
}

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

.teaser-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 0 15px rgba(240, 37, 154, 0.7);
}

.teaser-desc {
  color: #fbcfe8;
  font-size: 0.95rem;
  max-width: 380px;
  line-height: 1.5;
  margin: 0 auto;
}

.spotlight-polaroid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: fade-in-spotlight 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fade-in-spotlight {
  0% { opacity: 0; transform: scale(0.85) rotate(-4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.spotlight-tag {
  background: rgba(240, 37, 154, 0.35);
  border: 1px solid rgba(240, 37, 154, 0.6);
  color: #ffd27a;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6);
}

.spotlight-card {
  width: 250px !important;
  max-width: 100% !important;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spotlight-card:hover {
  transform: scale(1.06) rotate(1deg) !important;
  box-shadow: 0 12px 35px rgba(240, 37, 154, 0.5) !important;
}

.spotlight-hint {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.5);
}

/* 9th Tap: Full Grid view in showcase */
.all-memories-reveal {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-in-all 0.6s ease-out;
}

@keyframes fade-in-all {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.all-reveal-header {
  text-align: center;
  margin-bottom: 16px;
}

.all-tag {
  color: #ffd27a;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(253, 230, 138, 0.8);
}

.all-heading {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 4px 0 2px;
}

.all-sub {
  font-size: 0.82rem;
  color: #fbcfe8;
  margin: 0;
}

.all-memories-reveal .polaroid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 4px;
}

@media (max-width: 600px) {
  .all-memories-reveal .polaroid-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.all-memories-reveal .polaroid-card {
  padding: 8px 8px 12px;
  transform: none !important;
}

.all-memories-reveal .polaroid-img-frame {
  height: 90px;
}

.all-memories-reveal .p-title {
  font-size: 0.72rem;
}

.all-memories-reveal .p-tag {
  font-size: 0.58rem;
}

/* ==========================================================================
   🖼️ PAGE 8: EXPAND GALLERY TO FILL SPACE & FULL PHOTO DISPLAY
   ========================================================================== */
#page-8 .gallery-inner {
  width: 96% !important;
  max-width: 1340px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

#page-8 .section-glass-header {
  width: 100% !important;
  max-width: 1300px !important;
}

.gallery-stage-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 1300px !important;
  margin: 10px auto 0 !important;
}

.blooming-tree-card {
  width: 360px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.memory-showcase-box {
  flex: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 480px !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.spotlight-card {
  width: 380px !important;
  max-width: 90% !important;
  background: rgba(255, 255, 255, 0.96) !important;
  padding: 14px 14px 20px !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 35px rgba(240, 37, 154, 0.4) !important;
  transform: rotate(1deg) !important;
}

.spotlight-card .polaroid-img-frame {
  width: 100% !important;
  height: 290px !important;
  background: #230d22 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  display: block !important;
}

.spotlight-card #spotlight-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 6px !important;
  transition: transform 0.4s ease !important;
}

.spotlight-card:hover #spotlight-img {
  transform: scale(1.05) !important;
}

.spotlight-card .polaroid-caption {
  margin-top: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.spotlight-card .p-title {
  font-family: 'Caveat', cursive, sans-serif !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: #1e1b4b !important;
}

.spotlight-card .p-tag {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #f0259a !important;
  background: #fce7f3 !important;
  padding: 2px 10px !important;
  border-radius: 999px !important;
}

/* ==========================================================================
   🏹 PAGE 11: CROSSBOW PRICKING HEART STAGE
   ========================================================================== */
.crossbow-interactive-stage {
  width: 100%;
  max-width: 640px;
  margin: 10px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crossbow-arena {
  width: 100%;
  background: rgba(25, 10, 35, 0.85);
  border: 1px solid rgba(255, 120, 185, 0.35);
  border-radius: 20px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7), 0 0 35px rgba(240, 37, 154, 0.25);
  position: relative;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.target-heart-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.target-heart {
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at 35% 35%, #ff7ab8, #f0259a 65%, #9d174d 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(240, 37, 154, 0.8), 0 0 35px rgba(253, 230, 138, 0.5);
  cursor: pointer;
  position: relative;
  animation: heart-beat 1.6s infinite ease-in-out;
  transition: transform 0.2s ease;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(240, 37, 154, 0.8), 0 0 25px rgba(253, 230, 138, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 14px 45px rgba(240, 37, 154, 0.95), 0 0 45px rgba(253, 230, 138, 0.7); }
}

.target-heart-icon {
  font-size: 3.4rem;
  line-height: 1;
}

.target-heart-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fde68a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.prick-arrow-head {
  position: absolute;
  font-size: 3.5rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  z-index: 20;
  animation: pop-arrow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.4);
}

@keyframes pop-arrow {
  0% { transform: translate(-150px, -50%) scale(0.4); opacity: 0; }
  80% { transform: translate(-45%, -50%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.prick-sparkle {
  position: absolute;
  font-size: 3rem;
  z-index: 30;
  animation: sparkle-explode 0.6s ease-out forwards;
}

@keyframes sparkle-explode {
  0% { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.crossbow-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.crossbow-bow-anim {
  font-size: 2.8rem;
  animation: float-bow 2s infinite ease-in-out;
}

@keyframes float-bow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.shoot-btn {
  font-size: 1.05rem !important;
  padding: 14px 28px !important;
  box-shadow: 0 8px 25px rgba(240, 37, 154, 0.7), 0 0 20px rgba(253, 230, 138, 0.5) !important;
}

.shoot-hint {
  font-size: 0.82rem;
  color: #fbcfe8;
  margin: 0;
}

/* Revealed Letter Styling */
.letter-wishes-reveal {
  width: 100%;
  animation: letter-unfold 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letter-unfold {
  0% { opacity: 0; transform: translateY(40px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.royal-wishes-card {
  background: rgba(28, 12, 40, 0.95) !important;
  border: 1px solid rgba(255, 182, 219, 0.45) !important;
  border-radius: 18px !important;
  padding: 28px !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(240, 37, 154, 0.3) !important;
}

.letter-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 182, 219, 0.25);
  padding-bottom: 12px;
}

.letter-seal-badge {
  color: #fde68a;
  font-weight: 800;
  font-size: 0.95rem;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6);
}

.heart-pricked-badge {
  background: rgba(240, 37, 154, 0.35);
  border: 1px solid rgba(240, 37, 154, 0.6);
  color: #ffb6db;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
}

/* ==========================================================================
   🎯 FOCUSED FIXES: LAPTOP VIEWPORT FIT, DRAG HEART, COMPACT MINI-PLAYER,
   COMPACT GALLERY GRID, CAKE CONTRAST & INTERACTIVE BOW-AND-ARROW
   ========================================================================== */

/* ── 1. GLOBAL LAPTOP VIEWPORT FIT (NO VERTICAL SCROLLING) ── */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden !important;
  background: radial-gradient(ellipse at 50% 85%, #3d1430 0%, #1a0820 45%, #080514 85%, #05030e 100%) fixed !important;
  color: #fce7f3;
  box-sizing: border-box;
}

.page-container {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden !important;
  position: relative;
}

.page {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  padding: 0 !important;
  background: transparent !important;
}

.page-inner {
  width: 100%;
  max-width: 1140px;
  height: 100vh;
  max-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(20px, 4vh, 45px) 20px clamp(15px, 3vh, 30px) !important;
  box-sizing: border-box;
  gap: clamp(8px, 1.8vh, 18px) !important;
}

/* ── 2. COMPACT MUSIC PLAYER: MUSIC NOTE ICON & LARGER CIRCULAR PLAY BUTTON ── */
.music-player {
  position: fixed !important;
  top: 14px !important;
  right: 18px !important;
  z-index: 1100 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px 4px 10px !important;
  height: auto !important;
  background: rgba(22, 10, 32, 0.88) !important;
  border: 1.5px solid rgba(255, 120, 185, 0.45) !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 18px rgba(240, 37, 154, 0.3) !important;
  backdrop-filter: blur(20px) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.music-player:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 22px rgba(240, 37, 154, 0.5) !important;
}

/* Compact Music-Note Icon */
.music-disc {
  width: 28px !important;
  height: 28px !important;
  font-size: 1.15rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
  user-select: none !important;
}

/* Larger Circular Play Button */
.music-play-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  background: linear-gradient(135deg, #f0259a, #db2777) !important;
  border: 2px solid #fde68a !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(240, 37, 154, 0.6), 0 0 12px rgba(253, 230, 138, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
  padding: 0 !important;
}

.music-play-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 6px 24px rgba(240, 37, 154, 0.85), 0 0 18px rgba(253, 230, 138, 0.7) !important;
}

.music-play-btn:active {
  transform: scale(0.96) !important;
}

/* Soft Blinking Animation until Clicked */
.blinking-play-btn {
  animation: soft-pulse-blink 1.8s infinite ease-in-out !important;
}

@keyframes soft-pulse-blink {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(240, 37, 154, 0.5), 0 0 10px rgba(253, 230, 138, 0.35);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(240, 37, 154, 0.95), 0 0 24px rgba(253, 230, 138, 0.85);
    filter: brightness(1.22);
  }
}

/* Gently bouncing ☝️ below music player pointing at play button */
.music-hand-pointer {
  position: absolute;
  top: calc(100% + 8px);
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1200;
  animation: hand-bounce-point 1.3s infinite ease-in-out;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.pointing-finger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(253, 230, 138, 0.95)) drop-shadow(0 0 22px rgba(245, 158, 11, 0.6)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7));
}

.pointing-finger .gold-hand-svg {
  width: 32px;
  height: 40px;
  display: block;
  animation: gold-finger-shimmer 2.2s infinite ease-in-out alternate;
}

@keyframes gold-finger-shimmer {
  0% {
    filter: brightness(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  }
  100% {
    filter: brightness(1.25) drop-shadow(0 0 12px rgba(253, 230, 138, 0.95));
  }
}

@keyframes hand-bounce-point {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

.music-hand-pointer.hidden-hand {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.6) !important;
  pointer-events: none !important;
  display: none !important;
}

/* ── 3. FIRST PAGE: EYE-CATCHING DRAGGABLE HEART & PULL DOWN ANIMATION ── */
.heart-pull-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(14px, 2.5vh, 26px);
  padding-bottom: 90px; /* Space below so downward movement is clearly visible */
  position: relative;
  z-index: 100;
  user-select: none;
  touch-action: none;
}

.heart-pull-container.hidden {
  display: none !important;
}

.pull-string-anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pull-string-anchor.is-dragging {
  cursor: grabbing !important;
}

.pull-string {
  width: 4px !important;
  height: 65px;
  background: linear-gradient(to bottom, #fde68a, #f0259a) !important;
  box-shadow: 0 0 14px rgba(240, 37, 154, 0.8) !important;
  transform-origin: top center !important;
  pointer-events: none;
  will-change: height;
}

.pull-heart {
  width: 86px !important;
  height: 86px !important;
  background: radial-gradient(circle at 35% 35%, #ff7ab8, #f0259a 65%, #831843 100%) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 32px rgba(240, 37, 154, 0.85), 0 0 35px rgba(253, 230, 138, 0.6) !important;
  border: 2px solid rgba(253, 230, 138, 0.6) !important;
  position: relative !important;
  cursor: grab;
  touch-action: none;
  user-select: none;
  animation: heart-pulse-bob 2.2s infinite ease-in-out;
  transform-origin: center center;
  will-change: transform;
}

@keyframes heart-pulse-bob {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 30px rgba(240, 37, 154, 0.8), 0 0 25px rgba(253, 230, 138, 0.5);
  }
  50% {
    transform: translateY(6px) scale(1.06);
    box-shadow: 0 16px 45px rgba(240, 37, 154, 1), 0 0 45px rgba(253, 230, 138, 0.9);
  }
}

/* While dragging, completely disable CSS pulse animation so transform follows pointer 1:1! */
.pull-heart.is-dragging,
.pull-string-anchor.is-dragging .pull-heart {
  animation: none !important;
  cursor: grabbing !important;
  transition: none !important;
}

.pull-string.is-dragging,
.pull-string-anchor.is-dragging .pull-string {
  transition: none !important;
}

.pull-heart:active {
  cursor: grabbing;
}

.heart-glyph {
  font-size: 2.5rem !important;
  line-height: 1 !important;
}

.pull-down-indicator {
  margin-top: 8px;
  animation: arrow-drop 1.2s infinite alternate ease-in-out;
}

.bouncing-arrow {
  font-size: 1.6rem;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(253, 230, 138, 0.9);
  display: block;
}

@keyframes arrow-drop {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

.pull-instruction {
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: #fde68a !important;
  text-shadow: 0 0 14px rgba(253, 230, 138, 0.7), 0 2px 6px rgba(0, 0, 0, 0.9) !important;
  margin-top: 4px !important;
  letter-spacing: 0.3px !important;
}

/* ── 4. PAGE 8: COMPACT TWO-PANEL GALLERY LAYOUT & ORIGINAL PHOTO RATIOS ── */
#page-8 {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

#page-8 .gallery-inner {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  padding: clamp(10px, 2vh, 18px) clamp(12px, 2vw, 24px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.compact-gallery-layout {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: clamp(10px, 1.5vw, 18px) !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Left Panel: Blooming Tree Card */
.compact-tree-card {
  width: clamp(180px, 22vw, 250px) !important;
  flex-shrink: 0 !important;
  padding: clamp(8px, 1.5vh, 12px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  overflow: hidden !important;
}

.compact-tree-card:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 10px 30px rgba(240, 37, 154, 0.35) !important;
}

.compact-tree-card .tree-canvas-wrap {
  width: 100% !important;
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

/* 🌸 MEMORY BLOOM TREE TUTORIAL ANIMATION */
.tree-tap-tutorial {
  position: absolute !important;
  top: 45% !important;
  left: 54% !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  user-select: none !important;
  z-index: 15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease !important;
}

.tree-tap-tutorial.hidden {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0.55) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tree-tutorial-pointer {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: tree-finger-tap-loop 1.8s infinite ease-in-out !important;
}

.tree-tutorial-finger {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem) !important;
  display: block !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.95))
          drop-shadow(0 0 20px rgba(240, 37, 154, 0.85))
          drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)) !important;
  animation: tree-finger-glow 1.8s infinite ease-in-out alternate !important;
}

.tree-tutorial-ripple {
  position: absolute !important;
  top: 2px !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 230, 138, 0.95) !important;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.5), rgba(240, 37, 154, 0.2), transparent) !important;
  pointer-events: none !important;
  animation: tree-tap-ripple-pulse 1.8s infinite ease-out !important;
}

@keyframes tree-finger-tap-loop {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.92;
  }
  25% {
    transform: translate(-4px, -10px) scale(0.85);
    opacity: 1;
  }
  45% {
    transform: translate(-4px, -10px) scale(0.85);
    opacity: 1;
  }
  68% {
    transform: translate(0, 0) scale(1.04);
    opacity: 0.96;
  }
  85% {
    transform: translate(0, 0) scale(1);
    opacity: 0.92;
  }
}

@keyframes tree-finger-glow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.85))
            drop-shadow(0 0 16px rgba(240, 37, 154, 0.7))
            drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1))
            drop-shadow(0 0 26px rgba(255, 215, 0, 1))
            drop-shadow(0 0 35px rgba(240, 37, 154, 0.95))
            drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
  }
}

@keyframes tree-tap-ripple-pulse {
  0%, 20% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    border-color: rgba(255, 255, 255, 1);
  }
  30% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.95;
    border-color: rgba(255, 215, 0, 0.95);
    box-shadow: 0 0 12px rgba(240, 37, 154, 0.8);
  }
  65% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
    border-color: rgba(240, 37, 154, 0);
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

.compact-tree-card canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.tree-tap-hint {
  flex-shrink: 0 !important;
  margin-top: 4px !important;
}

.tree-hint-pulse {
  font-size: clamp(0.72rem, 1.1vw, 0.82rem) !important;
  font-weight: 700 !important;
  color: #fde68a !important;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.7) !important;
}

/* Right Panel: Glass card holding header and photos grid */
.photos-panel {
  flex: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: clamp(8px, 1.5vh, 14px) clamp(10px, 1.5vw, 16px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.compact-gallery-header {
  padding: 2px 10px 6px !important;
  margin-bottom: 6px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.compact-gallery-header .section-tag {
  font-size: 0.65rem !important;
  padding: 2px 8px !important;
}

.compact-gallery-header .section-title {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem) !important;
  margin: 2px 0 !important;
  color: #ffffff !important;
  text-shadow: 0 0 16px rgba(240, 37, 154, 0.8) !important;
}

.compact-gallery-header .section-sub {
  font-size: clamp(0.72rem, 1.1vw, 0.8rem) !important;
  margin: 0 !important;
  color: rgba(255, 230, 245, 0.85) !important;
}

/* Polaroid Grid: 8 slots in 4 columns x 2 rows, complete photos with original ratios */
.compact-polaroid-grid {
  flex: 1 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: repeat(2, 1fr) !important;
  gap: clamp(6px, 1vw, 10px) !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.compact-polaroid-grid .polaroid-card {
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 6px 6px 8px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(240, 37, 154, 0.2) !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.compact-polaroid-grid .polaroid-card:hover {
  transform: scale(1.05) rotate(1deg) !important;
  z-index: 20 !important;
  box-shadow: 0 10px 25px rgba(240, 37, 154, 0.45) !important;
}

.compact-polaroid-grid .polaroid-img-frame {
  width: 100% !important;
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  overflow: hidden !important;
  background: rgba(18, 8, 24, 0.6) !important;
}

.compact-polaroid-grid .polaroid-photo {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: auto !important;
}

.compact-polaroid-grid .polaroid-footer {
  margin-top: 4px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  gap: 4px !important;
}

.compact-polaroid-grid .polaroid-caption {
  font-family: 'Caveat', cursive, sans-serif !important;
  font-size: clamp(0.72rem, 1vw, 0.88rem) !important;
  font-weight: 700 !important;
  color: #1e1b4b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.1 !important;
}

.compact-polaroid-grid .polaroid-stamp {
  font-size: clamp(0.55rem, 0.75vw, 0.65rem) !important;
  font-weight: 800 !important;
  color: #f0259a !important;
  flex-shrink: 0 !important;
}

/* Placeholder unrevealed slots */
.polaroid-slot-placeholder {
  border: 1.5px dashed rgba(255, 182, 219, 0.35) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
  min-height: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
}

.polaroid-slot-placeholder .placeholder-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  color: rgba(255, 200, 230, 0.6) !important;
  text-align: center !important;
}

.polaroid-slot-placeholder .placeholder-icon {
  font-size: clamp(0.9rem, 1.5vw, 1.3rem) !important;
  opacity: 0.75 !important;
}

.polaroid-slot-placeholder .placeholder-label {
  font-size: clamp(0.65rem, 0.85vw, 0.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

.polaroid-slot-placeholder .placeholder-sub {
  font-size: clamp(0.52rem, 0.7vw, 0.62rem) !important;
  opacity: 0.6 !important;
}

@keyframes card-reveal-pop {
  0% {
    opacity: 0;
    transform: scale(0.65) rotate(-4deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.polaroid-card.just-revealed {
  animation: card-reveal-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* Mobile Responsiveness for Page 8 */
@media (max-width: 768px) {
  #page-8 .gallery-inner {
    padding: 8px 8px 10px !important;
    gap: 6px !important;
  }

  .compact-gallery-layout {
    gap: 8px !important;
  }

  .compact-tree-card {
    width: clamp(100px, 28vw, 130px) !important;
    padding: 6px !important;
  }

  .compact-polaroid-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .compact-gallery-header {
    padding: 2px 42px 4px 4px !important;
    margin-bottom: 2px !important;
  }

  .compact-gallery-header .section-title {
    font-size: 0.95rem !important;
  }

  .compact-gallery-header .section-sub {
    font-size: 0.65rem !important;
  }

  .compact-polaroid-grid .polaroid-card {
    padding: 4px 4px 5px !important;
  }

  .compact-polaroid-grid .polaroid-caption {
    font-size: 0.68rem !important;
  }

  #page-8 .page-nav-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #page-8 .page-nav-row .cta-btn {
    padding: 6px 10px !important;
    font-size: 0.76rem !important;
    flex: 1 !important;
    max-width: 165px !important;
    white-space: nowrap !important;
  }
}

/* ── 5. CAKE PAGE: HEADING CONTRAST & NATURAL EMOJIS ── */
.cake-main-title {
  color: #ffffff !important;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem) !important;
  font-weight: 800 !important;
  text-shadow: 0 0 20px rgba(240, 37, 154, 0.9), 0 0 35px rgba(253, 230, 138, 0.6), 0 2px 8px rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.cake-text-glow {
  color: #ffffff !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
}

.natural-emoji {
  display: inline-block !important;
  vertical-align: middle !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
  background: none !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)) !important;
}

.cake-scene {
  transform: scale(0.95) !important;
  margin: 10px auto 4px !important;
}

/* ── 6. FINAL PAGE: SLIGHTLY UPWARD HERO FINALE (SINGLE-SCREEN FIT) ── */
#page-11 {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
  position: relative !important;
}

#theme-bg-finale {
  display: none !important;
}

#page-11 .finale-inner {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  /* Shift slightly upward: asymmetric vertical padding with larger bottom clearance */
  padding: clamp(14px, 2.5vh, 26px) clamp(16px, 3vw, 24px) clamp(30px, 6.5vh, 60px) !important;
  gap: clamp(8px, 1.4vh, 14px) !important;
  box-sizing: border-box !important;
  transform: translateY(-1.2vh) !important;
}

/* 🏹 Interactive Crossbow, Arrow & Closed Envelope Stage */
.bow-arrow-stage {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 25;
}

.bow-arrow-stage.hidden {
  display: none !important;
}

.archery-arena {
  width: 100%;
  background: rgba(22, 10, 32, 0.9);
  border: 1.5px solid rgba(255, 120, 185, 0.4);
  border-radius: 20px;
  padding: clamp(16px, 2.5vh, 24px) clamp(18px, 3vw, 28px) clamp(28px, 4vh, 36px);
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(240, 37, 154, 0.25);
  user-select: none;
  touch-action: none;
}

.bow-rig-container {
  width: clamp(75px, 10vw, 95px);
  height: clamp(115px, 15vh, 140px);
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.bow-rig-container:active {
  cursor: grabbing;
}

.bow-frame {
  width: 100%;
  height: 100%;
  position: relative;
}

.bow-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.7));
}

.notched-arrow {
  position: absolute;
  top: 50%;
  left: 28px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: auto;
  cursor: grab;
  z-index: 10;
  touch-action: none;
}

.notched-arrow:active {
  cursor: grabbing;
}

.arrow-wood {
  width: clamp(55px, 8vw, 75px);
  height: 4px;
  background: linear-gradient(to right, #78350f, #d97706);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(253, 230, 138, 0.8);
}

.arrow-feather {
  font-size: 1.15rem;
  margin-right: -4px;
}

.arrow-heart-head {
  font-size: 1.55rem;
  margin-left: -6px;
  filter: drop-shadow(0 0 8px rgba(240, 37, 154, 0.9));
}

.aim-trajectory {
  flex: 1;
  height: 2px;
  margin: 0 clamp(10px, 2vw, 18px);
  background: repeating-linear-gradient(to right, rgba(253, 230, 138, 0.7) 0, rgba(253, 230, 138, 0.7) 8px, transparent 8px, transparent 16px);
  animation: aim-march 1s infinite linear;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

@keyframes aim-march {
  0% { background-position: 0 0; }
  100% { background-position: 32px 0; }
}

/* 💌 Closed Royal Envelope & Target Heart Station */
.envelope-target-station {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}

.royal-closed-envelope {
  position: relative;
  width: clamp(135px, 18vw, 175px);
  height: clamp(90px, 13vh, 115px);
  background: linear-gradient(145deg, #2b1030 0%, #1c0822 100%);
  border: 1.5px solid rgba(255, 182, 219, 0.45);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(240, 37, 154, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.envelope-flap-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 15;
  pointer-events: none;
}

.envelope-flap-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #3d1448 0%, #260a2f 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-top: 1.5px solid rgba(255, 182, 219, 0.5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.royal-closed-envelope.opening .envelope-flap-fold {
  transform: rotateX(180deg);
  z-index: 5;
}

.target-heart-station {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.4s ease;
}

.target-heart-glow {
  width: clamp(62px, 8.5vh, 76px);
  height: clamp(62px, 8.5vh, 76px);
  background: radial-gradient(circle at 35% 35%, #ff7ab8, #f0259a 65%, #881337 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(240, 37, 154, 0.8), 0 0 25px rgba(253, 230, 138, 0.6);
  animation: target-bob 2s infinite ease-in-out;
  border: 1.5px solid #ffd27a;
}

@keyframes target-bob {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); box-shadow: 0 10px 28px rgba(240, 37, 154, 1), 0 0 35px rgba(253, 230, 138, 0.9); }
}

.heart-pulse-icon {
  font-size: clamp(1.5rem, 2.2vh, 1.9rem);
  line-height: 1;
}

.heart-lock-seal {
  font-size: 0.5rem;
  font-weight: 800;
  color: #fde68a;
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.target-prick-impact {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.8rem;
  z-index: 50;
  pointer-events: none;
  animation: impact-pop 0.5s ease-out forwards;
}

@keyframes impact-pop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.bow-instruction-row {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(0.74rem, 1vw, 0.84rem);
  font-weight: 800;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6);
  white-space: nowrap;
}

.drag-hand-icon {
  animation: drag-hint-arrow 1.2s infinite alternate ease-in-out;
}

@keyframes drag-hint-arrow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-8px); }
}

/* 👑 Revealed Finale Stage (Photo, Crown, Message Card & 3 Buttons) */
.finale-revealed-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  gap: clamp(8px, 1.4vh, 14px) !important;
  animation: finale-unfold 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.finale-revealed-stage.hidden {
  display: none !important;
}

@keyframes finale-unfold {
  0% { opacity: 0; transform: translateY(28px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.crown-float {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  font-size: clamp(1.6rem, 2.4vh, 2.1rem) !important;
  margin-bottom: clamp(2px, 0.4vh, 4px) !important;
  line-height: 1 !important;
  display: block !important;
  filter: drop-shadow(0 0 10px rgba(253, 230, 138, 0.7)) !important;
  animation: crown-gentle-hover 3s ease-in-out infinite !important;
}

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

.queen-frame {
  width: clamp(88px, 11.5vh, 114px) !important;
  height: clamp(88px, 11.5vh, 114px) !important;
  min-width: clamp(88px, 11.5vh, 114px) !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  box-shadow: 0 0 30px rgba(240, 37, 154, 0.7), 0 8px 25px rgba(0, 0, 0, 0.8) !important;
  border: 2.5px solid #ffd27a !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s ease !important;
}

.queen-frame:hover {
  transform: scale(1.05) !important;
}

.queen-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.royal-wishes-card {
  width: 100% !important;
  max-width: clamp(320px, 88vw, 620px) !important;
  background: rgba(26, 11, 38, 0.88) !important;
  border: 1.5px solid rgba(255, 182, 219, 0.45) !important;
  border-radius: 16px !important;
  padding: clamp(12px, 1.8vh, 18px) clamp(16px, 2.5vw, 24px) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(240, 37, 154, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-sizing: border-box !important;
  position: relative !important;
  flex-shrink: 1 !important;
  text-align: left !important;
}

.royal-wishes-card .letter-header-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-bottom: clamp(6px, 1vh, 10px) !important;
  border-bottom: 1px solid rgba(255, 182, 219, 0.22) !important;
  padding-bottom: clamp(4px, 0.8vh, 8px) !important;
}

.royal-wishes-card .letter-seal-badge {
  color: #fde68a !important;
  font-weight: 800 !important;
  font-size: clamp(0.82rem, 1.1vw, 0.92rem) !important;
  text-shadow: 0 0 10px rgba(253, 230, 138, 0.6) !important;
  letter-spacing: 0.5px !important;
}

.royal-wishes-card .letter-quote {
  position: absolute !important;
  top: 6px !important;
  left: 14px !important;
  font-size: clamp(2.4rem, 4vh, 3.2rem) !important;
  color: rgba(240, 37, 154, 0.2) !important;
  font-family: var(--font-h) !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

.royal-wishes-card .letter-body {
  font-size: clamp(0.78rem, 1.05vw, 0.88rem) !important;
  line-height: clamp(1.42, 1.55, 1.62) !important;
  color: #fdf2f8 !important;
  margin: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

.royal-wishes-card .letter-from {
  margin-top: clamp(8px, 1.2vh, 12px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  text-align: right !important;
}

.royal-wishes-card .from-line {
  width: 100% !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(240, 37, 154, 0.4)) !important;
}

.royal-wishes-card .from-name {
  font-size: clamp(0.78rem, 1vw, 0.86rem) !important;
  color: #fce7f3 !important;
}

.finale-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(8px, 1.2vw, 14px) !important;
  flex-wrap: wrap !important;
  margin-top: clamp(2px, 0.6vh, 6px) !important;
  z-index: 20 !important;
}

.finale-actions .cta-btn {
  padding: clamp(7px, 1.1vh, 10px) clamp(12px, 1.6vw, 18px) !important;
  font-size: clamp(0.76rem, 0.95vw, 0.86rem) !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Mobile responsive safeguards */
@media (max-width: 768px) {
  #page-11 .finale-inner {
    padding: clamp(12px, 2vh, 18px) 14px clamp(20px, 4vh, 32px) !important;
    gap: clamp(6px, 1.2vh, 10px) !important;
    transform: translateY(-0.8vh) !important;
  }
  .queen-frame {
    width: clamp(76px, 10vh, 90px) !important;
    height: clamp(76px, 10vh, 90px) !important;
    min-width: clamp(76px, 10vh, 90px) !important;
  }
  .royal-wishes-card {
    padding: 10px 14px !important;
  }
  .royal-wishes-card .letter-body {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
  }
  .finale-actions {
    gap: 8px !important;
  }
  .finale-actions .cta-btn {
    padding: 7px 12px !important;
    font-size: 0.76rem !important;
  }
}


/* ── PAGE 0 & PAGE 1 CLEAN LAYOUT & CENTERING ── */
#page-0 {
  overflow: hidden !important;
}

#page-0 .page-inner {
  min-height: 100vh;
  justify-content: center !important;
  padding: 36px 24px 70px !important;
}

/* Responsive top gap (approx 32–48px) for Happy Birthday card so it does not touch top edge */
#page-0:has(#bday-banner:not(.hidden)) .page-inner {
  justify-content: flex-start !important;
  padding-top: clamp(32px, 4.5vh, 48px) !important;
}

@media (max-width: 600px) {
  #page-0:has(#bday-banner:not(.hidden)) .page-inner {
    padding-top: clamp(24px, 4vh, 36px) !important;
  }
  #landing-heading {
    font-size: clamp(1.32rem, 5.7vw, 1.85rem) !important;
    line-height: 1.25 !important;
    padding: 0 4px !important;
    letter-spacing: 0.5px !important;
  }
  #landing-heading .landing-highlight {
    margin-top: 5px !important;
    font-size: 1.05em !important;
  }
}

@supports not selector(:has(*)) {
  #page-0 .page-inner {
    justify-content: flex-start !important;
    padding-top: clamp(32px, 4.5vh, 48px) !important;
  }
}

#page-1 {
  overflow: hidden !important;
}

#page-1 .page-inner {
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 36px 24px !important;
}

#page-1 .reveal-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  margin: 0 auto !important;
  max-width: 660px !important;
  padding: clamp(28px, 4.5vh, 44px) clamp(24px, 4.5vw, 42px) !important;
}

#page-1 .reveal-card .cta-btn {
  margin: 22px auto 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

