/* config_exp 75k · replan12 + denoise10 (7 tasks) vs the official setting (replan32).
   Same visual language as the other new pages (robotwin_c2r_mem, memab): warm paper, 1px lines, orange accent,
   dark video stage. Two series = the two settings, reference palette slots orange (replan12) / blue (official).
   validate_palette.js: light (#fcfcf8) PASS, CVD worst dE 24.7; dark (#171c1a) PASS, CVD worst dE 26.8.
   The full official run on the same tasks = same hue as the official series, hollow marker. */

:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --card: #fcfcf8;
  --card-2: #f1f1ea;
  --card-3: #ecece5;
  --ink: #17201e;
  --text: #3d463f;
  --muted: #6b7266;
  --line: #dcded6;
  --line-2: #e8e9e2;
  --accent: #e4531f;
  --accent-bg: #fdeee7;
  --ok: #23653d;
  --ok-bg: #e3efe4;
  --bad: #a13732;
  --bad-bg: #f7e5e1;
  --warn: #93591c;
  --warn-bg: #f8ecd9;
  --focus: #e4531f;
  --c-r12: #eb6834;
  --c-base: #2a78d6;
  --chart-surface: #fcfcf8;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --tick: #7d7b74;
  --link: #9aa39a;
  --stage: #1d2622;
  --strip-bg: #f1f1ea;
  --strip-ok: #b9c9be;
  --strip-bad: #c9422c;
  --strip-cur: #fbe4da;
  --cell-ok: #cfe5d4;
  --cell-ok-ink: #1d5a34;
  --cell-bad: #f3d3cc;
  --cell-bad-ink: #93302b;
  --changed: #fdeee7;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
  --header-h: 54px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111513;
    --card: #171c1a;
    --card-2: #202623;
    --card-3: #2a312d;
    --ink: #eef1ec;
    --text: #cdd3cc;
    --muted: #97a097;
    --line: #2f3632;
    --line-2: #262c29;
    --accent: #f26a3d;
    --accent-bg: #3a2219;
    --ok: #7fd19a;
    --ok-bg: #1b3325;
    --bad: #f39a8e;
    --bad-bg: #3b201c;
    --warn: #eab676;
    --warn-bg: #3a2c19;
    --focus: #f7a283;
    --c-r12: #d95926;
    --c-base: #3987e5;
    --chart-surface: #171c1a;
    --grid: #2c2c2a;
    --axis: #45443f;
    --tick: #9a988f;
    --link: #5f6a63;
    --stage: #0c100e;
    --strip-bg: #202623;
    --strip-ok: #52665a;
    --strip-bad: #e0664f;
    --strip-cur: #4a2a1d;
    --cell-ok: #1f4a2e;
    --cell-ok-ink: #a7e0b8;
    --cell-bad: #4f2520;
    --cell-bad-ink: #f5b3a8;
    --changed: #3a2219;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111513;
  --card: #171c1a;
  --card-2: #202623;
  --card-3: #2a312d;
  --ink: #eef1ec;
  --text: #cdd3cc;
  --muted: #97a097;
  --line: #2f3632;
  --line-2: #262c29;
  --accent: #f26a3d;
  --accent-bg: #3a2219;
  --ok: #7fd19a;
  --ok-bg: #1b3325;
  --bad: #f39a8e;
  --bad-bg: #3b201c;
  --warn: #eab676;
  --warn-bg: #3a2c19;
  --focus: #f7a283;
  --c-r12: #d95926;
  --c-base: #3987e5;
  --chart-surface: #171c1a;
  --grid: #2c2c2a;
  --axis: #45443f;
  --tick: #9a988f;
  --link: #5f6a63;
  --stage: #0c100e;
  --strip-bg: #202623;
  --strip-ok: #52665a;
  --strip-bad: #e0664f;
  --strip-cur: #4a2a1d;
  --cell-ok: #1f4a2e;
  --cell-ok-ink: #a7e0b8;
  --cell-bad: #4f2520;
  --cell-bad-ink: #f5b3a8;
  --changed: #3a2219;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  font-synthesis: none;
  overflow-x: hidden;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
