/* 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); } /* ---------- strip ergonomics (Phase 1 UI fix) ---------- The reference spaces its two chip rows with `#strip .chips + .chips`, but on phones the .lbl heading between them is display:none and still in the DOM, so the adjacent-sibling selector never matches and the rows sit flush (measured: 0px gap). native.js collapses the 7 context chips into the single .ctxbtn below, leaving one chip row with real touch targets. Phase 2 must carry this - see CLAUDE.md. */ .ctxbtn{ display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 14px; font-family: var(--fc); font-size: 1.05rem; font-weight: 600; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; text-align: left; cursor: pointer; } .ctxbtn b{ font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ctxbtn > span{ color: var(--muted); flex: 0 0 auto; } /* Real 44px targets. These scroll horizontally, so an undersized target turns a mis-hit into a scroll rather than a tap. */ #strip .chips{ margin-top: 8px; } #strip .chips .chip{ min-height: 44px; padding: 8px 14px; } /* Scroll affordance. native.js sets data-more only on rows that actually overflow, so the fade never appears where there is nothing to reach. */ #strip .chips[data-more]{ -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } } /* Context picker rows inside the sheet. Uses CTXHINT from the reference, which the phone layout otherwise never shows. */ .ctxopt{ display: block; width: 100%; text-align: left; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; min-height: 44px; cursor: pointer; } .ctxopt[aria-pressed="true"]{ background: var(--ink); color: var(--page); border-color: var(--ink); } .ctxopt b{ display: block; font-family: var(--fc); font-size: 1.1rem; line-height: 1.2; } .ctxopt .hint{ font-size: .85rem; color: var(--muted); } .ctxopt[aria-pressed="true"] .hint{ color: var(--page); opacity: .75; }