/* MAGIC 1XTRA - MOBILE CONTENT BOUNDARY V3
 * A visible bottom navigation owns a real lane OUTSIDE the scroll viewport.
 * Cards may scroll inside #page but can never render beneath that lane.
 * When V2 navigation hides on downward scrolling, the lane is released.
 * No fixed black pseudo-elements, no overlay masks, no duplicate navigation.
 */
@media (max-width:767px) {
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) {
    --mx-bottom-nav-lane: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  html[data-mx-unified-nav-owner=""],
  html[data-mx-unified-nav-hidden="1"] {
    --mx-bottom-nav-lane: 0px;
  }
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #app.app-shell {
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: var(--mx-bottom-nav-lane) !important;
    box-sizing: border-box !important;
    transition: padding-bottom .22s ease-out;
  }
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #app > .topbar {
    flex: 0 0 auto !important;
  }
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #app > #page {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px !important;
    margin-bottom: 0 !important;
    scroll-padding-bottom: 16px;
  }
  /* Home and service-selector content gets no second fake nav allowance. */
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #page > .mxso-page,
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #page > .mxss-screen {
    min-height: 0 !important;
    padding-bottom: 16px !important;
  }
  /* Keep selected navigation independent, above its own reserved lane. */
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #mxUnifiedMainNavV2,
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #mxRemainingFlutterWorkspace,
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #mxPhoneNavUnified,
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #mxFlutterMarketTabs,
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #bottomNav {
    will-change: transform;
  }
}
@media (max-width:767px) and (prefers-reduced-motion:reduce) {
  html[data-mx-unified-nav-owner]:not([data-mx-unified-nav-owner=""]) body #app.app-shell {
    transition:none !important;
  }
}
