/* ==========================================================================
   invite.css — 符長城 & 付渝 · 紅色婚禮長頁
   零外部依賴：系統字體、CSS 漸變紋理、內嵌 SVG。
   ========================================================================== */

:root {
  --red-950: #160303;
  --red-900: #1f0404;
  --red-850: #250505;
  --red-800: #2a0606;
  --red-700: #3d0a0a;
  --red-600: #4f0d0d;
  --red-500: #6d1512;
  --cinnabar: #b52a22;
  --cinnabar-deep: #8f1d18;
  --gold: #d9b97c;
  --gold-light: #f0d7a4;
  --gold-dim: rgba(217, 185, 124, 0.28);
  --paper: #f3e7d3;
  --paper-2: #fbf4e6;
  --paper-3: #ead9bd;
  --ink: #2a1510;
  --ink-soft: #5a4137;

  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif CJK SC", serif;
  --latin: "Times New Roman", "Georgia", "Songti SC", serif;

  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 44px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--red-950);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
  height: 100svh;
}

body.modal-open { overflow: hidden; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

h1, h2, h3, p, figure, figcaption { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

[hidden] { display: none !important; }

::selection {
  background: var(--cinnabar);
  color: var(--gold-light);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform 0.25s;
}
.skip-link:focus { transform: translateY(0); }

.dot { margin: 0 0.55em; opacity: 0.5; }

/* 底紋：極細噪點，讓大面積紅與紙不至於死板 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ── 共用 ─────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.seal {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: linear-gradient(145deg, #a3251d, #7c1c16 62%, #671511);
  color: var(--gold-light);
  border: 1px solid rgba(240, 215, 164, 0.5);
  box-shadow: inset 0 0 0 3px rgba(22, 3, 3, 0.22), 0 10px 24px rgba(0, 0, 0, 0.22);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(-4deg);
}
.seal--sm { width: 38px; height: 38px; font-size: 19px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.24em;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--red-800); color: var(--gold-light); border-color: var(--red-800); }
.btn--solid:hover { background: var(--cinnabar); border-color: var(--cinnabar); }
.btn--ghost { border-color: var(--gold-dim); color: var(--gold-light); }
.btn--ghost:hover { background: var(--gold); color: var(--red-900); border-color: var(--gold); }
.btn--ghost-ink { border-color: rgba(42, 21, 16, 0.28); color: var(--ink); }
.btn--ghost-ink:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--wide { width: 100%; }

.section-head { max-width: 720px; margin-bottom: clamp(30px, 5vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--light { color: var(--paper); }
.section-head--ink { color: var(--ink); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--latin);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--cinnabar);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  flex: none;
  background: currentColor;
  opacity: 0.65;
}
.section-head--center .eyebrow { justify-content: center; }
.section-head--light .eyebrow { color: var(--gold); }

.section-title {
  margin-top: 10px;
  font-size: clamp(30px, 7.2vw, 46px);
  line-height: 1.25;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.section-lead {
  margin-top: 8px;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.section-head--light .section-lead { color: rgba(243, 231, 211, 0.58); }

.chapter,
#couple,
#gallery,
#banquet,
#ending { scroll-margin-top: 72px; }

/* ── 開卷 ─────────────────────────────────────────────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--red-950);
  cursor: pointer;
  transition: visibility 0s 1.45s;
}
.gate.is-open { visibility: hidden; }

.gate__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.25%;
  z-index: 1;
  overflow: hidden;
  background: #3d0a0a;
  transition: transform 1.45s var(--ease);
  will-change: transform;
}
/* 兩片共用同一張 100vw 簾布，只靠 panel 裁切，避免中縫 */
.gate__panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100vw;
  background:
    radial-gradient(120% 70% at 50% 12%, rgba(240, 215, 164, 0.1), transparent 58%),
    repeating-linear-gradient(
      90deg,
      #3d0a0a 0,
      #5f110f 16px,
      #6d1512 28px,
      #4a0c0b 52px,
      #5a100e 76px,
      #3d0a0a 96px
    ),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 9px);
}
.gate__panel--left::before { left: 0; }
.gate__panel--right::before { right: 0; }
.gate__panel--left { left: 0; }
.gate__panel--right { right: 0; }

.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 82% at 50% 48%, transparent 42%, rgba(10, 1, 1, 0.42) 100%);
}

.gate.is-open .gate__panel--left { transform: translate3d(-102%, 0, 0); }
.gate.is-open .gate__panel--right { transform: translate3d(102%, 0, 0); }

.gate__inner {
  position: relative;
  z-index: 3;
  max-width: 420px;
  padding: 24px;
  text-align: center;
  color: var(--gold-light);
  transition: opacity 0.5s ease, transform 0.8s var(--ease);
}
.gate__inner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 150%;
  height: 70%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 50% 50%, rgba(22, 3, 3, 0.62), rgba(22, 3, 3, 0.28) 52%, transparent 74%);
  pointer-events: none;
}
.gate.is-open .gate__inner {
  opacity: 0;
  transform: scale(0.96);
}

.gate__house {
  font-size: 11px;
  letter-spacing: 0.46em;
  color: rgba(240, 215, 164, 0.78);
}

