:root {
  --primary: #c97b8e;
  --accent: #e9b8c4;
  --bg: #fdf4f1;
  --text: #5b4a47;
  --muted: #a78a87;
  --surface: #fff7f4;
  --card: #ffffff;
  --on-primary: #ffffff;
  --primary-soft: rgba(201,123,142,0.14);
  --maxw: 560px;

  /* 派生色：覆盖层/边框/浮层——默认按深色主题（由 JS 设置 data-dark 切换） */
  --panel: rgba(0,0,0,0.26);
  --line: var(--line);
  --float-bg: rgba(0,0,0,0.45);
  --float-line: rgba(255,255,255,0.25);
  --shadow: 0 18px 50px rgba(0,0,0,0.40);
}

/* 浅色主题：覆盖层改为浅色友好值，避免黑块/白边不可见 */
:root[data-dark="0"] {
  --panel: rgba(0,0,0,0.035);
  --line: rgba(0,0,0,0.10);
  --float-bg: rgba(255,255,255,0.82);
  --float-line: rgba(0,0,0,0.08);
  --shadow: 0 14px 38px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 强制 hidden 属性生效（避免被 .loading 等 display 规则覆盖，导致黑屏遮罩不消失） */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  z-index: 100;
  letter-spacing: 2px;
}

/* 固定按钮 */
#musicBtn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--float-line);
  background: var(--float-bg);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  transition: transform .2s;
}
#musicBtn.playing { animation: spin 4s linear infinite; }

/* 常驻顶栏：左上邀您标签 + 右上音乐按钮（每屏均展示） */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

/* 主题切换面板 */
.theme-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(28, 22, 18, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: navFade .2s ease;
}
.theme-panel {
  width: 100%; max-width: 420px; background: var(--card);
  border-radius: 16px; padding: 18px 16px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.theme-panel h3 { margin: 0 0 14px; text-align: center; font-size: 15px; color: var(--text); font-weight: 600; }
.theme-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px;
}
.theme-pick.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tp-swatch { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; display: flex; flex: 0 0 auto; }
.tp-swatch i { flex: 1; }
.tp-name { font-weight: 600; }
.theme-close {
  display: block; width: 100%; margin-top: 14px; padding: 12px 0;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--accent)); cursor: pointer;
}

/* 花瓣 */
#petals { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.petal {
  position: absolute;
  top: -8%;
  width: 10px; height: 10px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--primary));
  border-radius: 10px 1px 10px 1px;
  opacity: .7;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-10vh) rotate(0); opacity: 0; }
  10% { opacity: .8; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: .2; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero-section {
  text-align: center;
  padding: 14px 16px 16px;
  position: relative;
}
.hero-quote {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.hero-quote p { margin: 0; }

.hero-card {
  background: linear-gradient(145deg, var(--card), var(--surface));
  border-radius: 20px;
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--primary-soft);
}
.hero-photo-wrap {
  width: 100%;
  aspect-ratio: 3/2;
  max-height: 28vh;
  background: var(--surface);
  position: relative;
}
.hero-photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px; letter-spacing: 2px;
}

.hero-info { padding: 12px 20px 14px; text-align: left; }
.hero-eyebrow {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hero-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.hero-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: 2px;
}
.hero-year {
  font-size: 13px;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}
.hero-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.hero-bottom {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: stretch;
  padding: 6px 12px 10px;
}
.hero-bottom > .douban-card { flex: 1; min-width: 0; }
.hero-subphoto {
  flex: 0 0 45%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--primary-soft);
}
.hero-subphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-subphoto-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; letter-spacing: 1px;
}

