/* ============================================================
 * 婚礼电子邀请函 · 样式
 * 设计基调：宣纸米白 + 墨色 + 香槟金 + 中国红，宋体大标题，
 * 章节式全屏影像，细金线框，克制的入场动效。
 * ============================================================ */

:root {
  --ink: #1c1815;
  --ink-2: #3b332c;
  --ink-3: #74685c;
  --paper: #f7f2e8;
  --paper-2: #fbf7ef;
  --line: #d9cdb6;
  --gold: #b28f52;
  --gold-2: #d8c096;
  --red: #8c2b23;
  --red-2: #a8382d;

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --latin: "Didot", "Bodoni MT", "Times New Roman", Georgia, serif;

  --stage-w: 480px;
}

* { -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  background: #0c0a08;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #0c0a08;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; height: 100dvh; }

[hidden] { display: none !important; }

img { max-width: 100%; }

/* 纸张颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .07;
  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='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* 阅读进度 */
#progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 70;
  transition: transform .12s linear;
}

/* 主舞台：手机宽度居中，两侧留黑 */
#stage {
  position: relative;
  width: 100%;
  max-width: var(--stage-w);
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 90px rgba(0, 0, 0, .7);
}

/* ── 封面 ───────────────────────────────────────────────── */

.curtain {
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: var(--stage-w);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(46px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: #120f0c;
  transition: transform 1.05s cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}

.curtain.is-open { transform: translateY(-100%); }

.curtain__media { position: absolute; inset: 0; }

.curtain__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  background: #241d18;
  animation: kenburns 24s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.02); }
  to { transform: scale(1.13); }
}

.curtain__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 8, 6, .58) 0%,
      rgba(10, 8, 6, .2) 20%,
      rgba(10, 8, 6, 0) 34%,
      rgba(10, 8, 6, .24) 50%,
      rgba(10, 8, 6, .68) 62%,
      rgba(10, 8, 6, .92) 71%,
      rgba(8, 6, 5, .985) 82%,
      #080605 100%),
    radial-gradient(130% 70% at 50% 34%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .4) 100%);
}

.curtain__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 30px;
  color: #f3ead9;
  width: 100%;
  max-width: 460px;
}

.curtain__kicker {
  position: absolute;
  top: calc(46px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font: 500 9.5px/1 var(--sans);
  letter-spacing: .58em;
  text-indent: .58em;
  color: var(--gold-2);
}

.curtain__kicker::after {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  margin: 13px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

.curtain__names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 7.8vw, 34px);
  letter-spacing: .16em;
  text-indent: .16em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .55);
}

.curtain__names i {
  font-style: normal;
  margin: 0 .3em;
  color: var(--gold-2);
  font-size: .68em;
  vertical-align: .1em;
}

.curtain__rule {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  width: 190px;
  margin: 22px auto 18px;
  color: var(--gold-2);
}

.curtain__rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

.curtain__rule b { font-size: 6px; letter-spacing: 0; }

.curtain__date {
  margin: 0 0 10px;
  font: 400 13px/1 var(--latin);
  letter-spacing: .42em;
  color: #e9dcc6;
  text-indent: .42em;
}

.curtain__venue {
  margin: 0;
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(243, 234, 217, .7);
}

.seal {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 30px auto 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(216, 192, 150, .7);
  background: radial-gradient(circle at 50% 38%, rgba(146, 46, 37, .96), rgba(92, 24, 19, .97));
  color: #f8ecd6;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .16em;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5), inset 0 0 0 5px rgba(248, 236, 214, .07);
  animation: sealPulse 3.8s ease-in-out infinite;
  transition: transform .34s cubic-bezier(.2, .8, .2, 1), opacity .4s;
}

.seal__ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(248, 236, 214, .28);
}

.seal__text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.25;
  font-size: 14px;
}

.seal:active { transform: scale(.94); }

.seal.is-pressed {
  transform: scale(.88);
  opacity: 0;
  transition: transform .4s, opacity .4s;
}

