/* AMM v2.28.40 — iPhone installed-app status bar / scroll repair.
   The previous black-translucent status bar painted a scrolling document
   behind iOS system indicators. Keep normal body scrolling, never trap touch.
   This file deliberately does not alter admin, catalogue or rights pages. */
#amm-ios-statusbar-shield { display: none; }

/* Anchor destinations need a visible resting position. The mobile header is
   in ordinary flow, so there is no fixed header to compensate for. */
@media (max-width:820px) {
  html { scroll-padding-top: max(22px, env(safe-area-inset-top, 0px)) !important; }
  #home .amm5-desk, #home .amm5-paths {
    scroll-margin-top: max(24px, env(safe-area-inset-top, 0px)) !important;
  }
}

/* Older installed apps can retain their original translucent status style.
   A noninteractive mask prevents text and cards showing behind the iOS clock
   on scroll, including while a cached Home Screen shell is open. */
@media (display-mode:standalone) and (max-width:820px) {
  #amm-ios-statusbar-shield {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    min-height: 0;
    background: #050b14;
    z-index: 2147483646;
    pointer-events: none;
    contain: paint;
  }
  body { padding-top: max(24px, env(safe-area-inset-top, 0px)) !important; }
  /* One scrolling document; no extra body-level vertical scrollport. */
  html { overflow-y: auto; }
  body { overflow-y: visible; }
}

@media (max-height:570px) and (orientation:landscape) and (display-mode:standalone) {
  body { padding-top: max(12px, env(safe-area-inset-top, 0px)) !important; }
}
