:root {
  --red-950: #4d0208;
  --red-900: #65050c;
  --red-800: #7e0710;
  --red-700: #9e1118;
  --red-500: #c12a25;
  --gold-100: #fff1ce;
  --gold-200: #f8dfaa;
  --gold-300: #eecb85;
  --gold-400: #d9ad58;
  --gold-500: #bd8738;
  --paper: #f5ead3;
  --paper-deep: #e8d5b5;
  --ink: #6e1114;
  --shadow: rgba(47, 0, 4, .28);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 220, 150, .1), transparent 24%),
    radial-gradient(circle at 80% 82%, rgba(255, 220, 150, .08), transparent 26%),
    linear-gradient(135deg, #310005, #65050c 55%, #350005);
  color: var(--gold-100);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-touch-callout: none;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 2px;
}

.desktop-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: rgba(245, 211, 144, .12);
}

.desktop-backdrop span {
  position: absolute;
  left: 8vw;
  top: 50%;
  transform: translateY(-52%);
  font-size: min(38vw, 520px);
  line-height: 1;
  font-weight: 700;
}

.desktop-backdrop p {
  position: absolute;
  right: 5vw;
  bottom: 8vh;
  margin: 0;
  font-size: 12px;
  letter-spacing: .65em;
  writing-mode: vertical-rl;
}

.invitation {
  --page: 0;
  position: relative;
  width: min(100vw, 430px);
  height: 100vh;
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--red-800);
  box-shadow: 0 0 70px rgba(0, 0, 0, .34);
  touch-action: pan-x;
}

.deck {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, calc(var(--page) * -100%), 0);
  transition: transform 720ms var(--ease);
  will-change: transform;
}

.deck.no-transition {
  transition: none;
}

.scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex: 0 0 100%;
  overflow: hidden;
  padding: max(60px, env(safe-area-inset-top)) 28px max(58px, env(safe-area-inset-bottom));
  opacity: .99;
  transform: translateZ(0);
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.scene::before {
  inset: 12px;
  z-index: 1;
  border: 1px solid rgba(241, 202, 124, .36);
}

.scene::after {
  inset: 18px;
  z-index: 1;
  border: 1px solid rgba(241, 202, 124, .14);
}

.scene > *:not(.paper-texture, .cloud, .corner, .promise-orbit) {
  position: relative;
  z-index: 3;
}

.paper-texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .28;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(22deg, rgba(255,255,255,.025) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(112deg, rgba(0,0,0,.025) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 66%, rgba(0,0,0,.12) 0 1px, transparent 1.5px);
  background-size: auto, auto, 17px 19px, 23px 29px;
  mix-blend-mode: overlay;
}

.scene-cover,
.scene-quotes,
.scene-gallery,
.scene-blessing,
.scene-promise {
  background:
    radial-gradient(circle at 50% 28%, rgba(204, 56, 43, .52), transparent 36%),
    linear-gradient(160deg, var(--red-700), var(--red-900) 62%, var(--red-950));
}

.scene-letter,
.scene-vow,
.scene-story,
.scene-schedule,
.scene-location {
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(255,255,255,.8), transparent 24%),
    linear-gradient(145deg, #faefd9, var(--paper) 46%, #e8d3ad);
}

.scene-letter::before,
.scene-letter::after,
.scene-vow::before,
.scene-vow::after,
.scene-story::before,
.scene-story::after,
.scene-schedule::before,
.scene-schedule::after,
.scene-location::before,
.scene-location::after {
  border-color: rgba(128, 18, 21, .25);
}

.reveal {
  opacity: 0;
  filter: blur(3px);
}

.scene.active .reveal {
  animation: reveal-in .85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal-in {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: blur(0); }
}

/* 固定控件 */
.round-control {
  position: absolute;
  z-index: 30;
  top: max(18px, env(safe-area-inset-top));
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 229, 178, .52);
  border-radius: 50%;
  color: var(--gold-100);
  background: rgba(91, 5, 11, .58);
  box-shadow: 0 5px 18px rgba(35, 0, 3, .18);
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.music-control { right: 18px; }
.share-control { right: 62px; }

.share-control svg {
  width: 16px;
  fill: currentColor;
}

