/* ============================================================
   200天纪念日 · 样式文件
   ============================================================ */

/* ========================
   CSS Variables
   ======================== */
:root {
  --bg: #0f0a1f;
  --bg-alt: #1a1035;
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.15);
  --pink: #ff6fb7;
  --light-pink: #ffd1e8;
  --purple: #7a5af8;
  --lavender: #c3a9ff;
  --blue: #5ac8fa;
  --rose-gold: #f5c6a0;
  --peach: #ffb5b5;
  --text: #f8f8ff;
  --muted: rgba(248, 248, 255, 0.7);
  --shadow: 0 20px 60px rgba(15, 10, 31, 0.4);
  --shadow-glow: 0 0 40px rgba(255, 111, 183, 0.4);
  --gradient-primary: linear-gradient(120deg, var(--pink), var(--purple));
  --gradient-card: linear-gradient(160deg, rgba(255, 111, 183, 0.15), rgba(90, 200, 250, 0.08));
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ========================
   Base & Reset
   ======================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #1a1035, #080510 70%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

img { max-width: 100%; display: block; border-radius: 18px; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.7; color: var(--muted); margin: 0.2rem 0 1rem; }

/* ========================
   Countdown-only gate
   2026-03-15 之前仅展示倒计时卡片
   ======================== */
.is-countdown-only body > :not(main) {
  display: none !important;
}

.is-countdown-only main > :not(.countdown-section) {
  display: none !important;
}

.is-countdown-only .toc-sidebar,
.is-countdown-only .back-to-top,
.is-countdown-only .overlay {
  display: none !important;
}

.is-countdown-only main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.25rem 1.25rem;
}

.is-countdown-only .countdown-section {
  margin: 0 !important;
}

.is-countdown-only .countdown-card {
  width: min(760px, 100%);
}

main {
  padding: 0 1.5rem 4rem;
  max-width: 1100px;
  margin: -4rem auto 0;
  width: 100%;
  overflow-x: hidden;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0.5rem 0;
}

.eyebrow {
  color: var(--light-pink);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

section { margin-bottom: 4rem; }

/* ========================
   Petal Particles
   ======================== */
.petal-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  font-size: 16px;
  animation: petalFall linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 111, 183, 0.3));
}

@keyframes petalFall {
  0% {
    transform: translateY(-5vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% { opacity: 0.7; }
  50% { transform: translateY(50vh) translateX(30px) rotate(360deg); }
  92% { opacity: 0.5; }
  100% {
    transform: translateY(105vh) translateX(-20px) rotate(720deg);
    opacity: 0;
  }
}

/* ========================
   Hero Section
   ======================== */
.hero {
  text-align: center;
  padding: 8rem 1.5rem 10rem;
  background:
    linear-gradient(135deg, rgba(255, 111, 183, 0.2), rgba(122, 90, 248, 0.2)),
    url("./assets/images/hero-bg.png") center/cover;
  position: relative;
  isolation: isolate;
  width: 100vw;
  max-width: 100%;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 6, 20, 0.5) 0%, rgba(9, 6, 20, 0.8) 100%);
  z-index: -1;
}

.hero .eyebrow {
  animation: fadeInDown 1s ease-out 0.3s both;
}

.hero h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.8rem, 9vw, 5rem);
  margin: 0.5rem 0 0.8rem;
  background: linear-gradient(135deg, var(--light-pink), var(--pink), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInDown 1s ease-out 0.6s both;
  line-height: 1.2;
}

.hero .subtitle {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  animation: fadeInDown 1s ease-out 0.9s both;
  color: var(--muted);
}

.scroll-hint {
  animation: fadeInDown 1s ease-out 1.2s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.scroll-hint span {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--light-pink);
  border-bottom: 2px solid var(--light-pink);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* ========================
   Countdown Section
   ======================== */
.countdown-section {
  margin-bottom: 3rem;
}

.countdown-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
}

.countdown-card .eyebrow {
  margin-bottom: 1rem;
}

