/* ============================================================
   BIRTHDAY LETTERS TO JUNE 29 — MONSOON TO GOLDEN HOUR
   Art Direction: Atmospheric Weather Letters
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Mochiy+Pop+One&family=Poppins:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;1,400;1,600&display=swap');

/* ── Design Tokens — Monsoon → Golden Hour ────────────────── */
:root {
  /* Phase 1 — Storm Palette */
  --storm-deep:   #FFF7FB;
  --storm-mid:    #FFEAF1;
  --storm-cloud:  #F7C9D8;
  --mist:         #B37A8A;
  --rain-light:   #4A2633;
  --sky-blue:     #F06F9A;
  --sky-deep:     #C94F78;

  /* Phase 3 — Golden Hour Palette */
  --gold:         #FFB86C;
  --amber:        #F08A9D;
  --sun-glow:     #FFFFFF;
  --warm-brown:   #8A4B5E;
  --golden-deep:  #FFE0EA;
  --sunset-orange:#F58A6A;

  /* Glass — Storm */
  --glass:        rgba(255, 255, 255, 0.68);
  --glass-border: rgba(240, 111, 154, 0.18);
  --glass-hover:  rgba(255, 255, 255, 0.88);

  /* Typography */
  --text-primary:  rgba(74, 38, 51, 0.96);
  --text-dim:      rgba(104, 66, 80, 0.78);
  --text-mute:     rgba(143, 91, 109, 0.74);

  /* Glows */
  --glow-storm:   0 10px 34px rgba(240, 111, 154, 0.18);
  --glow-gold:    0 12px 38px rgba(255, 184, 108, 0.24);
  --glow-amber:   0 12px 42px rgba(240, 138, 157, 0.22);

  --transition:   all 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--storm-deep);
  color: var(--text-primary);
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

::selection { background: rgba(240, 111, 154, 0.25); color: #fff; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--storm-deep); }
::-webkit-scrollbar-thumb { background: var(--mist); border-radius: 2px; }

/* ── Typography ───────────────────────────────────────────── */
.font-display { font-family: 'Playfair Display', serif; }
.font-anime   { font-family: 'Mochiy Pop One', sans-serif; }
.font-italic  { font-family: 'Cormorant Garamond', serif; font-style: italic; }

/* ── Text Gradients ───────────────────────────────────────── */
.grad-storm  {
  background: linear-gradient(135deg, var(--rain-light) 0%, var(--sky-blue) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.grad-gold   {
  background: linear-gradient(135deg, var(--gold) 0%, var(--amber) 60%, var(--sun-glow) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.grad-journey {
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ═══════════════════════════════════════════════════════════
   ATMOSPHERE LAYER (fixed full-screen canvas)
   ═══════════════════════════════════════════════════════════ */

#atmo-canvas {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%; height: 100%;
}

/* Fog / Mist overlay */
#fog-overlay {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 120% 40% at 50% 100%,
    rgba(100, 116, 139, 0.07) 0%,
    transparent 70%
  );
  animation: fogBreath 10s ease-in-out infinite;
}

@keyframes fogBreath {
  0%, 100% { opacity: 0.8; transform: scaleX(1); }
  50%       { opacity: 1;   transform: scaleX(1.05); }
}

/* Wind particle canvas (Phase 1) */
#particle-canvas {
  position: fixed; inset: 0; z-index: 2;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════════════ */

#scroll-progress {
  position: fixed; top: 0; left: 0; width: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--sky-blue), var(--gold));
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(240, 111, 154, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════ */

#loading-screen {
  position: fixed; inset: 0; z-index: 10000;
  background: #FFF7FB;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
}

.loading-logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--rain-light);
  text-align: center; line-height: 1.2;
  opacity: 0; transform: translateY(30px);
}

.loading-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1.05rem;
  color: var(--mist); letter-spacing: 0.2em;
  opacity: 0;
}

.loading-bar-wrap {
  width: 200px; height: 1px;
  background: rgba(255,255,255,0.08);
}
.loading-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--sky-blue), var(--gold));
}

.loading-date {
  font-size: 0.72rem; color: var(--mist);
  letter-spacing: 0.15em; text-transform: uppercase; opacity: 0;
}

/* ═══════════════════════════════════════════════════════════
   MUSIC PLAYER (floating)
   ═══════════════════════════════════════════════════════════ */

#music-player {
  position: fixed; bottom: 2rem; right: 1.5rem; z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 111, 154, 0.12);
  border-radius: 14px; padding: 0.8rem 1.1rem;
  display: flex; align-items: center; gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), var(--glow-storm);
  transition: var(--transition); min-width: 200px;
}
#music-player:hover { transform: translateY(-3px); }

.mp-disc {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--sky-blue), var(--mist), var(--gold), var(--sky-blue));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(240, 111, 154, 0.3);
}
.mp-disc-inner { width: 11px; height: 11px; background: #FFF7FB; border-radius: 50%; }
.mp-disc.playing { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mp-info { flex: 1; overflow: hidden; }
.mp-title { font-size: 0.72rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { font-size: 0.62rem; color: var(--text-mute); }

.mp-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-deep), var(--storm-cloud));
  border: 1px solid rgba(240, 111, 154, 0.2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--rain-light); transition: var(--transition);
}
.mp-btn:hover { transform: scale(1.1); border-color: var(--sky-blue); }
.mp-toggle { background: transparent; }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */

#hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

#hero-video-wrap {
  position: absolute; inset: 0; z-index: 3;
}
#hero-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.4) brightness(0.35);
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.92) 100%
  );
}

/* Storm ambient light orbs */
.hero-orb {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 4;
  filter: blur(100px); opacity: 0.18;
}
.hero-orb-1 { width: 500px; height: 300px; background: var(--storm-cloud); top: -80px; left: -100px; animation: orbDrift1 12s ease-in-out infinite; }
.hero-orb-2 { width: 400px; height: 250px; background: var(--sky-blue);    top: -40px; right: -80px; animation: orbDrift2 15s ease-in-out infinite; opacity: 0.08; }
.hero-orb-3 { width: 350px; height: 200px; background: var(--mist);        bottom: 0; left: 20%;   animation: orbDrift3 18s ease-in-out infinite; }

@keyframes orbDrift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,25px)} }
@keyframes orbDrift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,35px)} }
@keyframes orbDrift3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(20px,-20px)} }

/* Cloud layers (CSS animated) */
.hero-clouds {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden;
}
.cloud-drift {
  position: absolute; border-radius: 50%;
  background: rgba(240, 111, 154, 0.35); filter: blur(50px);
  animation: cloudMove linear infinite;
}
.cloud-drift:nth-child(1) { width:700px; height:200px; top:5%;  animation-duration:90s; }
.cloud-drift:nth-child(2) { width:500px; height:150px; top:18%; animation-duration:120s; animation-delay:-30s; }
.cloud-drift:nth-child(3) { width:600px; height:180px; top:35%; animation-duration:100s; animation-delay:-60s; }