.gate__seal {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 26px auto 22px;
  background: radial-gradient(circle at 34% 28%, #a82a20, #671511 78%);
  border: 1px solid rgba(240, 215, 164, 0.55);
  box-shadow: 0 0 0 6px rgba(240, 215, 164, 0.06), inset 0 0 26px rgba(0, 0, 0, 0.38);
  font-size: 44px;
  line-height: 1;
  color: var(--gold-light);
  transform: rotate(-4deg);
}

.gate__names {
  font-size: clamp(20px, 4vw, 24px);
  letter-spacing: 0.18em;
}
.gate__names i {
  font-style: normal;
  margin: 0 0.4em;
  color: var(--gold);
  opacity: 0.7;
}

.gate__title {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: rgba(240, 215, 164, 0.72);
}

.gate__date {
  margin-top: 22px;
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(243, 231, 211, 0.58);
}

.gate__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(240, 215, 164, 0.3);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  background: rgba(22, 3, 3, 0.18);
  animation: gatePulse 2.8s ease-in-out infinite;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.gate__hint:hover { background: var(--gold); color: var(--red-900); border-color: var(--gold); }
.gate__hint-line { width: 24px; height: 1px; background: currentColor; opacity: 0.6; }

.gate__sub {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(243, 231, 211, 0.42);
}

@keyframes gatePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 185, 124, 0); }
  50% { box-shadow: 0 0 0 8px rgba(217, 185, 124, 0.06); }
}

/* ── 頂欄 / 音樂 / 章節 ───────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 64px 14px var(--pad);
  color: var(--gold);
  background: linear-gradient(to bottom, rgba(22, 3, 3, 0.96), rgba(22, 3, 3, 0.88));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.45s, transform 0.45s;
}
body.is-open.is-scrolled .topbar {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.2em;
}
.topbar__seal {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(240, 215, 164, 0.35);
  font-size: 13px;
  line-height: 1;
  color: var(--gold-light);
}

.topbar__date {
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(240, 215, 164, 0.62);
}

.topbar__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.65;
}

.sound {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(22, 3, 3, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.45s, transform 0.45s, background 0.3s, color 0.3s;
}
body.is-open .sound {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sound:hover { background: rgba(181, 42, 34, 0.28); }
.sound svg { width: 18px; height: 18px; }
.sound__wave { opacity: 0.22; transition: opacity 0.3s; }
.sound__slash { opacity: 1; transition: opacity 0.3s; }
.sound.is-on .sound__wave { opacity: 1; }
.sound.is-on .sound__slash { opacity: 0; }

.rail {
  position: fixed;
  right: 11px;
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
body.is-open.is-scrolled .rail {
  opacity: 1;
  pointer-events: auto;
}
.rail__dot {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.rail__dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 185, 124, 0.12);
}
.rail__dot::after {
  content: attr(data-label);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 7px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold);
  white-space: nowrap;
  background: rgba(22, 3, 3, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.rail__dot:hover::after,
.rail__dot:focus-visible::after { opacity: 1; }

/* ── 封面 ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--red-950);
}

.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: saturate(0.94) contrast(1.03) brightness(0.9);
  transform: scale(1.02);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(22, 3, 3, 0.64) 0%, rgba(22, 3, 3, 0.12) 28%, rgba(22, 3, 3, 0.10) 46%, rgba(22, 3, 3, 0.56) 62%, rgba(22, 3, 3, 0.88) 84%, var(--red-950) 100%),
    radial-gradient(80% 50% at 50% 100%, rgba(181, 42, 34, 0.22), transparent 70%);
}

.hero__frame {
  position: absolute;
  inset: 16px;
  z-index: 2;
  border: 1px solid rgba(217, 185, 124, 0.2);
  pointer-events: none;
}

.hero__side {
  position: absolute;
  left: clamp(18px, 3vw, 30px);
  top: clamp(84px, 12vh, 118px);
  z-index: 2;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: rgba(240, 215, 164, 0.74);
  text-shadow: 0 1px 10px rgba(22, 3, 3, 0.75);
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 110px var(--pad) clamp(52px, 9vh, 88px);
  text-align: center;
}
.hero__content::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6%;
  z-index: -1;
  width: 150%;
  height: 72%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 72%, rgba(22, 3, 3, 0.48), rgba(22, 3, 3, 0.16) 56%, transparent 76%);
  pointer-events: none;
}

.hero__kicker {
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.46em;
  color: rgba(240, 215, 164, 0.86);
  text-indent: 0.46em;
  text-shadow: 0 1px 10px rgba(22, 3, 3, 0.9), 0 0 2px rgba(22, 3, 3, 0.8);
}

.hero__label {
  font-size: 12px;
  color: rgba(240, 215, 164, 0.86);
}

.hero__names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 24px);
  margin-top: 22px;
  font-size: clamp(30px, 8.4vw, 54px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 3px 34px rgba(0, 0, 0, 0.45);
}
.hero__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.hero__name small {
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-indent: 0.4em;
  text-shadow: none;
}
.hero__amp {
  display: grid;
  place-items: center;
  width: clamp(36px, 7vw, 46px);
  height: clamp(36px, 7vw, 46px);
  flex: none;
  border: 1px solid rgba(240, 215, 164, 0.42);
  background: rgba(124, 28, 22, 0.28);
  font-size: clamp(18px, 3.6vw, 22px);
  color: var(--gold-light);
  transform: rotate(-6deg);
  text-shadow: none;
}

.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 12px;
}
.hero__rule i {
  width: clamp(30px, 8vw, 52px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 215, 164, 0.55));
}
.hero__rule i:last-child { transform: rotate(180deg); }
.hero__rule b {
  font-family: var(--latin);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--gold);
}

.hero__date {
  font-family: var(--latin);
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1;
  letter-spacing: 0.14em;
  color: #fff;
  text-indent: 0.14em;
}

.hero__meta {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(243, 231, 211, 0.78);
}

.hero__lunar {
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(240, 215, 164, 0.7);
  text-indent: 0.3em;
}

.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 9px;
  letter-spacing: 0.35em;
  color: rgba(243, 231, 211, 0.55);
  transition: color 0.3s;
}
.hero__scroll:hover { color: var(--gold); }
.hero__scroll i {
  position: relative;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: linear-gradient(rgba(217, 185, 124, 0.55), transparent);
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--gold-light);
  animation: scrollLine 2.4s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-16px); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}

/* ── 邀請信 ───────────────────────────────────────────────────── */

