﻿/* ══════════════════════════════════════════════
   春玲 & 宏达 · The Archive
   编辑杂志式个人影像站 · 2026.07.16
══════════════════════════════════════════════ */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'Serif SC';
  src: url('../fonts/serif-sc-400-sub.woff2?v=10') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Serif SC';
  src: url('../fonts/serif-sc-600-sub.woff2?v=10') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Serif SC';
  src: url('../fonts/serif-sc-900-sub.woff2?v=10') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Hand CN';
  src: url('../fonts/mashanzheng-sub.woff2?v=10') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- 变量与主题 ---------- */
:root {
  --serif-cn: 'Cormorant', 'Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --serif-en: 'Cormorant', 'Times New Roman', serif;
  --hand: 'Hand CN', 'Kaiti SC', 'KaiTi', cursive;

  --cream: #f3eee6;
  --paper: #faf7f0;
  --ink:   #191713;
  --red:   #8a1f1f;
  --red-deep: #641414;
  --gold:  #c8a15a;
  --navy:  #10131c;
  --mist:  #e7e9e6;

  --bg: var(--cream);
  --fg: var(--ink);
  --ac: var(--red);

  --pad: clamp(1.2rem, 4vw, 4rem);
  --nav-h: 72px;
}
body[data-theme="cream"]   { --bg: var(--cream); --fg: var(--ink);  --ac: var(--red); }
body[data-theme="paper"]   { --bg: var(--paper); --fg: var(--ink);  --ac: var(--red); }
body[data-theme="mist"]    { --bg: var(--mist);  --fg: var(--ink);  --ac: #35506b; }
body[data-theme="red"]     { --bg: var(--red-deep); --fg: #f5e9d6; --ac: var(--gold); }
body[data-theme="deepred"] { --bg: #571010; --fg: #f5e9d6; --ac: var(--gold); }
body[data-theme="navy"]    { --bg: var(--navy);  --fg: #e8e4dc; --ac: #9aa7c7; }
body[data-theme="ink"]     { --bg: #141210; --fg: #ece7dd; --ac: var(--gold); }

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: initial; overflow-x: clip; /* 真机上 body 的 overflow-x 会失灵（尤其 iOS），根上再拦一道横向溢出 */ }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--serif-cn);
  background: var(--bg);
  color: var(--fg);
  transition: background-color .9s cubic-bezier(.4,0,.2,1), color .9s cubic-bezier(.4,0,.2,1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
::selection { background: var(--red); color: #fff; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
em, i { font-family: var(--serif-en); }
figure { position: relative; }

/* ---------- 胶片颗粒 ---------- */
.grain {
  position: fixed; inset: -30%; /* 覆盖动画位移（最大 ~7%）即可，收小合成层省 GPU 内存 */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .055;
  pointer-events: none;
  z-index: 9500;
  animation: grain 7s steps(9) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  15% { transform: translate(-6%,4%); }
  35% { transform: translate(4%,-7%); }
  55% { transform: translate(-5%,-4%); }
  75% { transform: translate(6%,5%); }
  90% { transform: translate(-3%,6%); }
}

/* ---------- 自定义光标 ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  html.js, html.js body, html.js a, html.js button, html.js .ph, html.js .mq, html.js .strip-item { cursor: none; }
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 9800; pointer-events: none; }
  .cursor-dot {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: var(--fg); transform: translate(-50%,-50%);
    transition: background-color .4s;
  }
  .cursor-ring {
    position: absolute; width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--fg) 55%, transparent);
    transform: translate(-50%,-50%) scale(1);
    display: flex; align-items: center; justify-content: center;
    transition: transform .45s cubic-bezier(.22,1,.36,1), background-color .45s, border-color .45s;
  }
  .cursor-label {
    font-family: var(--serif-cn); font-size: 12px; font-style: normal;
    opacity: 0; transition: opacity .3s; color: #fff; letter-spacing: .1em;
  }
  .cursor--view .cursor-ring, .cursor--drag .cursor-ring {
    transform: translate(-50%,-50%) scale(1.9);
    background: rgba(20,18,16,.55); border-color: transparent;
    backdrop-filter: blur(2px);
  }
  .cursor--view .cursor-label, .cursor--drag .cursor-label { opacity: 1; }
  .cursor--press .cursor-ring { transform: translate(-50%,-50%) scale(1.4); }
  .cursor--hide { opacity: 0; }
}

/* ---------- 开场 loader ---------- */
.loader { position: fixed; inset: 0; z-index: 9900; }
.loader-panel { position: absolute; left: 0; width: 100%; height: 50.5%; background: var(--ink); }
.loader-panel--a { top: 0; }
.loader-panel--b { bottom: 0; }
.loader-core {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem; color: var(--cream);
}
.loader-names-v {
  display: flex; align-items: center; gap: clamp(1.2rem, 4vw, 2.2rem);
}
.loader-name {
  writing-mode: vertical-rl;
  font-weight: 900; font-size: clamp(1.5rem, 4vw, 2.3rem); letter-spacing: .5em;
}
.loader-amp {
  font-style: italic; font-weight: 400; color: var(--gold);
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
}
.loader-count {
  font-family: var(--serif-en); font-weight: 500; font-style: italic;
  font-size: clamp(2.6rem, 6vw, 4rem); color: var(--gold); line-height: 1;
}
.loader-tip { font-size: .78rem; letter-spacing: .5em; text-indent: .5em; opacity: .5; }

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  padding-top: env(safe-area-inset-top);
  color: var(--fg);
  transition: color .9s, transform .5s;
}
.nav--hidden { transform: translateY(-110%); }
.nav-brand { font-weight: 900; font-size: 1.15rem; letter-spacing: .12em; display: inline-block; }
.nav-brand .amp { font-style: italic; font-weight: 500; color: var(--ac); margin: 0 .15em; transition: color .9s; }
.nav-right { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); }
.nav-date {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .8rem; letter-spacing: .12em;
  border: 1px solid color-mix(in srgb, var(--fg) 40%, transparent);
  border-radius: 100px; padding: .5em 1.1em;
  transition: background-color .4s, color .4s, border-color .9s;
}
.nav-date:hover { background: var(--fg); color: var(--bg); }
.nav-date-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 2s infinite; }
.nav-date:hover .nav-date-dot { background: var(--gold); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.nav-burger { position: relative; width: 40px; height: 40px; display: inline-block; }
.nav-burger span {
  position: absolute; left: 8px; right: 8px; height: 1.5px; background: currentColor;
  transition: transform .45s cubic-bezier(.22,1,.36,1), top .45s, bottom .45s;
}
.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { bottom: 15px; }
body.menu-open .nav-burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { bottom: 19.5px; transform: rotate(-45deg); }
body.menu-open .nav { color: #f5e9d6; }

/* ---------- 全屏菜单 ---------- */
.menu { position: fixed; inset: 0; z-index: 8900; visibility: hidden; }
.menu-bg { position: absolute; inset: 0; background: var(--red-deep); }
.menu-preview {
  position: absolute; right: 8vw; top: 50%; width: min(24vw, 340px); aspect-ratio: 3/4;
  translate: 0 -50%; overflow: hidden; border-radius: 4px;
  opacity: 0; pointer-events: none;
}
.menu-preview img { width: 100%; height: 100%; object-fit: cover; }
.menu-list {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 max(var(--pad), 8vw); gap: .2em;
}
.menu-link {
  display: flex; align-items: baseline; gap: 1.2em; width: fit-content;
  font-size: clamp(1.9rem, 5.2vh, 3.4rem); font-weight: 900; color: #f5e9d6;
  line-height: 1.35; opacity: 0; transform: translateY(40px);
  transition: color .3s;
}
.menu-link em { font-size: .38em; font-style: italic; font-weight: 500; color: var(--gold); letter-spacing: .1em; min-width: 2.2em; }
.menu-link:hover { color: var(--gold); }
.menu-link--xi em { font-family: var(--serif-cn); }
.menu-foot {
  position: absolute; bottom: calc(1.4rem + env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; justify-content: space-between; padding: 0 var(--pad);
  font-size: .75rem; letter-spacing: .15em; color: rgba(245,233,214,.55);
  flex-wrap: wrap; gap: .4em;
}

/* ---------- 章节指示点 ---------- */
.dots {
  position: fixed; right: clamp(.7rem, 1.6vw, 1.6rem); top: 50%; transform: translateY(-50%);
  z-index: 8000; display: flex; flex-direction: column; gap: 14px;
}
.dots a { position: relative; width: 10px; height: 10px; display: block; }
.dots a::after {
  content: ''; position: absolute; inset: 2.5px; border-radius: 50%;
  background: color-mix(in srgb, var(--fg) 38%, transparent);
  transition: background-color .4s, transform .4s;
}
.dots a.on::after { background: var(--ac); transform: scale(1.5); }
.dots a .tip {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: .72rem; letter-spacing: .2em; white-space: nowrap; color: var(--fg);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.dots a:hover .tip { opacity: .8; }
@media (max-width: 768px) { .dots { display: none; } }

/* ---------- 图片通用 ---------- */
.ph-media {
  position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  border-radius: 3px;
}
.ph-media--fill { position: absolute; inset: 0; border-radius: 0; }
.ph-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity .9s ease, transform 1.6s cubic-bezier(.22,1,.36,1);
}
.ph-media img.loaded { opacity: 1; transform: scale(1); }
.ph { position: relative; }
.ph figcaption {
  margin-top: .7em; font-size: .78rem; letter-spacing: .22em;
  color: color-mix(in srgb, var(--fg) 72%, transparent);
  display: flex; align-items: center; gap: .8em;
}
.ph figcaption::before {
  content: ''; width: 2.2em; height: 1px;
  background: color-mix(in srgb, var(--fg) 45%, transparent);
}

/* ---------- HERO · 囍门 ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; color: #fff; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media picture, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,12,.28) 0%, rgba(10,10,12,.05) 34%, rgba(10,10,12,.02) 55%, rgba(10,10,12,.5) 100%);
}
/* 人物抠图层：背景板(0) < 标题(2) < 人物(3) < 囍门(5) 的三明治层深 */
.hero-cut {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
}
.hero-cut picture, .hero-cut img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 墨色门扇：SVG 由 JS 按视口现拼（囍字笔画即取景窗） */
.hero-gate {
  position: absolute; inset: 0; z-index: 5;
  will-change: transform, opacity;
}
.hero-gate-mask, .hero-gate-mask svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-gate-ui { position: absolute; inset: 0; }
.gate-top {
  position: absolute; top: calc(var(--nav-h) + 2.5vh); left: 0; right: 0;
  display: flex; justify-content: center; align-items: baseline; gap: 1em;
  font-weight: 600; font-size: clamp(.95rem, 2vw, 1.2rem); letter-spacing: .5em; text-indent: .5em;
  color: var(--cream);
}
.gate-top i { font-style: italic; color: var(--gold); letter-spacing: 0; text-indent: 0; }
.gate-top-en {
  position: absolute; top: calc(var(--nav-h) + 2.5vh + 2.6em); left: 0; right: 0;
  text-align: center; font-family: var(--serif-en); font-style: italic;
  font-size: .74rem; letter-spacing: .34em; color: rgba(245,233,214,.5);
}
.gate-hint {
  position: absolute; bottom: calc(2.4rem + env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1em;
  font-size: .76rem; letter-spacing: .42em; text-indent: .42em; color: rgba(245,233,214,.8);
}
.gate-hint i { width: 1px; height: 52px; background: rgba(245,233,214,.4); position: relative; overflow: hidden; }
.gate-hint i::after {
  content: ''; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--gold); animation: scrollHint 1.8s cubic-bezier(.6,0,.3,1) infinite;
}
@keyframes scrollHint { 0% { top: -50%; } 100% { top: 110%; } }
.hero-inner {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 var(--pad) clamp(5.5rem, 12vh, 9rem);
}
.hero-kicker {
  font-size: clamp(.78rem, 1.4vw, .95rem); letter-spacing: .5em;
  margin-bottom: clamp(1rem, 3vh, 2rem); opacity: .92;
  display: flex; align-items: center; gap: 1.2em;
}
.hero-kicker i { font-style: italic; letter-spacing: .18em; opacity: .8; font-size: .92em; }
.hero-title { font-weight: 900; line-height: 1.02; }
.hero-line { display: block; font-size: clamp(3.2rem, 11.5vw, 10rem); letter-spacing: .04em; }
.hero-line--amp { display: flex; align-items: baseline; gap: .12em; }
.amp-big {
  font-style: italic; font-weight: 400; color: var(--gold);
  font-size: clamp(2.4rem, 8.6vw, 7.5rem);
  transform: translateY(.06em);
}
.hero-sub {
  margin-top: clamp(1.2rem, 3.4vh, 2.4rem);
  font-size: clamp(.85rem, 1.6vw, 1.05rem); letter-spacing: .34em; opacity: .95;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6em 1.6em;
}
.hero-sub-en { font-family: var(--serif-en); font-style: italic; letter-spacing: .12em; opacity: .78; }

/* ---------- 序 ---------- */
.xu { position: relative; overflow: hidden; padding: clamp(7rem, 18vh, 13rem) var(--pad); }
.xu-mark {
  position: absolute; right: -4%; top: 2%; z-index: 0;
  font-size: clamp(14rem, 30vw, 27rem); font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--fg) 11%, transparent);
  pointer-events: none; user-select: none;
}
.xu-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.xu-lead {
  font-weight: 900; font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 1.28; letter-spacing: .06em;
}
.xu-body {
  margin: clamp(2.4rem, 6vh, 4rem) 0 0 auto;
  max-width: 34em; font-size: clamp(.95rem, 1.8vw, 1.12rem);
  color: color-mix(in srgb, var(--fg) 82%, transparent);
  display: grid; gap: 1.1em; line-height: 2.1;
}
.xu-words {
  margin-top: clamp(5rem, 13vh, 9rem);
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  gap: .35em; font-size: clamp(1.4rem, 4.2vw, 3rem); font-weight: 600; letter-spacing: .1em;
}
.xu-cycle {
  position: relative; display: inline-block; height: 1.5em; overflow: hidden;
  vertical-align: bottom; min-width: 2.6em; text-align: center;
}
.xu-cycle b {
  position: absolute; left: 0; right: 0; top: 0; height: 100%;
  font-weight: 900; color: var(--ac);
  transform: translateY(110%);
}

/* ---------- 章节公共 ---------- */
.ch { padding-top: clamp(6rem, 14vh, 11rem); }
.ch-head { padding: 0 var(--pad) clamp(3rem, 8vh, 6rem); position: relative; z-index: 1; }
/* 大图/舞台滑过盖住钉住的章节标题 → 层叠深度 */
.ch-lead, .ch-wide { z-index: 2; }
.ch-num {
  display: flex; align-items: baseline; gap: 1.4em;
  font-size: clamp(4.4rem, 13vw, 11rem); font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--fg) 34%, transparent);
}
.ch-num i {
  font-size: clamp(.85rem, 1.6vw, 1.05rem); font-style: italic; letter-spacing: .3em;
  color: color-mix(in srgb, var(--fg) 55%, transparent);
  -webkit-text-stroke: 0;
}
.ch-title {
  margin-top: -.4em;
  font-size: clamp(2.6rem, 8vw, 6.4rem); font-weight: 900; letter-spacing: .1em;
  line-height: 1.15;
}
.ch-poem {
  margin-top: 1.4em; font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: .28em; color: color-mix(in srgb, var(--fg) 75%, transparent);
  line-height: 2;
}

/* 满屏主打图 */
.ch-lead { position: relative; height: 100svh; min-height: 480px; margin: 0 0 clamp(4rem, 10vh, 8rem); }
.ch-lead .ph-media { border-radius: 0; }
.ch-lead .ph-media img { transform: scale(1.18); transition: opacity .9s; }
.ch-lead .ph-media img.loaded { transform: none; }

/* 错位网格 */
.ch-grid, .ch-duo, .her-collage { position: relative; padding: 0 var(--pad); display: grid; gap: clamp(1.4rem, 4vw, 4rem); }
.ch-grid { grid-template-columns: repeat(2, 1fr); }
.ch-grid .ph:nth-child(odd)  { width: 88%; }
.ch-grid .ph:nth-child(even) { width: 82%; margin-left: auto; margin-top: clamp(3rem, 9vh, 7rem); }
.ch-duo { grid-template-columns: 1.15fr .85fr; margin-top: clamp(4rem, 10vh, 8rem); padding-bottom: clamp(6rem, 14vh, 10rem); }
.ch-duo .ph:last-child { margin-top: clamp(4rem, 10vh, 7rem); }

/* 全宽引言图 */
.ch-wide { position: relative; height: min(92svh, 900px); margin: clamp(4rem, 10vh, 8rem) 0 0; overflow: hidden; }
.ch-wide .ph-media { border-radius: 0; }
.ch-wide .ph-media img { transform: scale(1.15); }
.ch-wide-cap {
  position: absolute; z-index: 3; left: var(--pad); bottom: clamp(2rem, 6vh, 4rem);
  max-width: 18em; color: #fff;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem); letter-spacing: .18em; line-height: 2;
  text-shadow: 0 1px 24px rgba(0,0,0,.5);
}
.ch-wide-cap--center {
  left: 0; right: 0; bottom: 50%; transform: translateY(50%); /* left:50% 的收缩适应宽度只有半屏，手机上会挤成碎行 */
  max-width: none; text-align: center;
  font-size: clamp(1.5rem, 4.2vw, 3rem); font-weight: 600; letter-spacing: .22em;
}
.ch-wide::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.34), transparent 46%);
}

