/* ============================================================
   深空星河 · 样式
   ============================================================ */

:root {
  --bg: #05060e;
  --bg-2: #0a0b1a;
  --ink: #f4efe6;
  --ink-soft: rgba(244, 239, 230, 0.72);
  --muted: rgba(244, 239, 230, 0.45);
  --faint: rgba(244, 239, 230, 0.22);
  --gold: #f0cf94;
  --gold-deep: #d9ae63;
  --violet: #9b8ae6;
  --blue: #6d8fe0;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --line: rgba(240, 207, 148, 0.16);
  --line-soft: rgba(255, 255, 255, 0.08);

  --font-display: 'Cormorant Garamond', 'Noto Serif SC', 'Songti SC', serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-hand: 'Ma Shan Zheng', 'Noto Serif SC', cursive;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
canvas { display: block; }

::selection { background: rgba(240, 207, 148, 0.28); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #05060e; }
::-webkit-scrollbar-thumb { background: rgba(240, 207, 148, 0.22); border-radius: 8px; }

/* ============================================================
   背景
   ============================================================ */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, #10122b 0%, #070814 45%, #05060e 100%);
}

.sky-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite alternate;
}
.sky-glow--1 {
  width: 60vw; height: 60vw; left: -18vw; top: -12vw;
  background: radial-gradient(circle, rgba(96, 74, 190, 0.55), transparent 68%);
}
.sky-glow--2 {
  width: 54vw; height: 54vw; right: -16vw; top: 24vh;
  background: radial-gradient(circle, rgba(60, 96, 200, 0.42), transparent 68%);
  animation-delay: -9s;
}
.sky-glow--3 {
  width: 46vw; height: 46vw; left: 18vw; bottom: -20vw;
  background: radial-gradient(circle, rgba(190, 140, 90, 0.22), transparent 70%);
  animation-delay: -16s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vw, -3vh, 0) scale(1.12); }
}

.sky-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

/* ============================================================
   进入页
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #0b0d1e 0%, #05060e 70%);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
  text-align: center;
  padding: 24px;
}
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-inner { max-width: 520px; }

.intro-eyebrow {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.55em;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 26px;
}

.intro-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.16em;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 0%, #f0cf94 70%, #b8914f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro-sub {
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-bottom: 48px;
}

.intro-btn {
  position: relative;
  padding: 16px 44px;
  border: 1px solid rgba(240, 207, 148, 0.4);
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gold);
  background: rgba(240, 207, 148, 0.04);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), transform 0.4s var(--ease);
  overflow: hidden;
}
.intro-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(240, 207, 148, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
}
.intro-btn:hover {
  background: rgba(240, 207, 148, 0.1);
  box-shadow: 0 0 40px rgba(240, 207, 148, 0.18);
  transform: translateY(-1px);
}
.intro-btn:hover::after { opacity: 1; }
.intro-btn:active { transform: translateY(0); }

.intro-tip {
  margin-top: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--faint);
}

/* ============================================================
   导航
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 52px);
  background: linear-gradient(180deg, rgba(5, 6, 14, 0.85), rgba(5, 6, 14, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(5, 6, 14, 0.82);
  border-bottom-color: var(--line-soft);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
  line-height: 1;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 34px);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.4s;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.45s var(--ease);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
}

#universe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
#universe-canvas:active { cursor: grabbing; }

.hero-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(84vw, 620px);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.hero-center::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 132%; height: 130%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(5, 6, 14, 0.55) 0%, rgba(5, 6, 14, 0.32) 38%, transparent 66%);
  z-index: -1;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 20px;
}

.hero-names {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.32rem, 5.6vw, 3.4rem);
  letter-spacing: 0.08em;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 20px);
  flex-wrap: wrap;
  pointer-events: auto;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  background: linear-gradient(180deg, #fffdf8 0%, #f0cf94 62%, #b8914f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(240, 207, 148, 0.22));
}
.hero-names i {
  font-style: normal;
  font-size: 0.44em;
  color: rgba(240, 207, 148, 0.5);
  -webkit-text-fill-color: rgba(240, 207, 148, 0.5);
  transform: translateY(-0.05em);
}

.hero-line {
  margin-top: 22px;
  font-size: clamp(0.78rem, 1.6vw, 0.92rem);
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  line-height: 2;
}

.hero-hint {
  position: absolute;
  left: 50%; bottom: 30px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--faint);
  pointer-events: none;
}
.scroll-dot {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, rgba(240, 207, 148, 0.6), transparent);
  position: relative;
}
.scroll-dot::after {
  content: '';
  position: absolute;
  left: -2px; top: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: scrollDot 2.4s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(42px); opacity: 0; }
}

/* ============================================================
   通用 section
   ============================================================ */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 13vh, 160px) clamp(20px, 5vw, 48px);
}