.letter {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 10vw, 120px) 0;
  background: var(--paper);
  color: var(--ink);
}
.letter::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 50% at 15% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(60% 50% at 100% 100%, rgba(181, 42, 34, 0.05), transparent 70%),
    repeating-linear-gradient(0deg, rgba(42, 21, 16, 0.022) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.letter__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: var(--pad);
}
.letter .section-head { margin-bottom: 28px; }

.paper {
  position: relative;
  background: linear-gradient(158deg, var(--paper-2), var(--paper) 58%, #efdfc5);
  border: 1px solid rgba(90, 65, 55, 0.16);
  box-shadow: 0 30px 60px -34px rgba(42, 21, 16, 0.45), inset 0 0 0 8px rgba(255, 255, 255, 0.16);
}

.letter__paper {
  padding: clamp(34px, 6vw, 58px) clamp(22px, 5vw, 54px) clamp(48px, 7vw, 64px);
}
.letter__paper::before {
  content: "";
  position: absolute;
  left: clamp(14px, 3vw, 26px);
  top: clamp(28px, 5vw, 44px);
  bottom: clamp(28px, 5vw, 44px);
  width: 1px;
  background: linear-gradient(transparent, rgba(181, 42, 34, 0.45), transparent);
}

.letter__paper p {
  font-family: var(--kai);
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 2.1;
  text-indent: 2em;
  color: #3b2822;
  margin-bottom: 18px;
}

.letter__lead {
  font-size: clamp(19px, 3vw, 22px) !important;
  line-height: 1.8 !important;
  letter-spacing: 0.16em;
  text-indent: 0 !important;
  color: var(--ink) !important;
  margin-bottom: 24px !important;
}

.letter__sign {
  margin-top: 28px;
  padding-right: clamp(64px, 8vw, 84px);
  text-align: right;
}
.letter__sign p {
  text-indent: 0;
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.letter__sign-date {
  margin-top: 6px !important;
  font-size: 10px !important;
  letter-spacing: 0.2em !important;
  color: var(--ink-soft) !important;
}

.letter__seal {
  position: absolute;
  right: clamp(16px, 4vw, 34px);
  bottom: clamp(18px, 4vw, 30px);
  width: 62px;
  height: 62px;
  font-size: 32px;
  opacity: 0.92;
}

.letter__side {
  position: absolute;
  left: -42px;
  top: 24px;
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--cinnabar);
  opacity: 0.75;
}

/* ── 過場 ─────────────────────────────────────────────────────── */

.interlude {
  position: relative;
  height: clamp(520px, 78svh, 760px);
  overflow: hidden;
  background: var(--red-950);
}
.interlude__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.interlude__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  filter: saturate(0.95) brightness(0.9);
  transform: scale(1.12) translate3d(0, var(--py, 0px), 0);
  transition: filter 0.6s;
}
.interlude__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 3, 3, 0.55), rgba(22, 3, 3, 0.05) 55%, rgba(22, 3, 3, 0.38)),
    linear-gradient(180deg, rgba(22, 3, 3, 0.35), transparent 30%, rgba(22, 3, 3, 0.55));
}
.interlude__type {
  position: absolute;
  top: 50%;
  right: clamp(26px, 8vw, 90px);
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.interlude__title {
  font-size: clamp(38px, 10vw, 66px);
  line-height: 1.18;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.interlude__title span {
  font-size: 0.52em;
  letter-spacing: 0.24em;
  color: var(--gold-light);
}
.interlude__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(240, 215, 164, 0.6);
  color: var(--gold-light);
  font-size: 17px;
  line-height: 1;
  transform: rotate(-6deg);
}
.interlude__caption {
  position: absolute;
  left: var(--pad);
  bottom: 28px;
  z-index: 2;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.78);
}

