/* ============================================================
   To You · 表白网站样式 v2
   配色：深夜玫瑰 + 暖金 + 胭脂粉
   ============================================================ */

:root {
  --bg-0: #150610;
  --bg-1: #240b1d;
  --bg-2: #3a1230;
  --rose: #ff7aa8;
  --rose-deep: #e14b7e;
  --blush: #ffd7e6;
  --gold: #f4c77b;
  --gold-soft: #f9e3b6;
  --ink: #fff2f7;
  --ink-dim: rgba(255, 242, 247, 0.66);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-brd: rgba(255, 255, 255, 0.14);
  --cjk: 'Songti SC', 'STSong', 'Source Han Serif SC', 'Noto Serif CJK SC', 'Noto Serif SC', SimSun, serif;
  --serif: 'Cormorant Garamond', var(--cjk);
  --sc: var(--cjk);
  --script: 'Dancing Script', 'Segoe Script', cursive;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sc);
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(225, 75, 126, 0.28), transparent 60%),
    radial-gradient(1000px 700px at 10% 110%, rgba(244, 199, 123, 0.14), transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* 仅当「有鼠标 + 未开启减少动效」时才隐藏系统光标。
   因为 script.js 里 cursorTrail 在 prefersReduced/isTouch 时会 return 不绘制，
   若无条件 cursor:none 会让这些用户完全看不到鼠标指针。 */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body, button, a, .envelope { cursor: none; }
}

/* 胶片噪点 + 暗角 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 55%, rgba(10, 3, 8, 0.55) 100%);
}
body::after {
  content: '';
  position: fixed; inset: -50%; z-index: 51; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  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='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain { to { transform: translate(-6%, 4%); } }

@media (hover: none) {
  body, button, a, .envelope { cursor: auto; }
}

/* 灯箱盖在自定义光标之上(z-index 150 > 61/90)，此时必须交还系统光标 */
body.lb-open, body.lb-open button, body.lb-open a { cursor: auto !important; }

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

/* ===== 画布层 ===== */
.stars-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.petals-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.cursor-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 61; }

/* ============================================================
   加载幕
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem;
  background: linear-gradient(160deg, var(--bg-0), var(--bg-1));
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-heart svg {
  width: 76px; height: 70px; fill: var(--rose);
  filter: drop-shadow(0 0 24px rgba(255, 122, 168, 0.7));
  animation: beat 1.1s var(--ease) infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(0.96); }
  45% { transform: scale(1.12); }
}
.loader-text {
  font-family: var(--serif); font-style: italic; letter-spacing: 0.12em;
  color: var(--blush); font-size: 1.05rem; opacity: 0.85;
}
.loader-bar { width: 180px; height: 2px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); animation: load 1.4s var(--ease) forwards; }
@keyframes load { to { width: 100%; } }

/* ============================================================
   顶部心电图进度线
   ============================================================ */
.heartbeat-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 40px; z-index: 70; pointer-events: none;
}
.hb-svg { width: 100%; height: 100%; display: block; }
.hb-track { stroke: rgba(255, 255, 255, 0.08); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hb-path {
  stroke: url(#hbgrad); stroke: var(--rose); stroke-width: 2.4; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(255, 122, 168, 0.9));
}
.beat-heart {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%) scale(0.9);
  will-change: left;
}
.beat-heart svg { width: 20px; height: 18px; fill: var(--gold); filter: drop-shadow(0 0 8px var(--gold)); animation: beat 0.9s var(--ease) infinite; }

/* ============================================================
   音乐开关
   ============================================================ */
.top-bar { position: fixed; top: 0; right: 0; z-index: 80; padding: 26px 26px; }
.music-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px;
  border-radius: 999px; border: 1px solid var(--glass-brd); background: var(--glass);
  backdrop-filter: blur(10px); color: var(--ink); font-family: var(--serif);
  letter-spacing: 0.14em; font-size: 0.82rem; transition: all 0.4s var(--ease);
}
.music-btn:hover { border-color: var(--rose); box-shadow: 0 0 22px rgba(255, 122, 168, 0.35); }
.music-icon { display: inline-flex; align-items: flex-end; gap: 2px; height: 15px; }
.music-icon i { width: 3px; background: var(--rose); border-radius: 3px; height: 5px; }
.music-btn.playing .music-icon i { animation: eq 0.9s ease-in-out infinite; }
.music-icon i:nth-child(1) { animation-delay: 0s; }
.music-icon i:nth-child(2) { animation-delay: 0.2s; }
.music-icon i:nth-child(3) { animation-delay: 0.4s; }
.music-icon i:nth-child(4) { animation-delay: 0.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 15px; } }

