:root {
  --ivory: #FFFAF3;
  --champagne: #F2DFCC;
  --rose: #DCB5A4;
  --gold: #B78E51;
  --wine: #762C40;
  --deepWine: #48232C;
  --ink: #3D1E26;
  --muted: #7C565E;

  --display: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', 'Cormorant Garamond', Georgia, cursive;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --arabic: 'Amiri', 'Noto Naskh Arabic', serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  background: var(--ivory);
  color: var(--ink);
}

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

body.entrance-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

body.entrance-locked .petal {
  animation-play-state: paused !important;
}

::selection {
  background: rgba(118, 44, 64, 0.16);
  color: var(--deepWine);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button, a, summary, [role="button"], .wax, .stationery-pull, .folio-seal {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button {
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
}

p, h1, h2, h3 {
  margin: 0;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.arabic {
  font-family: var(--arabic);
  font-weight: 400;
  line-height: 1.85;
}

.editorial-heading {
  font-family: var(--display);
  font-size: clamp(32px, 7.6vw, 48px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--deepWine);
}

/* Shared Interactive Controls */
.wine-button,
.ivory-pill-button,
.wine-contrast-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 28px;
  border-radius: 999px;
  font: 500 11px/1.3 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 130ms var(--ease-out), opacity 130ms var(--ease-out), background-color 180ms ease, box-shadow 180ms ease;
}

.wine-button {
  background: var(--wine);
  color: var(--ivory);
  border: 1px solid rgba(183, 142, 81, 0.45);
  box-shadow: 0 10px 24px -10px rgba(72, 35, 44, 0.45);
}

.ivory-pill-button {
  background: var(--ivory);
  color: var(--deepWine);
  border: 1px solid rgba(183, 142, 81, 0.65);
  box-shadow: 0 12px 26px -12px rgba(24, 9, 13, 0.55);
}

.wine-contrast-button {
  background: var(--ivory);
  color: var(--deepWine);
  border: 1px solid rgba(183, 142, 81, 0.7);
  box-shadow: 0 12px 28px -12px rgba(24, 9, 13, 0.5);
}

.wine-button:active:not(:disabled):not([aria-disabled="true"]),
.ivory-pill-button:active:not(:disabled):not([aria-disabled="true"]),
.wine-contrast-button:active:not(:disabled):not([aria-disabled="true"]),
.wine-button.is-pressed:not(:disabled),
.ivory-pill-button.is-pressed:not(:disabled) {
  transform: scale(0.97);
  opacity: 0.92;
}

.wine-button:disabled,
.ivory-pill-button:disabled,
[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}

.discreet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  margin-top: 12px;
  border: 0;
  border-bottom: 1px solid rgba(183, 142, 81, 0.55);
  background: none;
  color: var(--wine);
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 130ms var(--ease-out), opacity 130ms var(--ease-out);
}

.discreet-link:active:not(:disabled) {
  transform: scale(0.97);
  opacity: 0.72;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.is-loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

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

@media (hover: hover) and (pointer: fine) {
  .wine-button:hover:not(:disabled) {
    background: var(--deepWine);
  }
  .ivory-pill-button:hover:not(:disabled),
  .wine-contrast-button:hover:not(:disabled) {
    background: var(--champagne);
  }
  .discreet-link:hover:not(:disabled) {
    opacity: 0.72;
  }
  .icon-pill:hover:not(:disabled),
  .chapter-toggle:hover {
    background: rgba(242, 223, 204, 0.92);
  }
  .folio-seal:hover {
    transform: scale(1.03);
  }
  .wax:hover:not(:disabled) {
    filter: brightness(1.07);
  }
}

/* ---------------------------------------------------------------------------
   Opening Experience: Luxury Wine Stationery Folio on Silk Ground
--------------------------------------------------------------------------- */
.entrance {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) 20px max(24px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

.entrance-silk {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: opacity;
  background:
    radial-gradient(ellipse at 50% 25%, #FFFAF3 0%, #F5E6D6 56%, #E6C7B8 100%);
}

.folio-stage {
  position: relative;
  z-index: 2;
  width: min(88vw, 410px);
  display: grid;
  place-items: center;
}

.folio-card {
  position: relative;
  width: 100%;
  min-height: min(70svh, 540px);
  padding: 44px 28px 36px;
  border-radius: 14px;
  will-change: transform, opacity;
  background:
    radial-gradient(circle at 50% 18%, rgba(183, 142, 81, 0.16), transparent 55%),
    linear-gradient(155deg, var(--wine) 0%, var(--deepWine) 100%);
  color: var(--ivory);
  box-shadow: 0 18px 36px -14px rgba(72, 35, 44, 0.38);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}

.folio-border {
  position: absolute;
  inset: 14px;
  border-radius: 8px;
  border: 1px solid rgba(183, 142, 81, 0.45);
  pointer-events: none;
}

.folio-floral {
  position: absolute;
  width: 108px;
  height: 108px;
  color: rgba(242, 223, 204, 0.48);
  pointer-events: none;
}

.folio-floral-tl {
  top: 10px;
  left: 10px;
}

.folio-floral-br {
  bottom: 10px;
  right: 10px;
  transform: rotate(180deg);
}

.folio-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.guest-greeting {
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--champagne);
  border-bottom: 1px solid rgba(183, 142, 81, 0.4);
  padding-bottom: 6px;
}

.folio-eyebrow {
  font: 500 10.5px/1.6 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 223, 204, 0.9);
}

.folio-seal {
  position: relative;
  width: clamp(118px, 31vw, 144px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(183, 142, 81, 0.72);
  background: radial-gradient(circle at 35% 30%, rgba(183, 142, 81, 0.22), rgba(72, 35, 44, 0.55));
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: inset 0 0 0 6px rgba(72, 35, 44, 0.45), inset 0 0 0 7px rgba(183, 142, 81, 0.35);
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out);
}

.folio-seal:active {
  transform: scale(0.95);
}

.seal-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(183, 142, 81, 0.28);
  pointer-events: none;
}

.seal-arabic {
  font-family: var(--arabic);
  font-size: 16px;
  line-height: 1.25;
  color: var(--champagne);
}

.seal-latin {
  font-family: var(--script);
  font-size: clamp(32px, 8.5vw, 42px);
  line-height: 1.05;
  color: var(--ivory);
}

.folio-title {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(22px, 5.8vw, 28px);
  letter-spacing: 0.01em;
  color: var(--champagne);
}

.folio-cta-wrap {
  margin-top: 6px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.entrance-status {
  min-height: 18px;
  font: 500 12px/1.3 var(--sans);
  color: var(--champagne);
}

.curtains {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  pointer-events: none;
}

.curtain-wing {
  width: 50%;
  height: 100%;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Main Continuous Shell & Floating Header
--------------------------------------------------------------------------- */
main {
  position: relative;
  max-width: 860px;
  margin: auto;
  background: var(--ivory);
  overflow-x: hidden;
}

.top-bar-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(255, 250, 243, 0.84) 72%, rgba(255, 250, 243, 0) 100%);
}

.top-mono {
  justify-self: center;
  text-decoration: none;
  font-family: var(--script);
  font-size: 26px;
  color: var(--wine);
  line-height: 1;
  padding: 4px 10px;
}

.icon-pill {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(183, 142, 81, 0.42);
  background: rgba(255, 250, 243, 0.85);
  color: var(--deepWine);
  display: grid;
  place-items: center;
  transition: transform 130ms var(--ease-out), background-color 160ms ease;
}

.icon-pill:active {
  transform: scale(0.93);
}

.music-btn {
  grid-column: 3;
}

.scene {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 96px) 24px;
}

