/* ============================================================
 * agents-ui.css — 智能天梯 (agents-ui.js). One screen, no page scroll: the ladder on the left and the detail (檔案 / 對比 /
 * 家族樹 / 分岔) on the right; stacked under 1100px; a compact ladder under 700px. A panel scrolls inside itself when its
 * content is taller than the window. Colours = style.css tokens only (--gold, --good, --bad, --you, --ink*, --panel-*,
 * --line-*), so the screen follows the app's theme.
 * ============================================================ */
#agents{ display:none; }
body.screen-agents{ padding-bottom:0; }
body.screen-agents #agents{ display:block; }
body.screen-agents > header,
body.screen-agents > #arrangeWrap,
body.screen-agents > #playWrap{ display:none !important; }
.hub-card .hub-key{ position:absolute; right:12px; bottom:12px; }

.ag-wrap{ height:100vh; height:100dvh; display:flex; flex-direction:column; gap:10px; padding:12px 16px; max-width:1720px; margin:0 auto; }
.ag-top{ display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; }
.ag-top .hub-back{ margin:0; }
.ag-title{ font-size:22px; letter-spacing:2px; white-space:nowrap; }
.ag-title small{ display:inline; margin-left:10px; font-size:11px; letter-spacing:3px; color:var(--ink-dim); font-weight:400; }
.ag-meta{ flex:1 1 260px; font-size:12.5px; color:var(--ink-dim); }
.ag-warn{ color:var(--warn); }
.ag-btn{ padding:5px 11px; font-size:12.5px; }
.ag-seats{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }      /* 上桌: seat this player in 對局演練 */
.ag-body{ flex:1; min-height:0; display:grid; grid-template-columns:minmax(540px, 42%) minmax(0, 1fr); gap:12px; transition:opacity .2s; }
.ag-busy{ opacity:.6; }
.ag-panel{ background:var(--panel-2); border:1px solid var(--gold-soft); border-radius:14px; min-height:0; min-width:0; display:flex; flex-direction:column; overflow:hidden; }
.ag-ph{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; padding:8px 12px 6px; border-bottom:1px solid var(--line-1); }
.ag-scroll{ flex:1; min-height:0; overflow:auto; }
.ag-dim{ color:var(--ink-faint); }
.ag-small{ font-size:11.5px; }
.ag-pos{ color:var(--good); }
.ag-neg{ color:var(--bad); }
.ag-empty{ padding:28px 16px; text-align:center; color:var(--ink-dim); }
#agents code{ font-family:Consolas,monospace; font-size:.92em; background:var(--panel-1); border:1px solid var(--line-1); border-radius:4px; padding:0 4px; user-select:text; }

/* ---------- 排行榜 ---------- */
.ag-table{ width:100%; border-collapse:separate; border-spacing:0; font-size:12.5px; font-variant-numeric:tabular-nums; }
.ag-table thead th{ position:sticky; top:0; z-index:1; background:var(--panel-3); color:var(--ink-dim); font-weight:600; font-size:11.5px;
  text-align:left; padding:6px 6px; border-bottom:1px solid var(--line-gold); white-space:nowrap; }