.countdown-label {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 1rem;
}

.countdown-gate-hint {
  margin: -0.4rem 0 1.2rem;
  font-size: 0.9rem;
  color: rgba(255, 209, 232, 0.92);
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(255, 111, 183, 0.25);
}

.countdown-gate-hint::before {
  content: "⏳ ";
  opacity: 0.9;
}

.countdown-digits {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.digit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.digit-value {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  min-width: 2.5ch;
  text-align: center;
}

.digit-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.digit-sep {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  color: var(--muted);
  align-self: flex-start;
  margin-top: 0.2rem;
}

.countdown-stats {
  display: flex;
  justify-content: space-between;
  margin: 1.2rem 0;
  padding: 0;
}

.countdown-stats div { text-align: left; }

.countdown-stats dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--light-pink);
}

.countdown-stats dd {
  font-size: 1.2rem;
  margin: 0.2rem 0 0;
  color: var(--text);
  font-weight: 600;
}

.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress div {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 0.8s ease;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 111, 183, 0.4);
}

.celebration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: rgba(255, 111, 183, 0.15);
  border: 1px solid rgba(255, 111, 183, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--light-pink);
  margin-top: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

/* ========================
   Statistics Section
   ======================== */
.stats-section .section-title { margin-bottom: 2rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-smooth), background 0.3s;
}

.stat-item:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================
   Timeline Section
   ======================== */
.timeline-section .section-title { margin-bottom: 3rem; }

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--pink), var(--purple), var(--blue));
  transform: translateX(-50%);
  border-radius: 999px;
  opacity: 0.6;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 2rem);
  text-align: right;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 2rem);
  text-align: left;
}

.timeline-item:nth-child(odd).visible {
  animation: slideInLeft 0.6s ease both;
}

.timeline-item:nth-child(even).visible {
  animation: slideInRight 0.6s ease both;
}

.timeline-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 20px rgba(255, 111, 183, 0.5);
  border: 3px solid var(--bg);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  width: 100%;
  transition: transform 0.3s ease, background 0.3s;
}

.timeline-content:hover {
  background: var(--card-hover);
  transform: scale(1.02);
}

.timeline-date {
  display: inline-flex;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
  color: var(--light-pink);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.timeline-icon {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  display: block;
}

.timeline-content h4 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.timeline-content p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.6;
}

/* ========================
   Gallery Section
   ======================== */