/* ── 新人 ─────────────────────────────────────────────────────── */

.couple {
  padding: clamp(72px, 10vw, 128px) 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #451010, var(--red-900) 55%, var(--red-950));
}
.couple .section-head {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(36px, 6vw, 56px);
  text-align: center;
}

.couple__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 36px);
  max-width: 860px;
  margin-inline: auto;
  align-items: start;
}
.couple__card:nth-child(2) { margin-top: clamp(24px, 5vw, 60px); }

.couple__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--red-950);
  border: 1px solid var(--gold-dim);
}
.couple__photo::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(240, 215, 164, 0.16);
  pointer-events: none;
}
.couple__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
  transition: transform 1.2s var(--ease), filter 0.8s;
}
.couple__card:hover .couple__photo img {
  transform: scale(1.035);
  filter: saturate(1.02);
}
.couple__seal {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.couple__info { padding-top: 15px; }
.couple__role {
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--gold);
}
.couple__name {
  margin-top: 5px;
  font-size: clamp(22px, 4.6vw, 30px);
  font-weight: 600;
  letter-spacing: 0.14em;
}
.couple__en {
  margin-top: 4px;
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(243, 231, 211, 0.4);
}
.couple__note {
  margin-top: 12px;
  font-family: var(--kai);
  font-size: clamp(11.5px, 1.9vw, 13.5px);
  line-height: 1.95;
  color: rgba(243, 231, 211, 0.68);
}
.couple__quote {
  margin-top: 10px;
  font-family: var(--kai);
  font-size: clamp(11.5px, 1.9vw, 13px);
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* ── 緣起 ─────────────────────────────────────────────────────── */

.story {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--paper);
  color: var(--ink);
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.story .section-head { margin-bottom: clamp(14px, 3vw, 24px); }

.story__list {
  max-width: 900px;
  margin-inline: auto;
}
.story__item {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(38px, 6vw, 64px) 0;
  border-bottom: 1px solid rgba(42, 21, 16, 0.12);
}
.story__item:last-child { border-bottom: 0; }
.story__item:nth-child(even) .story__figure { order: 2; }

.story__figure {
  position: relative;
  margin: 0;
  padding: 10px 10px 0;
  background: #fffaf0;
  box-shadow: 0 22px 44px -26px rgba(42, 21, 16, 0.5);
  transform: rotate(-1.6deg);
}
.story__item:nth-child(even) .story__figure { transform: rotate(1.4deg); }
.story__figure::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 2;
  width: 80px;
  height: 22px;
  background: rgba(217, 185, 124, 0.42);
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  transform: translateX(-50%) rotate(-2deg);
}
.story__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.story__figure figcaption {
  padding: 9px 4px 10px;
  font-family: var(--kai);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-align: center;
}

.story__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--cinnabar);
}
.story__meta b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(181, 42, 34, 0.4);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}
.story__heading {
  margin: 14px 0 12px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  letter-spacing: 0.18em;
}
.story__para {
  font-family: var(--kai);
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 2.05;
  color: #4a342c;
}

/* ── 囍影 ─────────────────────────────────────────────────────── */

.film {
  padding: clamp(72px, 10vw, 128px) 0;
  background: #120202;
}
.film .wrap { max-width: 1000px; }
.film .section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.film__frame {
  position: relative;
  padding: clamp(6px, 1vw, 10px);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(160deg, #2a0606, #120202);
  box-shadow: 0 44px 90px -44px #000;
}
.film__frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 1;
  border: 1px solid rgba(240, 215, 164, 0.08);
  pointer-events: none;
}
.film__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.film__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.film__cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: radial-gradient(60% 60% at 50% 50%, rgba(22, 3, 3, 0.15), rgba(22, 3, 3, 0.55));
  transition: opacity 0.5s, visibility 0.5s;
}
.film.is-playing .film__cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.film__play {
  display: grid;
  place-items: center;
  width: clamp(58px, 10vw, 76px);
  height: clamp(58px, 10vw, 76px);
  border: 1px solid rgba(240, 215, 164, 0.6);
  border-radius: 50%;
  background: rgba(124, 28, 22, 0.25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.35s, border-color 0.35s, transform 0.35s;
}
.film__play svg {
  width: 24px;
  height: 24px;
  margin-left: 4px;
  color: var(--gold-light);
  transition: color 0.35s;
}
.film__cover:hover .film__play {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.06);
}
.film__cover:hover .film__play svg { color: var(--red-900); }
.film__cover-text {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--gold-light);
}
.film__cover-meta {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(243, 231, 211, 0.55);
}
.film__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 2px;
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(217, 185, 124, 0.55);
}
.film__caption {
  margin-top: 22px;
  text-align: center;
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: rgba(243, 231, 211, 0.55);
}

/* ── 喜影 ─────────────────────────────────────────────────────── */

