/* FB CHAT support's control panel (Docs/Control-panel-mockup.html, Tom's OK of 2026-11-07): a left rail on a computer,
   tabs along the bottom on a phone, and each area with its own color and picture so no two look alike. The page's
   Content-Security-Policy loads no fonts from anywhere else: the system's own fonts. */

:root {
  color-scheme: light dark;
  --bg: #f3f5f8; --surface: #ffffff; --sunk: #e9edf2; --line: #d6dce5;
  --ink: #17202c; --muted: #5a6677; --accent: #1f5fd1; --accent-ink: #ffffff;
  --ok: #17803d; --ok-bg: #e3f4e8; --warn: #9a5b00; --warn-bg: #fff1d6; --bad: #b42318; --bad-bg: #fde8e6;
  --c-alerts: #d9480f; --c-pages: #1f5fd1; --c-links: #0b7a75; --c-drive: #6f42c1;
  --c-people: #1971c2; --c-features: #7048e8; --c-billing: #2b8a3e; --c-danger: #c92a2a; --c-history: #5c677d;
  --c-overview: #0b7285; --c-reports: #b42318; --c-codes: #1f5fd1;
  --f-display: "Avenir Next", "Segoe UI Variable Display", system-ui, -apple-system, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #18202a; --sunk: #121922; --line: #2a3542; --ink: #e8edf4; --muted: #9aa7b8;
    --accent: #6d9eff; --accent-ink: #0b1220; --ok: #5fd27f; --ok-bg: #12301d; --warn: #ffc25c; --warn-bg: #3a2a0c;
    --bad: #ff8a80; --bad-bg: #3d1614; --c-alerts: #ff8b52; --c-pages: #6d9eff; --c-links: #3cc9c1; --c-drive: #b197fc;
    --c-people: #74b9ff; --c-features: #a78bfa; --c-billing: #69db7c; --c-danger: #ff6b6b; --c-history: #a3aec2;
    --c-overview: #3bc9db; --c-reports: #ff8a80; --c-codes: #6d9eff;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #18202a; --sunk: #121922; --line: #2a3542; --ink: #e8edf4; --muted: #9aa7b8;
  --accent: #6d9eff; --accent-ink: #0b1220; --ok: #5fd27f; --ok-bg: #12301d; --warn: #ffc25c; --warn-bg: #3a2a0c;
  --bad: #ff8a80; --bad-bg: #3d1614; --c-alerts: #ff8b52; --c-pages: #6d9eff; --c-links: #3cc9c1; --c-drive: #b197fc;
  --c-people: #74b9ff; --c-features: #a78bfa; --c-billing: #69db7c; --c-danger: #ff6b6b; --c-history: #a3aec2;
  --c-overview: #3bc9db; --c-reports: #ff8a80; --c-codes: #6d9eff;
}

* { box-sizing: border-box; }

/* The page shows and hides its parts with the hidden attribute; the display rules below mustn't win. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; } h4 { font-size: 0.95rem; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible,
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.loading { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ the frame */

.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px; display: flex;
  flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 700 14px var(--f-display); flex: none; }
.brand b { font-family: var(--f-display); font-size: 1.05rem; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 0;
  background: none; color: var(--ink); text-align: left; font-weight: 600; width: 100%; text-decoration: none; }
.nav:hover { background: var(--sunk); }
.nav[aria-current="page"] { background: var(--sunk); box-shadow: inset 3px 0 0 var(--accent); }
.nav .count, .bottom .count { background: var(--bad); color: #fff; border-radius: 99px; font-size: 12px; padding: 0 8px;
  font-weight: 700; }
.nav .count { margin-left: auto; }
.nav.danger { color: var(--c-danger); margin-top: auto; }
.rail-foot { border-top: 1px solid var(--line); margin-top: 8px; padding: 12px 8px 0; font-size: 12px; color: var(--muted);
  display: grid; gap: 8px; }
.rail-foot .warn { color: var(--bad); font-weight: 700; }

.main { padding-block: 28px 60px; padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px)); min-width: 0; }
.wrap { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.page.module { gap: 14px; }

.bottom { display: none; }

/* ------------------------------------------------------------------ pictures, cards and pills */

.ico { width: 22px; height: 22px; flex: none; }
.tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff;
  background: var(--k, var(--accent)); }
.tile .ico { width: 24px; height: 24px; }
.tile.big { width: 56px; height: 56px; border-radius: 14px; }
.tile.big .ico { width: 30px; height: 30px; }
.tile.small { width: 30px; height: 30px; border-radius: 8px; }
.tile.small .ico { width: 18px; height: 18px; }