/* 流星许愿提示 */
.wish-hint {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(12px);
  z-index: 75; font-family: var(--serif); font-style: italic; letter-spacing: 0.14em;
  color: var(--gold-soft); font-size: 0.95rem; padding: 8px 20px; border-radius: 999px;
  background: rgba(21, 6, 16, 0.5); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.wish-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   通用 section
   ============================================================ */
.section {
  position: relative; z-index: 3; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 24px; text-align: center;
}
.section-title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  background: linear-gradient(120deg, var(--blush), var(--gold-soft) 55%, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 0.6rem;
}
.section-caption {
  font-family: var(--serif); font-style: italic; color: var(--ink-dim);
  font-size: 1.05rem; letter-spacing: 0.05em; margin-bottom: 3.2rem;
}

/* ===== 滚动揭示 ===== */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity 1s var(--ease), transform 1s var(--ease); will-change: transform, opacity; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   第一幕 · Hero
   ============================================================ */
.hero { overflow: hidden; }
.hero-glow {
  position: absolute; top: 50%; left: 50%; width: 130vmax; height: 130vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 122, 168, 0.16), transparent 42%);
  animation: breathe 9s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.hero-inner { position: relative; z-index: 3; }
.eyebrow {
  font-family: var(--serif); letter-spacing: 0.5em; font-size: 0.82rem;
  color: var(--gold); margin-bottom: 1.8rem; text-indent: 0.5em;
}
.hero-title { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin-bottom: 1.4rem; }
.hero-title .line { display: block; font-size: clamp(2.2rem, 7vw, 5rem); }
.hero-title .script {
  font-family: var(--script); font-weight: 700; font-size: clamp(3.4rem, 12vw, 8rem);
  background: linear-gradient(120deg, var(--rose), var(--gold) 60%, var(--blush));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(255, 122, 168, 0.35)); transition-delay: 0.15s;
}
.hero-sub {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--ink-dim); letter-spacing: 0.06em; transition-delay: 0.3s;
}
.scroll-hint {
  margin-top: 4rem; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--ink-dim); font-size: 0.8rem; letter-spacing: 0.28em; transition-delay: 0.5s;
}
.mouse { width: 24px; height: 40px; border: 1.5px solid var(--ink-dim); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; }
.wheel { width: 3px; height: 8px; border-radius: 3px; background: var(--rose); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ============================================================
   第二幕 · 名字的秘密
   ============================================================ */
.name-duo {
  display: flex; align-items: stretch; justify-content: center;
  gap: clamp(10px, 2vw, 26px); flex-wrap: wrap; max-width: 940px; width: 100%;
}
.name-card {
  flex: 1 1 300px; max-width: 380px; padding: 34px 28px 30px;
  border-radius: 22px; border: 1px solid var(--glass-brd);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(255, 122, 168, 0.05));
  backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d; transition: transform 0.25s ease, box-shadow 0.5s var(--ease);
  position: relative; overflow: hidden;
}
.name-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.2), transparent 42%); opacity: 0.45;
}
.name-card:hover { box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 122, 168, 0.22); }
.nc-label {
  font-family: var(--serif); letter-spacing: 0.4em; font-size: 0.76rem;
  color: var(--gold); opacity: 0.85; margin-bottom: 10px;
}
.nc-name { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 4.6vw, 2.4rem); letter-spacing: 0.22em; margin-bottom: 14px; }
.nc-name span { display: inline-block; transition: transform 0.4s var(--ease), color 0.4s var(--ease); }
.name-card:hover .nc-name span { color: var(--blush); }
.name-card:hover .nc-name span:nth-child(1) { transform: translateY(-4px); }
.name-card:hover .nc-name span:nth-child(2) { transform: translateY(-7px); }
.name-card:hover .nc-name span:nth-child(3) { transform: translateY(-4px); }
.nc-key {
  font-family: var(--serif); font-weight: 600; font-size: clamp(3.4rem, 11vw, 5.2rem); line-height: 1;
  margin: 6px 0 14px;
  background: linear-gradient(120deg, var(--gold-soft), var(--rose) 70%, var(--blush));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 22px rgba(255, 122, 168, 0.4));
}
.nc-desc { font-size: 0.99rem; line-height: 2; color: var(--ink-dim); }
.nc-desc b { color: var(--gold); font-weight: 500; letter-spacing: 0.06em; }

