:root {
  --burgundy: #4a0b18;
  --burgundy-deep: #2e0610;
  --burgundy-light: #681329;
  --gold: #c8a45b;
  --gold-light: #e5cb8e;
  --gold-dark: #9b7838;
  --ivory: #faf4e8;
  --cream: #f1e5d2;
  --blush: #b46f77;
  --ink: #3c2024;
  --serif-heading: "Playfair Display", Georgia, serif;
  --serif-romantic: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html {
  background: var(--ivory);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  height: 100vh;
  height: 100dvh;
}

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

button {
  font: inherit;
}

a {
  color: inherit;
}

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

::selection {
  color: var(--ivory);
  background: var(--burgundy-light);
}

[hidden] {
  display: none !important;
}

.svg-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.flower-petal {
  fill: var(--petal, rgba(180, 111, 119, 0.14));
}

.leaf {
  fill: var(--leaf, rgba(155, 120, 56, 0.14));
  stroke: currentColor;
  stroke-width: 1.1;
}

.icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.floral-divider {
  display: block;
  width: min(220px, 62%);
  height: 54px;
  margin-inline: auto;
  color: var(--gold-dark);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.opening-experience {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(24px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 38%, rgba(137, 37, 57, 0.5), transparent 46%),
    linear-gradient(145deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
}

.opening-experience::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 164, 91, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 164, 91, 0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  pointer-events: none;
}

.opening-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 145vw);
  aspect-ratio: 1;
  border: 1px solid rgba(200, 164, 91, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 70px rgba(200, 164, 91, 0.025),
    0 0 0 140px rgba(200, 164, 91, 0.018);
  pointer-events: none;
}

.opening-floral {
  --petal: rgba(229, 203, 142, 0.12);
  --leaf: rgba(229, 203, 142, 0.09);
  position: absolute;
  width: clamp(180px, 42vw, 310px);
  color: var(--gold);
  opacity: 0.72;
  pointer-events: none;
}

.opening-floral-one {
  top: -6%;
  left: -9%;
  transform: rotate(-12deg);
}

.opening-floral-two {
  right: -9%;
  bottom: -8%;
  transform: rotate(168deg);
}

.opening-frame {
  position: absolute;
  inset: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  border: 1px solid rgba(200, 164, 91, 0.42);
  background:
    linear-gradient(var(--gold), var(--gold)) left top / 30px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left top / 1px 30px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top / 30px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top / 1px 30px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom / 30px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom / 1px 30px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 30px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 1px 30px no-repeat;
  pointer-events: none;
}

.opening-content {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  text-align: center;
  transition: transform 0.8s var(--ease-luxury), opacity 0.6s ease;
}

.opening-eyebrow {
  margin: 0 0 clamp(24px, 5vh, 40px);
  color: var(--gold-light);
  font-family: var(--serif-romantic);
  font-size: clamp(1rem, 4.6vw, 1.25rem);
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.envelope {
  position: relative;
  width: min(82vw, 360px);
  aspect-ratio: 1.52;
  margin: 0 auto clamp(30px, 5vh, 44px);
  perspective: 1200px;
  filter: drop-shadow(0 28px 26px rgba(0, 0, 0, 0.28));
}

.envelope-base,
.envelope-letter,
.envelope-flap,
.envelope-fold {
  position: absolute;
}

.envelope-base {
  inset: 0;
  border: 1px solid var(--gold-dark);
  background: linear-gradient(145deg, #721b31, var(--burgundy) 58%, #390712);
  box-shadow: inset 0 0 0 5px rgba(200, 164, 91, 0.08);
}

.envelope-letter {
  z-index: 2;
  inset: 7% 7% 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 1px solid var(--gold);
  color: var(--burgundy);
  background:
    radial-gradient(circle at 50% 20%, rgba(200, 164, 91, 0.15), transparent 45%),
    var(--ivory);
  box-shadow: 0 5px 18px rgba(46, 6, 16, 0.2);
  transform: translateY(12%);
  transition: transform 1.1s var(--ease-luxury) 0.48s;
}

.letter-floral {
  width: 86px;
  height: 25px;
  margin-bottom: 4px;
  color: var(--gold-dark);
}

.letter-monogram,
.letter-names,
.letter-occasion,
.letter-floral {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.letter-monogram {
  font-family: var(--serif-romantic);
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.06em;
}

.letter-monogram i {
  color: var(--gold-dark);
  font-size: 0.65em;
  font-weight: 400;
}

.letter-names {
  margin-top: 8px;
  font-family: var(--serif-heading);
  font-size: clamp(0.72rem, 3.1vw, 0.9rem);
  letter-spacing: 0.04em;
}

.letter-occasion {
  margin-top: 5px;
  color: var(--gold-dark);
  font-family: var(--serif-romantic);
  font-size: clamp(0.62rem, 2.7vw, 0.78rem);
  font-style: italic;
}

.envelope-fold {
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.envelope-fold-left {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 65%);
  clip-path: polygon(0 0, 56% 51%, 0 100%);
}

.envelope-fold-right {
  background: linear-gradient(250deg, rgba(255, 255, 255, 0.035), transparent 65%);
  clip-path: polygon(100% 0, 44% 51%, 100% 100%);
}

.envelope-fold-bottom {
  background: linear-gradient(0deg, #5c1021, #6d142a);
  clip-path: polygon(0 100%, 50% 43%, 100% 100%);
}

.envelope-flap {
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 67%;
  border-bottom: 1px solid rgba(200, 164, 91, 0.45);
  background: linear-gradient(160deg, #781c32, #5c1021);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: rotateX(0deg);
  transform-origin: top center;
  backface-visibility: visible;
  transition: transform 0.85s var(--ease-luxury), z-index 0s 0.42s;
}

.wax-seal {
  position: absolute;
  z-index: 5;
  top: 57%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(62px, 18vw, 76px);
  aspect-ratio: 1;
  border: 1px solid var(--gold-dark);
  border-radius: 48% 52% 46% 54% / 52% 45% 55% 48%;
  color: var(--gold-light);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 50%, #8e2639, #52101f 72%);
  box-shadow:
    inset 0 0 0 4px rgba(46, 6, 16, 0.24),
    inset 0 0 0 5px rgba(200, 164, 91, 0.24),
    0 7px 12px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease 0.62s, transform 0.45s ease 0.62s;
}

.wax-seal::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(229, 203, 142, 0.42);
  border-radius: 50%;
  content: "";
}

.wax-seal span,
.wax-seal i {
  position: relative;
  font-family: var(--serif-heading);
  font-size: clamp(0.9rem, 4vw, 1.15rem);
  font-style: normal;
}

.wax-seal i {
  margin-inline: 2px;
  font-family: var(--serif-romantic);
  font-size: 0.7em;
}

.open-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: min(100%, 238px);
  min-height: 56px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid var(--gold-light);
  border-radius: 2px;
  color: var(--burgundy-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform 0.35s var(--ease-luxury), box-shadow 0.35s ease;
}

.open-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  content: "";
  transition: left 0.7s ease;
}

.open-button:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.open-button:hover::before {
  left: 120%;
}

.open-button:active {
  transform: translateY(0) scale(0.98);
}

.open-button .icon {
  width: 19px;
  transition: transform 0.35s var(--ease-luxury);
}

.open-button:hover .icon {
  transform: translateX(4px);
}

.opening-experience.is-opening {
  pointer-events: none;
  animation: openingExit 0.9s ease 0.88s forwards;
}

.opening-experience.is-opening .opening-content {
  opacity: 0;
  transform: translateY(-18px) scale(0.98);
}

.opening-experience.is-opening .envelope-flap {
  z-index: 1;
  transform: rotateX(180deg);
}

.opening-experience.is-opening .envelope-letter {
  transform: translateY(-56%);
}

.opening-experience.is-opening .letter-monogram,
.opening-experience.is-opening .letter-names,
.opening-experience.is-opening .letter-occasion,
.opening-experience.is-opening .letter-floral {
  opacity: 1;
  transition-delay: 0.48s;
}

.opening-experience.is-opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
}

@keyframes openingExit {
  to {
    visibility: hidden;
    opacity: 0;
  }
}

.invitation {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background: var(--ivory);
}

.story-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: manipulation;
}

.story-panel {
  --pointer-x: 0px;
  --pointer-y: 0px;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: calc(64px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) calc(76px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--burgundy);
  background: var(--ivory);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(4%) scale(1.01);
  transition: opacity 0.65s ease, transform 0.85s var(--ease-luxury), visibility 0s 0.85s;
}

.story-stage[data-direction="backward"] .story-panel {
  transform: translateX(-4%) scale(1.01);
}

.story-panel.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

.dark-panel {
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 42%, rgba(137, 37, 57, 0.48), transparent 50%),
    linear-gradient(155deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
}

.panel-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(200, 164, 91, 0.1), transparent 30%),
    radial-gradient(circle at 88% 88%, rgba(180, 111, 119, 0.08), transparent 28%);
  pointer-events: none;
}