.gallery-section .section-title { margin-bottom: 2rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover { transform: scale(1.05); }
.gallery-item:nth-child(1) { grid-row: span 2; aspect-ratio: auto; }

.gallery-placeholder {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
}

.gallery-placeholder::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 0.8rem 0.8rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.gp-1 { background: linear-gradient(135deg, #ff88c2, #ff6fb7); }
.gp-2 { background: linear-gradient(135deg, #c3a9ff, #7a5af8); }
.gp-3 { background: linear-gradient(135deg, #8fd6ff, #5ac8fa); }
.gp-4 { background: linear-gradient(135deg, #f5c6a0, #e8a87c); }
.gp-5 { background: linear-gradient(135deg, #ffb5b5, #ff8a8a); }
.gp-6 { background: linear-gradient(135deg, #a0d8ef, #7ec8e3); }

.cards-section .section-title { margin-bottom: 2rem; }

.cards-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 860px;
  margin: 0 auto 1.25rem;
}

.cards-tab {
  background: rgba(255, 182, 193, 0.16);
  border: 1px solid rgba(255, 182, 193, 0.35);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cards-tab:hover {
  transform: translateY(-2px);
  background: rgba(255, 182, 193, 0.25);
}

.cards-tab.active {
  background: var(--gradient-primary);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-glow);
}

.cards-panels {
  max-width: 900px;
  margin: 0 auto;
}

.cards-panel {
  animation: fadeIn 0.35s var(--ease-smooth);
}

.menu-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
}

.menu-toolbar-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}

.menu-toolbar-icon { font-size: 1.1rem; }

.menu-recommend {
  text-align: center;
  margin: 0.9rem 0 1.2rem;
  font-size: 0.95rem;
  color: rgba(248, 248, 255, 0.78);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.menu-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 1.1rem 1.1rem 1.15rem;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
  overflow: hidden;
}

.menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 111, 183, 0.18), rgba(122, 90, 248, 0.1), rgba(90, 200, 250, 0.08));
  opacity: 0.85;
  pointer-events: none;
}

.menu-card > * { position: relative; }

.menu-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.11);
}

.menu-card.is-recommended {
  border-color: rgba(255, 111, 183, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 111, 183, 0.35), var(--shadow-glow);
  transform: translateY(-6px);
}

.menu-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.menu-name h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.menu-badge:hover {
  transform: scale(1.08);
}

/* 夯 — SSS tier */
.menu-badge.tier-sss {
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.28), rgba(255, 165, 0, 0.25));
  border: 1px solid rgba(255, 100, 50, 0.5);
  color: #ffcf44;
  text-shadow: 0 0 10px rgba(255, 160, 0, 0.5);
  box-shadow: 0 0 12px rgba(255, 100, 50, 0.2);
}

/* 顶级 — SS tier */
.menu-badge.tier-ss {
  background: linear-gradient(135deg, rgba(255, 210, 92, 0.22), rgba(255, 165, 0, 0.18));
  border: 1px solid rgba(255, 210, 92, 0.45);
  color: #ffd36b;
  text-shadow: 0 0 8px rgba(255, 210, 92, 0.35);
}

/* 人上人 — S tier */
.menu-badge.tier-s {
  background: linear-gradient(135deg, rgba(120, 180, 255, 0.2), rgba(160, 100, 255, 0.15));
  border: 1px solid rgba(140, 160, 255, 0.4);
  color: #a5c4ff;
  text-shadow: 0 0 8px rgba(140, 160, 255, 0.3);
}

/* NPC — A tier */
.menu-badge.tier-a {
  background: rgba(180, 220, 180, 0.12);
  border: 1px solid rgba(180, 220, 180, 0.3);
  color: rgba(200, 230, 200, 0.8);
}

/* Card tier left accent */
.menu-card.tier-sss { border-left: 3px solid rgba(255, 100, 50, 0.7); }
.menu-card.tier-ss  { border-left: 3px solid rgba(255, 210, 92, 0.55); }
.menu-card.tier-s   { border-left: 3px solid rgba(140, 160, 255, 0.45); }
.menu-card.tier-a   { border-left: 3px solid rgba(180, 220, 180, 0.3); }

.menu-meta {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  color: rgba(248, 248, 255, 0.68);
}

.menu-story {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(248, 248, 255, 0.78);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 0.25rem;
}

.note-card {
  position: relative;
  border-radius: 16px;
  padding: 1.25rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.96), rgba(255, 248, 235, 0.92));
  color: #1f1825;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth);
  overflow: hidden;
}

.note-card > * { position: relative; z-index: 1; }

.note-card:hover {
  transform: rotate(var(--rot, 0deg)) translateY(-4px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.26);
}

.note-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02) 1px, transparent 1px, transparent 22px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}

.note-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 28px;
  transform: translateX(-50%) rotate(var(--tape-rot, -2deg));
  background: var(--tape, rgba(255, 182, 193, 0.42));
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.note-tape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22) 2px, transparent 2px, transparent 10px);
  opacity: 0.55;
  border-radius: 6px;
}