/* 中式红章节的点缀 */
.ch--red .ph figcaption { color: color-mix(in srgb, var(--gold) 85%, transparent); }

/* ---------- 全身像舞台（竖构图专用，不裁人） ---------- */
.stage {
  position: relative; z-index: 2;
  height: 100svh; min-height: 560px;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--bg);
  transition: background-color .9s cubic-bezier(.4,0,.2,1);
}
.stage-word {
  position: absolute; left: 50%; top: 50%; translate: -50% -54%;
  z-index: 0; line-height: 1; pointer-events: none; user-select: none;
  font-weight: 900; font-size: clamp(24rem, 58vw, 66rem);
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--gold) 34%, transparent);
}
.stage-photo {
  position: relative; z-index: 1;
  height: min(80svh, 152vw);
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}
/* 抠图人物版：无相框，阴影贴着人形走 */
.stage-photo--cut { box-shadow: none; filter: drop-shadow(0 34px 60px rgba(0,0,0,.5)); }
.ph-media--cut { overflow: visible; background: none; border-radius: 0; height: 100%; }
.ph-media--cut img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .9s ease;
}
.ph-media--cut img.loaded { opacity: 1; transform: none; }
.stage-photo .ph-media { height: 100%; }
.stage-side {
  position: absolute; z-index: 2;
  right: clamp(.6rem, 12vw, 18vw); top: 50%; translate: 0 -50%;
  display: flex; gap: 1.6em; align-items: flex-start;
  pointer-events: none;
}
.stage-side-cn {
  writing-mode: vertical-rl;
  font-weight: 900; font-size: clamp(1.3rem, 3.4vw, 2.4rem);
  letter-spacing: .34em; color: var(--gold);
  text-shadow: 0 2px 30px rgba(0,0,0,.55);
}
.stage-side-en {
  writing-mode: vertical-rl;
  font-family: var(--serif-en); font-style: italic;
  font-size: clamp(.72rem, 1.4vw, .9rem); letter-spacing: .2em;
  color: color-mix(in srgb, var(--fg) 62%, transparent);
  margin-top: 2.5em;
}
.stage-seal {
  position: absolute; z-index: 2; left: clamp(1rem, 14vw, 19vw); bottom: 16%;
  width: 2.3em; height: 2.3em; display: grid; place-items: center;
  background: #a32222; color: #f7f1e4;
  font-size: clamp(1rem, 2.2vw, 1.5rem); font-weight: 900;
  border-radius: 6px; rotate: -7deg;
  box-shadow: 0 6px 24px rgba(60,8,8,.5);
  pointer-events: none;
}

