:root {
  --red-950: #68101c;
  --red-900: #8e1023;
  --red-800: #a9132a;
  --red-700: #c2243b;
  --coral: #e9666e;
  --blush: #f7d7d8;
  --rose-mist: #fff4f2;
  --paper: #fffbf7;
  --white: #ffffff;
  --ink: #351f22;
  --muted: #755f61;
  --gold: #d5aa66;
  --green: #31594b;
  --shadow: 0 20px 52px rgba(86, 24, 34, 0.15);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --latin: "Baskerville", "Times New Roman", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, rgba(233, 102, 110, 0.08), transparent 22rem),
    var(--paper);
  font-family: var(--serif);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(213, 170, 102, 0.78);
  outline-offset: 4px;
}

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.loading-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: var(--paper);
  text-align: center;
  background: var(--red-900);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-screen p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.loading-seal {
  display: grid;
  width: 64px;
  height: 64px;
  margin: auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 31px;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

.cover {
  position: fixed;
  z-index: 100;
  inset: 0;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--red-950);
  transition: opacity 800ms ease, visibility 800ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cover.is-open {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6%);
}

.cover-photo,
.cover-shade,
.cover-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-photo {
  object-fit: cover;
  object-position: 50% 36%;
  filter: saturate(0.94);
  transform: scale(1.015);
  animation: coverDrift 12s ease-in-out infinite alternate;
}

.cover-shade {
  background:
    linear-gradient(to bottom, rgba(19, 8, 10, 0.16), rgba(77, 8, 21, 0.04) 42%, rgba(68, 8, 18, 0.84) 100%),
    linear-gradient(to right, rgba(67, 7, 17, 0.25), transparent 42%, rgba(67, 7, 17, 0.12));
}

.cover-pattern {
  opacity: 0.24;
  background-image:
    linear-gradient(45deg, transparent 47%, rgba(255,255,255,0.35) 48%, rgba(255,255,255,0.35) 52%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(255,255,255,0.35) 48%, rgba(255,255,255,0.35) 52%, transparent 53%);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 34%);
}

.cover-content {
  position: absolute;
  z-index: 2;
  inset: auto 24px max(54px, env(safe-area-inset-bottom)) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-shadow: 0 3px 24px rgba(54, 5, 14, 0.48);
}

.cover-kicker,
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.double-happiness {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 7px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 26px;
  line-height: 1;
}

.cover h1 {
  margin: 0;
  font-size: clamp(35px, 10vw, 52px);
  font-weight: 500;
  line-height: 1.25;
}

.cover-names {
  margin: 10px 0 0;
  font-size: clamp(23px, 7vw, 34px);
  font-weight: 600;
}

.cover-names span {
  padding: 0 10px;
  color: #f6cd99;
  font-family: var(--latin);
  font-style: italic;
  font-weight: 500;
}

.cover-date {
  margin: 8px 0 22px;
  font-family: var(--latin);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.open-invitation {
  display: inline-flex;
  min-width: 168px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  color: var(--red-950);
  background: rgba(255, 251, 247, 0.94);
  box-shadow: 0 12px 30px rgba(50, 5, 12, 0.25);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 200ms ease, color 200ms ease;
}

.open-invitation:hover {
  color: var(--red-800);
  background: var(--white);
}

.open-invitation svg {
  width: 18px;
  height: 18px;
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  right: 17px;
  bottom: 30px;
  width: 1px;
  height: 76px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.scroll-hint span {
  display: block;
  width: 100%;
  height: 28px;
  background: var(--white);
  animation: scrollLine 2.1s ease-in-out infinite;
}

main {
  overflow: hidden;
}

.section-shell {
  width: min(100% - 40px, 760px);
  margin-inline: auto;
}

.intro {
  padding-block: 92px 86px;
  text-align: center;
}

.eyebrow {
  color: var(--red-700);
}

.eyebrow.light {
  color: #f6cd99;
}

h2 {
  margin: 0;
  color: var(--red-900);
  font-size: clamp(27px, 7vw, 40px);
  font-weight: 600;
  line-height: 1.38;
}

.title-flourish {
  display: flex;
  width: 170px;
  margin: 20px auto 24px;
  align-items: center;
  gap: 12px;
  color: var(--red-700);
}

.title-flourish span {
  height: 1px;
  flex: 1;
  background: currentColor;
  opacity: 0.44;
}

.title-flourish b {
  font-size: 19px;
}

.lead-copy,
.story-copy > p,
.blessing-section > p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 2.1;
}

.couple-line {
  display: grid;
  grid-template-columns: 1fr 46px 1fr;
  max-width: 390px;
  margin: 42px auto 0;
  align-items: center;
}

.couple-line div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.couple-line small {
  color: var(--muted);
  font-size: 12px;
}

.couple-line strong {
  color: var(--red-900);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 600;
}

.heart-mark {
  color: var(--coral);
}

.heart-mark svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke-width: 1.4;
}

