/* ==========================================================================
   aixuxi.cn · 卜庆龙 & 徐茜
   基调：棚拍幕布的冷白 + 囍字红。标题用思源宋体（按页面用字精简过），
   正文用系统黑体，数字和英文用 Lora。
   ========================================================================== */

@font-face {
  font-family: "QX Serif";
  src: url("../fonts/qx-serif-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "QX Serif";
  src: url("../fonts/qx-serif-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "QX Lora";
  src: url("../fonts/qx-lora.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "QX Lora";
  src: url("../fonts/qx-lora-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #f2f3f1;
  --paper-2: #e6e9e8;
  --card: #fafaf8;
  --ink: #1b2129;
  --ink-2: #4b5560;
  --ink-3: #7b858e;
  --line: #cfd5d7;
  --red: #a5232b;
  --red-2: #861a21;
  --red-ink: #f6ede3;
  --red-line: rgba(246, 237, 227, 0.28);
  --night: #0f1316;

  --serif: "QX Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --guest: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "QX Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --latin: "QX Lora", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1240px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 56px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.latin {
  font-family: var(--latin);
  font-variant-numeric: lining-nums;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 印章 ---------- */
.seal {
  display: inline-grid;
  place-content: center;
  flex: none;
  width: calc(2em + 12px);
  height: calc(2em + 12px);
  padding: 6px;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: rgba(242, 243, 241, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.08em;
}
.brand-text i {
  font-style: normal;
  color: var(--red);
  margin-inline: 0.2em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
}
.site-nav a {
  position: relative;
  white-space: nowrap;
  padding-block: 6px;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--red);
}
.site-nav .nav-invite {
  color: var(--red);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-red:hover {
  background: var(--red-2);
  border-color: var(--red-2);
  color: #fff;
}
.btn-paper {
  border-color: var(--red-ink);
  color: var(--red-ink);
}
.btn-paper:hover {
  background: var(--red-ink);
  color: var(--red);
}
.btn-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.btn .arrow {
  font-family: var(--latin);
}

/* 可点开大图的照片 */
.shot-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
}
.shot-link img {
  width: 100%;
  transition: transform 0.8s var(--ease);
}
.shot-link:hover img {
  transform: scale(1.03);
}
.letter-photo .shot-link {
  height: 100%;
}
.page-invite .shot-link {
  background: var(--red-2);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

/* ==========================================================================
   首页
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr);
  min-height: min(calc(100svh - var(--header-h)), 860px);
}
.hero-photo {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 36% 50%;
  animation: hero-in 1.6s var(--ease) both;
}
.hero-side {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 40px;
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(28px, 4vw, 48px);
}
.hero-names {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 24px);
}
.hero-names .name {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(48px, 5.4vw, 84px);
  line-height: 1;
  letter-spacing: 0.18em;
  animation: ink-down 1.2s var(--ease) both;
}
.hero-names .name + .name {
  margin-top: 1.2em;
  animation-delay: 0.35s;
}
.hero-names .seal {
  align-self: flex-end;
  font-size: 15px;
  animation: seal-in 0.5s 1.1s var(--ease) both;
}
.hero-meta {
  display: grid;
  gap: 18px;
}
.hero-date {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.hero-date .latin {
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hero-date span:last-child {
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}
.countdown {
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.countdown b {
  font-family: var(--latin);
  font-weight: 500;
  font-size: 1.5em;
  color: var(--red);
  margin-inline: 0.2em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes hero-in {
  from {
    transform: scale(1.05);
    filter: saturate(0.6) brightness(1.08);
  }
}
@keyframes ink-down {
  from {
    clip-path: inset(0 0 100% 0);
  }
}
@keyframes seal-in {
  from {
    transform: scale(1.6) rotate(-8deg);
    opacity: 0;
  }
}

/* 序 */
.prelude {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(64px, 10vw, 128px);
}
.prelude-text {
  display: grid;
  gap: 22px;
  max-width: 30em;
}
.prelude-text h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}
.prelude-text p {
  color: var(--ink-2);
}
.prelude-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.6vw, 20px);
  align-items: end;
}
.prelude-photos figure {
  margin: 0;
}
.prelude-photos figure:first-child {
  margin-bottom: clamp(32px, 6vw, 72px);
}
.prelude-photos img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.prelude-photos figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* 目录 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 4vw, 44px);
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  margin-top: 10px;
}
.section-head p {
  max-width: 28em;
  color: var(--ink-2);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.text-link:hover {
  border-color: var(--ink);
}

.chapters {
  padding-bottom: clamp(64px, 10vw, 128px);
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px) clamp(12px, 2vw, 28px);
}
.chapter-card {
  display: grid;
  gap: 14px;
  text-decoration: none;
}
.chapter-card .cover {
  overflow: hidden;
  background: var(--paper-2);
}
.chapter-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.chapter-card:hover img {
  transform: scale(1.04);
}
.chapter-card .caption {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 12px;
}
.chapter-card .no {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--red);
}
.chapter-card .title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.1em;
}
.chapter-card .count {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* 请柬条 */
.invite-band {
  background: var(--red);
  color: var(--red-ink);
}
.invite-band .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(48px, 7vw, 88px);
}
.band-xi {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(72px, 9vw, 120px);
  line-height: 1;
  color: rgba(246, 237, 227, 0.9);
}
.band-info {
  display: grid;
  gap: 10px;
}
.band-info .latin {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.05;
}
.band-info p {
  letter-spacing: 0.08em;
  opacity: 0.86;
}
.band-info .venue {
  font-family: var(--serif);
  font-size: 18px;
  opacity: 1;
}

