/* ============================================================
   K & L 情侣小站 · 「爱情信笺」设计系统
   米色信纸 × 玫瑰木红 × 金色邮戳
   ============================================================ */

/* ============ Design Tokens ============ */
:root {
  /* 纸张与表面 */
  --paper: #FBF6F0;
  --paper-deep: #F4EAE1;
  --surface: #FFFDFB;
  --surface-blush: #F9E9E5;

  /* 文字 */
  --ink: #43333A;
  --ink-soft: #6E5A62;
  --ink-mute: #9A8790;

  /* 主色（玫瑰木红）与点缀（金） */
  --rose: #B4485A;
  --rose-deep: #963B4C;
  --rose-tint: #F6E3E6;
  --gold: #C2A05E;
  --gold-deep: #A8853F;

  /* 边框与阴影 */
  --border: #EADCD2;
  --border-strong: #D8C3B4;
  --shadow-sm: 0 1px 3px rgba(67, 51, 58, .08), 0 1px 2px rgba(67, 51, 58, .06);
  --shadow-md: 0 6px 18px rgba(67, 51, 58, .10), 0 2px 6px rgba(67, 51, 58, .06);
  --shadow-lg: 0 16px 40px rgba(67, 51, 58, .14);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 999px;

  /* 字体 */
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-hand: 'Ma Shan Zheng', 'Kaiti SC', 'STKaiti', 'KaiTi', cursive;
  --font-num: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;

  /* 字号（流式） */
  --fs-display: clamp(3.4rem, 2.2rem + 6vw, 6.2rem);
  --fs-h2: clamp(1.7rem, 1.3rem + 2vw, 2.5rem);
  --fs-num: clamp(2.6rem, 1.8rem + 4vw, 4.4rem);
  --fs-body: clamp(1rem, .95rem + .25vw, 1.125rem);
  --fs-small: clamp(.85rem, .82rem + .15vw, .95rem);
  --fs-caption: .75rem;

  /* 间距（8px 系统） */
  --sp-1: .25rem;  --sp-2: .5rem;  --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem; --sp-8: 2rem;   --sp-10: 2.5rem;
  --sp-12: 3rem;   --sp-16: 4rem;  --sp-20: 5rem;  --sp-24: 6rem;

  /* 动效 */
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-slow: 320ms;
  --ease-out: cubic-bezier(0, 0, .2, 1);
  --ease-bounce: cubic-bezier(.68, -.55, .265, 1.55);

  /* 布局 */
  --container: 1080px;
  --z-nav: 100;
  --z-lightbox: 200;
  --z-toast: 300;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  /* 信纸质感：极淡的横纹 */
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 30px, rgba(67, 51, 58, .018) 30px, rgba(67, 51, 58, .018) 31px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .85em;
  background: var(--surface-blush);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--rose-deep);
}

::selection { background: var(--rose-tint); color: var(--rose-deep); }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--rose);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: 0 var(--sp-8);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 6px 16px rgba(180, 72, 90, .28);
}
.btn-primary:hover { background: var(--rose-deep); box-shadow: 0 8px 22px rgba(150, 59, 76, .32); }
.btn-ghost {
  background: transparent;
  color: var(--rose);
  border-color: var(--rose);
}
.btn-ghost:hover { background: var(--rose-tint); }

