/* ==========================================================================
   电子婚礼请柬 — 暗夜鎏金 · 电影感（单屏翻页版）
   冯丽君 & 周月强 · 2026.10.03
   移动端优先（设计基线 375px），整页锁定不滚动，点击/滑动切换场景
   ========================================================================== */

/* ---------- 0. 设计变量 ---------- */
:root {
  --bg:          #0F0E0C;
  --bg-2:        #161410;
  --ink:         #EFE7D8;
  --ink-dim:     #A89F8C;
  --ink-faint:   #6E6659;
  --gold:        #C8A96A;
  --gold-bright: #E4C88A;
  --gold-deep:   #8A734A;
  --line:        rgba(200, 169, 106, .22);
  --line-soft:   rgba(200, 169, 106, .12);

  --f-serif:   "Noto Serif SC", "Songti SC", "STSong", serif;
  --f-display: "Cormorant Garamond", "Noto Serif SC", serif;
  --f-calli:   "Ma Shan Zheng", "STKaiti", "KaiTi", cursive;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --pad-x: 26px;
}

/* ---------- 1. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-serif);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
::selection { background: rgba(200,169,106,.35); }

/* ---------- 2. 胶片颗粒 ---------- */
.grain {
  position: fixed; inset: -60px;
  z-index: 60; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift .9s steps(4) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-18px, 12px); }
  50%  { transform: translate(14px, -16px); }
  75%  { transform: translate(-10px, -10px); }
  100% { transform: translate(0, 0); }
}

/* ---------- 3. 舞台与场景（核心翻页机制） ---------- */
.stage { position: fixed; inset: 0; }
.page {
  position: absolute; inset: 0;
  background: var(--bg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.045);
  transform-origin: 50% 55%;
  transition:
    opacity .85s ease,
    transform 1s var(--ease-out);
  z-index: 1;
}
.page.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 3;
}
/* 离场页：垫在新页之下微微缩小，形成纵深溶解 */
.page.behind {
  z-index: 2;
  transform: scale(.965);
}

/* 页内元素交错入场（仅在场景激活时） */
.page .a {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .85s var(--ease-out) var(--d, 0s),
    transform .85s var(--ease-out) var(--d, 0s);
}
.page.active .a { opacity: 1; transform: none; }

/* ---------- 4. 居中内容场景 ---------- */
.page-center {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px var(--pad-x) 90px;
}

/* ---------- 5. 场景 0 · 封面 ---------- */
.page-hero { display: flex; align-items: flex-end; justify-content: center; }
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 38%;
  animation: kenburns 24s var(--ease-out) infinite alternate;
  filter: saturate(1.02) contrast(1.03);
}
@keyframes kenburns {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.16) translateY(-1.5%); }
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(15,14,12,.5) 0%,
      rgba(15,14,12,0) 24%,
      rgba(15,14,12,.1) 50%,
      rgba(15,14,12,.66) 72%,
      rgba(15,14,12,.95) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%;
  text-align: center;
  padding: 0 var(--pad-x) 118px;
}
.hero-eyebrow {
  margin: 0 0 24px;
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .5em;
  color: var(--gold-bright);
  text-shadow: 0 1px 16px rgba(0,0,0,.85);
}
.hero-names {
  margin: 0;
  display: flex; align-items: baseline; justify-content: center;
  gap: 14px; flex-wrap: nowrap;
  font-weight: 500;
  font-size: clamp(30px, 9.2vw, 42px);
  letter-spacing: .12em;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.hero-amp {
  font-family: var(--f-display);
  font-style: italic;
  font-size: .62em;
  color: var(--gold-bright);
}
.hero-divider {
  width: 0; height: 1px;
  margin: 20px auto 16px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition:
    width 1s var(--ease-out) var(--d, 0s),
    opacity .85s var(--ease-out) var(--d, 0s),
    transform .85s var(--ease-out) var(--d, 0s) !important;
}
.page.active .hero-divider { width: 128px; }
.hero-date { margin: 0; }
.hero-date .d-num {
  display: block;
  font-family: var(--f-display);
  font-size: 20px; font-weight: 500;
  letter-spacing: .3em;
}
.hero-date .d-lunar {
  display: block; margin-top: 6px;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ink-dim);
}