@keyframes sealPulse {
  0%, 100% { box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 0 0 rgba(200, 160, 100, .26); }
  55% { box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 0 16px rgba(200, 160, 100, 0); }
}

.curtain__hint {
  margin: 18px 0 0;
  font-size: 9.5px;
  letter-spacing: .34em;
  color: rgba(243, 234, 217, .48);
  text-indent: .34em;
}

/* ── 通用区块 ───────────────────────────────────────────── */

.sec {
  position: relative;
  padding: 84px 26px;
  box-sizing: border-box;
}

.eyebrow {
  margin: 0 0 26px;
  font: 500 9.5px/1 var(--sans);
  letter-spacing: .46em;
  text-transform: uppercase;
  color: var(--gold);
  text-indent: .46em;
}

.eyebrow--center { text-align: center; }
.eyebrow--light { color: var(--gold-2); }

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .95s ease, transform 1.05s cubic-bezier(.2, .75, .25, 1);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 图片容器：lqip 模糊底 + 加载后淡入 */
.ph {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: var(--ar, .7);
  background-size: cover;
  background-position: center;
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
}

.ph.is-loaded img { opacity: 1; }

/* ── 序章 ───────────────────────────────────────────────── */

.sec--preface {
  text-align: center;
  overflow: hidden;
  padding: 96px 26px 92px;
  background: var(--paper-2);
}

.preface__halo {
  position: absolute;
  top: 66px;
  left: 50%;
  width: 160px;
  height: 160px;
  margin-left: -80px;
  border: 1px solid rgba(178, 143, 82, .26);
  border-radius: 50%;
}

.preface__halo::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(178, 143, 82, .13);
  border-radius: 50%;
}

.preface__mark {
  position: relative;
  font-family: var(--serif);
  font-size: 108px;
  line-height: 1;
  color: var(--red);
  margin-bottom: 28px;
  text-shadow: 0 3px 0 rgba(255, 255, 255, .55);
}

.preface__lines p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 2.2;
  letter-spacing: .16em;
  color: var(--ink-2);
}

.sec--preface .eyebrow--center { margin-top: 46px; }

.preface__lines::after {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  margin: 34px auto 0;
  background: var(--gold);
  opacity: .65;
}

.preface__date {
  position: relative;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.preface__y {
  font: 400 10.5px/1 var(--latin);
  letter-spacing: .42em;
  color: var(--ink-3);
  text-indent: .42em;
}

.preface__md {
  font-family: var(--latin);
  font-size: 36px;
  letter-spacing: .2em;
  text-indent: .2em;
  color: var(--ink);
  line-height: 1;
}

.preface__w {
  font-size: 10.5px;
  letter-spacing: .24em;
  color: var(--ink-3);
  text-indent: .24em;
}

.scroll-cue {
  position: relative;
  width: 1px;
  height: 46px;
  margin: 36px auto 0;
  background: linear-gradient(180deg, transparent, var(--gold));
}

.scroll-cue span {
  position: absolute;
  bottom: -2px;
  left: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: cue 2.2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes cue {
  0% { opacity: 0; transform: translateY(-8px); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ── 邀请正文 ───────────────────────────────────────────── */

.sec--invite { text-align: center; background: var(--paper); padding-top: 92px; }

.invite__title {
  margin: 0 0 34px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: .52em;
  text-indent: .52em;
}

.invite__card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfaf4, #f5eddf);
  padding: 46px 34px 48px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75), 0 22px 46px -34px rgba(60, 40, 20, .6);
}

.invite__card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(178, 143, 82, .34);
  pointer-events: none;
}

.invite__parents {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.invite__parents p {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink-2);
}

.invite__parents span {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: .18em;
  color: var(--gold);
}

.invite__parents-sub {
  margin: 14px 0 30px;
  font-size: 9.5px;
  letter-spacing: .42em;
  color: var(--ink-3);
  text-indent: .42em;
}

.invite__body p {
  margin: 0;
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 2.05;
  letter-spacing: .08em;
  color: var(--ink);
}

.invite__body .invite__when {
  margin: 11px 0 13px;
  font-family: var(--latin);
  font-size: 16px;
  letter-spacing: .13em;
  line-height: 1.6;
  text-indent: 0;
  color: var(--ink);
}

.invite__body .invite__last {
  margin-top: 12px;
  color: var(--ink-3);
}

.invite__seal {
  position: absolute;
  right: -15px;
  bottom: -17px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--red);
  color: #f8ecd6;
  font-family: var(--serif);
  font-size: 26px;
  transform: rotate(-7deg);
  box-shadow: 0 10px 22px -10px rgba(140, 43, 35, .95);
  opacity: .95;
}