.gallery {
  padding: clamp(72px, 10vw, 128px) 0;
  background: linear-gradient(180deg, #2a0606, var(--red-950));
}
.gallery .section-head { margin-inline: auto; text-align: center; }

.gallery__grid {
  columns: 2;
  column-gap: clamp(8px, 1.6vw, 14px);
}
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(8px, 1.6vw, 14px);
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid rgba(217, 185, 124, 0.18);
  background: var(--red-950);
  text-align: left;
}
.gallery__item img {
  width: 100%;
  height: auto;
  filter: saturate(0.9);
  transition: transform 1s var(--ease), filter 0.6s;
}
.gallery__item:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}
.gallery__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 12px 11px;
  background: linear-gradient(transparent, rgba(22, 3, 3, 0.9));
  font-family: var(--kai);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}
.gallery__hint {
  margin-top: 18px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(243, 231, 211, 0.35);
}

/* ── 良辰 ─────────────────────────────────────────────────────── */

.date {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.date::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, 0.45), transparent 65%),
    repeating-linear-gradient(90deg, rgba(42, 21, 16, 0.018) 0 1px, transparent 1px 5px);
  pointer-events: none;
}
.date .wrap { position: relative; z-index: 1; }

.date__hero { text-align: center; }
.date__year {
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--cinnabar);
  text-indent: 0.5em;
}
.date__num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  font-family: var(--latin);
  font-size: clamp(66px, 17vw, 116px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.date__num i {
  font-style: normal;
  font-size: 0.72em;
  color: var(--cinnabar);
  transform: translateY(-0.05em);
}
.date__full {
  margin-top: 12px;
  font-family: var(--kai);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.date__time {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--cinnabar);
}
.date__lunar {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.date__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 64px);
  max-width: 860px;
  margin: clamp(40px, 6vw, 60px) auto 0;
  align-items: start;
}

.date__label {
  margin-bottom: 12px;
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--cinnabar);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(42, 21, 16, 0.18);
  border-bottom: 1px solid rgba(42, 21, 16, 0.18);
}
.countdown__cell {
  padding: 14px 4px 12px;
  text-align: center;
  border-right: 1px solid rgba(42, 21, 16, 0.12);
}
.countdown__cell:last-child { border-right: 0; }
.countdown__num {
  display: block;
  font-family: var(--latin);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.countdown__unit {
  display: block;
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.date__passed {
  margin-top: 14px;
  font-family: var(--kai);
  font-size: 16px;
  color: var(--cinnabar);
}
.date__note {
  margin-top: 18px;
  padding-left: 12px;
  border-left: 1px solid rgba(181, 42, 34, 0.4);
  font-family: var(--kai);
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.calendar {
  padding: 16px 14px;
  border: 1px solid rgba(42, 21, 16, 0.14);
  background: rgba(255, 250, 240, 0.65);
  box-shadow: 0 18px 40px -30px rgba(42, 21, 16, 0.45);
}
.calendar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(42, 21, 16, 0.12);
}
.calendar__head span {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.calendar__head b {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.24em;
}
.calendar__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 10px;
}
.calendar__week span {
  padding: 4px 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar__day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-family: var(--latin);
  font-size: 11px;
  color: var(--ink);
}
.calendar__day.is-empty { visibility: hidden; }
.calendar__day.is-wedding {
  border-radius: 50%;
  background: var(--cinnabar);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(181, 42, 34, 0.12);
}
.calendar__day.is-wedding::after {
  content: "婚";
  position: absolute;
  bottom: 3px;
  font-family: var(--serif);
  font-size: 5px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.8);
}
.calendar__legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.calendar__legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
}

/* ── 喜宴 ─────────────────────────────────────────────────────── */

.banquet {
  padding: clamp(72px, 10vw, 128px) 0;
  background: radial-gradient(100% 80% at 50% 0%, #3d0a0a, var(--red-950));
  text-align: center;
}
.banquet .section-head {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(30px, 5vw, 44px);
}

.banquet__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(14px, 2.2vw, 24px);
  max-width: 1000px;
  margin-inline: auto;
}

.banquet__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: clamp(40px, 5vw, 56px) clamp(18px, 3vw, 36px) clamp(46px, 5.4vw, 60px);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(160deg, rgba(124, 28, 22, 0.18), rgba(22, 3, 3, 0.2));
}
.banquet__card--main {
  border-color: rgba(217, 185, 124, 0.5);
  background: linear-gradient(160deg, rgba(124, 28, 22, 0.3), rgba(22, 3, 3, 0.22));
}
.banquet__card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(240, 215, 164, 0.08);
  pointer-events: none;
}
.banquet__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.7;
}
.banquet__corner--tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.banquet__corner--tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.banquet__corner--bl { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
.banquet__corner--br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

.banquet__role {
  font-family: var(--kai);
  font-size: clamp(14px, 1.7vw, 17px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--gold-light);
}
.banquet__en {
  margin-top: 8px;
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.34em;
  color: rgba(217, 185, 124, 0.5);
}
.banquet__rule {
  width: 56px;
  height: 1px;
  margin: 22px auto;
  background: var(--gold-dim);
}
.banquet__date {
  font-family: var(--latin);
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0.12em;
  color: var(--gold-light);
}
.banquet__date .dot {
  margin: 0 0.55em;
  color: var(--gold);
}
.banquet__lunar {
  margin-top: 10px;
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(240, 215, 164, 0.78);
}
.banquet__time {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(243, 231, 211, 0.55);
}
.banquet__venue {
  margin-top: clamp(18px, 2.4vw, 26px);
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--paper);
}
.banquet__note {
  margin-top: 12px;
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: rgba(243, 231, 211, 0.62);
}
.banquet__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding-top: clamp(24px, 3vw, 34px);
}
.banquet__actions .btn {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 10px;
  letter-spacing: 0.2em;
}
.banquet__seal {
  position: absolute;
  right: clamp(10px, 2.4vw, 18px);
  bottom: clamp(10px, 2.4vw, 16px);
  width: 48px;
  height: 48px;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  opacity: 0.85;
}