/* ---------- 满幅图上的异速浮层大字 ---------- */
.lead-float {
  position: absolute; z-index: 3; left: var(--pad); top: 34%;
  display: flex; flex-direction: column; gap: .4em;
  font-weight: 900; font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  letter-spacing: .16em; line-height: 1.2; color: #fff;
  text-shadow: 0 4px 44px rgba(0,0,0,.45);
  pointer-events: none;
}
.lead-float i {
  font-family: var(--serif-en); font-style: italic; font-weight: 400;
  font-size: clamp(.9rem, 1.8vw, 1.2rem); letter-spacing: .3em;
  color: var(--gold);
  text-shadow: 0 2px 20px rgba(0,0,0,.55);
}

/* ---------- 手写漂浮词（网格间的深度层） ---------- */
.fw {
  position: absolute; z-index: 3;
  font-family: var(--hand); font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem); line-height: 1;
  color: color-mix(in srgb, var(--ac) 55%, transparent);
  pointer-events: none; user-select: none;
  rotate: -5deg;
}
body[data-theme="red"] .fw, body[data-theme="ink"] .fw, body[data-theme="navy"] .fw {
  color: color-mix(in srgb, var(--gold) 60%, transparent);
}

/* ---------- 章节巨字：织在照片层与层之间 ---------- */
.grid-word {
  position: absolute; left: 50%; top: 34%; translate: -50% -50%;
  z-index: 0; line-height: 1; pointer-events: none; user-select: none;
  font-weight: 900; font-size: clamp(15rem, 56vw, 30rem);
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--fg) 15%, transparent);
}
.ch--red .grid-word { -webkit-text-stroke-color: color-mix(in srgb, var(--gold) 26%, transparent); }