.event-section,
.keepsake,
.closing {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

.section-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: auto;
}

/* ---------------------------------------------------------------------------
   Chapter 1: Editorial Couple Reveal (Pearl Ivory Luxury Suite)
--------------------------------------------------------------------------- */
.hero {
  min-height: calc(100svh - 62px);
  padding: 20px 20px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 24%, rgba(242, 223, 204, 0.72) 0%, rgba(255, 250, 243, 0.98) 65%),
    linear-gradient(180deg, var(--ivory) 0%, #FBF0E4 100%);
}

.foreground-floral,
.petal-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.foreground-floral { z-index: 4; }
.petal-layer { z-index: 1; }

.petal {
  position: absolute;
  width: 14px;
  height: 20px;
  color: rgba(220, 181, 164, 0.42);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .petal {
    animation: petalFloat 11s ease-in-out infinite;
  }
  .p1 { left: 12%; top: 14%; animation-delay: 0s; }
  .p2 { right: 14%; top: 22%; animation-delay: 2.8s; color: rgba(183, 142, 81, 0.28); }
  .p3 { left: 18%; bottom: 20%; animation-delay: 5.2s; }
  .p4 { right: 16%; bottom: 18%; animation-delay: 7.4s; color: rgba(220, 181, 164, 0.35); }
}