/* ---------- 6. 场景 1 · 引言 ---------- */
.intro-mark {
  width: 34px; height: 34px;
  color: var(--gold);
  opacity: .8;
  margin-bottom: 30px;
}
.intro-quote {
  margin: 0 0 20px;
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 2.2;
}
.intro-note {
  margin: 0;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--ink-dim);
}

/* ---------- 7. 通用标题 ---------- */
.sec-eyebrow {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .5em;
  color: var(--gold);
}
.sec-title {
  margin: 0 0 26px;
  font-weight: 500;
  font-size: clamp(24px, 7vw, 30px);
  letter-spacing: .4em;
  padding-left: .4em;
}
.sec-title::after {
  content: ""; display: block;
  width: 34px; height: 1px;
  margin: 16px auto 0;
  background: var(--gold);
}

/* ---------- 8. 场景 2 · 请柬（火漆拆启） ---------- */

/* 请柬容器：信封态与展开态共用一个定位上下文 */
.invite {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---- 封缄态（火漆印 + 涟漪） ---- */
.iv-seal {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: opacity .9s ease, transform 1s var(--ease-out);
}
.invite.is-open .iv-seal {
  opacity: 0;
  transform: scale(1.2);
  pointer-events: none;
}

/* 火漆印主体 */
.iv-emblem {
  position: relative;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 30%, #E4C88A, #B8924C 66%, #8A734A);
  box-shadow:
    0 10px 34px rgba(184,146,76,.32),
    inset 0 2px 2px rgba(255,255,255,.4),
    inset 0 -4px 8px rgba(0,0,0,.28);
  font-family: var(--f-calli);
  font-size: 42px;
  color: #2A2218;
  line-height: 1;
  animation: sealBreathe 3.2s ease-in-out infinite;
}
/* 火漆印内圈刻线 */
.iv-emblem::before {
  content: ""; position: absolute; inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(42,34,24,.35);
}
@keyframes sealBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.invite.is-open .iv-emblem { animation: none; }

/* 涟漪圆环（待机时持续脉冲） */
.iv-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  border: 1px solid rgba(228,200,138,.5);
  animation: ringPulse 3.2s ease-out infinite;
  pointer-events: none;
}
.iv-ring.iv-ring-2 { animation-delay: 1.6s; }
@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: .8; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* 封缄文案 */
.iv-title {
  margin: 26px 0 8px;
  font-family: var(--f-calli);
  font-size: 17px;
  letter-spacing: .4em;
  padding-left: .4em;
  color: var(--gold);
}
.iv-hint {
  margin: 0;
  font-size: 11px;
  letter-spacing: .4em;
  padding-left: .4em;
  color: var(--ink-dim);
  animation: hintBreathe 2.4s ease-in-out infinite;
}
@keyframes hintBreathe {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}

/* 拆启时的金色粒子迸溅 */
.iv-particles {
  position: absolute; inset: 0;
  z-index: 4;
  pointer-events: none;
}
.iv-particles span {
  position: absolute;
  left: 50%; top: 42%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px rgba(228,200,138,.85);
  opacity: 0;
  animation: particleFly 1.5s var(--ease-out) var(--delay, 0s) forwards;
}
@keyframes particleFly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.25); }
}

/* 拆启光晕 */
.iv-glow {
  position: absolute;
  left: 50%; top: 44%;
  width: 260px; height: 260px;
  margin: -130px 0 0 -130px;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228,200,138,.18), transparent 68%);
  opacity: 0;
  pointer-events: none;
}
.invite.is-open .iv-glow { animation: glowPulse 2.8s ease-out 1; }
@keyframes glowPulse {
  0%   { opacity: 0; transform: scale(.5); }
  30%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ---- 展开态（暗金请柬卡） ---- */
.iv-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 26px 42px;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(200,169,106,.07), transparent 55%),
    var(--bg-2);
  border: 1px solid var(--line);
  text-align: center;
  /* 初始隐藏 */
  opacity: 0;
  transform: scale(.93) translateY(14px);
  filter: blur(8px);
  transition:
    opacity 1.1s ease .55s,
    transform 1.2s var(--ease-out) .55s,
    filter 1.1s ease .55s;
  pointer-events: none;
  z-index: 2;
}
.invite.is-open .iv-card {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
  pointer-events: auto;
}
/* 内细框 */
.iv-card::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
}
/* 四角鎏金 */
.iv-card::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 14px 1px,
    linear-gradient(var(--gold), var(--gold)) top left / 1px 14px,
    linear-gradient(var(--gold), var(--gold)) top right / 14px 1px,
    linear-gradient(var(--gold), var(--gold)) top right / 1px 14px,
    linear-gradient(var(--gold), var(--gold)) bottom left / 14px 1px,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1px 14px,
    linear-gradient(var(--gold), var(--gold)) bottom right / 14px 1px,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1px 14px;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* 请柬文字排版（暗金主题） */
