@charset "UTF-8";
/* ════════════════════════════════════════════════════════════
   婚礼邀请函 v3 ·「花溪一日 · 从晨到夜」
   结构：tokens → base → 天光系统 → header/side-nav → 揭示系统
         → 通用组件 → 七幕场景 → 灯箱/提示条 → 装饰层
         → 横向卷轴几何 → 响应式 → 无障碍与降级
   ════════════════════════════════════════════════════════════ */

/* ============ tokens ============ */
:root {
  /* 色板 */
  --night: #171318;
  --night-soft: #221b22;
  --vermilion: #9e2b22;
  --vermilion-deep: #6e1d16;
  --cinnabar: #c34a3a;
  --gold: #c9a15b;
  --gold-bright: #e4c98c;
  --dawn: #e9d9c4;
  --kraft: #c9b694;
  --paper: #f7f1e6;
  --cream: #fcf8f0;
  --ink: #2b211b;
  --ink-soft: #6c5b4d;

  /* 字体 */
  --font-brush: "Ma Shan Zheng", "Noto Serif SC", serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-display: "Fraunces", "Georgia", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 间距 / 圆角 / 层级 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --radius-frame: 18px;
  --radius-card: 22px;
  --z-wash: 0;
  --z-grain: 1;
  --z-content: 2;
  --z-header: 40;
  --z-cover: 60;
  --z-lightbox: 80;
  --z-toast: 90;

  /* 阴影（暖调分层） */
  --shadow-soft: 0 10px 30px rgba(43, 33, 27, 0.1), 0 2px 8px rgba(43, 33, 27, 0.06);
  --shadow-lift: 0 18px 44px rgba(43, 33, 27, 0.16), 0 4px 12px rgba(43, 33, 27, 0.08);
  --shadow-night: 0 18px 44px rgba(0, 0, 0, 0.4);

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.77, 0, 0.18, 1);
}

/* 前景主题变量：随 body[data-phase] 形变（默认 = 浅色纸面幕次） */
body {
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --card: rgba(252, 248, 240, 0.86);
  --hairline: rgba(43, 33, 27, 0.16);
  --header-bg: rgba(247, 241, 230, 0.78);
  --chip-border: rgba(43, 33, 27, 0.28);
}
body[data-phase="prelude"] {
  --fg: #f2e7d5;
  --fg-soft: var(--gold);
  --card: rgba(35, 26, 30, 0.66);
  --hairline: rgba(228, 201, 140, 0.28);
  --header-bg: rgba(18, 14, 20, 0.55);
  --chip-border: rgba(228, 201, 140, 0.38);
}
body[data-phase="vermilion"] {
  --fg: #f6efe4;
  --fg-soft: var(--gold-bright);
  --card: rgba(58, 16, 12, 0.52);
  --hairline: rgba(228, 201, 140, 0.32);
  --header-bg: rgba(84, 18, 13, 0.55);
}
body[data-phase="dusk"] {
  --fg: #3a2a1b;
  --fg-soft: #7a5f3e;
  --card: rgba(252, 248, 240, 0.8);
  --hairline: rgba(58, 42, 27, 0.2);
  --header-bg: rgba(220, 192, 138, 0.5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  touch-action: manipulation; /* 禁双击缩放：快速点按不再触发页面放大 */
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.4s ease;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--vermilion);
  color: var(--cream);
}

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

/* 细滚动条 */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 161, 91, 0.55) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(201, 161, 91, 0.45);
  border-radius: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--vermilion);
  color: var(--cream);
  border-radius: 0 0 10px 10px;
  transition: top 0.25s ease;
}
.skip-link:focus-visible {
  top: 0;
}

