:root {
  --ink: #1f2a24;
  --ink-soft: #4a5a52;
  --cream: #f3efe6;
  --sage: #6f8f7a;
  --sage-deep: #3d5a47;
  --blush: #d4a59a;
  --gold: #b08d57;
  --phone-max: 430px;
  --font-display: "Cormorant Garamond", serif;
  --font-body: "Source Sans 3", sans-serif;
  /* Fallback until inline script sets the real innerHeight */
  --invite-vh: 100dvh;
}

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

html {
  scroll-behavior: smooth;
}

body.invite-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--invite-vh, 100dvh);
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(212, 165, 154, 0.35), transparent 45%),
    radial-gradient(ellipse at 80% 0%, rgba(111, 143, 122, 0.28), transparent 40%),
    linear-gradient(165deg, #e8e2d6 0%, #d7e0d8 45%, #c9d4ce 100%);
}

/* Stop phones from auto-linking dates/numbers with blue underline */
.invite-phone a[x-apple-data-detectors],
.invite-hero a[x-apple-data-detectors],
.overlay-line a[x-apple-data-detectors],
.hero-el a[x-apple-data-detectors],
.hero-meta a[x-apple-data-detectors],
.countdown-value a[x-apple-data-detectors],
.block-text a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  background: transparent !important;
  border: 0 !important;
}

/* Autodetected tel/sms links in copy (not admin media buttons) */
.invite-phone a[href^="tel:"]:not(.media-action-btn),
.invite-phone a[href^="sms:"]:not(.media-action-btn) {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit !important;
  letter-spacing: inherit !important;
}

.invite-shell {
  min-height: var(--invite-vh, 100dvh);
  display: flex;
  justify-content: center;
  padding: 0;
}

.invite-phone {
  width: 100%;
  max-width: var(--phone-max);
  min-height: var(--invite-vh, 100dvh);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #f7f3eb, #efe8dc);
  box-shadow: 0 0 0 1px rgba(31, 42, 36, 0.06), 0 24px 80px rgba(31, 42, 36, 0.18);
  overflow-x: hidden;
}

