:root {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #191c25;
  --edge: #343642;
  --text: #f5f4fa;
  --muted: #b9b9c8;
  --accent: #ff7986;
  font: 15px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; background: radial-gradient(ellipse at top right,#2c1b29,transparent 65vh),var(--bg); color:var(--text) }
main { width:min(1440px,100%); margin:auto; padding:26px 20px 40px }
a { color:#ffa9b3; text-underline-offset:3px }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px }
.hero { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:8px }
h1 { margin:4px 0 0; font-size:clamp(32px,5vw,54px); line-height:1.05; letter-spacing:-.04em }
h2 { margin:0 0 8px; font-size:clamp(20px,3vw,28px) }
.eyebrow,.picker-label { color:#ffabb5; font-size:12px; letter-spacing:.075em; font-weight:750 }
.muted { color:var(--muted); font-size:13px }
.panel { background:var(--panel); border:1px solid var(--edge); border-radius:14px; padding:20px; margin:20px 0 }
.fighter-panel { padding:0 }
.fighter { display:flex; align-items:center; gap:18px; padding:20px; background:linear-gradient(110deg,#462530,#201e29 62%); border-radius:13px 13px 0 0 }
.identity { flex:1; min-width:0 }
.portrait { position:relative; display:grid; place-items:center; flex:none; width:96px; height:96px; border-radius:12px; overflow:hidden; background:#532d3b; font-size:25px; font-weight:800 }
.portrait img { position:absolute; inset:0; z-index:1; display:block; width:100%; height:100%; object-fit:cover }
.portrait.thumb { width:32px; height:32px; border-radius:5px; font-size:12px }
.character-picker { width:min(280px,100%); position:relative }
.character-picker summary { list-style:none; border:1px solid #a35f6c; padding:9px 12px; border-radius:8px; cursor:pointer; background:#2e222e }
.character-picker summary::-webkit-details-marker { display:none }
.picker-current { display:flex; justify-content:space-between; gap:6px; font-weight:700 }
.character-options { position:absolute; z-index:5; right:0; top:calc(100% + 7px); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; width:min(410px,75vw); max-height:55vh; overflow:auto; padding:8px; border:1px solid #94606e; border-radius:9px; background:#241e28 }
.character-options a { display:flex; align-items:center; gap:7px; color:var(--text); text-decoration:none; padding:5px; border-radius:6px; overflow-wrap:anywhere }
.character-options a:is(:hover,[aria-current]) { background:#52313e }
.block-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; border-top:1px solid var(--edge); background:var(--edge); border-radius:0 0 13px 13px; overflow:hidden }
.block-stat { display:grid; gap:3px; padding:12px 16px; background:#1d1d27 }
.block-stat strong { font-size:25px }
.block-stat span { color:var(--muted); font-size:12px }
[data-stat=plus],tr[data-block=plus] td[data-field=on_block] { color:#79e4a9 }
[data-stat=minus],tr[data-block=minus] td[data-field=on_block] { color:#ff8e9d }
.filters { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 }
.filters input { flex:1; min-width:160px }
input,select { padding:9px 11px; font:inherit; color:inherit; background:#15151e; border:1px solid #515261; border-radius:7px; min-height:42px }
.table-wrap { overflow:auto; max-height:70vh; border:1px solid var(--edge); border-radius:9px }
table { border-collapse:separate; border-spacing:0; width:100%; font-size:14px; font-variant-numeric:tabular-nums }
th,td { padding:9px 10px; border-bottom:1px solid var(--edge); text-align:left; vertical-align:middle }
th { position:sticky; top:0; z-index:2; background:#292735 }
th button { color:inherit; border:0; padding:4px 0; background:none; text-align:left; font:inherit; font-weight:750; cursor:pointer; white-space:nowrap }
th[aria-sort=ascending] button::after { content:" ↑" }
th[aria-sort=descending] button::after { content:" ↓" }
td { background:#191c25 }
tr:nth-child(even) td { background:#20222d }
tr:hover td { background:#292530 }
th:first-child,td:first-child { position:sticky; left:0; min-width:130px; z-index:1; background:#272331 }
th:first-child { z-index:3 }
td[data-field=input] { min-width:100px }
td[data-field=on_block] { font-weight:750 }
.command-arrow,.command-button { display:inline-flex; vertical-align:middle; align-items:center; justify-content:center; font-weight:750; line-height:1 }
.command-arrow { font-size:17px; min-width:17px }
.command-button { width:21px; height:21px; border-radius:5px; margin:1px; background:#683543; border:1px solid #b07380; color:#fff }
.command-K { background:#634820; border-color:#ae8847 }
.command-S { background:#265749; border-color:#5ca390 }
.command-H { background:#49375e; border-color:#8f75af }
.command-D { background:#653e24; border-color:#bc8560 }
footer p { margin:5px 0 }
[hidden] { display:none!important }
@media(max-width:720px) {
  main { padding:15px 10px }
  .panel,.fighter { padding:13px }
  .fighter-panel { padding:0 }
  .fighter { flex-wrap:wrap; gap:12px }
  .fighter > .portrait { width:68px; height:68px }
  .character-picker { width:100% }
  .character-options { width:100% }
  .block-stats { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .filters input { flex-basis:100% }
  .filters select { flex:1; max-width:100% }
  .table-wrap { max-height:65vh }
  th:first-child,td:first-child { min-width:100px; max-width:110px; overflow-wrap:anywhere }
}

.block-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px }
.block-shortcuts button { font:inherit; font-size:13px; font-weight:700; padding:9px 12px; min-height:38px; color:var(--text); background:#242532; border:1px solid #515261; border-radius:8px; cursor:pointer }
.block-shortcuts button:hover { border-color:var(--accent) }
.block-shortcuts button[aria-pressed=true] { background:#5b2636; border-color:var(--accent) }