@keyframes cloudMove {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120vw); }
}

.hero-content {
  position: relative; z-index: 10;
  text-align: center; padding: 2rem; max-width: 900px;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sky-blue);
  background: rgba(240, 111, 154, 0.07);
  border: 1px solid rgba(240, 111, 154, 0.15);
  padding: 0.4rem 1.2rem; border-radius: 100px; margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900; line-height: 1.05; color: var(--rain-light);
  text-shadow: 0 0 80px rgba(240, 111, 154, 0.2), 0 2px 8px rgba(0,0,0,0.6);
}
.hero-title .word { overflow: hidden; display: inline-block; }
.hero-title .word-inner { display: inline-block; }

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: clamp(1.1rem, 3vw, 1.7rem);
  color: var(--text-dim); margin-top: 1rem; letter-spacing: 0.08em;
}

/* ── Countdown (Storm style) ──────────────────────────────── */
#hero-countdown {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
}

.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }

.cd-box {
  min-width: 70px; padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(240, 111, 154, 0.12);
  border-radius: 12px;
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700;
  color: var(--rain-light); text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), var(--glow-storm);
  text-shadow: 0 0 12px rgba(240, 111, 154, 0.5);
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cd-box::after {
  content: ''; position: absolute; left: 0; top: 50%; right: 0; height: 1px;
  background: rgba(240, 111, 154, 0.06);
}
.cd-box.tick { transform: scale(1.06); box-shadow: 0 0 25px rgba(240, 111, 154, 0.5); }

.cd-label {
  font-size: 0.63rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-mute);
}

/* Scroll cue */
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  animation: scrollBounce 3s ease-in-out infinite;
}
.hero-scroll span { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); }
.hero-scroll-arrow { width: 20px; height: 20px; border-right: 1px solid rgba(203,213,225,0.3); border-bottom: 1px solid rgba(203,213,225,0.3); transform: rotate(45deg); }
@keyframes scrollBounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(10px)} }

/* ═══════════════════════════════════════════════════════════
   SECTION BASE
   ═══════════════════════════════════════════════════════════ */

.section {
  padding: 5rem 0;
  position: relative; z-index: 5;
  /* Transparent — atmosphere canvas shows through */
}

.section-inner        { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-inner-narrow { max-width: 800px;  margin: 0 auto; padding: 0 1.5rem; }

.section-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 1rem;
}

.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; line-height: 1.15; margin-bottom: 0.75rem;
  color: var(--rain-light);
}

.section-heading-line {
  display: block; width: 50px; height: 2px; border-radius: 1px; margin-top: 1rem;
  background: linear-gradient(90deg, var(--sky-blue), transparent);
}

/* In golden phase sections, the line becomes golden */
.section-golden .section-heading-line {
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section-golden .section-tag { color: var(--amber); }
.section-golden .section-heading { color: var(--sun-glow); }

.section-desc {
  font-size: 1rem; color: var(--text-dim); line-height: 1.85; max-width: 560px;
}

/* ── Glass Card — Storm ───────────────────────────────────── */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 2rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(240, 111, 154, 0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--glow-storm);
  transform: translateY(-4px);
}

/* ── Glass Card — Golden (used in late sections) ──────────── */
.glass-gold {
  background: rgba(26, 14, 0, 0.55);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(233, 166, 166, 0.12);
  border-radius: 20px; padding: 2rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.glass-gold:hover {
  border-color: rgba(233, 166, 166, 0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--glow-gold);
  transform: translateY(-4px);
}

#floating-hearts {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; overflow: hidden;
}
.floating-heart {
  position: absolute;
  top: 110%;
  font-size: 1rem;
  color: rgba(248, 174, 194, 0.94);
  text-shadow: 0 0 10px rgba(248, 174, 194, 0.35);
  mix-blend-mode: screen;
  animation: floatHeart linear infinite;
  opacity: 0.9;
}
.floating-heart:nth-child(3n) { animation-duration: 11s; }
.floating-heart:nth-child(4n) { animation-duration: 13s; }
.floating-heart:nth-child(5n) { animation-duration: 12.4s; }
.floating-heart:nth-child(6n) { animation-duration: 14.2s; }
@keyframes floatHeart {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0.85; }
  25%  { transform: translate3d(18px, -32vh, 0) rotate(45deg); opacity: 0.95; }
  50%  { transform: translate3d(-12px, -70vh, 0) rotate(180deg); opacity: 0.95; }
  75%  { transform: translate3d(8px, -105vh, 0) rotate(255deg); opacity: 0.8; }
  100% { transform: translate3d(-4px, -140vh, 0) rotate(360deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════ */

#dashboard { position: relative; z-index: 5; padding: 4rem 0; }

.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-top: 2.5rem;
}

.dash-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 246, 0.96));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 111, 154, 0.18);
  border-radius: 18px; padding: 1.75rem; text-align: center;
  transition: var(--transition); position: relative; overflow: hidden;
}
.dash-card::before {
  content: ''; position: absolute; inset: -2px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 209, 213, 0.28), rgba(240, 111, 154, 0.12), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.dash-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(122, 72, 101, 0.16), 0 0 40px rgba(255, 184, 108, 0.12);
}
.dash-card:hover::before { opacity: 1; }

.dash-icon  { font-size: 2rem; margin-bottom: 0.75rem; display: block; color: var(--sky-blue); }
.dash-value { font-family: 'Playfair Display', serif; font-size: 2.4rem; font-weight: 900; color: var(--rain-light); line-height: 1; }
.dash-label { font-size: 0.72rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.35rem; }

/* Progress Ring */
.progress-ring-wrap   { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.progress-ring-svg    { transform: rotate(-90deg); }
.progress-ring-bg     { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 5; }
.progress-ring-fill   {
  fill: none; stroke: url(#ringGrad); stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 283; stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.23,1,0.32,1);
  filter: drop-shadow(0 0 6px rgba(240, 111, 154, 0.6));
}
.progress-ring-label  { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 900; fill: var(--rain-light); text-anchor: middle; dominant-baseline: middle; }
.progress-ring-sub    { font-size: 0.68rem; fill: rgba(179,122,138,0.8); text-anchor: middle; dominant-baseline: middle; }

/* ═══════════════════════════════════════════════════════════
   DAILY LETTERS ACCORDION — Storm Glass Style
   ═══════════════════════════════════════════════════════════ */

#daily-letters { position: relative; z-index: 5; padding: 5rem 0; }

.chapters-list { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.6rem; }

.chapter-item {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 111, 154, 0.16);
  border-radius: 14px; overflow: hidden; transition: var(--transition);
}
.chapter-item.today   { border-color: rgba(240, 111, 154, 0.35); box-shadow: 0 0 30px rgba(240, 111, 154, 0.14); }
.chapter-item.unlocked:hover { border-color: rgba(240, 111, 154, 0.25); }

.chapter-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem; cursor: pointer; user-select: none;
  transition: background 0.3s ease;
}
.chapter-item.unlocked .chapter-header:hover { background: rgba(240, 111, 154, 0.14); }
.chapter-item.locked   .chapter-header { cursor: not-allowed; }

