@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/BarlowCondensed-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --base: #151319;
  --ink: #f8f2e9;
  --muted: #b8adbd;
  --accent: #ff693d;
  --line: #433945;
  --panel: #252128;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  --side-width: clamp(256px, 23vw, 325px);
  font-family: var(--sans);
  background: var(--base);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { display: flex; flex-direction: column; height: 100dvh; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #f9bd88; outline-offset: 3px; }
::selection { background: #6b3b42; color: #fff8ec; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 9px; padding: 10px; z-index: 20; background: var(--panel); }
.site-head {
  position: sticky; top: 0; z-index: 3; flex: none; display: flex; align-items: center;
  height: 65px; padding: 0 clamp(15px, 2vw, 33px); gap: clamp(20px, 2vw, 36px);
  border-bottom: 1px solid var(--line); background: #19161c;
}
.brand { display: inline-flex; align-items: center; flex: none; gap: 10px; color: var(--ink); text-decoration: none; font: italic 700 31px/.9 var(--display); letter-spacing: -.045em; }
.brand > span > span { color: var(--accent); }
.mark { display: inline-flex; gap: 2px; align-items: center; transform: skewX(-18deg); }
.mark i { width: 6px; height: 26px; background: var(--accent); clip-path: polygon(0 10%, 100% 0, 100% 89%, 0 100%); }
.mark i:first-child { height: 19px; }
.mark i:last-child { height: 32px; }
.site-head h1 { align-self: center; padding: 3px 0 3px clamp(18px, 2vw, 33px); border-left: 1px solid #493c49; font: 700 21px/1 var(--display); letter-spacing: .015em; }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.bar-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid transparent; background: transparent; color: #d8d0db; padding: 0 11px; font: 600 12px/1 var(--sans); border-radius: 3px; }
.bar-button:hover { color: var(--ink); background: #352c39; }
.bot-button { border-color: #514655; }
.bar-icon { color: #e7b7c9; font: 700 17px/1 var(--mono); }
.key-icon { display: inline-grid; place-items: center; width: 16px; height: 15px; border: 1px solid #9f91a6; border-radius: 3px; font: 700 12px/1 var(--mono); }
#browse, #close-browser { display: none; }
main, .workspace { flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
main { display: flex; }
.workspace { display: grid; grid-template-columns: var(--side-width) minmax(0,1fr); }
#load, noscript { padding: 25px; align-self: start; color: var(--muted); }
.sidebar { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; border-right: 1px solid var(--line); background: #1d1a20; }
.filters { flex: none; padding: 19px clamp(14px,1.45vw,22px) 0; }
.side-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.side-heading h2 { font: 700 24px/1 var(--display); letter-spacing: -.015em; }
#saved-filter { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; min-height: 28px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); font: 600 12px/1 var(--sans); }
#saved-filter span { color: #e6b78e; font-size: 15px; }
#saved-filter:hover, #saved-filter[aria-pressed="true"] { color: #ffd5b2; border-color: #825c4c; background: #382a28; }
.fighter-picker { display: flex; align-items: center; position: relative; width: 100%; gap: 12px; text-align: left; padding: 10px; border: 1px solid #635064; border-radius: 3px; background: linear-gradient(107deg,#3b2c3b,#2d2532 75%); }
.fighter-picker:hover { border-color: #d29886; background: #40303f; }
.picker-art { flex: none; width: 67px; height: 41px; display: grid; place-items: center; overflow: hidden; }
.picker-art img { width: 100%; image-rendering: pixelated; }
.picker-copy { display: grid; gap: 4px; }
.picker-copy small, .list-head, .side-footer { font: 600 10px/1.2 var(--mono); }
.picker-copy small { color: #d6bacf; text-transform: uppercase; letter-spacing: .1em; }
.picker-copy strong { font: italic 700 27px/.9 var(--display); letter-spacing: .015em; text-transform: uppercase; }
.picker-chevron { margin-left: auto; align-self: center; position: relative; top: -2px; color: #d1c3ce; font: 700 18px/1 var(--sans); }
.searchbox { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 10px; height: 36px; border: 1px solid #4e4451; border-radius: 3px; background: #18151c; color: var(--muted); }
.searchbox:focus-within { border-color: #e9a58f; }
.searchbox input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.searchbox input::placeholder { color: #b4a8bb; }
.searchbox kbd { padding: 2px 5px; border: 1px solid #49404d; border-radius: 3px; color: #c4b6c7; font: 11px var(--mono); }
.magnify { position: relative; flex: 0 0 12px; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; }
.magnify::after { content: ""; position: absolute; right: -4px; bottom: -2px; width: 5px; height: 1.5px; transform: rotate(45deg); background: currentColor; }
.move-filters { display: flex; margin-top: 9px; }
.move-filters button { flex: 1 1 auto; min-width: 0; padding: 5px 2px 6px; min-height: 34px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font: 700 17px/1 var(--display); }
.move-filters button:hover, .move-subtabs button:hover { color: var(--ink); background: #322830; }
.move-filters button[aria-selected="true"] { border-bottom-color: var(--accent); color: #ffbf99; }
.move-filters button:focus-visible, .move-subtabs button:focus-visible { outline-offset: -2px; }
.category-panel, .move-results { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.move-subtabs { display: flex; flex: none; gap: 3px; align-items: center; padding: 7px clamp(14px,1.45vw,22px); border-top: 1px solid #453742; background: #211c24; }
.move-subtabs button { padding: 5px 10px; min-height: 28px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--muted); font: 600 12px/1.15 var(--sans); }
.move-subtabs button[aria-selected="true"] { color: #eed6ed; border-color: #65506a; background: #3b2f40; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 8px clamp(14px,1.45vw,22px); color: #bdafc1; text-transform: uppercase; letter-spacing: .12em; border-block: 1px solid #39313c; }
.list-head output { font-size: 11px; letter-spacing: 0; }
.move-list { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 5px 7px; }
.move-list, .detail, dialog { scrollbar-width: thin; scrollbar-color: #655569 transparent; }
.move-row { display: flex; align-items: center; position: relative; min-height: 46px; gap: 10px; padding: 7px 12px; margin-block: 1px; border-left: 3px solid transparent; border-radius: 2px; text-decoration: none; }
.move-row:hover { background: #302931; }
.move-row:focus-visible { outline-offset: -2px; }
.move-row[aria-current="true"] { border-left-color: var(--accent); background: linear-gradient(90deg,#53302e,#36262c); }
.row-copy { display: grid; gap: 2px; min-width: 0; }
.move-name { color: #eae1e9; overflow-wrap: anywhere; font: 600 13px/1.28 var(--sans); }
.move-row[aria-current="true"] .move-name { color: #fff0e5; }
.input-notation { color: #b5a8b8; font: 11px/1.25 var(--mono); overflow-wrap: anywhere; }
.saved-mark { color: #edbe79; margin-left: auto; font-size: 11px; }
.row-current { display: none; flex: none; margin-left: auto; width: 6px; height: 6px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.move-row[aria-current="true"] .row-current { display: block; }
.side-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 7px 14px; border-top: 1px solid #3b323d; color: #b9a9bd; letter-spacing: -.025em; }
.side-footer button, .text-action { background: none; border: 0; color: #edb79d; font: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 5px; }
.empty-list { padding: 18px 10px; font-size: 13px; }
.empty-list p { color: var(--muted); margin: 5px 0; }
.empty-list .text-action { padding-left: 0; }
.detail { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: clamp(16px,2.15vw,36px); background: radial-gradient(ellipse at 100% 0%,#271d2a 0%,transparent 55%),var(--base); }
.detail > * { width: min(100%,1440px); margin-inline: auto; }
.detail:focus-visible { outline-offset: -3px; }
dialog { width: min(490px,calc(100% - 24px)); max-height: calc(100dvh - 36px); padding: clamp(18px,2.4vw,30px); background: #252029; border: 1px solid #776477; border-top: 3px solid var(--accent); color: var(--ink); overflow: auto; overscroll-behavior: contain; box-shadow: 0 20px 80px #070509a8; }
dialog::backdrop { background: #09070cc4; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-head h2 { font: italic 700 34px/1.05 var(--display); text-transform: uppercase; }
.close-button, .help-head button { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid #695969; border-radius: 3px; padding: 0; background: #302834; color: var(--ink); font: 21px/1 var(--sans); }
.help-head button:hover, .close-button:hover { border-color: #e9ac91; }
dialog p, .help-commands { font-size: 14px; line-height: 1.6; color: #d6cbd7; margin-top: 15px; }
dialog a { color: #ffc6a4; text-underline-offset: 3px; }
dialog code { color: #edc7e6; font: 600 .95em var(--mono); }
.help-commands { padding: 12px 15px; background: #322b36; }
.help-commands dt:not(:first-child) { margin-top: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; width: 166px; margin-top: 14px; }
.keypad span { background: #3e3243; border: 1px solid #6a546d; text-align: center; padding: 6px; font: 600 14px var(--mono); }
.roster-dialog { width: min(590px,calc(100% - 24px)); }
.roster-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.roster-fighter { display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; padding: 8px 3px; border: 1px solid #4e4052; background: #302935; border-radius: 2px; }
.roster-fighter:hover { background: #423342; border-color: #b187a7; }
.roster-fighter[aria-pressed="true"] { border-color: var(--accent); background: #4c302f; }
.roster-portrait { width: min(100%,68px); height: 37px; display: grid; place-items: center; }
.roster-portrait img { max-width: 100%; height: 100%; image-rendering: pixelated; }
.all-fighters-icon { font: italic 700 36px/.9 var(--display); color: #f0a17f; }
.roster-fighter strong { font: 700 18px/1.1 var(--display); }
.roster-fighter small { font: 10px/1.2 var(--mono); color: var(--muted); }
@media(max-width: 720px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .site-head { height: 54px; gap: 13px; padding-inline: 13px; }
  .site-head h1 { font-size: 17px; padding-inline-start: 12px; }
  .brand { font-size: 24px; gap: 6px; }
  .mark { gap: 2px; }
  .mark i { width: 4px; height: 21px; }
  .mark i:first-child { height: 16px; }
  .mark i:last-child { height: 25px; }
  #browse { display: inline-flex; background: #392b32; border-color: #6a494a; color: #ffd8be; }
  #close-browser { display: grid; }
  .site-head nav { gap: 2px; }
  .bar-button { min-width: 34px; padding: 0 7px; }
  .site-head .nav-label { display: none; }
  .bot-button { border-color: transparent; }
  .detail { padding: 12px; }
  .browser-dialog { position: fixed; inset: 0 auto 0 0; width: min(350px,calc(100% - 16px)); height: 100%; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; background: #1d1a20; }
  .browser-dialog .sidebar { height: 100%; }
  .filters { padding: 14px 14px 0; }
  .move-row { min-height: 48px; }
}
@media (max-width: 470px) {
  .site-head h1 { display: none; }
  .detail { padding: 10px; }
  .roster-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
  .roster-portrait { height: 30px; }
}
@media(max-height: 520px) {
  .filters { padding-top: 8px; }
  .side-heading { margin-bottom: 5px; }
  .searchbox, .move-filters { margin-top: 5px; }
  .move-subtabs { padding-block: 3px; }
  .fighter-picker { padding-block: 4px; }
  .side-footer { padding-block: 2px; }
}
@media(max-height: 370px) {
  .sidebar { overflow-y: auto; overscroll-behavior: contain; }
  .category-panel, .move-results { flex: none; }
  .move-list { flex: none; min-height: 48px; max-height: 55dvh; }
}