.wrap { max-width: 1000px; margin: 0 auto; }
.wrap--wide { max-width: 1280px; }

.sec-eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold);
  opacity: 0.6;
  text-align: center;
  margin-bottom: 14px;
}

.sec-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-align: center;
  color: #fffdf8;
  margin-bottom: 14px;
}

.sec-lead {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #d4cce2;
  margin-bottom: clamp(38px, 6vh, 66px);
}

/* 进场动画 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   计时
   ============================================================ */
.counter { text-align: center; }

.clock { margin: clamp(30px, 6vh, 52px) 0 0; }

.clock-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
}
.clock-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4rem, 13vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fffdf8 0%, #f0cf94 55%, #a98243 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(240, 207, 148, 0.18));
  font-variant-numeric: tabular-nums;
}
.clock-unit {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.3em;
  color: var(--muted);
}

.clock-sub {
  margin-top: 14px;
  font-size: clamp(0.76rem, 1.6vw, 0.88rem);
  letter-spacing: 0.34em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.countdown {
  margin: clamp(48px, 8vh, 76px) auto 0;
  max-width: 560px;
  padding: 30px clamp(20px, 4vw, 38px) 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.countdown::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(240, 207, 148, 0.35), transparent 40%, transparent 60%, rgba(155, 138, 230, 0.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.countdown-label {
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: #f4dfba;
  margin-bottom: 22px;
}

.countdown-row {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 40px);
}
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cd-cell b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.cd-cell em {
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: #c4b9d2;
}

.countdown-progress {
  margin-top: 24px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.countdown-progress i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), #fff4d8);
  box-shadow: 0 0 12px rgba(240, 207, 148, 0.6);
  transition: width 1s linear;
}

.counter-note {
  margin-top: 34px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ============================================================
   时间轴
   ============================================================ */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(240, 207, 148, 0.35) 8%, rgba(240, 207, 148, 0.35) 92%, transparent);
}

.tl-item {
  position: relative;
  padding: 0 0 clamp(38px, 6vh, 60px) 12px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -27px; top: 9px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--gold);
  box-shadow: 0 0 12px rgba(240, 207, 148, 0.5);
}
.tl-item:last-child { padding-bottom: 0; }

.tl-date {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.26em;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 8px;
}
.tl-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  letter-spacing: 0.08em;
  color: #fffdf8;
  margin-bottom: 8px;
}
.tl-text {
  font-size: clamp(0.94rem, 2.5vw, 1.02rem);
  font-weight: 400;
  line-height: 1.85;
  color: #e1dbe9;
  letter-spacing: 0.025em;
  max-width: 560px;
}
.tl-photo {
  margin-top: 16px;
  width: min(320px, 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.tl-photo img { width: 100%; display: block; }

/* ============================================================
   3D 地球
   ============================================================ */
.globe-stage {
  position: relative;
  width: 100%;
  height: min(88vh, 840px);
  min-height: 480px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse at 50% 46%, rgba(40, 48, 110, 0.35), transparent 62%),
    #04050c;
}

#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
#globe-canvas:active { cursor: grabbing; }

.globe-markers { position: absolute; inset: 0; pointer-events: none; }

.marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.marker-dot {
  position: relative;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(240, 207, 148, 0.9), 0 0 32px rgba(240, 207, 148, 0.45);
}
.marker-dot::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(240, 207, 148, 0.7);
  animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
  0% { width: 11px; height: 11px; opacity: 0.9; }
  75%, 100% { width: 44px; height: 44px; opacity: 0; }
}
.marker-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 11px);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--ink-soft);
  text-shadow: 0 2px 10px #000, 0 0 14px #000;
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.marker:hover .marker-label,
.marker.is-hover .marker-label,
.marker.is-active .marker-label { opacity: 1; transform: translateX(-50%); }
.marker:hover .marker-dot,
.marker.is-hover .marker-dot,
.marker.is-active .marker-dot {
  background: #fff6e0;
  box-shadow: 0 0 20px rgba(255, 246, 224, 0.95), 0 0 44px rgba(240, 207, 148, 0.6);
}

