:root {
  color-scheme: dark;
  --bg: #111217;
  --canvas: #111217;
  --panel: #181b1f;
  --panel-2: #22252b;
  --side: #0b0c0e;
  --topbar: rgba(17, 18, 23, 0.92);
  --table-head: #14161a;
  --tip: #0b0c0e;
  --line: rgba(204, 204, 220, 0.12);
  --line-strong: rgba(204, 204, 220, 0.22);
  --grid-line: rgba(204, 204, 220, 0.16);
  --ink: #d8d9da;
  --strong: #f5f6f8;
  --muted: #9a9aaa;
  --nav: #c7c9d1;
  --nav-muted: #6e6e80;
  --nav-hover: rgba(204, 204, 220, 0.08);
  --accent: #6e9fff;
  --accent-dim: rgba(110, 159, 255, 0.16);
  --on-accent: #fff;
  --mark-from: #6e9fff;
  --mark-to: #3d71d9;
  --spark: #6e9fff;
  --hair: rgba(245, 246, 248, 0.55);
  --dot: #fff;
  --warn: #ffb357;
  --warn-bg: rgba(255, 152, 48, 0.12);
  --banner-line: rgba(255, 152, 48, 0.45);
  --bad: #ff7383;
  --bad-bg: rgba(224, 47, 68, 0.14);
  --bad-line: #e02f44;
  --stop: #b8c4d4;
  --stop-bg: rgba(184, 196, 212, 0.1);
  --unknown: #c9a0dc;
  --unknown-bg: rgba(184, 119, 217, 0.12);
  --ok: #73bf69;
  --sidebar: 232px;
  --top: 64px;
}

:root[data-theme="navy"] {
  color-scheme: dark;
  --bg: #0e1626;
  --canvas: #0e1626;
  --panel: #152238;
  --panel-2: #1c2c48;
  --side: #09101c;
  --topbar: rgba(14, 22, 38, 0.92);
  --table-head: #101a2c;
  --tip: #09101c;
  --line: rgba(168, 196, 232, 0.14);
  --line-strong: rgba(168, 196, 232, 0.28);
  --grid-line: rgba(168, 196, 232, 0.18);
  --ink: #d5e3f5;
  --strong: #f4f8fc;
  --muted: #8ea6c6;
  --nav: #d0dced;
  --nav-muted: #7d94b3;
  --nav-hover: rgba(168, 196, 232, 0.1);
  --accent: #8ebfff;
  --accent-dim: rgba(142, 191, 255, 0.18);
  --on-accent: #fff;
  --mark-from: #8ebfff;
  --mark-to: #3d6ec4;
  --spark: #8ebfff;
  --hair: rgba(244, 248, 252, 0.55);
}

:root[data-theme="pine"] {
  color-scheme: dark;
  --bg: #101614;
  --canvas: #101614;
  --panel: #18211d;
  --panel-2: #22302a;
  --side: #0b100e;
  --topbar: rgba(16, 22, 20, 0.92);
  --table-head: #121c18;
  --tip: #0b100e;
  --line: rgba(186, 214, 200, 0.14);
  --line-strong: rgba(186, 214, 200, 0.26);
  --grid-line: rgba(186, 214, 200, 0.18);
  --ink: #d7e4dc;
  --strong: #f3f7f4;
  --muted: #93a89d;
  --nav: #d2e0d8;
  --nav-muted: #7d9488;
  --nav-hover: rgba(186, 214, 200, 0.1);
  --accent: #4ecdc4;
  --accent-dim: rgba(78, 205, 196, 0.16);
  --on-accent: #fff;
  --mark-from: #6ee0d4;
  --mark-to: #1f8f86;
  --spark: #4ecdc4;
  --hair: rgba(243, 247, 244, 0.55);
}

:root[data-theme="dusk"] {
  color-scheme: dark;
  --bg: #17130f;
  --canvas: #17130f;
  --panel: #241c16;
  --panel-2: #31271f;
  --side: #100e0b;
  --topbar: rgba(23, 19, 15, 0.92);
  --table-head: #1c1612;
  --tip: #100e0b;
  --line: rgba(230, 208, 176, 0.14);
  --line-strong: rgba(230, 208, 176, 0.26);
  --grid-line: rgba(230, 208, 176, 0.18);
  --ink: #e8dfd4;
  --strong: #f8f4ee;
  --muted: #b3a898;
  --nav: #e4d9cc;
  --nav-muted: #9a8d7c;
  --nav-hover: rgba(230, 208, 176, 0.1);
  --accent: #8eb6ff;
  --accent-dim: rgba(142, 182, 255, 0.18);
  --on-accent: #fff;
  --mark-from: #f0b27a;
  --mark-to: #c46a3a;
  --spark: #f0b27a;
  --hair: rgba(248, 244, 238, 0.55);
}