.name-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 4px; }
.nl-line { width: 1px; flex: 1; min-height: 34px; background: linear-gradient(180deg, transparent, var(--rose), transparent); }
.nl-heart svg { width: 26px; height: 24px; fill: var(--rose); filter: drop-shadow(0 0 14px var(--rose)); animation: beat 1.4s var(--ease) infinite; }
@media (max-width: 760px) {
  .name-link { flex-direction: row; width: 100%; }
  .nl-line { width: auto; height: 1px; flex: 1; min-height: 0; background: linear-gradient(90deg, transparent, var(--rose), transparent); }
}

.name-verdict {
  margin-top: 3.2rem; font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 2.1rem); letter-spacing: 0.16em; line-height: 1.9;
  background: linear-gradient(120deg, var(--blush), var(--gold-soft), var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.name-verdict em { font-family: var(--serif); font-style: italic; font-size: 0.82em; letter-spacing: 0.1em; opacity: 0.92; }

.acrostic {
  margin-top: 3.4rem; display: flex; flex-direction: column; gap: 14px;
  padding: 28px 30px; border-radius: 18px; max-width: 620px; width: 100%;
  border: 1px solid rgba(244, 199, 123, 0.28);
  background: linear-gradient(160deg, rgba(244, 199, 123, 0.07), rgba(255, 122, 168, 0.04));
  backdrop-filter: blur(8px);
}
.acro-row { display: flex; align-items: center; gap: 18px; text-align: left; }
.acro-char {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: #3a1024;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 18px rgba(244, 199, 123, 0.3);
}
.acro-text { font-size: clamp(0.9rem, 2.6vw, 1.06rem); color: var(--blush); letter-spacing: 0.04em; }

/* ============================================================
   第三幕 · 相遇计时器
   ============================================================ */
.count-grid { display: flex; gap: clamp(12px, 3vw, 28px); flex-wrap: wrap; justify-content: center; }
.count-box {
  position: relative; min-width: 120px; padding: 26px 22px 20px;
  border-radius: 20px; border: 1px solid var(--glass-brd);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 122, 168, 0.05));
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transform-style: preserve-3d; transition: transform 0.2s ease;
}
.count-box::after {
  content: ''; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 40%);
  opacity: 0.5;
}
.count-num {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1;
  background: linear-gradient(120deg, var(--gold-soft), var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.count-num.tick { animation: tick 0.4s var(--ease); }
@keyframes tick { 0% { transform: translateY(0.12em); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
.count-label { display: block; margin-top: 8px; font-family: var(--serif); letter-spacing: 0.3em; color: var(--ink-dim); font-size: 0.9rem; }
.count-foot { margin-top: 3rem; font-family: var(--serif); font-style: italic; color: var(--blush); font-size: 1.1rem; letter-spacing: 0.04em; }

/* ============================================================
   第三幕 · 时间轴
   ============================================================ */
.timeline { position: relative; max-width: 780px; width: 100%; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--rose-deep), var(--gold), transparent);
}
.tl-item { position: relative; width: 50%; padding: 18px 40px; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }
.tl-dot {
  position: absolute; top: 34px; width: 16px; height: 16px; border-radius: 50%; background: var(--rose);
  box-shadow: 0 0 0 4px rgba(255, 122, 168, 0.22), 0 0 18px var(--rose);
}
.tl-item:nth-child(odd) .tl-dot { right: -8px; }
.tl-item:nth-child(even) .tl-dot { left: -8px; }
.tl-card {
  background: var(--glass); border: 1px solid var(--glass-brd); backdrop-filter: blur(10px);
  border-radius: 18px; padding: 22px 24px; transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.5s var(--ease);
}
.tl-card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 122, 168, 0.2); }
.tl-date { display: inline-block; font-family: var(--script); font-size: 1.5rem; color: var(--gold); margin-bottom: 4px; }
.tl-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 6px; }
.tl-card p { color: var(--ink-dim); font-size: 0.98rem; }