.douban-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
}
.douban-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.douban-score-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.douban-score-num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  position: relative;
}
.douban-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  transition: transform .25s ease;
}
.douban-num.bump-up { animation: numBump .4s ease; }
@keyframes numBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); color: var(--primary); }
  100% { transform: scale(1); }
}
/* +0.1 浮动动效：位于评分右上角 */
.douban-bump {
  position: absolute;
  top: -6px;
  right: -2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0) scale(.8);
  white-space: nowrap;
}
.douban-bump.show { animation: bumpFloat 1s ease forwards; }
@keyframes bumpFloat {
  0% { opacity: 0; transform: translateY(4px) scale(.8); }
  25% { opacity: 1; transform: translateY(-2px) scale(1); }
  70% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(.95); }
}
.douban-star {
  color: var(--primary);
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.douban-btns {
  margin-bottom: 6px;
}
.douban-btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  width: calc(85% + 12px); /* 想看/看过按钮宽度各增加 6px */
}
.douban-count-row {
  display: flex;
  gap: 10px;
}
.douban-count {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.douban-btn {
  flex: 1;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--on-primary);
  padding: 8px 0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.douban-btn.seen { background: var(--primary-soft); border-color: var(--primary); color: var(--text); }
.douban-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
  margin-bottom: 6px;
}
.douban-tag {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
.douban-thumb {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.douban-thumb svg {
  width: 32px;
  height: 32px;
  fill: var(--primary);
  display: block;
}
.douban-review {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--line);
}
.douban-review-title {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 2px;
}
.douban-review-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
}

.ver-badge {
  position: fixed;
  left: 16px;
  top: 16px;
  background: var(--float-bg);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 70;
  border: 1px solid var(--float-line);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  backdrop-filter: blur(6px);
}
.ver-badge:active { transform: scale(.96); }

/* ---------- Music ---------- */
.music-section { padding: 8px 18px 30px; }
.music-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(90deg, var(--surface), var(--card));
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  max-width: 520px;
  margin: 0 auto;
}
.music-cover {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  font-size: 36px;
  color: var(--primary);
}
.music-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.music-cover.playing { animation: spin 4s linear infinite; }
.music-info { flex: 1; min-width: 0; }
.music-title { font-size: 16px; font-weight: 600; color: var(--text); }
.music-subtitle { font-size: 12px; color: var(--muted); margin-top: 3px; }
.music-play-deco {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: var(--on-primary);
  border: none;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  box-shadow: 0 4px 12px var(--primary-soft);
}

/* ---------- 音乐 + 头像（同一屏） ---------- */
.music-avatars-section { text-align: center; padding: 8px 18px 28px; }
.avatars-quote {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 420px;
  margin: 0 auto 20px;
  font-style: italic;
}
.avatars-quote p { margin: 0; }
/* 头像居中两行：第一行 新郎姓名(左) 头像(右)；第二行 头像(左) 新娘姓名(右)；中间 & */
.avatars-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.avatar-person {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  justify-content: space-around;
}
.avatar-person.groom { flex-direction: row; margin-left: 0; }
.avatar-person.bride { flex-direction: row; margin-right: 0; }
.avatar-person.groom .avatar-meta { margin-left: 50px; }
.avatar-person.bride .avatar-meta { margin-right: 50px; }
.avatar-meta { min-width: 0; text-align: left; }
/* 姓名：标签在上，姓名带主题色底色的圆角标签 */
.avatar-label { font-size: 13px; color: var(--muted); }
.avatar-name {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  word-break: break-word;
}
.avatar-img-wrap {
  width: 270px; height: 270px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
  background: var(--surface);
  flex: none;
}
.avatar-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; color: var(--primary);
}
.avatar-amp {
  font-size: 40px;
  color: var(--primary);
  font-family: serif;
  line-height: 1;
  margin: 2px 0;
}
.avatar-since { margin-top: 22px; font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* ---------- Galleries ---------- */
.gallery-section { padding: 38px 18px; }
.gallery-head { text-align: center; margin-bottom: 18px; }
.gallery-en {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.gallery-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: 2px;
}
.gallery-text {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 480px;
  margin: 0 auto 22px;
}
.gallery-text p { margin: 0 0 6px; }
/* 婚纱照与文字位置关系（左/右并排） */
.gallery-textpos-row { display: flex; align-items: center; gap: 16px; }
.gallery-textpos-row .gallery-text { flex: 0 0 34%; max-width: 34%; margin: 0; }
.gallery-textpos-row .gallery-single,
.gallery-textpos-row .gallery-collage,
.gallery-textpos-row .gallery-mosaic,
.gallery-textpos-row .film-strip,
.gallery-textpos-row .gallery-empty { flex: 1; min-width: 0; }
.gallery-textpos-row.text-right { flex-direction: row-reverse; }
.gallery-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.gallery-single {
  max-width: 520px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-single img { width: 100%; display: block; }

.gallery-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}
.collage-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.collage-item img { width: 100%; height: 100%; object-fit: cover; }

.film-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-snap-type: x mandatory;
}
.film-cell {
  flex: none;
  width: 78%;
  max-width: 320px;
  scroll-snap-align: center;
  position: relative;
  background: var(--surface);
}
.film-cell::before, .film-cell::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--bg) 0 6px, transparent 6px 12px);
  z-index: 2;
}
.film-cell::before { top: 0; }
.film-cell::after { bottom: 0; }
.film-cell img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  padding: 14px 0;
}