@keyframes petalFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.65; }
  50% { transform: translate3d(10px, 24px, 0) rotate(18deg); opacity: 0.45; }
  80% { opacity: 0.55; }
}

.floral-corner-line {
  position: absolute;
  top: 10px;
  width: clamp(86px, 22vw, 136px);
  height: auto;
  color: var(--rose);
  pointer-events: none;
  z-index: 1;
}

.floral-corner-tl {
  left: 8px;
}

.floral-corner-tr {
  right: 8px;
  transform: scaleX(-1);
}

.hero-composition {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 24px;
}

.hero-suite {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.guest-hero-greeting {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine);
}

.bismillah {
  font-size: clamp(22px, 5.8vw, 30px);
  color: var(--wine);
}

.hero-smallcaps {
  font: 500 10.5px/1.5 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.couple-names {
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 9.6vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--deepWine);
}

.name-line {
  display: block;
}

.ampersand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 3px 0 2px;
}

.hairline {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ampersand-row .hairline:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ampersand {
  font-family: var(--script);
  font-style: normal;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1;
  color: var(--gold);
}

.hero-blessing {
  margin-top: 4px;
  font-size: 19px;
  font-style: italic;
  font-weight: 500;
  color: var(--wine);
}

.hero-invitation {
  max-width: 35ch;
  font-size: clamp(17.5px, 4.2vw, 20px);
  line-height: 1.56;
  color: var(--ink);
}

.script-title {
  font-family: var(--script);
  font-size: clamp(28px, 7vw, 38px);
  color: var(--gold);
  line-height: 1.1;
}

.hero-event-tag {
  margin-top: 2px;
  font: 500 10.5px/1.5 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-illustration {
  position: relative;
  width: min(88vw, 360px);
  padding: 18px 10px 6px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-arch-wash {
  position: absolute;
  inset: 2% 2% 0;
  border-radius: 190px 190px 18px 18px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(242, 223, 204, 0.72) 0%, rgba(220, 181, 164, 0.22) 66%, transparent 100%);
  border-top: 1px solid rgba(183, 142, 81, 0.28);
  pointer-events: none;
}

.hero-couple-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(46svh, 350px);
  object-fit: contain;
}

@media (min-width: 760px) {
  .hero-composition {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 32px;
  }
  .hero-illustration {
    width: 100%;
    max-width: 390px;
  }
  .hero-couple-img {
    max-height: min(62svh, 460px);
  }
}

.scroll-cue {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  text-decoration: none;
  font: 500 10px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine);
  transition: transform 140ms var(--ease-out), opacity 140ms var(--ease-out);
}

.scroll-cue:active {
  transform: translateY(2px);
  opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   Chapter 2: Suspended Stationery Note (No bulky cylinders)
--------------------------------------------------------------------------- */
.scroll-section {
  background: linear-gradient(180deg, #FDF4EA 0%, var(--champagne) 22%, var(--champagne) 78%, var(--ivory) 100%);
  padding-top: 64px;
  padding-bottom: 68px;
}

.scroll-section .editorial-heading {
  margin-bottom: 26px;
}

.scroll-object {
  max-width: 380px;
  margin: auto;
  position: relative;
  padding-top: 40px;
}

.scroll-cord {
  position: absolute;
  left: 6%;
  top: 0;
  width: 88%;
  height: 44px;
  color: var(--gold);
}

.stationery-bar {
  position: relative;
  z-index: 3;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #98713C, #DEC08E 45%, #B78E51 75%, #8D6633);
  box-shadow: 0 4px 10px rgba(72, 35, 44, 0.18);
}

.scroll-stage {
  position: relative;
  padding-bottom: 58px;
}

.scroll-paper {
  position: relative;
  margin: 0 18px;
  min-height: 224px;
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 181, 164, 0.16), transparent 60%),
    var(--ivory);
  color: var(--ink);
  padding: 28px 24px 32px;
  box-shadow: 0 18px 36px -18px rgba(72, 35, 44, 0.28);
  overflow: hidden;
}

