/* Native-only overrides. reference/ is never edited; sync-www.sh injects this as the last stylesheet in , so on equal specificity these rules win. */ :root{ /* Filled in from Android WindowInsets by MainActivity via __applyInsets(). The env() defaults keep the page correct in a plain desktop browser, where env() works and the native bridge is absent. */ --ins-t: env(safe-area-inset-top, 0px); --ins-b: env(safe-area-inset-bottom, 0px); --ins-l: env(safe-area-inset-left, 0px); --ins-r: env(safe-area-inset-right, 0px); /* The reference derives --sab from env(safe-area-inset-bottom), which is always 0px inside an Android WebView. Re-point it at the real inset. .bnav and .sheet both key off --sab, so they need no further changes. */ --sab: var(--ins-b); } @media (max-width:820px){ /* The reference sets `padding: 8px 8px calc(var(--nav) + var(--sab) + 8px)`. Bottom already accounts for --sab; add the top and side insets so the unit panel clears the status bar and any display cutout. */ .app{ padding-top: calc(8px + var(--ins-t)); padding-left: calc(8px + var(--ins-l)); padding-right: calc(8px + var(--ins-r)); } /* Bottom nav is position:fixed and spans the full width, so it needs the side insets itself. Its height/padding-bottom already follow --sab. */ .bnav{ padding-left: var(--ins-l); padding-right: var(--ins-r); } }