.chapter-emoji    { font-size: 1.4rem; flex-shrink: 0; }
.chapter-meta     { flex: 1; }
.chapter-date-label { font-size: 0.68rem; color: rgba(104, 66, 80, 0.72); letter-spacing: 0.1em; text-transform: uppercase; }
.chapter-title    { font-size: 0.98rem; font-weight: 600; color: #4A2633; margin-top: 0.1rem; }
.chapter-title.today-title { color: rgba(240, 111, 154, 0.95); }

.chapter-unlock-badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(123, 96, 255, 0.12);
  border: 1px solid rgba(123, 96, 255, 0.22);
  padding: 0.28rem 0.75rem; border-radius: 100px; color: #C4B5FD;
}

.chapter-chevron { width: 18px; height: 18px; color: var(--text-mute); transition: transform 0.4s ease; flex-shrink: 0; }
.chapter-item.open .chapter-chevron { transform: rotate(180deg); color: var(--sky-blue); }

.chapter-countdown-mini { font-size: 0.7rem; color: rgba(226, 232, 240, 0.72); display: flex; align-items: center; gap: 0.4rem; }
.lock-icon { font-size: 0.9rem; opacity: 0.4; }

.chapter-body { max-height: 0; overflow: hidden; transition: max-height 0.65s cubic-bezier(0.23,1,0.32,1); }
.chapter-item.open .chapter-body { max-height: 2000px; }

.chapter-content {
  padding: 0 1.5rem 1.75rem; border-top: 1px solid rgba(240, 111, 154, 0.14); padding-top: 1.5rem;
}

.chapter-thought {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.1rem; color: #6B3A55; line-height: 1.7;
  margin-bottom: 1.25rem; padding-left: 1rem;
  border-left: 1px solid rgba(240, 111, 154, 0.28);
}

.chapter-letter { font-size: 0.93rem; line-height: 1.88; color: rgba(74, 38, 51, 0.88); }
.chapter-letter p + p { margin-top: 0.9rem; }
.chapter-letter strong { color: #4A2633; }
.chapter-letter code   { font-family: monospace; color: rgba(123, 96, 255, 0.95); font-size: 0.85em; }

.chapter-img,
.chapter-media {
  width: 100%; border-radius: 10px; object-fit: cover; max-height: 300px; margin-top: 1.25rem;
  border: 1px solid rgba(240, 111, 154, 0.16);
}
.media-block {
  width: 100%; display: block; border-radius: 18px;
  overflow: hidden; background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 45px rgba(120, 80, 100, 0.08);
}
.scrapbook-media,
.vault-card-img,
.vault-modal-media,
.polaroid-media,
.capsule-media {
  width: 100%; height: auto;
  display: block;
  object-fit: cover;
}
.scrapbook-media {
  min-height: 260px;
}
.vault-modal-media {
  max-height: 320px;
}
.capsule-photo audio,
.capsule-photo video {
  width: 100%;
}
.chapter-memory { margin-top: 1rem; font-size: 0.8rem; color: rgba(104, 66, 80, 0.76); font-style: italic; display: flex; align-items: center; gap: 0.4rem; }

.chapter-item.locked { opacity: 0.5; }
.chapter-item.locked .chapter-emoji { filter: grayscale(1); opacity: 0.3; }
.chapter-locked-body { padding: 1.25rem 1.5rem 1.5rem; text-align: center; }
.chapter-locked-icon { font-size: 1.8rem; opacity: 0.25; margin-bottom: 0.4rem; }
.chapter-locked-text { font-size: 0.82rem; color: var(--text-mute); }
.chapter-locked-countdown { margin-top: 0.6rem; font-size: 0.95rem; font-weight: 700; color: var(--sky-blue); letter-spacing: 0.05em; }

/* ═══════════════════════════════════════════════════════════
   TODAY MATTERS — Atmospheric Quote
   ═══════════════════════════════════════════════════════════ */

.quote-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(240, 111, 154, 0.1);
  border-radius: 24px; padding: 3.5rem 3rem; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: 0 0 60px rgba(240, 111, 154, 0.05);
}
.quote-card::before {
  content: '\201C'; font-size: 14rem; font-family: 'Playfair Display', serif;
  position: absolute; top: -3rem; left: 1rem;
  color: rgba(240, 111, 154, 0.04); line-height: 1; pointer-events: none;
}

.quote-date-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--sky-blue);
  background: rgba(240, 111, 154, 0.08); border: 1px solid rgba(240, 111, 154, 0.15);
  padding: 0.32rem 1rem; border-radius: 100px; margin-bottom: 1.5rem;
}

.quote-text {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.8rem); line-height: 1.65;
  color: var(--rain-light); max-width: 700px; margin: 0 auto;
}
.quote-label { margin-top: 1.5rem; font-size: 0.75rem; color: var(--text-mute); letter-spacing: 0.1em; }

/* ═══════════════════════════════════════════════════════════
   MEMORY COUNTER — Atmospheric Cards
   ═══════════════════════════════════════════════════════════ */

.counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 1.2rem; margin-top: 3rem; }

.counter-card {
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(18px);
  border: 1px solid rgba(240, 111, 154, 0.16); border-radius: 18px;
  padding: 2rem 1.5rem; text-align: center; transition: var(--transition);
}
.counter-card:hover {
  transform: translateY(-8px); border-color: rgba(240, 111, 154, 0.28);
  box-shadow: 0 20px 50px rgba(120, 80, 105, 0.12), 0 0 35px rgba(240, 111, 154, 0.12);
}
.counter-icon  { font-size: 2rem; margin-bottom: 0.75rem; display: block; color: #A33F63; }
.counter-value { font-family: 'Playfair Display', serif; font-size: 2.6rem; font-weight: 900; color: #4A2633; line-height: 1; }
.counter-label { font-size: 0.72rem; color: rgba(104, 66, 80, 0.78); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.4rem; }

/* ═══════════════════════════════════════════════════════════
   LETTERS FROM THE HEART
   ═══════════════════════════════════════════════════════════ */

.letter-paper {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(240, 111, 154, 0.08);
  border-radius: 4px; padding: 3rem 2.5rem;
  max-width: 720px; margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  position: relative; overflow: hidden;
}
.letter-paper::before {
  content: ''; position: absolute; left: 56px; top: 0; bottom: 0; width: 1px;
  background: rgba(240, 111, 154, 0.07);
}
.letter-paper::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--sky-blue), transparent);
}
.letter-lines { position: relative; z-index: 1; }
.letter-salutation { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: var(--sky-blue); margin-bottom: 1.5rem; }
.letter-body { font-size: 0.97rem; line-height: 2; color: var(--text-dim); }
.letter-body p + p { margin-top: 1rem; }
.letter-body strong { color: var(--rain-light); }
.typewriter-cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--sky-blue); vertical-align: text-bottom; animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.letter-sign { text-align: right; margin-top: 2rem; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.15rem; color: var(--sky-blue); }