.music-disc {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.music-control.playing .music-disc {
  animation: disc-spin 5s linear infinite;
}

.sound-wave {
  position: absolute;
  right: -1px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-top: 1px solid var(--gold-100);
  border-right: 1px solid var(--gold-100);
  border-radius: 50%;
  opacity: 0;
}

.music-control.playing .sound-wave {
  animation: wave-pulse 1.5s ease-out infinite;
}

@keyframes disc-spin { to { transform: rotate(360deg); } }
@keyframes wave-pulse {
  0% { opacity: .9; transform: scale(.5); }
  100% { opacity: 0; transform: scale(3); }
}

.page-progress {
  position: absolute;
  z-index: 25;
  left: 21px;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 235, 197, .76);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .08em;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

.page-progress i {
  width: 26px;
  height: 1px;
  background: currentColor;
  transform: rotate(-36deg);
  opacity: .62;
}

.scene:nth-child(3).active ~ * .page-progress {
  color: var(--ink);
}

.page-dots {
  position: absolute;
  z-index: 24;
  right: 10px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: translateY(-50%);
}

.page-dots button {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 1px solid rgba(255, 235, 197, .78);
  border-radius: 50%;
  background: transparent;
  opacity: .5;
  cursor: pointer;
  transition: height .3s ease, border-radius .3s ease, opacity .3s ease, background .3s ease;
}

.page-dots button.active {
  height: 19px;
  border-radius: 10px;
  background: var(--gold-200);
  opacity: .95;
}

.next-page {
  position: absolute;
  z-index: 24;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 34px;
  height: 27px;
  padding: 0;
  transform: translateX(-50%);
  background: transparent;
  cursor: pointer;
}

.next-page span {
  position: absolute;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 1px solid rgba(255, 237, 204, .82);
  border-left: 1px solid rgba(255, 237, 204, .82);
  transform: translateX(-50%) rotate(45deg);
  animation: arrow-up 1.8s ease-in-out infinite;
}

.next-page span:nth-child(2) { top: 8px; animation-delay: .2s; }
.next-page.is-last { display: none; }

@keyframes arrow-up {
  0%, 100% { opacity: .15; transform: translate(-50%, 8px) rotate(45deg); }
  50% { opacity: .95; transform: translate(-50%, 0) rotate(45deg); }
}

.toast {
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px));
  max-width: 78%;
  padding: 9px 14px;
  border: 1px solid rgba(255, 226, 174, .36);
  border-radius: 999px;
  color: var(--gold-100);
  background: rgba(48, 0, 4, .84);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  font-size: 12px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: .28s ease;
}

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

/* 加载页 */
.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold-100);
  background:
    radial-gradient(circle at center, rgba(183, 33, 33, .72), transparent 38%),
    linear-gradient(145deg, #8a0911, #4d0208);
  transition: opacity .7s ease, visibility .7s ease;
}

.loading.hidden { opacity: 0; visibility: hidden; }

.loading-seal {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-300);
  outline: 1px solid rgba(244, 213, 150, .35);
  outline-offset: 7px;
  font-size: 54px;
  line-height: 1;
  animation: seal-breathe 2.2s ease-in-out infinite;
}

.loading p {
  margin: 28px 0 16px;
  font-size: 14px;
  letter-spacing: .45em;
  text-indent: .45em;
}

.loading > i {
  width: 96px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
}

.loading > i::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: var(--gold-300);
  animation: loading-line 1.4s ease-in-out infinite;
}

@keyframes seal-breathe { 50% { transform: scale(1.04); box-shadow: 0 0 34px rgba(237, 190, 97, .16); } }
@keyframes loading-line { from { transform: translateX(-120%); } to { transform: translateX(280%); } }

/* 共用标题 */
.scene-heading {
  text-align: center;
}

.scene-heading small {
  display: block;
  margin-bottom: 5px;
  color: var(--red-700);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .34em;
  text-indent: .34em;
}

.scene-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(27px, 7vw, 34px);
  font-weight: 500;
  letter-spacing: .22em;
  text-indent: .22em;
}

.scene-heading p {
  margin: 7px 0 0;
  color: rgba(110, 17, 20, .66);
  font-size: 11px;
  letter-spacing: .14em;
}

.scene-heading.light small,
.scene-heading.light h2,
.scene-heading.light p {
  color: var(--gold-100);
}

.scene-heading.light p { opacity: .72; }

/* 01 封面 */
.scene-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scene-kicker {
  margin-top: 0;
  font-family: Georgia, serif;
  text-align: center;
}

.scene-kicker span {
  display: block;
  font-size: 9px;
  letter-spacing: .44em;
  text-indent: .44em;
}

.scene-kicker b {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .58em;
  text-indent: .58em;
}