.scroll-decor {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(183, 142, 81, 0.38);
}

.scroll-paper-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.ornament-diamond {
  font-size: 14px;
  color: var(--gold);
}

.scroll-paper p {
  font-size: 21px;
  line-height: 1.5;
  color: var(--deepWine);
}

.stationery-pull {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: none;
  cursor: grab;
}

.stationery-pull:active {
  cursor: grabbing;
}

.pull-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #98713C, #DEC08E 45%, #B78E51 75%, #8D6633);
  box-shadow: 0 5px 12px rgba(72, 35, 44, 0.22);
}

.tassel {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -1px;
  transition: transform 200ms var(--ease-out);
}

.tassel-knot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #D9B67D, var(--gold));
  border: 1px solid rgba(72, 35, 44, 0.25);
  box-shadow: 0 3px 6px rgba(72, 35, 44, 0.2);
}

.tassel-skirt {
  width: 18px;
  height: 30px;
  margin-top: -2px;
  clip-path: polygon(28% 0%, 72% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, var(--wine) 0%, var(--deepWine) 100%);
  box-shadow: 0 6px 12px rgba(72, 35, 44, 0.28);
}

.stationery-pull[aria-expanded="true"] .tassel {
  transform: scaleY(0.86);
}

/* ---------------------------------------------------------------------------
   Chapter 3: Bring Us Together -> Golden Thread Monogram -> Date Reveal
--------------------------------------------------------------------------- */
.date-section {
  background:
    radial-gradient(ellipse at 50% 44%, rgba(242, 223, 204, 0.56) 0%, rgba(255, 250, 243, 0.98) 70%);
  padding-top: 62px;
  padding-bottom: 58px;
}

.chapter-sub {
  margin-top: 8px;
  font-size: 19px;
  font-style: italic;
  color: var(--muted);
}

.together-arena {
  position: relative;
  max-width: 380px;
  margin: 22px auto 14px;
  padding: 20px 10px 14px;
  touch-action: pan-y;
}

.together-arch {
  position: absolute;
  inset: 0 24px 10px;
  border-radius: 190px 190px 16px 16px;
  background: radial-gradient(ellipse at 50% 42%, rgba(220, 181, 164, 0.28) 0%, rgba(242, 223, 204, 0.22) 60%, transparent 100%);
  border-top: 1px solid rgba(183, 142, 81, 0.3);
  pointer-events: none;
}

.together-floor {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 142, 81, 0.55) 20%, rgba(183, 142, 81, 0.55) 80%, transparent);
  pointer-events: none;
}

.together-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.burst-particle {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 8px;
  height: 8px;
  border-radius: 50% 0 50% 50%;
  pointer-events: none;
}

.together-cue {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 1;
  transition: opacity 220ms var(--ease-out);
}

.cue-chevrons {
  font: 500 18px/1 var(--serif);
  letter-spacing: 0.2em;
  color: var(--wine);
  opacity: 0.72;
}