/* ═══════════════════════════════════════════════════════════
   CINEMATIC TIMELINE — Warming into Golden Phase
   ═══════════════════════════════════════════════════════════ */

.timeline-spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg,
    transparent,
    rgba(240,111,154,0.3) 20%,
    rgba(233,166,166,0.4) 80%,
    transparent
  );
  transform: translateX(-50%); display: none;
}
@media(min-width:768px){ .timeline-spine{display:block;} }

.timeline-entry { display: flex; flex-direction: column; align-items: center; gap: 2rem; margin-bottom: 5rem; position: relative; }
@media(min-width:768px){
  .timeline-entry     { flex-direction: row; }
  .timeline-entry.rev { flex-direction: row-reverse; }
}

.timeline-dot {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sky-blue);
  box-shadow: 0 0 16px rgba(240,111,154,0.7), 0 0 32px rgba(240,111,154,0.3);
  display: none; z-index: 2;
}
@media(min-width:768px){ .timeline-dot{display:block;} }

.tl-img-wrap { flex: 1; perspective: 1000px; }
.tl-card {
  border-radius: 16px; overflow: hidden; position: relative;
  transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: pointer;
}
.tl-card img { width: 100%; height: 300px; object-fit: cover; display: block; transition: transform 0.4s ease; filter: brightness(0.9) saturate(0.8); }
.tl-card:hover img { transform: scale(1.04); filter: brightness(1) saturate(1); }

/* Shimmer — like light through clouds */
.tl-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  background-size: 250% 100%; background-position: -100% 0;
  transition: background-position 0.7s ease;
}
.tl-card:hover::before { background-position: 200% 0; }

/* Border: storm-to-golden transition */
.tl-card::after {
  content: ''; position: absolute; inset: -2px; border-radius: 18px;
  background: linear-gradient(135deg, var(--sky-blue), var(--mist), var(--gold));
  background-size: 300% 300%; animation: borderShift 5s ease infinite;
  z-index: -1; opacity: 0; transition: opacity 0.4s ease;
}
.tl-card:hover::after { opacity: 1; }
@keyframes borderShift { 0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%} }

.tl-text { flex: 1; padding: 0.5rem 1rem; }
.tl-chapter-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mist);
  background: rgba(179,122,138,0.1); border: 1px solid rgba(179,122,138,0.2);
  padding: 0.28rem 0.9rem; border-radius: 100px; margin-bottom: 0.75rem;
}
.tl-title { font-family: 'Playfair Display', serif; font-size: 1.75rem; color: var(--rain-light); margin-bottom: 0.75rem; line-height: 1.2; }
.tl-desc  { font-size: 0.94rem; line-height: 1.85; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════
   THIS DAY LAST YEAR — Polaroids (Aged, Weathered)
   ═══════════════════════════════════════════════════════════ */

.polaroid-wrap { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; margin-top: 3rem; }

.polaroid {
  background: #e8e0d0; padding: 0.9rem 0.9rem 2.2rem;
  border-radius: 2px; width: 250px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
  transform: rotate(-2deg) translateY(20px); opacity: 0; transition: var(--transition);
  cursor: pointer; position: relative;
  filter: sepia(0.15) contrast(0.95);
}
.polaroid:nth-child(even) { transform: rotate(1.5deg) translateY(20px); }
.polaroid.revealed        { opacity: 1; transform: rotate(-2deg) translateY(0); }
.polaroid:nth-child(even).revealed { transform: rotate(1.5deg) translateY(0); }
.polaroid:hover { transform: rotate(0deg) translateY(-10px) scale(1.05) !important; box-shadow: 0 30px 80px rgba(0,0,0,0.6); z-index: 10; }

.polaroid img         { width: 100%; height: 185px; object-fit: cover; display: block; }
.polaroid-tape        { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 48px; height: 18px; background: rgba(240,220,160,0.6); border-radius: 2px; }
.polaroid-caption     { font-family: 'Poppins', sans-serif; font-size: 0.72rem; color: #3d3020; text-align: center; margin-top: 0.7rem; line-height: 1.4; }
.polaroid-date        { font-size: 0.62rem; color: #8a7060; text-align: center; margin-top: 0.25rem; }
.polaroid-location    { font-size: 0.62rem; color: #6a5040; text-align: center; }

/* ═══════════════════════════════════════════════════════════
   MEMORY JAR — Glass Jar in Storm Light
   ═══════════════════════════════════════════════════════════ */

.jar-scene {
  position: relative; display: inline-flex; align-items: flex-start; justify-content: center;
  height: 360px; cursor: pointer; overflow: hidden;
}
.jar-svg { width: 200px; filter: drop-shadow(0 20px 50px rgba(240,111,154,0.15)); transition: transform 0.3s ease; }
.jar-scene:hover .jar-svg { transform: translateY(-8px) scale(1.03); }

.jar-floats { position: absolute; inset: 64px 34px 84px; overflow: hidden; pointer-events: none; }
.jar-float  { position: absolute; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 14px;
  background: rgba(255,255,255,0.92); color: #A33F63; font-size: 0.95rem; font-weight: 700;
  box-shadow: 0 8px 20px rgba(172, 98, 131, 0.16);
  animation: floatUp 4.6s ease-in-out infinite;
}
.jar-float:nth-child(odd) { animation-duration: 4.6s; }
.jar-float:nth-child(even) { animation-duration: 5.2s; }
.jar-float:nth-child(3n) { animation-duration: 4.2s; }
@keyframes floatUp { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

#jar-reveal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(255, 245, 247, 0.95); backdrop-filter: blur(18px);
  align-items: center; justify-content: center;
}
#jar-reveal.active { display: flex; }

#memory-jar {
  background: transparent;
}
#memory-jar .section-tag,
#memory-jar .section-heading,
#memory-jar .section-desc {
  color: var(--rain-light);
}
#memory-jar .jar-scene {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 380px; width: 100%; max-width: 380px; cursor: pointer; perspective: 1200px;
  padding: 1.7rem; overflow: hidden; touch-action: manipulation;
  border-radius: 34px;
  background: radial-gradient(circle at 25% 20%, rgba(255, 235, 244, 0.55), transparent 28%),
              radial-gradient(circle at 76% 24%, rgba(255, 210, 222, 0.18), transparent 18%),
              linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 250, 0.92));
  border: 1px solid rgba(240, 111, 154, 0.18);
  box-shadow: 0 24px 84px rgba(176, 125, 143, 0.18), inset 0 0 28px rgba(255,255,255,0.28);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
