/* ============================================================
   婚礼请柬 · 样式
   风格：宣纸米白底 + 墨色文字 + 朱红点缀 + 淡金线条
   全部尺寸按移动端优先设计，在 320px ~ 480px 宽手机上均可用。
   ============================================================ */

:root {
  --paper:      #faf7f0;   /* 宣纸底 */
  --card:       #fffdf8;   /* 卡片底 */
  --ink:        #35302a;   /* 墨色 */
  --ink-soft:   #8b8175;   /* 次要文字 */
  --red:        #a63a2f;   /* 朱红 */
  --red-deep:   #8a2c23;   /* 深朱红 */
  --gold:       #c2a36b;   /* 淡金 */
  --line:       rgba(53, 48, 42, .12);
  --shadow:     0 10px 30px rgba(120, 90, 60, .10);
  --pad:        22px;
  --serif:      "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* ---------- 通用排版 ---------- */
.section { position: relative; padding: 52px var(--pad); }

.wrap { max-width: 560px; margin: 0 auto; }

.eyebrow {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 0 0 12px;
  font-weight: 500;
}

.zh-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .2em;
  text-align: center;
  margin: 0;
  text-indent: .2em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 28px;
  color: var(--gold);
  font-size: 12px;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 46px;
}
.divider::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after  { background: linear-gradient(270deg, transparent, var(--gold)); }

/* ---------- 分享缩略图占位（不可见但保留在 DOM 中） ---------- */
.share-cover {
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 2px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 飘落花瓣 ---------- */
.petals {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -8vh;
  width: 9px;
  height: 9px;
  background: radial-gradient(circle at 30% 30%, #f7d3cc, #e6a79b);
  border-radius: 60% 0 60% 0;
  opacity: .38;
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 24px), 112vh, 0) rotate(540deg); }
}

/* ---------- ① 封面 ---------- */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 84px var(--pad) 92px;
  overflow: hidden;
  background:
    radial-gradient(120% 55% at 50% 0%,   #fff9ef 0%, rgba(255, 249, 239, 0) 62%),
    radial-gradient(95%  50% at 50% 100%, rgba(194, 163, 107, .20) 0%, rgba(194, 163, 107, 0) 72%),
    var(--paper);
}
/* 背景「囍」水印 */
.cover::after {
  content: "囍";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 42vh;
  line-height: 1;
  color: rgba(166, 58, 47, .045);
  pointer-events: none;
}

.cover-photo {
  position: relative;
  z-index: 1;
  width: 62%;
  max-width: 230px;
  margin-bottom: 26px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(120, 90, 60, .18);
  outline: 1px solid rgba(194, 163, 107, .55);
  outline-offset: 5px;
}
.cover-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.cover .eyebrow { position: relative; z-index: 1; margin-bottom: 22px; }

.names {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 9.6vw, 42px);
  letter-spacing: .1em;
  margin: 0;
  text-indent: .1em;
}
.names .heart {
  display: inline-block;
  color: var(--red);
  font-size: .5em;
  vertical-align: .22em;
  margin: 0 .38em;
}

.cover-date {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--red-deep);
}
.cover-date .line {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.cover-date .line:last-child { background: linear-gradient(270deg, transparent, var(--gold)); }

.cover-lunar {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-soft);
}

.cover-motto {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  max-width: 17em;
  font-size: 13px;
  line-height: 2;
  letter-spacing: .1em;
  color: var(--ink-soft);
}

.scroll-cue {
  position: absolute;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--ink-soft);
}
.scroll-cue i {
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { opacity: .25; transform: translateY(-5px); }
  50%      { opacity: 1;   transform: translateY(3px); }
}

/* ---------- ② 倒计时 ---------- */
.countdown {
  padding: 30px var(--pad);
  text-align: center;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.countdown-title {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 460px;
  margin: 0 auto;
}
.countdown-grid .num {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.25;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
}
.countdown-grid .label {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-soft);
  margin-top: 2px;
}
.countdown-note {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .16em;
  color: var(--red-deep);
}

/* ---------- ③ 邀请语 ---------- */
.invitation-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.35;
  letter-spacing: .05em;
  text-align: justify;
  color: #443c33;
}
.invitation-host {
  margin-top: 22px;
  text-align: right;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-soft);
}

