:root {
  --red: #8e1f2c;
  --red-deep: #6f1621;
  --cream: #f8f0e4;
  --paper: #fffaf2;
  --green: #24483d;
  --green-soft: #3f6659;
  --ink: #2f2926;
  --gold: #c79b58;
  --muted: #85756c;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #e6e4e1;
}

body {
  margin: 0 auto;
  min-width: 320px;
  max-width: 520px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
  box-shadow: 0 0 40px rgba(54, 39, 30, .12);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.snap-page {
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.invitation-sealed main {
  overflow-y: hidden;
}

.invitation-sealed .page-dots {
  visibility: hidden;
}

.invitation-sealed .hero__photo {
  transform: scale(1.045);
}

.invitation-sealed .hero__content {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

.invitation-sealed .hero__top {
  opacity: 0;
}

.invitation-opening .hero__photo {
  transform: scale(1);
  transition: transform 1.6s cubic-bezier(.22, .61, .36, 1);
}

.invitation-opening .hero__content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity .85s .45s ease, transform 1.05s .45s cubic-bezier(.22, .61, .36, 1);
}

.invitation-opening .hero__top {
  opacity: 1;
  transition: opacity .8s .5s ease;
}

.envelope[hidden] {
  display: none;
}

.envelope {
  --envelope-paper: repeating-linear-gradient(0deg, rgba(255, 238, 202, .012) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(255, 238, 202, .008) 0 1px, transparent 1px 5px);
  --envelope-ease: cubic-bezier(.32, 0, .16, 1);
  position: fixed;
  z-index: 100;
  top: 0;
  left: 50%;
  width: min(100%, 520px);
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: #ead1a0;
  transform: translateX(-50%);
  isolation: isolate;
  touch-action: none;
  outline: none;
}

.envelope::before {
  position: absolute;
  z-index: 5;
  top: max(36px, env(safe-area-inset-top));
  left: 50%;
  width: 110px;
  height: 18px;
  border-top: 1px solid rgba(239, 211, 160, .7);
  border-bottom: 1px solid rgba(239, 211, 160, .35);
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .22), transparent);
  pointer-events: none;
  content: "";
  transform: translateX(-50%);
}

.envelope::after {
  position: absolute;
  z-index: 4;
  inset: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  border: 1px solid rgba(226, 193, 131, .4);
  outline: 1px solid rgba(226, 193, 131, .15);
  outline-offset: -7px;
  pointer-events: none;
  content: "";
}

.envelope__panel,
.envelope__flap {
  position: absolute;
  inset: 0;
  background-image: var(--envelope-paper);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.envelope__panel--left {
  z-index: 1;
  background-color: #681423;
  background-image:
    linear-gradient(145deg, rgba(255, 232, 189, .04), transparent 40%),
    var(--envelope-paper);
  clip-path: polygon(0 0, 51% 54%, 0 100%);
  transform-origin: left bottom;
}

.envelope__panel--right {
  z-index: 1;
  background-color: #781929;
  background-image:
    linear-gradient(215deg, rgba(255, 232, 189, .04), transparent 40%),
    var(--envelope-paper);
  clip-path: polygon(100% 0, 49% 54%, 100% 100%);
  transform-origin: right bottom;
}

.envelope__panel--bottom {
  z-index: 2;
  background-color: #831d2e;
  background-image:
    linear-gradient(0deg, rgba(36, 72, 61, .2), transparent 42%),
    var(--envelope-paper);
  clip-path: polygon(0 100%, 0 99%, 50% 53%, 100% 99%, 100% 100%);
}

.envelope__flap {
  z-index: 3;
  bottom: auto;
  height: 54%;
  background-color: #8d1d30;
  background-image:
    linear-gradient(155deg, rgba(255, 235, 202, .06), transparent 46%, rgba(36, 72, 61, .14)),
    var(--envelope-paper);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  transform-origin: center top;
}

.envelope__flap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 235, 202, .045), transparent 50%, rgba(45, 3, 13, .16));
  pointer-events: none;
  content: "";
}

.envelope__heading {
  position: absolute;
  z-index: 4;
  top: 10.8%;
  right: 28px;
  left: 28px;
  text-align: center;
  will-change: transform, opacity;
}

.envelope__heading::before,
.envelope__heading::after {
  position: absolute;
  top: 46%;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .72));
  content: "";
}

.envelope__heading::before { left: 7%; }
.envelope__heading::after {
  right: 7%;
  transform: rotate(180deg);
}

.envelope__eyebrow {
  margin: 0 0 24px;
  color: #cfaa72;
  font: 11px/1.4 Georgia, serif;
}

.envelope__heading h2 {
  margin: 0 0 18px;
  color: #edd3a0;
  font: 500 58px/1.25 var(--serif);
  background: linear-gradient(120deg, #bb8f50, #f7dfab 42%, #d7af70 66%, #f3d49a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(67, 8, 18, .34));
}

.envelope__names {
  margin: 0 0 12px;
  font: 500 26px/1.4 var(--serif);
}

.envelope__names span {
  padding: 0 8px;
  color: #c79b58;
  font-style: italic;
  font-size: 18px;
}

.envelope__heading time {
  display: block;
  color: #d4b17c;
  font: 600 17px/1.6 Georgia, serif;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(66, 8, 18, .34);
}

.envelope__dedication {
  position: absolute;
  right: 24px;
  bottom: max(11%, env(safe-area-inset-bottom));
  left: 24px;
  text-align: center;
  font: 15px/1.8 var(--serif);
}

.envelope__dedication p {
  margin: 0 0 12px;
}

.envelope__dedication::before {
  display: block;
  width: 58px;
  height: 1px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .72), transparent);
  content: "";
}

.envelope__dedication span {
  display: inline-flex;
  padding: 0;
  border: 0;
  align-items: center;
  color: #e4c184;
  background: transparent;
  font: 13px/1.5 var(--serif);
  letter-spacing: 3px;
}

.envelope__dedication span::before,
.envelope__dedication span::after {
  width: 26px;
  height: 1px;
  margin: 0 12px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .6));
  content: "";
}