/* ============ 导航 ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  transition: background-color var(--dur-slow) var(--ease-out),
              box-shadow var(--dur-slow) var(--ease-out),
              backdrop-filter var(--dur-slow) var(--ease-out);
}
.nav.scrolled {
  background: rgba(251, 246, 240, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .35em;
}
.logo-heart {
  color: var(--rose);
  font-size: .8em;
  display: inline-block;
  animation: heartbeat 2.4s ease-in-out infinite;
  cursor: pointer;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.25); }
  24% { transform: scale(1); }
  36% { transform: scale(1.18); }
  48% { transform: scale(1); }
}
.nav-menu {
  display: flex;
  gap: var(--sp-2);
}
.nav-link {
  text-decoration: none;
  font-size: var(--fs-small);
  letter-spacing: .2em;
  color: var(--ink-soft);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.nav-link:hover { color: var(--rose); background: var(--rose-tint); }
.nav-link[aria-current="true"] { color: var(--rose); font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: var(--sp-2);
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 首屏 ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--sp-24) var(--sp-6);
  overflow: hidden;
}
#heartsCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: var(--fs-caption);
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--gold-deep);
  margin-bottom: var(--sp-6);
}
.hero-names {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .04em;
}
.hero-name { color: var(--ink); }
.amp {
  font-family: var(--font-num);
  font-style: italic;
  font-weight: 500;
  font-size: .72em;
  color: var(--rose);
  margin: 0 .18em;
  vertical-align: .06em;
}
.hero-tagline {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
  color: var(--ink-soft);
  letter-spacing: .14em;
  margin-top: var(--sp-5);
}
.hero-cta { margin-top: var(--sp-10); }

/* 邮戳 */
.postmark {
  position: absolute;
  top: clamp(84px, 12vh, 130px);
  right: clamp(16px, 6vw, 72px);
  width: 118px;
  height: 118px;
  border: 1.5px dashed rgba(180, 72, 90, .55);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: rgba(180, 72, 90, .78);
  transform: rotate(9deg);
  font-family: var(--font-num);
  pointer-events: none;
}
.postmark-top, .postmark-bottom {
  font-size: .58rem;
  letter-spacing: .28em;
  text-indent: .28em;
}
.postmark-date {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
}
.postmark-bottom { font-size: .5rem; }

/* 向下滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
}
.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--rose);
  animation: scroll-dot 1.8s var(--ease-out) infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ 火漆印分隔 ============ */
.seal-divider {
  display: flex;
  justify-content: center;
  margin: -14px 0 0;
  position: relative;
  z-index: 2;
}
.wax-seal {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  background: radial-gradient(circle at 32% 30%, #D06B7D, var(--rose) 55%, var(--rose-deep));
  box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, .16);
  border: 0;
}
.wax-seal-sm { width: 46px; height: 46px; font-size: 1rem; margin-bottom: var(--sp-5); }

/* ============ 通用版块 ============ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-20) var(--sp-6) var(--sp-24);
}
.section-alt {
  max-width: none;
  background: var(--paper-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-alt > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.section-head { text-align: center; margin-bottom: var(--sp-16); }
.section-eyebrow {
  font-size: var(--fs-caption);
  letter-spacing: .38em;
  text-indent: .38em;
  color: var(--gold-deep);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-size: var(--fs-h2);
  font-weight: 900;
  letter-spacing: .06em;
}
.section-tip {
  margin-top: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--ink-mute);
}

/* ============ 时光机 ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card-rose {
  background: linear-gradient(160deg, var(--rose-tint), var(--surface));
  border-color: rgba(180, 72, 90, .25);
}
.stat-label {
  font-size: var(--fs-small);
  letter-spacing: .18em;
  color: var(--ink-soft);
  margin-bottom: var(--sp-3);
}
.stat-num {
  font-family: var(--font-num);
  font-size: var(--fs-num);
  font-weight: 600;
  line-height: 1;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-size: var(--fs-small);
  color: var(--ink-mute);
  margin-top: var(--sp-2);
  letter-spacing: .3em;
  text-indent: .3em;
}
.stat-sub {
  margin-top: var(--sp-4);
  font-size: var(--fs-caption);
  letter-spacing: .1em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* 里程碑 */
.milestones {
  margin-top: var(--sp-10);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}