.note-sticker {
  position: absolute;
  right: 0.85rem;
  bottom: 0.8rem;
  font-size: 1.2rem;
  transform: rotate(6deg);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.note-text {
  position: relative;
  margin: 0.2rem 0 0;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.2rem;
  line-height: 1.55;
  letter-spacing: 0.4px;
  transform: rotate(var(--text-rot, 0.4deg));
  color: #1b1422;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.tape-pink { --tape: rgba(255, 182, 193, 0.5); --tape-rot: -3deg; }
.tape-lavender { --tape: rgba(195, 169, 255, 0.48); --tape-rot: 2deg; }
.tape-blue { --tape: rgba(160, 216, 239, 0.55); --tape-rot: -1deg; }
.tape-peach { --tape: rgba(245, 198, 160, 0.52); --tape-rot: 1deg; }

@media (max-width: 640px) {
  .menu-toolbar { flex-direction: column; align-items: stretch; }
  .menu-toolbar-title { justify-content: center; }
  .menu-grid, .notes-grid { grid-template-columns: 1fr; }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.lightbox.active { display: flex; }

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 18px;
  overflow: hidden;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

/* ========================
   Playlist Section
   ======================== */
.playlist { padding: 0; }

.music-player-container {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 600px;
  margin: 0 auto;
}

.music-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
}

.music-tab {
  background: rgba(255, 182, 193, 0.2);
  border: 1px solid rgba(255, 182, 193, 0.5);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  white-space: nowrap;
  color: #555;
}

.music-tab:hover {
  background: rgba(255, 182, 193, 0.4);
  transform: translateY(-2px);
}

.music-tab.active {
  background: linear-gradient(45deg, #ffb6c1, #ff69b4);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.music-player { text-align: center; }

.current-song-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 1rem;
}

#audioPlayer { width: 100%; outline: none; }

/* ========================
   Interactive Section
   ======================== */
.interactive-section .section-title { margin-bottom: 2rem; }

.interactive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.interactive-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-bounce);
  backdrop-filter: blur(8px);
}

.interactive-card:hover {
  background: var(--card-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 10, 31, 0.5);
  border-color: rgba(255, 255, 255, 0.25);
}

.interactive-card .card-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.8rem;
}

.interactive-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.interactive-card p {
  font-size: 0.8rem;
  margin: 0;
  color: var(--muted);
}

/* ========================
   Overlay Base
   ======================== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 6, 20, 0.95);
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.3s ease;
}

.overlay.active { display: block; }

.overlay-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.overlay-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.overlay-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.overlay-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================
   Quiz Overlay
   ======================== */
.quiz-progress {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.quiz-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.quiz-progress-bar div {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.quiz-question {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-weight: 600;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.quiz-option {
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.quiz-option:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

.quiz-option.correct {
  background: rgba(72, 199, 142, 0.2);
  border-color: #48c78e;
  color: #48c78e;
}

.quiz-option.wrong {
  background: rgba(255, 99, 99, 0.2);
  border-color: #ff6363;
  animation: shake 0.4s ease;
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.quiz-explanation {
  padding: 1rem;
  background: rgba(255, 111, 183, 0.1);
  border-radius: 12px;
  border-left: 3px solid var(--pink);
  font-size: 0.85rem;
  color: var(--light-pink);
  margin-bottom: 1.5rem;
  display: none;
}

.quiz-explanation.show { display: block; animation: fadeInUp 0.3s ease; }

.quiz-next-btn,
.quiz-result-btn {
  padding: 0.8rem 2rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: none;
  margin: 0 auto;
}

.quiz-next-btn.show,
.quiz-result-btn.show { display: block; }

.quiz-next-btn:hover,
.quiz-result-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 111, 183, 0.4);
}

.quiz-result {
  text-align: center;
  display: none;
}

.quiz-result.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

.quiz-score {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.quiz-comment {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ========================
   Hearts Overlay
   ======================== */
.hearts-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 1rem auto;
  user-select: none;
}

.hearts-row {
  display: flex;
  gap: 2px;
}

.heart-cell {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.2;
  transition: all 0.3s var(--ease-bounce);
  border-radius: 4px;
}

.heart-cell.lit {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 111, 183, 0.6));
  transform: scale(1.15);
  animation: heartPop 0.4s var(--ease-bounce);
}

.heart-cell.empty {
  pointer-events: none;
  visibility: hidden;
}

.hearts-counter {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hearts-counter span {
  color: var(--pink);
  font-weight: 700;
  font-size: 1.2rem;
}

.hearts-love-text {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 111, 183, 0.1);
  border-radius: 12px;
  margin-top: 1rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--light-pink);
  font-style: italic;
  transition: all 0.3s ease;
}

@keyframes heartPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1.15); }
}