#memory-jar .jar-scene::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 34px;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(255,255,255,0.9), transparent 22%),
              radial-gradient(circle at 65% 75%, rgba(240, 111, 154, 0.08), transparent 15%);
}
#memory-jar .jar-svg {
  width: 230px;
  filter: drop-shadow(0 24px 60px rgba(240, 111, 154, 0.2));
  transition: transform 0.35s ease, filter 0.35s ease;
  transform-style: preserve-3d;
  animation: jarSway 10s ease-in-out infinite;
}
#memory-jar .jar-scene:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 100px rgba(183, 112, 143, 0.22), inset 0 0 26px rgba(255,255,255,0.28);
}
#memory-jar .jar-scene:hover .jar-svg {
  transform: perspective(1200px) translateY(-12px) rotateX(6deg) rotateY(-4deg) scale(1.05);
}
@keyframes jarSway {
  0%,100% { transform: translateY(0) rotateZ(0deg) scale(1); }
  25% { transform: translateY(-4px) rotateZ(-0.6deg) scale(1.01); }
  50% { transform: translateY(-6px) rotateZ(0.8deg) scale(1.02); }
  75% { transform: translateY(-4px) rotateZ(-0.3deg) scale(1.01); }
}
#memory-jar .jar-floats {
  position: absolute; inset: 70px 44px 92px;
  overflow: hidden; pointer-events: none;
}
#memory-jar .jar-floats { clip-path: ellipse(36% 54% at 50% 44%); }
#memory-jar .jar-float {
  position: absolute; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 14px; background: rgba(255,255,255,0.92); color: #A33F63;
  font-size: 0.95rem; font-weight: 700;
  box-shadow: 0 10px 24px rgba(172, 98, 131, 0.16);
  animation: floatUp 4.6s ease-in-out infinite;
}
#memory-jar .jar-floats { z-index: 2; }
#memory-jar .jar-svg    { z-index: 1; position: relative; }
#memory-jar .jar-float:nth-child(odd) { animation-duration: 4.6s; }
#memory-jar .jar-float:nth-child(even) { animation-duration: 5.2s; }
#memory-jar .jar-float:nth-child(3n) { animation-duration: 4.2s; }

.jar-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 246, 0.95));
  border: 1px solid rgba(240, 111, 154, 0.22);
  border-radius: 24px; padding: 3rem; max-width: 520px; width: 92%;
  text-align: center; animation: cardReveal 0.48s cubic-bezier(0.23,1,0.32,1);
  position: relative; box-shadow: 0 28px 95px rgba(175, 110, 135, 0.18);
}
@keyframes cardReveal { from{transform:scale(0.82) translateY(18px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.jar-card-emoji { font-size: 3rem; margin-bottom: 1rem; display: block; color: var(--sky-blue); }
.jar-card-text  { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.18rem; color: var(--rain-light); line-height: 1.7; }
.jar-card-close { margin-top: 2rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); cursor: pointer; }
.jar-card-hint  { font-size: 0.72rem; color: rgba(104, 66, 80, 0.65); margin-top: 0.5rem; }

/* Floating Memory Stars — Galaxy box only, not full section */
#memory-stars {
  background: transparent;
}
#memory-stars .section-tag,
#memory-stars .section-heading,
#memory-stars .section-desc {
  color: var(--rain-light);
}
.stars-scene {
  position: relative; height: 70vh; min-height: 480px; max-height: 700px;
  margin-top: 3rem; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 34% 18%, rgba(144, 98, 255, 0.14), transparent 16%),
              radial-gradient(circle at 78% 22%, rgba(244, 155, 251, 0.08), transparent 12%),
              linear-gradient(180deg, #04070e 0%, #071022 40%, #060a17 100%);
  border: 1px solid rgba(115, 101, 255, 0.12);
  box-shadow: 0 28px 90px rgba(0,0,0,0.4), inset 0 0 50px rgba(123, 96, 255, 0.12);
}
.stars-scene::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(233, 191, 255, 0.08), transparent 12%),
              radial-gradient(circle at 80% 15%, rgba(179, 210, 255, 0.06), transparent 10%),
              radial-gradient(circle at 50% 80%, rgba(201, 229, 255, 0.05), transparent 18%);
  pointer-events: none;
}
.star-point { filter: drop-shadow(0 0 24px rgba(255,255,255,0.25)); }
.star-orb {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(192,177,255,0.9) 35%, rgba(111, 116, 255,0.2) 100%);
  box-shadow: 0 0 18px rgba(255,255,255,0.95), 0 0 60px rgba(123, 96, 255,0.22);
  transition: var(--transition);
  animation: starTwinkle 3s ease-in-out infinite;
  position: relative;
}
.star-orb::before {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95), transparent 55%);
  opacity: 0.45;
  pointer-events: none;
}
.star-point:hover .star-orb {
  width: 20px; height: 20px;
  box-shadow: 0 0 28px rgba(255,255,255,1), 0 0 72px rgba(255,255,255,0.4);
  animation: none;
}
.star-label {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,0.82); white-space: nowrap;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.star-point:hover .star-label { opacity: 1; color: #F8FAFC; }

/* Hall of Fame — Dark card area only for a cleaner look */
#hall-of-fame {
  background: transparent;
}
#hall-of-fame .section-tag,
#hall-of-fame .section-heading,
#hall-of-fame .section-desc {
  color: var(--rain-light);
}
.hof-scroll {
  display: flex; gap: 1.5rem; overflow-x: auto; padding: 1rem 0.5rem 2rem;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  border: 1px solid rgba(240, 111, 154, 0.18);
  box-shadow: 0 20px 70px rgba(172, 112, 147, 0.12);
}
.flip-card { flex-shrink: 0; width: min(80vw, 280px); height: 385px; scroll-snap-align: center; perspective: 1200px; cursor: pointer; }
.flip-front {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(104, 66, 80, 0.16);
  border: 1px solid rgba(240, 111, 154, 0.16);
}
.flip-front::before {
  content: ''; position: absolute; inset: -2px; border-radius: 20px; z-index: -1;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 55%);
  opacity: 0.55;
}
.flip-front img { width: 100%; height: 78%; object-fit: cover; display: block; filter: brightness(0.96) saturate(1.1); }
.flip-front-title { font-family: 'Mochiy Pop One', sans-serif; font-size: 0.95rem; color: #4A2633; }
.flip-front-hint  { font-size: 0.65rem; color: rgba(104, 66, 80, 0.72); margin-top: 0.2rem; }
.flip-back {
  background: rgba(255, 255, 255, 0.94);
  transform: rotateY(180deg); border: 1px solid rgba(240, 111, 154, 0.16);
}
.flip-back-title { font-family: 'Mochiy Pop One', sans-serif; font-size: 1.05rem; color: #4A2633; }
.flip-back-caption { font-size: 0.86rem; color: rgba(104, 66, 80, 0.78); line-height: 1.6; }
.flip-back-icon { font-size: 2.5rem; color: rgba(123, 96, 255, 0.95); }
.hof-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #FFE7A5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25); transition: var(--transition); z-index: 5;
}
.hof-nav-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.hof-nav-left  { left: -21px; }
.hof-nav-right { right: -21px; }

/* MEMORY VAULT — Transitioning to Golden Glass
   ═══════════════════════════════════════════════════════════ */

.vault-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 2.5rem; }
.vault-tab {
  padding: 0.45rem 1.2rem; border-radius: 100px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: 1px solid rgba(240, 111, 154, 0.1);
  background: rgba(255, 255, 255, 0.5); color: var(--text-dim);
  transition: var(--transition); letter-spacing: 0.04em;
}
.vault-tab:hover { border-color: rgba(240, 111, 154, 0.25); color: var(--rain-light); }
.vault-tab.active {
  background: rgba(240, 111, 154, 0.1);
  border-color: rgba(240, 111, 154, 0.3); color: var(--sky-blue);
}