/* ── 新人 ───────────────────────────────────────────────── */

.sec--couple { background: var(--paper); padding-top: 54px; }

.couple__lead {
  margin: 0 0 50px;
  text-align: center;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--ink-3);
  text-indent: .32em;
}

.person { position: relative; margin-bottom: 62px; }

.person__photo { position: relative; width: 76%; }

.person--bride .person__photo { margin-left: auto; }

.person__initial {
  position: absolute;
  bottom: -26px;
  right: -14px;
  font-family: var(--latin);
  font-size: 72px;
  line-height: 1;
  color: rgba(178, 143, 82, .2);
  pointer-events: none;
}

.person--bride .person__initial { right: auto; left: -14px; }

.person__text { width: 72%; margin-top: 24px; }

.person--bride .person__text { margin-left: auto; text-align: right; }

.person__role {
  margin: 0 0 9px;
  font: 500 9px/1 var(--sans);
  letter-spacing: .44em;
  color: var(--gold);
  text-indent: .44em;
}

.person__name {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: .16em;
}

.person__word {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.95;
  letter-spacing: .05em;
  color: var(--ink-3);
}

.couple__amp {
  text-align: center;
  font-family: var(--latin);
  font-size: 42px;
  color: var(--gold);
  opacity: .55;
  margin-top: -14px;
}

/* ── 章节 ───────────────────────────────────────────────── */

.chapter {
  position: relative;
  height: 100svh;
  min-height: 540px;
  max-height: 920px;
  overflow: hidden;
  background: #0e0b09;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 24px 42px;
  box-sizing: border-box;
}

.chapter__media { position: absolute; inset: 0; }

.chapter__media .ph {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background-size: cover;
}

.chapter__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  transform: scale(1.08);
  will-change: transform;
}

.chapter__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 8, 6, .5) 0%,
    rgba(10, 8, 6, .04) 28%,
    rgba(10, 8, 6, .12) 52%,
    rgba(10, 8, 6, .88) 100%);
}

.chapter__frame {
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(232, 214, 178, .26);
  pointer-events: none;
}

.chapter__head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #f1e6d2;
}

.chapter__idx {
  font: 400 9px/1 var(--latin);
  letter-spacing: .3em;
  color: rgba(241, 230, 210, .68);
  padding-top: 6px;
}

.chapter__num {
  font-family: var(--serif);
  font-size: clamp(62px, 18vw, 84px);
  line-height: .86;
  color: rgba(246, 236, 219, .34);
  letter-spacing: 0;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .55);
}