.milestone {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .45em 1.1em;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.milestone.done { border-color: var(--rose-tint); background: var(--rose-tint); color: var(--rose-deep); }
.milestone.next {
  border-color: var(--rose);
  color: #fff;
  background: var(--rose);
  box-shadow: 0 4px 12px rgba(180, 72, 90, .3);
}

/* ============ 故事时间线 ============ */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--sp-4) 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-left: 2px dashed var(--border-strong);
  transform: translateX(-1px);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: var(--sp-4) var(--sp-10) var(--sp-10);
}
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-dot {
  position: absolute;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--rose);
  border: 3px solid var(--paper-deep);
  box-shadow: 0 0 0 2px var(--rose);
  z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left: -7px; }
.timeline-date {
  font-family: var(--font-num);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--gold-deep);
  margin-bottom: var(--sp-1);
}
.timeline-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: .06em;
  margin-bottom: var(--sp-2);
}
.timeline-text {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  line-height: 1.9;
}

/* ============ 相册 ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-10) var(--sp-8);
}
.polaroid {
  position: relative;
  background: #fff;
  padding: 10px 10px 14px;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  cursor: zoom-in;
}
.polaroid:nth-child(4n+1) { transform: rotate(-2deg); }
.polaroid:nth-child(4n+2) { transform: rotate(1.4deg); }
.polaroid:nth-child(4n+3) { transform: rotate(-.8deg); }
.polaroid:nth-child(4n)   { transform: rotate(2deg); }
.polaroid:hover {
  transform: rotate(0) scale(1.03);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.polaroid::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 24px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: rgba(214, 186, 156, .5);
  border-left: 1px solid rgba(255,255,255,.5);
  border-right: 1px solid rgba(255,255,255,.5);
}
.polaroid-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
}
.polaroid-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid-caption {
  padding: var(--sp-3) var(--sp-2) var(--sp-1);
  text-align: center;
}
.polaroid-title {
  font-size: var(--fs-small);
  color: var(--ink);
  letter-spacing: .08em;
}
.polaroid-date {
  font-family: var(--font-num);
  font-size: var(--fs-caption);
  letter-spacing: .2em;
  color: var(--ink-mute);
  margin-top: 2px;
}
/* 无照片时的占位 */
.ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--sp-2);
  color: #fff;
  text-align: center;
}
.ph-emoji { font-size: 2.4rem; line-height: 1; }
.ph-text { font-size: var(--fs-caption); letter-spacing: .2em; opacity: .85; }
.ph:nth-child(5n+1) { background: linear-gradient(150deg, #E8B4BC, #B4485A); }
.ph:nth-child(5n+2) { background: linear-gradient(150deg, #EFD3A8, #C29A62); }
.ph:nth-child(5n+3) { background: linear-gradient(150deg, #D9C3D6, #9A6E92); }
.ph:nth-child(5n+4) { background: linear-gradient(150deg, #BFD3C8, #6F9280); }
.ph:nth-child(5n)   { background: linear-gradient(150deg, #C7D4E2, #6C86A3); }

/* ============ 留言板 ============ */
.board-form {
  max-width: 680px;
  margin: 0 auto var(--sp-16);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
}
.form-row { margin-bottom: var(--sp-6); position: relative; }
.label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .12em;
  margin-bottom: var(--sp-2);
}
.input {
  width: 100%;
  min-height: 46px;
  padding: var(--sp-3) var(--sp-4);
  font: inherit;
  font-size: var(--fs-small);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder { color: var(--ink-mute); }
.input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-tint);
}
.textarea { resize: vertical; min-height: 96px; }
.input.input-error { border-color: var(--danger, #C0392B); }
.char-count {
  position: absolute;
  right: 2px;
  bottom: calc(-1 * var(--sp-5));
  font-size: var(--fs-caption);
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.board-form .btn { width: 100%; margin-top: var(--sp-2); }

/* 便利贴墙 */
.notes-wall {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  justify-content: center;
}
.note {
  position: relative;
  flex: 0 1 calc(50% - var(--sp-3));
  min-width: 260px;
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  border-radius: 4px 4px 18px 4px;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-base) var(--ease-out);
}
.note:nth-child(odd) { transform: rotate(-1.2deg); background: #FDEEF0; }
.note:nth-child(even) { transform: rotate(1.2deg); background: #FFF6E9; }
.note:hover { transform: rotate(0) translateY(-3px); }
.note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 24px;
  width: 52px;
  height: 18px;
  background: rgba(214, 186, 156, .55);
  transform: rotate(-3deg);
}
.note-text {
  font-size: var(--fs-body);
  line-height: 1.9;
  word-break: break-word;
  white-space: pre-wrap;
}
.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-4);
  gap: var(--sp-3);
}
.note-name {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--rose-deep);
}
.note-meta { font-size: var(--fs-caption); color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.note-actions { display: flex; align-items: center; gap: var(--sp-2); }
.note-heart {
  background: none;
  border: 0;
  color: var(--ink-mute);
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-full);
  transition: color var(--dur-fast), transform var(--dur-fast) var(--ease-bounce);
  font-variant-numeric: tabular-nums;
}
.note-heart:hover { color: var(--rose); }
.note-heart.liked { color: var(--rose); }
.note-heart.liked .heart-glyph { animation: pop .4s var(--ease-bounce); }
@keyframes pop { 50% { transform: scale(1.5); } }
.note-del {
  background: none;
  border: 0;
  color: var(--ink-mute);
  font-size: .85rem;
  opacity: .5;
  padding: var(--sp-1);
  border-radius: var(--radius-sm);
}
.note-del:hover { opacity: 1; color: var(--rose-deep); }
.notes-empty {
  width: 100%;
  text-align: center;
  color: var(--ink-mute);
  padding: var(--sp-12) 0;
  font-size: var(--fs-small);
  letter-spacing: .12em;
}

/* ============ 页脚 ============ */
.footer {
  text-align: center;
  padding: var(--sp-20) var(--sp-6) var(--sp-12);
  border-top: 1px solid var(--border);
}
.footer-line {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .14em;
}
.footer-line .heart { color: var(--rose); }
.footer-poem {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin-top: var(--sp-3);
  letter-spacing: .12em;
}
.footer-meta {
  margin-top: var(--sp-6);
  font-size: var(--fs-caption);
  letter-spacing: .18em;
  color: var(--ink-mute);
}

/* ============ 灯箱 ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: rgba(38, 28, 32, .92);
  animation: lb-fade var(--dur-base) var(--ease-out);
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } }
.lightbox-figure {
  max-width: min(860px, 100%);
  text-align: center;
}
.lightbox-ph {
  width: min(420px, 78vw);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-content: center;
  gap: var(--sp-2);
  color: #fff;
}
.lightbox-ph .ph-emoji { font-size: 3rem; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}
.lightbox-figure figcaption {
  margin-top: var(--sp-4);
  color: rgba(255, 255, 255, .88);
  font-size: var(--fs-small);
  letter-spacing: .16em;
}
.lightbox-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close { position: absolute; top: var(--sp-5); right: var(--sp-5); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--sp-10);
  transform: translate(-50%, 16px);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-small);
  letter-spacing: .08em;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 滚动入场 ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8) var(--sp-6); }
}
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(251, 246, 240, .97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--sp-3) var(--sp-6) var(--sp-5);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-link { display: block; padding: var(--sp-3) var(--sp-2); font-size: 1rem; }
  .postmark { width: 92px; height: 92px; }
  .postmark-date { font-size: 1.45rem; }
  .timeline::before { left: 10px; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding: var(--sp-2) 0 var(--sp-10) var(--sp-8);
  }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item .timeline-dot { left: 3px; right: auto; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .note { flex-basis: 100%; }
  .lightbox { flex-direction: column; gap: var(--sp-5); }
  .lightbox-prev, .lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); }
  .lightbox-prev { left: var(--sp-3); }
  .lightbox-next { right: var(--sp-3); }
}

/* ============ 打印 & 减少动效 ============ */
@media print {
  .nav, .hero-canvas, .scroll-hint, .toast, .lightbox, .seal-divider { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  #heartsCanvas { display: none; }
}