/* 不规则拼贴：3 列网格 + 错落跨度，形成不规则排布 */
.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 92px;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}
.gallery-mosaic .m-item {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.gallery-mosaic .m-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-mosaic .m-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-mosaic .m-item:nth-child(2) { grid-row: span 2; }
.gallery-mosaic .m-item:nth-child(4) { grid-column: span 2; }
.gallery-mosaic .m-item:nth-child(6) { grid-row: span 2; }
.gallery-mosaic .m-item:nth-child(7) { grid-column: span 2; }

/* ---------- Common section title ---------- */
.section-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: 2px;
}

/* ---------- Invitation ---------- */
.invite-section { padding: 38px 18px; }
.invite-text {
  text-align: center;
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}
.invite-photo {
  max-width: 520px;
  margin: 0 auto 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.invite-photo img { width: 100%; display: block; }
.invite-text p { margin: 0 0 8px; }
/* 邀请语：婚纱照与文字位置关系（左/右并排） */
.invite-pos-row { display: flex; align-items: center; gap: 16px; }
.invite-pos-row .invite-photo { flex: 0 0 42%; max-width: 42%; margin: 0; }
.invite-pos-row .invite-text-wrap { flex: 1; min-width: 0; }
.invite-pos-row.text-right { flex-direction: row-reverse; }

/* ---------- Time ---------- */
.time-section { padding: 38px 18px; }
.time-card {
  background: linear-gradient(145deg, var(--card), var(--surface));
  border-radius: 16px;
  padding: 12px 22px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid var(--line);
}
.time-date { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.time-lunar { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.time-week { font-size: 13px; color: var(--muted); }
.time-clock { font-size: 16px; color: var(--primary); }
.time-sub {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* 顶部倒计时 */
.countdown { text-align: center; max-width: 420px; margin: 0 auto 18px; }
.countdown-label { font-size: 13px; color: var(--muted); letter-spacing: 2px; margin-bottom: 10px; }
.countdown-nums { display: flex; justify-content: center; gap: 10px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; }
.cd-num {
  display: flex; align-items: center; justify-content: center;
  min-width: 52px; height: 56px;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: var(--on-primary);
  border-radius: 12px;
  font-size: 26px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.cd-lab { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 当月日历 */
.calendar {
  max-width: 360px;
  margin: 18px auto 0;
  background: linear-gradient(145deg, var(--card), var(--surface));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.calendar-title { text-align: center; font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.calendar-week span { text-align: center; font-size: 12px; color: var(--muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text);
  border-radius: 8px;
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.wedding-day {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  box-shadow: 0 4px 12px var(--primary-soft);
}

/* ---------- Address ---------- */
.address-section { padding: 38px 18px; }
.address-card {
  background: linear-gradient(145deg, var(--card), var(--surface));
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--line);
}
.address-venue-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.address-venue { flex: 1; font-size: 18px; font-weight: 600; color: var(--text); }
.address-addr { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.address-copy {
  flex: none;
  margin-top: 12px;
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 20px;
  cursor: pointer;
}
.address-copy:active { opacity: .6; }
.map-wrap {
  position: relative;
  height: clamp(260px, 75vw, 360px);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.map-wrap iframe, .map-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.address-link {
  display: block;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 0;
  border-radius: 24px;
  margin-top: 4px;
  border: none;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(91,74,63,.18);
}

/* 导航 App 选择框 */
.nav-chooser-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(28, 22, 18, .5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: navFade .2s ease;
}
.nav-chooser {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: navSlide .26s cubic-bezier(.2, .8, .2, 1);
}
.nav-chooser h3 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.nav-app {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  box-shadow: 0 3px 12px rgba(91, 74, 63, .18);
  cursor: pointer;
}
.nav-app.cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
}
@keyframes navFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes navSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------- RSVP ---------- */
.rsvp-section { padding: 38px 18px; }
.rsvp-card {
  background: linear-gradient(145deg, var(--card), var(--surface));
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--primary-soft);
}
.rsvp-note { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 11px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.rsvp-form textarea { min-height: 70px; resize: vertical; }
.rsvp-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.rsvp-msg { text-align: center; margin-top: 10px; font-size: 14px; }
.rsvp-msg.ok { color: var(--primary); }
.rsvp-msg.err { color: var(--text); }

/* ---------- Contact ---------- */
.contact-section { padding: 38px 18px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 33px;
  max-width: 480px;
  margin: 0 auto;
}
.contact-card {
  text-align: center;
}
.contact-line { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; text-decoration: none; }
.contact-line[href] { color: var(--primary); }
.contact-call-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 22px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.contact-call-btn:active { transform: scale(.97); }

/* 宾客回执 + 联系我们 合并屏 */
.rsvp-contact-section { padding: 38px 18px; }
.rsvp-contact-wrap { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Tips ---------- */
.tips-section { padding: 38px 18px 30px; }
.tip-item {
  background: linear-gradient(145deg, var(--card), var(--surface));
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--line);
}
.tip-label { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.tip-text { font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 44px 18px 70px;
  color: var(--muted);
}
.footer-heart { font-size: 22px; margin-top: 30px; margin-bottom: 8px; color: var(--primary); text-align: center; }
.footer-sign { font-size: 13px; color: var(--primary); letter-spacing: 1px; text-align: center; }
.tips-thanks {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text);
}

/* ---------- Fade in ---------- */
.fade-block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-block.show { opacity: 1; transform: translateY(0); }

/* ---------- PC 适配 ---------- */
@media (min-width: 640px) {
  .hero-bottom { gap: 3px; }
  .hero-subphoto { flex: 0 0 45%; }
  .app { margin-top: 20px; margin-bottom: 20px; border-radius: 16px; }
}

@media (max-width: 639px) {
  .avatar-img-wrap { width: 150px; height: 150px; }
  .avatar-person { gap: 12px; }
  .avatars-rows { gap: 8px; }
  .music-cover { width: 72px; height: 72px; font-size: 28px; }
  .douban-num { font-size: 34px; }
  /* 手机端：副照片保持页面宽度 45% */
  .hero-subphoto { flex: 0 0 45%; }
  .douban-tags { flex-direction: row; flex-wrap: wrap; }
  .douban-tag { font-size: 11px; padding: 3px 9px; }
  .gallery-textpos-row, .invite-pos-row { flex-direction: column !important; gap: 14px; }
  .gallery-textpos-row .gallery-text { flex: none; max-width: 100%; width: 100%; }
  .invite-pos-row .invite-photo { flex: none; max-width: 100%; width: 100%; }
}

/* ---------- 整屏滑动 ---------- */
.screens {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.screens-track {
  height: 100%;
  transition: transform .72s cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}
.screen {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
}
.screen > section { width: 100%; flex: 0 0 auto; margin: auto 0; }
/* 整屏模式下板块直接可见（由整屏切换动画承担动效，避免切过去是空白） */
.screens .fade-block { opacity: 1 !important; transform: none !important; }
.screen-dots {
  position: fixed;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 45;
}
.screen-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: transform .25s, background .25s;
  opacity: .7;
}
.screen-dot.active {
  background: var(--primary);
  transform: scale(1.35);
  opacity: 1;
}

/* ---------- 上下滑动提示箭头（若隐若现的闪动） ---------- */
.scroll-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--float-bg);
  border: 1px solid var(--float-line);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.scroll-hint.up { top: 12px; animation: hintBlinkUp 1.8s ease-in-out infinite; }
.scroll-hint.down { bottom: 12px; animation: hintBlinkDown 1.8s ease-in-out infinite; }
.scroll-hint-arrow { font-size: 22px; line-height: 1; font-weight: 700; }
.scroll-hint.hidden { display: none; }
@keyframes hintBlinkUp {
  0%, 100% { opacity: 0.32; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-4px); }
}
@keyframes hintBlinkDown {
  0%, 100% { opacity: 0.32; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(4px); }
}