.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.vault-card {
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(16px);
  border: 1px solid rgba(240, 111, 154, 0.07); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: var(--transition);
}
.vault-card:hover { transform: translateY(-5px); border-color: rgba(233, 166, 166, 0.2); box-shadow: 0 20px 50px rgba(0,0,0,0.4), var(--glow-amber); }
.vault-card-img             { width: 100%; height: 160px; object-fit: cover; display: block; filter: brightness(0.85) saturate(0.7); }
.vault-card-img-placeholder { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: rgba(240,111,154,0.04); }
.vault-card-info    { padding: 1.2rem; }
.vault-card-icon    { font-size: 1.4rem; margin-bottom: 0.5rem; display: block; }
.vault-card-title   { font-size: 0.98rem; font-weight: 700; color: var(--rain-light); margin-bottom: 0.35rem; }
.vault-card-desc    { font-size: 0.82rem; color: var(--text-mute); line-height: 1.6; }

/* Vault Modal */
#vault-modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(255, 247, 251, 0.92); backdrop-filter: blur(16px);
  align-items: center; justify-content: center; padding: 1rem;
}
#vault-modal.active { display: flex; }
.vault-modal-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(240, 111, 154, 0.12); border-radius: 22px;
  max-width: 560px; width: 100%; overflow: hidden;
  animation: cardReveal 0.4s cubic-bezier(0.23,1,0.32,1);
}
.vault-modal-img   { width: 100%; height: 240px; object-fit: cover; display: block; }
.vault-modal-body  { padding: 2rem; }
.vault-modal-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--rain-light); margin-bottom: 0.75rem; }
.vault-modal-desc  { font-size: 0.93rem; color: var(--text-dim); line-height: 1.8; }
.vault-modal-close { margin-top: 1.5rem; cursor: pointer; color: var(--mist); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════
   MEMORY STARS — Night Sky Constellation
   ═══════════════════════════════════════════════════════════ */
#constellation-canvas { position: absolute; inset: 0; }

.star-point {
  position: absolute; transform: translate(-50%, -50%);
  cursor: pointer; z-index: 5;
}

#star-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(255,247,251,0.9);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#star-modal.active {
  display: flex;
}

.star-modal-box {
  display: inline-block;
  background: rgba(255,255,255,0.95);
  border-radius: 22px;
  overflow: hidden;
  width: fit-content;
  max-width: 95vw;
  max-height: 95vh;
}

.star-modal-img {
  display: block;
  width: auto;
  height: auto;
    max-width:none;
    max-height:80vh;
  object-fit: contain;
  margin: 0 auto;
}

.star-modal-body {
  padding: 1.5rem;
  text-align: center;
}
/* ═══════════════════════════════════════════════════════════
   DIGITAL SCRAPBOOK
   ═══════════════════════════════════════════════════════════ */

.scrapbook-viewer { position: relative; max-width: 700px; margin: 3rem auto 0; height: 440px; perspective: 1200px; }
.scrapbook-page {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(240,111,154,0.07);
  border-radius: 6px; padding: 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  opacity: 0; pointer-events: none; transform: translateX(40px);
  transition: all 0.65s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.scrapbook-page.active { opacity: 1; pointer-events: all; transform: translateX(0); }
.scrapbook-page.prev   { opacity: 0; transform: translateX(-40px); }
.scrapbook-photo {
  width: 100%; max-height: 220px; object-fit: cover;
  border: 4px solid rgba(255,255,255,0.05); border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); transform: rotate(-1deg);
  filter: brightness(0.88) saturate(0.75);
}
.scrapbook-tape { position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%); width: 55px; height: 18px; background: rgba(240,220,160,0.12); border-radius: 2px; }
.scrapbook-caption { font-size: 0.88rem; color: var(--text-dim); text-align: center; line-height: 1.6; font-style: italic; }
.scrapbook-sticker { font-size: 1.7rem; }
.scrapbook-nav { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.scrapbook-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.6); border: 1px solid rgba(240,111,154,0.12);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 1.1rem; transition: var(--transition);
}
.scrapbook-btn:hover { background: rgba(240,111,154,0.08); border-color: rgba(240,111,154,0.25); color: var(--rain-light); transform: scale(1.1); }
.scrapbook-page-indicator { font-size: 0.78rem; color: var(--text-mute); }

/* ═══════════════════════════════════════════════════════════
   HALL OF FAME 2.0 — In Golden Phase
   ═══════════════════════════════════════════════════════════ */

.hof-scroller-wrap { position: relative; margin-top: 3rem; }
.hof-scroll {
  display: flex; gap: 1.5rem; overflow-x: auto; padding: 1rem 0.5rem 2rem;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hof-scroll::-webkit-scrollbar { display: none; }

.flip-card { flex-shrink: 0; width: min(80vw, 280px); height: 385px; scroll-snap-align: center; perspective: 1200px; cursor: pointer; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.23,1,0.32,1);
}
.flip-card:hover .flip-inner, .flip-card.flipped .flip-inner { transform: rotateY(180deg); }

.flip-front, .flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; overflow: hidden; }