.envelope__dedication span::after {
  background: linear-gradient(90deg, rgba(239, 211, 160, .6), transparent);
}

.envelope__seal {
  position: absolute;
  z-index: 5;
  top: 54%;
  left: 50%;
  display: flex;
  width: 112px;
  height: 112px;
  padding: 0;
  border: 1px solid #f3dba3;
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #765021;
  background: conic-gradient(from 35deg, #f0d398, #ad7c32, #e4bd72, #fff1c2, #c59748, #f0d398);
  box-shadow: 0 8px 22px rgba(35, 3, 12, .32), 0 2px 5px rgba(35, 3, 12, .3), inset 0 0 0 3px rgba(255, 232, 170, .38);
  cursor: pointer;
  transform: translate3d(-50%, -50%, 0);
  transition: box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  will-change: transform, opacity;
}

.envelope__seal::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(119, 80, 26, .46);
  border-radius: 50%;
  content: "";
}

.envelope__seal::after {
  position: absolute;
  inset: -20%;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 251, 223, .6) 49%, transparent 60%);
  pointer-events: none;
  transform: translate3d(-100%, 0, 0);
  animation: seal-glint 1.8s .4s ease-in-out both;
  content: "";
}

.envelope__seal-face {
  position: absolute;
  inset: 9px;
  display: flex;
  border: 1px solid rgba(118, 79, 25, .5);
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d0a45e, #f1d89f 34%, #d7af67 65%, #b7863c);
  box-shadow: inset 0 1px 2px rgba(110, 72, 19, .3), inset 0 -1px 1px rgba(255, 237, 185, .8);
}

.envelope__seal-face::before,
.envelope__seal-face::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(107, 70, 20, .55);
  content: "";
  transform: rotate(45deg);
}

.envelope__seal-face::before { top: 8px; }
.envelope__seal-face::after { bottom: 8px; }

.envelope__seal:hover {
  box-shadow: 0 10px 26px rgba(35, 3, 12, .4), 0 2px 5px rgba(35, 3, 12, .3), inset 0 0 0 3px rgba(255, 232, 170, .6);
}

.envelope__seal:focus-visible {
  outline: 2px solid #e6c587;
  outline-offset: 6px;
}

.envelope__seal-character {
  font: 500 44px/1.15 var(--serif);
  text-shadow: 0 1px 0 #ffe7a8, 0 -1px 0 rgba(110, 72, 19, .2);
}

.envelope__seal-caption {
  margin-top: 4px;
  font: 9px/1.4 Georgia, serif;
}

.envelope.is-opening::after {
  animation: envelope-border .45s ease both;
}

.envelope.is-opening::before {
  animation: envelope-heading .45s ease both;
}

.envelope.is-opening .envelope__seal {
  animation: envelope-unseal .48s cubic-bezier(.22, .61, .36, 1) both;
}

.envelope.is-opening .envelope__heading {
  animation: envelope-heading .5s .08s ease both;
}

.envelope.is-opening .envelope__flap {
  animation: envelope-flap 1.18s .18s var(--envelope-ease) both;
}

.envelope.is-opening .envelope__panel--left {
  animation: envelope-left 1.2s .26s var(--envelope-ease) both;
}

.envelope.is-opening .envelope__panel--right {
  animation: envelope-right 1.24s .3s var(--envelope-ease) both;
}

.envelope.is-opening .envelope__panel--bottom {
  animation: envelope-bottom 1.26s .34s var(--envelope-ease) both;
}

@keyframes seal-glint {
  to { transform: translate3d(100%, 0, 0); }
}

@keyframes envelope-border {
  to { opacity: 0; }
}

@keyframes envelope-unseal {
  24% { opacity: 1; transform: translate3d(-50%, -50%, 0) rotate(-5deg) scale(.96); }
  100% { opacity: 0; transform: translate3d(-50%, -65%, 0) rotate(-16deg) scale(1.15); }
}

@keyframes envelope-heading {
  to { opacity: 0; transform: translate3d(0, -12px, 0); }
}

@keyframes envelope-flap {
  65% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -108%, 0) rotate(-2deg); }
}

@keyframes envelope-left {
  65% { opacity: 1; }
  to { opacity: 0; transform: translate3d(-108%, 0, 0) rotate(-7deg); }
}

@keyframes envelope-right {
  65% { opacity: 1; }
  to { opacity: 0; transform: translate3d(108%, 0, 0) rotate(7deg); }
}

@keyframes envelope-bottom {
  65% { opacity: 1; }
  to { opacity: 0; transform: translate3d(0, 105%, 0); }
}

@media (max-height: 600px) {
  .envelope__heading {
    top: 7.5%;
  }

  .envelope__eyebrow,
  .envelope__heading h2 {
    margin-bottom: 12px;
  }

  .envelope__heading h2 {
    font-size: 36px;
  }

  .envelope__names {
    margin-bottom: 8px;
    font-size: 21px;
  }

  .envelope__seal {
    width: 92px;
    height: 92px;
  }

  .envelope__seal-character {
    font-size: 36px;
  }
}