/* Mobile swipe: apply from first paint via is-swipe-nav (no wait for JS) */
@media (max-width: 768px), (pointer: coarse) {
  html:has(.invite-phone.is-swipe-nav),
  html:has(.invite-phone.is-swipe-nav) body.invite-body {
    height: var(--invite-vh, 100dvh);
    min-height: var(--invite-vh, 100dvh);
    max-height: var(--invite-vh, 100dvh);
    overflow: hidden;
  }

  .invite-shell:has(.invite-phone.is-swipe-nav) {
    height: var(--invite-vh, 100dvh);
    min-height: var(--invite-vh, 100dvh);
    max-height: var(--invite-vh, 100dvh);
  }

  .invite-phone.is-swipe-nav,
  .invite-phone.is-swipe-active {
    height: var(--invite-vh, 100dvh);
    max-height: var(--invite-vh, 100dvh);
    min-height: var(--invite-vh, 100dvh);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    /* Instant snap — JS + CSS smooth together felt laggy. */
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .invite-phone.is-swipe-nav .invite-hero,
  .invite-phone.is-swipe-nav .home-block-hero,
  .invite-phone.is-swipe-nav .invite-blocks > .block,
  .invite-phone.is-swipe-active .invite-hero,
  .invite-phone.is-swipe-active .home-block-hero,
  .invite-phone.is-swipe-active .invite-blocks > .block {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: var(--invite-vh, 100dvh);
    height: var(--invite-vh, 100dvh);
    max-height: var(--invite-vh, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }

  .invite-phone.is-swipe-nav .invite-blocks,
  .invite-phone.is-swipe-active .invite-blocks {
    display: contents;
  }

  /* Nested full-bleed media fills the swipe screen (100% of sized parent) */
  .invite-phone.is-swipe-nav .home-reveal-stage,
  .invite-phone.is-swipe-nav .home-reveal-video,
  .invite-phone.is-swipe-nav .home-reveal-carousel,
  .invite-phone.is-swipe-nav .home-block-inner,
  .invite-phone.is-swipe-nav .home-block-media .block,
  .invite-phone.is-swipe-nav .home-block-media .image-frame,
  .invite-phone.is-swipe-nav .home-block-media .video-frame,
  .invite-phone.is-swipe-nav .block-image.is-background,
  .invite-phone.is-swipe-nav .block-video.is-background,
  .invite-phone.is-swipe-nav .block-image.is-background .image-frame,
  .invite-phone.is-swipe-nav .block-video.is-background .video-frame,
  .invite-phone.is-swipe-nav .block-carousel.is-background:not(.is-nested-bg),
  .invite-phone.is-swipe-nav .block-carousel.is-background:not(.is-nested-bg) > .carousel-frame,
  .invite-phone.is-swipe-nav .home-reveal-carousel .block-carousel,
  .invite-phone.is-swipe-nav .home-reveal-carousel .carousel-frame,
  .invite-phone.is-swipe-active .home-reveal-stage,
  .invite-phone.is-swipe-active .home-reveal-video,
  .invite-phone.is-swipe-active .home-reveal-carousel,
  .invite-phone.is-swipe-active .home-block-inner,
  .invite-phone.is-swipe-active .home-block-media .block,
  .invite-phone.is-swipe-active .home-block-media .image-frame,
  .invite-phone.is-swipe-active .home-block-media .video-frame,
  .invite-phone.is-swipe-active .block-image.is-background,
  .invite-phone.is-swipe-active .block-video.is-background,
  .invite-phone.is-swipe-active .block-image.is-background .image-frame,
  .invite-phone.is-swipe-active .block-video.is-background .video-frame,
  .invite-phone.is-swipe-active .block-carousel.is-background:not(.is-nested-bg),
  .invite-phone.is-swipe-active .block-carousel.is-background:not(.is-nested-bg) > .carousel-frame,
  .invite-phone.is-swipe-active .home-reveal-carousel .block-carousel,
  .invite-phone.is-swipe-active .home-reveal-carousel .carousel-frame {
    min-height: 100%;
    height: 100%;
    max-height: 100%;
  }

  .invite-phone.is-swipe-nav .carousel-backdrop.is-nested-carousel .block-carousel,
  .invite-phone.is-swipe-nav .carousel-backdrop.is-nested-carousel .carousel-frame,
  .invite-phone.is-swipe-active .carousel-backdrop.is-nested-carousel .block-carousel,
  .invite-phone.is-swipe-active .carousel-backdrop.is-nested-carousel .carousel-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
  }
}

/* Legacy lock class (JS) */
html.invite-swipe-lock,
html.invite-swipe-lock body.invite-body {
  height: var(--invite-vh, 100dvh);
  min-height: var(--invite-vh, 100dvh);
  max-height: var(--invite-vh, 100dvh);
  overflow: hidden;
}

.invite-hero {
  position: relative;
  min-height: var(--invite-vh, 100dvh);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2.5rem 1.5rem 4rem;
  overflow: hidden;
  color: var(--hero-text-color, #f8f4ee);
}

.invite-hero.text-pos-top {
  align-items: flex-start;
  padding-top: 3.5rem;
}

.invite-hero.text-pos-middle {
  align-items: center;
  padding-block: 2.5rem;
}

.invite-hero.text-pos-bottom {
  align-items: flex-end;
}

.invite-hero.has-custom-positions {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.invite-hero.has-custom-positions .hero-content.is-absolute-layout {
  position: absolute;
  inset: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.invite-hero.has-custom-positions .hero-el {
  position: absolute;
  transform: translate(-50%, -50%);
  width: min(86%, 22rem);
  margin: 0;
  pointer-events: auto;
}

.invite-hero.has-custom-positions .hero-countdown.hero-el {
  width: min(92%, 22rem);
}

.invite-hero.has-custom-positions .hero-meta {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 35, 28, 0.15) 0%, rgba(20, 35, 28, 0.72) 72%, rgba(20, 35, 28, 0.88) 100%),
    radial-gradient(circle at 30% 25%, rgba(176, 141, 87, 0.35), transparent 40%),
    radial-gradient(circle at 70% 40%, rgba(111, 143, 122, 0.45), transparent 45%),
    linear-gradient(145deg, #2f4638 0%, #1a2a22 55%, #3a2a28 100%);
  animation: atmosphereDrift 18s ease-in-out infinite alternate;
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(20, 35, 28, 0.35) 0%,
    rgba(20, 35, 28, 0.85) 70%,
    rgba(20, 35, 28, 0.95) 100%
  );
  opacity: var(--hero-scrim, 0.55);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 22rem;
  color: var(--hero-text-color, #f8f4ee);
  font-family: var(--font-hero, var(--font-display));
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  margin: 0.85rem 0 0;
  text-align: initial;
}

.hero-row:first-child {
  margin-top: 0;
}

.hero-row-col {
  flex: 1 1 0;
  min-width: 0;
}

.hero-row-col.is-left {
  text-align: left;
}

.hero-row-col.is-right {
  text-align: right;
}

.hero-row-col .hero-eyebrow,
.hero-row-col .hero-names,
.hero-row-col .hero-subtitle,
.hero-row-col .hero-meta,
.hero-row-col .hero-venue,
.hero-row-col .hero-extra,
.hero-row-col .hero-countdown {
  margin-top: 0;
  margin-bottom: 0;
}

.hero-row-col .hero-meta {
  justify-content: inherit;
}

.invite-hero.has-custom-positions .hero-row.hero-el {
  width: min(92%, 24rem);
  display: flex;
}

.hero-eyebrow {
  margin: 0 0 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.85;
  font-family: var(--font-hero, var(--font-display));
}

.hero-names {
  margin: 0;
  font-family: var(--font-hero, var(--font-display));
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 1.1rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.9;
  font-weight: 300;
  font-family: var(--font-hero, var(--font-body));
}

.hero-meta {
  margin: 1.5rem 0 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-hero, var(--font-display));
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.hero-venue {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  opacity: 0.85;
  font-family: var(--font-hero, var(--font-body));
}

.hero-extra {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
  font-weight: 300;
  font-family: var(--font-hero, var(--font-body));
  white-space: pre-line;
}

.hero-scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, transparent, rgba(248, 244, 238, 0.85));
  animation: scrollPulse 2.2s ease-in-out infinite;
}

.invite-blocks {
  padding: 0.5rem 0 2rem;
}

.block {
  padding: 2.25rem 1.5rem;
}

.block-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--sage-deep);
  line-height: 1.2;
}