/* ========================
   Wish Bottle Overlay
   ======================== */
.wish-bottle-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  overflow: hidden;
  position: relative; /* 辅助定位 */
}

/* 将预设愿望区绝对定位在顶部，或者固定高度 */
.preset-wishes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  /* 固定高度，比如大概3行的高度，确保即使标签消失也不改变布局 */
  height: 100px; 
  align-content: flex-start; /* 标签从顶部开始排列 */
  margin-bottom: 0;
  overflow-y: auto; /* 如果标签太多可以滚动 */
}

/* 瓶子容器使用绝对定位或flex剩余空间，确保位置固定 */
.bottle-container {
  position: relative;
  width: 200px;
  height: 300px;
  /* 使用 margin-top auto 把它推到底部，或者用绝对定位居中 */
  margin: auto; 
  flex-shrink: 0;
}

.bottle-svg {
  width: 100%;
  height: 100%;
}

.wish-cards-container {
  position: absolute;
  bottom: 30px;
  left: 30px;
  right: 30px;
  top: 80px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 111, 183, 0.3) transparent;
}

.wish-cards-container::-webkit-scrollbar {
  width: 4px;
}

.wish-cards-container::-webkit-scrollbar-thumb {
  background: rgba(255, 111, 183, 0.3);
  border-radius: 4px;
}

.wish-cards-container::-webkit-scrollbar-track {
  background: transparent;
}

.wish-card {
  padding: 0.4rem 0.6rem;
  background: rgba(255, 111, 183, 0.2);
  border: 1px solid rgba(255, 111, 183, 0.3);
  border-radius: 8px;
  font-size: 0.65rem;
  color: var(--light-pink);
  text-align: center;
  animation: wishFloat 0.8s var(--ease-bounce) both;
  flex-shrink: 0;
  word-break: break-all;
}