.ag-table td{ padding:5px 6px; border-bottom:1px solid var(--line-1); vertical-align:middle; }
.ag-row{ cursor:pointer; }
.ag-row:hover td{ background:var(--panel-1); }
.ag-row.sel td{ background:rgba(191,176,131,.12); }
.ag-row.sel td:first-child{ box-shadow:inset 3px 0 0 var(--gold); }
.ag-rk{ width:22px; text-align:center; color:var(--ink-faint); }
.ag-nm{ white-space:nowrap; }
.ag-nm b{ font-size:13.5px; }
.ag-tag{ margin-left:5px; font-size:10.5px; padding:0 5px; border-radius:8px; border:1px solid var(--line-gold); color:var(--gold); }
.ag-fam2, .ag-bd2{ display:none; font-size:10.5px; color:var(--ink-faint); white-space:normal; }
.ag-fam{ color:var(--ink-dim); font-size:12px; max-width:110px; }
.ag-elo{ width:112px; }
.ag-elo-n{ display:flex; align-items:baseline; gap:5px; white-space:nowrap; }
.ag-elo-n b{ font-size:13.5px; }
.ag-elo-n small, .ag-rec small{ color:var(--ink-faint); font-size:11px; }
.ag-num{ text-align:right; white-space:nowrap; }
.ag-rec{ width:84px; }
.ag-rec small{ display:block; margin-top:2px; white-space:nowrap; }
.ag-bd{ color:var(--ink-dim); font-size:11.5px; white-space:nowrap; }
.ag-foot{ padding:10px 12px 12px; font-size:11.5px; color:var(--ink-faint); line-height:1.6; }
.ag-foot p + p{ margin-top:4px; }
.ag-foot b{ color:var(--ink-dim); }
@media (max-width:1499px){ .ag-fam{ display:none; } .ag-fam2{ display:block; } }
.ag-sub th{ position:static; background:var(--panel-1); text-align:left; font-weight:600; color:var(--ink-dim); font-size:11.5px; padding:6px; border-bottom:1px solid var(--line-1); }
.ag-row-u .ag-nm b{ color:var(--ink-dim); }
.ag-u-what{ color:var(--ink-faint); font-size:11.5px; }
/* the 95 % band on a scale shared by every row: hairline track, the band, the rating, the anchor */
.ag-ci{ position:relative; height:10px; margin-top:3px; }
.ag-ci::before{ content:''; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line-1); }
.ag-ci-a{ position:absolute; top:0; bottom:0; width:1px; background:var(--line-gold); }
.ag-ci-r{ position:absolute; top:3px; height:4px; border-radius:2px; background:var(--gold); opacity:.45; }
.ag-ci-d{ position:absolute; top:1px; width:8px; height:8px; margin-left:-4px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 2px var(--panel-3); }
/* 勝／和／負: win share in --good, draws and losses in two greys (red/green alone fails colour-blind readers; the counts are printed) */
.ag-wdl{ display:flex; gap:2px; height:8px; min-width:60px; }
.ag-wdl i{ display:block; min-width:2px; }
.ag-wdl i:first-child{ border-radius:4px 0 0 4px; }
.ag-wdl i:last-child{ border-radius:0 4px 4px 0; }
.ag-wdl i:only-child{ border-radius:4px; }
.ag-wdl-w{ background:var(--good); }
.ag-wdl-d{ background:var(--ink-dim); opacity:.6; }
.ag-wdl-l{ background:var(--ink-faint); opacity:.28; }