/* 纸纹噪点：全局一层极淡的颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ============ 天光系统：sky-wash ============ */
.sky-wash {
  position: fixed;
  inset: 0;
  z-index: var(--z-wash);
  pointer-events: none;
}
.sky-wash i {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.sky-wash i[data-wash="prelude"] {
  background: linear-gradient(180deg, #12101a 0%, #1d1416 55%, #241014 100%);
  opacity: 1;
}
.sky-wash i[data-wash="dawn"] {
  background: linear-gradient(180deg, #e9d9c4 0%, #f3e6d2 52%, #f7f1e6 100%);
}
.sky-wash i[data-wash="paper"] {
  background: linear-gradient(180deg, #f7f1e6 0%, #fbf6ee 100%);
}
.sky-wash i[data-wash="vermilion"] {
  background: linear-gradient(180deg, #6e1d16 0%, #9e2b22 58%, #7a1f18 100%);
}
.sky-wash i[data-wash="dusk"] {
  background: linear-gradient(180deg, #dcc08a 0%, #e4c98c 46%, #eedfbe 100%);
}
.sky-wash i[data-wash="colophon"] {
  background: linear-gradient(180deg, #f7f1e6 0%, #f1e8da 100%);
}
.sky-wash i.is-live {
  opacity: 1;
}

/* ============ 天光系统：日轨 ============ */
.sun-arc {
  position: fixed;
  inset: 0 0 auto 0;
  height: 140px;
  z-index: calc(var(--z-header) - 1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}
.site-shell.is-visible .sun-arc {
  opacity: 1;
}
.sun-arc svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sun-arc path {
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.32;
  vector-effect: non-scaling-stroke;
}
.arc-body {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff2d0, var(--gold-bright) 46%, var(--gold) 100%);
  box-shadow: 0 0 18px 4px rgba(228, 201, 140, 0.55);
  transition: opacity 0.6s ease;
}
.arc-moon {
  background: radial-gradient(circle at 34% 36%, #fdf6e8, #d8cdb4 58%, #b9ad92 100%);
  box-shadow: 0 0 14px 3px rgba(242, 231, 213, 0.4);
  opacity: 0;
}
.arc-moon.is-live {
  opacity: 1;
}
.sun-arc .arc-body.is-eclipsed {
  opacity: 0;
}
.phase-label {
  position: absolute;
  right: clamp(10px, 2vw, 22px);
  top: 92px;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--fg-soft);
  opacity: 0.85;
  transition: color 0.4s ease;
}

/* ============ 滚动进度发丝线 ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: calc(var(--z-header) + 1);
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.site-shell.is-visible .scroll-progress {
  opacity: 1;
}

/* ============ header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  color: var(--fg);
  transition: transform 0.45s var(--ease-out), background-color 0.4s ease, color 0.4s ease,
    box-shadow 0.4s ease;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--hairline);
}
.site-header.is-hidden {
  transform: translateY(-110%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 1460px;
  margin: 0 auto;
  padding: 14px clamp(18px, 3.4vw, 48px);
  padding-top: calc(14px + env(safe-area-inset-top));
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}
.brand-mark {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: 0.06em;
}
.brand-mark span {
  color: var(--vermilion);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  margin: 0 1px;
}
.brand-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  opacity: 0.85;
}
.site-nav {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
}
.nav-link {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 6px 2px;
  color: var(--fg);
  opacity: 0.72;
  transition: opacity 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--vermilion));
  transform: translateX(-50%);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover {
  opacity: 1;
}
.nav-link.is-active {
  opacity: 1;
}
.nav-link.is-active::after {
  width: 100%;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--fg);
  opacity: 0.92;
  transition: opacity 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  overflow: hidden;
}
.icon-button:hover {
  opacity: 1;
  border-color: var(--hairline);
}
.icon-button svg {
  width: 19px;
  height: 19px;
}
.menu-button {
  display: none;
}

/* 音乐按钮的声波 */
.audio-waves {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.audio-waves span {
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  height: 6px;
}
.music-button.is-playing .audio-waves {
  display: flex;
}
.music-button.is-playing > svg {
  display: none;
}
.audio-waves span:nth-child(1) {
  animation: wave 0.9s ease-in-out infinite;
}
.audio-waves span:nth-child(2) {
  animation: wave 0.9s ease-in-out 0.15s infinite;
}
.audio-waves span:nth-child(3) {
  animation: wave 0.9s ease-in-out 0.3s infinite;
}
@keyframes wave {
  0%,
  100% {
    height: 5px;
  }
  50% {
    height: 16px;
  }
}

/* ============ side-nav：时辰印章签 ============ */
.side-nav {
  position: fixed;
  right: clamp(10px, 1.8vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: calc(var(--z-header) + 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
.site-shell.is-visible .side-nav {
  opacity: 1;
}
.chip {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--chip-border);
  color: var(--fg);
  background: transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    transform 0.3s var(--ease-out);
}
.chip span {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}
.chip::before {
  content: attr(aria-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.chip:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.chip:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}
.chip.is-active {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: var(--gold-bright);
  box-shadow: 0 6px 16px rgba(158, 43, 34, 0.4);
}

/* 顶栏与章节签：统一暗色玻璃——浅色幕次不再泛白膜 */
.site-header {
  --fg: #f2e7d5;
  --fg-soft: #e4c98c;
  --header-bg: rgba(24, 18, 26, 0.68);
  --card: rgba(24, 18, 26, 0.72);
  --hairline: rgba(228, 201, 140, 0.26);
  color: var(--fg);
}
.side-nav {
  --fg: #f2e7d5;
  --fg-soft: #e4c98c;
  --header-bg: rgba(24, 18, 26, 0.68);
  --chip-border: rgba(228, 201, 140, 0.3);
  color: var(--fg);
}

/* ============ 揭示系统 ============ */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    filter 0.85s ease var(--d, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}
.reveal-curtain {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.95s var(--ease-soft) var(--d, 0ms);
}
.reveal-curtain.is-visible {
  clip-path: inset(0 0 0 0);
}
/* 揭幕完成后摘除 clip-path：祖先残留 clip-path 会使子孙的 backdrop-filter 失效 */
.reveal-curtain.curtain-done {
  clip-path: none;
}
.reveal-curtain img {
  transform: scale(1.1);
  transition: transform 1.25s var(--ease-soft) var(--d, 0ms);
}
.reveal-curtain.is-visible img {
  transform: scale(1);
}
/* 标题逐字：模糊 + 下沉 + 微旋转，按 --i 级联 46ms（纯 CSS，任何内核不冻结） */
[data-split] .split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.72em) rotate(7deg);
  filter: blur(9px);
}
[data-split].in .split-char {
  animation: char-in 0.72s cubic-bezier(0.18, 0.9, 0.24, 1) both;
  animation-delay: calc(var(--i, 0) * 46ms);
}
@keyframes char-in {
  0% { opacity: 0; transform: translateY(0.72em) rotate(7deg); filter: blur(9px); }
  55% { filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}
/* 无 SplitText 的整题回退 */
[data-split].anim-fallback {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(5px);
  transition:
    opacity 0.8s ease var(--d, 0ms),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    filter 0.8s ease var(--d, 0ms);
}
[data-split].in.anim-fallback {
  opacity: 1;
  transform: none;
  filter: none;
}
html.no-js .reveal,
html.no-js .reveal-curtain,
html.no-js [data-split] {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: none;
}
html.no-js [data-split] .split-char {
  opacity: 1;
  transform: none;
  filter: none;
}

/* SplitText 预备态：JS 拆字后逐字上浮 */
[data-split].split-ready .split-char {
  display: inline-block;
  will-change: transform;
}

/* ============ 通用组件：文字 ============ */
.kicker {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--fg-soft);
  margin-bottom: var(--space-3);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 14px;
  opacity: 0.7;
}
.scene-head h2,
.rsvp-intro h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.22;
  letter-spacing: 0.04em;
  color: var(--fg);
}
.scene-head h2 em,
.rsvp-intro h2 em {
  font-style: normal;
  color: var(--vermilion);
}
body[data-phase="vermilion"] .scene-head h2 em,
body[data-phase="prelude"] .scene-head h2 em {
  color: var(--gold-bright);
}
.lede {
  margin-top: var(--space-3);
  max-width: 34em;
  font-size: 15.5px;
  color: var(--fg-soft);
}
.seal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--vermilion);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  box-shadow: inset 0 0 0 1.5px rgba(228, 201, 140, 0.55), 0 4px 12px rgba(158, 43, 34, 0.35);
}

/* ============ 通用组件：照片裱框（2:3 不裁切） ============ */
.frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: var(--cream);
  border-radius: var(--radius-frame);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.frame::after {
  /* 金发丝内线 */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 161, 91, 0.5);
  border-radius: 10px;
  pointer-events: none;
}
.frame-mat {
  display: block;
  padding: 12px;
}
.frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}
figcaption {
  padding: 10px 14px 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.frame-label {
  display: block;
  padding: 10px 14px 12px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
button.frame {
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
button.frame:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: var(--shadow-lift);
}
button.frame:hover::after {
  border-color: rgba(228, 201, 140, 0.88);
}
/* 按压反馈：按下即回缩，松手回弹 */
.chip:active {
  transform: scale(0.94);
}
.icon-button:active {
  transform: scale(0.9);
}
.btn-primary:active,
.btn-ghost:active,
.btn-on-dark:active {
  transform: scale(0.97);
}
.frame:active {
  transform: scale(0.985);
}
button.frame:focus-visible {
  outline-offset: 5px;
}

/* ============ 通用组件：按钮 ============ */
.btn-primary,
.btn-ghost,
.btn-on-dark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cinnabar), var(--vermilion) 58%, var(--vermilion-deep));
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(158, 43, 34, 0.38);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(158, 43, 34, 0.46);
}
.btn-primary svg {
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease-out);
}
.btn-primary:hover svg {
  transform: translate(2px, -2px);
}
.btn-ghost {
  border: 1px solid var(--chip-border);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.btn-on-dark {
  border: 1px solid rgba(228, 201, 140, 0.55);
  color: var(--gold-bright);
  background: rgba(0, 0, 0, 0.14);
}
.btn-on-dark:hover {
  background: rgba(228, 201, 140, 0.14);
  transform: translateY(-2px);
}
.btn-on-dark svg {
  width: 16px;
  height: 16px;
}
.btn-on-dark.is-flash {
  background: rgba(228, 201, 140, 0.22);
}

/* 涟漪 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 230, 0.5) 0%, rgba(255, 248, 230, 0) 62%);
  transform: scale(0);
  animation: ripple 0.66s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ============ 通用组件：表单 ============ */
.field {
  position: relative;
  display: flex;
  align-items: center;
}
.field > svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--fg-soft);
  pointer-events: none;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 40px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(43, 33, 27, 0.2);
  border-radius: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  appearance: none;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(108, 91, 77, 0.65);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(158, 43, 34, 0.16);
}
.field.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

/* ============ 提示条 toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 460px);
  padding: 13px 20px 15px;
  border-radius: 999px;
  background: rgba(23, 19, 24, 0.92);
  color: #f2e7d5;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-night);
  /* 隐藏位必须整个沉出屏幕底缘（含安全区与自身高度），否则 iPhone 上会露头 */
  transform: translate(-50%, calc(100% + 130px));
  transition: transform 0.5s var(--ease-out);
  overflow: hidden;
}
.toast.is-visible {
  transform: translate(-50%, 0);
}
.toast svg {
  width: 17px;
  height: 17px;
  color: var(--gold-bright);
  flex: none;
}
.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--cinnabar));
  transform-origin: 0 50%;
}
.toast.is-visible .toast-bar {
  animation: toastbar 3.2s linear forwards;
}
@keyframes toastbar {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ============ 通用组件：毛玻璃面板 ============ */
/* 全站氛围底片之上的内容承载：半透明 + 背景高斯模糊 */
/* 面板内统一走祝福页语言：暗色烟熏玻璃 + 米白/金字（令牌在面板作用域内重定义） */
.scene-head,
.hero-panel,
.chapter-copy,
.schedule,
.rsvp-intro,
.venue,
.rsvp-form,
.site-footer {
  --fg: #f2e7d5;
  --fg-soft: #e4c98c;
  --card: rgba(24, 18, 26, 0.55);
  --hairline: rgba(228, 201, 140, 0.26);
  --chip-border: rgba(228, 201, 140, 0.3);
  color: var(--fg);
}
.scene-head,
.hero-panel,
.chapter-copy,
.schedule,
.rsvp-intro,
.venue,
.rsvp-form,
.site-footer {
  background: rgba(24, 18, 26, 0.86); /* 旧内核回退：近实底暗卡（无 backdrop-filter 也不透字） */
  background: color-mix(in srgb, var(--card) 72%, transparent); /* 新内核：半透明玻璃 */
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  backdrop-filter: blur(12px) saturate(1.12);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

/* ════════════════════════════════════════
   七幕场景
   ════════════════════════════════════════ */

/* ============ 封面：婚书启封 ============ */
.cover {
  position: fixed;
  inset: 0;
  z-index: var(--z-cover);
  display: grid;
  place-items: center;
  overflow: hidden;
  overflow-y: auto; /* 家书融入后卡变高，矮屏可滚动 */
  background: radial-gradient(120% 90% at 72% 8%, #a6372a 0%, #7a1f18 46%, #571511 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.cover.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* 氛围底片：囍 动态壁纸压缩版，压暗循环；启封后由 cover.js 移交全站 */
.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
}
/* 全站常驻态：视频完全不透底（天光渐变只用于无视频降级），无任何白膜 */
.cover-video.is-ambient {
  position: fixed;
  z-index: 0;
  opacity: 1;
  filter: saturate(1.18);
}
.cover-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(87, 21, 17, 0.55) 0%, rgba(87, 21, 17, 0.06) 45%, rgba(23, 19, 24, 0.42) 100%);
  pointer-events: none;
}
.cover-motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cover-calligraphy {
  position: absolute;
  left: clamp(18px, 4vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 22px;
  writing-mode: vertical-rl;
  font-family: var(--font-brush);
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: 0.5em;
  color: rgba(228, 201, 140, 0.88);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.cover-dawn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(60vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(233, 217, 196, 0.3), transparent 65%);
  pointer-events: none;
  filter: blur(10px);
}
.invite-card {
  position: relative;
  z-index: 3;
  width: min(84vw, 380px);
  margin-left: 0;
  background: rgba(24, 18, 26, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 24px;
  padding: clamp(26px, 3.8vh, 40px) clamp(22px, 3vw, 34px);
  text-align: center;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.invite-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 161, 91, 0.55);
  border-radius: 14px;
  pointer-events: none;
}
.invite-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}
.cover-title {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(32px, 8.6vw, 42px);
  line-height: 1.2;
  color: var(--ink);
}
.cover-title i {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 0.62em;
  color: var(--vermilion);
  margin: 0 6px;
  vertical-align: middle;
}
/* 信里夹照：请柬正文前的拍立得，2:3 整张可见 */
.cover-slip {
  position: relative;
  width: min(46%, 156px);
  margin: 18px auto 2px;
  padding: 7px 7px 26px;
  background: #f4ead8;
  border-radius: 3px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), 0 1px 0 rgba(255, 248, 236, 0.7) inset;
  transform: rotate(-3.4deg);
  animation: slip-settle 1.15s var(--ease-out) 0.28s both;
}
.cover-slip::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 46px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(248, 236, 214, 0.92), rgba(228, 201, 140, 0.55));
  transform: translateX(-50%) rotate(-2deg);
  box-shadow: 0 1px 3px rgba(43, 33, 27, 0.18);
}
.cover-slip img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  display: block;
}
@keyframes slip-settle {
  from {
    opacity: 0;
    transform: translateY(-18px) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: rotate(-3.4deg);
  }
}
.invite-line {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
.invite-date {
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.wax-seal {
  margin-top: 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wax-face {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 30%, #c4523f, #9e2b22 52%, #6e1d16 100%);
  box-shadow: inset 0 3px 8px rgba(255, 220, 190, 0.35), inset 0 -6px 14px rgba(0, 0, 0, 0.4),
    0 14px 30px rgba(0, 0, 0, 0.42);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
  animation: seal-breathe 2.6s ease-in-out infinite;
}
.wax-face b {
  font-family: var(--font-brush);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.wax-face::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px dashed rgba(228, 201, 140, 0.5);
}
.wax-shine {
  position: absolute;
  left: 18%;
  top: 12%;
  width: 44%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), transparent 70%);
  transform: rotate(-18deg);
}
.wax-hint {
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
}
.wax-seal:hover .wax-face {
  transform: scale(1.07) rotate(-4deg);
}
.wax-seal:active .wax-face {
  transform: scale(0.93);
}
/* 请柬卡统一暗玻璃语言：米白/金 */
.invite-meta {
  color: rgba(228, 201, 140, 0.82);
}
.cover-title {
  color: #f2e7d5;
}
.cover-title i {
  color: var(--gold-bright);
}
.invite-line {
  color: #e4c98c;
}
.invite-date {
  color: rgba(242, 231, 213, 0.78);
}
.wax-hint {
  color: rgba(242, 231, 213, 0.66);
}
.invite-card::before {
  border-color: rgba(228, 201, 140, 0.45);
}

@keyframes seal-breathe {
  50% {
    box-shadow: inset 0 3px 8px rgba(255, 220, 190, 0.35), inset 0 -6px 14px rgba(0, 0, 0, 0.4),
      0 14px 30px rgba(0, 0, 0, 0.42), 0 0 0 14px rgba(228, 201, 140, 0.08);
  }
}
/* 启封编排：卡片/题字/照片退场 → 晨幕四叶落下 → 整层淡出（is-gone 由 JS 延时添加） */
.cover.is-opening .invite-card {
  opacity: 0;
  transform: translateY(-26px);
}
.cover.is-opening .cover-slip {
  transform: translateY(-14px) rotate(-9deg) scale(0.94);
}
.cover.is-opening .cover-calligraphy {
  opacity: 0;
  transform: translateY(-50%) translateX(-18px);
}
.cover.is-opening .wax-seal {
  pointer-events: none;
}
.cover-curtain {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  pointer-events: none;
}
.cover-curtain i {
  flex: 1;
  background: linear-gradient(180deg, #f0e2c8, #e4c98c 70%, #d9b87a);
  transform: translateY(-102%);
}
.cover.is-opening .cover-curtain i {
  transform: translateY(0);
  transition: transform 0.6s var(--ease-soft);
}
.cover.is-opening .cover-curtain i:nth-child(2) {
  transition-delay: 0.06s;
}
.cover.is-opening .cover-curtain i:nth-child(3) {
  transition-delay: 0.12s;
}
.cover.is-opening .cover-curtain i:nth-child(4) {
  transition-delay: 0.18s;
}

/* ============ 场景骨架 ============ */
.scroll-stage {
  position: relative;
  z-index: var(--z-content);
}
.scene {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 4vh, 48px);
  min-height: 100svh;
  padding: calc(92px + env(safe-area-inset-top)) clamp(20px, 5vw, 72px)
    calc(64px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.scene-head {
  max-width: 860px;
}
.stage {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============ 晨 · hero ============ */
.hero-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero-frame {
  max-width: 380px;
  transform: rotate(-1.4deg);
}
.hero-frame img {
  border-radius: 17px 17px 0 0;
}
@media (pointer: fine) {
  .hero-frame.curtain-done {
    animation: polaroid-breathe 6.8s ease-in-out infinite;
  }
}
@keyframes polaroid-breathe {
  0%,
  100% {
    transform: rotate(-1.6deg) translateY(0);
  }
  50% {
    transform: rotate(-0.7deg) translateY(-7px);
  }
}
.hero-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.hero-place {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  color: var(--fg-soft);
}
.hero-names {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: 0.08em;
}
.hero-names b {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--vermilion);
}
.countdown-label {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--fg-soft);
}
.countdown-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.countdown-cell {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  min-width: 78px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}
.countdown-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.countdown-unit {
  font-size: 12px;
  color: var(--fg-soft);
}
.countdown-num.tick {
  animation: ticknum 0.42s var(--ease-out);
}
@keyframes ticknum {
  from {
    opacity: 0;
    transform: translateY(55%);
    filter: blur(3px);
  }
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.hero-facts dt {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--fg-soft);
}
.hero-facts dd {
  margin-top: 2px;
  font-weight: 600;
  font-size: 15px;
}
/* 倒计时并入「囍事将近」标题卡：原 hero 信息面板退役，手机端另有覆盖样式 */
.hero-countdown {
  margin-top: clamp(18px, 2.4vh, 26px);
  padding-top: clamp(14px, 2vh, 20px);
  border-top: 1px solid var(--hairline);
}
.hero-merged-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  color: var(--fg-soft);
}
.hero-merged-meta span {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hero-countdown .countdown-label {
  margin-top: 14px;
}

/* ============ 相遇 · story ============ */
.story-spread {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.chapter {
  display: grid;
  gap: var(--space-4);
}
.chapter-red .frame {
  transform: rotate(-1.2deg);
}
.chapter-kraft .frame {
  transform: rotate(1.1deg);
  background: #efe3c8;
}
.chapter-copy h3 {
  margin: 12px 0 8px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.04em;
}
.chapter-copy > p {
  max-width: 32em;
  font-size: 15px;
  color: var(--fg-soft);
}
.chapter-kraft .seal-mark {
  background: #7d6a4a;
  box-shadow: inset 0 0 0 1.5px rgba(252, 248, 240, 0.5), 0 4px 12px rgba(74, 60, 40, 0.35);
}

/* ============ 封面 · 家书正文（融入请柬卡） ============ */
.invite-card .letter-salutation {
  margin-top: 20px;
  text-align: left;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.1em;
  color: var(--fg);
}
.invite-card .letter-body {
  margin-top: 12px;
  text-align: justify;
  font-size: 13.5px;
  line-height: 2.05;
  text-indent: 2em;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  opacity: 0.94;
}
.invite-card .invite-date {
  margin-top: 16px;
}

/* ============ 吉时 · details ============ */
.xi-watermark {
  position: absolute;
  right: -4vw;
  bottom: -8vh;
  font-family: var(--font-brush);
  font-size: clamp(200px, 28vw, 400px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(228, 201, 140, 0.15);
  pointer-events: none;
  user-select: none;
}
.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.petals i {
  position: absolute;
  top: -6vh;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 0.72);
  background: linear-gradient(135deg, #e4c98c, #c98f6a);
  border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%;
  opacity: var(--o);
  animation: petal-fall var(--t) linear var(--d) infinite;
}
@keyframes petal-fall {
  to {
    transform: translate3d(var(--sx), 112vh, 0) rotate(var(--rr));
  }
}
.details-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.schedule {
  position: relative;
  display: grid;
  gap: 6px;
}
.schedule::before {
  content: "";
  position: absolute;
  left: 86px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(228, 201, 140, 0.55), transparent);
}
.schedule li {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.schedule li:hover {
  background: rgba(0, 0, 0, 0.13);
}
.schedule li::after {
  content: "";
  position: absolute;
  left: 86px;
  top: 27px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(228, 201, 140, 0.16);
}
.schedule time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.3;
  text-align: right;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.schedule strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--fg);
}
.schedule p {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--fg-soft);
}
.schedule li.is-highlight {
  background: rgba(0, 0, 0, 0.17);
  border-color: rgba(228, 201, 140, 0.32);
}
.schedule li.is-highlight time {
  color: #ffe9b8;
}
.schedule:not(.is-visible) li {
  opacity: 0;
  transform: translateX(-18px);
}
.schedule li:nth-child(1) {
  transition-delay: 0.05s;
}
.schedule li:nth-child(2) {
  transition-delay: 0.16s;
}
.schedule li:nth-child(3) {
  transition-delay: 0.27s;
}
.schedule li:nth-child(4) {
  transition-delay: 0.38s;
}
.venue {
  background: var(--card);
  border: 1px solid rgba(228, 201, 140, 0.32);
  border-radius: var(--radius-card);
  padding: clamp(22px, 2.4vw, 34px);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.venue h3 {
  margin: 12px 0 8px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(24px, 2.2vw, 32px);
  color: var(--fg);
}
.venue-address {
  font-size: 14.5px;
  color: var(--fg-soft);
}
.venue-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--fg-soft);
}
.venue-notes li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.venue-notes svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}
.venue-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