.block-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  font-weight: 300;
}

.block-body p {
  margin: 0 0 0.65rem;
}

.block-body p:last-child {
  margin-bottom: 0;
}

.block-text.is-quote {
  padding-block: 2.75rem;
}

.text-quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
  text-align: center;
}

.text-quote p {
  margin: 0 0 0.35rem;
}

.text-quote-attr {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: center;
}

.block-text.is-two-column {
  padding-block: 1.75rem;
}

.text-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  max-width: 22rem;
  margin: 0 auto;
}

.text-col {
  text-align: center;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.45;
}

.text-col p {
  margin: 0;
}

.block-text.is-script {
  padding-block: 1.5rem 2rem;
}

.text-script-kicker {
  margin: 0 0 0.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.text-script {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.text-script p {
  margin: 0;
}

.block-text.is-spaced .text-spaced {
  text-align: center;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.5;
}

.block-text.is-spaced .text-spaced p {
  margin: 0 0 1.15rem;
}

.block-text.is-spaced .text-spaced p:last-child {
  margin-bottom: 0;
}

.block-text.is-lead-in {
  padding-block: 1.25rem 0.5rem;
}

.text-lead-in {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 400;
}

.home-block-hero {
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f3eb, #efe8dc);
}

.home-block-hero .hero-scroll span {
  background: linear-gradient(to bottom, transparent, rgba(31, 42, 36, 0.55));
}

.home-block-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-block-cream {
  padding: 3rem 1.5rem 4rem;
}

.home-block-cream .block {
  width: 100%;
  max-width: 24rem;
  padding: 0;
  margin: 0;
}

.home-block-media {
  display: block;
  padding: 0;
}

.home-block-media .block {
  padding: 0;
  margin: 0;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
}

.home-block-media .image-frame,
.home-block-media .video-frame {
  position: relative;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
  aspect-ratio: unset;
}

.home-block-media .block-image img,
.home-block-media .block-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-block-media .block-caption {
  display: none;
}

.music-dock {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(31, 42, 36, 0.12);
  border-radius: 999px;
  background: rgba(247, 243, 235, 0.92);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(31, 42, 36, 0.16);
  backdrop-filter: blur(8px);
}

.music-toggle[aria-pressed="true"],
.music-toggle.is-on {
  background: var(--sage-deep);
  color: #f8f4ee;
  border-color: transparent;
}

.language-toggle {
  position: fixed;
  right: calc(max(1rem, env(safe-area-inset-right)) + 3.25rem);
  bottom: max(1.45rem, calc(env(safe-area-inset-bottom) + 0.45rem));
  z-index: 40;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(31, 42, 36, 0.12);
  border-radius: 999px;
  background: rgba(247, 243, 235, 0.92);
  box-shadow: 0 10px 28px rgba(31, 42, 36, 0.16);
  backdrop-filter: blur(8px);
  font: 700 0.72rem/1 var(--font-body);
}

.language-toggle a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.55;
}

.language-toggle a.is-active {
  color: var(--sage-deep);
  opacity: 1;
}

.is-rtl {
  direction: rtl;
}

.is-rtl .language-toggle,
.is-rtl .music-dock {
  direction: ltr;
}

.align-center { text-align: center; }
.align-left { text-align: left; }
.align-right { text-align: right; }

.image-frame,
.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  line-height: 0;
  background: rgba(31, 42, 36, 0.04);
}