.iv-card .letter-kicker {
  margin: 0 0 8px;
  font-family: var(--f-calli);
  font-size: 14px;
  letter-spacing: .5em;
  padding-left: .5em;
  color: var(--gold);
}
.iv-card .letter-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(24px, 7vw, 30px);
  letter-spacing: .34em;
  padding-left: .34em;
  color: var(--ink);
}
.iv-card .letter-rule {
  width: 40px; height: 1px;
  margin: 16px auto 24px;
  background: var(--gold);
}
.iv-card .letter-body p {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: .08em;
  line-height: 1.9;
  color: var(--ink);
}
.iv-card .letter-body p:first-child { color: var(--ink-dim); }
.iv-card .letter-sign {
  margin: 24px 0 0 !important;
  display: flex; align-items: baseline; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  font-family: var(--f-calli);
  font-size: 18px !important;
  letter-spacing: .1em !important;
  color: var(--gold-bright) !important;
}
.iv-card .letter-sign .sign-dot { color: var(--gold-deep); }
.iv-card .letter-sign .sign-zh { font-size: 13px; color: var(--ink-dim); margin-left: 4px; }

/* 请柬内容交错浮现 */
.iv-card .letter-kicker,
.iv-card .letter-title,
.iv-card .letter-rule,
.iv-card .letter-body,
.iv-card .letter-sign {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s ease, transform .7s var(--ease-out);
}
.invite.is-open .iv-card .letter-kicker { transition-delay: 1.3s; }
.invite.is-open .iv-card .letter-title  { transition-delay: 1.5s; }
.invite.is-open .iv-card .letter-rule   { transition-delay: 1.7s; }
.invite.is-open .iv-card .letter-body   { transition-delay: 1.9s; }
.invite.is-open .iv-card .letter-sign   { transition-delay: 2.1s; }
.invite.is-open .iv-card .letter-kicker,
.invite.is-open .iv-card .letter-title,
.invite.is-open .iv-card .letter-rule,
.invite.is-open .iv-card .letter-body,
.invite.is-open .iv-card .letter-sign {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 9. 场景 3 · 信息 + 倒计时 ---------- */
.countdown {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 30px;
  padding: 18px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cd-item { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.cd-num {
  font-family: var(--f-display);
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 500;
  color: var(--gold-bright);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cd-lab {
  font-size: 11px;
  letter-spacing: .3em;
  padding-left: .3em;
  color: var(--ink-dim);
  margin-top: 5px;
}
.cd-sep { font-family: var(--f-display); color: var(--gold-deep); padding-bottom: 16px; }

.info-rows { width: 100%; max-width: 400px; }
.info-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.info-row:last-child { border-bottom: none; }
.info-key {
  flex: 0 0 58px;
  font-family: var(--f-calli);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--gold);
}
.info-val { flex: 1; font-size: 14px; letter-spacing: .06em; line-height: 1.6; }
.info-val small { color: var(--ink-dim); }

/* ---------- 10. 场景 4/6 · 全幅大图 ---------- */
.page-spread { display: block; }
.spread-media { position: absolute; inset: 0; }
.spread-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  animation: kenburns 26s ease-in-out infinite alternate;
}
/* 第5页光影定格：移动端人物整体右移约 1/5 宽度 */
#p4 .spread-media img {
  object-position: 30% 45%;
}

#p6 .spread-media img {
  object-position: 45% 38%;
  animation: kenburns-soft 26s ease-in-out infinite alternate;
}
@keyframes kenburns-soft {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.08) translateY(-1%); }
}
.spread-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(15,14,12,.5), transparent 30%,
      transparent 56%, rgba(15,14,12,.88));
}
.spread-cap {
  position: absolute; left: 0; right: 0; bottom: 92px;
  z-index: 2;
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.sp-cn {
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 400;
  letter-spacing: .5em;
  padding-left: .5em;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
.sp-en {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: .4em;
  color: var(--gold-bright);
  text-shadow: 0 1px 12px rgba(0,0,0,.8);
}

/* ---------- 11. 场景 5 · 相册相框 ---------- */
.page-gallery { justify-content: center; }
.frame {
  position: relative;
  width: min(64vw, 250px);
  aspect-ratio: 3 / 4;
  padding: 10px;
  background: #191612;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -22px rgba(0,0,0,.75);
  cursor: zoom-in;
}
/* 照片堆叠效果 */
.frame::before, .frame::after {
  content: ""; position: absolute; inset: 0;
  background: #131109;
  border: 1px solid var(--line-soft);
  z-index: -1;
}
.frame::before { transform: rotate(-4.5deg) translate(-7px, 5px); }
.frame::after  { transform: rotate(3.5deg) translate(7px, 7px); }
.frame-stack {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}
.frame-stack img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.frame-stack img.on {
  opacity: 1;
  animation: kenburns 9s ease-in-out infinite alternate;
}
.gallery-hint {
  margin: 30px 0 0;
  font-size: 12.5px;
  letter-spacing: .3em;
  color: var(--gold);
  animation: hintBreathe 2.4s ease-in-out infinite;
}

/* ---------- 12. 场景 7 · 致谢 ---------- */
.foot-rule {
  width: 1px; height: 52px;
  margin-bottom: 30px;
  background: linear-gradient(180deg, transparent, var(--gold));
}
.foot-thanks {
  margin: 0 0 8px;
  font-family: var(--f-calli);
  font-size: 24px;
  letter-spacing: .5em;
  padding-left: .5em;
  color: var(--gold-bright);
}
.foot-sub {
  margin: 0 0 40px;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--ink-dim);
}
.foot-names { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fn-cn { font-size: 17px; letter-spacing: .2em; }
.fn-en, .fn-date {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--ink-faint);
}

/* ---------- 13. 页点导航 ---------- */
.pager {
  position: fixed;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex; flex-direction: column;
  gap: 12px;
}
.pager button {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(239,231,216,.22);
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.pager button.on {
  background: var(--gold-bright);
  transform: scale(1.6);
  box-shadow: 0 0 8px rgba(200,169,106,.55);
}

/* ---------- 14. 翻页提示 ---------- */
.page-hint {
  position: fixed;
  left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px;
  letter-spacing: .4em;
  padding-left: .4em;
  color: var(--ink-dim);
}
.page-hint i {
  width: 1px; height: 22px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: dropLine 1.8s ease-in-out infinite;
}
@keyframes dropLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 15. 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: #0A0908;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lb-stage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 0 70px;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  opacity: 0; transform: scale(.985);
  transition: opacity .45s ease, transform .45s var(--ease-out);
}
.lb-stage img.is-in { opacity: 1; transform: scale(1); }
.lb-counter {
  position: absolute; bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--ink-dim);
}
.lb-counter em { font-style: normal; color: var(--gold-deep); margin: 0 6px; }
.lb-btn {
  position: absolute;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(239,231,216,.85);
  border-radius: 50%;
  transition: background .25s ease, transform .2s ease;
  z-index: 2;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:active { background: rgba(200,169,106,.14); transform: scale(.92); }
.lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lb-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- 16. 音乐按钮 ---------- */
.music-toggle {
  position: fixed;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 55;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15,14,12,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold);
  transition: transform .25s ease;
}
.music-toggle:active { transform: scale(.9); }
.music-toggle svg { width: 18px; height: 18px; }
.music-toggle .icon-off { display: none; }
.music-toggle.is-muted .icon-on  { display: none; }
.music-toggle.is-muted .icon-off { display: block; }
.music-toggle.is-muted { color: var(--ink-faint); }
.music-toggle.is-playing { animation: spinMusic 5s linear infinite; }
@keyframes spinMusic { to { transform: rotate(360deg); } }

/* ---------- 17. 平板 / 桌面 ---------- */
@media (min-width: 640px) {
  :root { --pad-x: 40px; }
  .hero-media img { object-position: 50% 28%; }
  .frame { width: min(40vw, 280px); }
  .pager { right: 28px; gap: 14px; }
  .pager button { width: 7px; height: 7px; }
  .lb-prev { left: 28px; }
  .lb-next { right: 28px; }
  .lb-close { right: 28px; top: 28px; }
}
@media (min-width: 1024px) {
  .hero-content { padding-bottom: 132px; }
  .invite { width: min(38vw, 400px); }
  .info-rows, .countdown { max-width: 440px; }
}

/* ---------- 18. 动效减弱偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .grain { display: none; }
}