.cue-line {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.together-arena[data-state="united"] .together-cue {
  opacity: 0;
}

.together-figures {
  --figure-h: clamp(210px, 53vw, 266px);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: calc(var(--figure-h) + 6px);
}

.figure-slot {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  border-radius: 10px;
}

.figure-slot:active {
  cursor: grabbing;
}

.figure-slot img {
  display: block;
  width: auto;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}

.figure-groom img {
  height: var(--figure-h);
}

.figure-bride img {
  /* Exact pixel proportion from supplied art: 993 / 1022 = 0.9716 */
  height: calc(var(--figure-h) * 0.9716);
}

.together-controls {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.united-reveal {
  margin-top: 28px;
  display: grid;
  justify-items: center;
  gap: 22px;
}

.united-reveal[hidden] {
  display: none !important;
}

.monogram-thread-block {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.thread-hoop {
  position: relative;
  width: 240px;
  height: 204px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #FFFAF3 0%, rgba(242, 223, 204, 0.65) 72%, rgba(220, 181, 164, 0.18) 100%);
  box-shadow: 0 16px 34px -18px rgba(72, 35, 44, 0.25);
}

.thread-hoop-ring {
  position: absolute;
  inset: 10px 28px;
  border-radius: 50%;
  border: 1px solid rgba(183, 142, 81, 0.45);
  box-shadow: inset 0 0 0 4px rgba(255, 250, 243, 0.72), inset 0 0 0 5px rgba(183, 142, 81, 0.25);
  pointer-events: none;
}

.thread-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.thread-monogram-live {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.thread-arabic {
  font-family: var(--arabic);
  font-size: 20px;
  line-height: 1.2;
  color: var(--wine);
}

.thread-latin {
  font-family: var(--script);
  font-size: 46px;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(72, 35, 44, 0.12);
}

.monogram-caption {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--wine);
}

.date-reveal-block {
  position: relative;
  padding-top: 8px;
}

.flower-stage {
  position: relative;
  color: var(--gold);
  height: 44px;
  margin-bottom: -14px;
}

.date-wreath-svg {
  width: 260px;
  height: 60px;
  pointer-events: none;
}

.date-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.date-reveal-kicker {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  color: var(--wine);
  margin-bottom: 4px;
}

.date-weekday,
.date-month,
.date-year {
  font: 500 12px/1.35 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.date-day {
  font-family: var(--display);
  font-weight: 400;
  font-size: 74px;
  line-height: 0.94;
  color: var(--deepWine);
}

/* ---------------------------------------------------------------------------
   Chapter 4: Dynamic Wedding Calendar + Integrated Countdown (Storyboard 07-08)
--------------------------------------------------------------------------- */
.calendar-section {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(242, 223, 204, 0.5) 0%, var(--ivory) 74%);
  padding-top: 56px;
  padding-bottom: 66px;
}

.calendar-sheet {
  max-width: 356px;
  margin: 26px auto 0;
  border-radius: 12px;
  background: #FFFAF3;
  border: 1px solid rgba(183, 142, 81, 0.48);
  box-shadow: 0 22px 44px -22px rgba(72, 35, 44, 0.26);
  overflow: hidden;
}

.calendar-banner {
  background: linear-gradient(155deg, var(--wine) 0%, var(--deepWine) 100%);
  color: var(--ivory);
  padding: 13px 16px;
  font: 600 12px/1.2 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.calendar-body {
  padding: 16px 14px 18px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
}

.calendar-weekdays {
  margin-bottom: 10px;
  font: 600 10px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-grid {
  row-gap: 4px;
}

.cal-cell {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

.cal-cell.is-empty {
  pointer-events: none;
}

.cal-cell.is-wedding-day {
  font-weight: 700;
  color: var(--wine);
}

.calendar-circle-svg {
  position: absolute;
  inset: -3px;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.countdown-integrated {
  margin-top: 38px;
}

.countdown-divider {
  margin: 0 auto 22px;
}

.countdown-heading {
  font-size: clamp(28px, 6.8vw, 42px);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 520px;
  margin: 30px auto 0;
}

.count-unit {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px 4px;
}

.count-unit + .count-unit::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(183, 142, 81, 0.42), transparent);
}

.count-unit strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 9.5vw, 58px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--wine);
}

.count-unit span {
  font: 500 9.5px/1.3 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Chapter 5: Deep Wine Luxury Reception Stationery
--------------------------------------------------------------------------- */
.event-section {
  background: linear-gradient(180deg, var(--ivory) 0%, #F7ECDF 18%, #F7ECDF 82%, var(--champagne) 100%);
  padding: 32px 16px 56px;
}

.reception-suite {
  position: relative;
  max-width: 560px;
  margin: auto;
  padding: 52px 26px 46px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 14%, rgba(183, 142, 81, 0.14), transparent 52%),
    linear-gradient(160deg, var(--wine) 0%, var(--deepWine) 100%);
  color: var(--ivory);
  box-shadow: 0 28px 60px -22px rgba(72, 35, 44, 0.48);
}

.suite-hairline {
  position: absolute;
  inset: 14px;
  border-radius: 10px;
  border: 1px solid rgba(183, 142, 81, 0.42);
  pointer-events: none;
}

.suite-art-slots {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.venue-art-slot {
  margin-bottom: 14px;
}

.suite-title-kicker {
  position: relative;
  z-index: 1;
  font-family: var(--script);
  font-size: 30px;
  color: var(--champagne);
  line-height: 1.1;
}

.suite-heading {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(32px, 8vw, 46px);
  line-height: 1.08;
  color: var(--ivory);
}

.suite-divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto;
  max-width: 180px;
  color: var(--gold);
  font-size: 13px;
}

.suite-divider::before,
.suite-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 142, 81, 0.65));
}

.suite-divider::after {
  background: linear-gradient(90deg, rgba(183, 142, 81, 0.65), transparent);
}

.event-date {
  position: relative;
  z-index: 1;
  font-size: 23px;
  font-weight: 500;
  color: var(--champagne);
}

.event-time {
  position: relative;
  z-index: 1;
  margin: 6px 0 4px;
  font-family: var(--display);
  font-size: clamp(44px, 12vw, 62px);
  line-height: 1.05;
  color: var(--ivory);
}

.reception-label {
  position: relative;
  z-index: 1;
  font: 500 10.5px/1.5 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 223, 204, 0.85);
}