.video-frame {
  background: #1a2a22;
}

.block-image img,
.block-video video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.block-image.is-background,
.block-video.is-background {
  padding: 0;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
}

.block-image.is-background .image-frame,
.block-video.is-background .video-frame {
  /* Full-bleed phone screen — cover, no letterboxing */
  position: relative;
  width: 100%;
  aspect-ratio: unset;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
}

.block-image.is-background img,
.block-video.is-background video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

/* Keep nested media filling the swipe screen parent */
.invite-phone.is-swipe-nav .block-image.is-background,
.invite-phone.is-swipe-nav .block-video.is-background,
.invite-phone.is-swipe-nav .block-image.is-background .image-frame,
.invite-phone.is-swipe-nav .block-video.is-background .video-frame,
.invite-phone.is-swipe-nav .home-block-media .block,
.invite-phone.is-swipe-nav .home-block-media .image-frame,
.invite-phone.is-swipe-nav .home-block-media .video-frame,
.invite-phone.is-swipe-active .block-image.is-background,
.invite-phone.is-swipe-active .block-video.is-background,
.invite-phone.is-swipe-active .block-image.is-background .image-frame,
.invite-phone.is-swipe-active .block-video.is-background .video-frame,
.invite-phone.is-swipe-active .home-block-media .block,
.invite-phone.is-swipe-active .home-block-media .image-frame,
.invite-phone.is-swipe-active .home-block-media .video-frame {
  min-height: 100%;
  height: 100%;
  max-height: 100%;
}

.media-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(20, 35, 28, 0.35) 0%,
    rgba(20, 35, 28, 0.85) 70%,
    rgba(20, 35, 28, 0.95) 100%
  );
  opacity: var(--media-scrim, 0.4);
}

.image-overlay-text,
.image-overlay-stack,
.image-overlay-line {
  position: absolute;
  z-index: 2;
  /* Explicit width — same as home .hero-el. Avoid left:50% + width:auto
     which only gives ~half the frame for wrapping. */
  width: min(86%, 22rem);
  max-width: 86%;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
  margin: 0;
  box-sizing: border-box;
}

.image-overlay-line {
  transform: translate(-50%, -50%);
}

.image-overlay-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform: translate(-50%, -50%);
}

.image-overlay-stack.anchor-top {
  transform: translate(-50%, 0);
}

.image-overlay-stack.anchor-middle {
  transform: translate(-50%, -50%);
}

.image-overlay-stack.anchor-bottom {
  transform: translate(-50%, -100%);
}

/* Auto Top/Bottom: bottom inset uses bottom:4rem — stack grows upward from that edge */
.image-overlay-stack.anchor-bottom.is-auto-inset {
  transform: translate(-50%, 0);
}

.image-overlay-stack.is-left { text-align: left; align-items: flex-start; }
.image-overlay-stack.is-center { text-align: center; align-items: center; }
.image-overlay-stack.is-right { text-align: right; align-items: flex-end; }

.image-overlay-line.is-left { text-align: left; }
.image-overlay-line.is-center { text-align: center; }
.image-overlay-line.is-right { text-align: right; }

.overlay-line {
  margin: 0;
  color: inherit;
  font-family: inherit;
  position: static;
  transform: none;
  width: 100%;
  max-width: none;
}