.flip-front {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(104, 66, 80, 0.14);
  border: 1px solid rgba(240, 111, 154, 0.16);
}
.flip-front::before {
  content: ''; position: absolute; inset: -2px; border-radius: 20px; z-index: -1;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), transparent 55%);
  opacity: 0.65;
}
.flip-front img { width: 100%; height: 78%; object-fit: cover; display: block; filter: brightness(0.98) saturate(1.05); }
.flip-front-info { padding: 0.9rem 1rem; text-align: center; }
.flip-front-title { font-family: 'Mochiy Pop One', sans-serif; font-size: 0.95rem; color: #F8FAFC; }
.flip-front-hint  { font-size: 0.65rem; color: rgba(248,250,252,0.72); margin-top: 0.2rem; }

.flip-back {
  background: linear-gradient(180deg, rgba(8, 11, 22, 0.96), rgba(18, 23, 42, 0.96));
  transform: rotateY(180deg); border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem; text-align: center; gap: 1rem;
}
.flip-back-icon    { font-size: 2.5rem; animation: iconFloat 2s ease-in-out infinite; }
@keyframes iconFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.flip-back-title   { font-family: 'Mochiy Pop One', sans-serif; font-size: 1.05rem; color: #000306; text-shadow: 0 0 16px rgba(255,255,255,0.15); }
.flip-back-caption { font-size: 0.86rem; color: rgba(1, 10, 19, 0.8); line-height: 1.6; }

.flip-front .spotlight { position: absolute; inset: 0; pointer-events: none; z-index: 3; background: radial-gradient(circle at var(--sx,50%) var(--sy,50%), rgba(255,255,255,0.06) 0%, transparent 60%); }

.hof-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #FFE7A5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); transition: var(--transition); z-index: 5;
}
.hof-nav-btn:hover { background: rgba(255,255,255,0.14); transform: translateY(-1px); }
.hof-nav-left  { left: -21px; }
.hof-nav-right { right: -21px; }

/* ═══════════════════════════════════════════════════════════
   MASONRY GALLERY — Golden Phase
   ═══════════════════════════════════════════════════════════ */

.masonry-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px; gap: 0.7rem; margin-top: 3rem;
}
@media(min-width:640px) { .masonry-grid { grid-template-columns: repeat(3,1fr); } }
@media(min-width:1024px){ .masonry-grid { grid-template-columns: repeat(4,1fr); grid-auto-rows: 200px; } }

.masonry-item { position: relative; overflow: hidden; border-radius: 12px; cursor: pointer; }
.masonry-item:nth-child(3n) { grid-row: span 2; }
.masonry-item:nth-child(5n) { grid-column: span 2; }

.masonry-item img,
.masonry-item video,
.masonry-item audio {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
  filter: brightness(0.8) saturate(0.7);
  border: 1px solid rgba(255,255,255,0.04);
}
.masonry-item video {
  min-height: 180px;
}
.masonry-item audio {
  height: auto;
  object-fit: unset;
}
.masonry-item:hover img,
.masonry-item:hover video,
.masonry-item:hover audio { transform: scale(1.02); filter: brightness(1) saturate(0.9); }
.masonry-item::after {
  content: ''; position: absolute; inset: 0; opacity: 0; border-radius: 12px;
  background: linear-gradient(135deg, rgba(217,140,147,0.35), rgba(233,166,166,0.25));
  transition: opacity 0.35s ease;
}
.masonry-item:hover::after { opacity: 1; }
.masonry-item:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.4), var(--glow-gold); transform: scale(1.02); transition: var(--transition); z-index: 5; }

/* ═══════════════════════════════════════════════════════════
   DIGITAL TIME CAPSULE — Golden Sealed Vault
   ═══════════════════════════════════════════════════════════ */

.capsule-box {
  max-width: 680px; margin: 3rem auto 0; text-align: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(233, 166, 166, 0.18); border-radius: 28px; padding: 3.5rem 2.5rem;
  position: relative; overflow: hidden;
  box-shadow: 0 0 80px rgba(233,166,166,0.06);
}
.capsule-box::before {
  content: ''; position: absolute; inset: -1px; border-radius: 28px; pointer-events: none;
  background: linear-gradient(135deg, rgba(233,166,166,0.12), transparent, rgba(217,140,147,0.08));
}
.capsule-lock-icon { font-size: 4rem; display: block; margin-bottom: 1.5rem; filter: drop-shadow(0 0 20px rgba(233,166,166,0.4)); }
.capsule-lock-icon.open { animation: capsuleReveal 1s cubic-bezier(0.23,1,0.32,1); }
@keyframes capsuleReveal { from{transform:scale(0) rotate(-180deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1} }
.capsule-title    { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 900; color: var(--sun-glow); margin-bottom: 0.5rem; }
.capsule-subtitle { font-size: 1rem; color: var(--text-dim); margin-bottom: 2rem; }
.capsule-countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; }
.capsule-cd-box {
  background: rgba(233,166,166,0.07); border: 1px solid rgba(233,166,166,0.15);
  border-radius: 10px; padding: 0.7rem 1.2rem; min-width: 68px; text-align: center;
}
.capsule-cd-num   { font-size: 1.4rem; font-weight: 700; color: var(--gold); display: block; }
.capsule-cd-label { font-size: 0.62rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.1em; }
.capsule-sealed   { font-size: 0.83rem; color: var(--text-mute); line-height: 1.7; margin-bottom: 2rem; font-style: italic; }
.capsule-content  { display: none; text-align: left; }
.capsule-content.open { display: block; animation: fadeUp 0.8s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.capsule-letter { background: rgba(233,166,166,0.04); border-radius: 12px; padding: 1.75rem; font-size: 0.94rem; line-height: 1.9; color: var(--text-dim); margin-bottom: 1.5rem; }
.capsule-letter p + p { margin-top: 0.9rem; }
.capsule-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 0.6rem; }
.capsule-photo  { border-radius: 8px; overflow: hidden; height: 125px; }
.capsule-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capsule-surprise { margin-top: 1.5rem; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.1rem; color: var(--gold); text-align: center; padding: 1rem; background: rgba(233,166,166,0.06); border-radius: 10px; }

/* ═══════════════════════════════════════════════════════════
   BIRTHDAY CELEBRATION — THE GOLDEN REVEAL
   ═══════════════════════════════════════════════════════════ */

#birthday-celebration {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: #FFF7FB;
  flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
#birthday-celebration.active { display: flex; }

#fireworks-container { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.bday-content { position: relative; z-index: 2; padding: 2rem; }
.bday-step { display: none; }
.bday-step.active { display: block; animation: fadeUp 0.8s ease; }

.bday-headline {
  font-family: 'Playfair Display', serif; font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 6rem); line-height: 1.1;
  color: var(--sun-glow);
  text-shadow: 0 0 80px rgba(233,166,166,0.5), 0 0 160px rgba(217,140,147,0.3);
  animation: goldenPulse 3s ease-in-out infinite;
}
@keyframes goldenPulse {
  0%,100% { text-shadow: 0 0 40px rgba(233,166,166,0.4), 0 0 100px rgba(217,140,147,0.2); }
  50%      { text-shadow: 0 0 80px rgba(233,166,166,0.7), 0 0 160px rgba(217,140,147,0.4); }
}

.bday-sub   { font-size: 1.15rem; color: var(--amber); margin-top: 1rem; font-family: 'Cormorant Garamond', serif; font-style: italic; }
.bday-skip  { position: absolute; bottom: 2rem; right: 2rem; font-size: 0.75rem; color: rgba(255,255,255,0.3); cursor: pointer; text-transform: uppercase; letter-spacing: 0.1em; }

