/* Final invitation interaction refinements. Loaded after the legacy theme. */
.section.is-anchor-target .reveal,
.section.is-anchor-target .motion-item {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .reveal {
    transform: translateY(12px);
    transition-duration: 0.42s;
  }

  .motion-item {
    --motion-delay: 0ms !important;
    transition-duration: 0.44s, 0.5s;
  }

  body.is-interactive-section .floating-music-toggle {
    left: -16px !important;
    width: 42px !important;
    height: 42px !important;
    opacity: 0.58 !important;
  }

  body.is-interactive-section .quick-dock.is-collapsed {
    right: -16px !important;
    opacity: 0.58 !important;
  }

  body.is-interactive-section .quick-dock.is-collapsed .quick-dock-toggle {
    width: 42px !important;
    height: 42px !important;
  }

  body.is-form-interacting .floating-music-toggle,
  body.is-form-interacting .quick-dock.is-collapsed {
    opacity: 0.28 !important;
  }

  .rsvp-section .form,
  .message-section .message-form {
    scroll-margin-bottom: 76px;
  }
}

@media (min-width: 961px) {
  .gallery.gallery-layout-four,
  .gallery.gallery-layout-six,
  .gallery.gallery-layout-eight {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row dense !important;
    grid-template-areas: none !important;
    width: min(1180px, calc(100% - 64px)) !important;
    margin-inline: auto !important;
  }

  .gallery.gallery-layout-four .gallery-editorial-copy,
  .gallery.gallery-layout-six .gallery-editorial-copy,
  .gallery.gallery-layout-eight .gallery-editorial-copy {
    grid-column: 1 / -1 !important;
  }

  .gallery.gallery-layout-four .gallery-frame.is-portrait,
  .gallery.gallery-layout-six .gallery-frame.is-portrait,
  .gallery.gallery-layout-eight .gallery-frame.is-portrait,
  .gallery.gallery-layout-four .gallery-frame.is-square,
  .gallery.gallery-layout-six .gallery-frame.is-square,
  .gallery.gallery-layout-eight .gallery-frame.is-square {
    grid-column: span 1 !important;
  }

  .gallery.gallery-layout-four .gallery-frame.is-landscape,
  .gallery.gallery-layout-six .gallery-frame.is-landscape,
  .gallery.gallery-layout-eight .gallery-frame.is-landscape {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16 / 10 !important;
  }

  .gallery.gallery-layout-four .gallery-frame.is-wide,
  .gallery.gallery-layout-six .gallery-frame.is-wide,
  .gallery.gallery-layout-eight .gallery-frame.is-wide {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16 / 9 !important;
  }
}

.message-section .guestbook-controls {
  justify-self: center !important;
  width: fit-content !important;
  min-height: 56px !important;
  margin: 12px auto 0 !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  background: rgba(24, 24, 35, 0.82) !important;
  box-shadow: 0 14px 34px rgba(10, 10, 18, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  opacity: 0.96 !important;
  transform: translateY(-4px);
}

.message-section .guestbook-controls.is-open {
  opacity: 1 !important;
}

.message-section .guestbook-control {
  border-color: rgba(255, 247, 240, 0.38) !important;
  color: #fffaf6 !important;
  background: linear-gradient(145deg, rgba(190, 91, 101, 0.96), rgba(139, 60, 72, 0.96)) !important;
  box-shadow: 0 7px 16px rgba(10, 10, 18, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.message-section .guestbook-control:disabled {
  color: rgba(255, 255, 255, 0.62) !important;
  background: rgba(69, 65, 76, 0.82) !important;
  opacity: 0.72 !important;
}

.message-section .guestbook-page-status {
  color: #fffdf9 !important;
  background: transparent !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.48);
}

.thank-you-section {
  position: relative;
  z-index: 3;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(68px, 9vw, 118px) clamp(22px, 6vw, 80px);
  border-top: 1px solid rgba(185, 142, 70, 0.28);
  border-bottom: 1px solid rgba(185, 142, 70, 0.22);
  background:
    radial-gradient(circle at 8% 12%, rgba(233, 167, 161, 0.2), transparent 28%),
    radial-gradient(circle at 92% 86%, rgba(185, 142, 70, 0.14), transparent 30%),
    linear-gradient(145deg, #fffaf6 0%, #fff2ed 52%, #f8e7e3 100%);
  text-align: center;
}

.thank-you-section::before,
.thank-you-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(170px, 25vw, 330px);
  aspect-ratio: 1;
  border: 1px solid rgba(184, 95, 102, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.thank-you-section::before {
  top: -48%;
  left: -7%;
  box-shadow: 0 0 0 26px rgba(185, 142, 70, 0.035), 0 0 0 52px rgba(184, 95, 102, 0.025);
}

.thank-you-section::after {
  right: -8%;
  bottom: -54%;
  box-shadow: 0 0 0 26px rgba(184, 95, 102, 0.03), 0 0 0 52px rgba(185, 142, 70, 0.025);
}

.thank-you-inner {
  width: min(760px, 100%);
  margin-inline: auto;
}

.thank-you-flourish {
  display: block;
  width: 54px;
  height: 20px;
  margin: 0 auto 18px;
  border-top: 1px solid rgba(185, 142, 70, 0.7);
  border-radius: 50%;
}

.thank-you-flourish::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: -4px auto 0;
  border: 1px solid rgba(185, 142, 70, 0.88);
  background: #fff7f2;
  transform: rotate(45deg);
}

.thank-you-eyebrow {
  margin: 0 0 12px;
  color: #a06e62;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.thank-you-section h2 {
  max-width: 720px;
  margin: 0 auto;
  color: #5a3835;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  font-weight: 600;
  line-height: 0.98;
  text-wrap: balance;
}

.thank-you-message {
  max-width: 610px;
  margin: 22px auto 0;
  color: rgba(87, 65, 58, 0.82);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.06rem, 1.7vw, 1.28rem);
  font-weight: 600;
  line-height: 1.65;
  text-wrap: balance;
}

.thank-you-divider {
  display: block;
  width: 82px;
  height: 1px;
  margin: 28px auto 18px;
  background: linear-gradient(90deg, transparent, rgba(185, 142, 70, 0.82), transparent);
}

.thank-you-signature {
  margin: 0;
  color: #b85f66;
  font-family: "Great Vibes", "Dancing Script", cursive;
  font-size: clamp(2.25rem, 4.8vw, 3.45rem);
  line-height: 1;
}

.thank-you-date {
  display: block;
  margin-top: 10px;
  color: rgba(90, 56, 53, 0.7);
  font-family: "Cormorant Garamond", serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

@media (max-width: 560px) {
  .message-section .guestbook-controls {
    gap: 8px !important;
    min-height: 50px !important;
    padding: 5px 8px !important;
    transform: translateY(-2px);
  }

  .message-section .guestbook-control {
    width: 42px !important;
    height: 42px !important;
  }

  .message-section .guestbook-page-status {
    min-width: 92px !important;
    padding-inline: 4px !important;
    font-size: 0.72rem !important;
  }

  .thank-you-section {
    padding: 62px 24px 66px;
  }

  .thank-you-section h2 {
    font-size: clamp(2.18rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .thank-you-message {
    margin-top: 18px;
    font-size: 1.04rem;
    line-height: 1.58;
  }
}