.chapter__foot { position: relative; z-index: 2; color: #f4ead8; }

.chapter__en {
  margin: 0 0 10px;
  font: 500 8.5px/1 var(--sans);
  letter-spacing: .5em;
  color: var(--gold-2);
  text-indent: .5em;
}

.chapter__name {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 29px;
  letter-spacing: .34em;
}

.chapter__quote {
  margin: 0;
  max-width: 80%;
  padding-left: 13px;
  border-left: 1px solid rgba(216, 192, 150, .45);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.95;
  letter-spacing: .1em;
  color: rgba(244, 234, 216, .84);
}

.strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 24px 28px;
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar { display: none; }

.strip__item {
  flex: 0 0 32%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.strip__item .ph { aspect-ratio: .74; }

.strip__item:nth-child(even) { transform: translateY(11px); }

/* ── 时间地点 ───────────────────────────────────────────── */

.sec--info { background: var(--paper-2); }

.dateblock {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.dateblock__num {
  font-family: var(--latin);
  font-size: clamp(54px, 16.5vw, 70px);
  line-height: .84;
  letter-spacing: .01em;
  color: var(--ink);
}

.dateblock__num i { font-style: normal; color: var(--gold); margin: 0 -.05em; }

.dateblock__side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 7px;
  font: 400 9.5px/1 var(--latin);
  letter-spacing: .3em;
  color: var(--ink-3);
}

.dateblock__time { color: var(--red); font-size: 12px; letter-spacing: .18em; }

.venue {
  position: relative;
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 28px 24px;
}

.venue__label {
  margin: 0 0 14px;
  font: 500 8.5px/1 var(--sans);
  letter-spacing: .46em;
  color: var(--gold);
  text-indent: .46em;
}

.venue__name {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: .1em;
}

.venue__hall {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-2);
}

.venue__addr {
  margin: 0 0 22px;
  font-size: 12.5px;
  line-height: 1.85;
  letter-spacing: .03em;
  color: var(--ink-3);
}

.venue__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.venue__actions .btn {
  padding: 0 4px;
  font-size: 11px;
  letter-spacing: .06em;
}

/* ── 按钮 ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s, opacity .3s, background .3s, color .3s;
}

.btn:active { transform: scale(.98); opacity: .88; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--ghost { border-color: var(--line); color: var(--ink-3); }

.btn--gold {
  height: 46px;
  padding: 0 32px;
  border-color: var(--gold);
  background: linear-gradient(180deg, #d8c096, #b28f52);
  color: #241a0b;
  letter-spacing: .26em;
  text-indent: .26em;
  font-size: 11px;
}

/* ── 流程 ───────────────────────────────────────────────── */

.timeline { margin-top: 44px; }

.timeline__label {
  margin: 0 0 22px;
  font: 500 8.5px/1 var(--sans);
  letter-spacing: .46em;
  color: var(--gold);
  text-indent: .46em;
}

.tl { list-style: none; margin: 0; padding: 0; }

.tl__item {
  display: grid;
  grid-template-columns: 54px 18px 1fr;
  align-items: start;
  padding-bottom: 28px;
}

.tl__item:last-child { padding-bottom: 0; }

.tl__time {
  font: 400 13px/1 var(--latin);
  letter-spacing: .1em;
  color: var(--ink);
  padding-top: 2px;
}

.tl__dot { position: relative; height: 100%; }

.tl__dot::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.tl__dot::after {
  content: "";
  position: absolute;
  top: 15px;
  bottom: -6px;
  left: 7px;
  width: 1px;
  background: var(--line);
}

.tl__item:last-child .tl__dot::after { display: none; }

.tl__body b {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14.5px;
  letter-spacing: .12em;
}

.tl__body em {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--ink-3);
}

/* ── 报名 ───────────────────────────────────────────────── */

.sec--rsvp { background: var(--paper); }

.rsvp__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: .3em;
}

.rsvp__lead {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: .05em;
  color: var(--ink-3);
}

.rsvp__stat {
  margin: 0 0 28px;
  font: 400 10.5px/1 var(--sans);
  letter-spacing: .14em;
  color: var(--gold);
}

.rsvp__closed {
  margin-top: 30px;
  padding: 34px 20px;
  border: 1px dashed var(--line);
  text-align: center;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--ink-3);
}

.form { margin-top: 28px; }

.field { margin-bottom: 26px; }

.field label,
.field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-2);
}

.field label i,
.field__label i { font-style: normal; color: var(--red); }

.field label small,
.field__label small {
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
}

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 11px 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  appearance: none;
  transition: border-color .3s;
}

textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
  padding: 12px;
  font-size: 13.5px;
  line-height: 1.9;
  resize: vertical;
}

input:focus,
textarea:focus { border-color: var(--gold); }

input::placeholder,
textarea::placeholder {
  color: #b5a894;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .05em;
}

input.is-error { border-color: var(--red) !important; }

.field__note {
  margin: 9px 0 0;
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--gold);
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 17px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: all .3s;
}