.globe-hint {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--faint);
  white-space: nowrap;
  pointer-events: none;
}

.place-card {
  position: absolute;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 26px);
  width: min(300px, 66vw);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(10, 11, 26, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: cardIn 0.55s var(--ease);
  z-index: 4;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.place-card[hidden] { display: none; }

.place-close {
  position: absolute;
  right: 8px; top: 6px;
  z-index: 2;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.4);
  transition: color 0.3s, background 0.3s;
}
.place-close:hover { color: var(--gold); background: rgba(0, 0, 0, 0.7); }

.ph-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s, opacity 0.3s;
  opacity: 0.9;
}
.ph-nav:hover { background: rgba(0, 0, 0, 0.7); }
.ph-nav[hidden] { display: none; }
.ph-prev { left: 8px; }
.ph-next { right: 8px; }

.ph-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.place-photo {
  position: relative;
  height: 130px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #10132a;
}
.place-photo.is-empty {
  background-image:
    radial-gradient(circle at 30% 30%, rgba(240, 207, 148, 0.18), transparent 55%),
    radial-gradient(circle at 72% 68%, rgba(155, 138, 230, 0.22), transparent 55%);
}
.place-body { padding: 16px 18px 18px; }
.place-date {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 4px;
}
.place-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #fffdf8;
  margin-bottom: 6px;
}
.place-note { font-size: 0.78rem; color: var(--muted); line-height: 1.7; }

.globe-empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--line-soft);
  border-radius: 18px;
  margin-top: 20px;
}
.globe-empty p { color: var(--ink-soft); letter-spacing: 0.16em; margin-bottom: 8px; }
.globe-empty span { font-size: 0.76rem; color: var(--faint); letter-spacing: 0.08em; }
.globe-empty[hidden] { display: none; }

/* ============================================================
   情书
   ============================================================ */
.letter {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 207, 148, 0.07), transparent 55%),
    var(--glass);
  overflow: hidden;
  transition: box-shadow 0.7s var(--ease), border-color 0.7s;
}
.letter.is-open {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 60px rgba(240, 207, 148, 0.08);
  border-color: rgba(240, 207, 148, 0.3);
}

.letter-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 86px 20px 78px;
  max-height: 420px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.45s, transform 0.6s var(--ease),
              max-height 0.7s var(--ease), padding 0.7s var(--ease);
}
.letter.is-open .letter-seal {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.seal-heart svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  display: block;
}

.seal-heart {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #f6dcae;
  background: radial-gradient(circle at 34% 30%, #c4453f, #7b1f21 70%);
  box-shadow: 0 0 0 1px rgba(255, 220, 180, 0.35) inset, 0 12px 34px rgba(150, 40, 40, 0.45);
  animation: sealBeat 3.4s ease-in-out infinite;
}
@keyframes sealBeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.09); }
  24% { transform: scale(0.99); }
  36% { transform: scale(1.05); }
}
.seal-hint { font-size: 0.74rem; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--faint); }

.letter-paper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 clamp(24px, 6vw, 56px);
  transition: max-height 1.1s var(--ease), opacity 0.9s 0.15s, padding 0.6s;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 37px, rgba(240, 207, 148, 0.055) 37px, rgba(240, 207, 148, 0.055) 38px);
}
.letter.is-open .letter-paper {
  max-height: 2600px;
  opacity: 1;
  padding: 52px clamp(24px, 6vw, 56px) 56px;
}

