/* Tokens and map styling follow src/plan_template.html (the plan page already shown to the user).
   Fonts: no external font service is loaded; the stacks fall back to local condensed faces. */
:root {
  --bg: #e9ecf1; --surface: #ffffff; --sunk: #dde2ea; --fg: #141922; --muted: #5a6476; --line: #c6cdd8;
  --gold: #a87414; --gold-soft: #f6e6c2; --sel: #1f5fbf; --sel-soft: #dbe7fb; --on-sel: #ffffff;
  --warn: #b5530f; --warn-soft: #fbe3cf; --ok: #2f7d3f; --ok-soft: #dcefdc; --danger: #b3261e;
  --cosmic: #1aa3b8; --tech: #2f62d6; --mutant: #c99a06; --skill: #c8322b; --science: #2f9a45; --mystic: #8a3fc4;
  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f131a; --surface: #181e28; --sunk: #121720; --fg: #e8ecf3; --muted: #95a0b3; --line: #2a3342;
  --gold: #e3b04b; --gold-soft: #3a2f17; --sel: #6aa1ff; --sel-soft: #1a2c4a; --on-sel: #0b1220;
  --warn: #f0a050; --warn-soft: #3d2614; --ok: #6cc77c; --ok-soft: #173020; --danger: #ff8a80; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f131a; --surface: #181e28; --sunk: #121720; --fg: #e8ecf3; --muted: #95a0b3; --line: #2a3342;
  --gold: #e3b04b; --gold-soft: #3a2f17; --sel: #6aa1ff; --sel-soft: #1a2c4a; --on-sel: #0b1220;
  --warn: #f0a050; --warn-soft: #3d2614; --ok: #6cc77c; --ok-soft: #173020; --danger: #ff8a80; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px 96px; }
.wrap { max-width: 1240px; margin: 0 auto; display: grid; gap: 20px; }
.wrap.narrow { max-width: 720px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1; }
h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--sel); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.note { color: var(--muted); font-size: .9rem; max-width: 70ch; }
.small { font-size: .8rem; }
header.top { display: grid; gap: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 12px; }
.row-flex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* controls */
.btn { font: inherit; font-weight: 600; font-size: .95rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); padding: 10px 14px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn.primary { background: var(--sel); border-color: var(--sel); color: var(--on-sel); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: .82rem; }
.btn.big { width: 100%; min-height: 56px; font-size: 1.1rem; font-family: var(--display); letter-spacing: .04em; text-transform: uppercase; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .card:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 44px; width: 100%; }
label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.msg.error { background: var(--warn-soft); color: var(--fg); border-left: 4px solid var(--danger); }
.msg.ok { background: var(--ok-soft); border-left: 4px solid var(--ok); }
.msg.info { background: var(--sel-soft); border-left: 4px solid var(--sel); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: inherit; font-weight: 600; min-width: 40px; min-height: 40px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.progress { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--sel); transition: width .2s; }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); }
.sticky-bar .inner { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.sticky-bar .btn.primary { flex: 1; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; display: grid; }
.stat b { font-family: var(--display); font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .75rem; color: var(--muted); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { font: inherit; font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 6px 12px 8px; cursor: pointer; min-height: 44px; }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--sel); }
.tabs.sub .tab { font-size: .95rem; min-height: 38px; }