.overlay-line.is-heading {
  /* Match .hero-names */
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.overlay-line.is-paragraph {
  /* Match .hero-subtitle */
  font-weight: 300;
  line-height: 1.55;
  opacity: 0.9;
}

.media-action-btn {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 7.5rem;
  max-width: 80%;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(20, 35, 28, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-action-btn i {
  font-size: 1em;
  line-height: 1;
}

.media-action-btn.btn-size-sm {
  min-width: 5.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.media-action-btn.btn-size-md {
  min-width: 7.5rem;
  padding: 0.7rem 1.15rem;
  font-size: 0.92rem;
}

.media-action-btn.btn-size-lg {
  min-width: 9rem;
  padding: 0.9rem 1.4rem;
  font-size: 1.05rem;
}

.media-action-btn.is-transparent {
  box-shadow: none;
  border: 1.5px solid currentColor;
  backdrop-filter: blur(4px);
}

.media-action-btn:focus-visible {
  outline: 2px solid #f8f4ee;
  outline-offset: 3px;
}

.block-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

.block-animation {
  position: relative;
  min-height: 8rem;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.animation-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  color: var(--sage-deep);
  text-align: center;
  line-height: 1.35;
  max-width: 18rem;
}

.anim-soft-pulse .animation-text {
  animation: softPulse 3.2s ease-in-out infinite;
}

.anim-typewriter .animation-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--gold);
  width: 0;
  max-width: 100%;
}

.anim-typewriter.is-visible .animation-text {
  animation: typewriter 2.8s steps(28, end) forwards, blinkCaret 0.8s step-end infinite;
}

.hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hearts span {
  position: absolute;
  bottom: -1.5rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--blush);
  transform: rotate(45deg);
  opacity: 0.55;
  animation: floatHeart 7s linear infinite;
}

.hearts span::before,
.hearts span::after {
  content: "";
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  background: inherit;
  border-radius: 50%;
}

.hearts span::before { top: -0.35rem; left: 0; }
.hearts span::after { top: 0; left: -0.35rem; }

.hearts span:nth-child(1) { left: 12%; animation-delay: 0s; }
.hearts span:nth-child(2) { left: 30%; animation-delay: 1.2s; width: 0.55rem; height: 0.55rem; }
.hearts span:nth-child(3) { left: 48%; animation-delay: 0.6s; }
.hearts span:nth-child(4) { left: 66%; animation-delay: 2s; width: 0.45rem; height: 0.45rem; }
.hearts span:nth-child(5) { left: 82%; animation-delay: 1.5s; }

.invite-footer {
  padding: 1rem 1.5rem 3rem;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.block-countdown,
.hero-countdown {
  --countdown-color: var(--sage-deep);
  --countdown-font: var(--font-display);
  text-align: center;
}

.hero-countdown {
  margin-top: 1.5rem;
  --countdown-color: var(--hero-text-color, #f8f4ee);
  --countdown-font: var(--font-hero, var(--font-display));
}

.countdown-label {
  margin: 0 0 1rem;
  font-family: var(--countdown-font);
  color: var(--countdown-color);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.hero-countdown .countdown-label {
  opacity: 0.9;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  max-width: 22rem;
  margin: 0 auto;
}

.countdown-unit {
  padding: 0.7rem 0.35rem;
  border: 1px solid rgba(61, 90, 71, 0.18);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.35);
}

.hero-countdown .countdown-unit {
  border-color: rgba(248, 244, 238, 0.28);
  background: rgba(20, 35, 28, 0.28);
  backdrop-filter: blur(6px);
}

.countdown-value {
  display: block;
  font-family: var(--countdown-font);
  font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  line-height: 1.1;
  color: var(--countdown-color);
  font-variant-numeric: tabular-nums;
}

.countdown-unit-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.hero-countdown .countdown-unit-label {
  color: rgba(248, 244, 238, 0.75);
}

.countdown-done {
  margin: 0.75rem 0 0;
  font-family: var(--countdown-font);
  color: var(--countdown-color);
  font-size: 1.05rem;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

/* Full-bleed / home media must never wait on scroll-reveal */
.home-block-media .reveal,
.block-image.is-background.reveal,
.block-video.is-background.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.reveal.hero-anim-fade-in {
  transform: none;
}

.reveal.hero-anim-soft-rise {
  transform: translateY(2rem) scale(0.98);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.hero-content.is-visible:not(.reveal) {
  opacity: 1;
  transform: none;
}

@keyframes atmosphereDrift {
  from { filter: saturate(1) brightness(1); transform: scale(1); }
  to { filter: saturate(1.08) brightness(1.05); transform: scale(1.04); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes floatHeart {
  0% { transform: translateY(0) rotate(45deg); opacity: 0; }
  15% { opacity: 0.6; }
  100% { transform: translateY(-12rem) rotate(45deg); opacity: 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCaret {
  50% { border-color: transparent; }
}

@media (min-width: 480px) {
  .invite-shell {
    padding: 1.5rem 0;
  }

  .invite-phone {
    min-height: calc(100vh - 3rem);
    border-radius: 1.5rem;
  }
}

/* RSVP */
.rsvp-shell {
  padding: 0;
}

.rsvp-stage {
  position: relative;
  min-height: var(--invite-vh, 100dvh);
  overflow: hidden;
  color: #1f2a24;
  isolation: isolate;
}

.rsvp-media,
.rsvp-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rsvp-media {
  z-index: -2;
  object-fit: cover;
}

.rsvp-scrim {
  z-index: -1;
  background: rgba(255, 255, 255, 0.56);
  opacity: var(--rsvp-scrim, 0.35);
}

.rsvp-list {
  width: min(100%, 25rem);
  min-height: var(--invite-vh, 100dvh);
  margin: 0 auto;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.rsvp-heading {
  text-align: center;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.72);
}

.rsvp-heading p {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rsvp-heading h1 {
  margin: 0;
  font: 500 clamp(2rem, 9vw, 3rem)/1.1 var(--font-display);
}

.rsvp-heading > span {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

.rsvp-thanks {
  margin: 0.9rem auto 0;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  box-shadow: 0 5px 18px rgba(31, 42, 36, 0.12);
}

.rsvp-guests {
  display: grid;
  gap: 0.7rem;
}

.rsvp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.75rem;
  padding: 0.55rem 0.65rem 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 24px rgba(31, 42, 36, 0.12);
  backdrop-filter: blur(7px);
}

.rsvp-name {
  min-width: 0;
  font: 600 1.05rem/1.25 var(--font-body);
  overflow-wrap: anywhere;
}

.rsvp-yn {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(31, 42, 36, 0.12);
}

.rsvp-yn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rsvp-yn label {
  min-width: 3.25rem;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  color: #26382d;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.rsvp-yn input:checked + label {
  color: #fff;
  background: var(--sage-deep);
  box-shadow: 0 3px 8px rgba(31, 42, 36, 0.24);
}

.rsvp-yn input:focus-visible + label {
  outline: 2px solid #1f2a24;
  outline-offset: 2px;
}

.rsvp-submit {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 10.5rem;
    padding: 0.85rem 1.3rem;
    border: 0;
    border-radius: 999px;
    color: #FFF;
    background: rgba(175,36,24,0.8);
    box-shadow: 0px 0px 10px rgba(122,96,74,1);
    font: 1000 2rem/1 var(--font-body);
    cursor: pointer;
}

.rsvp-submit:disabled,
.rsvp-submit.is-loading {
  cursor: wait;
  opacity: 0.88;
}

.rsvp-submit-spinner {
  display: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}

.rsvp-submit.is-loading .rsvp-submit-spinner,
.rsvp-submit[aria-busy="true"] .rsvp-submit-spinner {
  display: inline-block;
  animation: rsvp-spin 0.7s linear infinite;
}

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

.rsvp-language-toggle {
  right: max(1rem, env(safe-area-inset-right));
}

.is-rtl .rsvp-row {
  padding-right: 1rem;
  padding-left: 0.65rem;
}

/* RSVP list — position set by admin (top / middle / bottom) */
.rsvp-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 0 1.25rem;
  pointer-events: none;
  max-height: 48%;
  overflow-y: auto;
}

.rsvp-overlay.is-top {
  top: max(1.25rem, env(safe-area-inset-top));
  bottom: auto;
  align-items: flex-start;
}

.rsvp-overlay.is-middle {
  inset: 0;
  max-height: none;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.rsvp-overlay.is-bottom {
  top: auto;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  align-items: flex-end;
}

/* Nested under matching overlay text — flow in the same stack, no absolute overlap */
.rsvp-overlay.is-nested {
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  max-height: none;
  width: 100%;
  padding: 0;
  margin-top: 0.75rem;
  align-items: stretch;
  overflow: visible;
  pointer-events: auto;
  z-index: 1;
}

.image-overlay-stack.has-rsvp {
  pointer-events: none;
  z-index: 5;
}

.image-overlay-stack.has-rsvp .rsvp-overlay {
  pointer-events: auto;
}

.rsvp-overlay.is-nested .rsvp-overlay-inner {
  width: 100%;
}

.rsvp-overlay-inner {
  width: min(100%, 22rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: auto;
  margin: 0;
  font-family: var(--rsvp-font, var(--font-display));
}

.rsvp-overlay-thanks {
  margin: 0;
  text-align: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1f2a24;
  font-size: 0.88rem;
}

.block.is-rsvp-block .rsvp-row {
  min-height: 2.55rem;
  padding: 0.25rem 0.35rem 0.25rem 0.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.block.is-rsvp-block .rsvp-name {
  color: #141414;
  font-family: var(--rsvp-font, var(--font-display));
  font-size: var(--rsvp-size, 1.1rem);
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.block.is-rsvp-block .rsvp-yn {
  background: transparent;
  padding: 0;
}

.block.is-rsvp-block .rsvp-yn label {
  min-width: 2.55rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(20, 20, 20, 0.55);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.35);
  color: #141414;
  font-family: var(--rsvp-font, var(--font-display));
  font-weight: 500;
}

.block.is-rsvp-block .rsvp-yn input:checked + label {
  background: rgba(20, 20, 20, 0.78);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.block.is-rsvp-block .rsvp-submit {
  align-self: center;
  margin-top: 0.2rem;
  min-width: 7rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.88rem;
}

/* Click-to-play home video — no chrome */
.block-video.is-click-play .video-frame,
.hero-media[data-click-play] {
  cursor: pointer;
}

.block-video.is-click-play video,
.hero-media[data-click-play] video {
  pointer-events: none;
}

/* Carousel */
.block-carousel {
  position: relative;
}

.carousel-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  min-height: 16rem;
  background: rgba(31, 42, 36, 0.06);
  touch-action: pan-y;
}

.block-carousel.is-background .carousel-frame,
.home-block-media .carousel-frame {
  border-radius: 0;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
  background: #1a1a1a;
}

/* Home reveal carousel must not flash a dark plate under the video fade */
.home-reveal-carousel .carousel-frame,
.home-reveal-carousel .block-carousel.is-background .carousel-frame {
  border-radius: 0;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
  background: transparent;
}

.carousel-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.carousel-backdrop img,
.carousel-backdrop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-backdrop.is-nested-carousel {
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  position: absolute;
  inset: 0;
}

/* Lean nested background — not a .block, so it cannot become a second swipe screen. */
.carousel-nested-bg,
.carousel-nested-bg .carousel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
}

.carousel-nested-bg {
  z-index: 0;
  pointer-events: none;
}

.carousel-nested-bg .carousel-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-backdrop.is-nested-carousel .carousel-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Front slides stack above the nested bg; images + text are both valid. */
.block-carousel.has-carousel-backdrop > .carousel-frame > .carousel-slide {
  z-index: 2;
}

.block-carousel.has-carousel-backdrop > .carousel-frame > .carousel-slide .carousel-slide-image {
  z-index: 0;
}

.block-carousel.has-carousel-backdrop > .carousel-frame > .media-scrim {
  z-index: 1;
}

.block-carousel.has-carousel-backdrop > .carousel-frame > .carousel-dots {
  z-index: 6;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Direct children only — so a front carousel's mode does not override a nested background carousel.
   Include .carousel-nested-bg (lean shell, not .block-carousel) so nested fades actually become visible. */
.block-carousel.is-fade > .carousel-frame > .carousel-slide,
.carousel-nested-bg.is-fade > .carousel-frame > .carousel-slide {
  transition: opacity 0.7s ease;
}

.block-carousel.is-fade > .carousel-frame > .carousel-slide.is-active,
.carousel-nested-bg.is-fade > .carousel-frame > .carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Nested bg is decorative only — never steal taps from front slide buttons/links. */
.carousel-nested-bg,
.carousel-nested-bg .carousel-slide,
.carousel-nested-bg .carousel-slide.is-active {
  pointer-events: none !important;
}

/* Front multi-slide carousels set touch-action via JS so section swipe still works on single-slide screens. */

.block-carousel.is-slide > .carousel-frame > .carousel-slide {
  opacity: 1;
  transform: translateX(100%);
  transition: transform 0.55s ease;
}

.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-active {
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-exit-left {
  transform: translateX(-100%);
  z-index: 1;
}

.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-exit-right {
  transform: translateX(100%);
  z-index: 1;
}

.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-enter-left {
  animation: carousel-enter-left 0.55s ease both;
}

.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-enter-right {
  animation: carousel-enter-right 0.55s ease both;
}

@keyframes carousel-enter-left {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes carousel-enter-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.block-carousel.is-background,
.home-block-media .block-carousel,
.home-reveal-carousel .block-carousel {
  padding: 0;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
}

/* Nested background is sized by its host frame, not the viewport. */
.block-carousel.is-nested-bg.is-background,
.carousel-backdrop.is-nested-carousel .block-carousel.is-background,
.carousel-nested-bg {
  min-height: 100%;
  height: 100%;
  max-height: 100%;
}

.carousel-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.carousel-text-stack {
  position: absolute;
  z-index: 3;
  width: min(86%, 22rem);
  max-width: 86%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: center;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  pointer-events: none;
}

/* Never leave has-rsvp stacks clickable on inactive slides — children with
   pointer-events:auto still receive hits when the parent slide is none,
   which blocks slide buttons on /r/… invite URLs. */
.carousel-text-stack.has-rsvp {
  pointer-events: none;
}

/* Inactive slides must not intercept taps (opacity:0 alone is not enough). */
.block-carousel > .carousel-frame > .carousel-slide:not(.is-active),
.block-carousel > .carousel-frame > .carousel-slide:not(.is-active) * {
  pointer-events: none !important;
}

.carousel-text-line {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Active slide must allow RSVP / slide-button clicks */
.block-carousel.is-fade > .carousel-frame > .carousel-slide.is-active .carousel-text-stack.has-rsvp,
.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-active .carousel-text-stack.has-rsvp,
.block-carousel.is-fade > .carousel-frame > .carousel-slide.is-active .rsvp-overlay,
.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-active .rsvp-overlay,
.block-carousel.is-fade > .carousel-frame > .carousel-slide.is-active .rsvp-overlay .rsvp-overlay-inner,
.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-active .rsvp-overlay .rsvp-overlay-inner,
.block-carousel.is-fade > .carousel-frame > .carousel-slide.is-active .carousel-slide-btn,
.block-carousel.is-slide > .carousel-frame > .carousel-slide.is-active .carousel-slide-btn,
.block-carousel > .carousel-frame > .carousel-slide.is-active .carousel-slide-btn {
  pointer-events: auto;
}

.carousel-slide-scrim {
  z-index: 1;
}

.carousel-slide-btn {
  z-index: 5;
  pointer-events: none;
}

.block-carousel > .carousel-frame > .carousel-slide.is-active .carousel-slide-btn {
  pointer-events: auto;
}

.carousel-slide-countdown,
.media-countdown {
  z-index: 3;
  width: min(90%, 22rem);
  max-width: 90%;
  margin: 0;
  pointer-events: none;
}

.carousel-slide-countdown .countdown-unit,
.media-countdown .countdown-unit {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.carousel-caption {
  position: absolute;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(86%, 22rem);
  margin: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  color: #f8f4ee;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  pointer-events: auto;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.block-carousel:not(.is-background) .carousel-dot {
  background: rgba(31, 42, 36, 0.28);
  box-shadow: none;
}

.block-carousel:not(.is-background) .carousel-dot.is-active {
  background: var(--sage-deep, #3d5a47);
}

/* Home video → carousel reveal (smooth fade only, no dark flash) */
.home-reveal-stage {
  position: relative;
  width: 100%;
  min-height: var(--invite-vh, 100dvh);
  height: var(--invite-vh, 100dvh);
  overflow: hidden;
  background: transparent;
}

.home-reveal-video,
.home-reveal-carousel {
  position: absolute;
  inset: 0;
}

.home-reveal-video {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.9s ease;
  will-change: opacity;
}

.home-reveal-carousel {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  will-change: opacity;
  background: transparent;
}

/* Crossfade: video fades out while carousel fades in underneath */
.home-block-hero.is-revealing .home-reveal-video,
.home-block-hero.is-revealed .home-reveal-video {
  opacity: 0;
  pointer-events: none;
}

.home-block-hero.is-revealing .home-reveal-carousel,
.home-block-hero.is-revealed .home-reveal-carousel {
  opacity: 1;
}

.home-block-hero.is-revealed .home-reveal-carousel {
  pointer-events: auto;
  z-index: 2;
}

.home-reveal-carousel .block-carousel,
.home-reveal-carousel .home-block-inner,
.home-reveal-carousel .carousel-frame {
  min-height: 100%;
  height: 100%;
  background: transparent;
}

.home-reveal-video .block-video,
.home-reveal-video .video-frame {
  min-height: 100%;
  height: 100%;
  background: #111;
}

.home-reveal-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
  /* Help mobile browsers composite the poster / first frame */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.home-block-media .block-video.is-background .video-frame,
.block-video.is-background .video-frame {
  background: #111;
}