/* ============ 暮 · moments ============ */
.frame-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.8vw, 26px);
  align-items: start;
  max-width: 1500px;
}
.frame-wall .frame {
  cursor: zoom-in;
}
.frame-wall .frame-a {
  grid-column: 1 / -1;
  max-width: 320px;
  justify-self: center;
}
.scene-moments {
  overflow: visible;
}

/* ============ 落款 · rsvp + footer ============ */
.rsvp-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 80px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}
.rsvp-intro > p {
  margin-top: var(--space-3);
  max-width: 30em;
  color: var(--fg-soft);
  font-size: 15.5px;
}
.rsvp-intro strong {
  color: var(--vermilion);
}
body[data-phase="vermilion"] .rsvp-intro strong {
  color: var(--gold-bright);
}
.rsvp-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg-soft);
}
.rsvp-note svg {
  width: 15px;
  height: 15px;
  color: var(--cinnabar);
}
.rsvp-form {
  position: relative;
  display: grid;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: clamp(22px, 3vw, 38px);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.rsvp-form::before {
  content: "囍";
  position: absolute;
  top: -17px;
  right: 24px;
  padding: 5px 11px;
  border-radius: 12px;
  background: var(--vermilion);
  color: var(--gold-bright);
  font-family: var(--font-brush);
  font-size: 19px;
  box-shadow: inset 0 0 0 1.5px rgba(228, 201, 140, 0.55), 0 6px 14px rgba(158, 43, 34, 0.4);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.form-group label,
.form-group legend {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg);
}
.required {
  color: var(--cinnabar);
}
.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice-card {
  position: relative;
}
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card-inner {
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 14px 16px;
  border: 1.5px solid var(--hairline);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.choice-card-inner svg {
  width: 16px;
  height: 16px;
  margin-bottom: 4px;
  color: var(--fg-soft);
  transition: color 0.3s ease;
}
.choice-card-inner strong {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.06em;
}
.choice-card-inner > span {
  font-size: 12.5px;
  color: var(--fg-soft);
}
.choice-card input:checked + .choice-card-inner {
  border-color: var(--vermilion);
  background: rgba(158, 43, 34, 0.08);
  box-shadow: 0 8px 20px rgba(158, 43, 34, 0.18);
}
.choice-card input:checked + .choice-card-inner svg {
  color: var(--vermilion);
}
.choice-card input:focus-visible + .choice-card-inner {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.btn-submit {
  width: 100%;
  margin-top: 4px;
}
.btn-submit .submit-done {
  display: none;
  align-items: center;
  gap: 6px;
}
.btn-submit .submit-done svg {
  width: 17px;
  height: 17px;
}
.btn-submit.is-success .submit-idle {
  display: none;
}
.btn-submit.is-success .submit-done {
  display: inline-flex;
}
.btn-submit.is-loading {
  pointer-events: none;
}
.btn-submit.is-loading .submit-idle {
  opacity: 0.55;
}
.form-note {
  font-size: 13px;
  color: var(--fg-soft);
  text-align: center;
}
.form-note.is-success {
  color: var(--vermilion);
  font-weight: 600;
}
.site-footer {
  width: 100%;
  max-width: 1180px;
  margin: var(--space-6) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--hairline);
}
.footer-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.footer-mark {
  font-size: 20px;
  padding: 8px 16px;
}
.footer-thanks {
  font-size: 14px;
  color: var(--fg-soft);
}
.footer-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  color: var(--fg-soft);
}
.back-to-top {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 6px;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.back-to-top svg {
  width: 18px;
  height: 18px;
}
.back-to-top:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

/* ════════════════════════════════════════
   灯箱
   ════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: grid;
  place-items: center;
  background: rgba(12, 10, 14, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-frame {
  display: grid;
  justify-items: center;
  max-width: min(88vw, 680px);
}
.lightbox-frame img {
  width: auto;
  max-width: 88vw;
  max-height: min(76dvh, 900px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
#lightboxCaption {
  padding: 14px 4px 0;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--kraft);
}
.lightbox-count {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.lightbox-count b {
  font-size: 19px;
  color: #f2e7d5;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(228, 201, 140, 0.35);
  background: rgba(23, 19, 24, 0.55);
  color: #f2e7d5;
  transition: background-color 0.3s ease, transform 0.3s var(--ease-out);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--vermilion);
}
.lightbox-close {
  top: calc(18px + env(safe-area-inset-top));
  right: 18px;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-nav.is-prev {
  left: 18px;
}
.lightbox-nav.is-next {
  right: 18px;
}
.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.06);
}
.lightbox svg {
  width: 20px;
  height: 20px;
}

/* ============ 诗词装饰层：随幕次更替的经典爱情诗句 ============ */
.poem-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.poem-strip {
  position: absolute;
  left: clamp(8px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row-reverse;
  gap: clamp(10px, 2vw, 16px);
  opacity: 0;
  transition: opacity 1s ease;
}
.poem-strip span {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(15px, 4vw, 19px);
  letter-spacing: 0.42em;
  color: rgba(228, 201, 140, 0.6);
  text-shadow: 0 1px 16px rgba(23, 19, 24, 0.5);
}
.poem-strip .poem-attrib {
  font-size: 0.62em;
  letter-spacing: 0.3em;
  color: rgba(228, 201, 140, 0.4);
  padding-top: 2.4em;
}
body[data-phase="dawn"] .poem-strip[data-phase="dawn"],
body[data-phase="paper"] .poem-strip[data-phase="paper"],
body[data-phase="vermilion"] .poem-strip[data-phase="vermilion"],
body[data-phase="dusk"] .poem-strip[data-phase="dusk"],
body[data-phase="colophon"] .poem-strip[data-phase="colophon"] {
  opacity: 1;
}

/* ════════════════════════════════════════
   装饰层
   ════════════════════════════════════════ */
.cover-motes i {
  position: absolute;
  bottom: -3vh;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, #ffe9b8, rgba(228, 201, 140, 0.25) 68%, transparent);
  opacity: var(--o);
  animation: mote-rise var(--t) linear var(--d) infinite;
}
@keyframes mote-rise {
  to {
    transform: translate3d(var(--sx), -110vh, 0);
  }
}
.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 85;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  width: var(--w);
  height: calc(var(--w) * 0.46);
  background: var(--c);
  border-radius: 2px;
}

/* ════════════════════════════════════════
   桌面双列布局（≥1025：纵向降级与横向卷轴共用）
   ════════════════════════════════════════ */
@media (min-width: 1025px) {
  .scene-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 380px);
    align-items: center;
    column-gap: clamp(28px, 4.5vw, 72px);
  }
  .scene-hero .scene-head {
    max-width: none;
  }
  .hero-stage {
    grid-template-columns: minmax(260px, 380px);
    justify-content: end;
    width: 100%;
    max-width: none;
  }
  .story-spread {
    grid-template-columns: repeat(2, minmax(430px, 1fr));
  }
  .chapter {
    grid-template-columns: minmax(240px, 320px) 1fr;
    align-items: center;
    gap: var(--space-5);
  }
  .chapter .frame {
    max-width: 320px;
  }
  .details-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .frame-wall {
    grid-template-columns: repeat(5, 1fr);
  }
  .frame-wall .frame-a {
    grid-column: auto;
    max-width: none;
    margin-top: 34px;
  }
  .frame-wall .frame-b {
    margin-top: 0;
  }
  .frame-wall .frame-c {
    margin-top: 52px;
  }
  .frame-wall .frame-d {
    margin-top: 12px;
  }
  .frame-wall .frame-e {
    margin-top: 40px;
  }
  .rsvp-wrap {
    grid-template-columns: 0.9fr 1.1fr;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============ 横向卷轴几何（JS 开启 .h-scroll） ============ */
@media (min-width: 1025px) and (pointer: fine) {
  html.h-scroll .scroll-stage {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  html.h-scroll #foldTrack {
    display: flex;
    height: 100dvh;
    width: max-content;
    will-change: transform;
  }
  html.h-scroll .scene {
    flex: 0 0 auto;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding-top: calc(76px + env(safe-area-inset-top));
    padding-bottom: 44px;
  }
  html.h-scroll .scene-head {
    max-width: 1180px;
  }
  html.h-scroll .scene-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  }
  html.h-scroll .hero-frame {
    max-width: 340px;
  }
  /* 标题卡并入倒计时后，横卷一屏更满：照片与数字格收紧防溢出裁切 */
  html.h-scroll .hero-stage {
    grid-template-columns: minmax(240px, 340px);
    justify-content: end;
    gap: clamp(20px, 3vh, 32px);
  }
  html.h-scroll .countdown-cell {
    min-width: 64px;
    padding: 8px 12px;
  }
  html.h-scroll .countdown-num {
    font-size: clamp(24px, 2.6vw, 34px);
  }
  html.h-scroll .frame-wall {
    max-width: 1500px;
  }
  html.h-scroll .site-footer {
    margin-top: var(--space-5);
  }
}

/* ============ 暗色玻璃面板内的文字/控件：统一祝福页语言 ============ */
.scene-head h2 em,
.rsvp-intro h2 em {
  color: var(--gold-bright);
}
.rsvp-intro strong {
  color: var(--gold-bright);
}
.rsvp-note svg {
  color: var(--gold);
}
.form-note.is-success {
  color: var(--gold-bright);
}
.rsvp-form .field input,
.rsvp-form .field select,
.rsvp-form .field textarea {
  background: rgba(35, 26, 30, 0.55);
  border-color: rgba(228, 201, 140, 0.35);
  color: #f2e7d5;
}
.rsvp-form .field input::placeholder,
.rsvp-form .field textarea::placeholder {
  color: rgba(228, 201, 140, 0.55);
}
.rsvp-form .field input:focus,
.rsvp-form .field select:focus,
.rsvp-form .field textarea:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(228, 201, 140, 0.18);
}
.rsvp-form .field > svg {
  color: var(--gold);
}
.choice-card-inner {
  background: rgba(35, 26, 30, 0.5);
}
.choice-card input:checked + .choice-card-inner {
  border-color: var(--gold-bright);
  background: rgba(228, 201, 140, 0.12);
  box-shadow: 0 8px 20px rgba(228, 201, 140, 0.14);
}
.choice-card input:checked + .choice-card-inner svg {
  color: var(--gold-bright);
}
.rsvp-form .btn-submit {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--night);
  box-shadow: 0 10px 24px rgba(201, 161, 91, 0.35);
}
.rsvp-form .btn-submit:hover {
  box-shadow: 0 14px 30px rgba(201, 161, 91, 0.45);
}