@media (max-height: 450px) {
  .envelope__heading {
    top: max(26px, env(safe-area-inset-top));
  }

  .envelope__eyebrow,
  .envelope__heading h2 {
    margin-bottom: 4px;
  }

  .envelope__eyebrow {
    font-size: 9px;
  }

  .envelope__heading h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  .envelope__names {
    margin-bottom: 4px;
    font-size: 16px;
  }

  .envelope__heading time {
    display: block;
    font-size: 13px;
    line-height: 1.2;
  }

  .envelope__dedication {
    bottom: max(8%, env(safe-area-inset-bottom));
  }

  .envelope__dedication::before {
    display: none;
  }

  .envelope__seal {
    width: 80px;
    height: 80px;
  }

  .envelope__seal-character {
    font-size: 30px;
  }

  .envelope__seal-caption {
    font-size: 8px;
  }
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

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

.section {
  position: relative;
  min-height: 100svh;
  padding: 88px 28px;
  overflow: hidden;
}

.section::selection,
.section *::selection {
  color: var(--paper);
  background: var(--red);
}

.section--paper {
  background:
    linear-gradient(180deg, rgba(142, 31, 44, .06), transparent 24%, transparent 78%, rgba(36, 72, 61, .045)),
    linear-gradient(90deg, transparent 49.8%, rgba(199, 155, 88, .1) 50%, transparent 50.2%),
    radial-gradient(circle at 1px 1px, rgba(142, 31, 44, .04) 1px, transparent 0) 0 0 / 15px 15px,
    var(--paper);
}

.section--red {
  color: var(--cream);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .025) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(225deg, rgba(255, 255, 255, .018) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(160deg, #9a2130 0%, #8e1f2c 55%, #761721 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font: 600 11px/1.3 Georgia, serif;
  letter-spacing: 3px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .12);
}

.section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 48px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--red);
  font: 500 30px/1.35 var(--serif);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .65);
}

.section-heading h2::after {
  display: block;
  width: 44px;
  height: 1px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold) 28%, var(--gold) 72%, transparent);
  content: "";
}

.section-heading--light h2 {
  color: var(--cream);
  text-shadow: 0 1px 2px rgba(62, 5, 14, .35);
}

.heading-mark {
  position: absolute;
  top: -20px;
  right: 7%;
  color: rgba(142, 31, 44, .07);
  font: 700 92px/1 var(--serif);
}

.paper-frame {
  position: absolute;
  z-index: 0;
  inset: 24px 18px;
  border: 1px solid rgba(142, 31, 44, .52);
  outline: 1px solid rgba(199, 155, 88, .64);
  outline-offset: -8px;
  box-shadow:
    inset 0 0 0 3px rgba(255, 250, 242, .72),
    inset 0 0 56px rgba(199, 155, 88, .1);
  pointer-events: none;
}

.paper-frame::before,
.paper-frame::after {
  position: absolute;
  left: 50%;
  width: 108px;
  height: 11px;
  border-top: 1px solid rgba(142, 31, 44, .54);
  border-bottom: 1px solid rgba(199, 155, 88, .62);
  background:
    linear-gradient(90deg, transparent, rgba(199, 155, 88, .18) 28%, rgba(142, 31, 44, .08) 50%, rgba(199, 155, 88, .18) 72%, transparent);
  content: "";
  transform: translateX(-50%);
}

.paper-frame::before { top: 14px; }
.paper-frame::after { bottom: 14px; }

.paper-frame span {
  position: absolute;
  right: -10px;
  bottom: 60px;
  padding: 10px 5px;
  border: 1px solid rgba(239, 211, 160, .68);
  color: #efd3a0;
  background: linear-gradient(180deg, #8f2030, var(--red-deep));
  font: 11px/1.35 var(--serif);
  writing-mode: vertical-rl;
  box-shadow: 0 4px 10px rgba(83, 13, 24, .14);
}

.invitation .section-heading::before {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border: 1px solid #d6ac68;
  border-radius: 50%;
  color: #f4d9a2;
  background: linear-gradient(145deg, #a92337, #761526);
  place-content: center;
  font: 24px/1 var(--serif);
  content: "囍";
  box-shadow:
    0 7px 16px rgba(86, 14, 25, .18),
    0 0 0 4px rgba(199, 155, 88, .15),
    inset 0 0 0 4px rgba(255, 238, 202, .1);
}

.invitation .section-heading .eyebrow {
  display: flex;
  color: var(--gold);
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.invitation .section-heading .eyebrow::before,
.invitation .section-heading .eyebrow::after {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 155, 88, .72));
  content: "";
}

.invitation .section-heading .eyebrow::after {
  transform: scaleX(-1);
}

.invitation .section-heading h2 {
  font-size: 34px;
  letter-spacing: 4px;
}

.invitation .section-heading h2::after {
  width: 72px;
  height: 3px;
  margin-top: 16px;
  background:
    radial-gradient(circle, var(--red) 0 2px, transparent 2.5px) center / 8px 3px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 44%, transparent 44% 56%, var(--gold) 56%, var(--gold) 80%, transparent) center / 100% 1px no-repeat;
}

.hero {
  display: flex;
  min-height: 100svh;
  padding: max(36px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom));
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: 1;
  inset: 18px;
  border: 1px solid rgba(228, 196, 135, .28);
  pointer-events: none;
  content: "";
}

.hero::after {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 50%;
  width: 68px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 211, 156, .85), transparent);
  content: "";
  transform: translateX(-50%);
}

.hero__photo,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__photo {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.hero__veil {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(31, 14, 12, .14) 0%, rgba(31, 14, 12, .02) 35%, rgba(36, 10, 13, .84) 100%),
    linear-gradient(90deg, rgba(87, 18, 26, .18), transparent 58%);
}

.hero__top {
  position: absolute;
  top: max(38px, env(safe-area-inset-top));
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  z-index: 2;
}

.hero-scroll {
  position: absolute;
  z-index: 2;
  top: max(68px, calc(env(safe-area-inset-top) + 28px));
  left: 22px;
  display: flex;
  width: 47px;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 8px 8px rgba(37, 7, 13, .24));
}