/* 关于预告 */
.us-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(64px, 10vw, 128px);
}
.us-teaser img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.us-teaser .text {
  display: grid;
  gap: 20px;
  justify-items: start;
  max-width: 28em;
}
.us-teaser h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}
.us-teaser p {
  color: var(--ink-2);
}

/* ==========================================================================
   页头（相册 / 关于）
   ========================================================================== */
.page-head {
  display: grid;
  gap: 16px;
  padding-block: clamp(40px, 7vw, 88px) clamp(24px, 4vw, 40px);
}
.page-head h1 {
  font-size: clamp(34px, 5vw, 60px);
}
.page-head p {
  max-width: 34em;
  color: var(--ink-2);
}

/* ==========================================================================
   相册
   ========================================================================== */
.chapter-nav {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
  z-index: 30;
  background: rgba(242, 243, 241, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
.chapter-nav .wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 10px;
}
.chapter-nav .wrap::-webkit-scrollbar {
  display: none;
}
.chapter-nav a {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.chapter-nav a .no {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--red);
}
.chapter-nav a.is-active {
  background: var(--ink);
  color: var(--paper);
}
.chapter-nav a.is-active .no {
  color: #f0a7a2;
}

.gallery-chapter {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.gallery-chapter:last-of-type {
  border-bottom: 0;
}
.chapter-label {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 88px);
  display: grid;
  gap: 12px;
}
.chapter-label .no {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--red);
  letter-spacing: 0.2em;
}
.chapter-label h2 {
  font-size: clamp(36px, 4vw, 52px);
  letter-spacing: 0.12em;
}
.chapter-label p {
  font-size: 15px;
  color: var(--ink-2);
}
.chapter-label .count {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* 等高行排列：每张按原始比例伸缩，从左到右保持拍摄顺序 */
.masonry {
  --row: 300px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 1vw, 12px);
}
.masonry::after {
  content: "";
  flex: 999 1 0;
}
.masonry .shot {
  flex: var(--r) 1 calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
}
.masonry .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s;
}
.masonry .shot:hover img {
  transform: scale(1.03);
}

/* ---------- 大图 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--night);
  color: #e9ecee;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.lightbox[hidden] {
  display: none;
}
.lb-top,
.lb-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.lb-top .where {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.lb-top .where .no {
  font-family: var(--serif);
  color: #f0a7a2;
}
.lb-top .where b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
}
.lb-count {
  font-family: var(--latin);
  color: #aab3ba;
}
.lb-stage {
  --lb-pad: clamp(8px, 6vw, 88px);
  position: relative;
  min-height: 0;
  touch-action: pan-y;
}
.lb-stage img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lb-pad);
  right: var(--lb-pad);
  margin: auto;
  max-width: calc(100% - var(--lb-pad) * 2);
  max-height: 100%;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.25s;
}
.lb-stage img.is-loading {
  opacity: 0.35;
}
.lb-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(233, 236, 238, 0.25);
  border-radius: 50%;
  background: rgba(15, 19, 22, 0.4);
  color: #e9ecee;
  font-family: var(--latin);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.lb-btn:hover {
  background: rgba(233, 236, 238, 0.12);
  border-color: rgba(233, 236, 238, 0.6);
}
.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  margin-top: -22px;
}
.lb-prev {
  left: clamp(8px, 2vw, 24px);
}
.lb-next {
  right: clamp(8px, 2vw, 24px);
}
.lb-bottom {
  justify-content: center;
  color: #8f99a1;
  font-size: 13px;
}

/* ==========================================================================
   关于我们
   ========================================================================== */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 96px);
}
.about-hero .text {
  display: grid;
  gap: 22px;
}
.about-hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  letter-spacing: 0.08em;
}
.about-hero h1 i {
  font-style: normal;
  color: var(--red);
  font-weight: 400;
  margin-inline: 0.12em;
}
.about-hero .lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 26em;
}
.about-hero figure {
  margin: 0;
}
.about-hero figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.about-hero figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 56px);
  padding-block: clamp(32px, 6vw, 72px);
}
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 24px);
  align-items: end;
}
.person img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.person .tag {
  writing-mode: vertical-rl;
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--serif);
}
.person .tag small {
  font-size: 13px;
  color: var(--red);
  letter-spacing: 0.3em;
}
.person .tag b {
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 0.24em;
}
.person .bio {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 15px;
}

