/* ==========================================================================
   Layout — The Book, full-screen edition
   Toàn màn hình là tấm thiệp. Có bìa 3D lật lên để "mở sách".
   ========================================================================== */

html, body {
  overflow-x: clip;
  background: #294247;
  color: var(--color-sepia);
  min-height: 100%;
}

body {
  background: #294247;
  min-height: 100dvh;
  display: block;
}

#book {
  width: min(calc(100% - 36px), 390px);
  margin: 0 auto;
  background: transparent;
}

#book.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.entry-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(25, 8, 9, 0.9), rgba(90, 18, 18, 0.82));
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.entry-veil.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-veil__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
}

.entry-veil__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f4c7a8;
  font-weight: 700;
}

.entry-veil h2 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.1;
  font-family: "Segoe Print", "Palatino Linotype", cursive;
  color: #f3d7d1;
}

.entry-veil__button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d09972 0%, #c17a48 100%);
  color: #fff;
  padding: 12px 20px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 18px 28px rgba(166, 101, 92, 0.18);
}

/* ==========================================================================
   BOOK — full-screen stage
   ========================================================================== */
.book {
  position: relative;
  background: transparent;
  overflow: visible;
  min-height: 100vh;
  width: min(100%, 430px);
  margin: 0 auto;
}

.page {
  position: relative;
  inset: auto;
  background: transparent;
  padding: 0 0 18px;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
  pointer-events: auto;
  width: 100%;
}

.page.is-active,
.page.is-prev,
.page.is-next {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.scroll-layout .book {
  position: relative;
  inset: auto;
  height: auto;
  overflow: visible;
}

.scroll-layout .page,
.scroll-layout .page.is-active,
.scroll-layout .page.is-prev,
.scroll-layout .page.is-next {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  min-height: auto;
  padding: 12px 12px 18px;
}

.scroll-layout .page--cover {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  margin-left: calc(50% - 50vw);
  padding: 24px 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f8efe2;
  background:
    radial-gradient(ellipse at 20% 45%, rgba(116, 49, 27, 0.32), transparent 42%),
    radial-gradient(ellipse at 82% 65%, rgba(90, 19, 25, 0.44), transparent 46%),
    linear-gradient(130deg, #281116 0%, #390e16 52%, #241016 100%);
}

.page--cover::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(198, 145, 55, 0.48);
  box-shadow: inset 0 0 0 5px rgba(198, 145, 55, 0.06);
  pointer-events: none;
}

.cover-frame {
  position: absolute;
  inset: 15px;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(#c99537, #c99537) left top / 25px 2px no-repeat,
    linear-gradient(#c99537, #c99537) left top / 2px 25px no-repeat,
    linear-gradient(#c99537, #c99537) right top / 25px 2px no-repeat,
    linear-gradient(#c99537, #c99537) right top / 2px 25px no-repeat,
    linear-gradient(#c99537, #c99537) left bottom / 25px 2px no-repeat,
    linear-gradient(#c99537, #c99537) left bottom / 2px 25px no-repeat,
    linear-gradient(#c99537, #c99537) right bottom / 25px 2px no-repeat,
    linear-gradient(#c99537, #c99537) right bottom / 2px 25px no-repeat;
}

.cover-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 52px));
  height: clamp(440px, calc(100svh - 76px), 560px);
  max-height: calc(100svh - 48px);
  padding: 5px;
  overflow: hidden;
  border: 1px solid rgba(207, 165, 91, 0.68);
  border-radius: 9px;
  background: #281a16;
  box-shadow:
    0 0 0 5px rgba(177, 127, 51, 0.13),
    0 20px 60px rgba(0, 0, 0, 0.38);
  transform-style: preserve-3d;
  animation: coverCardFloat 7.5s ease-in-out infinite;
  will-change: transform;
}

.cover-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -35%;
  bottom: -35%;
  left: -65%;
  width: 58%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    108deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 28%,
    rgba(255, 255, 255, 0.32) 42%,
    rgba(255, 255, 255, 0.88) 48%,
    rgba(255, 247, 224, 0.5) 51%,
    rgba(255, 255, 255, 0.12) 58%,
    transparent 76%
  );
  filter: blur(0.7px);
  transform: skewX(-18deg);
  animation: coverMirrorShimmer 3.2s cubic-bezier(0.35, 0, 0.2, 1) infinite;
}

.cover-screen.is-opening .cover-card::after {
  animation: coverMirrorSweep 1.15s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.cover-screen.is-opening .cover-card {
  animation: coverOpenReveal 1s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  transform-origin: 50% 50%;
}

.cover-screen.is-opening .page--cover {
  pointer-events: none;
}

.cover-screen {
  position: fixed;
  z-index: 150;
  inset: 0;
  perspective: 1400px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #281116;
  opacity: 1;
  visibility: visible;
  transition: opacity 450ms ease, visibility 0s linear 450ms;
}

.cover-screen .page--cover {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

.cover-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-screen.is-hidden,
.cover-screen.is-hidden * {
  visibility: hidden;
  pointer-events: none;
}

html.cover-locked {
  overflow: hidden;
}

@keyframes coverMirrorShimmer {
  0%, 12% { left: -75%; opacity: 0; }
  18% { opacity: 0.95; }
  48% { left: 125%; opacity: 0.72; }
  58%, 100% { left: 125%; opacity: 0; }
}

@keyframes coverCardFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateX(0.25deg) rotateY(-0.3deg);
  }
  50% {
    transform: translate3d(0, -5px, 0) rotateX(-0.3deg) rotateY(0.3deg);
  }
}

@keyframes coverGlint {
  0%, 100% { opacity: 0.16; transform: scale(0.72) rotate(0deg); }
  50% { opacity: 0.95; transform: scale(1.08) rotate(45deg); }
}

.cover-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #38241d;
}

.cover-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 39% 48%;
  transform: none;
}

.cover-photo__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 12, 12, 0.62), rgba(27, 13, 12, 0.5) 42%, rgba(23, 12, 10, 0.78));
  pointer-events: none;
}