.hero-scroll span {
  display: flex;
  width: 35px;
  height: 95px;
  margin: -1px 0;
  padding: 10px 0;
  border-right: 1px solid rgba(239, 211, 160, .72);
  border-left: 1px solid rgba(239, 211, 160, .72);
  align-items: center;
  justify-content: center;
  color: #f6dba4;
  background:
    linear-gradient(90deg, rgba(58, 5, 15, .2), transparent 20%, transparent 80%, rgba(58, 5, 15, .22)),
    repeating-linear-gradient(0deg, rgba(255, 230, 184, .025) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #a92337, #7d1728 56%, #a6293c);
  box-shadow: inset 6px 0 10px rgba(255, 198, 155, .09), inset -6px 0 10px rgba(46, 4, 12, .2);
  font: 600 13px/1 var(--serif);
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-shadow: 0 1px 1px rgba(56, 5, 14, .55);
}

.hero-scroll__rod {
  position: relative;
  z-index: 1;
  display: block;
  width: 45px;
  height: 9px;
  border: 1px solid rgba(255, 231, 176, .45);
  border-radius: 5px;
  background: linear-gradient(180deg, #e8c680, #9f682e 52%, #d8aa5d);
  box-shadow: inset 0 1px 1px rgba(255, 244, 211, .72);
}

.hero-scroll__rod::before,
.hero-scroll__rod::after {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e5bd72, #986029);
  content: "";
  transform: translateY(-50%);
}

.hero-scroll__rod::before { left: -3px; }
.hero-scroll__rod::after { right: -3px; }

.hero__date {
  margin: 0;
  color: #8e1f2c;
  font: 700 15px/1.2 Georgia, serif;
  letter-spacing: 2px;
  -webkit-text-stroke: 4px rgba(246, 219, 164, .98);
  paint-order: stroke fill;
  text-shadow: 0 2px 5px rgba(49, 6, 14, .42);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 54px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(32, 7, 12, .32);
}

.hero__content::before {
  position: absolute;
  z-index: -1;
  bottom: -8px;
  left: 50%;
  color: rgba(239, 211, 160, .095);
  font: 700 224px/.82 var(--serif);
  content: "囍";
  transform: translateX(-50%);
  text-shadow: none;
}

.hero__content::after {
  display: block;
  width: 86px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, #efd3a0 28%, #efd3a0 72%, transparent);
  content: "";
}

.hero__seal,
.closing__seal {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 1px solid rgba(226, 193, 131, .8);
  color: #f0d39c;
  place-items: center;
  font: 500 25px/1 var(--serif);
  transform: rotate(45deg);
}

.hero__seal span,
.closing__seal span {
  transform: rotate(-45deg);
}

.hero h1:focus {
  outline: none;
}

.hero h1 {
  display: flex;
  margin: 0;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font: 400 34px/1.25 "Microsoft YaHei", "PingFang SC", sans-serif;
}

.hero h1 b {
  color: var(--gold);
  font: 400 21px/1 "Microsoft YaHei", "PingFang SC", sans-serif;
}

.hero h1 span,
.hero h1 b {
  color: #8e1f2c;
  -webkit-text-stroke: 4px #f6dba4;
  paint-order: stroke fill;
  text-shadow: 0 0 1px rgba(246, 219, 164, .85), 0 3px 6px rgba(49, 6, 14, .42);
}

.hero__subtitle {
  margin: 14px 0 30px;
  color: #8e1f2c;
  font: 15px/1.8 "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 3px;
  -webkit-text-stroke: 4px #f6dba4;
  paint-order: stroke fill;
  text-shadow: 0 0 1px rgba(246, 219, 164, .85), 0 3px 6px rgba(49, 6, 14, .5);
}

.hero__subtitle::before,
.hero__subtitle::after {
  display: inline-block;
  width: 22px;
  height: 1px;
  margin: 0 9px 4px;
  background: linear-gradient(90deg, transparent, rgba(240, 211, 156, .72));
  content: "";
}

.hero__subtitle::after {
  background: linear-gradient(90deg, rgba(240, 211, 156, .72), transparent);
}

.hero__cta {
  display: inline-flex;
  min-width: 148px;
  min-height: 46px;
  border: 1px solid #e0bd7b;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  letter-spacing: 2px;
  color: #f6dba4;
  background:
    repeating-linear-gradient(0deg, rgba(255, 230, 184, .025) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #a92337, #7d1728 56%, #a6293c);
  box-shadow: 0 8px 24px rgba(38, 7, 13, .32), inset 0 1px 0 rgba(255, 222, 167, .14);
  text-shadow: 0 1px 1px rgba(56, 5, 14, .55);
  transition: background .2s ease, border-color .2s ease;
}

.hero__cta:hover {
  border-color: #f8dfad;
  background: linear-gradient(145deg, #bc3043, #8b1a2c 56%, #b42d41);
}

.hero__cta:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.scroll-cue {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  width: 28px;
  height: 38px;
  margin-left: -14px;
}

.scroll-cue span {
  position: absolute;
  top: 3px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  animation: cue 1.8s infinite;
  transform: rotate(45deg);
}

.invitation::before,
.invitation::after {
  position: absolute;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(36, 72, 61, .2);
  content: "";
  transform: rotate(45deg);
}

.invitation {
  background-image:
    radial-gradient(circle at 50% 15%, rgba(199, 155, 88, .13), transparent 27%),
    radial-gradient(circle at 50% 88%, rgba(142, 31, 44, .055), transparent 30%),
    linear-gradient(180deg, rgba(142, 31, 44, .045), transparent 23%, transparent 78%, rgba(36, 72, 61, .035)),
    radial-gradient(circle at 1px 1px, rgba(142, 31, 44, .035) 1px, transparent 0);
  background-size: auto, auto, auto, 15px 15px;
  box-shadow:
    inset 0 0 0 8px #821b2a,
    inset 0 0 0 10px #d6ac68;
}

.invitation::before {
  top: -68px;
  left: -68px;
}

.invitation::after {
  right: -68px;
  bottom: -68px;
}

.invitation__letter {
  position: relative;
  z-index: 1;
  max-width: 370px;
  margin: 0 auto;
  padding: 34px 24px 20px;
  border-top: 1px solid rgba(142, 31, 44, .56);
  border-bottom: 1px solid rgba(142, 31, 44, .56);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .74) 12%, rgba(255, 255, 255, .74) 88%, transparent),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(199, 155, 88, .06) 27px 28px);
  box-shadow:
    inset 1px 0 rgba(199, 155, 88, .18),
    inset -1px 0 rgba(199, 155, 88, .18);
  text-align: center;
  font: 15px/2.2 var(--serif);
}

.invitation__letter::before {
  position: absolute;
  top: -14px;
  left: 50%;
  padding: 0 16px;
  color: var(--red);
  background: var(--paper);
  font: 19px/26px var(--serif);
  content: "如约而至";
  transform: translateX(-50%);
  white-space: nowrap;
}

.invitation__letter::after {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.invitation__letter p {
  margin: 0 0 22px;
}

.invitation__letter p:nth-child(2) {
  margin-bottom: 30px;
  color: var(--red);
  font-size: 26px;
  letter-spacing: 4px;
  text-shadow: 0 1px 0 #fff;
}

.invitation__letter p:first-child {
  color: #6f5c52;
  letter-spacing: 2px;
}

.signature {
  display: flex;
  margin-top: 38px;
  justify-content: center;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  text-align: center;
  font: 11px/1.8 var(--serif);
}

.signature span {
  min-width: 74px;
  padding-top: 9px;
  border-top: 1px solid rgba(199, 155, 88, .72);
}

.signature b {
  color: var(--red);
  font-size: 21px;
  font-weight: 500;
}

.signature i {
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px rgba(199, 155, 88, .46);
  transform: rotate(45deg);
}

.album {
  position: relative;
  color: #fff;
  background: #3b1217;
  overflow: hidden;
  isolation: isolate;
}

.album__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #3b1217;
}

.album__main {
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  max-width: none;
  height: calc(100% + 4px);
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.02);
  transform: scale(1);
  transition: opacity .24s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}