.cover-emblem {
  position: relative !important;
  width: min(52vw, 205px);
  height: min(52vw, 205px);
  display: grid;
  place-items: center;
  margin-top: clamp(22px, 6vh, 48px);
}

.cover-emblem::before,
.cover-emblem::after {
  content: "";
  position: absolute;
  inset: 19%;
  border: 1px solid rgba(245, 211, 146, .45);
  transform: rotate(45deg);
}

.cover-emblem::after {
  inset: 25%;
  border-style: dashed;
  opacity: .7;
}

.cover-emblem > span {
  position: relative;
  z-index: 3;
  color: var(--gold-100);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(76px, 22vw, 102px);
  line-height: .9;
  text-shadow: 0 8px 24px rgba(40, 0, 3, .25);
}

.cover-emblem > small {
  position: absolute;
  z-index: 4;
  right: 17%;
  bottom: 17%;
  width: 25px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 3px 4px;
  border: 1px solid var(--gold-200);
  color: var(--gold-100);
  font-size: 9px;
  line-height: 1.25;
  writing-mode: vertical-rl;
  background: var(--red-700);
}

.emblem-ring {
  position: absolute;
  border: 1px solid rgba(245, 211, 146, .46);
  border-radius: 50%;
}

.ring-one { inset: 2%; }
.ring-two { inset: 9%; border-style: dotted; }

.cover-motto {
  margin: clamp(12px, 2.5vh, 22px) 0 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-indent: .22em;
}

.couple-names {
  width: 92%;
  display: grid;
  grid-template-columns: 1fr 38px 1fr;
  align-items: center;
  margin-top: clamp(17px, 3vh, 26px);
}

.couple-names div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.couple-names small {
  font-size: 8px;
  letter-spacing: .42em;
  text-indent: .42em;
  opacity: .72;
}

.couple-names strong {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(23px, 6vw, 29px);
  font-weight: 500;
  letter-spacing: .12em;
  text-indent: .12em;
}

.couple-names > i {
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  opacity: .75;
}

.date-medallion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(17px, 3vh, 28px);
}

.date-medallion > span {
  padding-right: 10px;
  border-right: 1px solid rgba(255, 234, 194, .48);
  font-family: Georgia, serif;
  font-size: 22px;
  letter-spacing: .12em;
}

.date-medallion small {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .06em;
  opacity: .82;
}

.date-medallion small b { font-weight: 400; }

.swipe-hint {
  margin: auto 0 0;
  font-size: 9px;
  letter-spacing: .28em;
  text-indent: .28em;
  opacity: .62;
}

.cloud {
  position: absolute;
  z-index: 2;
  width: 170px;
  height: 52px;
  opacity: .2;
  border-top: 1px solid var(--gold-200);
  border-radius: 50%;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border: 1px solid var(--gold-200);
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
}

.cloud::before { width: 54px; height: 24px; left: 28px; top: -12px; }
.cloud::after { width: 72px; height: 33px; right: 19px; top: -20px; }
.cloud-a { left: -70px; top: 24%; transform: rotate(8deg); }
.cloud-b { right: -88px; bottom: 18%; transform: rotate(188deg); }

.corner {
  position: absolute;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-color: rgba(245, 211, 146, .38);
}

.corner-tl { left: 18px; top: 18px; border-left: 8px double; border-top: 8px double; }
.corner-br { right: 18px; bottom: 18px; border-right: 8px double; border-bottom: 8px double; }

/* 02 文案轮播 */
.scene-quotes .scene-heading { margin-top: 4px; }
.scene-quotes .scene-heading small,
.scene-quotes .scene-heading h2,
.scene-quotes .scene-heading p { color: var(--gold-100); }
.scene-quotes .scene-heading p { opacity: .7; }

.quote-stage {
  position: relative !important;
  width: min(72vw, 286px);
  height: min(68vw, 270px);
  margin: clamp(28px, 5vh, 48px) auto 0;
}

.quote-stage::before,
.quote-stage::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(246, 216, 158, .42);
  transform: rotate(4deg);
}

.quote-stage::after { transform: rotate(-4deg); }

.quote-card {
  position: absolute;
  inset: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  border: 1px solid rgba(247, 218, 160, .65);
  color: var(--gold-100);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 217, 145, .14), transparent 32%),
    linear-gradient(145deg, rgba(91, 0, 7, .68), rgba(133, 9, 15, .92));
  box-shadow: 0 18px 48px rgba(43, 0, 3, .26);
  text-align: center;
  opacity: 0;
  transform: translateY(14px) rotate(-1deg) scale(.96);
  transition: .7s var(--ease);
}