.dark-panel .panel-wash {
  background:
    radial-gradient(circle at 14% 14%, rgba(200, 164, 91, 0.08), transparent 30%),
    radial-gradient(circle at 86% 86%, rgba(200, 164, 91, 0.05), transparent 28%);
}

.floral {
  --petal: rgba(180, 111, 119, 0.16);
  --leaf: rgba(155, 120, 56, 0.14);
  position: absolute;
  z-index: 1;
  width: clamp(160px, 37vw, 310px);
  color: var(--gold-dark);
  pointer-events: none;
  transition: transform 0.45s ease-out;
  will-change: transform;
}

.dark-panel .floral {
  --petal: rgba(229, 203, 142, 0.13);
  --leaf: rgba(229, 203, 142, 0.1);
  color: var(--gold-light);
}

.floral-top-left {
  top: -5%;
  left: -8%;
  transform: translate3d(var(--pointer-x), var(--pointer-y), 0) rotate(-10deg);
}

.floral-bottom-right {
  right: -8%;
  bottom: -7%;
  transform: translate3d(calc(0px - var(--pointer-x)), calc(0px - var(--pointer-y)), 0) rotate(170deg);
}

.panel-content {
  position: relative;
  z-index: 3;
  width: min(100%, 980px);
  max-height: 100%;
  margin-inline: auto;
  text-align: center;
}