/* ============================================================
   相册幕 · 演唱会 / 灯火 / 日常
   ============================================================ */
.gallery-act { padding-top: 130px; padding-bottom: 130px; }

/* 瀑布流：不裁切照片，保留每张原本的比例 */
.gallery {
  width: 100%; max-width: 1120px; margin: 0 auto;
  columns: 3; column-gap: 22px;
}
.gallery-duo { max-width: 880px; columns: 2; }

.shot { break-inside: avoid; margin: 0 0 22px; }
/* 多列容器里给子元素加 transform 容易触发渲染 bug，所以位移放在内层 */
.gallery .shot.reveal { transform: none; }
.shot-inner {
  position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--glass-brd); background: var(--glass);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  transform: translateY(30px) scale(0.985);
  transition: transform 1s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s var(--ease);
}
.shot.in .shot-inner { transform: none; }

.shot-inner img,
.shot-inner video {
  display: block; width: 100%; height: auto;
  background: rgba(255, 255, 255, 0.04);
}
.shot-inner img { transition: transform 1.1s var(--ease), filter 0.7s var(--ease); }
/* 底部压深一层，保证字幕在亮色画面上也读得清 */
.shot-inner::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(21, 6, 16, 0.82));
  opacity: 0.92; transition: opacity 0.6s var(--ease);
}
.shot-video.playing .shot-inner::after { opacity: 0; }

.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 20px 20px; text-align: left;
  font-size: 0.9rem; line-height: 1.85; color: var(--blush);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  transform: translateY(8px); opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.shot.in figcaption { transform: none; opacity: 1; }

@media (hover: hover) {
  .shot:not(.shot-video) .shot-inner:hover { border-color: rgba(255, 122, 168, 0.55); box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 122, 168, 0.22); }
  .shot:not(.shot-video) .shot-inner:hover img { transform: scale(1.045); }
  .shot:not(.shot-video) .shot-inner:hover::after { opacity: 0.72; }
}
.shot:not(.shot-video) .shot-inner { cursor: pointer; }

/* 放大镜角标 */
.shot:not(.shot-video) .shot-inner::before {
  content: '＋'; position: absolute; z-index: 3; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--ink);
  background: rgba(21, 6, 16, 0.5); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.8); transition: all 0.45s var(--ease);
}
@media (hover: hover) { .shot:not(.shot-video) .shot-inner:hover::before { opacity: 1; transform: none; } }