/* ---------- the detail panel ---------- */
.ag-tabs{ display:flex; gap:6px; flex-wrap:wrap; padding:8px 10px; border-bottom:1px solid var(--line-1); }
.ag-tab{ padding:5px 12px; font-size:13px; background:var(--panel-1); border-color:var(--line-1); }
.ag-tab.on{ border-color:var(--gold); background:rgba(191,176,131,.14); color:var(--gold); font-weight:700; }
.ag-pane{ flex:1; min-height:0; overflow:auto; padding:10px; }
.ag-card{ background:var(--panel-1); border:1px solid var(--line-1); border-radius:10px; padding:8px 10px; min-width:0; }
.ag-card h3{ font-size:13.5px; margin-bottom:5px; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.ag-card h3 small{ font-weight:400; font-size:11px; color:var(--ink-faint); }
.ag-note{ font-size:12px; color:var(--ink-dim); line-height:1.55; margin-top:6px; }
.ag-sub-h{ font-size:11.5px; font-weight:700; color:var(--ink-dim); margin:8px 0 4px; }
.ag-sub-h small{ font-weight:400; color:var(--ink-faint); }
.ag-link{ color:var(--you); cursor:pointer; text-decoration:none; border-bottom:1px dotted var(--you); }
.ag-link:hover{ color:var(--gold); border-color:var(--gold); }
.ag-legend2{ display:flex; flex-wrap:wrap; gap:4px 14px; align-items:center; margin-top:4px; color:var(--ink-dim); font-size:11.5px; }
.ag-legend2 span{ display:inline-flex; align-items:center; gap:5px; }
.ag-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* 檔案: cards flow into as many ≥ 300px columns as fit (1–3), the name on top */
.ag-prof{ columns:300px 3; column-gap:8px; }
.ag-prof > .ag-card{ break-inside:avoid; margin-bottom:8px; }
.ag-hero{ column-span:all; display:flex; flex-wrap:wrap; align-items:flex-end; gap:4px 18px; }
.ag-hero-l{ flex:1 1 300px; min-width:0; }
.ag-hero .ag-tiles{ flex:0 1 auto; }
.ag-hero-top{ display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.ag-big{ font-size:24px; font-weight:800; letter-spacing:.5px; }
.ag-badges{ display:flex; flex-wrap:wrap; gap:5px; }
.ag-badge{ font-size:11px; padding:1px 8px; border-radius:10px; border:1px solid var(--line-1); color:var(--ink-dim); background:var(--panel-1); }
.ag-badge-u{ border-color:var(--ink-faint); border-style:dashed; }
.ag-sum{ font-size:12.5px; color:var(--ink); margin:5px 0 2px; line-height:1.5; }
.ag-tiles{ display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:4px; }
.ag-tile{ display:flex; flex-direction:column; min-width:58px; }
.ag-tile span{ font-size:11px; color:var(--ink-faint); }
.ag-tile b{ font-size:18px; line-height:1.25; }
.ag-tile small{ font-size:11px; color:var(--ink-dim); font-variant-numeric:tabular-nums; }
.ag-rec-t{ font-size:12.5px; margin:5px 0 4px; }
.ag-kvs{ display:flex; gap:16px; flex-wrap:wrap; }
.ag-kv{ font-size:12.5px; } .ag-kv span{ color:var(--ink-faint); margin-right:5px; }
.ag-h2h{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 8px; font-size:12px; padding:3px 0; border-bottom:1px solid var(--line-1); font-variant-numeric:tabular-nums; }
.ag-h2h > span i{ font-style:normal; color:var(--ink-faint); }
.ag-h2h > b{ text-align:right; white-space:nowrap; }
.ag-h2h > b small{ font-weight:400; color:var(--ink-faint); }
.ag-h2h > small{ grid-column:1 / -1; color:var(--ink-faint); font-size:11px; }
.ag-swl{ font-size:12px; margin-bottom:4px; }
.ag-swl > b{ font-size:11.5px; }
.ag-card ul{ margin:2px 0 0 16px; line-height:1.5; }
.ag-set-g{ margin-bottom:5px; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:14px; }
.ag-set-h, .ag-setnote, .ag-set-g > .ag-dim{ grid-column:1 / -1; }
.ag-set-h{ font-size:11.5px; font-weight:700; color:var(--gold); margin-bottom:1px; }
.ag-set-h small{ font-weight:400; color:var(--ink-faint); font-family:Consolas,monospace; }
.ag-set{ display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:12.5px; padding:2px 0; border-bottom:1px solid var(--line-1); }
.ag-set > span:first-child{ color:var(--ink-dim); flex:0 0 auto; }
.ag-set > .ag-v{ min-width:0; overflow-wrap:anywhere; text-align:right; }
.ag-setnote{ font-size:11.5px; color:var(--ink-faint); line-height:1.5; margin-top:3px; }
/* a read-only switch: the pill + 開／關 in words */
.ag-sw{ display:inline-flex; align-items:center; gap:6px; font-weight:600; color:var(--ink-dim); white-space:nowrap; }
.ag-sw i{ position:relative; width:24px; height:13px; border-radius:7px; background:var(--line-1); box-shadow:inset 0 0 0 1px var(--ink-faint); }
.ag-sw i::after{ content:''; position:absolute; top:2px; left:2px; width:9px; height:9px; border-radius:50%; background:var(--ink-faint); transition:left .15s; }
.ag-sw.on{ color:var(--good); }
.ag-sw.on i{ background:var(--good); box-shadow:none; }
.ag-sw.on i::after{ left:13px; background:var(--panel-3); }
.ag-kv2{ display:grid; grid-template-columns:72px minmax(0,1fr); gap:8px; font-size:12px; padding:3px 0; border-bottom:1px solid var(--line-1); line-height:1.45; }
.ag-kv2 > span{ color:var(--ink-faint); }
.ag-chain{ font-size:12px; margin-top:6px; color:var(--ink-dim); line-height:1.6; }
.ag-chain b{ color:var(--gold); }
.ag-traits{ display:flex; flex-wrap:wrap; gap:5px; margin-bottom:6px; }
.ag-trait{ font-size:11.5px; padding:2px 8px; border-radius:10px; border:1px solid var(--line-gold); color:var(--ink); background:rgba(191,176,131,.08); }
.ag-trait-n{ border-color:var(--line-1); color:var(--ink-dim); background:none; }
/* 個性 numbers: a dot plot per number — this agent's dot on the spread of every agent (grey ticks) */
.ag-dot{ display:grid; grid-template-columns:78px minmax(40px,1fr) 58px; align-items:center; gap:8px; font-size:11.5px; padding:2px 0; }
.ag-dot2{ grid-template-columns:78px minmax(40px,1fr) 50px 50px; }
.ag-dl{ color:var(--ink-dim); white-space:nowrap; }
.ag-track{ position:relative; height:14px; }
.ag-track::before{ content:''; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line-1); }
.ag-tick{ position:absolute; top:3px; width:1px; height:8px; background:var(--ink-faint); opacity:.7; }
.ag-mk{ position:absolute; top:3px; width:8px; height:8px; margin-left:-4px; display:inline-block; }
.ag-legend2 .ag-mk, .ag-cmp-top .ag-mk{ position:static; margin:0; }
.ag-mk-a{ border-radius:50%; background:var(--gold); box-shadow:0 0 0 2px var(--panel-3); z-index:2; }
.ag-mk-b{ background:var(--you); transform:rotate(45deg); box-shadow:0 0 0 2px var(--panel-3); z-index:1; }
.ag-dv{ text-align:right; font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
.ag-lead{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:1px 14px; }
.ag-lr{ display:grid; grid-template-columns:40px minmax(20px,1fr) auto; gap:6px; align-items:center; font-size:11.5px; }
.ag-lr > span{ color:var(--ink-dim); }
.ag-lr > b{ font-weight:600; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ag-lbars{ position:relative; display:flex; flex-direction:column; gap:2px; }
.ag-lb{ display:block; height:6px; border-radius:0 3px 3px 0; min-width:1px; }
.ag-lb-a{ background:var(--gold); }
.ag-lb-b{ background:var(--you); }
.ag-lavg{ position:absolute; top:-2px; bottom:-2px; width:1px; background:var(--ink); opacity:.55; }
.ag-lead2 .ag-lr{ grid-template-columns:40px minmax(20px,1fr) 78px; }

/* the Elo curve */
.ag-chart{ position:relative; }
.ag-chart svg{ display:block; max-width:100%; }
.ag-chart text{ font-size:10.5px; fill:var(--ink-faint); font-family:inherit; font-variant-numeric:tabular-nums; }
.ag-chart .ag-endv{ font-size:13px; font-weight:700; fill:var(--ink); }
.ag-grid{ stroke:var(--line-1); stroke-width:1; }
.ag-anchor{ stroke:var(--line-gold); stroke-width:1; stroke-dasharray:4 3; }
.ag-band{ fill:var(--gold); fill-opacity:.14; stroke:none; }
.ag-line{ fill:none; stroke:var(--gold); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.ag-indl{ fill:none; stroke:var(--you); stroke-width:2; stroke-dasharray:5 4; stroke-linecap:round; }
.ag-whisk{ stroke:var(--gold); stroke-opacity:.6; stroke-width:2; stroke-linecap:round; }
.ag-dotm{ fill:var(--gold); stroke:var(--panel-3); stroke-width:2; }
.ag-cross{ stroke:var(--ink-dim); stroke-width:1; }
.ag-hit{ fill:transparent; cursor:crosshair; }
.ag-tip{ position:absolute; z-index:3; pointer-events:none; background:var(--panel-3); border:1px solid var(--line-gold); border-radius:6px; padding:3px 8px;
  font-size:11.5px; white-space:nowrap; display:flex; gap:8px; align-items:baseline; box-shadow:0 4px 14px rgba(0,0,0,.35); }
.ag-tip b{ font-size:13px; } .ag-tip span{ color:var(--ink-dim); } .ag-tip small{ color:var(--ink-faint); }
.ag-lk{ display:inline-block; width:16px; height:0; border-top:2px solid var(--ink-faint); }
.ag-lk-p{ border-top-style:dashed; }
.ag-lk-g{ border-top-color:var(--gold); }
.ag-lk-i{ border-top:2px dashed var(--you); }
.ag-lk-band{ display:inline-block; width:14px; height:9px; background:var(--gold); opacity:.3; border-radius:2px; }
.ag-lk-box{ display:inline-block; width:14px; height:10px; border:1px dashed var(--ink-faint); border-radius:3px; }

/* ---------- 對比 ---------- */
.ag-cmp-top{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-bottom:10px; }
.ag-cmp-a, .ag-cmp-b{ display:inline-flex; align-items:center; gap:6px; font-size:14px; }
.ag-cmp-b select{ background:var(--panel-3); color:var(--ink); border:1px solid var(--line-gold); border-radius:7px; padding:4px 8px; font-family:inherit; font-size:13.5px; font-weight:700; }
.ag-cmp-grid{ columns:320px 3; column-gap:10px; }
.ag-cmp-grid > .ag-card{ break-inside:avoid; margin-bottom:10px; }
.ag-cr{ display:grid; grid-template-columns:86px minmax(0,1fr) minmax(0,1fr); gap:8px; align-items:center; font-size:12px; padding:3px 4px; border-bottom:1px solid var(--line-1); }
.ag-cr > span{ color:var(--ink-dim); }
.ag-cr > span small{ color:var(--ink-faint); font-size:10.5px; }
.ag-cr > b{ font-weight:600; min-width:0; overflow-wrap:anywhere; }
.ag-cr > b small{ font-weight:400; color:var(--ink-faint); }
.ag-cr-h > b{ font-size:11.5px; color:var(--ink-faint); font-weight:700; }
.ag-cr-t{ align-items:start; }
.ag-cr-t > b{ font-weight:400; }
.ag-cr-rec > b small{ display:block; margin-top:2px; }
.ag-diff{ background:rgba(191,176,131,.1); box-shadow:inset 3px 0 0 var(--gold); }
.ag-diff > span{ color:var(--gold); font-weight:700; }
.ag-same > b{ font-weight:400; color:var(--ink-dim); }

/* ---------- 家族樹 ---------- */
.ag-treewrap{ display:flex; flex-direction:column; min-height:100%; gap:6px; }
.ag-tree{ flex:1; min-height:220px; display:flex; align-items:center; justify-content:center; overflow:auto; }
.ag-tree svg{ display:block; margin:auto; }
.ag-node{ cursor:pointer; }
.ag-node rect{ fill:var(--panel-3); stroke:var(--line-gold); stroke-width:1; }
.ag-node:hover rect{ stroke:var(--gold); }
.ag-node.sel rect{ stroke:var(--gold); stroke-width:2.5; fill:rgba(191,176,131,.16); }
.ag-node.cmp rect{ stroke:var(--you); stroke-width:2; }
.ag-node-u rect{ stroke:var(--ink-faint); stroke-dasharray:4 3; }
.ag-node-x{ cursor:default; }
.ag-node-x rect{ fill:none; stroke:var(--ink-faint); stroke-dasharray:4 3; }
.ag-nt1{ font-size:13px; font-weight:700; fill:var(--ink); }
.ag-nt2{ font-size:10.5px; fill:var(--ink-faint); }
.ag-node-x .ag-nt1{ fill:var(--ink-dim); font-weight:600; }
.ag-edge{ fill:none; stroke:var(--ink-faint); stroke-width:1.5; }
.ag-edge-p{ stroke-dasharray:5 4; }
.ag-elabel{ font-size:10.5px; fill:var(--ink-dim); paint-order:stroke; stroke:var(--panel-3); stroke-width:3px; stroke-linejoin:round; }

/* ---------- 分岔 ---------- */
.ag-fork-h{ margin-bottom:10px; }
.ag-fork-h h3{ margin:0; }
.ag-fork-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(290px, 1fr)); gap:10px; align-items:start; }
.ag-fsw{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-rows:auto auto; column-gap:10px; align-items:center; width:100%;
  text-align:left; margin-bottom:6px; padding:7px 10px; background:var(--panel-1); border:1px solid var(--line-1); border-radius:9px; }
.ag-fsw:hover{ transform:none; border-color:var(--gold); }
.ag-fsw kbd{ grid-row:1 / 3; }
.ag-fsw-l{ font-weight:700; font-size:13px; }
.ag-fsw-l small{ display:block; font-weight:400; font-size:10.5px; color:var(--ink-faint); font-family:Consolas,monospace; }
.ag-fsw-v{ grid-row:1 / 3; grid-column:3; font-size:12.5px; font-weight:600; }
.ag-fsw-o{ grid-column:2; font-size:11px; color:var(--ink-faint); }
.ag-fsw.ag-changed{ border-color:var(--gold); background:rgba(191,176,131,.1); }
.ag-fsw.ag-changed .ag-fsw-o{ color:var(--gold); }
.ag-fsw:disabled{ opacity:.5; cursor:default; }
.ag-locked{ margin-top:8px; font-size:11.5px; color:var(--ink-dim); display:flex; flex-wrap:wrap; gap:4px 12px; align-items:center; }
.ag-locked b{ width:100%; font-weight:600; color:var(--ink-faint); }
.ag-field{ display:block; font-size:12px; color:var(--ink-dim); margin-top:6px; }
.ag-field input{ display:block; width:100%; margin-top:3px; background:var(--panel-3); color:var(--ink); border:1px solid var(--line-gold); border-radius:7px;
  padding:6px 9px; font-family:inherit; font-size:13.5px; user-select:text; }
.ag-field input:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 2px var(--gold-soft); }
.ag-ferr{ min-height:15px; font-size:11.5px; color:var(--bad); margin-top:2px; }
.ag-chgs{ display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12px; align-items:center; }
.ag-chg{ display:inline-flex; align-items:center; gap:5px; }
.ag-fbtns{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.ag-fbtns button:disabled{ opacity:.45; cursor:not-allowed; transform:none; }
.ag-fmsg{ min-height:16px; font-size:12px; color:var(--warn); margin-top:6px; }

/* ---------- narrower windows ---------- */
@media (max-width:1180px){
  .ag-body{ grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0, 42fr) minmax(0, 58fr); }
  .ag-fam{ display:table-cell; } .ag-fam2{ display:none; }
}
@media (max-height:640px) and (min-width:1181px){ .ag-tiles{ gap:4px 14px; } .ag-tile b{ font-size:16px; } }
@media (max-width:700px){
  .ag-wrap{ padding:8px 10px; gap:6px; }
  .ag-title{ font-size:18px; } .ag-title small{ display:none; }
  .ag-meta{ flex-basis:100%; order:3; font-size:11.5px; }
  .ag-body{ grid-template-rows:minmax(0, 38fr) minmax(0, 62fr); gap:8px; }
  .ag-ph .ag-small{ display:none; }
  .ag-fam, .ag-ind, .ag-pt, .ag-bd{ display:none; }
  .ag-fam2, .ag-bd2{ display:block; }
  .ag-elo{ width:auto; }
  .ag-rec{ width:auto; }
  .ag-table td, .ag-table thead th{ padding:4px 5px; }
  .ag-tab{ padding:4px 9px; font-size:12.5px; }
  .ag-pane{ padding:8px; }
  .ag-big{ font-size:20px; }
  .ag-cr{ grid-template-columns:70px minmax(0,1fr) minmax(0,1fr); }
  .ag-dot, .ag-dot2{ grid-template-columns:70px minmax(30px,1fr) auto; }
  .ag-dot2 .ag-dv-b{ grid-column:3; }
  .ag-lead{ grid-template-columns:minmax(0,1fr); }
}
/* 時間×Elo (2026-10-01): think time per move × Elo, a colour per family, tiers joined, the frontier dashed */
.ag-speed{ position:relative; }
.ag-speed .ag-ax, .ag-speed .ag-slab{ font-size:11px; }
.ag-ax{ fill:var(--ink-faint); }
.ag-slab{ fill:var(--ink); font-size:11px; paint-order:stroke; stroke:var(--panel-3); stroke-width:3px; stroke-linejoin:round; }
.ag-sdot{ stroke:var(--panel-3); stroke-width:2; }
.ag-ciw{ stroke-width:2; stroke-opacity:.35; stroke-linecap:round; }
.ag-tierl{ stroke-width:2; stroke-opacity:.8; stroke-linecap:round; }
.ag-front{ fill:none; stroke:var(--ink-dim); stroke-width:1.5; stroke-dasharray:5 4; }
.ag-sk{ display:inline-block; width:10px; height:10px; border-radius:50%; }
.ag-lk-front{ border-top:2px dashed var(--ink-dim); }