.cover-glints {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cover-glints span {
  position: absolute;
  color: #fff3ce;
  font: 500 15px/1 Georgia, serif;
  text-shadow: 0 0 8px rgba(255, 242, 194, 0.95), 0 0 18px rgba(255, 228, 147, 0.72);
  animation: coverGlint 1.9s ease-in-out infinite;
}

.cover-glints span:nth-child(1) { top: 17%; left: 19%; animation-delay: -0.3s; }
.cover-glints span:nth-child(2) { top: 34%; right: 15%; font-size: 11px; animation-delay: -1.1s; }
.cover-glints span:nth-child(3) { right: 25%; bottom: 24%; font-size: 13px; animation-delay: -0.7s; }
.cover-glints span:nth-child(4) { bottom: 17%; left: 14%; font-size: 10px; animation-delay: -1.5s; }

.cover-screen.is-opening .cover-photo > img {
  animation: none;
}

.cover-copy {
  position: absolute;
  z-index: 4;
  inset: 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff7eb;
}

.cover-eyebrow {
  color: #f1d27c !important;
  opacity: 1;
  font: 700 0.7rem/1.2 var(--font-sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 9px rgba(32, 15, 11, 0.8);
}

.cover-flourish {
  margin-top: 18px;
  color: #d3a33c;
  font: 2rem/1 var(--font-display);
}

.book-cover__names {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(24px, 7vw, 48px);
  align-items: center;
  width: 100%;
  margin-top: 1px;
  color: #fff9f0;
  font: 600 clamp(1.45rem, 6vw, 2.45rem)/0.98 var(--font-display);
  letter-spacing: -0.035em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.book-cover__groom {
  /* width: min-content; */
  justify-self: end;
  text-align: right;
}

.book-cover__bride {
  /* width: min-content; */
  justify-self: start;
  text-align: left;
}

.cover-names__amp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font: 400 1.4rem/1 Arial, sans-serif;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.cover-names__amp::before {
  content: "♡";
}

.book-cover__date {
  margin-top: 1px;
  color: #ffe083 !important;
  font: 600 0.9rem/1.3 var(--font-sans);
  letter-spacing: 0.18em;
}

.cover-note,
.cover-event {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 340px);
  border: 1px solid rgba(219, 180, 112, 0.28);
  border-radius: 5px;
  background: rgba(36, 24, 21, 0.43);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(5px);
}

.cover-note {
  gap: 5px;
  margin-top: auto;
  padding: 12px 10px 11px;
}

.cover-note span {
  color: #e2c47f;
  font: 600 0.65rem/1.2 var(--font-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cover-note strong {
  color: #fff6eb;
  font: 600 1.1rem/1.2 var(--font-display);
  letter-spacing: 0.01em;
}

.cover-event {
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
}

.cover-event__time {
  color: #e7c56e;
  font: 700 1.15rem/1.1 var(--font-sans);
  letter-spacing: 0.16em;
}

.cover-event__venue {
  color: rgba(255, 246, 232, 0.9);
  font: italic 0.92rem/1.3 var(--font-display);
}

.book-cover__cta {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #321c14;
  background: linear-gradient(110deg, #b9802c, #e0b84c 48%, #b9802c);
  border: 0;
  font: 700 0.78rem/1 var(--font-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-cover__cta span {
  font-size: 0.62rem;
}

.page--story {
  background: linear-gradient(180deg, #a71317 0%, #900d10 52%, #760d10 100%);
  padding: 26px 12px 22px;
  position: relative;
}

.page--story::before,
.page--story::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: 90%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}

.page--story .section-kicker {
  color: #f2d5b4;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.page--story .story-block {
  max-width: 390px;
  margin: 0 auto;
  padding: 0 6px;
  border: 0;
  background: transparent;
}

.page--story .story-block h2 {
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  margin: 8px 0 10px;
  line-height: 1.1;
  font-family: "Segoe Print", "Palatino Linotype", cursive;
  letter-spacing: 0.02em;
}

.page--story .story-block p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.94;
}

.page--couple {
  background: #f3e7d9;
  padding: 18px 12px 12px;
}

.page--couple .section-kicker {
  color: #aa6d59;
  letter-spacing: 0.18em;
}

.page--couple .section-heading h2 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-family: "Segoe Print", "Palatino Linotype", cursive;
  color: #4e302e;
}

.page--couple .couple-grid {
  gap: 16px;
  margin-top: 12px;
}

.page--couple .person-card {
  min-height: 0;
  padding: 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(137, 94, 72, 0.18);
  background: rgba(255,255,255,0.12);
}

.page--couple .person-card__image {
  aspect-ratio: 1 / 1.12;
  border-radius: 12px;
}

.page--couple .person-card h3 {
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  color: #4b3030;
}

.page--couple .person-card p {
  font-size: 0.98rem;
}

.page--details {
  background: #f4ecdf;
  padding: 20px 12px 16px;
}

.page--details .section-kicker {
  color: #ad6959;
  letter-spacing: 0.18em;
}

.page--details .section-heading h2 {
  color: #511e20;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-family: "Segoe Print", "Palatino Linotype", cursive;
}

.page--details .date-card,
.page--details .info-box,
.page--details .map-box,
.page--gallery .gallery-grid img,
.page--gift-scan .gift-qr,
.page--rsvp .rsvp-form,
.page--thanks .thank-you,
.page--countdown .countdown {
  border-radius: 16px;
  border: 1px solid rgba(140, 96, 78, 0.18);
}

.page--details .date-card {
  background: rgba(255,255,255,0.18);
}

.page--details .date-card__headline {
  font-size: clamp(2rem, 7vw, 3rem);
  color: #9a3f39;
}

.page--details .info-box {
  background: rgba(255,255,255,0.14);
  margin-top: 12px;
}

.page--details .info-box h3 {
  font-size: 1.04rem;
  letter-spacing: 0.12em;
}

.page--details .map-box {
  margin-top: 14px;
  overflow: hidden;
}

.page--gallery {
  background: rgba(248, 240, 233, 0.9);
  padding: 10px 12px 14px;
}

.page--gallery .gallery-grid {
  max-width: 390px;
  margin: 8px auto 0;
  gap: 10px;
}

.page--gallery .gallery-grid img {
  height: 190px;
}

.page--gift-scan {
  background: #f3e7d9;
  padding: 16px 12px 14px;
}

.page--gift-scan .gift-qr {
  max-width: 390px;
  margin: 0 auto;
  background: rgba(255,255,255,0.16);
}

.page--countdown {
  background: #f3e7d9;
  padding: 18px 12px 10px;
}

.page--countdown .countdown {
  max-width: 390px;
  margin: 8px auto 0;
  background: rgba(255,255,255,0.16);
  padding: 10px 8px;
}

.page--countdown .countdown__item span {
  color: #9d3d3b;
  font-size: clamp(2rem, 7vw, 2.8rem);
}

.page--rsvp {
  background: #f3e7d9;
  padding: 12px 12px 12px;
}

.page--rsvp .rsvp-form {
  max-width: 390px;
  margin: 0 auto;
  background: rgba(255,255,255,0.12);
}

.page--thanks {
  background: #f3e7d9;
  padding: 18px 12px 84px;
}

.page--thanks .thank-you {
  max-width: 390px;
  margin: 0 auto;
  background: rgba(255,255,255,0.12);
}

.page--thanks .thank-you h2 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  color: #4a2326;
  font-family: "Segoe Print", "Palatino Linotype", cursive;
}

@media (max-width: 420px) {
  .page--couple .couple-grid {
    grid-template-columns: 1fr;
  }

  .page--gallery .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.page--story .story-block h2,
.page--story .story-block p {
  color: #f8eee3;
}

.page--countdown .countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.page--countdown .countdown__item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
}

.page--countdown .countdown__item span {
  font: 600 clamp(1.45rem, 7vw, 2rem)/1 var(--font-display);
}

.page--countdown .countdown__item small {
  color: #725655;
  font: 500 0.62rem/1.2 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page--rsvp .rsvp-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.rsvp-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 0;
}

.rsvp-field > label,
.rsvp-field legend {
  color: #6f4a48;
  font: 600 0.75rem/1.3 var(--font-sans);
  letter-spacing: 0.03em;
}

.rsvp-field input[type="text"],
.rsvp-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(112, 74, 72, 0.24);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.64);
  color: #493536;
  font: 400 0.85rem/1.3 var(--font-body);
}

.rsvp-field input[type="text"]:focus,
.rsvp-field select:focus {
  border-color: #b47a3a;
  box-shadow: 0 0 0 3px rgba(180, 122, 58, 0.14);
}

.radio-row {
  display: grid;
  gap: 8px;
}

.radio-row label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #574343;
  font-size: 0.85rem;
  line-height: 1.45;
}

.radio-row input {
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: #a45b4e;
}

.submit-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(110deg, #a96732, #d6aa52);
  color: #fffaf1;
  font: 600 0.72rem/1.2 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page--thanks .thank-you {
  padding: 16px;
}

/* Scrollable invitation interior */
#book {
  width: min(100%, 540px);
}

.scroll-layout .book {
  width: min(100%, 540px);
}

body.invitation-open {
  background: #f8f3eb;
  color: #493c34;
}

.scroll-layout .page:not(.page--cover) {
  padding: 34px clamp(22px, 7vw, 42px) 42px;
  background: #fbf8f2;
  color: #493c34;
  font-family: "Be Vietnam Pro", sans-serif;
}

.scroll-layout .page h2,
.scroll-layout .page h3 {
  color: #503c32;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

.scroll-layout .page p {
  color: #e1d9d5;
  font-family: "Be Vietnam Pro", sans-serif;
}

.scroll-layout .page .section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.scroll-layout .page .section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
}

.scroll-layout .page .section-kicker {
  margin: 0;
  color: #a17d51;
  font: 500 0.62rem/1.5 "Be Vietnam Pro", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-layout .page.page--story {
  padding: 0;
  overflow: hidden;
  background: #34251d;
}

.interior-hero {
  position: relative;
  display: grid;
  min-height: 0;
  aspect-ratio: 1/1.2;
  place-items: center;
  overflow: hidden;
  background: #34251d;
}

.interior-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.interior-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 19, 16, 0.2), rgba(30, 20, 15, 0.35) 38%, rgba(28, 18, 14, 0.82));
}