/* 视频播放按钮 */
.shot-video .shot-inner { border-color: rgba(244, 199, 123, 0.3); }
.shot-play {
  position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(21, 6, 16, 0.42); border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px); color: var(--ink);
  transition: all 0.4s var(--ease);
}
.shot-play::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(255, 215, 230, 0.45); animation: ripple 2.4s ease-out infinite;
}
@keyframes ripple {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.shot-play svg { width: 26px; height: 26px; fill: var(--ink); margin-left: 3px; }
.shot-play:hover { background: rgba(225, 75, 126, 0.75); border-color: var(--rose); transform: translate(-50%, -50%) scale(1.08); }
.shot-video.playing .shot-play,
.shot-video.playing figcaption { opacity: 0; pointer-events: none; }

.act-foot {
  margin-top: 2.6rem; font-family: var(--serif); font-size: 1.12rem;
  line-height: 2.1; letter-spacing: 0.05em; color: var(--ink-dim);
}
.act-foot em {
  font-style: normal; font-size: 1.28rem;
  background: linear-gradient(120deg, var(--blush), var(--gold-soft) 55%, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 900px) {
  .gallery { columns: 2; column-gap: 16px; }
  .shot { margin-bottom: 16px; }
}
@media (max-width: 560px) {
  .gallery, .gallery-duo { columns: 1; }
  .gallery-act { padding-top: 100px; padding-bottom: 100px; }
  .shot figcaption { font-size: 0.86rem; padding: 18px 16px 16px; }
  /* 触屏没有 hover，字幕常驻显示 */
  .shot.in figcaption { opacity: 1; }
}

/* ============================================================
   照片查看器(灯箱)
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 20px 96px;
  background: rgba(10, 3, 8, 0.94); backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.lightbox.show { opacity: 1; visibility: visible; }

.lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  max-width: 100%; max-height: 100%;
}
.lb-img {
  max-width: 100%; max-height: calc(100vh - 210px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.94); opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
.lightbox.show .lb-img { transform: none; opacity: 1; }
.lb-cap {
  max-width: 640px; text-align: center; color: var(--blush);
  font-size: 0.96rem; line-height: 1.9;
}
.lb-count {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font-family: var(--serif); letter-spacing: 0.22em; font-size: 0.85rem; color: var(--ink-dim);
}

.lb-close, .lb-nav {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(8px); transition: all 0.35s var(--ease);
}
.lb-close { top: 22px; right: 22px; width: 46px; height: 46px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; fill: var(--ink); }
.lb-close:hover, .lb-nav:hover { border-color: var(--rose); background: rgba(225, 75, 126, 0.35); box-shadow: 0 0 22px rgba(255, 122, 168, 0.4); }
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
.lightbox.single .lb-nav, .lightbox.single .lb-count { display: none; }

@media (max-width: 640px) {
  .lightbox { padding: 60px 12px 84px; }
  .lb-img { max-height: calc(100vh - 230px); }
  .lb-cap { font-size: 0.88rem; padding: 0 6px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 14px; right: 14px; }
}

/* ============================================================
   第四幕 · 翻牌
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; max-width: 940px; width: 100%; }
.flip-card { perspective: 1200px; height: 240px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s var(--ease); }
.flip-card:hover .flip-inner, .flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; border: 1px solid var(--glass-brd);
}
.flip-front { background: linear-gradient(150deg, rgba(255, 122, 168, 0.14), rgba(244, 199, 123, 0.08)); backdrop-filter: blur(8px); }
.flip-front .num { font-family: var(--script); font-size: 2.6rem; color: var(--gold); opacity: 0.85; }
.flip-front p { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.06em; }
.flip-back { background: linear-gradient(150deg, var(--rose-deep), var(--bg-2)); transform: rotateY(180deg); }
.flip-back p { font-size: 1.05rem; color: var(--blush); line-height: 1.8; }

/* ============================================================
   第五幕 · 情书信封
   ============================================================ */
.envelope {
  position: relative; width: min(560px, 92vw); height: 360px; perspective: 1400px;
}
.env-back {
  position: absolute; inset: 0; z-index: 1; border-radius: 10px;
  background: linear-gradient(160deg, #7a2745, #4a132e);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5);
}
.letter-paper {
  position: absolute; left: 5%; top: 8%; width: 90%; z-index: 2;
  padding: 40px 34px 44px; border-radius: 6px; text-align: left; color: #5a2338;
  background: linear-gradient(180deg, rgba(255, 246, 240, 0.98), rgba(255, 238, 232, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  transform-origin: bottom center; transform: translateY(6%) scale(0.9);
  transition: transform 1s var(--ease) 0.35s; will-change: transform;
}
.letter-paper::before {
  content: ''; position: absolute; inset: 12px; border: 1px solid rgba(180, 90, 120, 0.28); border-radius: 4px; pointer-events: none;
}
.letter-greeting { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin-bottom: 1rem; }
.typewriter { font-family: var(--sc); font-size: 1.02rem; line-height: 2; min-height: 12.5em; letter-spacing: 0.02em; }
.typewriter::after { content: '|'; color: var(--rose-deep); animation: caret 0.8s step-end infinite; }
.typewriter.done::after { content: ''; }
@keyframes caret { 50% { opacity: 0; } }
.letter-sign { margin-top: 1.4rem; text-align: right; font-family: var(--script); font-size: 1.6rem; color: var(--rose-deep); }

.env-front {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; z-index: 3; border-radius: 10px;
  background: linear-gradient(160deg, #8f2f52, #5c1838);
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.25);
}
.env-to {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  font-family: var(--serif); font-size: clamp(0.95rem, 3vw, 1.22rem);
  letter-spacing: 0.22em; color: var(--gold-soft); white-space: nowrap;
  padding-bottom: 8px; border-bottom: 1px solid rgba(249, 227, 182, 0.35);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.env-flap {
  position: absolute; left: 0; top: 0; width: 100%; height: 56%; z-index: 5;
  background: linear-gradient(160deg, #9c355a, #6d1f40);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transition: transform 0.9s var(--ease), z-index 0s 0.45s;
  backface-visibility: hidden;
}
.env-wax {
  position: absolute; left: 50%; top: 44%; z-index: 6; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ff8fb5, #c22f5c 68%, #8a1c40);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 -3px 9px rgba(0, 0, 0, 0.4), inset 0 3px 8px rgba(255, 255, 255, 0.2);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.wax-text {
  font-family: var(--serif); font-weight: 600; font-size: 0.92rem; line-height: 1.15;
  color: #ffe6ef; letter-spacing: 0.04em; text-align: center;
  writing-mode: vertical-rl; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.wax-text i { font-style: normal; color: #fff; font-size: 0.7rem; }
.envelope:hover .env-wax { transform: translate(-50%, -50%) scale(1.08) rotate(-6deg); }

/* 开启态 */
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-wax { opacity: 0; transform: translate(-50%, -50%) scale(0.2); pointer-events: none; }
.envelope.open .letter-paper { transform: translateY(-42%) scale(1); z-index: 8; height: auto; }
.envelope.open { height: 560px; }

/* ============================================================
   第六幕 · 告白
   ============================================================ */
.question { overflow: hidden; }
.q-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(255, 122, 168, 0.22), transparent 55%); animation: breathe 7s ease-in-out infinite; }
.q-title {
  position: relative; z-index: 3; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 5.5vw, 3.4rem); letter-spacing: 0.06em; margin-bottom: 1rem;
  filter: drop-shadow(0 4px 20px rgba(255, 122, 168, 0.3));
}
.q-sub { position: relative; z-index: 3; font-family: var(--serif); font-style: italic; color: var(--blush); font-size: 1.2rem; margin-bottom: 3rem; transition-delay: 0.15s; }
.q-buttons { position: relative; z-index: 3; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; justify-content: center; transition-delay: 0.3s; }
.btn-yes, .btn-no { font-family: var(--serif); letter-spacing: 0.2em; border: none; border-radius: 999px; transition: all 0.35s var(--ease); }
.btn-yes { padding: 18px 52px; font-size: 1.4rem; color: #fff; background: linear-gradient(120deg, var(--rose-deep), var(--rose)); box-shadow: 0 12px 34px rgba(225, 75, 126, 0.5); }
.btn-yes:hover { transform: scale(1.06); box-shadow: 0 18px 44px rgba(225, 75, 126, 0.7); }
.btn-no { padding: 14px 34px; font-size: 1rem; color: var(--ink-dim); background: var(--glass); border: 1px solid var(--glass-brd); backdrop-filter: blur(8px); }
.btn-no.runaway { position: fixed; z-index: 78; }

/* ============================================================
   成功幕
   ============================================================ */
.celebrate {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 45%, rgba(58, 18, 48, 0.96), rgba(21, 6, 16, 0.99));
  backdrop-filter: blur(6px); opacity: 0; visibility: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.celebrate.show { opacity: 1; visibility: visible; }
.confetti-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate-inner { position: relative; z-index: 3; transform: translateY(24px) scale(0.96); transition: transform 0.9s var(--ease) 0.2s; }
.celebrate.show .celebrate-inner { transform: none; }
.big-heart svg { width: 96px; height: 88px; fill: var(--rose); filter: drop-shadow(0 0 34px rgba(255, 122, 168, 0.8)); animation: beat 1.1s var(--ease) infinite; }
.celebrate-title {
  font-family: var(--script); font-size: clamp(2.6rem, 9vw, 5rem);
  background: linear-gradient(120deg, var(--rose), var(--gold), var(--blush));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0.6rem 0 1rem;
}
.celebrate-text { font-family: var(--serif); font-size: clamp(1.05rem, 3vw, 1.35rem); color: var(--blush); line-height: 2; margin-bottom: 1.4rem; }
.celebrate-sign {
  font-family: var(--serif); letter-spacing: 0.34em; font-size: 0.92rem; color: var(--gold);
  margin-bottom: 2.2rem; padding-top: 1.2rem; position: relative;
}
.celebrate-sign::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.btn-ghost { font-family: var(--serif); letter-spacing: 0.16em; padding: 13px 30px; border-radius: 999px; color: var(--ink); background: transparent; border: 1px solid var(--rose); transition: all 0.4s var(--ease); }
.btn-ghost:hover { background: var(--rose); color: #2a0a1a; box-shadow: 0 0 26px rgba(255, 122, 168, 0.5); }

/* ============================================================
   返回顶部
   ============================================================ */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 79;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--glass-brd); background: var(--glass); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px) scale(0.8); pointer-events: none;
  transition: all 0.5s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--rose); box-shadow: 0 0 20px rgba(255, 122, 168, 0.4); }
.to-top svg { width: 22px; height: 22px; fill: var(--rose); }

/* ============================================================
   页脚
   ============================================================ */
.footer { position: relative; z-index: 3; text-align: center; padding: 70px 24px 90px; }
.footer-script { font-family: var(--script); font-size: 2.4rem; background: linear-gradient(120deg, var(--rose), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.footer-sub { color: var(--ink-dim); font-size: 0.85rem; letter-spacing: 0.2em; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 680px) {
  .timeline::before { left: 20px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding-left: 48px; padding-right: 8px; }
  .tl-item .tl-dot { left: 12px !important; right: auto !important; }
  .flip-card { height: 210px; }
  .q-buttons { gap: 18px; }
  .count-box { min-width: 74px; padding: 18px 12px 14px; }
  .envelope.open { height: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .shot-inner { transform: none; }
  .shot figcaption { opacity: 1; transform: none; }
  .lb-img { opacity: 1; transform: none; }
}
