/* The command map inside the installed app (map-viewer.js). Drawn only in the app.
 * Michael's safe-area rule (2026-10-07): nothing under the island, status bar, home indicator or a
 * landscape side. The map is served by Sentinel into an iframe, where the insets read 0, so it cannot
 * pad itself: the dialog box is inset on every edge and the header and frame live inside it. Only the
 * ::backdrop runs edge to edge, and it is plain background. The fallbacks keep the box inset before
 * style.css defines the --safe-* tokens. The z-index is for WebKit before iOS 15.4 (the app targets
 * 15.0), which has no showModal and so no top layer: the viewer must still sit above the sticky banner
 * (19), the rail (20) and the safe-area veils (1001), or they cover Close and take its taps. The top
 * layer ignores it. */
.bq-map-viewer{position:fixed;z-index:1002;top:var(--safe-top,env(safe-area-inset-top,0px));right:var(--safe-right,env(safe-area-inset-right,0px));bottom:var(--safe-bottom,env(safe-area-inset-bottom,0px));left:var(--safe-left,env(safe-area-inset-left,0px));width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;background:var(--panel);color:var(--text);overflow:hidden;overscroll-behavior:contain}
.bq-map-viewer[open]{display:flex;flex-direction:column}
/* The backdrop does not inherit page tokens in every WebKit, hence the system-color fallback. */
.bq-map-viewer::backdrop{background:var(--bg,Canvas)}
.bq-map-viewer [hidden]{display:none!important}
.bq-map-head{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:10px 16px;border-bottom:1px solid var(--line-2);background:var(--panel)}
.bq-map-heading{flex:1;min-width:0}
.bq-map-heading h2{margin:0;font-size:18px;font-weight:650;letter-spacing:-.02em;line-height:1.25}
.bq-map-heading p{margin:2px 0 0;font-size:13px;color:var(--muted);line-height:1.4}
.bq-map-head .proto{flex-shrink:1}
.bq-map-robot{padding:10px 16px;border-bottom:1px solid var(--line-2);background:var(--panel-2);font-size:15px;font-weight:600}
.bq-map-alerts{margin:0;padding:10px 16px;background:var(--danger);color:var(--on-alert);font-size:15px;font-weight:700;line-height:1.4}
/* Sentinel's viewer HUD does not scroll itself, and a frame shorter than the HUD cuts off its
 * bottom controls (CommandMap.jsx: the 700px floor). The frame keeps that floor and the area
 * around it scrolls instead, so no control is ever unreachable on a short landscape phone. */
.bq-map-frame{position:relative;flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;background:var(--panel-2)}
.bq-map-frame iframe{position:relative;z-index:1;display:block;width:100%;height:100%;min-height:700px;border:0}
.bq-map-loading{position:absolute;top:24px;left:16px;right:16px;margin:0;text-align:center;font-size:14px;color:var(--muted);overflow-wrap:anywhere}
/* A launcher that replaces a plain link in the app: a button (it opens the viewer and never
 * navigates the app away), drawn as the link it replaces. With sentinel-details-link or btn the
 * screen's own class supplies the look. */
.bq-map-link{-webkit-appearance:none;appearance:none;margin:0;padding:0;border:0;background:none;font:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-align:left;cursor:pointer}
button.sentinel-details-link{-webkit-appearance:none;appearance:none;margin:0;padding:0;border:0;background:none;font-family:inherit;line-height:inherit;text-align:left;cursor:pointer}
/* At phone width one flex row gave the chip the width and the heading one word per line: a 250 px
 * header on an 874 px iPhone (e2e 2026-10-30). There the header is a grid: Close and Robot on the first
 * row, the heading and its lead at full width under them, the chip on its own line as wide as its words
 * (the page's phone rule caps .proto at 255 px for the workspace bar, which wrapped it to two lines here).
 * The DOM order (Close, heading, chip, Robot), and so the focus order, is unchanged. */
@media(max-width:760px){.bq-map-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"close . robot" "heading heading heading" "chip chip chip";align-items:center;padding:6px 12px 8px;gap:6px 10px}.bq-map-close{grid-area:close}.bq-map-robot-toggle{grid-area:robot}.bq-map-heading{grid-area:heading}.bq-map-head .proto{grid-area:chip;justify-self:start;max-width:none}.bq-map-heading h2{font-size:17px}.bq-map-heading p{font-size:12px}.bq-map-robot,.bq-map-alerts{padding:9px 12px}}