.lede { color: var(--muted); max-width: 70ch; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card > h3 + *, .card > h4 + * { margin-top: 10px; }
.stack-gap { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row.tight { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.sec-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sec-head .grow h1, .sec-head .grow h2 { overflow-wrap: anywhere; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 3px 10px; font-size: 13px;
  font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.off { background: var(--sunk); color: var(--muted); }

/* ------------------------------------------------------------------ buttons and forms */

.btn, button.secondary, button.small-button, button.danger, button:not([class]), a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 16px; font-weight: 700;
  text-decoration: none; line-height: 1.3; min-height: 40px; }
.btn:hover, button.secondary:hover, button.small-button:hover, a.button:hover { background: var(--sunk); }
.btn .ico { width: 18px; height: 18px; }
.btn.primary, button:not([class]) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover, button:not([class]):hover { filter: brightness(1.08); background: var(--accent); }
.btn.big { padding: 12px 22px; font-size: 1rem; min-height: 46px; }
.btn.red, button.danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn.red:hover, button.danger:hover { filter: brightness(1.08); background: var(--c-danger); }
.btn.ghost-red { color: var(--c-danger); border-color: var(--c-danger); background: none; }
.btn.ghost-red:hover { background: var(--bad-bg); }
.btn.link { border-color: transparent; background: none; color: var(--accent); padding-inline: 4px; }
button.small-button { padding: 4px 10px; font-size: 13px; min-height: 32px; }
.btn[disabled], button:disabled, a.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.inline input { width: auto; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; width: 100%; font-weight: 400;
  /* 16px, or an iPhone zooms in on every field it focuses */
  font-size: 16px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); }
input[readonly] { color: var(--muted); }
textarea { resize: vertical; }
.code-input { font-family: var(--f-mono); font-size: 1.3rem; letter-spacing: .2em; }
.form { display: grid; gap: 14px; max-width: 560px; }
.form.wide { max-width: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }

.error { color: var(--bad); font-weight: 600; }
.error:empty, .done:empty, .note:empty { display: none; }
.done { color: var(--ok); font-weight: 600; }
.note { color: var(--muted); font-size: 14px; }
.over { color: var(--bad); font-weight: 700; }
.warn { color: var(--warn); font-weight: 700; }
.mono, .code { font-family: var(--f-mono); font-size: 13px; word-break: break-all; }

/* ------------------------------------------------------------------ the home */

.attention { border: 2px solid var(--warn); background: var(--warn-bg); border-radius: var(--r); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; }
.attention h2 { color: var(--warn); font-size: 1.1rem; }
.att-item { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.att-item p { flex: 1; min-width: 200px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px;
  padding: 6px 14px; font-weight: 600; font-size: 14px; min-height: 36px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.shop { display: flex; flex-direction: column; gap: 14px; text-align: left; color: var(--ink); text-decoration: none; }
.shop:hover { border-color: var(--accent); }
.shop h3 { overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat b { display: block; font: 700 1.2rem var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 8px;
  border-radius: 8px; background: var(--sunk); color: var(--muted); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--line); }
.chip i.ok { background: var(--ok); } .chip i.warn { background: var(--warn); } .chip i.bad { background: var(--bad); }
.footnote { color: var(--muted); font-size: 13px; }
.footnote.late { color: var(--bad); font-weight: 700; }

/* ------------------------------------------------------------------ a shop */

.back { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 0; align-self: flex-start;
  text-decoration: none; }
.shop-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 12px; padding: 6px 14px 6px 6px; font-weight: 700; white-space: nowrap;
  text-decoration: none; }
.tab[aria-current="page"] { border-color: var(--k); box-shadow: 0 0 0 1px var(--k) inset; }
.conns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.conn { display: flex; flex-direction: column; gap: 14px; border-top: 6px solid var(--k); }
.conn .what { color: var(--muted); font-size: 14px; }
.facts { background: var(--sunk); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: grid; gap: 6px;
  margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt, .facts span.k { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.result { border-radius: 10px; padding: 12px 14px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.result .ico { width: 20px; height: 20px; margin-top: 1px; }
.result.ok { background: var(--ok-bg); color: var(--ok); }
.result.bad { background: var(--bad-bg); color: var(--bad); }
.result.wait { background: var(--sunk); color: var(--muted); }
.result small { display: block; font-weight: 500; color: var(--ink); margin-top: 4px; }
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.li:first-child { border-top: 0; padding-top: 0; }
.li .grow > p + p { color: var(--muted); font-size: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center;
  font-weight: 700; color: var(--c-people); flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-left: 1px solid var(--line); background: var(--surface); padding: 8px 14px;
  font-weight: 600; color: var(--muted); min-height: 40px; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--k, var(--c-features)); color: #fff; }
.danger-box { border: 2px solid var(--c-danger); border-radius: var(--r); padding: 20px; display: flex;
  flex-direction: column; gap: 12px; background: var(--surface); }
.danger-box h3 { color: var(--c-danger); }
details.more summary { cursor: pointer; font-weight: 700; color: var(--accent); }
details.more[open] summary { margin-bottom: 10px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 14px; }
.bars i { flex: 1; background: var(--c-overview); opacity: .85; border-radius: 2px 2px 0 0; min-height: 2px; }
.bars i.weekend { opacity: .35; }

/* ------------------------------------------------------------------ tables */

.tablewrap, .scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.number, td.num, th.num { text-align: right; }
td.nowrap { white-space: nowrap; }
td.detail { min-width: 220px; overflow-wrap: anywhere; }
td .small { display: block; color: var(--muted); font-size: 12px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--sunk); }

/* ------------------------------------------------------------------ reports */

.report { display: flex; flex-direction: column; gap: 12px; border-left: 6px solid var(--line); }
.report.open { border-left-color: var(--c-reports); }
.report .meta-line { color: var(--muted); font-size: 14px; }
.report .late { color: var(--bad); font-weight: 700; }
.report .copy { background: var(--sunk); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.report .copy.gone { color: var(--muted); font-style: italic; }
.report .actions { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.reported-photo { max-width: min(100%, 420px); border-radius: 10px; display: block; }
.reported-voice { width: min(100%, 420px); }
.reported-video { max-width: min(100%, 520px); border-radius: 10px; display: block; }

/* ------------------------------------------------------------------ guided setups (the sheet) */

.scrim { position: fixed; inset: 0; background: rgba(10, 15, 22, .55); display: grid; place-items: center; z-index: 50;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { background: var(--surface); border-radius: 16px; width: min(580px, 100%); max-height: 100%; overflow: auto;
  display: flex; flex-direction: column; }
.sheet-head { padding: 18px 20px; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--line);
  border-top: 6px solid var(--k); border-radius: 16px 16px 0 0; }
.sheet-head .kicker { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.steps { display: flex; gap: 6px; padding: 14px 20px 0; }
.steps i { flex: 1; height: 5px; border-radius: 4px; background: var(--sunk); }
.steps i.done { background: var(--k); }
.sheet-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot .error { flex-basis: 100%; text-align: right; }
.callout { border-radius: 10px; padding: 12px 14px; background: var(--sunk); font-size: 14px; display: grid; gap: 8px; }
.callout.keyname { border: 2px solid var(--k); background: none; }
.callout.keyname b.k { color: var(--k); }
.callout.warning { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.where { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; font-weight: 600; }
.where span { background: var(--sunk); padding: 4px 8px; border-radius: 6px; }
.where span.target { border: 2px solid var(--k); color: var(--k); background: none; font-family: var(--f-mono); }
.shown-once { font-family: var(--f-mono); font-size: 15px; word-break: break-all; background: var(--sunk);
  border-radius: 10px; padding: 14px; user-select: all; }
.shown-once.big { font-size: 1.4rem; text-align: center; letter-spacing: .12em; }
.shown-once.notes { white-space: pre-wrap; letter-spacing: 0; font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 60;
  max-width: calc(100% - 32px); }

/* ------------------------------------------------------------------ sign in */

.sign-in { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.sign-in-card { width: min(440px, 100%); display: grid; gap: 16px; }
.sign-in-card .brand { padding: 0; }

/* ------------------------------------------------------------------ usage (usage.js) */

.ctrl { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ctrl select { width: auto; max-width: 100%; }
.ctrl label { flex-direction: row; align-items: center; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kpi { text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: 4px; padding: 16px;
  border-top: 5px solid var(--k); cursor: pointer; }
.kpi[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--k) inset; }
.kpi .lab { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .lab .ico { width: 18px; height: 18px; color: var(--k); }
.kpi b { font: 700 1.6rem var(--f-display); font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.up { color: var(--ok); font-weight: 700; } .down { color: var(--bad); font-weight: 700; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.chart line { stroke: var(--line); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px;
  background: var(--k); }
.legend i.light { opacity: .35; }
.stackbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--sunk); }
.stackbar span { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 0;
  overflow: hidden; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 64px; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; }
.hbar .track { background: var(--sunk); border-radius: 6px; height: 12px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--k); border-radius: 6px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.spark { width: 90px; height: 26px; display: block; }
.spark path { fill: none; stroke: var(--c-overview); stroke-width: 1.6; }

/* ------------------------------------------------------------------ builds (builds.js) */

.month { font-size: 1.05rem; color: var(--muted); margin-top: 8px; }
.build { border-left: 5px solid var(--k); display: flex; flex-direction: column; gap: 6px; }
.build h3 { overflow-wrap: anywhere; }
.build .headline { font-weight: 600; }
.bullets { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.bullets li { overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ a phone */

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .main { padding-block: 18px calc(96px + env(safe-area-inset-bottom, 0px)); }
  h1 { font-size: 1.45rem; }
  .bottom:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface);
    border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .bottom a { flex: 1; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; font-weight: 600; padding: 8px 0 10px; position: relative; text-decoration: none; }
  .bottom a[aria-current="page"] { color: var(--accent); }
  .bottom .count { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10px; padding: 0 5px; }
  .shops, .conns, .two, .kpis { grid-template-columns: minmax(0, 1fr); }
  .meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pair { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 100px 1fr 56px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .sheet-foot { justify-content: stretch; }
  .sheet-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: rise .18s ease-out; }
  @keyframes rise { from { transform: translateY(12px); opacity: .6; } }
}