.letter-to {
  font-family: var(--font-hand);
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.letter-body p {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(0.88rem, 2vw, 0.98rem);
  line-height: 2.15;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 20px;
  text-indent: 2em;
  opacity: 0;
}
.letter.is-open .letter-body p {
  animation: letterLine 1s var(--ease) forwards;
}
.letter.is-open .letter-body p:nth-child(1) { animation-delay: 0.35s; }
.letter.is-open .letter-body p:nth-child(2) { animation-delay: 0.75s; }
.letter.is-open .letter-body p:nth-child(3) { animation-delay: 1.15s; }
.letter.is-open .letter-body p:nth-child(4) { animation-delay: 1.55s; }
.letter.is-open .letter-body p:nth-child(5) { animation-delay: 1.95s; }
.letter.is-open .letter-body p:nth-child(6) { animation-delay: 2.35s; }
.letter.is-open .letter-body p:nth-child(7) { animation-delay: 2.75s; }
.letter.is-open .letter-body p:nth-child(8) { animation-delay: 3.15s; }
@keyframes letterLine {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.letter-body p.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px; height: 1em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--gold);
  animation: caret 0.9s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.letter-sign {
  margin-top: 34px;
  text-align: right;
  font-family: var(--font-hand);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* ============================================================
   footer
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(60px, 9vh, 100px) 24px clamp(46px, 7vh, 70px);
  border-top: 1px solid var(--line-soft);
}
.footer-line {
  font-family: var(--font-hand);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 10px;
}
.footer-small { font-size: 0.7rem; letter-spacing: 0.24em; color: var(--faint); }

/* ============================================================
   照片大图
   ============================================================ */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 10, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.4s var(--ease);
}
.photo-modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.photo-modal figure {
  max-width: min(860px, 92vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.photo-modal img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}
.photo-modal figcaption {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-align: center;
}
.photo-modal-close {
  position: absolute;
  right: 24px; top: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  transition: color 0.3s, border-color 0.3s, transform 0.3s;
}
.photo-modal-close:hover { color: var(--gold); border-color: var(--line); transform: rotate(90deg); }

/* ============================================================
   音乐按钮
   ============================================================ */
.music-btn {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 95;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 9, 20, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease);
}
.music-btn:hover { border-color: rgba(240, 207, 148, 0.5); box-shadow: 0 0 26px rgba(240, 207, 148, 0.18); transform: translateY(-2px); }

.music-bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music-bars i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0.55;
  transition: opacity 0.3s;
}
.music-btn.is-playing .music-bars i { opacity: 1; animation: bars 1s ease-in-out infinite; }
.music-btn.is-playing .music-bars i:nth-child(1) { animation-delay: 0s; }
.music-btn.is-playing .music-bars i:nth-child(2) { animation-delay: 0.18s; }
.music-btn.is-playing .music-bars i:nth-child(3) { animation-delay: 0.36s; }
@keyframes bars {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

/* ============================================================
   撒花
   ============================================================ */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 140;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.confetti-canvas.is-on { opacity: 1; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .wrap--wide { padding: 0; }
  .letter-paper { transition: max-height 0.9s var(--ease), opacity 0.8s 0.1s, padding 0.5s; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 60px; }
  .nav { padding: 10px 14px; gap: 10px; }
  .nav-logo { font-size: 1.3rem; flex: 0 0 auto; }
  .nav-links {
    gap: 10px;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-end;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .hero { min-height: 560px; }
  .hero-center { width: 90vw; }
  .hero-line { letter-spacing: 0.08em; line-height: 1.9; }
  .hero-hint { bottom: 20px; font-size: 0.62rem; }

  .section { padding: 76px 18px; }
  .sec-lead { margin-bottom: 30px; }

  .countdown { padding: 26px 18px 22px; border-radius: 18px; }
  .countdown-row { gap: 16px; }

  .timeline { padding-left: 22px; }
  .tl-item::before { left: -21px; }

  .globe-stage { height: 72vh; min-height: 420px; border-radius: 20px; }
  .place-card { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .place-photo { height: 108px; }

  .letter-paper { padding-left: 22px; padding-right: 22px; }
  .letter.is-open .letter-paper { padding: 40px 22px 44px; }

  .photo-modal-close { right: 14px; top: 14px; }
}

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

.hero-center { top: 45%; }
.hero-center::before {
  background: radial-gradient(ellipse, rgba(5, 6, 14, .82), rgba(5, 6, 14, .42) 42%, transparent 73%);
}
.hero-action {
  display: inline-flex;
  gap: .65em;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 20px;
  color: var(--gold);
  border: 1px solid rgba(240, 207, 148, .35);
  border-radius: 999px;
  background: #141020;
  text-decoration: none;
  font-size: .82rem;
  pointer-events: auto;
}
.hero-action:hover { border-color: var(--gold); }
.globe-stage { box-shadow: none; }
button.letter-seal {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.seal-icon { display: block; }
@media (max-width: 600px) {
  .hero-center { top: 43%; width: min(88vw, 28rem); }
  .hero-names { font-size: clamp(1.55rem, 6.8vw, 2.4rem); gap: .35em; }
  .hero-line { margin-top: 14px; }
  .music-btn {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

.photo-browser:not([hidden]) {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--ink-soft);
  font-size: .85rem;
}
.photo-browser button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #181322;
  color: var(--gold);
  cursor: pointer;
}
.photo-modal figure:has(.photo-browser:not([hidden])) img {
  max-height: 66vh;
}