/* ============ 响应式：移动端 ============ */
@media (max-width: 1024px) {
  .cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 16px calc(3vh + env(safe-area-inset-bottom));
  }
  .cover-calligraphy {
    left: auto;
    right: 8px;
    top: 16vh;
    transform: none;
    gap: 10px;
    font-size: 17px;
    opacity: 0.55;
  }
  .cover.is-opening .cover-calligraphy {
    transform: translateX(14px);
  }
  .brand-text {
    display: none;
  }
}
@media (max-width: 980px) {
  .menu-button {
    display: grid;
  }
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-header) - 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: min(78vw, 320px);
    padding: 90px 34px;
    background: var(--card);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-night);
    transform: translateX(105%);
    border-radius: 26px 0 0 26px;
    transition: transform 0.45s var(--ease-out);
  }
  .site-nav.is-open {
    transform: none;
  }
  .nav-link {
    font-size: 17px;
    padding: 10px 0;
  }
  .side-nav {
    right: 8px;
    gap: 8px;
  }
  .chip {
    width: 32px;
    height: 32px;
  }
  .chip span {
    font-size: 13px;
  }
  .chip::before {
    display: none;
  }
  .phase-label {
    display: none;
  }
}
@media (max-width: 740px) {
  /* 毛玻璃面板收紧，保住一屏一页 */
  .scene-head,
  .hero-panel,
  .chapter-copy,
  .schedule,
  .rsvp-intro {
    padding: 12px 14px;
  }

  /* 场景节奏：一屏一页 —— 顶栏、翻页条让位，内容收紧 */
  .scene {
    padding-top: calc(62px + env(safe-area-inset-top));
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  .scene-head h2,
  .rsvp-intro h2 {
    font-size: clamp(22px, 6.2vw, 26px);
  }
  .kicker {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .lede {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.65;
  }

  /* 章节翻页条：时辰签移到拇指可及的底部整排 */
  .side-nav {
    top: auto;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 999px;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(23, 19, 24, 0.22), inset 0 0 0 1px var(--hairline);
  }
  .chip {
    width: 32px;
    height: 32px;
  }
  .chip span {
    font-size: 13.5px;
  }

  /* 提示条抬到翻页条上方 */
  .toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* 首屏层级：倒计时与出席按钮提到照片之前 */
  .hero-stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }
  .hero-panel {
    order: -1;
    gap: 8px;
  }
  .hero-frame {
    width: 100%;
    max-width: none;
    margin-inline: auto;
  }
  .hero-frame img {
    aspect-ratio: auto;
    height: 272px;
    object-fit: cover;
    object-position: top center; /* 保留上半部（人物面部），裁去下半 */
  }

  /* 相遇：双章改为「图 × 文」横排，两章并置进一页 */
  .chapter {
    grid-template-columns: minmax(120px, 42%) 1fr;
    align-items: center;
    gap: 16px;
  }
  .chapter .frame {
    max-width: none;
  }
  .chapter-copy h3 {
    margin-top: 0;
    font-size: 19px;
  }
  .chapter-copy > p {
    font-size: 13.5px;
  }

  /* 日程：条目收紧，场馆双按钮并排 */
  .schedule li {
    padding: 12px 14px;
  }
  .venue-actions {
    grid-template-columns: 1fr 1fr;
  }

  /* 影像：横向胶片带 —— 竖向一屏一页，照片左右滑动浏览 */
  .frame-wall {
    display: flex;
    gap: 12px;
    max-width: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .frame-wall::-webkit-scrollbar {
    display: none;
  }
  .frame-wall .frame {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }
  .frame-wall .frame-a {
    max-width: none;
    margin-top: 0;
  }

  /* 落款：表单双列收紧，页脚并作一行 */
  .rsvp-wrap {
    gap: 12px;
  }
  .rsvp-form {
    gap: 8px;
    padding: 13px;
  }
  .rsvp-intro > p {
    margin-top: 6px;
    font-size: 13px;
  }
  .rsvp-note {
    margin-top: 6px;
    font-size: 11.5px;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .form-group label,
  .form-group legend {
    margin-bottom: 4px;
    font-size: 12px;
  }
  .field input,
  .field select {
    min-height: 38px;
    padding: 7px 10px 7px 32px;
    font-size: 13px;
  }
  .field > svg {
    left: 10px;
  }
  .field textarea {
    min-height: 40px;
  }
  .choice-cards {
    gap: 8px;
  }
  .choice-card-inner {
    padding: 8px 11px;
  }
  .choice-card-inner strong {
    font-size: 13px;
  }
  .choice-card-inner > span {
    font-size: 11px;
  }
  .btn-submit {
    min-height: 40px;
    padding: 8px 18px;
  }
  .form-note {
    font-size: 11px;
  }
  .site-footer {
    margin-top: 10px;
    padding-top: 10px;
  }
  .footer-inner {
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }
  .footer-mark {
    font-size: 14px;
    padding: 4px 8px;
  }
  .footer-thanks {
    font-size: 11.5px;
  }
  .footer-date,
  .back-to-top {
    display: none;
  }

  /* 倒计时强制单行：四格均分，窄屏不换行 */
  .countdown-label {
    font-size: 11px;
    letter-spacing: 0.22em;
  }
  .countdown-grid {
    gap: 8px;
    margin-top: 6px;
  }
  .countdown-cell {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
  }
  .countdown-num {
    font-size: 22px;
  }
  /* 日期地点已由 hero-place 呈现，窄屏省去重复行 */
  .hero-facts {
    display: none;
  }
  /* 日程：整页一屏 —— 条目与场馆卡同步收紧 */
  .schedule {
    gap: 0;
    padding: 10px 12px;
  }
  .schedule li {
    grid-template-columns: 50px 1fr;
    gap: 12px;
    padding: 7px 8px;
  }
  .schedule li strong {
    font-size: 14px;
  }
  .schedule li p {
    font-size: 11.5px;
  }
  .schedule::before,
  .schedule li::after {
    left: 58px;
  }
  .schedule li::after {
    top: 18px;
  }
  .schedule time {
    font-size: 16px;
  }
  .venue {
    padding: 13px 14px;
  }
  .venue h3 {
    margin: 6px 0 2px;
    font-size: 18px;
  }
  .venue-address {
    font-size: 12.5px;
  }
  .venue-notes {
    margin-top: 6px;
    font-size: 12px;
  }
  .venue-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }
  .venue-actions .btn-on-dark {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 12.5px;
  }
  .lightbox-nav {
    top: auto;
    bottom: calc(64px + env(safe-area-inset-bottom));
    transform: none;
  }
  .lightbox-nav:hover {
    transform: scale(1.06);
  }
  .lightbox-nav.is-prev {
    left: calc(50% - 62px);
  }
  .lightbox-nav.is-next {
    right: calc(50% - 62px);
  }
}
/* 平板竖向模式：限制照片宽度，避免单页被撑成两三屏 */
@media (min-width: 741px) and (max-width: 1024px) {
  .hero-frame {
    max-width: 340px;
    margin-inline: auto;
  }
  .chapter .frame {
    max-width: 440px;
    margin-inline: auto;
  }
  .frame-wall {
    max-width: 720px;
  }
}

/* ============ 章节翻页吸附（移动 / 触屏；纯 CSS，无 GSAP 也生效） ============ */
/* 每幕即一页：停稳必落页首/页尾，绝不骑在两幕之间 */
/* ============ 无障碍与降级 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal-curtain,
  [data-split],
  [data-split] .split-char {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    animation: none !important;
  }
  .reveal-curtain img {
    transform: none !important;
  }
  .schedule li {
    opacity: 1 !important;
    transform: none !important;
  }
  .cover-motes,
  .petals,
  .cover-curtain,
  .cover-dawn,
  .sun-arc {
    display: none;
  }
}
html.no-js .cover {
  display: none;
}
html.no-js body {
  overflow: auto;
}
html.no-js .site-shell {
  visibility: visible;
}