.portrait-break {
  position: relative;
  width: min(100% - 24px, 920px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}

.portrait-break::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(28, 11, 14, 0.82), transparent 44%);
}

.portrait-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}

.portrait-caption {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 28px;
  left: 24px;
  color: var(--white);
  text-align: center;
}

.portrait-caption p {
  margin: 0 0 7px;
  font-family: var(--latin);
  font-size: clamp(21px, 6vw, 31px);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.portrait-caption span {
  font-size: 13px;
  line-height: 1.7;
}

.date-section {
  padding-block: 96px 92px;
  text-align: center;
}

.date-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  max-width: 390px;
  margin: 34px auto 20px;
  align-items: center;
  color: var(--red-900);
}

.date-display span {
  font-family: var(--latin);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.date-display strong {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(142, 16, 35, 0.35);
  border-radius: 50%;
  font-family: var(--latin);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.date-chinese {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.lunar-date {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 500px;
  margin: 34px auto 0;
  padding: 20px 6px;
  border-top: 1px solid rgba(142, 16, 35, 0.18);
  border-bottom: 1px solid rgba(142, 16, 35, 0.18);
}

.countdown div {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.countdown div:not(:last-child)::after {
  position: absolute;
  top: 8px;
  right: 0;
  width: 1px;
  height: 36px;
  content: "";
  background: rgba(142, 16, 35, 0.16);
}

.countdown strong {
  color: var(--red-900);
  font-family: var(--latin);
  font-size: 30px;
  font-weight: 600;
}

.countdown span {
  color: var(--muted);
  font-size: 11px;
}

.countdown-status {
  min-height: 1.6em;
  margin: 15px 0 0;
  color: var(--red-700);
  font-size: 13px;
}

.story-section {
  padding-bottom: 90px;
}

.story-photo-wrap {
  position: relative;
  width: min(100% - 24px, 920px);
  margin-inline: auto;
  aspect-ratio: 5 / 4;
}

.story-photo-wrap::before {
  position: absolute;
  z-index: -1;
  inset: 18px -12px -18px 20px;
  content: "";
  border: 1px solid rgba(169, 19, 42, 0.35);
}

.story-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 50%;
}

.photo-stamp {
  position: absolute;
  right: -4px;
  bottom: -24px;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--red-800);
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(142, 16, 35, 0.24);
  transform: rotate(8deg);
}

.story-copy {
  padding-top: 62px;
}

.story-copy h2 {
  margin-bottom: 22px;
}

.story-copy > p {
  margin-inline: 0;
}

.story-signature {
  margin-top: 20px !important;
  color: var(--red-800) !important;
  font-family: var(--latin);
  font-size: 19px !important;
  font-style: italic;
  font-weight: 600;
}

.details-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--red-900);
}

.details-section::before,
.details-section::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.details-section::before {
  top: -100px;
  right: -90px;
  width: 230px;
  height: 230px;
}

.details-section::after {
  bottom: -140px;
  left: -100px;
  width: 280px;
  height: 280px;
}

.details-inner {
  position: relative;
  z-index: 1;
  padding-block: 86px;
}

.details-inner h2 {
  color: var(--white);
}

.details-list {
  display: grid;
  margin-top: 38px;
  gap: 8px;
}

.details-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  min-height: 106px;
  padding: 21px 18px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.detail-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  color: #f6cd99;
}

.detail-icon svg {
  width: 22px;
  height: 22px;
}

