/* Keep native touch/trackpad momentum and let one scroll engine choose the
   landing point. No gesture timers, wheel cancellation, or animation locks. */
html.native-story-scroll.invitation-page-snap:not(.invitation-loading-lock):not(.invitation-dialog-open) {
  scroll-snap-type: y mandatory !important;
  scroll-padding-block: 0 !important;
  scroll-behavior: auto !important;
  overscroll-behavior-y: contain;
}

/* overflow-x:hidden makes overflow-y:visible compute to auto. On body that
   creates a second scroll container and prevents viewport snap areas from
   being discovered. Clip horizontally on html, never on body. Keep the
   loading/dialog locks authoritative until their overlays are dismissed. */
html.native-story-scroll.invitation-page-snap:not(.invitation-loading-lock):not(.invitation-dialog-open) body {
  overflow: visible !important;
}

/* The viewport is the only snapping scroll container. */
html.native-story-scroll.invitation-page-snap body,
html.native-story-scroll.invitation-page-snap .native-scroll-root,
html.native-story-scroll.invitation-page-snap .native-scroll-root .swiper-wrapper {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}

html.native-story-scroll.invitation-page-snap .native-scroll-root > .swiper-wrapper > .invitation-slide {
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  scroll-margin-block: 0 !important;
}

/* Story panels sit inside overflow-clipped slide wrappers. The wrapper must
   supply the snap area; an inner panel belongs to the wrapper's scrollport,
   not the viewport. One boundary per chapter also avoids competing targets. */
html.native-story-scroll.invitation-page-snap .story-swiper-slide > .native-story-page {
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}

/* A tall section retains its real height: the browser can scroll inside the
   oversized snap area before settling at the next section's edge. */
html.native-story-scroll.invitation-page-snap .native-story-page {
  height: auto !important;
  max-height: none !important;
}

/* Loading and open dialogs must not cause snapping behind their overlays. */
html.native-story-scroll.invitation-page-snap.invitation-loading-lock,
html.native-story-scroll.invitation-page-snap.invitation-dialog-open {
  scroll-snap-type: none !important;
}
