/* Beacon in Soft Zen: the tokens and cards of the Panel (Panel/src/css/style.css) and the components of the design
   demo approved on the Pixel on 2026-10-28 (topbar, card, hero, tiles, timeline, list, notif, actions, btn, pill). */
:root {
  --bg-a: #101318;
  --bg-b: #171b23;
  --card: #1d222c;
  --card-2: #232936;
  --card-press: #2a3140;

  --text: #f2f4f8;
  --text-dim: #8b93a7;
  --text-mute: #5c6474;

  --amber: #fde68a;
  --amber-fg: #3f2d00;
  --blue: #93c5fd;
  --blue-fg: #0f2740;
  --green: #6ee7b7;
  --green-fg: #053b2a;
  --danger-bg: #3a2328;
  --danger-fg: #fca5a5;

  --ok-rgb: 110, 231, 183;
  --err-rgb: 252, 165, 165;
  --amber-rgb: 253, 230, 138;

  --radius: 22px;
  --radius-sm: 16px;
  --gap: 12px;
  --tabbar-h: 66px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body {
  overflow-x: hidden;
  background: linear-gradient(160deg, var(--bg-a), var(--bg-b));
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* A tap never leaves the browser's blue ring behind; the keyboard still shows where it is, in amber. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
::selection { background: rgba(var(--amber-rgb), 0.3); color: var(--text); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- App column (mobile first, room for the tab bar) ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: calc(18px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right))
    calc(24px + var(--tabbar-h) + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
body.no-nav #app { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------- Header ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 2px 4px 4px; }
.back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.back:active { background: var(--card-press); }
.eyebrow { font-size: 13px; color: var(--text-dim); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.15; overflow-wrap: anywhere; }
.status-line { margin-top: 3px; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill.ok { background: var(--green); color: var(--green-fg); }
.pill.warn { background: var(--amber); color: var(--amber-fg); }
.pill.bad { background: var(--danger-fg); color: #3a0d0d; }
.pill.dim { background: var(--card-2); color: var(--text-dim); }
/* An open episode: the pill breathes like the Panel's live chip. */
.pill.live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #7f1d1d;
  vertical-align: 1px;
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.35; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
}
.card h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}
.card p { font-size: 15px; line-height: 1.45; }
.card .note { font-size: 14px; color: var(--text-dim); line-height: 1.45; }
.card-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--amber); }

.hero { display: flex; justify-content: space-between; gap: 14px; padding: 18px; }
.hero-label { font-size: 13px; color: var(--text-dim); }
.hero-value {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.hero-secondary { font-size: 15px; color: var(--blue); margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-symbol {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #fcd34d, #f59e0b);
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.25);
}
.hero-symbol.calm {
  background: radial-gradient(circle at 35% 35%, #a7f3d0, #34d399);
  box-shadow: 0 0 26px rgba(52, 211, 153, 0.25);
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tile { background: var(--card); border-radius: var(--radius-sm); padding: 13px 16px; min-width: 0; }
.tile .label { font-size: 12px; color: var(--text-dim); }
.tile .value { font-size: 20px; font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .value.ok { color: var(--green); }
.tile .value.amber { color: var(--amber); }
.tile .value.dim { color: var(--text-mute); }

/* ---------- Timeline of an episode ---------- */
.timeline { list-style: none; }
.timeline li {
  display: grid;
  grid-template-columns: 78px 18px 1fr;
  column-gap: 8px;
  align-items: start;
  min-height: 44px;
}
.timeline .t {
  font-size: 13px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  text-align: right;
  white-space: nowrap;
}
.timeline .rail { position: relative; height: 100%; min-height: 44px; }
.timeline .rail::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-2);
}
.timeline li:first-child .rail::before { top: 10px; }
.timeline li:last-child .rail::before { bottom: auto; height: 10px; }
.timeline li:only-child .rail::before { display: none; }
.timeline .dot {
  position: absolute;
  left: 3px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-mute);
  border: 2px solid var(--card);
}
.timeline .dot.crit { background: var(--danger-fg); }
.timeline .dot.warn { background: var(--amber); }
.timeline .dot.ok { background: var(--green); }
.timeline .what { font-size: 15px; padding-bottom: 14px; min-width: 0; overflow-wrap: anywhere; }
.timeline .meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}
.timeline a.what:active { opacity: 0.7; }
.timeline.compact li { min-height: 34px; }
.timeline.compact .rail { min-height: 34px; }
.timeline.compact .what { font-size: 14px; padding-bottom: 10px; }
.timeline.compact .t { width: auto; }

/* ---------- Lists ---------- */
.list { list-style: none; }
.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--card-2);
  font-size: 15px;
}
.list li:first-child { border-top: 0; padding-top: 0; }
.list li:last-child { padding-bottom: 0; }
.list li > a { display: flex; justify-content: space-between; gap: 12px; flex: 1; min-width: 0; }
.list li > a:active { opacity: 0.7; }
.list .main { min-width: 0; overflow-wrap: anywhere; }
.list .dim { color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.list .main .dim { white-space: normal; }
.list .none { color: var(--text-mute); font-size: 14px; }
.list .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--text-mute);
  vertical-align: 1px;
}
.list .dot.critical { background: var(--danger-fg); }
.list .dot.normal { background: var(--amber); }