code, .mono { font-family: var(--mono); }
code { font-size: .92em; overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; }
::selection { background: #ffc9aa; color: #17201e; }
sup { font-size: .72em; line-height: 0; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  height: var(--header-h); display: flex; align-items: center; gap: 22px;
  max-width: 1600px; margin: 0 auto; padding: 0 24px;
}
.brand { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -.2px; white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 700; }
.brand small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.top nav { display: flex; gap: 18px; }
.top nav a { text-decoration: none; color: var(--text); font-size: 14.5px; padding: 15px 0 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover { color: var(--accent); }
.top nav a.on { border-bottom-color: var(--accent); color: var(--ink); }
.top .back { margin-left: auto; text-decoration: none; font-size: 13.5px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; white-space: nowrap; background: var(--card); }
.top .back:hover { border-color: var(--accent); color: var(--accent); }

.loading { color: var(--muted); padding: 40px 24px; }
.error { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--bad); background: var(--bad-bg); color: var(--bad); border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }

/* ---------- overview ---------- */
.page { max-width: 1260px; margin: 0 auto; padding: 0 24px 60px; }
.hero { padding: 30px 0 4px; }
.kicker { margin: 0 0 8px; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero h1 { margin: 0 0 12px; font-size: clamp(23px, 3.1vw, 34px); line-height: 1.25; letter-spacing: -.5px; }
.lede-main { margin: 0 0 14px; font-size: 16px; line-height: 1.75; color: var(--text); max-width: 960px; }
.lede-main b { color: var(--ink); }
.caveat { margin: 0 0 16px; padding: 8px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); color: var(--text); font-size: 14px; border-radius: 0 6px 6px 0; max-width: 960px; }
.caveat b { color: var(--warn); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--kc, var(--muted)); }
.key.hollow { background: transparent; border: 2px solid var(--kc, var(--muted)); }
.k-r12 { --kc: var(--c-r12); }
.k-base { --kc: var(--c-base); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 10px; }
.tile { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 12px 16px; min-width: 0; display: flex; flex-direction: column; }
.tile h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tile .tsub { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.tile .big { font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile .big small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.tile .frac { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.tile .splits { margin: auto 0 0; border-top: 1px solid var(--line-2); padding-top: 7px; display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tile .splits dt { color: var(--muted); }
.tile .splits dd { margin: 0; color: var(--ink); text-align: right; white-space: nowrap; }
.tile.delta .big { color: var(--bad); }

section.block { margin-top: 38px; }
section.block > h2 { font-size: 22px; letter-spacing: -.3px; margin: 0 0 6px; }
section.block > .lede { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; max-width: 920px; }
section.block > .lede b { color: var(--text); font-weight: 600; }
.card { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 16px 18px; min-width: 0; }
.card + .card { margin-top: 14px; }
.card > h3 { margin: 0 0 10px; font-size: 16px; }
.card > h3 small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.grid2 > .card + .card { margin-top: 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.note b { color: var(--text); font-weight: 600; }

/* what changed */
table.cfg { border-collapse: collapse; width: 100%; font-size: 14px; }
table.cfg th, table.cfg td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
table.cfg thead th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--card-2); white-space: nowrap; }
table.cfg td:first-child { font-family: var(--mono); font-size: 12.5px; color: var(--ink); white-space: nowrap; }
table.cfg tr.chg td { background: var(--changed); }
table.cfg tr.chg td:last-child { color: var(--ink); font-weight: 600; }
table.cfg .tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; font-family: var(--sans); }
.cfg-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }

/* tables */
table.nums { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.nums th, table.nums td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
table.nums th:first-child, table.nums td:first-child { text-align: left; }
table.nums thead th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--card-2); }
table.nums tr.sum td { font-weight: 600; background: var(--card-2); color: var(--ink); }
.pv { font-weight: 600; color: var(--ink); }
.pv.sig { color: var(--warn); }
.ci { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* per-task table */
.tasktbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 980px; }
.tasktbl th, .tasktbl td { padding: 7px 7px; border-bottom: 1px solid var(--line-2); vertical-align: middle; text-align: right; white-space: nowrap; }
.tasktbl thead th { font-size: 12.5px; color: var(--muted); font-weight: 500; background: var(--card-2); }
.tasktbl thead tr.g th { border-bottom: 0; padding-bottom: 0; color: var(--ink); font-weight: 600; text-align: left; }
.tasktbl thead th.sortable { cursor: pointer; user-select: none; }
.tasktbl thead th.sortable:hover { color: var(--accent); }
.tasktbl thead th .arr { font-size: 10px; margin-left: 3px; color: var(--accent); }
.tasktbl thead th[aria-sort="none"] .arr { color: transparent; }
.tasktbl th.sep, .tasktbl td.sep { border-left: 1px solid var(--line); }
.tasktbl td.task { text-align: left; min-width: 186px; position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line-2); }
.tasktbl thead th:first-child { position: sticky; left: 0; z-index: 2; text-align: left; }
.tasktbl td.task a { font-family: var(--mono); font-size: 12.5px; color: var(--ink); text-decoration: none; white-space: normal; }
.tasktbl td.task a:hover { color: var(--accent); text-decoration: underline; }
.tasktbl td.task .lim { display: block; font-size: 11px; color: var(--muted); }
.tasktbl tfoot td { font-weight: 600; color: var(--ink); background: var(--card-2); border-bottom: 0; }
.tasktbl tfoot td.task { background: var(--card-2); }
.tasktbl td .who { display: inline-flex; align-items: center; gap: 5px; }
.dneg { color: var(--bad); font-weight: 600; }
.dpos { color: var(--ok); font-weight: 600; }
.dzero { color: var(--muted); font-weight: 600; }
.disc { color: var(--text); }
.disc b { color: var(--ink); }

/* charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i.ciw { display: inline-block; width: 18px; height: 2px; background: var(--muted); opacity: .6; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart text { font-family: var(--sans); }
.chart .t-tick { fill: var(--tick); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .t-label { fill: var(--ink); font-size: 12.5px; font-family: var(--mono); }
.chart .t-sub { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .t-val { fill: var(--ink); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axisline { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .rowhl { fill: var(--card-2); opacity: 0; }
.chart g.row:hover .rowhl, .chart g.row:focus .rowhl { opacity: 1; }
.chart g.row:focus { outline: none; }
.chart-cap { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* chunk diagram */
.chunkdia text { font-family: var(--sans); }
.chunkdia .t-lab { fill: var(--ink); font-size: 12.5px; font-weight: 600; }
.chunkdia .t-sub { fill: var(--muted); font-size: 11.5px; }

/* episode overview grid */
.epgrid { display: grid; grid-template-columns: 250px auto; gap: 4px 10px; align-items: center; min-width: 0; }
.epgrid .rl { font-size: 12.5px; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.epgrid .rl a { font-family: var(--mono); font-size: 12px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.epgrid .rl a:hover { color: var(--accent); text-decoration: underline; }
.epgrid .rl small { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.epgrid .hdr { font-size: 11px; color: var(--muted); }
.epgrid .hdr .cnth { float: right; }
table.nums.pooled td:first-child { white-space: normal; }
table.nums.pooled td:last-child { white-space: nowrap; }
.seedsets { display: flex; gap: 8px; }
.seedset { display: flex; gap: 2px; }
.seedhdr { display: flex; gap: 8px; }
.seedhdr span { font-size: 10.5px; color: var(--muted); font-family: var(--mono); text-align: left; white-space: nowrap; }
.cells { display: flex; gap: 2px; }
.cells a, .cells span.c { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 3px; font-size: 11px; text-decoration: none; position: relative; font-weight: 600; }
.c-ok { background: var(--cell-ok); color: var(--cell-ok-ink); }
.c-bad { background: var(--cell-bad); color: var(--cell-bad-ink); }
.cells a:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.cells a.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.cells a.bok::after, .cells span.bok::after { content: ''; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-base); box-shadow: 0 0 0 1.5px var(--card); }
.grid-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.grid-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; position: relative; }
.grid-legend i.ok { background: var(--cell-ok); }
.grid-legend i.bad { background: var(--cell-bad); }
.grid-legend i.bdot { background: var(--card-3); }
.grid-legend i.bdot::after { content: ''; position: absolute; right: 1px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-base); }

.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; border-radius: 6px; padding: 7px 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.dark:hover { color: var(--paper); opacity: .9; }

ul.plain { margin: 0; padding-left: 18px; font-size: 14.5px; }
ul.plain li { margin: 6px 0; }
ul.plain li b { color: var(--ink); }
.verdict { font-size: 16px; color: var(--ink); font-weight: 600; margin: 0 0 8px; }

.foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.paths { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.paths li { padding: 4px 0; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }
.paths li:first-child { border-top: 0; }
.paths b { color: var(--text); font-weight: 500; margin-right: 6px; }

/* tooltip */
.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 320px; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.12); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; line-height: 1.5; }
.tip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tip .tl { display: flex; align-items: center; gap: 6px; }
.tip code { font-size: 12px; color: var(--ink); }