.pill input { position: absolute; opacity: 0; pointer-events: none; }

.pill.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.pills--count { margin-top: 13px; }

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.choice {
  position: relative;
  padding: 15px 6px;
  border: 1px solid var(--line);
  background: #fffdf8;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
}

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .14em;
}

.choice em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-3);
  white-space: nowrap;
}

.choice.is-on { border-color: var(--red); background: #fdf4f0; }
.choice.is-on b { color: var(--red); }
.choice.is-on em { color: var(--ink-2); }

.stepper {
  display: inline-flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.stepper__btn {
  width: 46px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.stepper__val {
  width: 40px;
  text-align: center;
  font-family: var(--latin);
  font-size: 17px;
}

.stepper__unit {
  padding-right: 15px;
  font-size: 9.5px;
  letter-spacing: .02em;
  color: var(--ink-3);
}

.companions { display: grid; gap: 12px; }

.submit {
  width: 100%;
  height: 54px;
  margin-top: 4px;
  border: 0;
  background: linear-gradient(180deg, #a8382d, #7e2119);
  color: #f8ecd6;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .3em;
  text-indent: .3em;
  cursor: pointer;
  transition: opacity .3s, transform .2s;
}

.submit:active { transform: scale(.99); }
.submit[disabled] { opacity: .6; }

.form__tip {
  margin: 13px 0 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: .03em;
  color: var(--ink-3);
}

.thanks {
  position: relative;
  margin-top: 28px;
  padding: 42px 26px;
  border: 1px solid var(--line);
  background: #fffdf8;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: all .7s cubic-bezier(.2, .8, .2, 1);
}

.thanks.is-in { opacity: 1; transform: none; }

.thanks__seal {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--red);
  color: #f8ecd6;
  font-family: var(--serif);
  font-size: 28px;
  transform: rotate(-6deg);
}

.thanks__title {
  margin: 0 0 13px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .2em;
}

.thanks__body {
  margin: 0 0 26px;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.thanks__sub {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-style: normal;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.thanks__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 祝福墙 ─────────────────────────────────────────────── */

.sec--wall { background: var(--paper-2); }

.wall__title {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  letter-spacing: .28em;
}

.wall__list { display: grid; gap: 22px; }

.wall__card { padding: 4px 0 4px 16px; border-left: 2px solid var(--gold); }

.wall__msg {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.wall__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
}

.wall__meta em { font-style: normal; opacity: .7; }

.wall__empty {
  margin: 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* ── 照片墙 ─────────────────────────────────────────────── */

.sec--gallery {
  padding: 78px 0 0;
  background: #12100d;
  color: #eee3cf;
}

.gallery__title {
  margin: 0 0 10px;
  padding: 0 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .24em;
}

.gallery__lead {
  margin: 0 0 26px;
  padding: 0 26px;
  font-size: 10.5px;
  letter-spacing: .14em;
  color: rgba(238, 227, 207, .6);
}

.sec--gallery .eyebrow { padding: 0 26px; }

.gallery {
  columns: 3;
  column-gap: 3px;
  padding: 0 3px 3px;
}

.gallery__item {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  background: #1b1713;
  cursor: pointer;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.gallery__item .ph { aspect-ratio: var(--ar, .7); }

.gallery__item img { transform: scale(1); transition: transform .8s ease, opacity .8s ease; }
.gallery__item:active img { transform: scale(1.03); }

/* ── 结尾 ───────────────────────────────────────────────── */

.closing {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 104px 26px 0;
  overflow: hidden;
  background: #0d0b09;
}

.closing__media { position: absolute; inset: 0; }

.closing__media .ph {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.closing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(1.08);
  will-change: transform;
}

.closing__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(8, 6, 5, .82) 0%,
    rgba(8, 6, 5, .5) 42%,
    rgba(8, 6, 5, .92) 100%);
}

.closing__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #f2e7d4;
}

.closing__title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 29px;
  letter-spacing: .26em;
  text-indent: .26em;
}

.closing__text {
  max-width: 280px;
  margin: 0 auto 26px;
  font-size: 12.5px;
  line-height: 1.95;
  letter-spacing: .06em;
  color: rgba(242, 231, 212, .78);
}

.closing__date {
  margin-bottom: 36px;
  font: 400 10.5px/1.7 var(--latin);
  letter-spacing: .22em;
  color: var(--gold-2);
}

.closing__contact {
  margin: 24px 0 0;
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(242, 231, 212, .5);
}

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 34px 0 32px;
  font: 400 9.5px/1 var(--latin);
  letter-spacing: .3em;
  color: rgba(242, 231, 212, .38);
}

.footer__dot { font-size: 5px; color: var(--gold); letter-spacing: 0; }

/* ── 悬浮音乐 ───────────────────────────────────────────── */

.music-btn {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: max(14px, calc(50vw - var(--stage-w) / 2 + 14px));
  z-index: 60;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  background: rgba(20, 16, 12, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.music-btn__disc {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(240, 230, 210, .65);
}

.music-btn__disc::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(240, 230, 210, .65);
}

.music-btn.is-playing .music-btn__disc { animation: spin 4.5s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 底部快捷条 ─────────────────────────────────────────── */

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 55;
  display: flex;
  align-items: center;
  padding: 5px 6px;
  border: 1px solid rgba(216, 192, 150, .26);
  border-radius: 40px;
  background: rgba(20, 16, 12, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1);
}

.dock.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

.dock button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border: 0;
  background: none;
  color: #f0e5d2;
  font-size: 11px;
  letter-spacing: .12em;
  white-space: nowrap;
  cursor: pointer;
}

.dock__sep { width: 1px; height: 13px; background: rgba(216, 192, 150, .28); }
.dock__ico { font-size: 8px; color: var(--gold-2); }

/* ── 灯箱 ───────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050403;
  opacity: 0;
  transition: opacity .28s;
}

.lightbox.is-open { opacity: 1; }

.lightbox img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
}

.lightbox__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  font: 400 9.5px/1 var(--latin);
  letter-spacing: .24em;
  color: rgba(240, 230, 210, .68);
}

.lightbox__bar button {
  padding: 6px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 60px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(245, 236, 219, .82);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9);
}

.lightbox__nav--prev { left: 2px; }
.lightbox__nav--next { right: 2px; }

/* ── 海报弹层 ───────────────────────────────────────────── */

.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: #070504;
  opacity: 0;
  transition: opacity .28s;
  overflow-y: auto;
}

.poster-modal.is-open { opacity: 1; }

.poster-modal__box { width: 100%; max-width: 420px; text-align: center; }

.poster-modal__box img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #14100c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
}

