/* =============================================================
   BIRTHDAY PREMIUM — STYLE SHEET
   Token system:
   Color   — ink #06060a, glass rgba(255,255,255,.05-.12),
             gold #C9A26D, gold-light #E8CFA0, rose #FF8FA3
   Type    — Playfair Display (display), Inter (body),
             Space Grotesk (numerals / labels)
   Layout  — single-column scroll narrative, floating glass chrome
   Signature — envelope wax-seal breaking into the starfield
   ============================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #06060a;
  --ink-soft: #0d0d16;
  --ink-elevated: #12121e;

  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);

  --gold: #c9a26d;
  --gold-light: #e8cfa0;
  --gold-dim: rgba(201, 162, 109, 0.35);
  --rose: #ff8fa3;
  --ice: #8fd8ff;

  --text: #f5f1e8;
  --text-muted: #9b95a8;
  --text-faint: #635f72;

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Grotesk", "Inter", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1080px;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

::selection { background: var(--gold-dim); color: var(--gold-light); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
img { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  color: var(--gold-light);
  background: var(--glass);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--gold-light);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Ambient layers ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 109, 0.10) 0%, rgba(201, 162, 109, 0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  will-change: transform;
  transition: opacity 0.4s ease;
}
@media (hover: none) { .cursor-glow { display: none; } }

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--ink);
}

/* =============================================================
   ENVELOPE GATE
   ============================================================= */
.envelope-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(201, 162, 109, 0.08), transparent 60%),
    var(--ink);
  transition: opacity 1s var(--ease-out), visibility 1s var(--ease-out);
}
.envelope-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 160px 40px rgba(0,0,0,0.75);
  pointer-events: none;
}

.envelope-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.envelope-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.envelope-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 3rem);
  background: linear-gradient(120deg, var(--gold-light), var(--gold) 60%, var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 48px;
}

/* Envelope object */
.envelope {
  position: relative;
  width: min(320px, 78vw);
  height: min(210px, 51vw);
  margin-bottom: 40px;
  cursor: pointer;
  perspective: 1200px;
}

.envelope-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(4px);
  transition: opacity 0.6s var(--ease-out);
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #171622, #0e0d16);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
}

.letter {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6%;
  height: 78%;
  background: linear-gradient(160deg, #fbf7ee, #f1e9d8);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 2;
  transform: translateY(0);
  transition: transform 1.1s var(--ease-out) 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.letter-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
  transform: translateX(-120%);
}
.letter-line {
  font-family: var(--font-display);
  font-style: italic;
  color: #6b5a3f;
  font-size: 0.85rem;
  padding: 0 14%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 58%;
  background: linear-gradient(155deg, #201f2d, #14131e);
  clip-path: polygon(0 0, 100% 0, 50% 92%);
  transform-origin: top center;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  z-index: 3;
  transition: transform 0.9s var(--ease-out);
  transform: rotateX(0deg);
}

.envelope-front {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 62%;
  background: linear-gradient(20deg, #1b1a27, #100f19);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 46%, 0 0);
  border: 1px solid var(--glass-border);
  border-top: none;
  z-index: 4;
}

.wax-seal {
  position: absolute;
  z-index: 5;
  width: 54px;
  height: 54px;
  transition: transform 0.5s var(--ease-soft), opacity 0.4s ease;
}
.wax-seal-svg circle {
  fill: url(#none);
  fill: var(--rose);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
.wax-seal-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 2.6rem;
  fill: rgba(255,255,255,0.85);
}

/* Open state choreography (JS toggles .is-open on #envelope) */
.envelope.is-open .envelope-flap {
  transform: rotateX(180deg);
  transition: transform 0.7s var(--ease-soft);
}
.envelope.is-open .wax-seal {
  opacity: 0;
  transform: scale(1.6) rotate(12deg);
}
.envelope.is-open .letter {
  transform: translateY(-64%);
  transition: transform 1s var(--ease-out) 0.25s;
}
.envelope.is-open .letter-line { opacity: 1; }
.envelope.is-open .letter-shimmer {
  animation: shimmer-sweep 1.1s ease 0.5s;
}
.envelope.is-open .envelope-shadow { opacity: 0.4; }

@keyframes shimmer-sweep {
  to { transform: translateX(120%); }
}

#sealBurst {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: transform 0.35s var(--ease-out), background 0.35s ease, box-shadow 0.35s ease;
}
.open-btn:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  box-shadow: 0 8px 30px rgba(201, 162, 109, 0.18);
}
.open-btn svg { transition: transform 0.3s ease; }
.open-btn:hover svg { transform: translateX(3px); }

.envelope-hint {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* =============================================================
   MAIN CONTENT SHELL
   ============================================================= */
.main-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.main-content.is-visible { opacity: 1; }

section { position: relative; padding: 0 24px; }

.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 14px;
  color: var(--text);
}
.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.glass-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
}

/* =============================================================
   DOT NAV
   ============================================================= */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dot-nav__item {
  position: relative;
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dot-nav__item span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.35s var(--ease-soft);
}
.dot-nav__item.active span {
  background: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-dim);
  transform: scale(1.6);
}
.dot-nav__item::before {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.dot-nav__item:hover::before { opacity: 1; }

@media (max-width: 860px) {
  .dot-nav { display: none; }
}

/* =============================================================
   MUSIC PLAYER
   ============================================================= */
.player {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.player:hover { background: var(--glass-strong); }

.player__toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player__vinyl svg { width: 22px; height: 22px; }
.vinyl-ring { fill: none; stroke: var(--gold); stroke-width: 1.4; }
.vinyl-core { fill: var(--gold-light); }
.player__vinyl {
  display: inline-flex;
  animation: spin 3.5s linear infinite;
  animation-play-state: paused;
}
.player.is-playing .player__vinyl { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

.player__bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}
.player__bars i {
  width: 2.5px;
  background: var(--gold-light);
  border-radius: 2px;
  height: 30%;
  opacity: 0.5;
}
.player.is-playing .player__bars i {
  opacity: 1;
  animation: bar-bounce 0.9s ease-in-out infinite;
}
.player__bars i:nth-child(1) { animation-delay: 0s; }
.player__bars i:nth-child(2) { animation-delay: 0.15s; }
.player__bars i:nth-child(3) { animation-delay: 0.3s; }
.player__bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes bar-bounce {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}

.player__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .player__label { display: none; }
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
}
.hero__glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(201,162,109,0.12), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.1;
  max-width: 900px;
  margin-bottom: 26px;
  min-height: 1.3em;
}
.hero__typed {
  background: linear-gradient(120deg, var(--text) 30%, var(--gold-light) 55%, var(--text) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine-text 6s linear infinite;
}
@keyframes shine-text {
  to { background-position: -200% center; }
}
.typed-cursor {
  color: var(--gold);
  opacity: 1;
}

.hero__subtitle {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 44px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 72px;
}
.hero__meta-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__meta-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold-light);
}
.hero__meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.hero__meta-divider { width: 1px; height: 32px; background: var(--glass-border); }