.story-panel.is-active .panel-content {
  animation: panelEnter 0.85s var(--ease-luxury) both;
}

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

.panel-kicker {
  margin: 0;
  color: var(--burgundy-light);
  font-size: clamp(0.66rem, 2.8vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.6;
}

.dark-panel .panel-kicker {
  color: var(--gold-light);
}

.hero-content .floral-divider,
.countdown-content .floral-divider,
.closing-content .floral-divider {
  margin-top: clamp(12px, 2.6vh, 22px);
  margin-bottom: clamp(12px, 2.6vh, 22px);
}

.couple-name {
  margin: 0;
  color: var(--burgundy);
  font-family: var(--serif-heading);
  font-size: clamp(3rem, 12vh, 6.8rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.couple-name:focus {
  outline: none;
}

.couple-name span {
  display: block;
}

.couple-name em {
  color: var(--gold-dark);
  font-family: var(--serif-romantic);
  font-size: 0.8em;
  font-weight: 400;
}

.hero-tagline {
  margin: clamp(18px, 3.6vh, 30px) 0 0;
  color: var(--burgundy-light);
  font-family: var(--serif-romantic);
  font-size: clamp(1.2rem, 5.4vw, 1.75rem);
  font-style: italic;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.hero-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: clamp(20px, 3.8vh, 32px);
  color: var(--ink);
  font-size: clamp(0.66rem, 2.8vw, 0.78rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.hero-date i {
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

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

.particle {
  position: absolute;
  bottom: -12px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: 0;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(200, 164, 91, 0.45);
  animation: particleRise var(--duration) linear var(--delay) infinite;
}

@keyframes particleRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.7);
  }
  12%,
  82% {
    opacity: var(--opacity);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -108vh, 0) scale(1.1);
  }
}

.details-content {
  width: min(100%, 820px);
}

.invitation-card {
  position: relative;
  width: 100%;
  padding: clamp(24px, 5vw, 54px) clamp(18px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(155, 120, 56, 0.58);
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 164, 91, 0.13), transparent 42%),
    rgba(241, 229, 210, 0.92);
  box-shadow: 0 24px 70px rgba(74, 11, 24, 0.13);
  text-align: center;
}

.invitation-card::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(155, 120, 56, 0.26);
  content: "";
  pointer-events: none;
}