.poster-modal__hint {
  margin: 15px 0;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(240, 230, 210, .7);
}

.poster-modal__actions { display: flex; gap: 10px; justify-content: center; }

.poster-modal .btn:not(.btn--gold) { border-color: rgba(240, 230, 210, .5); color: #f0e5d2; }

/* ── Toast ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 110;
  padding: 11px 20px;
  border-radius: 2px;
  background: rgba(24, 19, 14, .94);
  color: #f2e8d6;
  font-size: 11.5px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .3s, transform .3s;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── 桌面端：手机画幅居中，两侧题字 ─────────────────────── */

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(120% 90% at 50% 0%, #1a1511 0%, #0a0806 60%);
  }

  #stage {
    box-shadow: 0 0 0 1px rgba(216, 192, 150, .1), 0 40px 120px rgba(0, 0, 0, .8);
  }

  body::before {
    content: "WEDDING INVITATION";
    position: fixed;
    top: 50%;
    left: 36px;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    font: 400 9.5px/1 var(--latin);
    letter-spacing: .62em;
    color: rgba(216, 192, 150, .3);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .curtain__media img { animation: none; }
  .seal { animation: none; }
  .scroll-cue span { animation: none; }
}

/* 极窄屏 */
@media (max-width: 340px) {
  .sec { padding-left: 20px; padding-right: 20px; }
  .invite__card { padding: 40px 24px 42px; }
  .chapter__name { font-size: 26px; }
}