/* ---------- 视频段落 ---------- */
.moment { position: relative; }
.moment-pin {
  height: 100svh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.moment-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em;
  text-align: center;
}
.moment-text h2 { font-size: clamp(2.2rem, 7vw, 5.5rem); font-weight: 900; letter-spacing: .14em; }
.moment-text p { font-size: clamp(.9rem, 2vw, 1.15rem); letter-spacing: .34em; opacity: .75; }
.moment-frame {
  position: relative;
  width: min(30vh, 42vw); aspect-ratio: 9/16;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
}
.moment-frame video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 山海横向长卷 ---------- */
.strip { position: relative; overflow: hidden; height: 100vh; height: 100svh; display: flex; align-items: center; }
.strip-track {
  display: flex; align-items: center; gap: clamp(1.6rem, 4vw, 4rem);
  padding: 0 var(--pad); width: max-content;
}
.strip-item { position: relative; height: min(72vh, 720px); flex: none; width: min(112vh, 82vw); }
.strip-item--tall { width: min(52vh, 60vw); }
.strip-item figcaption {
  position: absolute; left: 1.2em; bottom: 1em; z-index: 2; color: #fff;
  font-size: .78rem; letter-spacing: .22em; text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.ch-wide--sunset { margin-top: clamp(5rem, 12vh, 9rem); height: 100svh; }

/* ---------- 她自己 · 拼贴 ---------- */
.ch-lead--her { height: 88svh; }
.her-collage { grid-template-columns: repeat(3, 1fr); padding-bottom: clamp(6rem, 14vh, 10rem); }
.her-collage .ph:nth-child(3n+2) { margin-top: clamp(2.5rem, 7vh, 5rem); }
.her-collage .ph:nth-child(3n)   { margin-top: clamp(1.2rem, 4vh, 3rem); width: 88%; }
.ph--note .note-hand {
  position: absolute; right: -.4em; top: -1.6em; z-index: 3;
  font-family: var(--hand); font-style: normal; font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--red);
  animation: noteWiggle 5.5s ease-in-out infinite;
}
@keyframes noteWiggle {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(9deg) translateY(-5px); }
}
body[data-theme="ink"] .ph--note .note-hand,
body[data-theme="navy"] .ph--note .note-hand { color: var(--gold); }

/* ---------- 陆 · 纸上三幕（剪纸拼贴剧场：全矢量布景 + 贴纸化真人纸偶） ---------- */
.theater { position: relative; }
.th-pin {
  position: relative; height: 100svh; overflow: hidden;
  background: #2c0705;
}
.th-act { position: absolute; inset: 0; visibility: hidden; opacity: 0; }
.th-act > * { position: absolute; }
.th-bg { inset: 0; }
.th-bg--bai {
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(232,196,118,.14) 0%, transparent 60%),
    radial-gradient(130% 105% at 50% 26%, #872020 0%, #5c1010 55%, #3a0908 100%);
}
.th-bg--sea {
  background:
    radial-gradient(52% 42% at 18% 26%, rgba(247,212,137,.5) 0%, transparent 70%),
    linear-gradient(to bottom, #f7ecd2 0%, #f3ddab 46%, #edd4a4 64%, #e3cba0 100%);
}
.th-bg--night {
  background:
    radial-gradient(46% 38% at 22% 22%, rgba(240,223,168,.16) 0%, transparent 70%),
    linear-gradient(to bottom, #0a0e1a 0%, #131a2c 55%, #1a2338 100%);
}

/* 纸偶（贴纸化真人抠图）：GSAP 只动外壳，内层 img 留给常驻小动画；::after 是落地接触影。
   居中一律用 left:0/right:0 + margin:auto——CSS translate:-50% 会在图片未加载（宽 0）时
   被 GSAP 折算成 0px 固化，人偶会整体偏移半张图宽 */
.th-puppet { pointer-events: none; }
.th-puppet::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1.8svh; margin: auto;
  width: 74%; height: 3.2svh; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(10,6,4,.4), transparent 72%);
  filter: blur(3px);
}
.th-couple { display: block; height: 100%; width: auto; margin: 0 auto; filter: drop-shadow(0 22px 34px rgba(0,0,0,.42)); }

/* 幕一 · 剪纸喜堂 */
.th-medal {
  left: 50%; top: 36svh; translate: -50% -50%;
  width: clamp(340px, 60svh, 640px); aspect-ratio: 1;
}
.th-lattice { top: 11svh; height: 66svh; width: clamp(90px, 11vw, 190px); filter: drop-shadow(0 10px 24px rgba(20,4,3,.4)); }
.th-lattice--l { left: 2.6vw; }
.th-lattice--r { right: 2.6vw; }
.th-lantern { top: 0; width: clamp(64px, 9vw, 120px); z-index: 2; }
.th-lantern--l { left: clamp(13vw, 16vw, 19vw); }
.th-lantern--r { right: clamp(13vw, 16vw, 19vw); }
.th-lantern svg { display: block; transform-origin: 50% 0; animation: lanternSwing 4.6s ease-in-out infinite; filter: drop-shadow(0 10px 28px rgba(255,140,60,.35)); }
.th-lantern--r svg { animation-delay: -2.3s; }
@keyframes lanternSwing { 0%,100% { transform: rotate(3.4deg); } 50% { transform: rotate(-3.4deg); } }
.th-floor { left: 0; bottom: 0; width: 100%; height: clamp(120px, 20svh, 230px); }
.th-puppet--bai { left: 0; right: 0; bottom: 15svh; height: 54svh; }
.th-puppet--bai::after { width: 33svh; }
.th-table { left: 50%; bottom: 4.5svh; translate: -50% 0; width: clamp(280px, 26vw, 460px); filter: drop-shadow(0 14px 26px rgba(10,3,2,.5)); }
.th-seal {
  position: absolute; right: clamp(6vw, 16vw, 20vw); top: 18svh; z-index: 5;
  font-family: var(--hand); font-size: clamp(2rem, 5.5vw, 4rem);
  color: #f2d9a0; rotate: -8deg;
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
}

/* 幕二 · 晨光纸海 */
.th-sun { left: 12vw; top: 13svh; width: clamp(90px, 11vw, 170px); filter: drop-shadow(0 0 46px rgba(238,194,94,.55)); }
.th-cloud { filter: drop-shadow(0 6px 14px rgba(160,120,60,.18)); }
.th-cloud--a { right: 11vw; top: 15svh; width: clamp(150px, 17vw, 280px); animation: cloudDrift 14s ease-in-out infinite alternate; }
.th-cloud--b { left: 33vw; top: 8svh; width: clamp(100px, 12vw, 200px); opacity: .8; animation: cloudDrift 18s ease-in-out infinite alternate-reverse; }
@keyframes cloudDrift { from { translate: -1.2vw 0; } to { translate: 1.2vw 0; } }
.th-gulls { left: 42vw; top: 15svh; width: clamp(140px, 20vw, 300px); }
.th-mount { pointer-events: none; }
.th-mount--seafar { left: -5vw; width: 110vw; height: 13svh; bottom: 30svh; opacity: .85; }
.th-mount--sea { left: -6vw; width: 112vw; height: 15svh; bottom: 26svh; }
/* 纸浪：外壳给 GSAP，里层 svg 自然漂移 */
.th-wave { pointer-events: none; }
.th-wave svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 -8px 22px rgba(60,100,92,.25)); }
.th-wave--far  { left: -4vw; width: 108vw; height: clamp(120px, 22svh, 260px); bottom: 13svh; }
.th-wave--near { left: -6vw; width: 112vw; height: clamp(160px, 27svh, 320px); bottom: -2svh; }
.th-wave--far svg  { animation: waveDrift 9s ease-in-out infinite alternate; }
.th-wave--near svg { animation: waveDrift 11s ease-in-out infinite alternate-reverse; }
@keyframes waveDrift { from { transform: translateX(-1.6vw); } to { transform: translateX(1.6vw); } }
.th-boat { left: 19vw; bottom: 31svh; width: clamp(70px, 8vw, 130px); filter: drop-shadow(0 8px 16px rgba(50,80,74,.35)); }
.th-boat svg { width: 100%; display: block; animation: boatRock 5.4s ease-in-out infinite; transform-origin: 50% 88%; }
@keyframes boatRock { 0%,100% { transform: rotate(-2.6deg) translateY(0); } 50% { transform: rotate(2.2deg) translateY(-6px); } }
.th-puppet--sea { left: 0; right: 0; bottom: 11svh; height: 44svh; }
.th-puppet--sea::after { opacity: .55; bottom: -1svh; width: 63svh; }
.th-couple--sea { max-width: none; animation: puppetBob 6.5s ease-in-out infinite; }
@keyframes puppetBob { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-1.1deg); } }

