/* P0 2026-11-12: the network privacy UI (pbe-consent-v1.*, a shared file pinned to the viewport bottom) must never
   cover mobile navigation. Phone/tablet layout only (base-v3.css shows .mobile-bottom-nav at <=900px).
   --pbe-mbn-h = .mobile-bottom-nav's own fixed height (base-v3.css: height:60px at bottom:0, no safe-area padding).
   --pbe-head-h = the fixed command bar + .mobile-header stack (mobile-header: top 86px + 48px). */
@media (max-width: 900px) {
  :root { --pbe-mbn-h: 60px; --pbe-head-h: 134px; --pbe-consent-above: calc(var(--pbe-mbn-h) + 8px); }
  /* first visit / reopened: above the bar, capped under the header, copy scrolls so both choices stay on screen */
  body #pbe-consent { bottom: var(--pbe-consent-above); max-height: calc(100vh - var(--pbe-consent-above) - var(--pbe-head-h) - 8px); max-height: calc(100dvh - var(--pbe-consent-above) - var(--pbe-head-h) - 8px); display: flex; flex-direction: column; }
  body #pbe-consent h2, body #pbe-consent .pbe-consent-actions { flex: none; }
  body #pbe-consent p { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  /* after a decision: the "Privacy choices" pill sits above the bar with a 44px target */
  body #pbe-privacy-choice { bottom: var(--pbe-consent-above); display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 12px; }
  body #pbe-privacy-choice:focus-visible { outline: 2px solid #e1c65d; outline-offset: 2px; }
  /* the page's last line scrolls clear of the pill */
  body:has(#pbe-privacy-choice) .main-content { padding-bottom: calc(var(--pbe-consent-above) + 44px + 12px); }
  /* the open menu sidebar is modal: privacy UI steps aside and returns (still undecided if unset) when it closes */
  body:has(.sidebar.open) #pbe-consent, body:has(.sidebar.open) #pbe-privacy-choice { display: none; }
}