:root[data-theme="paper"],
:root[data-theme="hanji"],
:root[data-theme="sage"],
:root[data-theme="sky"] {
  color-scheme: light;
  --dot: #fff;
  --warn: #8a4e00;
  --warn-bg: rgba(214, 122, 0, 0.12);
  --banner-line: rgba(138, 78, 0, 0.4);
  --bad: #c42336;
  --bad-bg: rgba(196, 35, 54, 0.1);
  --bad-line: #c42336;
  --stop: #4d5968;
  --stop-bg: rgba(77, 89, 104, 0.08);
  --unknown: #7a4e96;
  --unknown-bg: rgba(122, 78, 150, 0.1);
  --ok: #1c7a34;
}

:root[data-theme="paper"] {
  --bg: #f3f5f7;
  --canvas: #f3f5f7;
  --panel: #ffffff;
  --panel-2: #e8edf2;
  --side: #ffffff;
  --topbar: rgba(255, 255, 255, 0.94);
  --table-head: #eef2f6;
  --tip: #ffffff;
  --line: rgba(28, 36, 46, 0.12);
  --line-strong: rgba(28, 36, 46, 0.22);
  --grid-line: rgba(28, 36, 46, 0.14);
  --ink: #24303c;
  --strong: #12181f;
  --muted: #5c6b7a;
  --nav: #24303c;
  --nav-muted: #6b7886;
  --nav-hover: rgba(28, 36, 46, 0.06);
  --accent: #1d6fdb;
  --accent-dim: rgba(29, 111, 219, 0.12);
  --on-accent: #154e9b;
  --mark-from: #6ea8ff;
  --mark-to: #1d6fdb;
  --spark: #1d6fdb;
  --hair: rgba(18, 24, 31, 0.45);
}

:root[data-theme="hanji"] {
  --bg: #f6f1e6;
  --canvas: #f6f1e6;
  --panel: #fffdf8;
  --panel-2: #efe4d0;
  --side: #fffdf8;
  --topbar: rgba(255, 253, 248, 0.94);
  --table-head: #f4ecde;
  --tip: #fffdf8;
  --line: rgba(68, 46, 24, 0.12);
  --line-strong: rgba(68, 46, 24, 0.22);
  --grid-line: rgba(68, 46, 24, 0.14);
  --ink: #3c2e22;
  --strong: #1c140e;
  --muted: #6f5c48;
  --nav: #3c2e22;
  --nav-muted: #7a6854;
  --nav-hover: rgba(68, 46, 24, 0.06);
  --accent: #2f4f86;
  --accent-dim: rgba(47, 79, 134, 0.12);
  --on-accent: #243c66;
  --mark-from: #e2b56a;
  --mark-to: #a45b28;
  --spark: #2f4f86;
  --hair: rgba(28, 20, 14, 0.4);
}

:root[data-theme="sage"] {
  --bg: #eef4ee;
  --canvas: #eef4ee;
  --panel: #fbfefb;
  --panel-2: #e0ebe0;
  --side: #fbfefb;
  --topbar: rgba(251, 254, 251, 0.94);
  --table-head: #e7f1e7;
  --tip: #fbfefb;
  --line: rgba(24, 48, 36, 0.12);
  --line-strong: rgba(24, 48, 36, 0.22);
  --grid-line: rgba(24, 48, 36, 0.14);
  --ink: #243028;
  --strong: #121a14;
  --muted: #5a6e62;
  --nav: #243028;
  --nav-muted: #66786e;
  --nav-hover: rgba(24, 48, 36, 0.06);
  --accent: #0f6e68;
  --accent-dim: rgba(15, 110, 104, 0.12);
  --on-accent: #0b524e;
  --mark-from: #7dcec4;
  --mark-to: #0f6e68;
  --spark: #0f6e68;
  --hair: rgba(18, 26, 20, 0.4);
}