.quote-card::before {
  content: "囍";
  position: absolute;
  top: 22px;
  color: rgba(244, 208, 139, .15);
  font-size: 82px;
}

.quote-card.active {
  z-index: 3;
  opacity: 1;
  transform: translateY(0) rotate(0) scale(1);
}

.quote-card.leaving {
  opacity: 0;
  transform: translateY(-14px) rotate(1deg) scale(.98);
}

.quote-card small {
  position: relative;
  z-index: 2;
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .36em;
  text-indent: .36em;
  opacity: .68;
}

.quote-card h3 {
  position: relative;
  z-index: 2;
  margin: 20px 0 11px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 500;
  letter-spacing: .12em;
  text-indent: .12em;
}

.quote-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 13px;
  letter-spacing: .12em;
}

.quote-card b {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 22px;
  padding: 3px 2px;
  border: 1px solid var(--gold-300);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.2;
  writing-mode: vertical-rl;
}

.vertical-couplet {
  position: absolute !important;
  top: 39%;
  color: var(--gold-200);
  font-size: 10px;
  letter-spacing: .26em;
  writing-mode: vertical-rl;
  opacity: .7;
}

.vertical-couplet.left { left: 22px; }
.vertical-couplet.right { right: 22px; }

.red-thread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(26px, 5vh, 44px);
}

.red-thread i { width: 68px; height: 1px; background: rgba(246, 216, 158, .38); }
.red-thread span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--gold-300); transform: rotate(45deg); font-size: 13px; }
.red-thread span::first-letter { transform: rotate(-45deg); }

/* 03 邀请信 */
.scene-letter { padding-left: 32px; padding-right: 32px; }

.letter-frame {
  height: 100%;
  max-height: 670px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(23px, 4.2vh, 38px) clamp(21px, 5vw, 28px) 22px;
  border: 1px solid rgba(113, 14, 17, .4);
  outline: 5px double rgba(113, 14, 17, .16);
  outline-offset: -11px;
  background: rgba(255, 249, 235, .38);
}

.letter-topmark {
  align-self: center;
  width: 30px;
  padding: 6px 4px;
  border: 1px solid var(--red-700);
  color: var(--red-700);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  writing-mode: vertical-rl;
}

.letter-en {
  margin: 13px 0 3px;
  color: rgba(111, 17, 20, .54);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .4em;
  text-align: center;
  text-indent: .4em;
}

.letter-frame h2 {
  margin: 0 0 clamp(17px, 3vh, 25px);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(25px, 7vw, 32px);
  font-weight: 500;
  letter-spacing: .24em;
  text-align: center;
  text-indent: .24em;
}

.salutation {
  margin: 0 0 11px;
  font-size: 12px;
  letter-spacing: .05em;
}

.salutation strong { color: var(--red-700); font-weight: 600; }

.letter-copy {
  margin: 0;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 2;
  letter-spacing: .075em;
  text-align: justify;
}

.letter-info {
  margin-top: auto;
  padding: 13px 0 9px;
  border-top: 1px solid rgba(111, 17, 20, .2);
  border-bottom: 1px solid rgba(111, 17, 20, .2);
}

.letter-info p {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: baseline;
  gap: 6px;
  margin: 5px 0;
  font-size: 11px;
}

.letter-info span { color: var(--red-700); letter-spacing: .18em; }
.letter-info b { font-weight: 500; }
.letter-info em { font-family: Georgia, serif; font-style: normal; }

.signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 16px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 17px;
}

.signature i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--red-700);
  font-style: normal;
  font-size: 16px;
}

/* 04/05 誓言 */
.scene-vow {
  padding: max(58px, env(safe-area-inset-top)) 25px max(55px, env(safe-area-inset-bottom));
}

.moon-disc {
  position: absolute !important;
  z-index: 1 !important;
  right: -54px;
  top: 70px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 33%, #fff9e8, #e9c994 68%, #d9aa63);
  box-shadow: 0 0 0 1px rgba(121, 22, 22, .12), 0 15px 40px rgba(91, 31, 18, .13);
}

.moon-disc::before {
  content: "";
  position: absolute;
  inset: 23px;
  border: 1px dashed rgba(130, 36, 26, .18);
  border-radius: 50%;
}

.moon-right { right: auto; left: -54px; }