.hero__scroll {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--gold), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 100%;
  background: linear-gradient(var(--gold-light), transparent);
  animation: scroll-drip 2s ease-in-out infinite;
}
@keyframes scroll-drip {
  to { top: 100%; }
}

/* =============================================================
   STORY TIMELINE
   ============================================================= */
.story {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 120px;
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--glass-border);
  transform: translateX(-50%);
}
.timeline__line-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(var(--gold), var(--gold-light));
  transition: height 0.1s linear;
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 48px 90px 0;
  text-align: right;
}
.timeline__item--right {
  margin-left: 50%;
  padding: 0 0 90px 48px;
  text-align: left;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  top: 6px;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--gold);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.timeline__item--right .timeline__marker { right: auto; left: -5px; }
.timeline__item.is-active .timeline__marker {
  background: var(--gold-light);
  box-shadow: 0 0 14px var(--gold-dim);
}

.timeline__card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 26px 28px;
  transition: transform 0.4s var(--ease-out), border-color 0.4s ease;
}
.timeline__card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-dim);
}
.timeline__year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.timeline__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.timeline__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
}

@media (max-width: 720px) {
  .timeline__line { left: 6px; }
  .timeline__item,
  .timeline__item--right {
    width: 100%;
    margin-left: 0;
    padding: 0 0 60px 34px;
    text-align: left;
  }
  .timeline__marker,
  .timeline__item--right .timeline__marker {
    left: 1px;
    right: auto;
  }
}

/* =============================================================
   GALLERY
   ============================================================= */
.gallery {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 100px;
  padding-bottom: 120px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
}

.gallery__card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  grid-column: span 2;
  grid-row: span 2;
}
.gallery__card--wide { grid-column: span 2; grid-row: span 1; }
.gallery__card--tall { grid-row: span 3; }

.gallery__card img,
.gallery__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.gallery__fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(150deg, var(--ink-elevated), var(--ink-soft));
  color: var(--text-faint);
}
.gallery__fallback svg { opacity: 0.5; }
.gallery__fallback span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 10px;
}

.gallery__card:hover img,
.gallery__card:hover .gallery__fallback {
  transform: scale(1.08);
}

.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.35s ease;
}
.gallery__card:hover .gallery__caption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 780px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery__card, .gallery__card--wide, .gallery__card--tall { grid-column: span 1; grid-row: span 2; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 8, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 40px;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__content {
  max-width: 780px;
  max-height: 80vh;
  border-radius: 12px;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease-out);
}
.lightbox.is-open .lightbox__content { transform: scale(1); }
.lightbox__content img { width: 100%; height: 100%; object-fit: contain; }
.lightbox__close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================================
   WISH / LETTER
   ============================================================= */
.wish {
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 24px 120px;
  display: flex;
  justify-content: center;
}
.wish__glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,143,163,0.08), transparent 65%);
  z-index: -1;
}
.wish__card {
  max-width: 640px;
  padding: clamp(32px, 5vw, 64px);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  text-align: center;
  position: relative;
}
.wish__card::before {
  content: "“";
  position: absolute;
  top: 12px;
  left: 28px;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold-dim);
  line-height: 1;
}
.wish__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 24px;
}
.wish__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 28px;
}
.wish__from {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.wish__from span { color: var(--gold-light); }

/* =============================================================
   ENDING
   ============================================================= */
.ending {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 40px;
  overflow: hidden;
}
#fireworksCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.ending__content { position: relative; z-index: 1; }
.ending__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 20px;
}
.ending__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem);
  background: linear-gradient(120deg, var(--gold-light), var(--gold) 50%, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 22px;
}
.ending__desc {
  max-width: 480px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}
.ending__replay,
.ending__confetti {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(16px);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  margin: 0 6px 10px;
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}
.ending__replay:hover,
.ending__confetti:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
}

.footer {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}
.footer__heart { color: var(--rose); }

/* =============================================================
   RESPONSIVE FINE-TUNING
   ============================================================= */
@media (max-width: 560px) {
  .hero__meta { gap: 18px; }
  .wish__card { border-radius: 18px; }
  section { padding: 0 16px; }
  .story, .gallery, .wish { padding-left: 8px; padding-right: 8px; }
}