:root[data-theme="sky"] {
  --bg: #e7f0f8;
  --canvas: #e7f0f8;
  --panel: #f7fbfe;
  --panel-2: #d7e6f3;
  --side: #f7fbfe;
  --topbar: rgba(247, 251, 254, 0.94);
  --table-head: #e4eef7;
  --tip: #f7fbfe;
  --line: rgba(20, 42, 68, 0.12);
  --line-strong: rgba(20, 42, 68, 0.22);
  --grid-line: rgba(20, 42, 68, 0.14);
  --ink: #1c2c3e;
  --strong: #101820;
  --muted: #516578;
  --nav: #1c2c3e;
  --nav-muted: #5d7184;
  --nav-hover: rgba(20, 42, 68, 0.06);
  --accent: #1558b0;
  --accent-dim: rgba(21, 88, 176, 0.12);
  --on-accent: #103f80;
  --mark-from: #7eb6ef;
  --mark-to: #1558b0;
  --spark: #1558b0;
  --hair: rgba(16, 24, 32, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

button, select, input, a { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.body {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.side {
  position: sticky;
  top: var(--top);
  height: calc(100vh - var(--top));
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
}

.top-brand, .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-brand b, .brand b { display: block; color: var(--strong); font-size: 15px; letter-spacing: -0.02em; }
.top-brand > div span, .brand > div span { color: var(--muted); font-size: 12px; }
.mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  flex: 0 0 auto;
}
.side-install { padding: 0 8px 14px; }
.side-install .install { width: 100%; justify-content: center; }
.user { position: relative; }
.user-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
}
.user-button svg { width: 18px; height: 18px; }
.user-button[aria-expanded="true"] { background: var(--accent-dim); color: var(--accent); }
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 6;
  width: 260px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.user-name { margin: 0; color: var(--strong); font-weight: 650; }
.user-menu label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.user-menu .install { justify-content: center; }
.user-menu a { color: var(--ink); text-decoration: none; }
.user-menu a:hover { color: var(--accent); }

.nav-label {
  margin: 14px 8px 6px;
  color: var(--nav-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--nav);
  text-align: left;
  border-radius: 6px;
  padding: 9px 10px;
}
.nav-item svg, .tab svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item > span { flex: 1; }
.nav-item:hover { background: var(--nav-hover); }
.nav-item[aria-current="page"] {
  background: var(--accent-dim);
  color: var(--on-accent);
  box-shadow: inset 2px 0 0 var(--accent);
}
.badge {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e02f44;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.crumbs { display: flex; gap: 8px; align-items: center; min-width: 0; color: var(--muted); }
.crumbs b { color: var(--strong); font-weight: 600; }
.crumbs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}
.crumbs button:hover { color: var(--accent); }
.env {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--strong);
}
.tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 9px;
}
.seg button[aria-pressed="true"] { background: var(--accent-dim); color: var(--on-accent); }
select, .search {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 6px;
  padding: 5px 8px;
}
.install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: #2450b8;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 650;
}
.install img { width: 16px; height: 16px; border-radius: 4px; display: block; }
.install:hover { color: #fff; filter: brightness(1.08); }
.who { color: var(--muted); white-space: nowrap; }
.who a { color: var(--ink); text-decoration: none; margin-left: 10px; }
.who a:hover { color: var(--accent); }

.content { padding: 18px 20px 48px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -0.03em; color: var(--strong); font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.banner {
  border: 1px solid var(--banner-line);
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.banner strong { display: block; color: var(--strong); }
.banner.bad { border-color: rgba(224, 47, 68, 0.5); background: var(--bad-bg); color: var(--bad); }
.banner.info { border-color: var(--line); background: var(--panel); color: var(--ink); }

.grid-stats, .grid-2, .grid-dash, .charts { display: grid; gap: 12px; }
.grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2, .charts { grid-template-columns: 1fr 1fr; }
.host-boards .grid-stats { grid-template-columns: 1fr 1fr; }
.meters { display: grid; gap: 8px; }
.meter {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.meter-name { color: var(--muted); font-size: 12px; }
.meter-num {
  min-width: 8.5em;
  color: var(--strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.meter-track {
  height: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel-2);
}
.meter-fill { display: block; height: 100%; background: var(--ok); }
.meter-fill.is-warn { background: var(--warn); }
.meter-fill.is-bad { background: var(--bad-line); }
.cpu-cores { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.meter-core { grid-template-columns: 1.6em minmax(0, 1fr) 3.4em; }
.meter-core .meter-track { height: 10px; }
.meter-core .meter-num { min-width: 0; font-size: 12px; }
.meter-status { margin: 0; }
.meter-status b { color: var(--strong); font-weight: 600; }
.charts .chart:last-child:nth-child(odd) { grid-column: 1 / -1; }
.log-list { max-height: 280px; overflow: auto; display: grid; gap: 4px; font-family: ui-monospace, monospace; font-size: 12px; }
.log-line { display: grid; grid-template-columns: 36px 1fr; gap: 8px; white-space: pre-wrap; word-break: break-word; }
.log-stream { color: var(--muted); }
.log-line.is-err .log-stream { color: var(--bad, #f0a0a0); }
.grid-dash { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.panel-body { padding: 12px; }
.stat-value {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--strong);
  font-variant-numeric: tabular-nums;
}
.stat.is-warn { box-shadow: inset 3px 0 0 var(--warn); }
.stat.is-bad { box-shadow: inset 3px 0 0 var(--bad-line); }
.word { margin-top: 6px; font-size: 12px; }
.quiet { color: var(--muted); font-size: 12px; }

.row-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 8px;
}
.row-title h2 { margin: 0; font-size: 15px; color: var(--strong); font-weight: 600; }

.cards-4, .cards-2 { display: grid; gap: 10px; }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: 1fr 1fr; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  color: var(--ink);
}
.card:hover { border-color: var(--line-strong); }
.card header, .card .body { padding: 10px 12px; }
.card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.card header b { color: var(--strong); font-weight: 600; }
.status { white-space: nowrap; font-size: 12px; }
.card .row { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card.is-warn { box-shadow: inset 3px 0 0 var(--warn); background: var(--warn-bg); }
.card.is-bad { box-shadow: inset 3px 0 0 var(--bad-line); background: var(--bad-bg); }
.card.is-stop { box-shadow: inset 3px 0 0 var(--stop); background: var(--stop-bg); }
.card.is-unknown { box-shadow: inset 3px 0 0 var(--unknown); background: var(--unknown-bg); }

table.grid { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
table.grid th, table.grid td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.grid th { color: var(--muted); font-weight: 550; font-size: 12px; background: var(--table-head); }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td:nth-child(2), table.grid td:nth-child(3), table.grid td:nth-child(4) { white-space: nowrap; }
button.link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--accent-dim); color: var(--on-accent); border-color: transparent; }

.explore { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; }
.instance-list { max-height: calc(100vh - 160px); overflow: auto; }
.instance-list button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  color: var(--ink);
}
.instance-list button[aria-current="true"] { background: var(--accent-dim); color: var(--on-accent); }

.chart { margin: 0; }
.chart figcaption { color: var(--muted); }
.plot {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: 168px auto;
  column-gap: 8px;
  row-gap: 6px;
}
.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.plot-area {
  position: relative;
  min-width: 0;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  cursor: crosshair;
  touch-action: none;
}
.spark { width: 100%; height: 100%; display: block; color: var(--spark); }
.spark .grid-line { stroke: var(--grid-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark .area { fill: currentColor; opacity: 0.16; }
.spark .line { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.x-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.hair, .dot, .tip { position: absolute; pointer-events: none; }
.hair { top: 0; bottom: 0; width: 1px; background: var(--hair); }
.dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 2px var(--spark);
}
.tip {
  min-width: 132px;
  background: var(--tip);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 12px;
}
.tip b { display: block; color: var(--strong); font-weight: 600; }
.missing { color: var(--unknown); margin: 28px 0; }

.dash-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  color: var(--ink);
}
.dash-card:hover { border-color: var(--accent); }
.dash-card b { display: block; color: var(--strong); font-size: 16px; margin-bottom: 6px; }
.dash-card span { color: var(--muted); }

.data-tabs, .range { margin: 0 0 12px; width: max-content; }
.more-controls { display: grid; gap: 14px; max-width: 360px; }
.more-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.tabbar { display: none; }

@media (max-width: 1100px) {
  .grid-stats, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-dash { grid-template-columns: 1fr 1fr; }
  .split, .explore, .charts, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .app { overflow-x: clip; }
  .body { display: block; }
  .side { display: none; }
  .main { min-height: 100vh; }
  .content { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background: var(--side);
    border-top: 1px solid var(--line);
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--nav-muted);
    font-size: 11px;
    line-height: 1.2;
    padding: 4px 0 2px;
  }
  .tab[aria-current="page"] { color: var(--accent); }
  .tab .badge {
    position: absolute;
    top: 0;
    left: calc(50% + 6px);
    min-width: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
  }
  .tool-theme, .tool-install, .who { display: none; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .crumbs { font-size: 13px; }
  .grid-stats, .cards-4, .cards-2, .grid-dash { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head > div, .explore, .explore > *, .charts, .chart, .plot, .plot-area, .x-axis { min-width: 0; max-width: 100%; }
  .data-tabs, .range { width: 100%; max-width: 100%; }
  .range button { flex: 1 1 0; min-width: 0; padding: 8px 4px; }
  .instance-pick { display: grid; gap: 4px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
  .instance-pick select { width: 100%; max-width: 100%; }
  .x-axis span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; }
  table.grid td:nth-child(2),
  table.grid td:nth-child(3),
  table.grid td:nth-child(4) { white-space: normal; overflow-wrap: anywhere; }
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  table.grid td { border: 0; padding: 2px 0; }
  table.grid td:first-child { color: var(--strong); font-weight: 600; }
}