.portrait-frame {
  position: relative !important;
  width: 69%;
  height: min(48vh, 385px);
  overflow: hidden;
  border: 7px solid rgba(255, 250, 235, .82);
  outline: 1px solid rgba(113, 14, 17, .28);
  box-shadow: 0 20px 42px rgba(76, 23, 17, .18);
  background: #ae2b28;
}

.portrait-one { margin: 24px 0 0 3px; transform: rotate(-1.5deg); }
.portrait-two { margin: 24px 3px 0 auto; transform: rotate(1.5deg); }

.vow-copy {
  position: absolute !important;
  z-index: 6 !important;
  right: 22px;
  bottom: 66px;
  width: 58%;
  padding: 18px 17px;
  border-left: 3px solid var(--red-700);
  color: var(--ink);
  background: rgba(250, 239, 217, .92);
  box-shadow: 0 14px 34px rgba(79, 18, 14, .16);
  backdrop-filter: blur(7px);
}

.vow-copy-right {
  right: auto;
  left: 22px;
  border-left: 0;
  border-right: 3px solid var(--red-700);
  text-align: right;
}

.vow-copy small {
  color: var(--red-700);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .28em;
}

.vow-copy h2 {
  margin: 5px 0 9px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 20px;
  font-weight: 500;
}

.vow-copy p {
  margin: 0;
  font-size: 11px;
  line-height: 1.9;
  text-align: justify;
}

.vow-copy b {
  display: block;
  margin-top: 8px;
  color: var(--red-700);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
}

.seal-word {
  position: absolute !important;
  z-index: 7 !important;
  left: 25px;
  bottom: 42px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red-700);
  color: var(--red-700);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
  transform: rotate(-5deg);
}

.seal-right { left: auto; right: 25px; transform: rotate(5deg); }

/* 自带国潮插画 / 照片 */
.portrait-frame.has-photo,
.gallery-photo.has-photo {
  background-position: center;
  background-size: cover;
}

.has-photo .fallback-art { display: none; }

.fallback-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 20%, rgba(255, 226, 162, .9) 0 16%, transparent 16.5%),
    linear-gradient(155deg, #d85139 0 26%, #8c1119 62%, #4f0208);
}

.fallback-art::before,
.fallback-art::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -9%;
  width: 80%;
  height: 46%;
  border-radius: 50% 55% 0 0;
  background: #55050a;
  transform: rotate(11deg);
  box-shadow: 120px -18px 0 #710a10;
}

.fallback-art::after {
  left: 26%;
  bottom: -20%;
  width: 96%;
  height: 52%;
  background: #320005;
  transform: rotate(-9deg);
  box-shadow: none;
}

.fallback-art > i {
  position: absolute;
  z-index: 2;
  left: 13%;
  top: 12%;
  width: 45%;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 225, 168, .46);
  box-shadow: 16px 11px 0 rgba(255, 225, 168, .24), -8px 22px 0 rgba(255, 225, 168, .22);
}

.fallback-art > b {
  position: absolute;
  z-index: 4;
  right: 17%;
  bottom: 13%;
  width: 32px;
  height: 86px;
  border-radius: 50% 50% 8px 8px;
  background: #220004;
  box-shadow: -27px 9px 0 -4px #2d0004;
}

.fallback-art > b::before,
.fallback-art > b::after {
  content: "";
  position: absolute;
  left: 5px;
  top: -13px;
  width: 20px;
  height: 22px;
  border-radius: 50%;
  background: #220004;
}

.fallback-art > b::after {
  left: -20px;
  top: -4px;
  width: 18px;
  height: 19px;
  background: #2d0004;
}

.fallback-art > span {
  position: absolute;
  z-index: 3;
  left: 9%;
  bottom: 24%;
  width: 58px;
  height: 76px;
  border-left: 2px solid rgba(246, 216, 158, .55);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.art-two { filter: hue-rotate(-9deg) saturate(.82); transform: scaleX(-1); }
.art-three { background: radial-gradient(circle at 28% 20%, #f9d89b 0 15%, transparent 15.5%), linear-gradient(150deg,#d14937,#8a0c15 58%,#420006); }
.art-four { filter: sepia(.18) brightness(1.05); }
.art-five { filter: hue-rotate(8deg) brightness(.88); transform: scaleX(-1); }

/* 06 影集 */
.scene-gallery .scene-heading { margin-top: 0; }

.gallery-grid {
  position: relative !important;
  width: 100%;
  height: min(58vh, 440px);
  margin-top: clamp(22px, 4vh, 38px);
}

.gallery-photo {
  position: absolute !important;
  overflow: hidden;
  margin: 0;
  border: 5px solid #f9e8c8;
  box-shadow: 0 12px 30px rgba(40, 0, 3, .24);
  background: #8a1017;
}

.photo-large { left: 0; top: 0; width: 66%; height: 84%; transform: rotate(-1.8deg); }
.photo-small-a { right: 0; top: 8%; width: 39%; height: 38%; transform: rotate(2deg); }
.photo-small-b { right: 2%; bottom: 3%; width: 43%; height: 40%; transform: rotate(-2.2deg); }

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 2px 0 0;
  font-size: 10px;
  letter-spacing: .18em;
}

.gallery-caption i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-300);
  font-style: normal;
  font-size: 16px;
}