.details-list article div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.details-list small {
  color: #f6cd99;
  font-family: var(--latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.details-list strong {
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.details-list article div > span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
  gap: 10px;
}

.light-button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  transition: background-color 200ms ease;
}

.light-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.light-button svg {
  width: 18px;
  height: 18px;
}

.gallery-section {
  padding-block: 94px 100px;
  text-align: center;
}

.gallery-section h2 {
  margin-bottom: 34px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
}

.gallery-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  padding: 0;
  background: #eadfda;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(4) {
  grid-row: span 2;
  aspect-ratio: 3 / 4;
}

.gallery-item:not(:nth-child(1)):not(:nth-child(4)) {
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 250ms ease;
}

.gallery-item:nth-child(1) img {
  object-position: 64% 50%;
}

.gallery-item:nth-child(4) img {
  object-position: 50% 60%;
}

.gallery-item:hover img {
  filter: brightness(0.91);
}

.gallery-item::after {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: var(--white);
  background: rgba(50, 20, 25, 0.25);
  content: "+";
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 21px;
  text-align: center;
}

.gallery-tip {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.celebration-strip {
  position: relative;
  height: min(78svh, 780px);
  min-height: 530px;
  overflow: hidden;
  color: var(--white);
  background: var(--red-950);
}

.celebration-strip::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(67, 7, 17, 0.86), transparent 56%);
}

.celebration-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.celebration-copy {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 44px;
  left: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.celebration-copy span {
  font-size: 64px;
  line-height: 1;
}

.celebration-copy p {
  margin: 9px 0 0;
  font-size: 17px;
}

.blessing-section {
  padding-block: 94px 96px;
  text-align: center;
}

.blessing-section h2 {
  margin-bottom: 24px;
}

.signature {
  margin-top: 25px !important;
  color: var(--red-800) !important;
  font-weight: 600;
}

.like-panel {
  position: relative;
  margin-top: 48px;
  padding: 34px 20px 28px;
  border-top: 1px solid rgba(142, 16, 35, 0.18);
  border-bottom: 1px solid rgba(142, 16, 35, 0.18);
}

.like-button {
  display: inline-flex;
  min-height: 52px;
  padding: 0 24px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  color: var(--white);
  background: var(--red-800);
  box-shadow: 0 12px 26px rgba(169, 19, 42, 0.22);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 200ms ease, transform 200ms ease;
}

.like-button:hover {
  background: var(--red-700);
}

.like-button:active {
  transform: translateY(1px);
}

.like-button[disabled] {
  cursor: default;
  background: var(--green);
  opacity: 0.86;
}

.like-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.like-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.like-panel strong {
  color: var(--red-800);
  font-family: var(--latin);
  font-size: 22px;
}

.floating-heart {
  position: fixed;
  z-index: 700;
  width: 22px;
  height: 22px;
  pointer-events: none;
  color: var(--coral);
  animation: heartRise 1.1s ease-out forwards;
}

.floating-heart svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

footer {
  padding: 46px 20px max(54px, env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.76);
  background: var(--red-950);
  text-align: center;
}

.footer-seal {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: var(--white);
  font-size: 23px;
}

footer p {
  margin: 0;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

footer small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.music-button {
  position: fixed;
  z-index: 80;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  padding: 0;
  color: var(--white);
  background: rgba(92, 12, 25, 0.76);
  box-shadow: 0 8px 24px rgba(56, 7, 14, 0.25);
  backdrop-filter: blur(8px);
}

.music-disc {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.music-disc svg {
  width: 20px;
  height: 20px;
}

.music-button.is-playing .music-disc {
  animation: musicSpin 5s linear infinite;
}

.music-off-icon,
.music-button.is-muted .music-on-icon {
  display: none;
}

.music-button.is-muted .music-off-icon {
  display: block;
}

.lightbox {
  position: fixed;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 68px 18px 56px;
  color: var(--white);
  background: rgba(30, 9, 13, 0.96);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
}

.lightbox::backdrop {
  background: rgba(30, 9, 13, 0.6);
}

.lightbox img {
  grid-column: 2;
  width: 100%;
  max-height: calc(100svh - 145px);
  object-fit: contain;
}

.lightbox p {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-size: 13px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  border: 0;
  padding: 0;
  place-items: center;
  color: var(--white);
  background: transparent;
}

.lightbox-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: 42px;
  height: 42px;
}

.lightbox-close svg,
.lightbox-nav svg {
  width: 26px;
  height: 26px;
}

.lightbox-nav {
  width: 44px;
  height: 60px;
}

.lightbox-nav.previous {
  grid-column: 1;
}

.lightbox-nav.next {
  grid-column: 3;
}

.toast {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: calc(100% - 48px);
  padding: 11px 18px;
  border-radius: 3px;
  color: var(--white);
  background: rgba(53, 31, 34, 0.92);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 750ms ease, transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes loadingPulse {
  50% { transform: scale(1.08); opacity: 0.68; }
}

@keyframes coverDrift {
  to { transform: scale(1.055) translateY(-0.8%); }
}

@keyframes scrollLine {
  0% { transform: translateY(-34px); }
  60%, 100% { transform: translateY(82px); }
}

@keyframes musicSpin {
  to { transform: rotate(360deg); }
}

@keyframes heartRise {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.5) rotate(-8deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--heart-x)), -130px) scale(1.25) rotate(12deg); }
}