/* 幕三 · 纸上星夜 */
.th-stars { inset: 0 0 auto 0; width: 100%; height: 70%; }
.th-stars circle { animation: twinkle 3.2s ease-in-out infinite; }
.th-stars circle:nth-child(2n) { animation-delay: -1.1s; }
.th-stars circle:nth-child(3n) { animation-delay: -2.2s; }
.th-spark path { animation: twinkle 4.2s ease-in-out infinite; }
.th-spark path:nth-child(2) { animation-delay: -1.6s; }
.th-spark path:nth-child(3) { animation-delay: -2.9s; }
@keyframes twinkle { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.th-shoot {
  left: 8vw; top: 14svh; width: clamp(90px, 11vw, 170px); height: 2px;
  background: linear-gradient(90deg, transparent, #efe3ba 55%, #fff8e2);
  rotate: 18deg; opacity: 0; pointer-events: none;
  animation: shootStar 9s ease-in 2.4s infinite;
}
@keyframes shootStar {
  0% { translate: 0 0; opacity: 0; }
  3% { opacity: .95; }
  10% { translate: 30vw 11svh; opacity: 0; }
  100% { translate: 30vw 11svh; opacity: 0; }
}
.th-moon { left: clamp(8vw, 14vw, 18vw); top: 10svh; width: clamp(130px, 17vw, 230px); filter: drop-shadow(0 0 60px rgba(240,223,168,.35)); }
.th-mount--nightfar { left: -4vw; width: 108vw; height: 13svh; bottom: 13svh; }
.th-mount--night { left: -4vw; width: 108vw; height: 12svh; bottom: 7svh; }
.th-slantern { top: 0; filter: drop-shadow(0 8px 26px rgba(255,180,80,.5)); }
.th-slantern svg { width: 100%; display: block; animation: slanternFloat 8s ease-in-out infinite; }
.th-slantern--a { left: 13vw; top: 30svh; width: clamp(44px, 4.6vw, 76px); }
.th-slantern--b { left: 57vw; top: 11svh; width: clamp(30px, 3.2vw, 54px); opacity: .9; }
.th-slantern--b svg { animation-delay: -2.8s; animation-duration: 9.5s; }
.th-slantern--c { left: 32vw; top: 46svh; width: clamp(52px, 5.6vw, 92px); }
.th-slantern--c svg { animation-delay: -5.2s; animation-duration: 7s; }
@keyframes slanternFloat { 0%,100% { transform: translateY(0) rotate(-1.6deg); } 50% { transform: translateY(-18px) rotate(1.8deg); } }
.th-rocks { left: 0; bottom: 0; width: 100%; height: clamp(110px, 18svh, 230px); }
.th-puppet--night { right: 12vw; bottom: 5svh; height: 37svh; }
.th-puppet--night::after { display: none; }
.th-couple--night { filter: brightness(.96) saturate(.95) drop-shadow(0 20px 44px rgba(0,0,0,.6)); animation: puppetBreath 5.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes puppetBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.014); } }