/* 07 故事 */
.scene-story .scene-heading { margin-bottom: clamp(20px, 4vh, 34px); }

.story-list {
  position: relative !important;
  width: 100%;
  padding-left: 39px;
}

.story-list::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(var(--red-700), rgba(158, 17, 24, .12));
}

.story-item {
  position: relative;
  margin-bottom: clamp(13px, 2.6vh, 21px);
}

.story-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 5px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--red-700);
  background: var(--paper);
  transform: rotate(45deg);
}

.story-item time {
  display: block;
  color: var(--red-700);
  font-size: 9px;
  letter-spacing: .28em;
}

.story-item h3 {
  margin: 3px 0 3px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .08em;
}

.story-item p {
  margin: 0;
  color: rgba(94, 23, 22, .68);
  font-size: 11px;
  line-height: 1.6;
}

.story-ending {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--red-700);
  font-size: 10px;
  letter-spacing: .22em;
}

.story-ending i { width: 52px; height: 1px; background: rgba(158, 17, 24, .3); }

/* 08 宣言 */
.scene-promise {
  display: grid;
  place-items: center;
  text-align: center;
}

.double-happiness {
  position: absolute !important;
  z-index: 1 !important;
  top: 6%;
  left: 50%;
  color: rgba(249, 218, 159, .09);
  font-size: min(68vw, 285px);
  line-height: 1;
  transform: translateX(-50%);
}

.promise-card {
  width: 86%;
  padding: clamp(36px, 7vh, 58px) 24px;
  border: 1px solid rgba(248, 218, 158, .58);
  outline: 1px solid rgba(248, 218, 158, .18);
  outline-offset: 8px;
  background: rgba(77, 2, 8, .42);
  box-shadow: 0 20px 70px rgba(37, 0, 3, .24);
  backdrop-filter: blur(4px);
}

.promise-card small {
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .34em;
}

.promise-card h2 {
  margin: 25px 0 23px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(29px, 8vw, 38px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .12em;
  text-indent: .12em;
}

.promise-card p {
  margin: 0;
  font-size: 12px;
  line-height: 2.1;
  letter-spacing: .08em;
  opacity: .86;
}

.promise-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 28px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
}

.promise-names i { font-family: Georgia, serif; font-size: 14px; }