@media (max-width: 719px) {
  .banquet__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }
}

/* ── 回柬 ─────────────────────────────────────────────────────── */

.rsvp {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--paper);
  color: var(--ink);
}
.rsvp .section-head {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(30px, 5vw, 44px);
}

.rsvp__panel {
  position: relative;
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid rgba(42, 21, 16, 0.14);
  background: rgba(255, 250, 240, 0.7);
  box-shadow: 0 26px 60px -40px rgba(42, 21, 16, 0.45);
}
.rsvp__privacy {
  margin-bottom: 24px;
  padding: 12px 14px;
  border-left: 2px solid rgba(181, 42, 34, 0.4);
  background: rgba(181, 42, 34, 0.04);
  font-family: var(--kai);
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.rsvp__saved {
  margin: -8px 0 18px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cinnabar);
}

.field { margin-bottom: 18px; }
.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid rgba(42, 21, 16, 0.25);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s;
}
.field textarea {
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 21, 16, 0.2);
  line-height: 1.7;
  resize: vertical;
}
.field select {
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4137' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--cinnabar); }
.field input::placeholder,
.field textarea::placeholder { color: rgba(42, 21, 16, 0.35); }

.field--choice { margin-bottom: 18px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(42, 21, 16, 0.22);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.choice:has(input:checked) {
  background: var(--red-800);
  border-color: var(--red-800);
}
.choice:has(input:checked) span { color: var(--gold-light); }
.choice:has(input:focus-visible) {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

.form-error {
  margin: -2px 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--cinnabar-deep);
}

.receipt {
  padding: 24px;
  border: 1px dashed rgba(42, 21, 16, 0.3);
  background: rgba(255, 255, 255, 0.3);
  text-align: center;
}
.receipt__kicker {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--cinnabar);
}
.receipt__title {
  margin: 8px 0 18px;
  font-size: 22px;
  letter-spacing: 0.18em;
}
.receipt__body {
  max-width: 380px;
  margin-inline: auto;
  font-family: var(--kai);
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
  text-align: left;
}
.receipt__body p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dotted rgba(42, 21, 16, 0.2);
}
.receipt__body span:first-child { flex: none; color: var(--ink-soft); }
.receipt__body span:last-child { text-align: right; color: var(--ink); }
.receipt__code {
  margin-top: 18px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.receipt__code b {
  font-family: var(--latin);
  letter-spacing: 0.12em;
  color: var(--cinnabar);
}
.receipt__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.receipt__actions .btn { min-width: 132px; }

/* ── 祝福 ─────────────────────────────────────────────────────── */

.wishes {
  padding: clamp(72px, 10vw, 128px) 0 0;
  overflow: hidden;
  background: radial-gradient(100% 70% at 50% 0%, #451010, var(--red-950));
}
.wishes .section-head {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(30px, 5vw, 44px);
}

.marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee--reverse { margin-top: 10px; }
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 54s linear infinite;
  will-change: transform;
}
.marquee--reverse .marquee__track {
  animation-direction: reverse;
  animation-duration: 66s;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  gap: 10px;
  padding-right: 10px;
}
.wish-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(217, 185, 124, 0.22);
  background: rgba(124, 28, 22, 0.12);
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(243, 231, 211, 0.8);
  white-space: nowrap;
}
.wish-chip b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(217, 185, 124, 0.3);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 400;
  color: var(--gold);
}

@keyframes marquee {
  to { transform: translate3d(-50%, 0, 0); }
}

.wishes__body {
  max-width: 820px;
  margin: clamp(40px, 7vw, 64px) auto 0;
  padding-bottom: clamp(70px, 10vw, 120px);
}

.wish-form {
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(217, 185, 124, 0.18);
  background: rgba(22, 3, 3, 0.35);
}
.wish-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}
.wish-form__row .field { flex: 0 0 160px; margin: 0; }
.wish-form__row .field--grow { flex: 1 1 220px; }
.field--dark label { color: rgba(217, 185, 124, 0.65); }
.field--dark input {
  border-bottom-color: rgba(217, 185, 124, 0.25);
  color: var(--paper);
  font-size: 15px;
}
.field--dark input:focus { border-color: var(--gold); }
.field--dark input::placeholder { color: rgba(243, 231, 211, 0.28); }
.wish-form__btn { flex: none; margin-bottom: 1px; }
.wish-form__note {
  margin-top: 12px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(243, 231, 211, 0.35);
}