.dinner-line {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 17px;
  color: var(--champagne);
}

.venue {
  position: relative;
  z-index: 1;
  margin: 24px auto;
  padding-top: 22px;
  max-width: 390px;
  border-top: 1px solid rgba(183, 142, 81, 0.35);
}

.venue h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  color: var(--ivory);
}

.venue p {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--champagne);
}

.venue-details {
  margin-top: 14px;
}

.venue-details summary {
  cursor: pointer;
  display: inline-block;
  padding: 6px 10px;
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}

.venue-details p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 250, 243, 0.88);
}

.reception-actions {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 24px;
}

.suite-link-button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid rgba(242, 223, 204, 0.55);
  background: none;
  color: var(--champagne);
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 130ms var(--ease-out), opacity 130ms var(--ease-out);
}

.suite-link-button:active {
  transform: scale(0.97);
  opacity: 0.72;
}

.suite-status {
  min-height: 18px;
  font: 500 12px/1.4 var(--sans);
  color: var(--champagne);
}

/* ---------------------------------------------------------------------------
   Chapter 6: Luxury Keepsake Pocket Envelope
--------------------------------------------------------------------------- */
.keepsake {
  background: linear-gradient(180deg, var(--champagne) 0%, #F7ECDF 42%, var(--ivory) 100%);
  padding-top: 56px;
  padding-bottom: 64px;
}

.keepsake-subtitle {
  margin-top: 10px;
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
}

.envelope {
  max-width: 344px;
  aspect-ratio: 1.24;
  margin: clamp(148px, 36vw, 166px) auto 24px;
  position: relative;
  perspective: 1000px;
  border-radius: 6px;
  border: 1px solid rgba(183, 142, 81, 0.55);
  box-shadow: 0 22px 42px -18px rgba(72, 35, 44, 0.32);
  isolation: isolate;
}

.env-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--wine) 0%, var(--deepWine) 100%);
}

.envelope-card {
  position: absolute;
  inset: 7% 12% 10%;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.envelope-mini-frame {
  height: 100%;
  aspect-ratio: 1064 / 1479;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid rgba(183, 142, 81, 0.65);
  box-shadow: 0 10px 24px rgba(72, 35, 44, 0.24);
}

.keepsake-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.env-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(165deg, #FFFAF3 0%, #F2DFCC 65%, #E7CEB5 100%);
  clip-path: polygon(0 0, 50% 53%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -10px 24px rgba(183, 142, 81, 0.14);
  pointer-events: none;
}

.env-flap {
  position: absolute;
  inset: 0 0 auto;
  height: 55%;
  z-index: 4;
  background: linear-gradient(145deg, #FFFAF3 0%, #EFE0CE 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform-style: preserve-3d;
  pointer-events: none;
}

.env-flap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--wine) 0%, var(--deepWine) 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

.wax {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #953C54, var(--wine) 58%, var(--deepWine) 100%);
  border: 1.5px solid rgba(220, 181, 164, 0.65);
  box-shadow:
    inset 0 0 0 5px rgba(72, 35, 44, 0.35),
    inset 0 0 0 6px rgba(183, 142, 81, 0.45),
    0 8px 18px -4px rgba(72, 35, 44, 0.48);
  color: var(--ivory);
  font-family: var(--script);
  font-size: 22px;
  transition: transform 130ms var(--ease-out), filter 160ms ease;
}

.wax:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.92);
}

