/**
 * Prompt #245 — Universal interactive surface / natural-scroll contract.
 *
 * One vertical scroll owner per Lantern modal, game, or mission surface.
 * Scrollbar chrome is visually hidden; wheel / trackpad / touch / keyboard still work.
 * Do not set overflow:hidden on the scroll owner.
 *
 * Future games inherit this by adding:
 *   .lanternInteractiveSurface          — the scroll owner
 *   .lanternInteractiveSurfaceContent   — inner flow (never a competing vertical scroller)
 */

:root {
  --lantern-surface-viewport-max: 100vh;
}

@supports (height: 100dvh) {
  :root {
    --lantern-surface-viewport-max: 100dvh;
  }
}

@supports (height: 100svh) {
  :root {
    --lantern-surface-viewport-max: 100svh;
  }
}

.lanternInteractiveSurface {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
}

.lanternInteractiveSurface::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.lanternInteractiveSurfaceContent {
  overflow: visible;
  max-height: none;
  height: auto;
  min-width: 0;
  box-sizing: border-box;
}

/* Fullscreen / sheet overlay that IS the scroll owner (card-detail style). */
.lanternInteractiveSurface--overlay {
  max-height: 100vh;
  max-height: 100dvh;
  max-height: var(--lantern-surface-viewport-max, 100vh);
  align-items: flex-start;
}

/* Page behind an open surface must not scroll; the surface owns scroll. */
body.lantern-interactive-surface-page-lock {
  overflow: hidden;
  position: fixed;
  width: 100%;
  inset-inline: 0;
}