/* 字幕与终章 */
.th-cap {
  left: var(--pad); bottom: clamp(2rem, 7svh, 4.5rem); z-index: 6;
  display: flex; flex-direction: column; gap: .5em;
}
.th-cap b { font-size: clamp(1.7rem, 4.6vw, 3.4rem); font-weight: 900; letter-spacing: .3em; }
.th-cap i { font-family: var(--serif-en); font-style: italic; font-size: clamp(.72rem, 1.3vw, .95rem); letter-spacing: .34em; opacity: .75; }
.th-cap--bai { color: #f5e2c0; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.th-cap--sea b { color: #23423c; text-shadow: 0 1px 0 rgba(251,241,221,.6), 0 6px 26px rgba(251,241,221,.5); }
.th-cap--sea i { color: #40615a; text-shadow: 0 1px 0 rgba(251,241,221,.5); }
.th-cap--night { color: #dfe4f0; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.th-final {
  left: 0; right: 0; top: 42%; z-index: 6; text-align: center;
  font-size: clamp(1.5rem, 4.6vw, 3.2rem); font-weight: 600; letter-spacing: .22em;
  color: #ecdfc0; text-shadow: 0 2px 28px rgba(0,0,0,.6);
}
.th-final b { font-weight: 900; color: var(--gold); }
/* 檐幕 + 暗角 */
.th-valance { position: absolute; top: 0; left: 0; width: 100%; height: clamp(46px, 8svh, 96px); z-index: 8; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.th-vin { position: absolute; inset: 0; z-index: 7; pointer-events: none; box-shadow: inset 0 0 clamp(60px, 12vw, 160px) rgba(10,6,4,.55); }
@media (max-width: 768px) {
  .th-medal { width: min(78vw, 46svh); top: 33svh; }
  .th-lattice { display: none; }
  .th-lantern--l { left: 5vw; } .th-lantern--r { right: 5vw; }
  .th-floor { height: 16svh; }
  .th-puppet--bai { height: 44svh; bottom: 12svh; }
  .th-puppet--bai::after { width: 27svh; }
  .th-table { width: min(64vw, 300px); bottom: 4svh; }
  .th-sun { left: 7vw; top: 11svh; width: 20vw; }
  .th-cloud--a { right: 6vw; top: 14svh; width: 28vw; }
  .th-cloud--b { left: 40vw; top: 7svh; width: 20vw; }
  .th-mount--seafar { width: 150vw; left: -25vw; height: 10svh; bottom: 33svh; }
  .th-mount--sea { width: 160vw; left: -30vw; height: 12svh; bottom: 29svh; }
  .th-wave--far { width: 150vw; left: -25vw; height: 18svh; bottom: 15svh; }
  .th-wave--near { width: 170vw; left: -35vw; height: 24svh; bottom: -2svh; }
  .th-boat { left: 10vw; bottom: 30svh; width: 13vw; }
  .th-puppet--sea { height: 30svh; bottom: 10svh; }
  .th-puppet--sea::after { width: 43svh; }
  .th-moon { left: 8vw; top: 8svh; width: 24vw; }
  .th-mount--nightfar { width: 150vw; left: -25vw; height: 11svh; bottom: 14svh; }
  .th-mount--night { width: 160vw; left: -30vw; height: 10svh; bottom: 8svh; }
  .th-slantern--a { left: 8vw; top: 26svh; width: 10vw; }
  .th-slantern--b { left: 64vw; top: 12svh; width: 7vw; }
  .th-slantern--c { left: 30vw; top: 44svh; width: 12vw; }
  .th-rocks { height: 16svh; }
  .th-puppet--night { height: 30svh; right: 5vw; bottom: 4svh; }
  .th-seal { top: 13svh; right: 6vw; }
  .th-cap b { letter-spacing: .2em; }
}

/* 减动效：三幕纵向平铺 */
.th--static .th-pin { height: auto; }
.th--static .th-act { position: relative; height: 100svh; visibility: visible; opacity: 1; }

/* ---------- 那一天 ---------- */.theday { position: relative; padding-bottom: clamp(7rem, 16vh, 12rem); overflow: hidden; }
.theday-seal {
  position: absolute; top: clamp(4rem, 10vh, 8rem); right: calc(var(--pad) * .8);
  width: clamp(64px, 9vw, 110px); color: var(--gold); opacity: .5;
  transform: rotate(8deg);
}
.theday-seal text { font-family: var(--serif-cn); font-weight: 900; font-size: 54px; fill: currentColor; }
.invite {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(2.5rem, 6vw, 6rem); padding: 0 var(--pad); align-items: center;
}
.invite > * { min-width: 0; }
.invite-scroll {
  position: relative;
  background: linear-gradient(160deg, #f7f1e4, #efe6d2);
  color: #43301c;
  border-radius: 4px;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.6rem, 4vw, 3.4rem);
  box-shadow: 0 24px 80px rgba(0,0,0,.35), inset 0 0 0 1px rgba(148,108,55,.25), inset 0 0 60px rgba(160,120,60,.12);
}
.invite-cols {
  writing-mode: vertical-rl;
  display: flex; flex-direction: column; /* vertical-rl 下即从右往左排列 */
  gap: clamp(1.1em, 2.6vw, 2em);
  min-height: clamp(340px, 56vh, 560px);
  max-height: 70vh;
  font-size: clamp(.92rem, 1.9vw, 1.2rem);
  letter-spacing: .42em; line-height: 2.4;
  margin: 0 auto;
}
.invite-col--names { font-weight: 900; font-size: 1.25em; color: #7c1d1d; }
.invite-col--place { font-weight: 600; }
.invite-stamp {
  position: absolute; left: clamp(1.2rem, 3vw, 2.4rem); bottom: clamp(1.2rem, 3vw, 2.2rem);
  width: 2.6em; height: 2.6em; display: grid; place-items: center;
  background: #a32222; color: #f7f1e4;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 900;
  border-radius: 6px; rotate: -7deg;
  box-shadow: 0 4px 18px rgba(120,20,20,.45);
}
.countdown { text-align: center; }
.countdown-label { font-size: clamp(.9rem, 1.8vw, 1.1rem); letter-spacing: .5em; text-indent: .5em; opacity: .85; }
.countdown-nums { display: flex; justify-content: center; gap: clamp(.9rem, 3vw, 2.4rem); margin-top: 1.6em; }
.cd-cell b {
  display: block; font-family: var(--serif-en); font-weight: 500;
  font-size: clamp(3rem, 8.5vw, 6.4rem); line-height: 1; font-variant-numeric: tabular-nums;
}
.cd-cell > span { display: block; margin-top: .7em; font-size: .78rem; letter-spacing: .4em; opacity: .65; }
.theday-actions { display: flex; justify-content: center; gap: 1rem; margin-top: clamp(2rem, 5vh, 3.4rem); flex-wrap: wrap; }
.btn {
  display: inline-block; font-size: .88rem; letter-spacing: .26em; text-indent: .26em;
  padding: 1em 2.4em; border-radius: 100px;
  background: var(--gold); color: #3c2a10;
  transition: transform .3s, box-shadow .3s, background-color .3s;
}
.btn:hover { box-shadow: 0 10px 34px rgba(200,161,90,.35); }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent); }
.theday-tip { margin-top: 1.6em; font-size: .78rem; letter-spacing: .2em; opacity: .6; }

/* ---------- 画廊 marquee ---------- */
.gallery { padding-bottom: clamp(5rem, 12vh, 9rem); }
.marquee { overflow: hidden; margin-top: clamp(1.6rem, 4vh, 3rem); }
.marquee-track { display: flex; gap: clamp(1rem, 2.4vw, 2rem); width: max-content; will-change: transform; }
.mq { position: relative; height: clamp(200px, 34vh, 380px); flex: none; overflow: hidden; border-radius: 3px; }
.mq img { transition: transform .8s cubic-bezier(.22,1,.36,1), opacity .9s; }
.mq:hover img.loaded { transform: scale(1.06); }

/* ---------- 尾声 ---------- */
.end { position: relative; padding-top: clamp(5rem, 12vh, 9rem); overflow: hidden; }
.end-marquee {
  white-space: nowrap; font-weight: 900;
  font-size: clamp(3rem, 9vw, 8rem); line-height: 1.2;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--gold) 52%, transparent);
}
.end-marquee span { display: inline-block; padding-right: .5em; animation: endloop 26s linear infinite; }
@keyframes endloop { to { transform: translateX(-33.333%); } }
.end-core { text-align: center; padding: clamp(4rem, 10vh, 8rem) var(--pad) clamp(6rem, 13vh, 10rem); }
.end-stamp {
  display: inline-grid; place-items: center;
  width: 2.5em; height: 2.5em; margin-bottom: clamp(1.6rem, 4vh, 2.8rem);
  font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 900;
  background: #a32222; color: #f7f1e4;
  border-radius: 8px; rotate: -7deg;
  box-shadow: 0 6px 26px rgba(60,8,8,.55), inset 0 0 0 2px rgba(247,241,228,.28);
}
.end-line { font-size: clamp(.85rem, 1.8vw, 1.05rem); letter-spacing: .4em; color: var(--gold); }
.end-big {
  font-size: clamp(3.4rem, 12vw, 10rem); font-weight: 900; letter-spacing: .08em; margin: .3em 0 .5em;
  color: #f9edd6; text-shadow: 0 6px 60px rgba(232,196,118,.28);
}
.end-gift { font-size: clamp(.92rem, 2vw, 1.15rem); letter-spacing: .22em; line-height: 2.3; opacity: .92; }
.end-gift::after {
  content: ''; display: block; width: 3.2em; height: 1px;
  margin: 1.6em auto 0; background: color-mix(in srgb, var(--gold) 75%, transparent);
}
.end-credit {
  margin-top: 1.1em;
  font-size: clamp(.68rem, 1.4vw, .78rem);
  letter-spacing: .28em;
  opacity: .55;
  color: var(--gold);
}
.end-foot {
  display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap;
  padding: 0 var(--pad) calc(1.6rem + env(safe-area-inset-bottom));
  font-family: var(--serif-en); font-style: italic;
  font-size: .82rem; letter-spacing: .14em; opacity: .65; color: var(--gold);
}

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9700;
  background: rgba(12,10,9,.94);
  opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  position: fixed; left: 0; top: 0;
  object-fit: cover; border-radius: 3px;
  box-shadow: 0 30px 120px rgba(0,0,0,.6);
  will-change: transform, opacity;
}
.lightbox-close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top)); right: 1.4rem;
  font-size: 2.4rem; color: #eee; line-height: 1; z-index: 3; font-family: var(--serif-en);
  width: 56px; height: 56px; display: inline-block;
}
.lightbox-count {
  position: absolute; top: calc(1.7rem + env(safe-area-inset-top)); left: 1.7rem; z-index: 2;
  font-family: var(--serif-en); font-style: italic; font-size: .95rem;
  letter-spacing: .14em; color: #cfc9bd;
}
.lightbox-cap {
  position: absolute; bottom: calc(1.5rem + env(safe-area-inset-bottom)); left: 50%; z-index: 2;
  transform: translateX(-50%);
  width: max-content; max-width: 86vw; text-align: center;
  color: #e8e2d6; font-size: .85rem; letter-spacing: .3em; text-indent: .3em;
}
.lightbox-nav {
  position: absolute; top: 50%; margin-top: -28px; z-index: 3;
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28); color: #eee;
  font-family: var(--serif-en); font-size: 1.5rem;
  display: grid; place-items: center;
  transition: background-color .35s, color .35s, border-color .35s;
}
.lightbox-nav:hover { background: #f5e9d6; color: #191713; border-color: transparent; }
.lightbox-nav--prev { left: clamp(.8rem, 3vw, 2.4rem); }
.lightbox-nav--next { right: clamp(.8rem, 3vw, 2.4rem); }
@media (max-width: 768px) { .lightbox-nav { display: none; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(2.2rem + env(safe-area-inset-bottom)); z-index: 9600;
  transform: translate(-50%, 200%);
  background: var(--ink); color: var(--cream);
  font-size: .85rem; letter-spacing: .2em; text-indent: .2em;
  padding: .9em 2em; border-radius: 100px;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- 动效基础态（JS 启用后） ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); }
.js [data-reveal-panel] { clip-path: inset(0 0 100% 0); }
.js .char { display: inline-block; transform: translateY(112%); }
.js [data-split], .js [data-split-lines] .line { overflow: hidden; }
.js [data-split-lines] .line { display: block; }
.js .line-inner { display: inline-block; transform: translateY(112%); }

/* 照片揭示初始态：网格图裁切隐藏，图注隐藏 */
.js .ch-grid .ph .ph-media,
.js .ch-duo .ph .ph-media,
.js .her-collage .ph .ph-media { clip-path: inset(100% 0 0 0); }
.js .ph figcaption { --ln: 0; opacity: 0; transform: translateY(12px); }
.ph figcaption::before { transform: scaleX(var(--ln, 1)); transform-origin: left center; }

/* 满幅图初始态：带边框，滚动时扩张为全出血 */
.js .ch-lead, .js .ch-wide { clip-path: inset(0% 9% round 6px); }

/* 满幅图/长卷默认焦点偏上，人像不裁头（个别照片在 JS FOCUS 中微调） */
.ch-lead .ph-media img, .ch-wide .ph-media img, .strip-item .ph-media img { object-position: 50% 30%; }

/* ---------- 交互升级 ---------- */
/* 顶部滚动进度线 */
.progressbar {
  position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 9200;
  background: var(--ac); opacity: .9;
  transform-origin: 0 50%; transform: scaleX(0);
  transition: background-color .9s;
}

/* 速度歪斜的容器 */
.ch-grid, .ch-duo, .her-collage { will-change: transform; }

/* 横向长卷：拖拽 + 进度 */
.strip { touch-action: pan-y; }
.strip-ui {
  position: absolute; left: 50%; bottom: clamp(1.1rem, 3.5vh, 2.4rem); z-index: 6;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 1.2em;
  font-family: var(--serif-en); font-style: italic; font-size: .88rem;
  letter-spacing: .14em; color: color-mix(in srgb, var(--fg) 78%, transparent);
  pointer-events: none;
}
.strip-ui-bar {
  width: clamp(110px, 20vw, 240px); height: 2px; border-radius: 2px;
  background: color-mix(in srgb, var(--fg) 20%, transparent);
  position: relative; overflow: hidden;
}
.strip-ui-bar i {
  position: absolute; inset: 0; background: var(--ac);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* 菜单链接逐字翻转 */
.menu-link .rchar { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.menu-link .rchar i {
  display: block; font-family: inherit; font-style: normal;
  transition: transform .55s cubic-bezier(.76, 0, .24, 1);
  transition-delay: calc(var(--i) * 26ms);
}
.menu-link .rchar i + i { position: absolute; left: 0; top: 100%; color: var(--gold); }
.menu-link:hover .rchar i, .menu-link:focus-visible .rchar i { transform: translateY(-100%); }

/* 倒计时翻牌 */
.cd-cell b { display: flex; justify-content: center; }
.cd-slot { position: relative; display: inline-block; overflow: hidden; }
.cd-slot i { display: block; font-style: normal; font-family: inherit; }
.cd-slot i.nx { position: absolute; left: 0; top: 100%; }

/* ---------- 囍字爆彩粒子 ---------- */
.burst-p {
  position: fixed; left: 0; top: 0; z-index: 9650;
  pointer-events: none; font-weight: 900; line-height: 1;
  will-change: transform, opacity;
}
.burst-p--dot { border-radius: 50%; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .invite { grid-template-columns: 1fr; }
  .her-collage { grid-template-columns: repeat(2, 1fr); }
  .her-collage .ph:nth-child(3n), .her-collage .ph:nth-child(3n+2) { margin-top: 0; width: auto; }
  .her-collage .ph:nth-child(even) { margin-top: clamp(2rem, 6vh, 4rem); }
}

/* ═══════════ 移动端：重叠拼贴 · 层间巨字 · 夜色牌堆 ═══════════ */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav-date { font-size: .72rem; padding: .45em .9em; letter-spacing: .08em; }
  /* 手机 hero：横图塞不进竖屏（cover 只能露出 31% 宽），改为「上标题下照片」——
     4:5 裁切图 contain 贴底，人物完整；抠图层缩放原点偏下，放大时向标题方向生长 */
  .hero-media img, .hero-cut img {
    object-fit: contain; object-position: 50% 100%;
    transform-origin: 50% 85%;
  }
  .hero-veil { background: linear-gradient(to bottom, rgba(10,10,12,.18) 0%, rgba(10,10,12,0) 40%, rgba(10,10,12,.38) 100%); }
  .hero-inner { justify-content: flex-start; padding-top: calc(var(--nav-h) + 9svh); }
  .gate-top { flex-direction: column; align-items: center; gap: .3em; }
  .gate-top-en { top: calc(var(--nav-h) + 2.5vh + 7.2em); }
  .stage-side { right: clamp(.4rem, 3vw, 1.2rem); }
  .stage-seal { left: clamp(.5rem, 3vw, 1.2rem); bottom: 8%; }
  /* 横幅大图整图呈现：手机窄屏不再满屏 cover 裁人，按天然宽高比全宽出血 */
  .ch-lead, .ch-lead--her, .ch-wide, .ch-wide--sunset {
    height: auto; min-height: 0;
    aspect-ratio: var(--ratio, 1.5);
  }
  .ch-wide-cap { bottom: 1.1rem; font-size: .92rem; letter-spacing: .14em; }
  .ch-wide-cap--center { font-size: clamp(1.05rem, 4.6vw, 1.5rem); letter-spacing: .16em; line-height: 1.7; }
  .lead-float { top: 18%; font-size: clamp(2rem, 8.5vw, 2.9rem); }
  /* 山海长卷：每张按天然比例整图呈现 */
  .strip-item, .strip-item--tall { height: auto; max-height: 74svh; }
  .strip-item { width: 84vw; aspect-ratio: var(--ratio, 1.5); }
  .strip-item--tall { width: 62vw; }
  .js .ch-lead, .js .ch-wide { clip-path: inset(0% 5% round 4px); }
  .moment-frame { width: min(64vw, 300px); }
  .menu-preview { display: none; }
  .end-gift br { display: block; }
  .invite-cols { letter-spacing: .3em; min-height: 320px; }

  /* 手写词回归：叠在照片之上的第四层 */
  .fw { font-size: clamp(2.1rem, 10.5vw, 3.2rem); z-index: 4; }

  /* 巨字织进层间：压过 z1 照片、被 z3 照片压过 */
  .grid-word { z-index: 2; font-size: clamp(13rem, 62vw, 19rem); top: 30%; }

  /* 网格 → 自由叠压的拼贴流 */
  .ch-grid, .ch-duo, .her-collage { display: block; padding-bottom: clamp(3rem, 12vw, 5rem); }
  .ch-grid .ph, .ch-duo .ph, .her-collage .ph { position: relative; }

  /* 图注收进照片内部（拼贴叠压时不再吃下方留白） */
  .ch-grid .ph figcaption, .ch-duo .ph figcaption, .her-collage .ph figcaption {
    position: absolute; left: .95em; bottom: .85em; z-index: 2; margin: 0;
    color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,.65);
  }
  .ch-grid .ph figcaption::before, .ch-duo .ph figcaption::before, .her-collage .ph figcaption::before {
    background: rgba(255,255,255,.75);
  }
  .ph--note .note-hand { color: var(--gold); top: -2.3em; right: 0; }

  /* 被后来照片叠住下缘的图注挪到照片上缘 */
  .ch--red .ch-grid .ph:nth-of-type(3) figcaption,
  .ch--red .ch-grid .ph:nth-of-type(5) figcaption,
  .ch--white .ch-grid .ph:nth-of-type(4) figcaption,
  .ch--white .ch-duo .ph:nth-of-type(1) figcaption { bottom: auto; top: .85em; }

  /* 拼贴照片带一点悬浮阴影，叠压层次更实 */
  .ch-grid .ph .ph-media, .ch-duo .ph .ph-media, .her-collage .ph .ph-media {
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32);
    border-radius: 4px;
  }

  /* —— 壹 · 中式红：z3 快层滑过 z1 慢层 —— */
  .ch--red .ch-grid .ph:nth-of-type(1) { width: 78%; margin: 0; rotate: -1.2deg; z-index: 1; }
  .ch--red .ch-grid .ph:nth-of-type(2) { width: 60%; margin: -20% 0 0 auto; rotate: 1.8deg; z-index: 3; }
  .ch--red .ch-grid .ph:nth-of-type(3) { width: 100vw; margin: -10% 0 0 calc(var(--pad) * -1); rotate: 0deg; z-index: 1; }
  .ch--red .ch-grid .ph:nth-of-type(4) { width: 56%; margin: -26% 0 0 6%; rotate: -2.2deg; z-index: 3; }
  .ch--red .ch-grid .ph:nth-of-type(5) { width: 74%; margin: -14% 0 0 auto; rotate: 1.2deg; z-index: 1; }
  .ch--red .ch-grid .ph:nth-of-type(6) { width: 62%; margin: -24% 0 0 2%; rotate: -1.6deg; z-index: 3; }
  .ch--red .ch-duo .ph:nth-of-type(1) { width: 88%; margin: 0; z-index: 1; }
  .ch--red .ch-duo .ph:nth-of-type(2) { width: 58%; margin: -20% 4% 0 auto; rotate: 2deg; z-index: 3; }

  /* —— 贰 · 白纱 —— */
  .ch--white .ch-grid .ph:nth-of-type(1) { width: 68%; margin: 0 0 0 auto; rotate: 1.6deg; z-index: 3; }
  .ch--white .ch-grid .ph:nth-of-type(2) { width: 82%; margin: -16% 0 0 0; rotate: -1.2deg; z-index: 1; }
  .ch--white .ch-grid .ph:nth-of-type(3) { width: 58%; margin: -24% 0 0 auto; rotate: 2deg; z-index: 3; }
  .ch--white .ch-grid .ph:nth-of-type(4) { width: 100vw; margin: -8% 0 0 calc(var(--pad) * -1); rotate: 0deg; z-index: 1; }
  .ch--white .ch-grid .ph:nth-of-type(5) { width: 64%; margin: -22% 0 0 4%; rotate: -2deg; z-index: 3; }
  .ch--white .ch-grid .ph:nth-of-type(6) { width: 56%; margin: -14% 0 0 auto; rotate: 1.4deg; z-index: 3; }
  .ch--white .ch-duo .ph:nth-of-type(1) { width: 64%; margin: 0 0 0 2%; rotate: -1.4deg; z-index: 1; }
  .ch--white .ch-duo .ph:nth-of-type(2) { width: 92%; margin: -24% 0 0 auto; rotate: 1.2deg; z-index: 3; }

  /* —— 肆 · 夜色：钉住的牌堆，滚动逐张揭开（动画在 JS nightDeck） —— */
  .ch--night .ch-grid { height: 100svh; padding: 0; }
  .ch--night .ch-grid .ph {
    position: absolute; left: 50%; top: 50%;
    width: min(72vw, 42svh); margin: 0;
    translate: -50% -54%;
  }
  .ch--night .ch-grid .ph .ph-media {
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    border-radius: 6px;
  }
  .ch--night .ch-grid .fw { top: 14%; left: 5%; }

  /* —— 伍 · 她自己：拍立得叠堆 —— */
  .her-collage .ph:nth-of-type(1) { width: 74%; margin: 0; z-index: 3; }
  .her-collage .ph:nth-of-type(2) { width: 58%; margin: -20% 0 0 auto; z-index: 1; }
  .her-collage .ph:nth-of-type(3) { width: 84%; margin: -12% 0 0 3%; z-index: 3; }
  .her-collage .ph:nth-of-type(4) { width: 52%; margin: -26% 3% 0 auto; z-index: 3; }
  .her-collage .ph:nth-of-type(5) { width: 66%; margin: -16% 0 0 0; z-index: 1; }
  .her-collage .ph:nth-of-type(6) { width: 56%; margin: -22% 4% 0 auto; z-index: 3; }
  .her-collage .ph:nth-of-type(7) { width: 48%; margin: -12% 0 0 8%; z-index: 1; }
  .her-collage .ph:nth-of-type(8) { width: 68%; margin: -18% 0 0 auto; z-index: 3; }

  /* —— 尾声画廊：两行斜置交叠的胶片流 —— */
  .gallery { overflow: hidden; }
  .marquee { width: 108vw; margin-left: -4vw; }
  .marquee--a { rotate: -2.2deg; margin-top: 2.4rem; }
  .marquee--b { rotate: 1.6deg; margin-top: -8vh; }
  .marquee--b .mq { box-shadow: 0 14px 44px rgba(0, 0, 0, .45); }
}
@media (max-width: 520px) {
  .countdown-nums { gap: .8rem; }
  .nav-date span.nav-date-dot { display: none; }
  .invite-scroll { padding: 1.6rem 1.1rem; }
  .invite-cols {
    font-size: .78rem; letter-spacing: .2em; line-height: 2;
    gap: .85em; min-height: 300px; max-height: 60vh;
  }
  .theday-actions .btn { padding: .9em 1.7em; font-size: .8rem; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .gate-hint i::after, .end-marquee span, .ph--note .note-hand { animation: none; }
  html.lenis { scroll-behavior: auto; }
}