.album__main.is-changing {
  opacity: .18;
  transform: scale(1.025);
}

.album__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 8, 11, .18), transparent 38%, rgba(27, 7, 10, .2) 56%, rgba(27, 7, 10, .88) 100%),
    linear-gradient(90deg, rgba(92, 18, 29, .12), transparent 48%, rgba(26, 47, 40, .12));
  pointer-events: none;
}

.album__frame {
  position: absolute;
  z-index: 1;
  inset: 18px;
  border: 1px solid rgba(240, 211, 156, .48);
  pointer-events: none;
}

.album__frame span {
  position: absolute;
  top: 13px;
  left: 50%;
  padding: 0 12px;
  color: rgba(240, 211, 156, .86);
  font: 9px/1.6 Georgia, serif;
  letter-spacing: 2px;
  text-shadow: 0 1px 5px rgba(25, 6, 8, .5);
  transform: translateX(-50%);
}

.album__frame span::before,
.album__frame span::after {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .78));
  content: "";
}

.album__frame span::before {
  right: calc(100% + 9px);
}

.album__frame span::after {
  left: calc(100% + 9px);
  transform: scaleX(-1);
}

.album__ornaments {
  position: absolute;
  z-index: 2;
  inset: 18px;
  pointer-events: none;
}

.album__ornaments i {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #efd39e;
  opacity: .88;
}

.album__ornaments i:nth-child(1) {
  top: -5px;
  left: -5px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.album__ornaments i:nth-child(2) {
  top: -5px;
  right: -5px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.album__ornaments i:nth-child(3) {
  bottom: -5px;
  left: -5px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.album__ornaments i:nth-child(4) {
  right: -5px;
  bottom: -5px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.album__ornaments span {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 62px;
  background: linear-gradient(180deg, transparent, rgba(239, 211, 160, .72), transparent);
  transform: translateY(-50%);
}

.album__ornaments span:nth-of-type(1) {
  left: 0;
}

.album__ornaments span:nth-of-type(2) {
  right: 0;
}

.album__ornaments span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(239, 211, 160, .88);
  background: rgba(111, 22, 33, .7);
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.album__controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 44%;
  min-height: 250px;
  padding: 18px 0 max(22px, env(safe-area-inset-bottom));
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.album__controls::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(31, 6, 11, .16) 34%, rgba(31, 6, 11, .48));
  content: "";
}

.album__meta {
  display: flex;
  min-height: 34px;
  padding: 0 28px;
  justify-content: center;
  align-items: center;
}

.album__meta > span {
  color: #e4bd78;
  font: 9px/1.45 Georgia, serif;
  letter-spacing: 2px;
}

.album__thumbs {
  position: relative;
  min-height: 225px;
  overflow: visible;
  perspective: 620px;
  pointer-events: auto;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.album__thumbs::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 76px);
  height: 72px;
  border: 1px solid rgba(239, 211, 160, .2);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(25, 3, 7, .24);
  content: "";
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.album__thumbs.is-dragging {
  cursor: grabbing;
}

.album__thumbs.is-moving .album__thumb {
  transition: border-color .15s ease, box-shadow .15s ease;
  will-change: transform, opacity;
}

.album__thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: var(--album-depth, 1);
  width: 84px;
  height: 120px;
  padding: 3px;
  border: 1px solid rgba(239, 211, 160, .4);
  border-radius: 5px;
  background: rgba(83, 13, 24, .56);
  box-shadow: 0 8px 18px rgba(44, 5, 12, .2);
  cursor: pointer;
  opacity: var(--album-opacity, .52);
  transform: translate(-50%, -50%) translate3d(var(--album-x, 0), var(--album-y, 0), 0) rotateY(var(--album-turn, 0deg)) scale(var(--album-scale, .82));
  transform-origin: center;
  transform-style: preserve-3d;
  transition: opacity .25s ease, transform .32s ease, border-color .25s ease, box-shadow .25s ease;
}

.album__thumb::after {
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: 7px;
  content: "";
  transition: border-color .25s ease;
}

.album__thumb img {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: cover;
  pointer-events: none;
}

.album__thumb.is-active {
  border-color: #f0d39b;
  box-shadow: 0 14px 28px rgba(30, 3, 8, .48), 0 0 0 2px rgba(111, 22, 33, .82), 0 0 18px rgba(239, 211, 160, .18);
}

.album__thumb.is-active::after {
  border-color: rgba(239, 211, 160, .5);
}

.album__thumb:focus-visible {
  outline: 2px solid #fff3d1;
  outline-offset: 6px;
}

.details {
  display: flex;
  padding: 56px 34px 42px;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}

.details::before {
  position: absolute;
  z-index: 0;
  inset: 14px;
  border: 1px solid rgba(239, 211, 160, .42);
  box-shadow: inset 0 0 0 6px rgba(239, 211, 160, .035);
  content: "";
  pointer-events: none;
}

.details::after {
  position: absolute;
  z-index: 0;
  top: 27px;
  left: 50%;
  width: 82px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .8), transparent);
  content: "";
  transform: translateX(-50%);
}