/* ---------- ④ 婚礼信息卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 18px;
  box-shadow: var(--shadow);
}
.info-row {
  display: flex;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-row .k {
  flex: 0 0 46px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-soft);
  padding-top: 3px;
}
.info-row .v { flex: 1; font-size: 15px; }
.info-row .v .strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .06em;
  color: var(--ink);
}
.info-row .v .sub {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: var(--card);
  color: var(--red-deep);
  font-size: 14px;
  letter-spacing: .06em;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.975); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.full { grid-column: 1 / -1; }
.btn.is-hidden { display: none; }

.tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.9;
}

/* ---------- ⑤ 流程时间轴 ---------- */
.timeline { position: relative; padding-left: 78px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 64px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--gold), rgba(194, 163, 107, .12));
}
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -17px; top: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--paper);
}
.tl-item .t {
  position: absolute;
  left: -78px; top: 4px;
  width: 56px;
  text-align: right;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--red-deep);
}
.tl-item .h {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .1em;
  margin: 0 0 4px;
}
.tl-item .d {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* ---------- ⑥ 相册（横向滑动） ---------- */
.gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px var(--pad) 16px;
  margin: 0 calc(var(--pad) * -1);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  flex: 0 0 68%;
  max-width: 260px;
  margin: 0;
  scroll-snap-align: center;
}
.gallery img,
.gallery .ph {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.gallery .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  font-size: 13px;
  letter-spacing: .08em;
  line-height: 2;
  color: var(--ink-soft);
  background: linear-gradient(140deg, #f4ede3, #e9dfd1);
  border: 1px dashed rgba(194, 163, 107, .8);
}
.gallery figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-soft);
}
.gallery-hint {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold);
}

/* ---------- ⑦ 联系方式 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card .role {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-soft);
}
.contact-card .name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .1em;
  margin: 6px 0 12px;
}
.contact-card a {
  display: block;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--red-deep);
}

/* ---------- ⑧ 页脚 ---------- */
.footer {
  padding: 40px var(--pad) calc(34px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.footer-motto {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .2em;
  color: var(--red-deep);
  text-indent: .2em;
}
.footer-names {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-soft);
}
.footer-beian {
  margin-top: 22px;
  font-size: 11px;
  letter-spacing: .04em;
  color: #b3aa9c;
}
.footer-beian a { color: inherit; }

/* ---------- 音乐按钮 ---------- */
.music-btn {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 40;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, .88);
  border: 1px solid rgba(194, 163, 107, .55);
  color: var(--red-deep);
  box-shadow: 0 4px 14px rgba(120, 90, 60, .14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.music-btn svg { width: 18px; height: 18px; }
.music-btn.is-playing svg { animation: spin 4.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-btn.is-hidden { display: none; }

.music-tip {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 40;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(166, 58, 47, .92);
  color: #fff;
  font-size: 11px;
  letter-spacing: .08em;
  animation: tip-in .5s ease;
}
@keyframes tip-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 微信分享引导 ---------- */
.share-hint {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 14px 18px;
  background: rgba(28, 22, 16, .58);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  animation: tip-in .3s ease;
}
.share-hint-box {
  margin-top: 74px;
  max-width: 300px;
  padding: 20px 20px 16px;
  border-radius: 14px;
  background: var(--card);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.share-hint-box p {
  font-size: 14px;
  line-height: 2;
  letter-spacing: .06em;
}
.share-hint-box button {
  margin-top: 14px;
  width: 100%;
  padding: 10px 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  letter-spacing: .1em;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 70;
  max-width: 76vw;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(35, 29, 23, .9);
  color: #fff;
  font-size: 13px;
  letter-spacing: .06em;
  text-align: center;
  animation: tip-in .25s ease;
}

/* ---------- 滚动淡入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 无障碍 / 省电模式 ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .petals, .music-tip { display: none !important; }
  .scroll-cue i, .music-btn.is-playing svg { animation: none; }
}

/* ---------- 深色模式（微信深色模式下不刺眼） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #1c1a17;
    --card:     #24211d;
    --ink:      #ebe4d8;
    --ink-soft: #a2988a;
    --line:     rgba(235, 228, 216, .14);
    --red:      #c25a4c;
    --red-deep: #d4786a;
    --shadow:   0 10px 30px rgba(0, 0, 0, .35);
  }
  .gallery .ph { background: linear-gradient(140deg, #2b2723, #221f1b); }
  .names .heart { color: var(--red); }
}
