:root {
  --bg: #f5f2ed;
  --panel: #ffffff;
  --panel-2: #faf8f4;
  --ink: #1d1a21;
  --ink-2: #47424f;
  --muted: #6c6577;
  --line: #e5dfd5;
  --line-2: #efe9e0;
  --accent: #722f4a;
  --accent-soft: #722f4a14;
  --accent-ink: #ffffff;
  --gold: #c8901a;
  --good: #23784a;
  --good-soft: #23784a17;
  --bad: #b03434;
  --bad-soft: #b0343414;
  --warn: #8a5f00;
  --warn-soft: #9a6a0017;
  --neg: #5f5868;
  --focus: #c8901a88;
  --shadow: 0 1px 2px #1d1a210d, 0 4px 16px #1d1a2108;
  --radius: 14px;
  --top-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131117; --panel: #1b1920; --panel-2: #221f28; --ink: #eeeaf3; --ink-2: #cbc5d5; --muted: #aaa3b6;
    --line: #2e2a35; --line-2: #26232c; --accent: #c46a8d; --accent-soft: #c46a8d1f; --accent-ink: #160f13;
    --gold: #e8b54a; --good: #5fc485; --good-soft: #5fc4851c; --bad: #f07272; --bad-soft: #f072721a;
    --warn: #e2b24c; --warn-soft: #e2b24c1a; --neg: #a59fb0; --focus: #e8b54a88;
    --shadow: 0 1px 2px #0005, 0 6px 20px #0003; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131117; --panel: #1b1920; --panel-2: #221f28; --ink: #eeeaf3; --ink-2: #cbc5d5; --muted: #aaa3b6;
  --line: #2e2a35; --line-2: #26232c; --accent: #c46a8d; --accent-soft: #c46a8d1f; --accent-ink: #160f13;
  --gold: #e8b54a; --good: #5fc485; --good-soft: #5fc4851c; --bad: #f07272; --bad-soft: #f072721a;
  --warn: #e2b24c; --warn-soft: #e2b24c1a; --neg: #a59fb0; --focus: #e8b54a88;
  --shadow: 0 1px 2px #0005, 0 6px 20px #0003; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h2 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -.015em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.neg { color: var(--neg); }
kbd { font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 750; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.tabs { display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 560; white-space: nowrap; transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
.tabs button svg { display: none; }
.tabs button kbd { opacity: 0; transition: opacity .15s; }
.tabs:hover button kbd { opacity: 1; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.reset { font-size: 12px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.reset b { color: var(--ink); }
.reset .short { display: none; }
.icon-btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px; display: inline-grid; place-items: center; padding: 0; flex: none; }
.icon-btn:hover { border-color: var(--muted); }
.theme-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); padding: 4px; min-width: 170px; z-index: 40; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--panel-2); }
.menu button[aria-checked="true"] { color: var(--accent); font-weight: 650; }

main { max-width: 1320px; margin: 0 auto; padding: 16px 16px 40px; }
.panel { display: none; }
.panel.active { display: block; animation: fade .18s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h .actions { display: flex; gap: 6px; }
.hint { font-size: 12px; color: var(--muted); }
.stack { display: flex; flex-direction: column; min-width: 0; }
.layout-char { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 14px; align-items: start; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 960px) { .layout-char, .layout-2 { grid-template-columns: minmax(0, 1fr); } }
.foot { font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.site-foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 26px; }
.state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--ink-2); }
.state[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 9px; padding: 6px 12px; cursor: pointer; font-weight: 560; font-size: 13px; }
.btn:hover { border-color: var(--muted); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.charbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; align-items: center; }
.charbar[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12px; color: var(--ink-2); }
.chip b { color: var(--ink); font-weight: 650; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--muted); }
button.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.link { color: var(--accent); }

.section-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 12px; align-items: end; }
.form .field.wide { align-self: start; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 560; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field .note-s { font-weight: 400; color: var(--muted); }
.field .warn-s { font-weight: 500; color: var(--warn); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; user-select: none; }
input, select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; min-width: 0; width: 100%; transition: border-color .15s; }
input:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
select { cursor: pointer; padding-right: 30px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.stepper { display: flex; gap: 4px; }
.stepper input { text-align: center; }
.stepper button { flex: none; width: 34px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; cursor: pointer; font-size: 16px; color: var(--ink-2); }
.stepper button:hover { border-color: var(--muted); color: var(--ink); }

.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--ink-2); font-size: 13px; padding: 6px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
.seg button:hover:not(:disabled) { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font-weight: 650; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }

.buffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 10px; }
.buff { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); transition: border-color .15s, background .15s; }
.buff > span:first-child { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buff .lv { display: inline-flex; gap: 3px; flex: none; }
.buff .lv button { min-width: 28px; height: 26px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s; }
.buff .lv button:hover { border-color: var(--accent); color: var(--accent); }
.buff .lv button:active { transform: scale(.94); }
.buff .lv button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.buff.active { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--accent-soft); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; }
.tile .v { font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.tile .s { font-size: 12px; color: var(--muted); }
.flash { animation: flash .7s var(--ease); }
@keyframes flash { 0% { background: color-mix(in srgb, var(--gold) 28%, transparent); } 100% { background: transparent; } }

table.kv { width: 100%; border-collapse: collapse; }
table.kv td { padding: 7px 2px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.kv tr:last-child td { border-bottom: 0; }
table.kv td:first-child { color: var(--ink-2); width: 40%; }
table.kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.kv .sub { display: block; }

.tablewrap { overflow-x: auto; border-radius: var(--radius); }
.tablewrap.fits { overflow: visible; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
table.grid th { position: sticky; top: var(--top-h); z-index: 2; background: var(--panel-2); text-align: left; font-weight: 650; font-size: 12px; color: var(--ink-2); padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid thead tr th:first-child { border-top-left-radius: var(--radius); }
table.grid thead tr th:last-child { border-top-right-radius: var(--radius); }
table.grid th > span, table.grid th > button { display: flex; width: 100%; padding: 10px; gap: 4px; align-items: center; }
table.grid th.num > span, table.grid th.num > button { justify-content: flex-end; text-align: right; }
table.grid th > button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
table.grid th > button:hover { color: var(--ink); }
table.grid th[aria-sort] > button { color: var(--accent); }
table.grid th[aria-sort="descending"] > button::after { content: "↓"; }
table.grid th[aria-sort="ascending"] > button::after { content: "↑"; }
table.grid th.num, table.grid td.num { text-align: right; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr.click { cursor: pointer; transition: background .12s; }
table.grid tbody tr.click:hover td, table.grid tbody tr.click:focus-visible td { background: var(--accent-soft); }
table.grid tbody tr.click:focus-visible { outline: none; }
table.grid tbody tr.click:focus-visible td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td.strong { font-weight: 700; }
td.sorted-col { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.name { font-weight: 600; }
.sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 280px; }
.bar { height: 3px; margin: 4px 0 0 auto; background: var(--accent); opacity: .6; border-radius: 2px; }
.bar.good { background: var(--good); }

.tag { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); margin: 3px 3px 0 0; white-space: nowrap; font-weight: 550; }
.tag.aggr { background: var(--bad-soft); color: var(--bad); }
.tag.weak { background: var(--good-soft); color: var(--good); }
.tag.res { background: var(--warn-soft); color: var(--warn); }
.tag.rep { background: var(--accent-soft); color: var(--accent); }
.tag.legacy { background: var(--good-soft); color: var(--good); }

.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filters .field { width: auto; }
.filters .field input[type=number] { width: 84px; }
.filters .field input:not([type]) { width: 210px; }
.filters .field select { width: 160px; }
.filters .spacer { flex: 1; }
.filters .chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-only { display: none !important; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.summary .tile { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 14px; }
.verdict { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.verdict .t { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.verdict .d { color: var(--ink-2); margin-top: 2px; }
.verdict.ok { border-left-color: var(--good); }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.callout b { color: var(--ink); }

.group-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 12px 0 2px; }
.qline { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.qline:last-child { border-bottom: 0; }
.qline .q { flex: 1; min-width: 0; cursor: pointer; border: 0; background: transparent; text-align: left; padding: 0; }
.qline .q:hover .name { color: var(--accent); }
.qline.done .name { color: var(--muted); text-decoration: line-through; }
.runs { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px 4px 8px; cursor: pointer; font-size: 12px; font-weight: 650; min-width: 74px; transition: border-color .15s, background .15s, transform .1s; user-select: none; -webkit-user-select: none; }
.runs:hover { border-color: var(--accent); }
.runs:active { transform: scale(.96); }
.runs .dots { display: inline-flex; gap: 3px; }
.runs .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .15s; }
.runs .dots i.on { background: var(--accent); }
.runs.full { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--accent); }
.progress-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 12px; color: var(--ink-2); }
.progress { flex: 1; height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s var(--ease); min-width: 0; }
.step { padding: 8px 0 10px; border-bottom: 1px solid var(--line-2); }
.step:last-child { border-bottom: 0; }
.step-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.step-h .lv { font-size: 11px; font-weight: 750; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; }
.step-h .where { font-weight: 650; }
.step .tip { font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.rq { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.rq label { flex: 1; display: flex; gap: 9px; align-items: center; padding: 4px 0; font-size: 13px; cursor: pointer; min-width: 0; }
.rq.done label .qn { color: var(--muted); text-decoration: line-through; }
.info-btn { flex: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); border-radius: 7px; width: 28px; height: 26px; cursor: pointer; font-size: 14px; line-height: 1; }
.info-btn:hover { border-color: var(--accent); color: var(--accent); }

.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); z-index: 15; max-height: 320px; overflow-y: auto; padding: 4px; }
.combo-list[hidden] { display: none; }
.opt { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.opt[aria-selected="true"], .opt:hover { background: var(--accent-soft); }
.opt .sub { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.opt mark { background: none; color: var(--accent); font-weight: 700; }
.example { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }

.empty { color: var(--muted); padding: 22px; text-align: center; }

.mcards { display: none; }
.mcard { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 12px 14px; cursor: pointer; }
.mcard:last-child { border-bottom: 0; }
.mcard:active { background: var(--accent-soft); }
.mcard .row1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mcard .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.mcard .kpi .v { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.mcard .kpi .l { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }

.drawer { position: fixed; inset: 0; background: #0007; z-index: 50; display: flex; justify-content: flex-end; animation: fadebg .18s; }
@keyframes fadebg { from { background: #0000; } }
.drawer[hidden] { display: none; }
.drawer-inner { width: min(660px, 100%); height: 100%; overflow-y: auto; background: var(--panel); padding: 20px 22px 48px; position: relative; box-shadow: -8px 0 30px #0003; animation: slide .22s var(--ease); }
@keyframes slide { from { transform: translateX(28px); opacity: .5; } }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.drawer h3 { margin: 0 44px 4px 0; font-size: 21px; letter-spacing: -.02em; }
.drawer h4 { margin: 20px 0 6px; font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .07em; }
.drawer pre { white-space: pre-wrap; font: inherit; margin: 0; color: var(--ink-2); }
.drawer .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.drawer table.grid th { position: static; }
.drawer table.grid th { padding: 8px 10px; }
.note { border-left: 3px solid var(--gold); background: var(--panel-2); padding: 7px 11px; border-radius: 0 9px 9px 0; margin: 5px 0; font-size: 13px; }
.comment { border-bottom: 1px solid var(--line-2); padding: 8px 0; font-size: 13px; color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 13px; z-index: 60; box-shadow: var(--shadow); animation: fade .2s var(--ease); }
.toast[hidden] { display: none; }

@media (max-width: 760px) {
  .top { position: static; backdrop-filter: none; background: var(--panel); }
  .top-inner { padding: 10px 14px; gap: 8px; }
  .brand span { font-size: 15px; }
  .reset .full { display: none; }
  .reset .short { display: inline; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); }
  .tabs button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; color: var(--muted); }
  .tabs button svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabs button kbd { display: none; }
  .tabs button[aria-selected="true"] { box-shadow: none; background: transparent; color: var(--accent); }
  .tabs button[data-tab="spots"] span { font-size: 0; }
  .tabs button[data-tab="spots"] span::after { content: "Spots"; font-size: 11px; }
  main { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
  .card { padding: 14px; }
  input, select { font-size: 16px; }
  .filters .field input:not([type]), .filters .field select { width: 100%; }
  .filters .field { flex: 1 1 140px; }
  .filters .hint.d-only { display: none; }
  .m-only { display: flex !important; }
  .d-only { display: none !important; }
  .tablewrap.cardable { display: none; }
  .mcards { display: block; }
  .buffs { grid-template-columns: 1fr 1fr; }
  .buff { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; }
  .buff .lv { justify-content: stretch; }
  .buff .lv button { flex: 1; height: 36px; font-size: 14px; }
  .runs { min-height: 36px; padding: 6px 12px 6px 10px; }
  .info-btn { width: 36px; height: 36px; }
  .stepper button { width: 44px; }
  .seg button { padding: 9px 4px; }
  .rq label { padding: 8px 0; }
  table.grid th { top: 0; }
  .hide-m { display: none; }
  .clamp { max-width: 160px; }
  .filters .chips .chip { min-height: 36px; padding: 6px 13px; }
  .combo-list { max-height: 45vh; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .site-foot { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
button, a, .mcard, .runs { -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .kbd-hint { display: none; } }
.back { margin: 0 44px 12px 0; }
.combo-list.up { top: auto; bottom: calc(100% + 4px); }
@media (max-width: 1100px) {
  .reset .full { display: none; }
  .reset .short { display: inline; }
}
@media (max-width: 1000px) {
  .tablewrap.cardable { display: none; }
  .mcards { display: block; }
  .m-only { display: flex !important; }
}
@media (max-width: 760px) {
  .summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary .tile { padding: 10px 12px; }
  .summary .tile .v { font-size: 18px; }
}
.form .field.span2 { grid-column: span 2; }
@media (max-width: 420px) { .form .field.span2 { grid-column: 1 / -1; } }
.loss { color: var(--warn); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.linkbtn:hover { text-decoration: underline; }
.assume-sum { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font-size: 13px; color: var(--ink-2); }
.section-t .actions { display: flex; gap: 6px; text-transform: none; letter-spacing: 0; }
.catalog { margin-top: 4px; }
.catalog > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; font-size: 15px; }
.catalog > summary::-webkit-details-marker { display: none; }
.catalog > summary::before { content: "▸"; color: var(--accent); transition: transform .15s; display: inline-block; }
.catalog[open] > summary::before { transform: rotate(90deg); }
.info-btn { width: 34px; height: 30px; font-size: 16px; }
@media (max-width: 1000px) { .filters .sortfield { flex-basis: 100%; } }
@media (max-width: 760px) {
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters .chips::-webkit-scrollbar { display: none; }
  .filters .chips .chip, .filters .chips .hint { flex: none; }
}
@media (max-width: 760px) { .linkbtn { display: inline-block; min-height: 32px; padding: 6px 4px; } }