/* confirmation grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.card { position: relative; font: inherit; color: inherit; text-align: center; background: var(--surface); border: 2px solid var(--line); border-radius: 8px;
  padding: 6px; display: grid; gap: 4px; justify-items: center; cursor: pointer; }
.card .shot { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--sunk); }
.card .pt { position: absolute; top: 42%; right: 6px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); }
.card .shot.portrait-only { object-fit: contain; }
.card .nm { font-size: .74rem; font-weight: 600; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; overflow-wrap: anywhere; }
.card .st { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .badge { position: absolute; top: 2px; left: 2px; font-size: .62rem; font-weight: 700; padding: 2px 6px; border-radius: 999px; }
.card.uncertain { border-color: var(--warn); background: linear-gradient(var(--warn-soft), var(--surface) 55%); }
.card.uncertain .badge { background: var(--warn); color: #fff; }
.card.checked .badge { background: var(--ok); color: #fff; }
.card .tagline { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card .tagline.new { color: var(--ok); }
.card.add { border-style: dashed; color: var(--muted); align-content: center; min-height: 160px; font-weight: 600; }

/* dialog */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--fg); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog::backdrop { background: rgb(0 0 0 / .5); }
dialog .body { padding: 16px; display: grid; gap: 14px; overflow-y: auto; flex: 1 1 auto; min-height: 0; align-content: start; }
dialog .head { display: flex; gap: 12px; align-items: center; }
dialog .head img.shot { width: 84px; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; background: var(--sunk); }
dialog .head img.pt { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--cls, var(--line)); background: var(--sunk); }
.choices { display: grid; gap: 6px; }
.choice { font: inherit; color: inherit; display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-height: 48px; cursor: pointer; }
.choice img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); flex: none; }
.choice[aria-pressed="true"] { border-color: var(--sel); background: var(--sel-soft); }
.choice small { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.results { max-height: 240px; overflow-y: auto; }
.fields { display: grid; gap: 12px; }
.dlg-actions { flex: none; display: flex; gap: 8px; justify-content: space-between; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

/* roster list */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px; }
.rentry { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: .82rem; }
.rentry img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); flex: none; }
.rentry .t { display: grid; line-height: 1.2; min-width: 0; }
.rentry .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rentry .t span { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.rentry .x { margin-left: auto; }
details > summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* officer member table */
.mlist { display: grid; gap: 8px; }
.mrow { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.mrow .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mrow .top b { font-family: var(--display); font-size: 1.15rem; }
.mrow .top select { width: auto; min-width: 104px; }
.mrow .meta { font-size: .78rem; color: var(--muted); }
table.log { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.log th, table.log td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.log th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.tablewrap { overflow-x: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; background: var(--sunk); border-radius: 999px; padding: 3px 10px; }

/* enemy editor */
.enemy-sec { display: grid; gap: 6px; }
.erow { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 4.4rem 4.4rem; gap: 6px; align-items: center; }
.erow .n { font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.erow.filled .n { color: var(--fg); }
.erow.bad input { border-color: var(--danger); }
.erow select, .erow input { padding: 6px 6px; min-height: 40px; }

/* ---- map (from plan_template.html) ---- */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: minmax(0, 1fr); } }
.mapbox { overflow-x: auto; background: var(--sunk); border-radius: 8px; padding: 14px; }
.map { display: grid; gap: 14px; min-width: 760px; }
.band { display: grid; gap: 6px; }
.band-label { font-family: var(--display); font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.mrow-map { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.mrow-map.boss { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 640px; margin: 0 auto; width: 100%; }
.node { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 6px 7px;
  display: grid; justify-items: center; gap: 3px; cursor: pointer; text-align: center; font: inherit; color: inherit; transition: opacity .15s, border-color .15s; }
.node:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
.node .num { position: absolute; top: 3px; left: 5px; font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.node .star { position: absolute; top: 2px; right: 5px; color: var(--gold); font-size: .85rem; }
.node img { width: 52px; height: 52px; border-radius: 50%; background: var(--sunk); border: 2px solid var(--cls, var(--line)); }
.node .nm { font-size: .7rem; font-weight: 600; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; overflow-wrap: anywhere; }
.node .who { font-size: .66rem; color: var(--muted); }
.node.hl { background: linear-gradient(var(--gold-soft), var(--surface) 60%); }
.node.sel { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.node.empty { background: transparent; border-style: dashed; }
.node.empty .ph { width: 52px; height: 52px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.map.filtering .node:not(.mine) { opacity: .28; }
.boss-node .num { color: var(--gold); }
.node .vs { display: flex; align-items: center; gap: 2px; }
.node .vs img { width: 40px; height: 40px; }
.node .vs img.def, .node .vs .def { width: 30px; height: 30px; opacity: .9; }
.node .vs .def.unk { border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: .7rem; color: var(--muted); font-weight: 700; }
.node .vs b { font-size: .6rem; color: var(--muted); }
.node.weak { background: linear-gradient(var(--sunk), var(--surface) 60%); }
.node.risk { border-color: var(--warn); }
aside.detail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 10px; }
.detail .head { display: flex; gap: 12px; align-items: center; }
.detail img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--cls, var(--line)); background: var(--sunk); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .85rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.buffs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.buffs li { font-size: .75rem; background: var(--sunk); border-radius: 4px; padding: 3px 7px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--fg); }
.pill.plain { background: var(--sunk); }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 370px), 1fr)); gap: 10px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.member.on { border-color: var(--sel); background: var(--sel-soft); }
.member .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.member .top b { font-family: var(--display); font-size: 1.15rem; }
.member .tag, .pick .tag { font-size: .7rem; color: var(--muted); }
.member.risks { cursor: default; border-color: var(--warn); }
.picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pick { display: grid; justify-items: center; gap: 2px; font-size: .64rem; text-align: center; }
.pick img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); }
.pick .n { font-family: var(--display); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .75rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.mu { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.mu img { width: 64px; height: 64px; }
.mu .side { display: grid; justify-items: center; gap: 4px; font-size: .78rem; }
.mu .side b { font-family: var(--display); font-size: 1.05rem; line-height: 1.1; }
.mu .x { font-family: var(--display); font-weight: 700; color: var(--muted); }
.mu .unk { width: 64px; height: 64px; border-radius: 50%; border: 3px dashed var(--line); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.team { display: flex; gap: 10px; flex-wrap: wrap; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 9.5rem 1fr 2.4rem; gap: 8px; align-items: center; font-size: .78rem; }
.bar small { color: var(--muted); font-size: .68rem; display: block; }
.bar i { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.bar em { display: block; height: 100%; background: var(--sel); border-radius: 4px; }
.bar b { font-variant-numeric: tabular-nums; text-align: right; }
.why { margin: 0; padding-left: 1.1rem; font-size: .8rem; display: grid; gap: 3px; }
.why .node-why { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .node, .progress i { transition: none; } }

/* attack: phases and per-defender targets */
.member .route { font-size: .78rem; color: var(--muted); font-weight: 600; }
.phases { display: grid; gap: 12px; }
.phase { display: grid; gap: 6px; }
.lane { font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.lane .ll { font-size: .8rem; color: var(--muted); }
.lane .lm { font-family: var(--display); font-size: 1.05rem; text-align: right; }
.lane .lf { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.lane .lf > span { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; color: var(--muted); }
.lane .lf i { font-style: normal; font-family: var(--display); font-weight: 700; font-size: .85rem; color: var(--fg); }
.lane .lf img { width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); }
.lane .lf img.d { width: 22px; height: 22px; opacity: .9; }
.lane .lf .u { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--line); display: inline-grid; place-items: center; }
.targets { display: grid; gap: 8px; }
.tgt { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; }
.tgt-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tgt-h img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); }
.tgt-h .t { display: grid; line-height: 1.2; min-width: 0; }
.tgt-h .t span { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tgt-h .with { display: flex; align-items: center; gap: 4px; font-size: .74rem; }
.tgt-h .with img { width: 28px; height: 28px; }
.tgt-h .with small { color: var(--muted); }
.tgt .bar { grid-template-columns: 5rem 1fr 2.4rem; }
.tgt details summary { font-size: .78rem; color: var(--muted); min-height: 24px; }
@media (max-width: 420px) { .tgt-h { grid-template-columns: auto minmax(0, 1fr); } .tgt-h .with { grid-column: 1 / -1; } }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; resize: vertical; }

/* progress & dashboard */
.trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
figure.trend { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
figure.trend figcaption { font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; }
figure.trend figcaption b { color: var(--fg); font-variant-numeric: tabular-nums; }
figure.trend svg { width: 100%; height: auto; display: block; overflow: visible; }
figure.trend .grid { stroke: var(--line); stroke-width: 1; }
figure.trend .ax { fill: var(--muted); font-size: 10px; font-family: var(--body); }
figure.trend .ln { fill: none; stroke: var(--sel); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
figure.trend .pt circle { fill: var(--sel); stroke: var(--surface); stroke-width: 2; }
figure.trend .pt circle.hit { fill: transparent; stroke: none; }
figure.trend .pt:hover circle:not(.hit) { r: 6; }
.cbars { display: grid; gap: 5px; }
.cbar { display: grid; grid-template-columns: 5.2rem 1fr 2.6rem; gap: 8px; align-items: center; font-size: .8rem; }
.cbar i { height: 10px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.cbar em { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.cbar b { text-align: right; font-variant-numeric: tabular-nums; }
ol.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
ol.timeline > li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
ol.timeline .when { font-family: var(--display); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
ol.timeline .tag { display: block; font-size: .72rem; color: var(--muted); }
ol.timeline details summary { font-size: .78rem; color: var(--sel); min-height: 26px; }
ol.timeline ul { margin: 2px 0 0; padding-left: 1.1rem; display: grid; gap: 2px; font-size: .8rem; }
ol.timeline .ev-removed { color: var(--muted); text-decoration: line-through; }
.stale-row { border-left: 4px solid var(--warn); }
.cov { display: grid; gap: 8px; }
.covrow { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; }
.covrow .h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.covrow .h img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cls, var(--line)); background: var(--sunk); }
.covrow .h .t { display: grid; line-height: 1.2; min-width: 0; }
.covrow .h .t span { font-size: .74rem; color: var(--muted); }
.covrow .h .n { font-family: var(--display); font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.covrow .bar { grid-template-columns: 6rem 1fr 2.6rem; }
.covrow .best { font-size: .76rem; color: var(--muted); }
.covrow.weak { border-color: var(--warn); }
tr.stale-row { border-left: 0; }
tr.stale-row td { background: var(--warn-soft); }

/* PWA */
.offline { position: sticky; top: 0; z-index: 10; margin: -18px -16px 12px; padding: 8px 16px; background: var(--warn-soft);
  border-bottom: 2px solid var(--warn); font-size: .85rem; font-weight: 600; text-align: center; }
.install { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.recog-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; }
.recog-mode select { width: auto; min-height: 36px; padding: 4px 8px; }
#dl { display: grid; gap: 4px; }