/* Birthday Eve mode */
body.birthday-eve { background: #FFF7FB; }
body.birthday-eve #hero-video-wrap video { filter: saturate(0.3) brightness(0.3) sepia(0.2); }

/* Birthday mode banner */
.birthday-mode-banner {
  background: rgba(233,166,166,0.08);
  border: 1px solid rgba(233,166,166,0.2); border-radius: 12px;
  padding: 1rem 1.5rem; text-align: center; margin-bottom: 2rem; display: none;
  color: var(--sun-glow); font-size: 0.92rem;
}
body.birthday-mode .birthday-mode-banner { display: block; }

/* ═══════════════════════════════════════════════════════════
   EASTER EGG
   ═══════════════════════════════════════════════════════════ */

#easter-egg-trigger { position: fixed; bottom: 2rem; left: 1.5rem; z-index: 100; opacity: 0; pointer-events: none; width: 30px; height: 30px; }
#easter-egg-trigger.active { opacity: 1; pointer-events: all; }

#easter-egg-box {
  display: none; position: fixed; bottom: 5rem; left: 1.5rem; z-index: 1000;
  background: rgba(255,255,255,0.95); border: 1px solid rgba(240,111,154,0.12);
  border-radius: 14px; padding: 1.2rem; max-width: 280px;
  animation: cardReveal 0.4s cubic-bezier(0.23,1,0.32,1);
  box-shadow: var(--glow-storm);
}
#easter-egg-box.active { display: block; }
.egg-close { position: absolute; top: 0.7rem; right: 0.7rem; cursor: pointer; color: var(--text-mute); }
.egg-text  { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   FOOTER — After the Storm
   ═══════════════════════════════════════════════════════════ */

footer {
  background: linear-gradient(180deg, rgba(10,8,0,0) 0%, rgba(6,4,0,0.8) 100%);
  border-top: 1px solid rgba(233,166,166,0.08);
  padding: 4rem 1.5rem; text-align: center;
  position: relative; z-index: 5; overflow: hidden;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--amber), var(--gold), transparent);
}
.footer-heart { font-size: 2rem; display: block; margin-bottom: 1rem; animation: heartBeat 1.8s ease-in-out infinite; }
@keyframes heartBeat { 0%,100%{transform:scale(1)} 15%{transform:scale(1.3)} 30%{transform:scale(1)} 45%{transform:scale(1.12)} }
.footer-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--sun-glow); margin-bottom: 0.5rem; }
.footer-sub   { font-size: 0.83rem; color: var(--text-mute); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   UTILITIES & RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

.hidden          { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media(max-width:1024px){
  .dashboard-grid,
  .counter-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .chapters-list { gap: 0.75rem; }
  .chapter-header { padding: 1rem 1.2rem; }
  .chapter-content { padding: 0 1.2rem 1.4rem; }
  .jar-scene { max-width: 340px; height: 340px; padding: 1.4rem; }
  .jar-svg   { width: 210px; }
  .progress-ring-wrap { margin-top: 2rem; }
}

@media(max-width:820px){
  .dashboard-grid,
  .counter-grid { grid-template-columns: 1fr; }
  .dashboard-grid { gap: 1rem; }
  .counter-grid   { gap: 1rem; }
  .chapter-header { flex-wrap: wrap; gap: 0.8rem; }
  .chapter-date-label,
  .chapter-title { font-size: 0.95rem; }
  .jar-scene { max-width: 100%; height: 320px; }
  .jar-svg   { width: 190px; }
}

@media(max-width:640px){
  .hof-nav-btn   { display: none; }
  .letter-paper  { padding: 2rem 1.2rem; }
  .capsule-box   { padding: 2rem 1.2rem; }
  .quote-card    { padding: 2rem 1.2rem; }
  .dashboard-grid,
  .counter-grid { grid-template-columns: 1fr; }
  #music-player  { bottom: 1rem; right: 1rem; min-width: auto; }
  .mp-info       { display: none; }
  .mp-toggle     { display: none; }
}

/* Light love theme overrides */
::selection { background: rgba(240, 111, 154, 0.22); color: var(--rain-light); }

#fog-overlay {
  background: radial-gradient(
    ellipse 120% 42% at 50% 100%,
    rgba(255, 184, 108, 0.12) 0%,
    transparent 70%
  );
}

#loading-screen,
#birthday-celebration {
  background: linear-gradient(135deg, #FFF7FB 0%, #FFEAF1 55%, #FFF5E8 100%);
}

.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 247, 251, 0.2) 0%,
    rgba(255, 234, 241, 0.62) 55%,
    rgba(255, 247, 251, 0.94) 100%
  );
}

#hero-video-wrap video {
  filter: saturate(0.82) brightness(1.08);
  opacity: 0.42;
}

.hero-clouds {
  z-index: 4;
}

.cloud-drift {
  background: transparent;
  filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 111, 154, 0.16);
}

.cloud-drift::before {
  content: "\2661";
  font-family: 'Playfair Display', serif;
  font-size: clamp(7rem, 16vw, 16rem);
  line-height: 1;
  text-shadow: 0 20px 60px rgba(240, 111, 154, 0.16);
}

#music-player,
.cd-box,
.dash-card,
.chapter-item,
.quote-card,
.counter-card,
.letter-paper,
.vault-tab,
.vault-card,
.vault-modal-box,
.birthday-mode-banner,
#easter-egg-box {
  background-color: rgba(255, 255, 255, 0.88);
  border-color: rgba(240, 111, 154, 0.18);
}

#jar-reveal,
#vault-modal,
#star-modal {
  background: rgba(255, 255, 255, 0.96);
}

.stars-scene {
  background: radial-gradient(circle at 30% 30%, rgba(143, 110, 255, 0.12) 0%, rgba(20, 32, 64, 0.86) 35%, rgba(9, 13, 26, 0.98) 100%);
  box-shadow: 0 30px 80px rgba(2, 7, 25, 0.6), inset 0 0 50px rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(255,255,255,0.08);
}

.vault-tab.active,
.chapter-unlock-badge,
.quote-date-badge {
  background: rgba(123, 96, 255, 0.12);
  border-color: rgba(123, 96, 255, 0.22);
}

.flip-back {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 224, 234, 0.9));
}

.mp-disc-inner {
  background: #FFF7FB;
}

body.birthday-eve {
  background: #FFF7FB;
}

.capsule-box {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(240, 111, 154, 0.18);
  box-shadow: 0 20px 70px rgba(240, 111, 154, 0.12);
}

footer {
  background: linear-gradient(180deg, rgba(255, 247, 251, 0) 0%, rgba(255, 234, 241, 0.92) 100%);
  border-top-color: rgba(240, 111, 154, 0.16);
}