.timeline-section {
  padding-block: clamp(48px, 8vw, 112px);
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  max-width: 820px;
}
.timeline li {
  display: grid;
  grid-template-columns: 120px 28px minmax(0, 1fr);
  column-gap: 16px;
}
.timeline .when {
  padding-top: 4px;
  text-align: right;
  font-family: var(--latin);
  font-size: 15px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.timeline .rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline .rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline li:first-child .rail::before {
  top: 14px;
}
.timeline li:last-child .rail::before {
  bottom: auto;
  height: 14px;
}
.timeline .rail i {
  position: relative;
  margin-top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-3);
}
.timeline li:last-child .rail i {
  background: var(--red);
  border-color: var(--red);
}
.timeline .what {
  display: grid;
  gap: 6px;
  padding-bottom: 36px;
}
.timeline .what h3 {
  font-size: 22px;
  letter-spacing: 0.1em;
}
.timeline .what p {
  color: var(--ink-2);
  font-size: 15px;
}

.site-note {
  padding-block: 0 clamp(48px, 8vw, 96px);
}
.site-note p {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.site-note p .latin {
  font-style: italic;
  color: var(--red);
}

/* ==========================================================================
   邀请函（整页用红纸）
   ========================================================================== */
.page-invite {
  background: var(--red);
  color: var(--red-ink);
}
.page-invite .site-header {
  background: rgba(165, 35, 43, 0.92);
}
.page-invite .site-header.is-scrolled {
  border-bottom-color: var(--red-line);
}
.page-invite .site-nav a {
  color: rgba(246, 237, 227, 0.72);
}
.page-invite .site-nav a:hover,
.page-invite .site-nav a[aria-current="page"] {
  color: var(--red-ink);
}
.page-invite .site-nav a[aria-current="page"]::after {
  background: var(--red-ink);
}
.page-invite .brand-text i {
  color: var(--red-ink);
  opacity: 0.7;
}
.page-invite .seal {
  background: var(--red-ink);
  color: var(--red);
  box-shadow: inset 0 0 0 2px var(--red-ink), inset 0 0 0 3px rgba(165, 35, 43, 0.45);
}
.page-invite :focus-visible {
  outline-color: var(--red-ink);
}

.envelope {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding-block: clamp(48px, 9vw, 120px) clamp(40px, 7vw, 96px);
  text-align: center;
}
.envelope .xi {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(120px, 22vw, 220px);
  line-height: 1;
  color: var(--red-ink);
  animation: seal-in 0.9s var(--ease) both;
}
.envelope .to {
  display: grid;
  gap: 8px;
  font-size: 15px;
  letter-spacing: 0.3em;
  opacity: 0.85;
}
.envelope .guest {
  font-family: var(--guest);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: 0.16em;
  opacity: 1;
}
.envelope .couple {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.24em;
}
.envelope .couple i {
  font-style: normal;
  margin-inline: 0.4em;
  opacity: 0.7;
}
.scroll-cue {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-decoration: none;
  opacity: 0.8;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 36px;
  background: currentColor;
  animation: cue 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

/* 请柬信纸 */
.letter {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
  background: var(--red-ink);
  color: var(--ink);
  padding: clamp(28px, 5vw, 64px);
  box-shadow: 0 30px 60px -30px rgba(40, 6, 9, 0.6);
}
.letter::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(165, 35, 43, 0.35);
  pointer-events: none;
}
.letter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
}
.letter-photo {
  margin: 0;
}
.letter-photo img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}
.vertical-letter {
  writing-mode: vertical-rl;
  justify-self: center;
  align-self: center;
  height: 19em;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 2.1;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.vertical-letter p {
  margin: 0;
}
.vertical-letter .gap {
  margin-inline-start: 1.2em;
}
.vertical-letter .names {
  font-weight: 600;
  font-size: 1.15em;
}
.vertical-letter .red {
  color: var(--red);
}
.vertical-letter .guest-line .guest {
  font-family: var(--guest);
  font-weight: 600;
  font-size: 1.1em;
  border-left: 1px solid var(--red);
  padding-block: 0.3em;
}
.vertical-letter .sign {
  text-align: end;
  margin-inline-start: 0.8em;
}
.vertical-letter .latin {
  text-combine-upright: all;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  margin: clamp(32px, 6vw, 72px) auto 0;
  background: var(--red-line);
  border: 1px solid var(--red-line);
}
.detail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(22px, 3.5vw, 40px);
  background: var(--red);
}
.detail h2 {
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.3em;
  opacity: 0.75;
}
.detail .big {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.detail .big.latin {
  font-family: var(--latin);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.detail .muted {
  font-size: 15px;
  opacity: 0.8;
  letter-spacing: 0.04em;
}
.detail .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.detail .countdown {
  color: var(--red-ink);
}
.detail .countdown b {
  color: var(--red-ink);
}
.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.schedule li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}
.schedule time {
  font-family: var(--latin);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.schedule b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1em;
}
.schedule span {
  display: block;
  font-size: 14px;
  opacity: 0.72;
}
.contacts {
  display: grid;
  gap: 12px;
}
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--red-line);
}
.contact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.contact small {
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.72;
  margin-right: 10px;
}
.contact b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1em;
}
.contact a {
  font-family: var(--latin);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--red-line);
}
.rsvp {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(20px, 4vw, 48px);
}
.rsvp .code {
  width: clamp(120px, 16vw, 160px);
  aspect-ratio: 1;
  padding: 10px;
  background: var(--red-ink);
  border-radius: 50%;
}
.rsvp .code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.rsvp .text {
  display: grid;
  gap: 10px;
}