.wish-wall { margin-top: 44px; }
.wish-wall__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(217, 185, 124, 0.18);
}
.wish-wall__head h3 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.2em;
}
.wish-wall__head p {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(217, 185, 124, 0.6);
}
.wish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wish-card {
  position: relative;
  padding: 18px 16px;
  border: 1px solid rgba(217, 185, 124, 0.16);
  background: linear-gradient(155deg, rgba(124, 28, 22, 0.14), rgba(22, 3, 3, 0.25));
}
.wish-card:nth-child(3n + 2) { transform: rotate(0.5deg); }
.wish-card:nth-child(3n) { transform: rotate(-0.4deg); }
.wish-card__text {
  font-family: var(--kai);
  font-size: 13px;
  line-height: 1.9;
  color: rgba(243, 231, 211, 0.85);
  overflow-wrap: anywhere;
}
.wish-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(217, 185, 124, 0.55);
}
.wish-empty {
  padding: 26px 0;
  text-align: center;
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(243, 231, 211, 0.35);
}

/* ── 此證 ─────────────────────────────────────────────────────── */

.ending {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: clamp(70px, 11vh, 110px);
  overflow: hidden;
  background: var(--red-950);
}
.ending__bg { position: absolute; inset: 0; overflow: hidden; }
.ending__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: saturate(0.85) brightness(0.8);
  transform: scale(1.1) translate3d(0, var(--py, 0px), 0);
}
.ending__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 3, 3, 0.45), rgba(22, 3, 3, 0.78) 65%, var(--red-950) 100%),
    radial-gradient(60% 50% at 50% 45%, rgba(181, 42, 34, 0.18), transparent);
}
.ending__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: auto;
  padding: 0 var(--pad);
  text-align: center;
}
.ending__eyebrow {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.5em;
  color: rgba(217, 185, 124, 0.6);
}
.ending__title {
  margin: 10px 0 30px;
  font-size: clamp(44px, 11vw, 72px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}
.ending__pledge {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 26px);
}
.ending__pledge p {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--kai);
  font-size: clamp(12px, 2.2vw, 14px);
  line-height: 2.05;
  letter-spacing: 0.16em;
  color: rgba(243, 231, 211, 0.86);
}
.ending__sign { margin-top: 30px; }
.ending__sign p:first-child {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--gold-light);
}
.ending__sign p:first-child i {
  font-style: normal;
  margin: 0 0.4em;
  color: rgba(217, 185, 124, 0.5);
}
.ending__sign p:last-child {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(243, 231, 211, 0.5);
}
.ending__seal {
  position: relative;
  width: 64px;
  height: 64px;
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.12em;
  transform: rotate(-5deg);
}
.ending__thanks {
  margin-top: 26px;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(243, 231, 211, 0.65);
}

/* ── 囍印：紅底金囍雙環（所有囍字） ─────────────────────────── */

.xi {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #a82a20 0%, #8f1d18 46%, #6c1511 100%);
  color: var(--gold-light);
  border: 1px solid rgba(240, 215, 164, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(90, 18, 12, 0.3),
    0 8px 18px rgba(0, 0, 0, 0.28);
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  writing-mode: horizontal-tb;
  text-shadow: 0 1px 0 rgba(90, 18, 12, 0.45);
}
.xi::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(240, 215, 164, 0.6);
  border-radius: 50%;
  pointer-events: none;
}
/* 囍字略為縱向拉長，讓圓環與字的上下間距和左右一致（約 2–3px） */
.xi__glyph {
  display: block;
  line-height: 1;
  transform: scaleY(1.22);
  transform-origin: center;
  -webkit-text-stroke: 0.01em currentColor;
}
.gate__seal.xi { font-size: 74px; }
.topbar__seal.xi { font-size: 22px; }
.hero__amp.xi { font-size: clamp(30px, 5.6vw, 39px); }
.letter__seal.xi { font-size: 52px; }
.interlude__seal.xi { font-size: 28px; }
.banquet__seal.xi { font-size: 40px; }
.letter__seal.xi,
.banquet__seal.xi,
.couple__seal.xi { position: absolute; }

@media (max-width: 420px) {
  .hero__amp.xi { font-size: 28px; }
  .letter__seal.xi { font-size: 44px; }
}
@media (min-width: 900px) {
  .gate__seal.xi { font-size: 90px; }
  .hero__amp.xi { font-size: 45px; }
}

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: clamp(50px, 8vh, 80px);
  padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(217, 185, 124, 0.14);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(243, 231, 211, 0.4);
}
.footer a { color: var(--gold); }

