/* Mobile navigation stays available while scrolling. The measured spacer keeps
   the original content offset; the opaque backing avoids backdrop compositing. */
[data-mobile-header-spacer] { display: none; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  html { overscroll-behavior-y: none; scroll-padding-top: calc(var(--site-mobile-header-height, 0px) + env(safe-area-inset-top, 0px) + 1rem) !important; }
  body { overscroll-behavior-y: none; }
  [data-mobile-header] {
    position: sticky !important;
    top: 0 !important;
    height: auto !important;
    transform: none !important;
    translate: none !important;
    will-change: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    z-index: 1000 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  html[data-mobile-header-fixed] [data-mobile-header] {
    position: fixed !important;
    top: env(safe-area-inset-top, 0px) !important;
    bottom: auto !important;
    left: var(--site-mobile-header-left, 0px) !important;
    right: auto !important;
    width: var(--site-mobile-header-width, 100%) !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  html[data-mobile-header-fixed] [data-mobile-header-spacer] {
    display: block;
    height: calc(var(--site-mobile-header-height, 0px) + env(safe-area-inset-top, 0px));
    flex: none;
    pointer-events: none;
    overflow-anchor: none;
  }
  html[data-mobile-header-fixed] [data-mobile-header-spacer]::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    height: calc(var(--site-mobile-header-height, 0px) + env(safe-area-inset-top, 0px));
    background: var(--site-mobile-header-background);
    z-index: 999;
    pointer-events: none;
  }
}
@media print {
  [data-mobile-header-spacer] { display: none !important; }
}