.invite-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 980px;
  margin: clamp(32px, 6vw, 72px) auto 0;
}
.invite-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.music-btn {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--red-line);
  background: var(--red-2);
  color: var(--red-ink);
  cursor: pointer;
  font-size: 18px;
}
.music-btn.is-playing {
  animation: spin 6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer .left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-footer .seal {
  font-size: 11px;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--ink);
}
.page-invite .site-footer {
  border-top-color: var(--red-line);
  color: rgba(246, 237, 227, 0.7);
  margin-top: clamp(48px, 8vw, 96px);
}
.page-invite .site-footer a:hover {
  color: var(--red-ink);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1020px) {
  .chapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-chapter {
    grid-template-columns: minmax(0, 1fr);
  }
  .chapter-label {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 16px;
  }
  .chapter-label .no {
    grid-row: span 2;
  }
  .chapter-label p,
  .chapter-label .count {
    grid-column: 2;
  }
  .invite-band .wrap {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .invite-band .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 56px;
  }
  .brand-text {
    display: none;
  }
  .site-nav a {
    font-size: 14px;
    letter-spacing: 0.04em;
  }
  .hero {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .hero-photo {
    aspect-ratio: 3 / 4;
  }
  .hero-photo img {
    object-position: 50% 40%;
  }
  .hero-side {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 0;
    padding-block: 26px 8px;
  }
  .hero-names {
    position: absolute;
    top: 18px;
    right: var(--gutter);
    gap: 8px;
  }
  .hero-names .name {
    font-size: 40px;
    text-shadow: 0 0 22px rgba(255, 255, 255, 0.75);
  }
  .hero-names .seal {
    font-size: 11px;
  }
  .hero-meta {
    gap: 14px;
  }
  .hero-date {
    flex-direction: column;
    gap: 6px;
  }
  .hero-date .latin {
    font-size: 30px;
  }
  .hero-actions .btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .prelude,
  .us-teaser,
  .about-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .us-teaser .text {
    order: -1;
  }
  .chapter-card .title {
    font-size: 19px;
  }
  .chapter-card .caption {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
  }
  .chapter-card .count {
    grid-column: 2;
  }
  .invite-band .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .band-xi {
    font-size: 64px;
  }
  .masonry {
    --row: 210px;
  }
  .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .timeline li {
    grid-template-columns: 72px 22px minmax(0, 1fr);
    column-gap: 10px;
  }
  .timeline .when {
    font-size: 13px;
  }
  .timeline .what h3 {
    font-size: 19px;
  }

  .letter {
    padding: 24px 20px;
  }
  .letter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .letter-photo img {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
  .vertical-letter {
    font-size: 16px;
    height: 19em;
    letter-spacing: 0.12em;
    line-height: 2;
  }
  .details {
    grid-template-columns: minmax(0, 1fr);
  }
  .rsvp {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    row-gap: 18px;
  }
  .invite-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lb-prev,
  .lb-next {
    display: none;
  }
}

@media (max-width: 380px) {
  .site-nav {
    gap: 8px;
  }
  .site-nav a {
    font-size: 13px;
  }
  .hero-names .name {
    font-size: 34px;
  }
  .vertical-letter {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