@media (min-width: 720px) {
  .cover-content {
    bottom: 8vh;
  }

  .portrait-break {
    aspect-ratio: 16 / 10;
  }

  .portrait-break img {
    object-position: 50% 42%;
  }

  .story-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    width: min(100% - 48px, 1120px);
    margin-inline: auto;
    align-items: center;
    gap: 56px;
  }

  .story-photo-wrap {
    width: 100%;
  }

  .story-copy {
    width: 100%;
    padding-top: 0;
  }

  .details-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .details-list article {
    grid-template-columns: 1fr;
    min-height: 215px;
  }

  .detail-actions {
    max-width: 420px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }

  .celebration-strip {
    width: min(100% - 48px, 1120px);
    height: 680px;
    margin-inline: auto;
  }

  .celebration-strip img {
    object-position: 50% 44%;
  }
}

@media (max-width: 360px) {
  .section-shell {
    width: min(100% - 28px, 760px);
  }

  .cover-content {
    right: 16px;
    left: 16px;
  }

  .countdown strong {
    font-size: 27px;
  }

  .details-list article {
    padding-inline: 14px;
  }

  .light-button {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 全屏翻页体验 */
html,
body {
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
}

body,
body.is-locked,
body.lightbox-open {
  overflow: hidden;
}

body.has-opened {
  background: var(--paper);
}

.page-stage {
  position: fixed;
  z-index: 1;
  inset: 0;
  height: 100svh;
  overflow: hidden;
  perspective: 1500px;
  background:
    radial-gradient(circle at 12% 12%, rgba(233, 102, 110, 0.1), transparent 20rem),
    var(--paper);
  touch-action: pan-y;
}

.invitation-page {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0;
  display: flex;
  width: 100% !important;
  height: 100svh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: max(64px, env(safe-area-inset-top)) !important;
  padding-right: max(20px, env(safe-area-inset-right)) !important;
  padding-bottom: max(86px, calc(env(safe-area-inset-bottom) + 74px)) !important;
  padding-left: max(20px, env(safe-area-inset-left)) !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: right center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  contain: layout paint;
}

.invitation-page::after {
  position: absolute;
  z-index: 30;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to left, rgba(50, 8, 16, 0.4), transparent 34%);
}

.invitation-page.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.invitation-page.is-page-in-next {
  z-index: 1;
  animation: pageInNext 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.invitation-page.is-page-in-previous {
  z-index: 3;
  transform-origin: left center;
  animation: pageInPrevious 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.invitation-page.is-page-out-next {
  z-index: 4;
  animation: pageOutNext 820ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

.invitation-page.is-page-out-next::after,
.invitation-page.is-page-out-previous::after {
  animation: pageShadow 820ms ease both;
}

.invitation-page.is-page-out-previous {
  z-index: 2;
  transform-origin: left center;
  animation: pageOutPrevious 820ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

.scene-item {
  opacity: 0;
  transform: translateY(18px);
}

.invitation-page.is-active .scene-item {
  animation: sceneRise 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(150ms + var(--scene-order, 0) * 62ms);
}

.invitation-page.is-active img.scene-item {
  animation-name: photoEntrance;
  animation-duration: 900ms;
}

.page-navigation {
  position: fixed;
  z-index: 70;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(15px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 44px auto 1fr 44px;
  height: 48px;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 350ms ease, visibility 350ms ease, transform 350ms ease;
}

.page-navigation.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.page-button {
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(142, 16, 35, 0.22);
  border-radius: 50%;
  padding: 0;
  place-items: center;
  color: var(--red-900);
  background: rgba(255, 251, 247, 0.9);
  box-shadow: 0 8px 22px rgba(86, 24, 34, 0.13);
  backdrop-filter: blur(10px);
  transition: color 200ms ease, background-color 200ms ease, opacity 200ms ease;
}

.page-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--red-800);
}

.page-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.page-button svg {
  width: 19px;
  height: 19px;
}

.page-progress {
  display: flex;
  min-width: 78px;
  align-items: center;
  gap: 7px;
  color: var(--red-900);
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 600;
}

.page-progress i {
  width: 25px;
  height: 1px;
  background: rgba(142, 16, 35, 0.35);
}

.page-dots {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.page-dots button {
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(142, 16, 35, 0.25);
  transition: width 240ms ease, border-radius 240ms ease, background-color 240ms ease;
}

.page-dots button.is-active {
  width: 22px;
  border-radius: 3px;
  background: var(--red-800);
}

.intro.invitation-page {
  padding-inline: max(27px, env(safe-area-inset-left)) !important;
  text-align: center;
}

.intro .lead-copy {
  max-width: 580px;
}

.intro .title-flourish {
  margin-block: 17px 20px;
}

.intro .couple-line {
  width: min(100%, 390px);
  margin-top: clamp(28px, 5vh, 42px);
}

.portrait-break.invitation-page {
  border-radius: 0;
  box-shadow: none;
  padding: 0 !important;
}

.portrait-break.invitation-page img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 43%;
}

.portrait-break.invitation-page::after {
  z-index: 1;
  opacity: 1;
  background: linear-gradient(to top, rgba(45, 9, 15, 0.88), transparent 55%);
}

.portrait-break .portrait-caption {
  z-index: 2;
  bottom: max(112px, calc(env(safe-area-inset-bottom) + 96px));
}

.date-section.invitation-page {
  text-align: center;
}

.date-section .date-display {
  width: min(100%, 390px);
  margin-block: clamp(20px, 4vh, 34px) 17px;
}

.date-section .countdown {
  width: min(100%, 500px);
  margin-top: clamp(22px, 4vh, 34px);
}

.story-section.invitation-page {
  display: grid;
  grid-template-rows: minmax(0, 52%) auto;
  width: 100% !important;
  gap: clamp(23px, 4vh, 42px);
  padding-inline: 12px !important;
}

.story-section .story-photo-wrap {
  width: min(100%, 720px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  aspect-ratio: auto;
}

.story-section .story-copy {
  width: min(100% - 28px, 720px);
  padding: 0;
}

.story-section .story-copy h2 {
  margin-bottom: 12px;
}

.story-section .story-copy > p {
  line-height: 1.9;
}

.story-section .story-signature {
  margin-top: 12px !important;
}

.details-section.invitation-page {
  align-items: stretch;
  color: var(--white);
  background: var(--red-900);
}

.details-section.invitation-page::before {
  right: 0;
  clip-path: inset(0 0 0 40%);
}

.details-section.invitation-page::after {
  left: 0;
  clip-path: inset(0 40% 0 0);
}

.details-section .details-inner {
  display: flex;
  width: min(100%, 920px);
  height: 100%;
  padding: 0;
  flex-direction: column;
  justify-content: center;
}

.details-section .details-list {
  grid-template-columns: 1fr;
  margin-top: clamp(20px, 3vh, 32px);
}

.details-section .details-list article {
  grid-template-columns: 42px 1fr;
  min-height: 0;
  padding: clamp(13px, 2vh, 20px) 16px;
}

.details-section .detail-icon {
  width: 42px;
  height: 42px;
}

.details-section .detail-actions {
  width: 100%;
  max-width: none;
  margin-top: 12px;
}

.gallery-section.invitation-page {
  justify-content: center;
  text-align: center;
}

.gallery-section h2 {
  margin-bottom: clamp(20px, 3vh, 28px);
}

.gallery-section .gallery-tip {
  margin-top: 13px;
}

.photo-deck {
  --gallery-drag: 0px;
  position: relative;
  width: min(78vw, 390px);
  height: min(49svh, 470px);
  min-height: 290px;
  touch-action: pan-y;
  perspective: 1200px;
  overflow: visible;
}

.photo-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 6px solid var(--white);
  border-radius: 4px;
  padding: 0;
  color: var(--white);
  background: #eadfda;
  box-shadow: 0 24px 50px rgba(73, 18, 28, 0.2);
  opacity: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms ease, filter 420ms ease;
  will-change: transform;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 5.5s ease;
}

.photo-card.is-selected img {
  transform: scale(1.045);
}

.photo-card[data-position="0"] {
  z-index: 6;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(var(--gallery-drag)) rotate(0deg) translateZ(45px);
}

.photo-card[data-position="-1"] {
  z-index: 4;
  opacity: 0.74;
  pointer-events: auto;
  filter: saturate(0.76) brightness(0.92);
  transform: translateX(calc(-22% + var(--gallery-drag) * 0.18)) rotate(-7deg) scale(0.88) translateZ(-15px);
}

.photo-card[data-position="1"] {
  z-index: 5;
  opacity: 0.8;
  pointer-events: auto;
  filter: saturate(0.8) brightness(0.94);
  transform: translateX(calc(22% + var(--gallery-drag) * 0.18)) rotate(7deg) scale(0.88) translateZ(-8px);
}

.photo-card[data-position="-2"],
.photo-card[data-position="2"] {
  z-index: 2;
  opacity: 0.22;
  transform: translateX(calc(var(--side, 1) * 31%)) scale(0.76) translateZ(-60px);
}

.photo-card[data-position="-2"] {
  --side: -1;
}

.photo-card[data-position="2"] {
  --side: 1;
}

.photo-number {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(55, 18, 24, 0.35);
  font-family: var(--latin);
  font-size: 11px;
  backdrop-filter: blur(6px);
}

.gallery-controls {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  width: min(78vw, 390px);
  margin-top: 15px;
  align-items: center;
  gap: 12px;
}

.gallery-control {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(142, 16, 35, 0.22);
  border-radius: 50%;
  padding: 0;
  place-items: center;
  color: var(--red-900);
  background: rgba(255, 255, 255, 0.74);
}

.gallery-control svg {
  width: 17px;
  height: 17px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.gallery-dots button {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(142, 16, 35, 0.24);
  transition: width 240ms ease, border-radius 240ms ease, background-color 240ms ease;
}

.gallery-dots button.is-active {
  width: 21px;
  border-radius: 4px;
  background: var(--red-800);
}

.photo-deck.is-shuffling .photo-card.is-selected {
  animation: photoShuffle 580ms cubic-bezier(0.22, 1, 0.36, 1);
}

.celebration-strip.invitation-page {
  width: 100% !important;
  max-width: none;
  padding: 0 !important;
  color: var(--white);
  background: var(--red-950);
}

.celebration-strip.invitation-page img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.celebration-strip.invitation-page::after {
  z-index: 1;
  opacity: 1;
  background: linear-gradient(to top, rgba(67, 7, 17, 0.88), transparent 58%);
}

.celebration-strip .celebration-copy {
  z-index: 2;
  bottom: max(110px, calc(env(safe-area-inset-bottom) + 94px));
}

.blessing-section.invitation-page {
  justify-content: center;
  text-align: center;
}

.blessing-section > p,
.blessing-section h2,
.blessing-section .like-panel {
  width: min(100%, 620px);
}

.blessing-section .like-panel {
  margin-top: clamp(25px, 4vh, 42px);
  padding-block: 25px 20px;
}

.blessing-section footer {
  width: min(100%, 620px);
  margin-top: clamp(18px, 3vh, 28px);
  border-radius: 4px;
  padding: 18px 16px;
  background: var(--red-950);
}

.blessing-section footer .footer-seal {
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  font-size: 17px;
}

.music-button {
  z-index: 82;
}

.effects-layer {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.falling-petal {
  position: absolute;
  top: -26px;
  left: var(--petal-left);
  width: var(--petal-size);
  height: calc(var(--petal-size) * 0.72);
  border-radius: 70% 18% 70% 18%;
  background: rgba(235, 112, 125, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: petalFall var(--petal-duration) linear var(--petal-delay) infinite;
}

.touch-ripple {
  position: fixed;
  z-index: 65;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(194, 36, 59, 0.52);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: rippleBloom 680ms ease-out forwards;
}

.page-sparkle {
  position: fixed;
  z-index: 66;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  background: #f4c97f;
  box-shadow: 0 0 12px rgba(244, 201, 127, 0.82);
  animation: sparkleDrift 850ms ease-out forwards;
}

@keyframes pageOutNext {
  0% { opacity: 1; transform: rotateY(0deg) translateX(0); filter: brightness(1); }
  55% { opacity: 0.94; transform: rotateY(-38deg) translateX(-8%); filter: brightness(0.8); }
  100% { opacity: 0; transform: rotateY(-88deg) translateX(-42%); filter: brightness(0.58); }
}

@keyframes pageInNext {
  0% { opacity: 0.45; transform: translateX(5%) scale(0.97); filter: brightness(0.76); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: brightness(1); }
}

@keyframes pageOutPrevious {
  0% { opacity: 1; transform: translateX(0) scale(1); filter: brightness(1); }
  100% { opacity: 0.45; transform: translateX(5%) scale(0.97); filter: brightness(0.76); }
}

@keyframes pageInPrevious {
  0% { opacity: 0; transform: rotateY(88deg) translateX(42%); filter: brightness(0.58); }
  45% { opacity: 0.94; transform: rotateY(38deg) translateX(8%); filter: brightness(0.8); }
  100% { opacity: 1; transform: rotateY(0deg) translateX(0); filter: brightness(1); }
}

@keyframes pageShadow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes sceneRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes photoEntrance {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: scale(1.08); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: scale(1); }
}

@keyframes photoShuffle {
  0% { filter: brightness(0.88); }
  45% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -25px, 0) rotate(0deg); }
  9% { opacity: 0.7; }
  90% { opacity: 0.45; }
  100% { opacity: 0; transform: translate3d(var(--petal-drift), calc(100svh + 38px), 0) rotate(560deg); }
}

@keyframes rippleBloom {
  from { opacity: 0.75; transform: translate(-50%, -50%) scale(0.35); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(6.5); }
}

@keyframes sparkleDrift {
  from { opacity: 1; transform: translate(0, 0) scale(0.7); }
  to { opacity: 0; transform: translate(var(--sparkle-x), -45px) scale(0); }
}

@media (min-width: 720px) {
  .page-navigation {
    right: 24px;
    left: 24px;
    grid-template-columns: 48px auto 1fr 48px;
  }

  .story-section.invitation-page {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    grid-template-rows: 1fr;
    padding-inline: 48px !important;
  }

  .story-section .story-photo-wrap {
    width: 100%;
    height: min(64svh, 640px);
  }

  .details-section .details-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .details-section .details-list article {
    grid-template-columns: 1fr;
    min-height: 195px;
  }

  .details-section .detail-actions {
    width: 420px;
  }

  .photo-deck {
    width: min(54vw, 580px);
    height: min(58svh, 600px);
  }

  .gallery-controls {
    width: min(54vw, 580px);
  }

  .portrait-break.invitation-page img,
  .celebration-strip.invitation-page img {
    object-position: 50% 44%;
  }
}

@media (max-height: 740px) {
  .invitation-page {
    padding-top: max(52px, env(safe-area-inset-top)) !important;
    padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px)) !important;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 11px;
  }

  h2 {
    font-size: clamp(24px, 6vw, 34px);
  }

  .lead-copy,
  .story-copy > p,
  .blessing-section > p {
    font-size: 13px;
    line-height: 1.85;
  }

  .date-display strong {
    width: 78px;
    height: 78px;
    font-size: 48px;
  }

  .countdown {
    padding-block: 13px;
  }

  .countdown strong {
    font-size: 25px;
  }

  .details-section .details-list {
    gap: 6px;
    margin-top: 14px;
  }

  .details-section .details-list article {
    padding-block: 10px;
  }

  .details-section .detail-icon {
    width: 38px;
    height: 38px;
  }

  .photo-deck {
    height: min(44svh, 360px);
    min-height: 255px;
  }

  .blessing-section .like-panel {
    margin-top: 18px;
    padding-block: 18px 14px;
  }

  .blessing-section footer {
    margin-top: 13px;
    padding-block: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .falling-petal,
  .page-sparkle,
  .touch-ripple {
    display: none;
  }

  .photo-card,
  .invitation-page {
    transition: none !important;
  }
}