.card-floral {
  position: absolute;
  width: clamp(105px, 24vw, 170px);
  color: var(--gold-dark);
  opacity: 0.62;
  pointer-events: none;
}

.card-floral-one {
  top: -16%;
  left: -13%;
  transform: rotate(-16deg);
}

.card-floral-two {
  right: -13%;
  bottom: -17%;
  transform: rotate(166deg);
}

.card-corner {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-color: var(--gold-dark);
  border-style: solid;
}

.corner-top-left {
  top: 15px;
  left: 15px;
  border-width: 1px 0 0 1px;
}

.corner-top-right {
  top: 15px;
  right: 15px;
  border-width: 1px 1px 0 0;
}

.corner-bottom-left {
  bottom: 15px;
  left: 15px;
  border-width: 0 0 1px 1px;
}

.corner-bottom-right {
  right: 15px;
  bottom: 15px;
  border-width: 0 1px 1px 0;
}

.card-divider {
  position: relative;
  width: min(170px, 52%);
  height: 42px;
  margin-bottom: clamp(8px, 1.8vh, 14px);
}

.card-kicker {
  position: relative;
  margin: 0;
  color: var(--burgundy-light);
  font-family: var(--serif-romantic);
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  font-style: italic;
  line-height: 1.45;
}

.card-intro {
  position: relative;
  margin: clamp(6px, 1.4vh, 11px) 0 0;
  color: var(--ink);
  font-size: clamp(0.62rem, 2.7vw, 0.72rem);
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.invitation-card h2 {
  position: relative;
  margin: clamp(7px, 1.6vh, 13px) 0 0;
  color: var(--burgundy);
  font-family: var(--serif-heading);
  font-size: clamp(1.9rem, 7.5vh, 3.8rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.event-details {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: clamp(16px, 3.4vh, 28px);
}

.detail-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.detail-icon {
  width: 23px;
  height: 23px;
  margin-bottom: 7px;
  color: var(--gold-dark);
}

.detail-label {
  color: var(--burgundy-light);
  font-family: var(--serif-romantic);
  font-size: 0.9rem;
  font-style: italic;
}

.detail-value {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--serif-romantic);
  font-size: clamp(0.98rem, 4.3vw, 1.3rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.detail-divider {
  display: none;
}

.countdown-content {
  width: min(100%, 700px);
}

.countdown-content .floral-divider {
  color: var(--gold-light);
}

.countdown-title {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif-heading);
  font-size: clamp(1.5rem, 5.8vh, 2.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.countdown-time {
  margin: 9px 0 0;
  color: var(--gold-light);
  font-family: var(--serif-romantic);
  font-size: clamp(1rem, 4.2vw, 1.25rem);
  font-style: italic;
  line-height: 1.5;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 14px);
  margin-top: clamp(22px, 4.6vh, 36px);
}

.countdown-unit {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: clamp(13px, 2.6vh, 22px) clamp(3px, 1.6vw, 11px);
  overflow: hidden;
  border: 1px solid rgba(200, 164, 91, 0.3);
  background: rgba(250, 244, 232, 0.04);
}

.countdown-unit::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 20px;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  content: "";
}

.countdown-number {
  color: var(--ivory);
  font-family: var(--serif-heading);
  font-size: clamp(1.8rem, 7.8vh, 3.6rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-label {
  margin-top: 7px;
  color: var(--gold-light);
  font-size: clamp(0.54rem, 2.3vw, 0.66rem);
  letter-spacing: 0.04em;
}

.celebration-message {
  margin: clamp(24px, 5vh, 38px) 0 0;
  color: var(--gold-light);
  font-family: var(--serif-heading);
  font-size: clamp(1.5rem, 5.8vh, 2.7rem);
  line-height: 1.35;
}

.venue-content {
  width: min(100%, 760px);
}

.location-medallion {
  position: relative;
  display: grid;
  width: clamp(76px, 17vh, 108px);
  aspect-ratio: 1;
  place-items: center;
  margin: 0 auto clamp(18px, 3.6vh, 30px);
  border: 1px solid rgba(155, 120, 56, 0.5);
  border-radius: 50%;
  color: var(--burgundy);
  background: rgba(241, 229, 210, 0.78);
}

.location-pin {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  animation: pinFloat 3s ease-in-out infinite;
}

.medallion-rose {
  position: absolute;
  top: -9px;
  right: -7px;
  width: 31px;
  height: 31px;
  padding: 2px;
  border-radius: 50%;
  color: var(--gold-dark);
  background: var(--ivory);
}

.location-ring {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  animation: locationPulse 3s ease-out infinite;
}

.location-ring-two {
  animation-delay: 1.5s;
}

@keyframes pinFloat {
  0%, 100% {
    transform: translateY(1px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes locationPulse {
  from {
    opacity: 0.5;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

.venue-content h2 {
  margin: 0;
  color: var(--burgundy);
  font-family: var(--serif-heading);
  font-size: clamp(2rem, 7.6vh, 4rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.venue-divider {
  width: min(190px, 58%);
  height: 44px;
  margin-top: clamp(10px, 2vh, 17px);
  margin-bottom: clamp(10px, 2vh, 17px);
}

.venue-content address {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif-romantic);
  font-size: clamp(1.12rem, 4.8vw, 1.5rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.directions-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: min(100%, 248px);
  min-height: 54px;
  margin-top: clamp(22px, 4.4vh, 34px);
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid var(--burgundy);
  border-radius: 2px;
  color: var(--ivory);
  background: var(--burgundy);
  box-shadow: 0 12px 26px rgba(74, 11, 24, 0.18);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.35s ease, background 0.35s ease, transform 0.35s var(--ease-luxury), box-shadow 0.35s ease;
  animation: directionsGlow 3.5s ease-in-out infinite;
}

.directions-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: skewX(-20deg);
  content: "";
  transition: left 0.7s ease;
}

.directions-button:hover {
  color: var(--burgundy-deep);
  background: var(--gold);
  box-shadow: 0 16px 32px rgba(74, 11, 24, 0.23);
  transform: translateY(-2px);
}

.directions-button:hover::before {
  left: 125%;
}

.directions-button:active {
  transform: translateY(0) scale(0.98);
}

.directions-button .icon {
  width: 18px;
}

.directions-arrow {
  transition: transform 0.35s var(--ease-luxury);
}

.directions-button:hover .directions-arrow {
  transform: translate(2px, -2px);
}

@keyframes directionsGlow {
  0%, 100% {
    box-shadow: 0 12px 26px rgba(74, 11, 24, 0.18);
  }
  50% {
    box-shadow: 0 14px 32px rgba(155, 120, 56, 0.28);
  }
}

.closing-content {
  width: min(100%, 820px);
}

.closing-monogram {
  color: var(--gold-light);
  font-family: var(--serif-romantic);
  font-size: clamp(2.4rem, 9vh, 4rem);
  line-height: 1;
  letter-spacing: 0.08em;
}

.closing-monogram span {
  font-size: 0.62em;
}

.closing-content .floral-divider {
  color: var(--gold-light);
}

.closing-content h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif-heading);
  font-size: clamp(2rem, 8vh, 4.3rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.closing-message {
  max-width: 480px;
  margin: clamp(18px, 3.6vh, 30px) auto 0;
  color: rgba(250, 244, 232, 0.84);
  font-family: var(--serif-romantic);
  font-size: clamp(1.05rem, 4.6vw, 1.4rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: clamp(22px, 4.4vh, 36px);
}

.signature span {
  color: var(--gold-light);
  font-family: var(--serif-romantic);
  font-size: 1rem;
  font-style: italic;
}

.signature strong {
  color: var(--ivory);
  font-family: var(--serif-heading);
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.story-progress {
  position: fixed;
  z-index: 40;
  top: max(14px, env(safe-area-inset-top));
  right: calc(76px + env(safe-area-inset-right));
  left: max(18px, env(safe-area-inset-left));
  display: flex;
  gap: 5px;
}

.progress-button {
  display: grid;
  min-width: 0;
  height: 28px;
  flex: 1 1 0;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.progress-button > span {
  display: block;
  width: 100%;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(155, 120, 56, 0.25);
  box-shadow: 0 0 0 1px rgba(250, 244, 232, 0.16);
}

.progress-button i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold-dark);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-luxury), background 0.3s ease;
}

.progress-button.is-complete i,
.progress-button.is-active i {
  transform: scaleX(1);
}

.progress-button.is-active i {
  background: var(--burgundy-light);
  box-shadow: 0 0 8px rgba(155, 120, 56, 0.45);
}

body[data-panel="2"] .progress-button > span,
body[data-panel="4"] .progress-button > span {
  background: rgba(250, 244, 232, 0.22);
}

body[data-panel="2"] .progress-button i,
body[data-panel="4"] .progress-button i {
  background: var(--gold-light);
}

.story-arrow {
  position: fixed;
  z-index: 35;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(155, 120, 56, 0.48);
  border-radius: 50%;
  color: var(--burgundy);
  background: rgba(250, 244, 232, 0.9);
  box-shadow: 0 8px 24px rgba(74, 11, 24, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-luxury), background 0.3s ease;
}

.story-arrow:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.story-arrow:active {
  transform: scale(0.95);
}

.story-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.story-prev {
  left: max(18px, env(safe-area-inset-left));
}

.story-next {
  right: max(18px, env(safe-area-inset-right));
}

.story-arrow .icon {
  width: 20px;
}

.music-toggle {
  position: fixed;
  z-index: 45;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(250, 244, 232, 0.65);
  border-radius: 50%;
  color: var(--burgundy-deep);
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  box-shadow: 0 8px 24px rgba(46, 6, 16, 0.25);
  cursor: pointer;
  transition: transform 0.3s var(--ease-luxury), box-shadow 0.3s ease;
}

.music-toggle:hover {
  box-shadow: 0 11px 28px rgba(46, 6, 16, 0.32);
  transform: scale(1.06);
}

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

.music-toggle::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(200, 164, 91, 0.5);
  border-radius: 50%;
  content: "";
  opacity: 0;
}

.music-toggle.is-playing::after {
  animation: musicPulse 2.4s ease-out infinite;
}

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

.music-icon .icon {
  width: 21px;
  height: 21px;
}

.music-toggle.is-playing .music-icon {
  animation: musicRotate 9s linear infinite;
}

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

@keyframes musicPulse {
  from {
    opacity: 0.55;
    transform: scale(0.95);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

@media (min-width: 560px) {
  .hero-date {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }

  .event-details {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: clamp(20px, 4vw, 42px);
  }

  .detail-divider {
    display: block;
    width: 1px;
    height: 76px;
    background: linear-gradient(180deg, transparent, rgba(155, 120, 56, 0.6), transparent);
  }
}

@media (min-width: 900px) {
  .couple-name {
    font-size: clamp(5rem, 11vh, 7.4rem);
  }

  .couple-name span {
    display: inline;
  }

  .couple-name span + span::before {
    content: " ";
  }

  .story-progress {
    right: calc(92px + env(safe-area-inset-right));
    left: max(28px, env(safe-area-inset-left));
    gap: 8px;
  }

  .floral {
    width: clamp(250px, 28vw, 370px);
  }
}

@media (max-height: 700px) {
  .story-panel {
    padding-top: calc(54px + env(safe-area-inset-top));
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .opening-eyebrow {
    margin-bottom: 22px;
  }

  .envelope {
    margin-bottom: 26px;
  }

  .hero-content .floral-divider,
  .countdown-content .floral-divider,
  .closing-content .floral-divider {
    height: 42px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .couple-name {
    font-size: clamp(2.7rem, 11vh, 4.8rem);
  }

  .hero-tagline {
    margin-top: 15px;
    font-size: clamp(1.1rem, 4.8vw, 1.45rem);
  }

  .hero-date {
    margin-top: 17px;
  }

  .invitation-card {
    padding-top: 21px;
    padding-bottom: 21px;
  }

  .card-divider {
    height: 34px;
    margin-bottom: 6px;
  }

  .card-intro {
    margin-top: 4px;
  }

  .invitation-card h2 {
    margin-top: 5px;
    font-size: clamp(1.7rem, 7vh, 2.8rem);
  }

  .event-details {
    margin-top: 13px;
  }

  .detail-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
  }

  .detail-value {
    font-size: clamp(0.92rem, 4vw, 1.12rem);
  }

  .countdown-title {
    font-size: clamp(1.35rem, 5.4vh, 2.2rem);
  }

  .countdown {
    margin-top: 20px;
  }

  .countdown-unit {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .countdown-number {
    font-size: clamp(1.65rem, 7.2vh, 2.8rem);
  }

  .location-medallion {
    width: 70px;
    margin-bottom: 14px;
  }

  .location-pin {
    width: 28px;
    height: 28px;
  }

  .venue-content h2 {
    font-size: clamp(1.8rem, 7vh, 3rem);
  }

  .venue-divider {
    height: 36px;
    margin-top: 7px;
    margin-bottom: 7px;
  }

  .directions-button {
    min-height: 50px;
    margin-top: 18px;
  }

  .closing-monogram {
    font-size: clamp(2.1rem, 8vh, 3.2rem);
  }

  .closing-content h2 {
    font-size: clamp(1.8rem, 7.4vh, 3.1rem);
  }

  .closing-message {
    margin-top: 15px;
  }

  .signature {
    margin-top: 18px;
  }
}

@media (max-width: 359px) {
  .opening-experience {
    padding-right: 18px;
    padding-left: 18px;
  }

  .opening-frame {
    inset: 11px;
  }

  .opening-floral {
    width: 170px;
  }

  .envelope {
    width: 84vw;
  }

  .open-button {
    min-height: 52px;
    padding-inline: 17px;
    font-size: 0.72rem;
  }

  .story-panel {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .story-progress {
    right: calc(68px + env(safe-area-inset-right));
    left: max(14px, env(safe-area-inset-left));
    gap: 4px;
  }

  .music-toggle {
    right: max(10px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .invitation-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .card-floral {
    width: 95px;
    opacity: 0.5;
  }

  .event-details {
    gap: 7px;
  }

  .countdown {
    gap: 5px;
  }

  .countdown-unit {
    padding-right: 2px;
    padding-left: 2px;
  }

  .directions-button {
    gap: 8px;
    padding-inline: 15px;
  }

  .story-arrow {
    width: 42px;
    height: 42px;
  }

  .story-prev {
    left: max(12px, env(safe-area-inset-left));
  }

  .story-next {
    right: max(12px, env(safe-area-inset-right));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .story-panel,
  .story-stage[data-direction="backward"] .story-panel {
    transform: none;
  }

  .floral {
    transform: none;
  }

  .floral-top-left {
    transform: rotate(-10deg);
  }

  .floral-bottom-right {
    transform: rotate(170deg);
  }
}