.interior-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px 20px 34px;
  color: #fffaf0;
  text-align: center;
}

.interior-hero__eyebrow {
  margin: 0 0 10px;
  color: #f3dfb8 !important;
  font: 400 0.62rem/1.5 "Be Vietnam Pro", sans-serif !important;
  letter-spacing: 0.2em;
}

.interior-hero__names {
  display: grid;
  justify-items: center;
  gap: 1px;
  margin: 0;
  color: #fffaf0 !important;
  font: 500 clamp(2rem, 9vw, 3.2rem)/1.08 "Playfair Display", Georgia, serif;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.interior-hero__amp {
  color: #e6ca8c;
  font-size: 0.65em;
  font-style: italic;
}

.interior-hero__invite {
  display: grid;
  gap: 3px;
  margin-top: 20px;
  color: #fffaf0;
  font: 400 0.65rem/1.5 "Be Vietnam Pro", sans-serif;
}

.interior-hero__invite strong {
  color: #fffaf0;
  font: 500 1rem/1.4 "Playfair Display", Georgia, serif;
}

.interior-hero__invite em {
  margin-top: 3px;
  color: rgba(255, 250, 240, 0.85);
  font-size: 0.58rem;
  font-style: normal;
}

.interior-hero__date {
  margin: 14px 0 0;
  color: #f3dfb8 !important;
  font: 500 0.66rem/1.5 "Be Vietnam Pro", sans-serif !important;
  letter-spacing: 0.22em;
}

.page--intro {
  display: grid;
  min-height: 300px;
  place-items: center;
  background: #f5eee3 !important;
  text-align: center;
}

.announcement {
  width: 100%;
  padding: 10px 0;
}

.announcement__ornament {
  display: block;
  margin-bottom: 12px;
  color: #b8935e;
}

.announcement h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 6vw, 2.8rem);
}

.announcement__subtitle {
  margin: 2px 0 0;
  font-family: "Playfair Display", Georgia, serif !important;
  font-size: 0.84rem;
  font-style: italic;
}

.announcement__rule {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 72%;
  margin: 18px auto;
  color: #b8935e;
}

.announcement__rule::before,
.announcement__rule::after {
  height: 1px;
  flex: 1;
  background: #d7c6a9;
  content: "";
}

.announcement__names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 0;
  color: #503c32 !important;
  font: 500 0.85rem/1.5 "Playfair Display", Georgia, serif !important;
}

.announcement__names span:nth-child(2) {
  color: #ad8957;
  font-style: italic;
}

.page--couple {
  background: #fbf8f2 !important;
}

.page--couple .couple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.page--couple .person-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.page--couple .person-card__image {
  aspect-ratio: 0.78;
  overflow: hidden;
  border: 1px solid #e6ddcf;
  border-radius: 2px;
  background: #eee5d9;
}

.page--couple .person-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page--couple .person-card h3 {
  margin: 14px 0 4px;
  color: #a17d51;
  font: 500 0.58rem/1.5 "Be Vietnam Pro", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page--couple .person-card p {
  margin: 0;
  color: #503c32;
  font: 500 0.96rem/1.5 "Playfair Display", Georgia, serif;
}

.page--details {
  background: #f5eee3 !important;
}

.page--details .date-card {
  margin: 0 0 18px;
  padding: 18px 12px;
  border: 1px solid #e0d2bd;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.page--details .date-card__headline {
  color: #7a5543;
  font: 500 clamp(1.8rem, 7vw, 2.5rem)/1.2 "Playfair Display", Georgia, serif;
  letter-spacing: 0.06em;
}

.page--details .date-card__row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 7px;
  color: #806b5b;
  font: 400 0.68rem/1.5 "Be Vietnam Pro", sans-serif;
  letter-spacing: 0.1em;
}