.details .section-heading {
  margin-bottom: 28px;
}

.details .section-heading h2 {
  font-size: 34px;
  letter-spacing: 0;
}

.details .section-heading h2::after {
  width: 76px;
  margin-top: 14px;
  background: linear-gradient(90deg, transparent, #e8c47f 24%, #e8c47f 45%, transparent 45% 55%, #e8c47f 55%, #e8c47f 76%, transparent);
}

.details-ornament {
  position: absolute;
  z-index: 0;
  top: 34px;
  left: 32px;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(239, 211, 160, .18);
  transform: rotate(45deg);
}

.details-ornament::before,
.details-ornament::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(239, 211, 160, .13);
  content: "";
}

.details-ornament::after { inset: 16px; }

.details-ornament span {
  display: grid;
  width: 100%;
  height: 100%;
  color: rgba(239, 211, 160, .18);
  place-items: center;
  font: 44px/1 var(--serif);
  transform: rotate(-45deg);
}

.calendar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 20px 20px 19px;
  border: 1px solid #e4bd78;
  outline: 1px solid rgba(142, 31, 44, .18);
  outline-offset: -7px;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(142, 31, 44, .05) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(145deg, #fffaf2, #f3e4cb);
  box-shadow: inset 0 0 28px rgba(199, 155, 88, .08), 0 18px 38px rgba(55, 5, 13, .28);
}

.calendar::before,
.calendar::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(142, 31, 44, .62);
  content: "";
}