.promise-orbit {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(246, 216, 158, .18);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a { width: 390px; height: 190px; left: -160px; bottom: -50px; transform: rotate(20deg); }
.orbit-b { width: 330px; height: 150px; right: -150px; top: 35px; transform: rotate(-26deg); }

/* 09 日程 */
.scene-schedule .scene-heading { margin-bottom: clamp(27px, 5vh, 43px); }

.schedule-list {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.schedule-item {
  display: grid;
  grid-template-columns: 62px 25px 1fr;
  align-items: center;
  min-height: 74px;
}

.schedule-item time {
  color: var(--red-700);
  font-family: Georgia, serif;
  font-size: 18px;
}

.schedule-item > i {
  position: relative;
  width: 1px;
  height: 100%;
  justify-self: center;
  background: rgba(158, 17, 24, .25);
}

.schedule-item > i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid var(--red-700);
  background: var(--paper);
  transform: translate(-50%, -50%) rotate(45deg);
}

.schedule-item div { padding-left: 10px; }
.schedule-item b { display: block; margin-bottom: 5px; font-family: "STKaiti", "KaiTi", serif; font-size: 18px; font-weight: 500; }
.schedule-item span { color: rgba(94, 23, 22, .62); font-size: 10px; letter-spacing: .06em; }

.dress-note {
  width: 100%;
  max-width: 310px;
  margin: clamp(25px, 5vh, 42px) auto 0;
  padding: 15px;
  border-top: 1px solid rgba(158, 17, 24, .22);
  border-bottom: 1px solid rgba(158, 17, 24, .22);
  text-align: center;
}

.dress-note > span { color: var(--red-700); font-size: 10px; letter-spacing: .22em; }
.dress-note > div { display: flex; justify-content: center; gap: 9px; margin: 10px 0 7px; }
.dress-note p { margin: 0; color: rgba(94, 23, 22, .62); font-size: 9px; }
.swatch { width: 16px; height: 16px; border: 1px solid rgba(74, 10, 12, .15); border-radius: 50%; }
.swatch.wine { background: #7e0710; }
.swatch.cream { background: #f6ead2; }
.swatch.gold { background: #c99c4d; }

/* 10 祝福 */
.scene-blessing .scene-heading { margin-bottom: clamp(20px, 4vh, 32px); }

.blessing-form {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  padding: clamp(18px, 3.5vh, 27px) 20px 15px;
  border: 1px solid rgba(248, 218, 158, .5);
  background: rgba(74, 0, 6, .34);
  box-shadow: 0 18px 46px rgba(43, 0, 3, .22);
  backdrop-filter: blur(5px);
}

.blessing-form label {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: start;
  gap: 10px;
  margin-bottom: 13px;
}

.blessing-form label > span {
  padding-top: 9px;
  font-size: 10px;
  letter-spacing: .08em;
  opacity: .82;
}

.blessing-form input,
.blessing-form select,
.blessing-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(248, 218, 158, .34);
  border-radius: 0;
  padding: 8px 3px;
  color: var(--gold-100);
  background: transparent;
  font-size: 12px;
  resize: none;
  appearance: none;
}

.blessing-form select option { color: #3d0004; background: var(--paper); }
.blessing-form input::placeholder,
.blessing-form textarea::placeholder { color: rgba(255, 236, 196, .42); }

.gold-button,
.outline-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-300);
  border-radius: 0;
  color: var(--red-900);
  background: linear-gradient(100deg, var(--gold-400), var(--gold-100), var(--gold-400));
  box-shadow: 0 8px 20px rgba(37, 0, 3, .16);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-decoration: none;
  cursor: pointer;
}

.form-tip {
  margin: 10px 0 0;
  font-size: 8px;
  text-align: center;
  opacity: .56;
}

.receipt-card {
  position: absolute !important;
  z-index: 10 !important;
  left: 50%;
  top: 50%;
  width: calc(100% - 62px);
  padding: 24px 20px;
  border: 1px solid var(--gold-300);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(22, 0, 2, .42);
  transform: translate(-50%, -50%);
}

.receipt-card[hidden] { display: none; }
.receipt-card p { margin: 0 0 18px; font-size: 12px; line-height: 1.9; white-space: pre-line; }
.receipt-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.receipt-card button { min-height: 38px; border: 1px solid var(--red-700); color: var(--paper); background: var(--red-700); font-size: 10px; cursor: pointer; }
.receipt-card button + button { color: var(--red-700); background: transparent; }

/* 11 地址 */
.scene-location .scene-heading { margin-bottom: clamp(22px, 4vh, 34px); }

.map-card {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  border: 1px solid rgba(123, 22, 22, .25);
  background: rgba(255, 250, 238, .48);
  box-shadow: 0 14px 34px rgba(92, 38, 22, .1);
}

.map-art {
  position: relative !important;
  height: clamp(128px, 23vh, 180px);
  overflow: hidden;
  background:
    linear-gradient(28deg, transparent 42%, rgba(164, 108, 74, .14) 42.5% 44%, transparent 44.5%),
    linear-gradient(132deg, transparent 48%, rgba(164, 108, 74, .13) 48.5% 50%, transparent 50.5%),
    repeating-linear-gradient(0deg, rgba(133, 78, 52, .05) 0 1px, transparent 1px 23px),
    repeating-linear-gradient(90deg, rgba(133, 78, 52, .05) 0 1px, transparent 1px 26px),
    #ead9b9;
}

.road { position: absolute; height: 7px; border-top: 2px solid rgba(133, 77, 51, .18); border-bottom: 1px dashed rgba(133, 77, 51, .16); transform-origin: left center; }
.road-a { width: 130%; left: -10%; top: 35%; transform: rotate(12deg); }
.road-b { width: 105%; left: 8%; top: 72%; transform: rotate(-21deg); }
.road-c { width: 80%; left: 53%; top: -10%; transform: rotate(73deg); }

.map-pin {
  position: absolute;
  left: 52%;
  top: 45%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 0;
  color: var(--gold-100);
  background: var(--red-700);
  box-shadow: 0 7px 14px rgba(78, 5, 8, .24);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.map-pin b { font-size: 15px; transform: rotate(45deg); }

.venue-copy { padding: 15px 17px 17px; }
.venue-copy small { color: var(--red-700); font-size: 9px; letter-spacing: .2em; }
.venue-copy h3 { margin: 5px 0 6px; font-family: "STKaiti", "KaiTi", serif; font-size: 18px; font-weight: 600; }
.venue-copy p { margin: 0; color: rgba(94, 23, 22, .64); font-size: 10px; }

.location-actions {
  width: 100%;
  max-width: 330px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px auto 0;
}

.location-actions .gold-button,
.location-actions .outline-button { min-height: 39px; font-size: 9px; }

.outline-button {
  color: var(--red-700);
  border-color: rgba(126, 7, 16, .5);
  background: transparent;
  box-shadow: none;
}

.final-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: clamp(22px, 4vh, 34px);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.final-names i {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--red-700);
  font-style: normal;
}

.final-thanks { margin: 10px 0 0; color: rgba(94, 23, 22, .66); font-size: 9px; text-align: center; letter-spacing: .16em; }

.restart-button {
  display: block;
  margin: clamp(17px, 3vh, 26px) auto 0;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(126, 7, 16, .36);
  color: var(--red-700);
  background: transparent;
  font-size: 9px;
  letter-spacing: .18em;
  cursor: pointer;
}

/* 浅色页面中的固定控件 */
.invitation.light-page .round-control {
  color: var(--red-700);
  border-color: rgba(126, 7, 16, .3);
  background: rgba(249, 239, 219, .7);
}

.invitation.light-page .sound-wave {
  border-color: var(--red-700);
}

.invitation.light-page .page-progress {
  color: rgba(126, 7, 16, .72);
  text-shadow: none;
}

.invitation.light-page .page-dots button {
  border-color: rgba(126, 7, 16, .64);
}

.invitation.light-page .page-dots button.active {
  background: var(--red-700);
}

.invitation.light-page .next-page span {
  border-color: rgba(126, 7, 16, .72);
}

/* 较矮屏幕适配 */
@media (max-height: 700px) {
  .scene { padding-top: max(52px, env(safe-area-inset-top)); padding-bottom: max(48px, env(safe-area-inset-bottom)); }
  .cover-emblem { width: min(43vw, 170px); height: min(43vw, 170px); margin-top: 18px; }
  .cover-emblem > span { font-size: clamp(68px, 19vw, 84px); }
  .cover-motto { margin-top: 9px; }
  .couple-names { margin-top: 12px; }
  .date-medallion { margin-top: 12px; }
  .quote-stage { width: min(62vw, 242px); height: min(59vw, 230px); margin-top: 20px; }
  .red-thread { margin-top: 20px; }
  .letter-frame { padding-top: 21px; }
  .letter-frame h2 { margin-bottom: 14px; }
  .letter-copy { line-height: 1.75; }
  .portrait-frame { height: min(45vh, 315px); }
  .vow-copy { bottom: 56px; padding: 13px 14px; }
  .vow-copy p { line-height: 1.65; }
  .gallery-grid { height: min(53vh, 360px); margin-top: 20px; }
  .scene-story .scene-heading { margin-bottom: 16px; }
  .story-item { margin-bottom: 10px; }
  .promise-card { padding-top: 34px; padding-bottom: 34px; }
  .promise-card h2 { margin: 18px 0 15px; }
  .promise-card p { line-height: 1.8; }
  .promise-names { margin-top: 18px; }
  .scene-schedule .scene-heading { margin-bottom: 17px; }
  .schedule-item { min-height: 61px; }
  .dress-note { margin-top: 18px; padding: 10px; }
  .scene-blessing .scene-heading { margin-bottom: 14px; }
  .blessing-form { padding-top: 14px; }
  .blessing-form label { margin-bottom: 8px; }
  .scene-location .scene-heading { margin-bottom: 15px; }
  .map-art { height: 120px; }
  .venue-copy { padding: 10px 14px 12px; }
  .final-names { margin-top: 15px; }
  .restart-button { margin-top: 13px; }
}

@media (min-width: 740px) {
  .desktop-backdrop { display: flex; }
  .invitation {
    height: min(92vh, 860px);
    margin-top: 4vh;
    border: 1px solid rgba(250, 220, 160, .24);
    border-radius: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