.envelope-hint {
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.keepsake-actions {
  margin-top: 8px;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.keepsake-actions[data-state="closed"] {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  pointer-events: none;
  visibility: hidden;
}

.keepsake-actions[data-state="open"] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

.action-status {
  min-height: 20px;
  margin-top: 8px;
  font: 500 12.5px/1.4 var(--sans);
  color: var(--wine);
}

.wishes {
  max-width: 360px;
  margin: 18px auto 0;
  border-top: 1px solid rgba(183, 142, 81, 0.35);
  padding-top: 14px;
}

.wishes summary {
  cursor: pointer;
  font-style: italic;
  font-size: 22px;
  color: var(--deepWine);
  padding: 6px 0;
}

.wishes form {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-top: 18px;
}

.wishes label {
  font: 500 10.5px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.wishes input,
.wishes textarea {
  width: 100%;
  font-size: 16px;
  border: 1px solid rgba(183, 142, 81, 0.55);
  background: #FFFFFF;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 6px;
}

.notice,
#wishStatus {
  font-size: 15px;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Chapter 7: Closing Blessing
--------------------------------------------------------------------------- */
.closing {
  background: linear-gradient(180deg, var(--ivory) 0%, #FAF0E4 62%, var(--champagne) 100%);
  padding: 52px 24px calc(104px + env(safe-area-inset-bottom, 0px));
}

.closing-inner {
  max-width: 520px;
  margin: auto;
}

.closing-divider {
  margin-top: 0;
}

.closing-arabic {
  font-size: clamp(24px, 6vw, 34px);
  color: var(--wine);
  margin: 16px auto 20px;
}

.closing-heading {
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  color: var(--deepWine);
  margin-bottom: 8px;
}

.closing-body {
  max-width: 38ch;
  margin: auto;
  color: var(--ink);
}

.final-names {
  font-family: var(--script);
  font-size: clamp(38px, 9.5vw, 48px);
  line-height: 1.1;
  color: var(--wine);
  margin: 26px 0 8px;
}

.closing-title {
  font: 500 10.5px/1.4 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.closing-date {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.closing-couple-slot {
  position: relative;
  margin: 30px auto 0;
  padding-top: 16px;
  max-width: 340px;
  display: flex;
  justify-content: center;
}

.closing-wash {
  position: absolute;
  inset: 0 8% 4%;
  border-radius: 170px 170px 24px 24px;
  background: radial-gradient(ellipse at 50% 48%, rgba(255, 250, 243, 0.85) 0%, rgba(220, 181, 164, 0.24) 64%, transparent 100%);
  pointer-events: none;
}

.closing-couple-img {
  position: relative;
  z-index: 1;
  width: min(74vw, 296px);
  height: auto;
  aspect-ratio: 1174 / 1339;
  object-fit: contain;
}

/* ---------------------------------------------------------------------------
   Discreet Floating Chapter Navigation
--------------------------------------------------------------------------- */
.chapter-nav {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.chapter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(183, 142, 81, 0.52);
  background: rgba(255, 250, 243, 0.96);
  box-shadow: 0 10px 24px -10px rgba(72, 35, 44, 0.35);
  color: var(--deepWine);
  font: 500 10px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 130ms var(--ease-out), background-color 160ms ease;
}

.chapter-toggle:active {
  transform: scale(0.96);
}

.chapter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wine);
}

.chapter-menu {
  display: grid;
  gap: 2px;
  min-width: 156px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(183, 142, 81, 0.45);
  background: rgba(255, 250, 243, 0.98);
  box-shadow: 0 18px 36px -14px rgba(72, 35, 44, 0.36);
}

.chapter-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  text-align: left;
  font: 500 11px/1.2 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deepWine);
}

.chapter-menu a:active {
  background: var(--champagne);
}

@media (min-width: 720px) {
  .entrance {
    box-shadow: 0 0 80px rgba(72, 35, 44, 0.08);
  }
  .scene {
    padding-left: 64px;
    padding-right: 64px;
  }
  .chapter-nav {
    right: max(20px, calc(50% - 410px));
  }
}