.calendar::before {
  top: 6px;
  left: 6px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.calendar::after {
  right: 6px;
  bottom: 6px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.calendar__month {
  display: flex;
  min-height: 34px;
  padding: 0 2px 13px;
  border-bottom: 1px solid rgba(142, 31, 44, .2);
  justify-content: space-between;
  align-items: center;
  font: 17px/1.3 var(--serif);
  letter-spacing: 0;
}

.calendar__month b {
  padding: 5px 9px;
  border: 1px solid rgba(199, 155, 88, .6);
  color: #f3d69d;
  background: linear-gradient(145deg, #982235, #711522);
  font: 11px/1 Georgia, serif;
  box-shadow: 0 4px 10px rgba(111, 22, 33, .16);
}

.calendar__week,
.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.calendar__week {
  margin: 14px 0 7px;
  color: rgba(142, 31, 44, .72);
  font-size: 10px;
}

.calendar__days {
  row-gap: 7px;
  font: 12px/26px Georgia, serif;
}

.calendar__days span {
  position: relative;
  height: 26px;
}

.calendar__days .is-wedding {
  z-index: 1;
  color: var(--cream);
  font-weight: 700;
}

.calendar__days .is-wedding::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 28px;
  margin: auto;
  border: 1px solid #d9ad65;
  border-radius: 50%;
  background: linear-gradient(145deg, #a3263a, #761622);
  box-shadow: 0 0 0 3px rgba(199, 155, 88, .18), 0 5px 12px rgba(111, 22, 33, .24);
  content: "";
}

.event-meta {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  margin: 26px auto 0;
  border-top: 1px solid rgba(239, 211, 160, .62);
  border-bottom: 1px solid rgba(239, 211, 160, .26);
}

.event-meta::before {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(239, 211, 160, .8);
  background: var(--red-deep);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.event-meta p {
  display: grid;
  margin: 0;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(239, 211, 160, .2);
  grid-template-columns: 58px 1fr;
  align-items: baseline;
}

.event-meta p:last-of-type {
  border-bottom: 0;
}

.event-meta span {
  color: var(--gold);
  font: 13px/1 var(--serif);
  letter-spacing: 0;
}

.event-meta span::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 2px 0;
  border: 1px solid currentColor;
  background: var(--red-deep);
  content: "";
  transform: rotate(45deg);
}

.event-meta strong {
  color: #fff7e8;
  font: 400 14px/1.65 var(--serif);
}

.event-meta address {
  margin: 10px 4px 12px 62px;
  color: rgba(248, 240, 228, .72);
  font-size: 12px;
  font-style: normal;
}

.action-row {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  max-width: 390px;
  margin: 24px auto 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 0;
  justify-content: center;
  align-items: center;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 0 8px 18px rgba(61, 7, 15, .12);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button--cream {
  color: var(--red-deep);
  border-color: #f1d49d;
  background: linear-gradient(135deg, #fffaf2, #e9c887);
  box-shadow: 0 10px 22px rgba(55, 5, 13, .24), inset 0 0 0 3px rgba(255, 250, 242, .28);
}

.button--outline {
  border-color: rgba(239, 211, 160, .72);
  color: var(--cream);
  background: rgba(79, 11, 21, .22);
  box-shadow: inset 0 0 0 3px rgba(239, 211, 160, .035), 0 10px 22px rgba(55, 5, 13, .16);
}

.contact-open main {
  overflow-y: hidden;
}

.contact-open .page-dots {
  visibility: hidden;
}

.contact-sheet[hidden] {
  display: none;
}

.contact-sheet {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 50%;
  width: min(100%, 520px);
  height: 100vh;
  height: 100svh;
  transform: translateX(-50%);
}

.contact-sheet__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(32, 5, 10, .58);
  cursor: default;
  opacity: 0;
  transition: opacity .28s ease;
}

.contact-sheet__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 24px max(22px, env(safe-area-inset-bottom));
  border-top: 2px solid #d6ac68;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(142, 31, 44, .045) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(155deg, #fffaf2, #f4e2c4);
  box-shadow: 0 -20px 48px rgba(45, 5, 12, .32);
  transform: translateY(105%);
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.contact-sheet.is-open .contact-sheet__backdrop {
  opacity: 1;
}

.contact-sheet.is-open .contact-sheet__panel {
  transform: translateY(0);
}

.contact-sheet__handle {
  width: 46px;
  height: 3px;
  margin: 0 auto 19px;
  background: linear-gradient(90deg, transparent, #b7833e, transparent);
}

.contact-sheet__header {
  display: flex;
  margin-bottom: 20px;
  justify-content: space-between;
  align-items: center;
}

.contact-sheet__header span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font: 9px/1.4 Georgia, serif;
  letter-spacing: 0;
}

.contact-sheet__header h2 {
  margin: 0;
  color: var(--red);
  font: 500 25px/1.35 var(--serif);
  letter-spacing: 0;
}

.contact-sheet__close {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(142, 31, 44, .24);
  border-radius: 50%;
  color: var(--red);
  background: rgba(255, 250, 242, .52);
  place-items: center;
  cursor: pointer;
  font: 24px/1 var(--sans);
}

.contact-sheet__people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-person {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 128px;
  padding: 18px 12px 16px;
  border: 1px solid #d7aa62;
  border-radius: 6px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff7e8;
  background: linear-gradient(155deg, #9b2336, #721521);
  box-shadow: 0 10px 22px rgba(75, 9, 19, .18), inset 0 0 0 4px rgba(255, 238, 202, .045);
  text-align: center;
}

.contact-person::before {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(239, 211, 160, .6);
  content: "";
  transform: rotate(45deg);
}

.contact-person span {
  color: #e6bf7a;
  font: 12px/1.3 var(--serif);
}

.contact-person strong {
  margin: 8px 0 7px;
  font: 500 21px/1.3 var(--serif);
}

.contact-person small {
  color: rgba(255, 247, 232, .72);
  font: 11px/1.3 Georgia, serif;
  white-space: nowrap;
}

.contact-person:active {
  transform: translateY(1px);
}

.contact-sheet__cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 1px solid rgba(142, 31, 44, .22);
  color: var(--red-deep);
  background: rgba(255, 250, 242, .58);
  cursor: pointer;
  font-size: 13px;
}

.contact-sheet__close:focus-visible,
.contact-person:focus-visible,
.contact-sheet__cancel:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.closing {
  position: relative;
  color: #fff;
  background: #3f1018;
  overflow: hidden;
  isolation: isolate;
}

.closing > img,
.closing__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.closing > img {
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(.88) contrast(1.03);
  transform: scale(1.015);
}

.closing__veil {
  background:
    linear-gradient(180deg, rgba(25, 7, 10, .2), transparent 30%, rgba(30, 6, 11, .2) 50%, rgba(40, 7, 14, .9) 100%),
    linear-gradient(90deg, rgba(86, 17, 28, .22), transparent 42%, rgba(33, 64, 54, .1));
}

.closing__frame {
  position: absolute;
  z-index: 1;
  inset: 18px;
  border: 1px solid rgba(239, 211, 160, .48);
  background:
    linear-gradient(#efd39e, #efd39e) left -1px top -1px / 38px 2px no-repeat,
    linear-gradient(#efd39e, #efd39e) left -1px top -1px / 2px 38px no-repeat,
    linear-gradient(#efd39e, #efd39e) right -1px top -1px / 38px 2px no-repeat,
    linear-gradient(#efd39e, #efd39e) right -1px top -1px / 2px 38px no-repeat,
    linear-gradient(#efd39e, #efd39e) left -1px bottom -1px / 38px 2px no-repeat,
    linear-gradient(#efd39e, #efd39e) left -1px bottom -1px / 2px 38px no-repeat,
    linear-gradient(#efd39e, #efd39e) right -1px bottom -1px / 38px 2px no-repeat,
    linear-gradient(#efd39e, #efd39e) right -1px bottom -1px / 2px 38px no-repeat;
  box-shadow: inset 0 0 0 7px rgba(239, 211, 160, .035);
  pointer-events: none;
}

.closing__frame::before,
.closing__frame::after {
  position: absolute;
  left: 50%;
  width: 92px;
  height: 1px;
  background:
    radial-gradient(circle, #efd3a0 0 2px, transparent 2.5px) center / 8px 3px no-repeat,
    linear-gradient(90deg, transparent, #efd3a0 22%, #efd3a0 45%, transparent 45% 55%, #efd3a0 55%, #efd3a0 78%, transparent) center / 100% 1px no-repeat;
  content: "";
  transform: translateX(-50%);
}

.closing__frame::before { top: 16px; }
.closing__frame::after { bottom: 16px; }

.closing__content {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 34px));
  left: 24px;
  text-align: center;
}

.closing__seal {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 24px;
  border: 1px solid #e3ba72;
  border-radius: 50%;
  background: linear-gradient(145deg, #a5263a, #6e1420);
  box-shadow:
    0 12px 24px rgba(42, 4, 10, .34),
    0 0 0 5px rgba(239, 211, 160, .12),
    inset 0 0 0 5px rgba(255, 238, 202, .07);
  place-items: center;
  transform: none;
}

.closing__seal::before,
.closing__seal::after {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .7));
  content: "";
}

.closing__seal::before {
  right: calc(100% + 14px);
}

.closing__seal::after {
  left: calc(100% + 14px);
  transform: scaleX(-1);
}

.closing__seal span {
  color: #f4d79f;
  font: 26px/1 var(--serif);
  text-shadow: 0 1px 2px rgba(66, 7, 16, .3);
  transform: none;
}

.closing__content strong {
  display: block;
  color: #fffaf2;
  font: 400 38px/1.35 var(--serif);
  letter-spacing: 0;
  text-shadow: 0 3px 14px rgba(35, 6, 13, .54);
}

.closing__content > p:not(.closing__seal) {
  margin: 12px 0 8px;
  color: #fff7e8;
  font: 20px/1.5 var(--serif);
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(35, 6, 13, .48);
}

.closing__content > span {
  display: block;
  color: #e9c784;
  font: 13px/1.5 Georgia, serif;
  letter-spacing: 0;
}

.closing__content small {
  display: flex;
  margin-top: 26px;
  justify-content: center;
  align-items: center;
  gap: 15px;
  color: #f4d79f;
  font: 600 22px/1.5 var(--serif);
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(35, 6, 13, .48);
}

.closing__content small::before,
.closing__content small::after {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 211, 160, .62));
  content: "";
}

.closing__content small::after {
  transform: scaleX(-1);
}

.music-toggle {
  position: fixed;
  z-index: 90;
  top: max(18px, calc(env(safe-area-inset-top) + 10px));
  right: max(18px, calc((100vw - 520px) / 2 + 18px));
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(248, 220, 164, .86);
  border-radius: 50%;
  color: #f6dba4;
  background: #811b2c;
  box-shadow: 0 5px 16px rgba(41, 4, 11, .32), inset 0 0 0 3px rgba(255, 238, 202, .08);
  cursor: pointer;
  place-items: center;
  opacity: 1;
  transition: opacity .28s ease, transform .28s ease, box-shadow .2s ease;
}

.music-toggle::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(248, 220, 164, .34);
  border-radius: 50%;
  background: conic-gradient(from 30deg, rgba(255, 239, 199, .14), transparent 26%, rgba(255, 239, 199, .09) 54%, transparent 76%);
  content: "";
  animation: music-disc 5s linear infinite;
}

.music-toggle span {
  position: relative;
  z-index: 1;
  font: 600 22px/1 Georgia, serif;
  transform: translateY(-1px);
}

.music-toggle::after {
  position: absolute;
  z-index: 2;
  width: 29px;
  height: 2px;
  border-radius: 2px;
  background: #f6dba4;
  box-shadow: 0 0 0 2px #811b2c;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) scaleX(.6);
  transition: opacity .2s ease, transform .2s ease;
}

.music-toggle.is-paused::before {
  animation-play-state: paused;
}

.music-toggle.is-paused::after {
  opacity: 1;
  transform: rotate(-45deg) scaleX(1);
}

.music-toggle:hover {
  box-shadow: 0 7px 20px rgba(41, 4, 11, .4), inset 0 0 0 3px rgba(255, 238, 202, .14);
}

.music-toggle:focus-visible {
  outline: 2px solid #f6dba4;
  outline-offset: 3px;
}

.invitation-sealed .music-toggle {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px) scale(.9);
}

@keyframes music-disc {
  to { transform: rotate(360deg); }
}

.page-dots {
  position: fixed;
  z-index: 10;
  top: 50%;
  right: max(12px, calc((100vw - 520px) / 2 + 12px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}

.page-dots a {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(36, 72, 61, .38);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: height .2s ease, border-radius .2s ease, background .2s ease;
}

.page-dots a.is-active {
  height: 20px;
  border-radius: 8px;
  background: #efd3a0;
  box-shadow: 0 0 0 3px rgba(239, 211, 160, .14), 0 2px 6px rgba(0, 0, 0, .22);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s ease, transform .85s cubic-bezier(.22, .61, .36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cue {
  0% { opacity: 0; transform: translateY(0) rotate(45deg); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px) rotate(45deg); }
}

@media (max-height: 740px) {
  .section {
    padding: 42px 24px;
  }

  .details {
    padding: 38px 30px 30px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .section-heading h2::after {
    margin-top: 10px;
  }

  .hero__content {
    padding-bottom: 24px;
  }

  .hero__seal {
    margin-bottom: 12px;
  }

  .hero__subtitle {
    margin-bottom: 18px;
  }

  .invitation__letter {
    padding-top: 20px;
    font-size: 14px;
    line-height: 1.85;
  }

  .invitation__letter p {
    margin-bottom: 12px;
  }

  .invitation__letter p:nth-child(2) {
    margin-bottom: 18px;
    font-size: 19px;
  }

  .signature {
    margin-top: 20px;
  }

  .calendar {
    padding: 12px 14px;
  }

  .calendar__month {
    padding-bottom: 9px;
  }

  .calendar__week {
    margin: 8px 0 3px;
  }

  .calendar__days {
    row-gap: 1px;
    line-height: 22px;
  }

  .calendar__days span {
    height: 22px;
  }

  .event-meta {
    margin-top: 16px;
  }

  .event-meta p {
    padding: 7px 0;
  }

  .event-meta address {
    margin-top: 7px;
  }

  .action-row {
    margin-top: 16px;
  }

  .paper-frame {
    inset: 14px 12px;
  }

  .album__frame,
  .album__ornaments,
  .closing__frame {
    inset: 12px;
  }

  .album__controls {
    height: 46%;
    min-height: 230px;
    padding-top: 10px;
  }

  .album__meta {
    min-height: 32px;
  }

  .album__thumbs {
    min-height: 205px;
  }

  .album__thumb {
    width: 72px;
    height: 104px;
  }

  .closing__content {
    bottom: max(38px, calc(env(safe-area-inset-bottom) + 22px));
  }

  .closing__seal {
    width: 56px;
    height: 56px;
    margin-bottom: 17px;
  }

  .closing__seal span {
    font-size: 22px;
  }

  .closing__content strong {
    font-size: 31px;
  }

  .closing__content > p:not(.closing__seal) {
    margin: 8px 0 5px;
    font-size: 17px;
  }

  .closing__content small {
    margin-top: 18px;
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle::before {
    animation: none;
  }

  .envelope.is-opening::after,
  .envelope.is-opening .envelope__seal,
  .envelope.is-opening .envelope__heading,
  .envelope.is-opening .envelope__flap,
  .envelope.is-opening .envelope__panel {
    animation-duration: .01ms;
    animation-delay: 0ms;
  }

  .envelope__seal::after {
    animation: none;
  }

  .invitation-opening .hero__photo,
  .invitation-opening .hero__content,
  .invitation-opening .hero__top {
    transition: none;
  }

  main {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue span {
    animation: none;
  }

  .contact-sheet__backdrop,
  .contact-sheet__panel {
    transition: none;
  }
}