/* ── 燈箱 / Toast / 回頂 ─────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 56px 64px;
  background: rgba(10, 2, 2, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__figure img {
  max-width: min(92vw, 1100px);
  max-height: calc(100svh - 180px);
  object-fit: contain;
  border: 1px solid rgba(217, 185, 124, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__figure figcaption {
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: rgba(243, 231, 211, 0.65);
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 185, 124, 0.25);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(22, 3, 3, 0.4);
}
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(217, 185, 124, 0.25);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(22, 3, 3, 0.4);
  transform: translateY(-50%);
}
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
.lightbox__nav svg { width: 20px; height: 20px; }

.toast {
  position: fixed;
  left: 50%;
  top: calc(66px + env(safe-area-inset-top));
  z-index: 95;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border: 1px solid rgba(42, 21, 16, 0.1);
  background: rgba(243, 231, 211, 0.96);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.to-top {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(22, 3, 3, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
}
body.show-top .to-top {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.to-top svg { width: 16px; height: 16px; }

/* ── 進場 ─────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ── 響應式 ───────────────────────────────────────────────────── */

@media (min-width: 760px) {
  .gallery__grid { columns: 3; }
  .gallery__cap { opacity: 1; transform: none; }
  .wish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .story__item {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .story__item:nth-child(even) .story__figure { order: 0; }
  .story__figure { max-width: 84%; }
  .story__item:nth-child(even) .story__figure { margin-left: auto; }
  .date__body { grid-template-columns: 1fr; max-width: 420px; }
  .date__left { order: 2; }
  .date__right { order: 1; }
  .wish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wish-form__row { flex-direction: column; align-items: stretch; }
  .wish-form__row .field,
  .wish-form__row .field--grow { flex: 1 1 auto; width: 100%; }
  .wish-form__btn { width: 100%; }
}

@media (max-width: 600px) {
  .topbar__date { display: none; }
  .lightbox { padding: 56px 14px 86px; }
  .lightbox__figure img { max-width: 100%; max-height: calc(100svh - 200px); }
  .lightbox__nav {
    top: auto;
    bottom: 20px;
    transform: none;
  }
  .lightbox__nav--prev { left: calc(50% - 54px); }
  .lightbox__nav--next { right: calc(50% - 54px); }
  .ending__pledge { gap: 10px; }
}

@media (max-width: 420px) {
  .hero__names { font-size: 29px; gap: 8px; }
  .hero__amp { width: 34px; height: 34px; font-size: 17px; }
  .hero__content { padding-bottom: 46px; }
  .couple__note { font-size: 11px; }
  .couple__quote { font-size: 11px; }
  .letter__seal { width: 52px; height: 52px; font-size: 27px; }
  .calendar { padding: 14px 10px; }
  .calendar__day { font-size: 10px; }
  .wish-grid { grid-template-columns: 1fr; }
  .wish-card:nth-child(n) { transform: none; }
}

@media (max-width: 360px) {
  .hero__names { font-size: 27px; }
  .gate__hint { letter-spacing: 0.28em; padding-inline: 14px; }
  .section-title { font-size: 28px; }
}

/* ── 動效降級 ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gate { transition: none; }
  .gate__panel { transition: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .interlude__media img,
  .ending__bg img { transform: none !important; }
  .marquee {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee__track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    animation: none;
  }
  .marquee__group {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 8px;
  }
  .marquee__group[aria-hidden="true"] { display: none; }
}

@media (min-width: 900px) {
  .gate__inner { max-width: 560px; }
  .gate__house { font-size: 13px; }
  .gate__seal { width: 104px; height: 104px; margin: 30px auto 26px; font-size: 54px; }
  .gate__names { font-size: 32px; }
  .gate__title { font-size: 15px; }
  .gate__date { margin-top: 26px; font-size: 12px; }
  .gate__hint { padding: 14px 28px; font-size: 13px; }
  .gate__sub { font-size: 11px; }

  .hero__kicker { font-size: 10px; }
  .hero__names { font-size: 64px; }
  .hero__name small { font-size: 11px; }
  .hero__amp { width: 54px; height: 54px; font-size: 24px; }
  .hero__date { font-size: 54px; }
  .hero__meta { font-size: 13px; }
  .hero__lunar { font-size: 11px; }
  .hero__side { font-size: 11px; }
  .hero__scroll { font-size: 10px; }

  .rsvp__panel { max-width: 720px; }
  .rsvp__privacy { font-size: 12.5px; }
  .field label,
  .field legend { font-size: 10.5px; }
  .wish-form__row .field { flex-basis: 200px; }
  .wish-form__row .field--grow { flex-basis: 320px; }

  .ending__pledge p { font-size: 17px; line-height: 2.15; }
  .ending__sign p:first-child { font-size: 19px; }
  .ending__sign p:last-child { font-size: 10.5px; }
  .ending__thanks { font-size: 15px; }
  .ending__seal { width: 76px; height: 76px; font-size: 15px; }

  .couple__grid { max-width: 700px; gap: 48px; }
  .couple__card:nth-child(2) { margin-top: 48px; }
  .couple__name { font-size: 32px; }
}

/* ── 列印 ─────────────────────────────────────────────────────── */

@media print {
  .gate,
  .sound,
  .rail,
  .topbar,
  .to-top,
  .lightbox,
  .toast,
  .marquee,
  .film__cover { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; }
  .hero__content { padding: 40px 0; }
  .reveal { opacity: 1; transform: none; }
  section { break-inside: avoid; }
}


@media (max-width: 560px) {
  .footer { padding-right: calc(var(--pad) + 48px); }
}