@keyframes wishFloat {
  from { transform: translateY(40px) scale(0.5); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.wish-input-area {
  width: 100%;
  max-width: 400px;
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  padding-bottom: 1rem;
}

.wish-input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.wish-input:focus {
  border-color: var(--pink);
}

.wish-input::placeholder {
  color: var(--muted);
}

.wish-submit {
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  white-space: nowrap;
}

.wish-submit:hover { transform: translateY(-2px); }



.preset-wish {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-wish:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* ========================
   Love Letter Section
   ======================== */
.letter-section.is-hidden {
  display: none;
}

.letter-section .card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.letter-section .card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.letter-section .eyebrow { margin-bottom: 0.5rem; }

.letter-section h2 {
  font-family: "Ma Shan Zheng", cursive;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 0 0 1.5rem;
  color: var(--text);
}

.letter-section .letter-body p {
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  line-height: 1.85;
  text-indent: 2em;
  opacity: 1;
  transform: none;
}

.letter-signature {
  text-align: right;
  margin-top: 2rem;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.2rem;
  color: var(--pink);
}

.typewriter-active::after {
  content: "▍";
  margin-left: 2px;
  color: rgba(255, 209, 232, 0.95);
  animation: twBlink 0.9s steps(1, end) infinite;
}

@keyframes twBlink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

/* ========================
   Poster Section
   ======================== */
.poster-section .section-title { margin-bottom: 2rem; }

.poster-builder {
  max-width: 980px;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.poster-preview {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
}

.poster-preview canvas {
  width: 100%;
  display: block;
}

.poster-panel {
  padding: 1.6rem;
}

.poster-panel-head h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.poster-panel-sub {
  margin: 0.35rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.poster-fields {
  display: grid;
  gap: 0.9rem;
}

.poster-field {
  display: grid;
  gap: 0.45rem;
}

.poster-field > span {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.poster-field select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 10, 31, 0.72);
  color: var(--text);
  appearance: none;
  outline: none;
  color-scheme: dark;
}

.poster-field select option,
.poster-field select optgroup {
  background: var(--bg);
  color: var(--text);
}

.poster-field select:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(15, 10, 31, 0.84);
}

.poster-field select:focus {
  border-color: rgba(255, 111, 183, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 111, 183, 0.18);
}

.poster-badges {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.poster-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(122, 90, 248, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  white-space: nowrap;
}

.poster-badge strong {
  font-weight: 800;
  color: rgba(255, 209, 232, 0.95);
}

.poster-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 0.85rem 2rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(255, 111, 183, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 111, 183, 0.5);
}

.btn-ghost {
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 920px) {
  .poster-builder {
    grid-template-columns: 420px 1fr;
    align-items: stretch;
  }

  .poster-preview {
    margin: 0;
    max-width: none;
  }
}

/* ========================
   Footer
   ======================== */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(15, 10, 31, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.heart-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.heart-divider::before,
.heart-divider::after {
  content: "";
  flex: 1;
  height: 1px;
}

.heart-divider::before {
  background: linear-gradient(to right, transparent, var(--pink));
}

.heart-divider::after {
  background: linear-gradient(to left, transparent, var(--pink));
}

.heart-divider .heart-icon {
  color: var(--pink);
  font-size: 1.8rem;
  margin: 0 1rem;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

footer p {
  font-size: 1.1rem;
  color: var(--light-pink);
  margin: 0 0 1.5rem;
  font-weight: 500;
}

.footer-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.footer-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  opacity: 0.7;
}

.footer-dots span:nth-child(1) { background: var(--pink); }
.footer-dots span:nth-child(2) { background: var(--purple); animation: pulse 2s infinite; }
.footer-dots span:nth-child(3) { background: var(--blue); animation: pulse 2s infinite 0.5s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ========================
   TOC Sidebar
   ======================== */
.toc-sidebar {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
  max-width: calc(100vw - 2rem);
}

.toc-sidebar.visible {
  opacity: 1;
  pointer-events: auto;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: min(200px, calc(100vw - 3rem));
  backdrop-filter: blur(12px);
}

.toc-item button {
  width: 100%;
  padding: 0.35rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.toc-item button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.toc-item.active button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px 0 0 8px;
  width: 24px; height: 40px;
  cursor: pointer;
  z-index: 11;
  color: var(--text);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

/* ========================
   Back to Top
   ======================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(255, 111, 183, 0.4);
  display: grid;
  place-items: center;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ========================
   Confetti
   ======================== */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ========================
   Animations
   ======================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ========================
   Scroll Reveal
   ======================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
  main { padding: 0 1rem 3rem; }

  .hero { padding: 6rem 1.5rem 8rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 20px; }

  .timeline-node { left: 20px; }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-right: 0;
    padding-left: 50px;
    text-align: left;
  }

  .timeline-item:nth-child(odd).visible,
  .timeline-item:nth-child(even).visible {
    animation: fadeInUp 0.6s ease both;
  }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(1) { grid-row: span 1; }

  .interactive-grid { gap: 1rem; }

  .music-tabs { font-size: 0.8rem; }
  .music-tab { padding: 0.4rem 0.8rem; }

  .toc-sidebar { right: 0.5rem; }

  .toc-list {
    max-height: 60vh;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4rem 1rem 6rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .countdown-digits { gap: 0.4rem; }

  .digit-value { font-size: clamp(1.6rem, 5vw, 2.5rem); }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .stat-item { padding: 1rem 0.8rem; }

  .interactive-grid {
    grid-template-columns: 1fr;
  }

  .heart-cell {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .card { padding: 1.5rem 1rem; }

  .letter-section .letter-body p {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  footer { padding: 2rem 1rem; }

  .back-to-top { bottom: 1rem; right: 1rem; }

  .poster-preview { max-width: 100%; }
}