/* ---------- episode browser ---------- */
.app { display: grid; grid-template-columns: 286px minmax(0, 1fr); max-width: 1600px; margin: 0 auto; }
.side { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto; border-right: 1px solid var(--line); background: var(--card); padding: 14px 10px 20px; min-height: calc(100vh - var(--header-h)); }
.side h4 { margin: 4px 8px 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.side .side-note { margin: 10px 8px 4px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: baseline; text-decoration: none; padding: 6px 8px; border-radius: 6px; color: var(--ink); }
.tasklist a:hover { background: var(--card-2); }
.tasklist a.on { background: var(--accent-bg); }
.tasklist .tn { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasklist .ts { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.tasklist .ts .key { width: 7px; height: 7px; }

.content { min-width: 0; padding: 18px 24px 48px; }
.ep-head h1 { margin: 0; font-size: 22px; letter-spacing: -.3px; font-family: var(--mono); font-weight: 600; word-break: break-all; }
.ep-head .sub { margin: 2px 0 12px; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.ep-head .sub b { color: var(--ink); font-weight: 600; }
.ep-head .sub span { display: inline-flex; align-items: center; gap: 5px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.fail { color: var(--bad); background: var(--bad-bg); }

/* pair matrix */
.matrix { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 10px 14px 12px; margin-bottom: 14px; }
.matrix > summary { cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 600; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.matrix > summary::-webkit-details-marker { display: none; }
.matrix > summary::before { content: '▾'; color: var(--muted); font-weight: 400; }
.matrix:not([open]) > summary::before { content: '▸'; }
.matrix > summary small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.mx-block { margin-top: 10px; }
.mx { display: grid; grid-template-columns: 162px auto; gap: 3px 8px; align-items: center; }
.mx .rl { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx .rl small { color: var(--muted); }
.mx .hdr { font-size: 11px; color: var(--muted); }
.mx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.mx-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.mx-legend i.ok { background: var(--cell-ok); }
.mx-legend i.bad { background: var(--cell-bad); }
.mx-legend i.cur { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--card-3); }

/* replay */
.replay { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.replay:fullscreen { overflow: auto; }
.replay-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.replay-heading h3 { font-size: 16px; margin: 0; line-height: 1.45; font-weight: 600; flex: 1 1 320px; min-width: 0; }
.replay-heading h3 small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.stage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.world { min-width: 0; border-right: 1px solid var(--line); }
.vwrap { position: relative; background: var(--stage); aspect-ratio: 4 / 3; overflow: hidden; }
.vwrap video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--stage); }
.vbadges { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.vbadges span { font-size: 12px; color: #eef0ea; background: #141b18b8; padding: 2px 8px; border-radius: 3px; }
.vstart { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; background: #0a130a30; width: 100%; z-index: 1; }
.vstart:hover { background: #0a130a50; }
.vstart[hidden] { display: none; }
.vstart > span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #ffffffe6; color: #17201e; font-size: 18px; padding-left: 3px; }
.vstart strong { font-size: 15px; font-weight: 500; text-shadow: 0 1px 6px #0008; }
.vcap { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 12px; color: #f3f4ed; font-size: 13.5px; line-height: 1.5; background: #141b18d8; border-radius: 6px; pointer-events: none; z-index: 2; font-variant-numeric: tabular-nums; }
.vcap b { color: #f7a283; font-weight: 500; margin-right: 8px; white-space: nowrap; }
.vcap:empty { display: none; }
.vfail { position: absolute; top: 44px; left: 10px; right: 10px; font-size: 12.5px; color: #f1c38e; background: #141b18d8; padding: 4px 8px; border-radius: 4px; z-index: 2; overflow-wrap: anywhere; }

.facts-panel { min-width: 0; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.facts-panel h4 { margin: 0; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kv { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.kv dd small { color: var(--muted); font-size: 12px; }
.kv dd code { font-size: 12px; }
.basebox { border: 1px solid var(--line); border-left: 3px solid var(--c-base); border-radius: 6px; padding: 8px 12px; background: var(--card); }
.basebox .kv { font-size: 13px; }
.basebox .xl { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.basebox .xl:hover { color: var(--accent); }
.basebox .hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.nav2 { display: flex; flex-wrap: wrap; gap: 6px; }
.nav2 a, .nav2 span { font-size: 13px; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; color: var(--ink); background: var(--card); white-space: nowrap; }
.nav2 a:hover { border-color: var(--accent); color: var(--accent); }
.nav2 span { color: var(--muted); opacity: .6; }

.controls { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); flex-wrap: nowrap; }
.controls button { font-size: 17px; line-height: 1; color: var(--text); padding: 4px; }
.controls .play { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; padding: 0; flex: none; }
.controls .tnav { display: flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--text); }
.controls .clock { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 92px; }
.controls input[type=range] { --progress: 0%; flex: 1; min-width: 60px; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 4px; margin: 0; cursor: pointer; background: linear-gradient(to right, var(--accent) var(--progress), var(--card-3) var(--progress)); }
.controls input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }
.controls input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }
.controls select { font-size: 13.5px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--text); }
.controls .fs { display: grid; place-items: center; color: var(--muted); width: 26px; height: 26px; }
.controls .fs:hover { color: var(--accent); }

.strip { position: relative; height: 34px; background: var(--strip-bg); border-top: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.strip .sg { position: absolute; top: 0; bottom: 0; border-left: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-bottom: 3px solid var(--strip-ok); font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; }
.strip .sg.last-bad { border-bottom-color: var(--strip-bad); }
.strip .sg.cur { background: var(--strip-cur); color: var(--ink); }
.strip .sg:hover { background: var(--card-3); }
.strip .cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; margin-left: -1px; }
.strip .bmark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--c-base); pointer-events: none; margin-left: -1px; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 16px 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }
.strip-legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 5px; }
.strip-legend i.bm { height: 12px; width: 0; border-left: 2px dashed var(--c-base); }
.notes { margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .world { border-right: 0; }
  .facts-panel { border-top: 1px solid var(--line); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px 12px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .epgrid { grid-template-columns: 150px auto; }
}
@media (max-width: 640px) {
  :root { --header-h: 50px; }
  .top-in { padding: 0 12px; gap: 12px; }
  .brand small { display: none; }
  .brand { font-size: 15px; }
  .top nav { gap: 12px; }
  .top nav a { font-size: 14px; }
  .top .back { padding: 4px 8px; font-size: 12.5px; }
  .page { padding: 0 16px 40px; }
  .content { padding: 14px 16px 40px; }
  .hero { padding-top: 20px; }
  .lede-main { font-size: 15px; }
  .tiles { gap: 8px; }
  .tile { padding: 10px 10px; }
  .tile .big { font-size: 22px; }
  .tile .big small { font-size: 12.5px; margin-left: 3px; }
  .tile .splits { font-size: 12px; gap: 1px 6px; }
  .card { padding: 12px 12px; }
  table.nums, table.cfg { font-size: 13px; }
  table.nums th, table.nums td, table.cfg th, table.cfg td { padding: 5px 6px; }
  table.cfg thead { display: none; }
  table.cfg, table.cfg tbody, table.cfg tr, table.cfg td { display: block; width: 100%; }
  table.cfg tr { border-bottom: 1px solid var(--line-2); padding: 6px 0; }
  table.cfg td { border: 0; padding: 2px 8px; }
  table.cfg td:first-child { white-space: normal; font-weight: 600; }
  table.cfg td[data-label]::before { content: attr(data-label) "："; color: var(--muted); font-size: 12px; font-weight: 400; margin-right: 2px; }
  table.nums.pooled td { white-space: normal; }
  table.nums.pooled td:last-child { text-align: right; }
  .epgrid .hdr .cnth { display: none; }
  .controls { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .controls input[type=range] { order: 5; flex-basis: 100%; }
  .controls .clock { min-width: 0; }
  .strip-legend { padding-left: 12px; padding-right: 12px; }
  .facts-panel { padding: 10px 12px 12px; }
  .vcap { font-size: 12.5px; padding: 4px 9px; left: 6px; right: 6px; bottom: 6px; }
  .tasktbl td.task { min-width: 138px; }
  .tasktbl td.task a { font-size: 11.5px; }
  .epgrid { grid-template-columns: 112px auto; }
  .epgrid .rl a { font-size: 11px; }
  .epgrid .rl small { display: none; }
  .mx { grid-template-columns: 132px auto; }
  .mx .rl { font-size: 11.5px; }
}
@media (max-width: 360px) {
  .brand b { display: none; }
  .top nav { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
table.nums a, .tasktbl td.task a { text-underline-offset: 3px; }