/* ---------- Event rows (the demo's inbox) ---------- */
.feed { display: flex; flex-direction: column; gap: 8px; }
.day {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 4px 0;
}
.day:first-child { padding-top: 2px; }
.notif {
  display: block;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: background 0.15s ease;
}
.notif:active { background: var(--card-press); }
.notif-top { display: flex; align-items: center; gap: 10px; }
.notif .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-mute); flex-shrink: 0; }
.notif.critical .dot { background: var(--danger-fg); box-shadow: 0 0 10px rgba(252, 165, 165, 0.5); }
.notif.normal .dot { background: var(--amber); }
.notif.silent .dot { background: var(--text-mute); }
.notif .title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif .time { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.notif .body {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.notif .meta { margin-top: 6px; font-size: 12px; color: var(--text-mute); }

/* A closed episode in the timeline: one card, its events folded inside. */
.fold {
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(var(--ok-rgb), 0.16);
}
.fold.incomplete { box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.2); }
.fold > summary { display: block; list-style: none; cursor: pointer; padding: 14px 16px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:active { background: var(--card-press); }
.fold .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.fold.incomplete .dot { background: var(--amber); }
.fold .title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fold .time { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fold .body {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 6px;
}
.fold .chev {
  width: 8px;
  height: 8px;
  margin: 5px 4px 0 0;
  flex-shrink: 0;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.fold[open] .chev { transform: rotate(45deg); }
.fold-body { display: flex; flex-direction: column; gap: 6px; padding: 0 8px 4px; }
.fold-body .notif { background: var(--card-2); padding: 11px 12px; }
.fold-body .notif:active { background: var(--card-press); }
.fold-link {
  display: block;
  text-align: center;
  padding: 10px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
}

/* The open episode on top of the timeline. */
.live-card { display: block; box-shadow: inset 0 0 0 1px rgba(var(--err-rgb), 0.35); }
.live-card:active { background: var(--card-press); }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.live-title { font-size: 19px; font-weight: 600; letter-spacing: -0.2px; margin-top: 4px; }
.live-sub {
  font-size: 14px;
  color: var(--blue);
  margin-top: 2px;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Filters ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search {
  flex: 1 1 170px;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-mute);
}
.search svg { width: 16px; height: 16px; flex-shrink: 0; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}
.search input::placeholder { color: var(--text-mute); }
.search:focus-within { box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.45); }
.search input:focus-visible { outline: none; }

/* Segmented range control: the active segment fills amber like an "on" tile (Panel .seg). */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.seg-btn.on { background: var(--amber); color: var(--amber-fg); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chips-label {
  align-self: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.chips-sep { width: 1px; margin: 6px 4px; flex-shrink: 0; background: var(--card-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--card);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mute); }
.chip .dot.critical { background: var(--danger-fg); }
.chip .dot.normal { background: var(--amber); }
.chip.on { background: var(--amber); color: var(--amber-fg); }
.chip.on .dot { background: var(--amber-fg); }

/* ---------- Event fields and details ---------- */
.fields { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; font-size: 14px; }
.fields dt, .fields dd { padding: 9px 0; border-top: 1px solid var(--card-2); }
.fields dt { color: var(--text-dim); }
.fields dd { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fields dt:first-of-type, .fields dd:first-of-type { border-top: 0; padding-top: 0; }
.fields dd a { color: var(--amber); font-weight: 600; }
.fields .code { font-family: var(--mono); font-size: 13px; }
.fields .instant { display: block; margin-top: 2px; font: 12px/1.4 var(--mono); color: var(--text-mute); }

.tree { font: 13px/1.6 var(--mono); }
.tree-row { display: flex; gap: 8px; padding-left: calc(var(--depth, 0) * 18px); }
.tree-key { color: var(--text-dim); flex-shrink: 0; }
.tree-key::after { content: ':'; }
.tree-val { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.tree-val.number { color: var(--blue); }
.tree-val.boolean { color: var(--amber); }
.tree-val.null, .tree-val.group { color: var(--text-mute); }

.decision { font-size: 15px; line-height: 1.5; }
.decision strong { font-weight: 600; }

/* ---------- Actions ---------- */
.actions { display: flex; gap: var(--gap); }
.btn {
  flex: 1;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  background: var(--amber);
  color: var(--amber-fg);
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--card-2); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.more { flex: none; width: 100%; }
.new-events { flex: none; align-self: center; padding: 10px 18px; border-radius: 999px; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- States ---------- */
.empty { padding: 28px 12px; text-align: center; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.problem {
  background: var(--danger-bg);
  color: var(--danger-fg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.45;
}
.loading {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 37%,
    rgba(255, 255, 255, 0.05) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skeleton { height: 76px; border-radius: var(--radius-sm); }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.foot { font-size: 12px; color: var(--text-mute); text-align: center; padding: 8px 0 0; line-height: 1.5; }
.mono { font: 12px/1.5 var(--mono); color: var(--text-dim); white-space: pre-wrap; }

/* ---------- Login ---------- */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 13px; color: var(--text-dim); }
.input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-2);
  background: var(--bg-a);
  font-size: 16px;
  color: var(--text);
}
.input:focus, .input:focus-visible { outline: none; border-color: rgba(var(--amber-rgb), 0.6); }
.form-error { font-size: 14px; color: var(--danger-fg); line-height: 1.4; }
.form .btn { margin-top: 4px; }

/* ---------- Settings and status ---------- */
.card .note + .fields, .card .fields + .note, .card .note + .list, .card .list + .note { margin-top: 12px; }
.card .notice { color: var(--amber); }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; color: var(--text-dim); }
.card .actions { margin-top: 14px; }
.btn.small { flex: none; align-self: center; padding: 7px 13px; border-radius: 999px; font-size: 13px; }
.result { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--text-dim); }
.result:empty { margin-top: 0; }
.list li > .main { flex: 1; }
.list .sub { display: block; margin-top: 2px; font-size: 13px; color: var(--text-dim); overflow-wrap: anywhere; }
.list .state { align-self: flex-start; font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.list .tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(var(--amber-rgb), 0.14);
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.list .dot.ok { background: var(--green); }
.list .dot.bad { background: var(--danger-fg); }
.list .code { font-family: var(--mono); font-size: 13px; }

/* ---------- Stats: SVG charts and tables (text in text colours, the data in amber) ---------- */
.chart-box { margin-top: 10px; }
.readout {
  min-height: 2.9em;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
svg.chart { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-mute); font-size: 11px; font-variant-numeric: tabular-nums; pointer-events: none; }
.chart .panel-title { fill: var(--text-dim); font-size: 12px; font-weight: 600; }
.chart .peak { fill: var(--text); font-weight: 600; }
.chart .year { fill: var(--text-dim); }
.chart .grid, .chart .baseline { stroke-width: 1; shape-rendering: crispEdges; }
.chart .grid { stroke: var(--card-2); }
.chart .baseline { stroke: #3a4252; }
.chart .col { fill: var(--amber); pointer-events: none; }
.chart .slot { fill: transparent; cursor: pointer; transition: fill 0.15s ease; }
.chart .slot.on { fill: rgba(255, 255, 255, 0.06); }
.chart .slot:focus { outline: none; }
.chart .slot:focus-visible { fill: rgba(var(--amber-rgb), 0.1); }
.uptime .name { fill: var(--text); font-size: 14px; }
.uptime .pct { fill: var(--text); font-size: 14px; font-weight: 600; }
.uptime .detail { fill: var(--text-dim); font-size: 12px; }
.uptime .track { fill: var(--card-2); }
.uptime .down { fill: var(--amber); }

.table-wrap { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.table th {
  padding: 0 5px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  text-align: right;
  white-space: nowrap;
}
.table td { padding: 8px 5px; border-top: 1px solid var(--card-2); text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 0; text-align: left; }
.table td.type { white-space: normal; overflow-wrap: anywhere; }
.table .level { display: block; margin-left: 16px; font-size: 12px; color: var(--text-mute); }
.table .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--text-mute);
  vertical-align: 1px;
}
.table .dot.critical { background: var(--danger-fg); }
.table .dot.normal { background: var(--amber); }
/* The busiest week of the busiest type in the strongest wash; the light text stays readable on it. */
.table td.heat { background: rgba(var(--amber-rgb), calc(var(--heat, 0) * 0.35)); }
.table td.zero { color: var(--text-mute); }
.table td.total { font-weight: 600; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 6px calc(8px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
    calc(8px + env(safe-area-inset-left));
  background: rgba(16, 19, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.tab {
  flex: 1 1 0;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  user-select: none;
  -webkit-user-select: none;
}
.tab-icon {
  width: 58px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab-icon svg { width: 22px; height: 22px; }
.tab:active .tab-icon { background: rgba(255, 255, 255, 0.06); }
/* The current tab: amber text on an amber wash, never the browser's blue outline. */
.tab.on { color: var(--amber); }
.tab.on .tab-icon { background: rgba(var(--amber-rgb), 0.14); }
.tab:focus-visible { outline: none; }
.tab:focus-visible .tab-icon { box-shadow: inset 0 0 0 2px rgba(var(--amber-rgb), 0.6); }

/* ---------- Wider screens ---------- */
@media (min-width: 900px) {
  #app { max-width: 640px; }
  .chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