.event-cards {
  display: grid;
  gap: 12px;
}

.event-card {
  padding: 18px 16px;
  border: 1px solid #e3d8c8;
  background: #fbf8f2;
  text-align: center;
}

.event-card__eyebrow {
  color: #a17d51;
  font: 500 0.58rem/1.5 "Be Vietnam Pro", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.event-card h3 {
  margin: 7px 0;
  font-size: 1.4rem;
}

.event-card__time {
  margin: 0;
  color: #8c6448 !important;
  font: 500 1.05rem/1.5 "Playfair Display", Georgia, serif !important;
}

.event-card__venue {
  margin: 5px 0 10px;
  font-size: 0.72rem !important;
}

.event-card__map {
  color: #8c6448;
  font: 500 0.62rem/1.5 "Be Vietnam Pro", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page--timeline {
  background: #fbf8f2 !important;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0 0 0 10px;
  padding-left: 22px;
  border-left: 1px solid #d6c5a9;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 0 0 24px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  position: absolute;
  top: 5px;
  left: -27px;
  width: 9px;
  height: 9px;
  border: 1px solid #b8935e;
  border-radius: 50%;
  background: #fbf8f2;
  content: "";
}

.timeline__item time {
  color: #9a714c;
  font: 500 0.76rem/1.6 "Be Vietnam Pro", sans-serif;
}

.timeline__item div {
  display: grid;
  gap: 3px;
}

.timeline__item strong {
  color: #503c32;
  font: 500 0.9rem/1.4 "Playfair Display", Georgia, serif;
}

.timeline__item span {
  color: #806b5b;
  font: 400 0.67rem/1.5 "Be Vietnam Pro", sans-serif;
}

.page--dress {
  display: grid;
  min-height: 310px;
  place-items: center;
  background: #efe5d6 !important;
  text-align: center;
}

.dress-card h2 {
  margin: 8px 0;
  font-size: 1.9rem;
}

.dress-card > p:not(.section-kicker) {
  max-width: 320px;
  margin: 0 auto;
  font-size: 0.76rem;
}

.dress-card__swatches {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dress-card__swatches span {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(80, 60, 50, 0.12);
  border-radius: 50%;
  background: #f7f1e7;
}

.dress-card__swatches span:nth-child(2) { background: #d9cbb5; }
.dress-card__swatches span:nth-child(3) { background: #9a8270; }
.dress-card__swatches span:nth-child(4) { background: #4a3b33; }

.page--gallery {
  background: #fbf8f2 !important;
}

.page--gallery .section-heading h2 {
  max-width: 350px;
  margin-right: auto;
  margin-left: auto;
}

.page--gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-width: none;
  margin: 0;
}

.page--gallery .gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 0.82;
  border: 1px solid #e4dbce;
  border-radius: 1px;
  object-fit: cover;
}

.page--closing {
  display: grid;
  min-height: 320px;
  place-items: center;
  background: #efe5d6 !important;
  text-align: center;
}

.closing-card > span {
  color: #a17d51;
}

.closing-card p {
  margin: 12px 0 5px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.closing-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}

.closing-card h2 em {
  color: #a17d51;
  font-size: 0.75em;
}

.page--gift-scan,
.page--countdown,
.page--rsvp,
.page--thanks {
  background: #fbf8f2 !important;
}

.scroll-layout .page--gift-scan .gift-qr,
.scroll-layout .page--countdown .countdown,
.scroll-layout .page--rsvp .rsvp-form,
.scroll-layout .page--thanks .thank-you {
  max-width: none;
  border: 1px solid #e3d8c8;
  border-radius: 2px;
  background: #f5eee3;
  box-shadow: none;
}

.scroll-layout .page--gift-scan .gift-qr {
  padding: 18px;
}

.scroll-layout .page--gift-scan .gift-qr__title {
  font-family: "Playfair Display", Georgia, serif;
}

.scroll-layout .page--countdown .countdown {
  gap: 4px;
  padding: 12px 6px;
}

.scroll-layout .page--rsvp .rsvp-form {
  padding: 18px;
}

.scroll-layout .page--thanks .thank-you {
  padding: 26px 18px;
  text-align: center;
}

.scroll-layout .page--thanks .thank-you h2 {
  color: #503c32;
  font-family: "Playfair Display", Georgia, serif;
}

.page--gallery {
  background: #fff8f0 !important;
}

.scroll-layout .page.page--gallery {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.scroll-layout .page.page--gallery .section-heading h2 {
  color: #9d1f1f;
}

.scroll-layout .page.page--gallery .section-kicker {
  color: #a17d51;
}

.page--gallery .gallery-grid {
  position: relative;
  display: block;
  width: 100%;
  max-width: 390px;
  height: min(360px, max(240px, 40vh));
  height: min(360px, max(240px, 40svh));
  margin: 0 auto;
  overflow: visible;
}

.page--gallery .gallery-grid .gallery-photo {
  --album-x: 0px;
  --album-y: 0px;
  --album-rotate: 0deg;
  --album-scale: 1;
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 64%;
  height: 94%;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 16px 34px rgba(77, 47, 35, 0.2);
  cursor: zoom-in;
  transform: translate3d(calc(-50% + var(--album-x)), var(--album-y), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.page--gallery .gallery-grid .gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 3px;
  object-fit: cover;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(1) {
  --album-x: -126px;
  --album-y: 27px;
  --album-rotate: -9deg;
  --album-scale: 0.775;
  z-index: 1;
  filter: blur(1.65px);
  opacity: 0.58;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(2) {
  --album-x: -84px;
  --album-y: 18px;
  --album-rotate: 7deg;
  --album-scale: 0.85;
  z-index: 2;
  filter: blur(1.1px);
  opacity: 0.72;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(3) {
  --album-x: -42px;
  --album-y: 9px;
  --album-rotate: -5deg;
  --album-scale: 0.925;
  z-index: 3;
  filter: blur(0.55px);
  opacity: 0.86;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(4) {
  --album-rotate: 4deg;
  z-index: 6;
  filter: none;
  opacity: 1;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(5) {
  --album-x: 42px;
  --album-y: 9px;
  --album-scale: 0.925;
  z-index: 4;
  filter: blur(0.55px);
  opacity: 0.86;
}

.page--gallery .gallery-grid .gallery-photo:nth-child(6) {
  --album-x: 84px;
  --album-y: 18px;
  --album-rotate: -4deg;
  --album-scale: 0.85;
  z-index: 5;
  filter: blur(1.1px);
  opacity: 0.72;
}

.page--gallery .gallery-caption {
  margin: 12px 0 0;
  color: #8e6c5e;
  font: 400 clamp(0.9rem, 3.5vw, 1.05rem)/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  text-align: center;
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(1) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(2) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(3) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(4) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(5) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.scroll-reveal-ready .page--gallery .gallery-grid .gallery-photo.reveal-on-scroll:not(.is-visible):nth-child(6) {
  transform: translate3d(calc(-50% + var(--album-x)), calc(var(--album-y) + 22px), 0) rotate(var(--album-rotate)) scale(var(--album-scale));
}

.gallery-lightbox {
  position: fixed;
  z-index: 800;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(64px, env(safe-area-inset-top)) 20px max(54px, env(safe-area-inset-bottom));
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 12, 12, 0.94);
  backdrop-filter: blur(8px);
  cursor: default;
}

.gallery-lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 118px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  touch-action: pan-y;
}

.gallery-lightbox__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-lightbox__counter {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font: 500 0.8rem/1.2 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  letter-spacing: 0.12em;
}

.gallery-lightbox__close,
.gallery-lightbox__arrow {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 160ms ease, transform 160ms ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__arrow:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox__close {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  font: 300 1.8rem/1 Arial, sans-serif;
}

.gallery-lightbox__arrow {
  top: 50%;
  width: 46px;
  height: 46px;
  font: 300 2rem/1 Arial, sans-serif;
  transform: translateY(-50%);
}

.gallery-lightbox__arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.gallery-lightbox__arrow--prev { left: max(16px, env(safe-area-inset-left)); }
.gallery-lightbox__arrow--next { right: max(16px, env(safe-area-inset-right)); }

@media (max-height: 500px) {
  .page--gallery .gallery-grid {
    height: min(260px, max(170px, 38vh));
    height: min(260px, max(170px, 38svh));
  }
}

@media (max-width: 560px) {
  .page--gallery .gallery-grid {
    max-width: 360px;
  }

  .page--gallery .gallery-grid .gallery-photo {
    width: 70%;
  }

  .page--gallery .gallery-grid .gallery-photo:nth-child(1) {
    --album-x: -108px;
    --album-y: 27px;
  }

  .page--gallery .gallery-grid .gallery-photo:nth-child(2) {
    --album-x: -72px;
    --album-y: 18px;
  }

  .page--gallery .gallery-grid .gallery-photo:nth-child(3) {
    --album-x: -36px;
    --album-y: 9px;
  }

  .page--gallery .gallery-grid .gallery-photo:nth-child(5) {
    --album-x: 36px;
    --album-y: 9px;
  }

  .page--gallery .gallery-grid .gallery-photo:nth-child(6) {
    --album-x: 72px;
    --album-y: 18px;
  }
}

html.gallery-open,
html.gallery-open body {
  overflow: hidden;
}

.scroll-reveal-ready .page.reveal-on-scroll:not(.is-visible),
.scroll-reveal-ready .reveal-on-scroll:not(.is-visible) {
  opacity: 0;
  transform: translateY(22px);
}

.scroll-reveal-ready .page.reveal-on-scroll,
.scroll-reveal-ready .reveal-on-scroll {
  transition:
    opacity 1250ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal-ready .person-card:nth-child(2),
.scroll-reveal-ready .family-card:nth-child(2),
.scroll-reveal-ready .event-card:nth-child(2) {
  transition-delay: 140ms;
}

.scroll-reveal-ready .person-card.reveal-on-scroll:not(.is-visible):nth-child(odd),
.scroll-reveal-ready .family-card.reveal-on-scroll:not(.is-visible):nth-child(odd),
.scroll-reveal-ready .event-card.reveal-on-scroll:not(.is-visible):nth-child(odd) {
  transform: translate3d(-28px, 0, 0);
}

.scroll-reveal-ready .person-card.reveal-on-scroll:not(.is-visible):nth-child(even),
.scroll-reveal-ready .family-card.reveal-on-scroll:not(.is-visible):nth-child(even),
.scroll-reveal-ready .event-card.reveal-on-scroll:not(.is-visible):nth-child(even) {
  transform: translate3d(28px, 0, 0);
}

.scroll-reveal-ready .reveal-on-scroll.reveal-from-left:not(.is-visible) {
  transform: translate3d(-28px, 0, 0);
}

.scroll-reveal-ready .reveal-on-scroll.reveal-from-right:not(.is-visible) {
  transform: translate3d(28px, 0, 0);
}

.scroll-reveal-ready .page--story.reveal-on-scroll:not(.is-visible) {
  transform: translateY(18px);
}

.scroll-reveal-ready .reveal-on-scroll {
  will-change: opacity, transform;
}

@media (max-width: 420px) {
  #book {
    width: 100%;
  }

  .scroll-layout .page:not(.page--cover) {
    padding-right: 22px;
    padding-left: 22px;
  }

  .scroll-layout .page.page--story:not(.page--cover) {
    padding: 0;
  }
}

.book-nav {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(223, 196, 146, 0.2);
  border-radius: 999px;
  background: rgba(35, 57, 60, 0.94);
  color: #fff4e8;
  box-shadow: 0 8px 24px rgba(15, 30, 32, 0.2);
  backdrop-filter: blur(10px);
}

.book-nav__arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: inherit;
}

.book-nav__arrow:disabled {
  opacity: 0.38;
  cursor: default;
}

.book-nav__dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.book-nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 244, 232, 0.38);
}

.book-nav__dot.is-active {
  width: 16px;
  border-radius: 999px;
  background: #dfb55d;
}

.swipe-hint {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(223, 196, 146, 0.16);
  border-radius: 999px;
  background: rgba(35, 57, 60, 0.88);
  color: #fff4e8;
  font-size: 0.75rem;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.swipe-hint.hidden {
  opacity: 0;
  visibility: hidden;
}

.swipe-hint p {
  margin: 0;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

.swipe-hint__icon {
  color: #dfb55d;
}

.floating-tools {
  position: fixed;
  z-index: 100;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.floating-tools__button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 244, 232, 0.24);
  border-radius: 50%;
  background: rgba(35, 57, 60, 0.82);
  color: #fff4e8;
  backdrop-filter: blur(8px);
}

.floating-tools__button svg {
  width: 17px;
  height: 17px;
}

.music-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gift-modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gift-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gift-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 25, 0.68);
  backdrop-filter: blur(5px);
}

.gift-modal__card {
  position: relative;
  width: min(100%, 400px);
  padding: 28px 22px 22px;
  border: 1px solid rgba(174, 126, 67, 0.34);
  border-radius: 16px;
  background: #f7ecde;
  color: #493536;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.gift-modal__close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(112, 74, 72, 0.08);
  color: inherit;
}

.gift-modal__eyebrow {
  margin-bottom: 6px;
  color: #a35b4f;
  font: 600 0.68rem/1.3 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gift-modal__title {
  margin-bottom: 18px;
  color: #493536;
  font: 600 1.6rem/1.2 var(--font-display);
}

.gift-modal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 0;
  border-top: 1px solid rgba(112, 74, 72, 0.12);
}

.gift-modal__label {
  color: #8a6c64;
  font: 500 0.65rem/1.3 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gift-modal__value {
  color: #493536;
  font: 500 0.95rem/1.4 var(--font-body);
}

.gift-modal__copy {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  color: #493536;
  text-align: left;
}

.gift-modal__copied {
  opacity: 0;
  color: #38745b;
  font-size: 0.72rem;
  transition: opacity 0.2s ease;
}

.gift-modal__copy.is-copied .gift-modal__copied {
  opacity: 1;
}

.gift-modal__note {
  margin-top: 14px;
  color: #8a6c64;
  font: italic 0.9rem/1.4 var(--font-display);
  text-align: center;
}

.book:not(.opened) ~ .floating-tools,
.book:not(.opened) ~ .book-nav,
.book:not(.opened) ~ .swipe-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 420px) {
  .book-nav {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .book-nav__dots {
    gap: 4px;
  }

  .book-nav__dot {
    width: 5px;
    height: 5px;
  }

  .book-nav__dot.is-active {
    width: 13px;
  }

  .floating-tools {
    top: 12px;
    right: 12px;
  }
}

.book-nav {
  gap: 4px;
  padding: 4px 5px;
  border-color: rgba(151, 124, 88, 0.2);
  background: rgba(249, 246, 239, 0.9);
  color: #715c48;
  box-shadow: 0 4px 18px rgba(63, 48, 36, 0.13);
}

.book-nav__arrow {
  width: 30px;
  height: 30px;
}

.book-nav__dots {
  gap: 4px;
}

.book-nav__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  background: rgba(113, 92, 72, 0.35);
}

.book-nav__dot.is-active {
  width: 13px;
  background: #a17d51;
}

.floating-tools {
  top: auto;
  right: 14px;
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 52px));
}

.floating-tools__button {
  border-color: rgba(151, 124, 88, 0.25);
  background: rgba(249, 246, 239, 0.92);
  color: #715c48;
}

.menu-button {
  display: none;
}

.swipe-hint {
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 58px));
  border-color: rgba(151, 124, 88, 0.2);
  background: rgba(249, 246, 239, 0.92);
  color: #715c48;
}

.book.opened ~ .swipe-hint {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal-ready .page.reveal-on-scroll,
  .scroll-reveal-ready .reveal-on-scroll,
  .scroll-reveal-ready .reveal-on-scroll.reveal-from-left,
  .scroll-reveal-ready .reveal-on-scroll.reveal-from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cover-card {
    animation: none;
  }

  .cover-card::after {
    animation: none;
    opacity: 0;
  }
}

body.invitation-open {
  background: #fff8f0;
  color: #2c1810;
}

.scroll-layout .page:not(.page--cover) {
  position: relative;
  z-index: 1;
  /* padding: 44px 24px; */
  background: #fff;
  color: #2c1810;
  font-family: "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.scroll-layout .page h2,
.scroll-layout .page h3 {
  color: #2c1810;
  font-family: "Playfair Display", "Noto Serif", Georgia, serif;
}

.scroll-layout .page p {
  color: #8e6c5e;
  font-family: "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.scroll-layout .page .section-kicker {
  color: #c9993e;
  font: 700 0.6875rem/1.6 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.scroll-layout .page .section-heading h2 {
  color: #9d1f1f;
  font: 600 clamp(1.7rem, 5vw, 2.2rem)/1.2 "Playfair Display", "Noto Serif", Georgia, serif;
}

.scroll-layout .page--intro {
  min-height: 340px;
  background: linear-gradient(155deg, #9d1f1f, #671719) !important;
}

.scroll-layout .page--intro .section-kicker,
.scroll-layout .page--intro h2,
.scroll-layout .page--intro .announcement__subtitle,
.scroll-layout .page--intro .announcement__names {
  color: #fff8f0;
}

.scroll-layout .page--intro .announcement__names span:nth-child(2),
.scroll-layout .page--intro .announcement__ornament,
.scroll-layout .page--intro .announcement__rule {
  color: #e2bd78;
}

.scroll-layout .page--couple,
.scroll-layout .page--details,
.scroll-layout .page--dress,
.scroll-layout .page--gift-scan,
.scroll-layout .page--countdown,
.scroll-layout .page--rsvp {
  background: #fff8f0 !important;
}

.scroll-layout .page--family {
  padding: 48px 24px !important;
  background: #fff !important;
}

.family-heading {
  margin-bottom: 22px;
  text-align: center;
}

.scroll-layout .page .family-heading .section-kicker {
  margin: 0 0 8px;
  font-size: 0.6875rem;
}

.family-divider {
  display: flex;
  width: 58%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  color: #c9993e;
  font-size: 0.52rem;
}

.family-divider span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, #dec995);
}

.family-divider span:last-child {
  transform: scaleX(-1);
}

.family-grid {
  display: grid;
  gap: 18px;
}

.family-card {
  padding: 22px 24px;
  border: 1px solid #e8dfd1;
  border-left: 3px solid #c9993e;
  border-radius: 5px;
  background: #fff;
}

.scroll-layout .page .family-card__side {
  margin: 0 0 8px;
  color: #c9993e;
  font: 700 0.7rem/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-layout .page .family-card__name {
  margin: 0 0 10px;
  color: #9d1f1f;
  font: 700 1.25rem/1.35 "Playfair Display", "Noto Serif", Georgia, serif;
}

.scroll-layout .page .family-card__parents {
  margin: 0;
  color: #8e6c5e;
  font: 400 0.8125rem/1.75 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.scroll-layout .page .family-card__parents strong {
  color: #2c1810;
  font-weight: 600;
}

.scroll-layout .page--details .date-card,
.scroll-layout .page--details .event-card,
.scroll-layout .page--countdown .countdown,
.scroll-layout .page--rsvp .rsvp-form {
  border-color: #e8dfd1;
  border-radius: 6px;
  box-shadow: none;
}

.scroll-layout .page--details .date-card__headline,
.scroll-layout .page--details .event-card__time,
.scroll-layout .page--countdown .countdown__item span {
  color: #9d1f1f !important;
}

.scroll-layout .page--details .event-card__eyebrow,
.scroll-layout .page--timeline .timeline__item time {
  color: #c9993e;
}

.scroll-layout .page--timeline {
  background: #fff !important;
}

.scroll-layout .page--dress {
  min-height: 320px;
}

.scroll-layout .page--closing {
  background: #70191b !important;
}

.scroll-layout .page--closing .closing-card,
.scroll-layout .page--closing .closing-card p,
.scroll-layout .page--closing .closing-card h2 {
  color: #fff8f0;
}

.scroll-layout .page--closing .closing-card > span {
  color: #e2bd78;
}

@media (max-width: 420px) {
  .scroll-layout .page--family {
    padding: 42px 22px !important;
  }

  .family-card {
    padding: 20px;
  }
}

.event-schedule {
  margin: 18px 0 20px;
}

.event-schedule > .section-kicker {
  margin: 0 0 8px;
}

.event-schedule__rows {
  overflow: hidden;
  border: 1px solid #eadfce;
  border-radius: 5px;
  background: #fff;
}

.event-schedule__row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px;
  color: #8e6c5e;
  font: 400 0.8rem/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.event-schedule__row + .event-schedule__row {
  border-top: 1px solid #f0e9df;
}

.event-schedule__row strong {
  color: #2c1810;
  font-weight: 700;
}

.scroll-layout .page--details .countdown--details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 22px;
}

.scroll-layout .page--details .countdown--details .countdown__item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border: 1px solid #f0e3db;
  border-radius: 12px;
  background: #fff;
}

.scroll-layout .page--details .countdown--details .countdown__item span {
  font: 700 clamp(1.25rem, 5vw, 1.8rem)/1.15 "Playfair Display", Georgia, serif;
}

.scroll-layout .page--details .countdown--details .countdown__item small {
  color: #8e6c5e;
  font: 600 0.65rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.wedding-calendar {
  overflow: hidden;
  margin: 18px 0 22px;
  border: 1px solid #f0e3db;
  border-radius: 12px;
  background: #fff;
}

.wedding-calendar__header {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: #9d1f1f;
  color: #fff8f0;
  font: 600 0.82rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.wedding-calendar__weekdays,
.wedding-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  justify-items: center;
}

.wedding-calendar__weekdays {
  padding: 11px 8px 3px;
  color: #8e6c5e;
  font: 700 0.62rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.wedding-calendar__days {
  padding: 2px 8px 12px;
  row-gap: 3px;
}

.wedding-calendar__day,
.wedding-calendar__empty {
  display: grid;
  width: min(34px, 100%);
  aspect-ratio: 1;
  place-items: center;
}

.wedding-calendar__day {
  border-radius: 50%;
  color: #493c34;
  font: 400 0.75rem/1 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.wedding-calendar__day.is-wedding-day {
  background: #9d1f1f;
  color: #fff;
  font-weight: 700;
}

.wedding-venue {
  position: relative;
  padding: 0 0 8px;
  text-align: center;
}

.scroll-layout .page .wedding-venue h3 {
  margin: 0 0 4px;
  color: #c9993e;
  font: 700 1rem/1.45 "Playfair Display", Georgia, serif;
}

.scroll-layout .page .wedding-venue p {
  margin: 0 0 12px;
  color: #8e6c5e;
  font: 400 0.75rem/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.wedding-map {
  overflow: hidden;
  height: 280px;
  border: 1px solid #e8dfd1;
  border-radius: 10px;
  background: #f3eadc;
}

.wedding-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.wedding-venue__directions {
  position: absolute;
  right: 12px;
  bottom: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #9d1f1f;
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.2);
  color: #fff;
  font: 600 0.72rem/1.3 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  text-decoration: none;
}

.scroll-layout .page--gift-scan {
  background: #fff8f0 !important;
}

.gift-envelope {
  position: relative;
  display: flex;
  min-height: 530px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 34px 26px;
  border: 1px solid rgba(201, 153, 62, 0.42);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(201, 153, 62, 0.2), transparent 42%),
    linear-gradient(145deg, #541319, #9d2922 55%, #57121d);
  box-shadow: 0 18px 46px rgba(75, 22, 24, 0.2);
  color: #fff8f0;
  text-align: center;
}

.gift-envelope__ornament {
  display: flex;
  width: 76%;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #e2bd78;
  font-size: 0.55rem;
}

.gift-envelope__ornament i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(226, 189, 120, 0.65), transparent);
}

.gift-envelope__art {
  position: relative;
  width: 104px;
  height: 76px;
  margin-bottom: 16px;
  border: 1px solid rgba(226, 189, 120, 0.5);
  background: rgba(255, 248, 240, 0.12);
}

.gift-envelope__flap {
  position: absolute;
  inset: -1px -1px auto;
  height: 48px;
  background: #c9993e;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.gift-envelope__heart {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  color: #e2bd78;
  font-size: 1.4rem;
}

.scroll-layout .page .gift-envelope h2 {
  margin: 0 0 10px;
  color: #fff8f0;
  font: 700 clamp(1.45rem, 5vw, 1.85rem)/1.25 "Playfair Display", Georgia, serif;
}

.scroll-layout .page .gift-envelope > p {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 248, 240, 0.88);
  font: italic 400 0.82rem/1.6 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.gift-envelope__hint {
  margin-top: 16px;
  color: rgba(255, 248, 240, 0.82);
  font: 400 0.7rem/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.gift-envelope__button {
  margin-top: 24px;
  padding: 10px 22px;
  border: 1px solid rgba(226, 189, 120, 0.75);
  border-radius: 999px;
  color: #f1d17f;
  font: 700 0.68rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.gift-modal__card {
  width: min(100%, 440px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  padding: 44px 20px 24px;
  border: 1px solid rgba(201, 153, 62, 0.3);
  border-radius: 4px;
  background: #fff8f0;
}

.gift-modal__close {
  width: auto;
  min-width: 48px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #ead7b9;
  border-radius: 999px;
  background: transparent;
  color: #8e6c5e;
  font: 500 0.72rem/1 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.gift-modal__title {
  margin: 0 0 6px;
  color: #9d1f1f;
  font: 700 1.4rem/1.3 "Playfair Display", Georgia, serif;
  text-align: center;
}

.gift-modal__subtitle {
  margin: 0 0 20px;
  color: #8e6c5e;
  font: 400 0.78rem/1.5 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  text-align: center;
}

.gift-modal__accounts {
  display: grid;
  gap: 14px;
}

.gift-account {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f0dcbf;
  border-radius: 5px;
  background: #fff3e1;
}

.gift-account__qr {
  display: block;
  width: 84px;
  aspect-ratio: 1;
  padding: 4px;
  background: #fff;
  object-fit: contain;
}

.gift-account__info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.gift-account__label {
  color: #c9993e;
  font: 700 0.65rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gift-account__name {
  overflow-wrap: anywhere;
  color: #2c1810;
  font: 700 0.78rem/1.35 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.gift-account__bank,
.gift-account__number {
  color: #8e6c5e;
  font: 400 0.68rem/1.4 "Be Vietnam Pro", Inter, system-ui, sans-serif;
}

.gift-account__number {
  width: fit-content;
  text-align: left;
}

.gift-account__number.is-copied::after {
  color: #38745b;
  content: "Đã sao chép";
}

.gift-account__download {
  display: grid;
  min-height: 40px;
  place-items: center;
  padding: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(44, 24, 16, 0.1);
  color: #9d1f1f;
  font: 600 0.68rem/1.25 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 380px) {
  .gift-account {
    grid-template-columns: 70px minmax(0, 1fr) 54px;
    gap: 7px;
    padding: 9px;
  }

  .gift-account__qr {
    width: 70px;
  }
}

/* Wedding invitation typography and sunset palette */
body.scroll-layout :is(
  p, span, label, button, input, select, legend, strong, small, a, time,
  .section-kicker
) {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif !important;
}

body.scroll-layout :is(h1, h2, h3, h4, h5, h6) {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif !important;
}

.scroll-layout .page p {
  color: #70544a;
  font-size: clamp(1rem, 3.8vw, 1.15rem);
  line-height: 1.7;
}

.scroll-layout .page .section-kicker {
  color: #9a6337;
  font-size: clamp(0.82rem, 3vw, 0.95rem);
  letter-spacing: 0.16em;
}

.scroll-layout .page--intro {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 216, 151, 0.3), transparent 58%),
    linear-gradient(155deg, #c8783e 0%, #a95432 54%, #793b2d 100%) !important;
}

.scroll-layout .page--intro .section-kicker,
.scroll-layout .page--intro h2,
.scroll-layout .page--intro .announcement__subtitle,
.scroll-layout .page--intro .announcement__names {
  color: #fff5e8;
}

.scroll-layout .page--intro .section-kicker {
  font-size: clamp(0.88rem, 3.2vw, 1rem);
}

.scroll-layout .page--intro .announcement h2 {
  font-size: clamp(2.15rem, 8vw, 2.8rem);
  text-shadow: 0 2px 12px rgba(67, 31, 22, 0.24);
}

.scroll-layout .page--intro .announcement__subtitle {
  font-size: clamp(1rem, 3.8vw, 1.15rem);
}

.scroll-layout .page--intro .announcement__names {
  font-size: clamp(1.05rem, 4vw, 1.25rem);
}

.scroll-layout .page--intro .announcement__names span:nth-child(2),
.scroll-layout .page--intro .announcement__ornament,
.scroll-layout .page--intro .announcement__rule {
  color: #ffe0a6;
}

.scroll-layout .page--intro .announcement__rule::before,
.scroll-layout .page--intro .announcement__rule::after {
  background: rgba(255, 229, 188, 0.72);
}

.scroll-layout .page--intro .announcement__names,
.scroll-layout .page--intro .announcement__names span {
  color: #fffaf1 !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 5px rgba(67, 31, 22, 0.45);
}

.scroll-layout .page--intro .announcement__names span:nth-child(2) {
  color: #ffe0a6 !important;
}

.scroll-layout .page--intro .announcement__subtitle {
  color: #fff4e3 !important;
  text-shadow: 0 1px 4px rgba(67, 31, 22, 0.38);
}

/* Deep rose wedding palette and photo interludes */
html,
body,
body.scroll-layout {
  background: #4b1821;
}

.scroll-layout .page--intro {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(245, 184, 142, 0.2), transparent 58%),
    linear-gradient(155deg, #9b3440 0%, #7c202e 54%, #521720 100%) !important;
}

.scroll-layout .page--couple,
.scroll-layout .page--family,
.scroll-layout .page--details,
.scroll-layout .page--dress,
.scroll-layout .page--gift-scan,
.scroll-layout .page--countdown,
.scroll-layout .page--rsvp,
.scroll-layout .page--thanks {
  background: #fbf1ed !important;
}

.scroll-layout .page--family {
  background: #f7e9e5 !important;
}

.scroll-layout .page--closing {
  background: linear-gradient(155deg, #832633, #541720) !important;
}

.scroll-layout .page--closing .closing-card,
.scroll-layout .page--closing .closing-card p,
.scroll-layout .page--closing .closing-card h2 {
  color: #fff5eb !important;
}

.scroll-layout .page--closing .closing-card > span,
.scroll-layout .page--closing .closing-card h2 em {
  color: #e8bd82 !important;
}

.scroll-layout .page .section-heading h2,
.scroll-layout .page .family-card__name,
.scroll-layout .page--details .date-card__headline,
.scroll-layout .page--details .event-card h3 {
  color: #762431 !important;
}

.scroll-layout .page .section-kicker,
.scroll-layout .page .family-card__side,
.scroll-layout .page--details .event-card__eyebrow {
  color: #a64c55 !important;
}

.scroll-layout .page .family-card,
.scroll-layout .page--details .event-card,
.scroll-layout .page--details .date-card,
.scroll-layout .page--rsvp .rsvp-form,
.scroll-layout .page--thanks .thank-you {
  border-color: #e7c9c2;
  background-color: #fff9f6;
}

.scroll-layout .page .family-card {
  border-left-color: #a43a49;
}

.scroll-layout .page--photo-moment {
  padding: 18px 18px 22px !important;
  background: #f3e1dc !important;
}

.photo-moment {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(126, 40, 51, 0.26);
  background: #fff8f4;
  box-shadow: 0 8px 22px rgba(77, 24, 33, 0.13);
}

.photo-moment img {
  display: block;
  width: 100%;
  aspect-ratio: 1.12 / 1;
  object-fit: cover;
}

.photo-moment figcaption,
.photo-moment__caption {
  margin: 0;
  padding: 11px 8px 12px;
  color: #7c3039 !important;
  font: italic 500 1.05rem/1.4 "Cormorant Garamond", "Playfair Display", Georgia, serif !important;
  text-align: center;
}

.photo-moment__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.photo-moment__pair .photo-moment img {
  aspect-ratio: 0.78 / 1;
}

.photo-moment__caption {
  padding-bottom: 0;
}

@media (min-width: 600px) {
  .scroll-layout .page--photo-moment {
    padding-right: 28px !important;
    padding-left: 28px !important;
  }

  .photo-moment img {
    aspect-ratio: 1.5 / 1;
  }

  .photo-moment__pair .photo-moment img {
    aspect-ratio: 0.9 / 1;
  }
}
