/* Melee × LLM, dressed as Super Smash Bros. Melee's menus (2001): the bevelled frame with its title tab, gold menu items with
   a P knob, the black description box, the blue grid backdrop. Content (tables, docs, feeds) stays plain.
   Archivo (SIL OFL, vendor/fonts) stands in for Morisawa Folk, Melee's menu face; Barlow (SIL OFL) for body text.
   The shapes are CSS and our own SVG (img/menu-bg.svg, the --svg-* plates below); nothing is taken from the game. */
@font-face { font-family: "Archivo"; src: url(vendor/fonts/archivo-var-normal.woff2) format("woff2"); font-weight: 600 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(vendor/fonts/archivo-var-italic.woff2) format("woff2"); font-weight: 600 900; font-stretch: 75% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(vendor/fonts/barlow-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(vendor/fonts/barlow-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(vendor/fonts/barlow-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(vendor/fonts/barlow-600-normal.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #070926; --bg2: #0b1030;
  --panel: rgba(3, 4, 20, .74); --panel-hi: rgba(38, 50, 112, .25); --panel2: rgba(30, 40, 92, .55);
  --line: rgba(150, 175, 255, .14); --line-hi: rgba(170, 195, 255, .28); --sheen: rgba(255, 255, 255, .05);
  --text: #e8ebf7; --dim: #9198c0; --faint: #5f6798;
  --hi: #66e0ff; --hi-dim: rgba(102, 224, 255, .14);
  --p1: #ff4f61; --p2: #3f8cff; --p1-dim: rgba(255, 79, 97, .16); --p2-dim: rgba(63, 140, 255, .16);
  --ok: #45d39a; --warn: #f3bd4f; --bad: #ff5f78; --live: #ff3b55;
  --accent: var(--hi); /* kept for older class names */
  --gold: #f4c232; --gold-rim: #e6ad24; --ink: #140e00; --title: #c5c9d6; --title-ink: #151a3a;
  /* the frame tube, Main Menu blue */
  --f-dark: #0a0d33; --f-mid: #4656b4; --f-hi: #7181d4; --f-lite: #a9b4ee; --f-glow: rgba(80, 100, 230, .14); --f-in: rgba(110, 128, 225, .45);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --menu: "Archivo", Arial, system-ui, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --skew: -12deg;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --outline: 1.5px 0 var(--ink), -1.5px 0 var(--ink), 0 1.5px var(--ink), 0 -1.5px var(--ink),
    1.1px 1.1px var(--ink), -1.1px -1.1px var(--ink), 1.1px -1.1px var(--ink), -1.1px 1.1px var(--ink);
  --title-outline: 2px 0 var(--title-ink), -2px 0 var(--title-ink), 0 2px var(--title-ink), 0 -2px var(--title-ink),
    1.5px 1.5px var(--title-ink), -1.5px -1.5px var(--title-ink), 1.5px -1.5px var(--title-ink), -1.5px 1.5px var(--title-ink), 0 3px 8px rgba(0, 0, 0, .7);
  --svg-item: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%232c2510'/%3E%3Cstop offset='.5' stop-color='%230a0907'/%3E%3Cstop offset='1' stop-color='%231a1508'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M21 1H180a19 19 0 0 1 0 38H21L1 20Z' fill='%23e6ad24'/%3E%3Cpath d='M21.6 2.6H180a17.4 17.4 0 0 1 0 34.8H21.6L3.4 20Z' fill='none' stroke='%23ffd766' stroke-opacity='.55'/%3E%3Cpath d='M23.6 6.2H180a13.8 13.8 0 0 1 0 27.6H23.6L9.4 20Z' fill='%236a4c05'/%3E%3Cpath d='M24.4 7.6H180a12.4 12.4 0 0 1 0 24.8H24.4L11.4 20Z' fill='url%28%23f%29'/%3E%3Ccircle cx='182.5' cy='20' r='6.5' fill='none' stroke='%23e6ad24' stroke-width='3.6'/%3E%3Cpath d='M174.2 20V37' stroke='%23e6ad24' stroke-width='3.6'/%3E%3C/svg%3E");
  --svg-item-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff07a'/%3E%3Cstop offset='.45' stop-color='%23fad31a'/%3E%3Cstop offset='1' stop-color='%23e2a000'/%3E%3C/linearGradient%3E%3CradialGradient id='g'%3E%3Cstop offset='.35' stop-color='%23fffbd0'/%3E%3Cstop offset='1' stop-color='%23fff3a0' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M21 1H180a19 19 0 0 1 0 38H21L1 20Z' fill='%23fff4b0'/%3E%3Cpath d='M22.6 4H180a16 16 0 0 1 0 32H22.6L5 20Z' fill='url%28%23f%29'/%3E%3Ccircle cx='181' cy='20' r='18' fill='url%28%23g%29'/%3E%3Ccircle cx='181' cy='20' r='10' fill='%23fff3a0' stroke='%23c99600' stroke-width='2'/%3E%3Ccircle cx='181' cy='20' r='5' fill='%23fffce6' stroke='%23d9a600' stroke-width='1.5'/%3E%3C/svg%3E");
  --svg-plate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 32'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%232c2510'/%3E%3Cstop offset='.5' stop-color='%230a0907'/%3E%3Cstop offset='1' stop-color='%231a1508'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M13 1H104a15 15 0 0 1 0 30H13L1 16Z' fill='%23e6ad24'/%3E%3Cpath d='M14.4 4H104a12 12 0 0 1 0 24H14.4L5 16Z' fill='%236a4c05'/%3E%3Cpath d='M15 5.2H104a10.8 10.8 0 0 1 0 21.6H15L6.6 16Z' fill='url%28%23f%29'/%3E%3C/svg%3E");
  --svg-plate-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 32'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff07a'/%3E%3Cstop offset='.45' stop-color='%23fad31a'/%3E%3Cstop offset='1' stop-color='%23e2a000'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M13 1H104a15 15 0 0 1 0 30H13L1 16Z' fill='%23fff4b0'/%3E%3Cpath d='M15 5.2H104a10.8 10.8 0 0 1 0 21.6H15L6.6 16Z' fill='url%28%23f%29'/%3E%3C/svg%3E");
  --svg-plate-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 32'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%232c2510'/%3E%3Cstop offset='.5' stop-color='%230a0907'/%3E%3Cstop offset='1' stop-color='%231a1508'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M13 1H104a15 15 0 0 1 0 30H13L1 16Z' fill='%23e0505f'/%3E%3Cpath d='M14.4 4H104a12 12 0 0 1 0 24H14.4L5 16Z' fill='%235c1018'/%3E%3Cpath d='M15 5.2H104a10.8 10.8 0 0 1 0 21.6H15L6.6 16Z' fill='url%28%23f%29'/%3E%3C/svg%3E");
  --svg-plate-dim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 32'%3E%3Cdefs%3E%3ClinearGradient id='f' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%231d2036'/%3E%3Cstop offset='1' stop-color='%230b0c16'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M13 1H104a15 15 0 0 1 0 30H13L1 16Z' fill='%236a7090'/%3E%3Cpath d='M14.4 4H104a12 12 0 0 1 0 24H14.4L5 16Z' fill='%2323263a'/%3E%3Cpath d='M15 5.2H104a10.8 10.8 0 0 1 0 21.6H15L6.6 16Z' fill='url%28%23f%29'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
/* Archivo is variable: content set in --display gets a condensed cut (it replaced Barlow Condensed); the menu chrome
   sets its own width. Barlow is static and ignores this. */
body { margin: 0; min-height: 100vh; color: var(--text); font: 14.5px/1.45 var(--sans); font-variant-numeric: tabular-nums;
  font-variation-settings: "wdth" 80; }
/* the menu backdrop: a blue grid on the inside of a sphere, with light arcs. One fixed layer, painted once. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg) url(img/menu-bg.svg) center / cover no-repeat; }
::selection { background: rgba(244, 194, 50, .35); }
a { color: var(--hi); text-decoration: none; }
a:hover { color: #a5eeff; }
h1, h2, h3 { margin: 0 0 .6em; font-family: var(--menu); font-style: italic; font-weight: 800; line-height: 1.1; }
h1 { font-size: 30px; font-weight: 900; font-variation-settings: "wdth" 112; color: #eef0f8; text-shadow: var(--title-outline); }
h2 { font-size: 19px; font-variation-settings: "wdth" 110; color: var(--title); text-shadow: var(--title-outline); }
h3 { font: 700 12.5px var(--menu); font-variation-settings: "wdth" 85; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
p { margin: 0 0 .7em; }
pre, code { font-family: var(--mono); font-size: 12.5px; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.small-meta { font-size: 12px; color: var(--dim); }

/* ------------------------------------------------------------------ top bar: the emblem, the menu items, what's on air */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 58px;
  background: linear-gradient(180deg, rgba(4, 5, 22, .95), rgba(4, 5, 22, .78) 70%, rgba(4, 5, 22, 0)); }
.brand { display: inline-flex; align-items: center; color: var(--title); filter: drop-shadow(0 0 1px var(--title-ink)) drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.brand:hover { color: #fff; }
.brand .logo { width: 32px; height: 32px; }
.logo { width: 18px; height: 18px; flex: none; }
#nav { display: flex; align-items: center; gap: 1px; overflow-x: auto; scrollbar-width: none; padding: 6px 14px 6px 2px; }
#nav::-webkit-scrollbar { display: none; }
/* a Melee menu item: pointed left end, the P knob on the right (9-slice SVG plate) */
#nav a { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; height: 1.75em; padding: 0 .3em 0 .45em;
  border-style: solid; border-width: 0 1.75em 0 1.05em; border-image: var(--svg-item) 0 40 0 24 fill / 0 1.75em 0 1.05em stretch;
  color: var(--gold); text-shadow: var(--outline); white-space: nowrap; font: 850 clamp(12.5px, .98vw, 14.5px)/1 var(--menu); font-variation-settings: "wdth" 96;
  filter: drop-shadow(0 0 2px rgba(255, 185, 30, .4)); transition: transform .12s var(--ease); }
#nav a:hover { color: #ffe27a; transform: translateX(3px); }
#nav a.active { color: #111; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); border-image-source: var(--svg-item-on); transform: translateX(4px);
  filter: drop-shadow(0 0 6px rgba(255, 220, 60, .65)); }
/* the selected item's knob glows past the end of the button */
#nav a.active::after { content: ""; position: absolute; right: -1.55em; top: 50%; width: 1.9em; height: 1.9em; transform: translateY(-50%); border-radius: 50%;
  pointer-events: none; background: radial-gradient(circle, #fffce8 0 18%, #ffe97a 20% 34%, #e0a800 36% 40%, rgba(255, 236, 110, .75) 42% 52%, rgba(255, 230, 80, 0) 72%); }
.onair { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: #f2f2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 30vw; padding: 4px 13px 5px; background: #030303; border: 2px solid #c9ccd2; border-radius: 6px; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000;
  font: 600 14px/1.2 var(--menu); font-variation-settings: "wdth" 78; letter-spacing: .04em; }
.onair:hover { color: #fff; border-color: #fff; }
.onair .dim { color: #a7abbd; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 8px; flex: none;
  box-shadow: 0 0 8px var(--live); animation: pulse 1.6s infinite; }
.dot.off { background: var(--faint); box-shadow: none; animation: none; }
@keyframes pulse { 50% { opacity: .4; } }

/* ------------------------------------------------------------------ the frame: a thick bevelled tube, its top edge stepping up after the title */
.frame { --low: 34px; --sx: 260px; --r: 26px; position: relative; isolation: isolate; max-width: 1640px; margin: 22px auto 78px; width: calc(100% - 52px);
  padding: calc(var(--low) + 26px) 30px 32px; }
.frame::before, .frame::after { content: ""; position: absolute; z-index: -1; border-radius: var(--r); background: rgba(4, 6, 28, .6); pointer-events: none;
  box-shadow: 0 0 0 2px var(--f-dark), 0 0 0 3.5px var(--f-lite), 0 0 0 10px var(--f-mid), 0 0 0 11.5px var(--f-hi), 0 0 0 13px var(--f-dark),
    0 0 16px 13px var(--f-glow), inset 0 0 0 2px var(--f-dark), inset 0 0 40px rgba(50, 70, 220, .18);
  outline: 1.5px solid var(--f-in); outline-offset: -8px; }
/* ::before is the frame from the step rightwards and everything below the title; ::after the low top-left corner under the title */
.frame::before { inset: 0;
  clip-path: polygon(calc(var(--sx) + 46px) -50px, calc(100% + 50px) -50px, calc(100% + 50px) calc(100% + 50px), -50px calc(100% + 50px),
    -50px calc(var(--low) + 40px), calc(var(--sx) + 6px) calc(var(--low) + 40px)); }
.frame::after { inset: var(--low) 0 0 0;
  clip-path: polygon(-50px calc(-50px - var(--low)), calc(var(--sx) + 46px) calc(-50px - var(--low)), calc(var(--sx) + 6px) 40px, -50px 40px); }
.frame-stripes { position: absolute; left: calc(var(--sx) + 4px); top: -12px; width: 58px; height: calc(var(--low) + 12px); pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--f-lite) 0 2px, var(--f-mid) 2px 5px, transparent 5px 9px); transform: skewX(-42deg); transform-origin: 0 100%; }
.frame-title { position: absolute; left: 30px; top: calc(var(--low) - 38px); white-space: nowrap; pointer-events: none;
  font: italic 900 28px/1 var(--menu); font-variation-settings: "wdth" 125; color: var(--title); text-shadow: var(--title-outline); }
main { min-width: 0; }
main > * { animation: enter .3s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateX(-8px); } }

/* ------------------------------------------------------------------ the description box under every menu */
.descbar { position: fixed; left: 0; right: 0; bottom: 16px; z-index: 15; display: flex; justify-content: center; pointer-events: none; padding: 0 20px; }
.desc { min-width: min(46%, 640px); max-width: 920px; padding: 6px 20px 7px; text-align: center; color: #f2f2f2; background: #030303;
  border: 2px solid #c9ccd2; border-radius: 7px; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 0 4px 18px rgba(0, 0, 0, .6);
  font: 600 17px/1.25 var(--menu); font-variation-settings: "wdth" 78; letter-spacing: .05em; text-shadow: 0 1px 0 #000; }
.desc:empty { display: none; }

/* ------------------------------------------------------------------ loading, empty, errors */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--dim); padding: 80px 20px;
  font: italic 800 16px var(--menu); font-variation-settings: "wdth" 110; letter-spacing: .04em; }
.loading::before { content: ""; width: 120px; height: 4px; transform: skewX(var(--skew));
  background: linear-gradient(90deg, transparent, var(--gold), transparent) 0 0 / 50% 100% no-repeat, rgba(244, 194, 50, .12);
  animation: sweep 1.1s linear infinite; }
@keyframes sweep { from { background-position: -100% 0, 0 0; } to { background-position: 200% 0, 0 0; } }
.empty-state { text-align: center; color: var(--dim); padding: 36px 16px; }
.empty-state b { display: block; margin-bottom: 4px; color: var(--title); font: italic 800 18px var(--menu); font-variation-settings: "wdth" 110; text-shadow: var(--title-outline); }
.error-box { background: rgba(80, 16, 36, .55); border: 1px solid rgba(255, 95, 120, .35); color: #ffc7d1; padding: 14px 16px; border-radius: var(--radius); }
.warn-box { background: rgba(80, 60, 16, .45); border: 1px solid rgba(243, 189, 79, .3); color: #ffe4ab; padding: 10px 14px; border-radius: var(--radius); }

/* ------------------------------------------------------------------ panels inside the frame */
.card { position: relative; background: var(--panel); border: 1px solid rgba(130, 150, 255, .22); border-radius: 8px; padding: 18px 20px;
  box-shadow: inset 0 1px 0 var(--sheen); }
.card h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h2 .dim, .card h3 .dim { font: 400 12.5px var(--sans); text-transform: none; letter-spacing: 0; text-shadow: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack > * + * { margin-top: 18px; }
.pagehead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead h1 { margin: 0; }
.pagehead .dim { font-size: 13.5px; }
.pagehead .lede { flex: 1 0 100%; color: var(--dim); font-size: 13.5px; margin-top: -8px; }
.back { font: italic 800 14px var(--menu); font-variation-settings: "wdth" 105; color: var(--dim); }
.back:hover { color: var(--gold); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }

/* ------------------------------------------------------------------ badges, chips, ports */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 3px; font: 700 11.5px/1.5 var(--display);
  font-variation-settings: "wdth" 75; letter-spacing: .03em; max-width: 100%; overflow: hidden; text-transform: uppercase; background: rgba(140, 160, 230, .1); color: var(--dim);
  border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(69, 211, 154, .3); background: rgba(69, 211, 154, .08); }
.badge.warn { color: var(--warn); border-color: rgba(243, 189, 79, .3); background: rgba(243, 189, 79, .08); }
.badge.bad { color: var(--bad); border-color: rgba(255, 95, 120, .32); background: rgba(255, 95, 120, .08); }
.badge.live { color: #fff; border-color: rgba(255, 59, 85, .6); background: rgba(255, 59, 85, .22); }
.badge.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); }
.badge.muted { opacity: .6; }
.badge.hi { color: var(--hi); border-color: rgba(102, 224, 255, .35); background: var(--hi-dim); }
.badge.p1 { color: var(--p1); border-color: rgba(255, 79, 97, .3); } .badge.p2 { color: var(--p2); border-color: rgba(63, 140, 255, .35); }
.port { display: inline-block; font: italic 800 12px/1.35 var(--display); padding: 0 6px 0 5px; color: #fff; letter-spacing: .03em;
  transform: skewX(var(--skew)); border-radius: 2px; vertical-align: 1px; }
.port.p1 { background: var(--p1); } .port.p2 { background: var(--p2); }
.player { white-space: nowrap; }
.win { color: var(--text); font-weight: 600; }
.win::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 6px var(--gold); vertical-align: 2px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 3px;
  background: rgba(102, 224, 255, .1); color: #c9f4ff; border: 1px solid rgba(102, 224, 255, .22); white-space: nowrap; }

/* ------------------------------------------------------------------ buttons: Melee rule plates (pointed left, round right), forms */
button, .btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 2.2em; padding: 0 .35em 0 .45em;
  border-style: solid; border-width: 0 .95em 0 .85em; border-image: var(--svg-plate) 0 20 0 15 fill / 0 .95em 0 .85em stretch; background: none;
  color: var(--gold); text-shadow: var(--outline); font: 800 14.5px/1 var(--menu); font-variation-settings: "wdth" 100; white-space: nowrap; cursor: pointer;
  filter: drop-shadow(0 0 2px rgba(255, 185, 30, .3)); transition: transform .12s var(--ease), filter .12s; }
button:hover:not(:disabled), .btn:hover { transform: translateX(2px); color: #ffe27a; filter: drop-shadow(0 0 4px rgba(255, 200, 50, .55)); }
button:active:not(:disabled) { transform: translate(2px, 1px); }
button.primary, button.on { color: #111; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); border-image-source: var(--svg-plate-on);
  filter: drop-shadow(0 0 5px rgba(255, 220, 60, .5)); }
button.primary:hover:not(:disabled), button.on:hover:not(:disabled) { color: #111; }
button.big { font-size: 19px; padding: 0 1.2em; }
button.danger { color: #ff9cab; border-image-source: var(--svg-plate-red); filter: drop-shadow(0 0 2px rgba(255, 80, 95, .35)); }
button.danger:hover:not(:disabled) { color: #ffc2cb; filter: drop-shadow(0 0 4px rgba(255, 80, 95, .55)); }
button.small { font-size: 12.5px; }
button.ghost { border-image-source: var(--svg-plate-dim); color: var(--dim); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--text); background: rgba(3, 4, 18, .8); border: 1px solid var(--line-hi); border-radius: 4px;
  padding: 8px 10px; min-width: 0; transition: border-color .15s; }
select { appearance: none; padding-right: 28px; cursor: pointer;
  background: rgba(3, 4, 18, .8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f4c232'/%3E%3C/svg%3E") no-repeat right 10px center; }
select option { background: #0e1440; }
input:hover, select:hover { border-color: rgba(244, 194, 50, .45); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(244, 194, 50, .14); }
/* checkboxes: a small gold-rimmed box, yellow when on, like Melee's rule switches */
input[type=checkbox] { appearance: none; flex: none; width: 17px; height: 17px; margin: 0; padding: 0; cursor: pointer; border: 2px solid var(--gold-rim); border-radius: 3px;
  background: linear-gradient(#2c2510, #0a0907); box-shadow: inset 0 0 0 1px #6a4c05, 0 0 3px rgba(255, 185, 30, .35); }
input[type=checkbox]:checked { border-color: #fff4b0; box-shadow: 0 0 6px rgba(255, 220, 60, .55);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23111' stroke-width='2.6'/%3E%3C/svg%3E") center / 13px no-repeat,
    linear-gradient(#fff07a, #fad31a 45%, #e2a000); }
input[type=checkbox]:focus { box-shadow: 0 0 0 3px rgba(244, 194, 50, .25); }
label.field { display: flex; flex-direction: column; gap: 6px; font: 700 12px var(--menu); font-variation-settings: "wdth" 85; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
label.field > * { color: var(--text); font: 14.5px var(--sans); letter-spacing: 0; text-transform: none; }
label.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--gold); text-shadow: var(--outline);
  font: 800 14px var(--menu); font-variation-settings: "wdth" 95; }
label.check:hover { color: #ffe27a; }
/* a toggle is a row of plates, the chosen one lit */
.toggle { display: inline-flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; }
.toggle button { font-size: 12.5px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font: 700 12px var(--menu); font-variation-settings: "wdth" 85; color: #8890bd; text-transform: uppercase; letter-spacing: .1em;
  padding: 8px 10px; border-bottom: 1px solid rgba(150, 170, 255, .16); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid rgba(150, 175, 255, .07); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(102, 140, 255, .06); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td:first-child { box-shadow: inset 2px 0 0 var(--hi); }
td b { white-space: nowrap; }
td.empty { color: var(--dim); text-align: center; padding: 32px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.when { color: var(--dim); white-space: nowrap; }

/* ------------------------------------------------------------------ stocks */
.stocks { display: inline-flex; gap: 4px; vertical-align: middle; }
.stock { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c), inset 0 1px 1px rgba(255, 255, 255, .5); }
.stock.lost { background: transparent; box-shadow: none; border: 1.5px solid rgba(150, 175, 255, .25); }

/* ------------------------------------------------------------------ live: broadcast */
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.live-main { min-width: 0; }
.scorebug { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; margin-bottom: 12px; min-height: 76px; padding: 0 10px; }
.sb-side { position: relative; isolation: isolate; display: flex; align-items: center; gap: 16px; padding: 10px 26px; min-width: 0; }
.sb-side::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(var(--skew)); border-radius: 3px;
  background: linear-gradient(180deg, rgba(40, 52, 120, .85), rgba(14, 19, 52, .92)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.sb-side::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5px; transform: skewX(var(--skew)); background: var(--c); box-shadow: 0 0 14px var(--c); }
.sb-side.p1 { --c: var(--p1); } .sb-side.p2 { --c: var(--p2); flex-direction: row-reverse; text-align: right; }
.sb-side.p1::after { left: 0; } .sb-side.p2::after { right: 0; }
.sb-who { min-width: 0; flex: 1; }
.sb-name { font: italic 700 24px/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sub { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sub .elo { color: var(--faint); }
.sb-score { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sb-pct { font: italic 700 44px/.9 var(--display); color: #fff; text-shadow: 0 0 18px var(--c); min-width: 2.4ch; text-align: center; }
.sb-pct small { font-size: .5em; margin-left: 1px; }
.sb-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 22px; text-align: center; min-width: 150px; }
.sb-game { font: italic 700 20px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.sb-game .of { color: var(--faint); }
.sb-stage { font-size: 12.5px; color: var(--dim); margin-top: 4px; white-space: nowrap; }
.sb-phase { font: 500 11.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 2px; white-space: nowrap; }
.sb-idle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sb-idle b { font: italic 700 22px var(--display); text-transform: uppercase; letter-spacing: .04em; }
/* Live player: the stream is the bare game at 73:60 (runner.LIVE_WINDOW). Width follows the viewport height so the frame
   never letterboxes, and it stays centred in its column. */
.video-wrap { position: relative; width: min(100%, calc((100vh - 330px) * 73 / 60)); aspect-ratio: 73 / 60; margin: 0 auto;
  background: #000; border-radius: var(--radius); overflow: hidden; outline: none; cursor: pointer;
  border: 1px solid var(--line); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 20px 50px rgba(0, 0, 10, .5), 0 0 60px rgba(70, 100, 255, .08); }
.video-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; }
.video-wrap:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.video-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); pointer-events: none;
  font: italic 600 15px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.video-msg:empty { display: none; }
.video-wrap.loading::after { content: "Loading Dolphin…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #10173f, #000 75%); color: var(--dim); pointer-events: none;
  font: italic 600 15px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(4, 6, 20, .85)); font-size: 12.5px; color: var(--dim); cursor: default;
  opacity: 0; transform: translateY(4px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.video-wrap.active .vp-bar, .video-wrap.paused .vp-bar, .video-wrap:focus-visible .vp-bar, .vp-bar:hover { opacity: 1; transform: none; }
.video-wrap:not(.active):not(.paused) { cursor: none; }
.vp-bar .lag { font-variant-numeric: tabular-nums; }
.vp-btn, .vp-live, .tile { border: 0; border-image: none; filter: none; text-shadow: none; }
.vp-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.vp-btn:hover:not(:disabled) { transform: none; filter: none; background: rgba(255, 255, 255, .1); }
.vp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.vp-btn.on { color: var(--gold); }
.vp-live { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text);
  background: rgba(255, 59, 85, .16); border: 1px solid rgba(255, 59, 85, .5); border-radius: 3px; }
.vp-live:hover:not(:disabled) { color: #fff; filter: none; transform: none; }
.vp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.vp-live.behind { color: var(--dim); }
.vp-live.behind { background: transparent; border-color: var(--line-hi); }
.vp-live.behind .vp-dot { background: var(--faint); box-shadow: none; }
.video-bar { display: flex; gap: 14px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--dim); flex-wrap: wrap; }
.video-bar .lag { font-variant-numeric: tabular-nums; }
.queue-strip { margin-top: 18px; }
.queue-strip h3 { margin-bottom: 8px; }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(150, 175, 255, .07); font-size: 13.5px; flex-wrap: wrap; }
.queue-item:first-of-type { border-top: 0; }

/* the decision feed */
.panel { display: flex; flex-direction: column; height: calc(100vh - 216px); position: sticky; top: 72px; padding: 0; overflow: hidden; }
.panel-head { flex: none; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head.stacked { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; }
.panel-sub { flex-basis: 100%; font-size: 11.5px; color: var(--faint); min-height: 1em; }
.panel-body { overflow-y: auto; padding: 8px; flex: 1; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(150, 175, 255, .2) transparent; }
.panel-empty { color: var(--dim); text-align: center; padding: 40px 16px; font-size: 13.5px; }
.feed { display: flex; flex-direction: column-reverse; gap: 2px; }
.steer-box { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 8px; }
.steer-box:empty { display: none; }

.ev { position: relative; padding: 8px 10px 8px 12px; border-radius: 4px; font-size: 13px; border: 1px solid transparent; animation: fadein .3s var(--ease);
  transition: background .15s, border-color .15s; }
.ev::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--c, var(--faint)); opacity: .8; }
.ev.p1 { --c: var(--p1); } .ev.p2 { --c: var(--p2); }
.ev:hover { background: rgba(102, 140, 255, .06); }
.ev.open { background: rgba(10, 14, 44, .7); border-color: var(--line); }
.ev.ahead { opacity: .5; }
.ev.cm-event { --c: var(--hi); padding: 4px 10px 4px 12px; color: var(--dim); font-size: 12.5px; }
.ev.cm-event::before { top: 6px; bottom: 6px; }
.ev.cm-line { --c: var(--live); display: flex; gap: 9px; align-items: baseline; color: var(--text); font-size: 14px; line-height: 1.4;
  background: linear-gradient(90deg, rgba(255, 59, 85, .1), transparent 70%); }
.cm-tag { flex: none; font: italic 600 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--live); }
.ev.cm-line.cm-b { --c: var(--p2); }
.ev.cm-line.cm-b .cm-tag { color: var(--p2); }
.ev.err .ev-action { color: var(--bad); }
.ev-head { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ev-call { font: italic 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--c, var(--dim)); white-space: nowrap; flex: none; }
.ev-action { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 3px; color: #e9f9ff;
  background: rgba(102, 224, 255, .1); border: 1px solid rgba(102, 224, 255, .2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ev-action.kept { color: var(--dim); background: transparent; border-style: dashed; }
.ev-action.dropped { color: var(--faint); background: transparent; text-decoration: line-through; }
.ev-meta { margin-left: auto; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.ev-reason { color: #c3cae6; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.open .ev-reason { white-space: normal; }
.ev-more { display: none; margin-top: 8px; font-size: 12px; color: var(--dim); cursor: auto; }
.ev.open .ev-more { display: block; }
.ev-more > * + * { margin-top: 6px; }
.ev-more pre { background: rgba(3, 5, 20, .8); border: 1px solid rgba(150, 175, 255, .08); border-radius: 4px; padding: 9px 10px; color: #b9c2e0;
  max-height: 320px; overflow: auto; font-size: 11.5px; }
.ev-more .k { color: var(--faint); font: 500 11px var(--display); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.ev .error { color: var(--bad); font-size: 12px; margin-top: 3px; }
.ev.sys { font-size: 12.5px; color: var(--dim); padding: 10px 12px; cursor: default; }
.ev.sys::before { display: none; }
.ev.sys b { color: var(--text); font: italic 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }
.ev.sys.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.ev.sys.divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.ev.sys.err { color: var(--bad); }
.ev.clickable { cursor: pointer; }
.onscreen-tag { display: none; font: 500 10.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--hi); white-space: nowrap; flex: none; }
.onscreen-tag::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 6px var(--hi);
  margin-right: 5px; vertical-align: 1px; }
.ev.onscreen .onscreen-tag, .ev.current .onscreen-tag { display: inline-block; }
.ev.onscreen .ev-meta, .ev.current .ev-meta { display: none; }
.ev.onscreen, .ev.current { background: rgba(102, 224, 255, .06); border-color: rgba(102, 224, 255, .18); }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.steer { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 4px; }
.steer span { color: var(--faint); } .steer b { font-family: var(--mono); font-weight: 500; color: var(--text); margin-left: 5px; }
.steer-card { padding: 8px 12px; border-radius: 4px; background: rgba(10, 14, 44, .6); border: 1px solid var(--line); }
.steer-card .ev-head { gap: 10px; }

/* ------------------------------------------------------------------ launcher: character cards */
.launch-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: stretch; }
.vs-mark { align-self: center; font: italic 700 30px var(--display); color: var(--faint); letter-spacing: .04em; }
.pcard { --c: var(--p1); overflow: hidden; padding: 0; }
.pcard.p2 { --c: var(--p2); }
.pcard::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px 180px at 0% 0%, var(--cdim), transparent 70%); }
.pcard.p1 { --cdim: var(--p1-dim); } .pcard.p2 { --cdim: var(--p2-dim); }
.pc-head { position: relative; display: flex; align-items: flex-end; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.pc-head::after { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent 85%); }
.pc-port { font: italic 700 44px/.8 var(--display); color: var(--c); text-shadow: 0 0 22px var(--c); }
.pc-title { min-width: 0; }
.pc-char { font: italic 700 30px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-kind { font-size: 13px; color: var(--dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-body { position: relative; padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.pcard .fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pcard .fields select, .pcard .fields input { width: 100%; }
.pcard .fields .wide { grid-column: 1 / -1; }
.spec-preview { font-family: var(--mono); font-size: 11.5px; color: var(--faint); word-break: break-all; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 5px; }
.tile { position: relative; isolation: isolate; padding: 7px 9px; font: italic 600 14px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: var(--dim); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 3px;
  background: rgba(10, 14, 44, .55); border: 1px solid rgba(150, 175, 255, .1); transition: color .12s, border-color .12s, background .12s, transform .12s var(--ease); }
.tile { font-variation-settings: "wdth" 75; }
.tile:hover:not(.off) { color: var(--text); filter: none; border-color: var(--line-hi); transform: translateY(-1px); }
.tile.on { color: #fff; border-color: var(--c, var(--hi)); background: linear-gradient(180deg, var(--cdim, var(--hi-dim)), rgba(10, 14, 44, .55));
  box-shadow: inset 0 0 0 1px var(--c, var(--hi)), 0 0 14px var(--cdim, var(--hi-dim)); }
.tile.off { opacity: .28; cursor: not-allowed; }
.stage-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); --c: var(--hi); --cdim: var(--hi-dim); }
.stage-tiles .tile { padding: 12px 12px; font-size: 16px; }
.match-card { margin-top: 18px; }
.match-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.match-grid h3 { margin-bottom: 8px; }
.modes { display: flex; flex-direction: column; gap: 5px; }
.mode { position: relative; padding: 9px 12px 9px 14px; cursor: pointer; border-radius: 3px; background: rgba(10, 14, 44, .55); border: 1px solid rgba(150, 175, 255, .1);
  transition: border-color .12s, background .12s; }
.mode:hover { border-color: var(--line-hi); }
.mode.on { border-color: var(--hi); background: linear-gradient(90deg, var(--hi-dim), rgba(10, 14, 44, .55)); }
.mode b { display: block; font: italic 600 16px var(--display); letter-spacing: .05em; text-transform: uppercase; }
.mode span { font-size: 12.5px; color: var(--dim); }
.launch-foot { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.launch-foot .msgs { flex-basis: 100%; order: 9; }
.launch-foot input[type=number] { width: 80px; }
.msgs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.msgs:empty { display: none; }
.msgs .e { color: var(--bad); } .msgs .w { color: var(--warn); }

/* ------------------------------------------------------------------ game page */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.replay-frame { width: 100%; height: calc(100vh - 290px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 10, .5); }
.matchup { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font: italic 700 32px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.matchup .side { display: inline-flex; align-items: baseline; gap: 10px; }
.matchup .char { font-size: .6em; color: var(--dim); font-weight: 600; }
.matchup .vs { font-size: .55em; color: var(--faint); }
.matchup .won { text-shadow: 0 0 18px var(--c); }
.matchup .side.p1 { --c: var(--p1); } .matchup .side.p2 { --c: var(--p2); }
.meta-row { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.meta-row a { font-size: 13px; }
.timeline-bar { flex: none; position: relative; height: 24px; background: rgba(3, 5, 20, .8); border-radius: 3px; margin: 2px 0; border: 1px solid var(--line); cursor: pointer; }
.timeline-bar .tick { position: absolute; top: 5px; bottom: 5px; width: 1px; background: var(--c); opacity: .55; }
.timeline-bar .tick.changed { width: 2px; opacity: .95; }
.timeline-bar .cursor { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--hi); box-shadow: 0 0 8px var(--hi); }

/* ------------------------------------------------------------------ leaderboard, heat, bars */
.board td { padding-top: 11px; padding-bottom: 11px; }
.rank { font: italic 700 22px/1 var(--display); color: var(--faint); width: 1%; }
.rank.first { color: var(--gold); text-shadow: var(--outline); }
.board .name { font: 600 16px var(--sans); color: var(--text); }
.board a:hover .name { color: var(--gold); }
.board .elo { font: italic 700 20px var(--display); }
/* ------------------------------------------------------------------ bench */
.bench-progress .row { gap: 14px; }
.budget { flex: 0 1 220px; height: 6px; border-radius: 3px; background: rgba(5, 8, 28, .7); border: 1px solid var(--line); overflow: hidden; }
.budget .bar { height: 100%; border-radius: 0; }
.bench-filters { gap: 10px; }
.bench-filters .toggle { flex-wrap: wrap; }
.bench-board .name { font-size: 15.5px; }
.bench-who { min-width: 260px; }
.bench-who .badge { margin-left: 4px; vertical-align: 2px; }
.bench-about { font-size: 12.5px; color: var(--dim); margin-top: 2px; max-width: 560px; }
.ci-cell { width: 24%; min-width: 140px; }
.ci { position: relative; height: 14px; }
.ci::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: rgba(150, 175, 255, .1); }
.ci-range { position: absolute; top: 3px; height: 8px; border-radius: 2px; background: rgba(150, 175, 255, .16); border: 1px solid rgba(150, 175, 255, .28); }
.ci-range.ok { background: var(--hi-dim); border-color: rgba(102, 224, 255, .5); }
.ci-dot { position: absolute; top: 1px; width: 4px; height: 12px; margin-left: -2px; background: var(--text); transform: skewX(var(--skew)); box-shadow: 0 0 6px rgba(255, 255, 255, .4); }
.bench-samples { display: flex; flex-direction: column; gap: 6px; }
.bench-samples .ev { cursor: default; }
.bench-samples pre { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.bench-explain { font-size: 14px; max-width: 900px; margin-top: 10px; }
.heat { display: inline-block; min-width: 42px; text-align: center; padding: 2px 6px; border-radius: 3px; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.bar { height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(102, 224, 255, .25), var(--hi)); box-shadow: 0 0 8px rgba(102, 224, 255, .3); }
.bar-cell { width: 26%; min-width: 80px; }
.code { background: rgba(3, 5, 20, .8); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; overflow: auto; max-height: 75vh; counter-reset: line;
  font-size: 12px; line-height: 1.55; }
.code.lines { padding: 12px 0; }
.code span.ln { display: block; padding-right: 12px; }
.code span.ln:hover { background: rgba(102, 140, 255, .06); }
.code span.ln::before { counter-increment: line; content: counter(line); display: inline-block; width: 3.4em; color: #3d4573; text-align: right; margin-right: 1.2em; user-select: none; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters input[type=search] { min-width: 240px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--faint); font: 500 12.5px/1.6 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.kv dd { margin: 0; word-break: break-word; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.stat b { display: block; font: italic 700 26px/1 var(--display); }
.stat span { font: 500 11.5px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.file-list { list-style: none; padding: 0; margin: 0 0 14px; font-family: var(--mono); font-size: 12px; color: var(--dim); columns: 2; }
.file-list li { padding: 1px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-box { background: rgba(3, 5, 20, .7); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; color: var(--dim); max-height: 300px; overflow: auto; font-size: 12px; }
details > summary { cursor: pointer; color: var(--dim); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; transition: .3s var(--ease); z-index: 50;
  background: linear-gradient(180deg, #24307a, #141b4e); border: 1px solid var(--line-hi); padding: 10px 20px; border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 10, .6), inset 0 1px 0 rgba(255, 255, 255, .1); font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(102, 224, 255, .6); } .toast.bad { border-color: rgba(255, 95, 120, .6); }

/* ------------------------------------------------------------------ all matches */
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; }
.mc { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s, transform .2s var(--ease); }
.mc:hover { border-color: var(--line-hi); }
.mc-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mc-meta { color: var(--dim); font-size: 12.5px; margin-top: 4px; }
.mc-stage { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 30%, #121a4a, #070a22); border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line); }
.mc-canvas, .mc-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mc-video { background: #000; object-fit: contain; }
.mc-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: var(--dim);
  background: rgba(6, 8, 25, .6); pointer-events: none; font: italic 600 15px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.mc-overlay.on { display: flex; }
.mc-players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-player { min-width: 0; }
.mc-player.p2 { text-align: right; }
.mc-player.p2 .mc-score { flex-direction: row-reverse; }
.mc-name { font: italic 600 15px var(--display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-name .dim { font-weight: 500; }
.mc-score { display: flex; align-items: center; gap: 8px; }
.mc-pct { font: italic 700 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.mc-players.big .mc-pct { font-size: 44px; }
.mc-players.big .mc-name { font-size: 20px; }
.mc-decision { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-decision b.mono { font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 3px; background: rgba(102, 224, 255, .1); border: 1px solid rgba(102, 224, 255, .2); }
.mc-links { display: flex; gap: 14px; font-size: 13px; flex-wrap: wrap; }
.badge.speed { color: #2a1c00; background: var(--warn); border-color: var(--warn); }
.mc-focus { max-width: 1100px; margin: 0 auto; }
.mc-focus .mc-stage { aspect-ratio: 16 / 10; }
.mc-done-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.mc-done { padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.mc-done.bad { border-color: rgba(255, 95, 120, .3); }
.mc-done-players { font: italic 600 15px var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ docs */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; max-width: 1220px; margin: 0 auto; }
.doc-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin;
  padding-right: 6px; font-size: 13.5px; }
.doc-side-label { font: 500 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 12px; }
.doc-list, .doc-toc { display: flex; flex-direction: column; gap: 1px; }
.doc-list { margin-bottom: 26px; }
.doc-list a, .doc-toc a { display: block; padding: 5px 12px; color: var(--dim); border-left: 2px solid transparent; line-height: 1.3;
  transition: color .15s, border-color .15s, background .15s; }
.doc-list a:hover, .doc-toc a:hover { color: var(--text); }
.doc-list a.on { color: var(--text); font-weight: 500; border-left-color: var(--hi); background: linear-gradient(90deg, var(--hi-dim), transparent); }
.doc-toc a.l3 { padding-left: 24px; font-size: 12.5px; }
.doc-toc a.on { color: var(--hi); border-left-color: var(--hi); }
.doc-main { min-width: 0; max-width: 820px; }
.doc-search-wrap { position: relative; margin: 0 0 22px; }
.doc-search { width: 100%; padding: 8px 30px 8px 12px; font-size: 13.5px; }
.doc-search-wrap kbd { position: absolute; right: 9px; top: 8px; font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line);
  border-radius: 3px; padding: 0 5px; pointer-events: none; }
.doc-search:focus + kbd, .doc-search:not(:placeholder-shown) + kbd { display: none; }
.doc-toc[hidden] { display: none; }
.doc-results:not(:empty) { margin-top: 14px; }
.doc-results .doc-side-label { margin-left: 2px; }
.doc-hit { display: block; padding: 8px 10px; border-radius: 4px; border: 1px solid transparent; color: var(--dim); }
.doc-hit:hover { background: var(--hi-dim); border-color: rgba(102, 224, 255, .25); color: var(--dim); }
.doc-hit-head { color: var(--text); font-weight: 500; font-size: 13px; line-height: 1.3; }
.doc-hit-head span { display: block; color: var(--faint); font: 400 11.5px var(--sans); margin-top: 1px; }
.doc-hit-snip { font-size: 12px; line-height: 1.45; margin-top: 4px; }
mark { background: rgba(243, 189, 79, .28); color: inherit; border-radius: 2px; padding: 0 1px; }
.doc-anchor { margin-left: 10px; color: var(--faint) !important; border: 0 !important; font-style: normal; opacity: 0; transition: opacity .15s, color .15s; }
.prose h2:hover .doc-anchor, .prose h3:hover .doc-anchor, .doc-anchor:focus-visible { opacity: 1; }
.doc-anchor:hover { color: var(--hi) !important; }
.doc-anchor[data-copied]::after { content: "copied"; margin-left: 8px; font: 500 11px var(--sans); letter-spacing: .08em; color: var(--ok); }
.doc-hero { position: relative; padding: 8px 0 26px; margin-bottom: 30px; }
.doc-hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, rgba(102, 224, 255, .5), rgba(140, 120, 255, .3) 40%, transparent); }
.doc-kicker { font: 500 12.5px var(--mono); color: var(--hi); margin-bottom: 10px; }
.doc-hero h1 { font-size: 48px; margin: 0 0 14px; text-shadow: 0 0 30px rgba(102, 224, 255, .18); }
.doc-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }
.doc-meta span + span::before { content: "/"; margin-right: 18px; color: var(--line-hi); }

.prose { font-size: 15.5px; line-height: 1.68; color: #d5daf0; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose p.lede { font-size: 17.5px; line-height: 1.6; color: var(--text); }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 76px; color: var(--text); }
.prose h2 { position: relative; font-size: 30px; margin: 2.2em 0 .7em; padding-left: 20px; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 6px; transform: skewX(var(--skew));
  background: linear-gradient(180deg, var(--hi), #7b6cff); box-shadow: 0 0 14px rgba(102, 224, 255, .45); border-radius: 1px; }
.prose h3 { font-size: 21px; color: var(--text); letter-spacing: .04em; margin: 1.9em 0 .5em; }
.prose h3::after { content: ""; display: block; width: 36px; height: 2px; margin-top: 8px; background: var(--p1); transform: skewX(var(--skew)); }
.prose h4 { font: 600 15px var(--sans); margin: 1.4em 0 .3em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--hi); border-bottom: 1px solid rgba(102, 224, 255, .25); transition: border-color .15s; }
.prose a:hover { border-bottom-color: var(--hi); }
.prose code { font-size: .86em; padding: 1px 5px; border-radius: 3px; background: rgba(102, 140, 255, .12); color: #c9f4ff; }
.prose pre { padding: 14px 16px; border-radius: var(--radius); background: rgba(5, 8, 28, .75); border: 1px solid var(--line); overflow-x: auto; white-space: pre; }
.prose pre code { padding: 0; background: none; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li, .prose li > ul, .prose li > ol { margin-top: .35em; }
.prose ul > li::marker { color: var(--hi); }
.prose ol > li::marker { color: var(--hi); font: italic 600 1em var(--display); }
.prose blockquote { margin-left: 0; padding: 4px 16px; border-left: 3px solid var(--line-hi); color: var(--dim); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose .badge { font-size: 11px; vertical-align: 1px; }
.doc-table { margin: 1.2em -6px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 14, 44, .45); }
.doc-table table { font-size: 14px; line-height: 1.5; }
.doc-table td { vertical-align: top; }
.doc-table td:first-child { color: var(--text); font-weight: 500; }
.doc-table.dated td:first-child { white-space: nowrap; }

.prose ol.timeline { list-style: none; padding: 6px 0 6px 0; margin: 1.4em 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 91px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--line-hi) 4%, var(--line-hi) 96%, transparent); }
.timeline li { display: grid; grid-template-columns: 76px 1fr; gap: 32px; position: relative; margin: 0; padding: 7px 0; }
.timeline li::before { content: ""; position: absolute; left: 86px; top: 16px; width: 12px; height: 12px; transform: skewX(var(--skew));
  background: var(--bg2); border: 2px solid var(--hi); box-shadow: 0 0 10px rgba(102, 224, 255, .5); }
.timeline li:nth-child(even)::before { border-color: var(--p1); box-shadow: 0 0 10px rgba(255, 79, 97, .5); }
.tl-year { text-align: right; font: italic 700 17px/1.9 var(--display); color: var(--dim); letter-spacing: .03em; white-space: nowrap; }
.tl-body { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  transition: border-color .15s, transform .15s var(--ease); }
.tl-body:hover { border-color: var(--line-hi); transform: translateX(3px); }
.tl-name { font: italic 700 19px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.tl-name a { color: var(--text); border: 0; }
.tl-name a:hover { color: var(--hi); }
.tl-name a::after { content: " →"; color: var(--hi); font-style: normal; font-size: .8em; }
.tl-who { font-size: 13px; color: var(--hi); margin-top: 2px; }
.tl-tech { font-size: 14px; color: var(--dim); margin-top: 4px; line-height: 1.45; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 1.2em 0; }
.person { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; line-height: 1.5;
  background: linear-gradient(180deg, var(--panel-hi), rgba(17, 23, 58, 0) 70px), var(--panel); }
.person-name { font: italic 700 18px/1.15 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--text); }
.person-handle { font: 500 12px var(--mono); color: var(--hi); margin: 3px 0 0; }
.person-what { color: var(--dim); margin-top: 8px; }

/* ------------------------------------------------------------------ Brute: the perfect-play explainer and its frame player (brute/player.js) */
.brute { max-width: 860px; margin: 0 auto; }
.brute .doc-hero { margin-bottom: 22px; }
.brute .prose > * + * { margin-top: 1em; }
.brute .prose h2 { margin-top: 1.9em; }
.brute .prose .badge { margin-right: 6px; }
.brute .prose > .brute-step { font: 500 12.5px var(--mono); color: var(--hi); margin: 2.6em 0 -1.6em; }
.brute-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.brute-kinds > div { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 14, 44, .45); padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.brute-kinds b { display: block; margin-bottom: 4px; font: italic 800 17px var(--menu); font-variation-settings: "wdth" 108; }
.brute-kinds .k1 b { color: var(--bad); } .brute-kinds .km b { color: var(--warn); } .brute-kinds .k0 b { color: var(--ok); }
.brute-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 10px 14px !important; border: 1px solid var(--line);
  border-radius: var(--radius); background: rgba(10, 14, 44, .45); font-size: 13.5px; color: var(--dim); }
.brute-legend li { display: flex; align-items: center; gap: 7px; margin: 0 !important; }
.brute-legend svg { flex: none; color: var(--p1); }
.brute-fact { border-left: 3px solid var(--line-hi); padding: 2px 0 2px 14px; font-size: 14.5px; color: var(--dim); }
.brute-fact b { color: var(--text); font-weight: 600; }
.brute-status { border: 1px solid rgba(243, 189, 79, .35); border-radius: 8px; background: rgba(243, 189, 79, .05); padding: 16px 18px; }
.brute-status-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.brute-status-head b { font: italic 800 18px var(--menu); font-variation-settings: "wdth" 108; color: var(--text); }
.brute-status dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: 14px; }
.brute-status dt { color: var(--dim); } .brute-status dd { margin: 0; color: var(--text); }
.brute-status .small-meta { margin-top: 10px; }
.c1 { color: var(--p1); font-weight: 600; } .c2 { color: var(--p2); font-weight: 600; }
.brute-questions > li { padding-left: 4px; }
/* the road: distance between the Foxes from the start (left) to contact (right); positions are percentages set by the page */
.road { border: 1px solid var(--line); border-radius: 8px; background: rgba(10, 14, 44, .45); padding: 12px 14px 10px; }
.road-pins { position: relative; height: 72px; }
.road-pin { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
  background: var(--gold); color: #141833; font: 800 12px/1 var(--display); white-space: nowrap; }
.road-pins .road-pin { position: absolute; top: 0; transform: translateX(-50%); }
.road-pins .road-pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 51px; background: var(--gold); opacity: .55; }
.road-pins .road-pin.r1 { top: 24px; } .road-pins .road-pin.r1::after { height: 27px; }
.road-pins .road-pin.r2 { top: 48px; } .road-pins .road-pin.r2::after { height: 3px; }
.road-pins .road-pin.s { background: none; border: 1px solid var(--line-hi); color: var(--text); } .road-pins .road-pin.s::after { background: var(--line-hi); }
.road-pins .road-pin.off { background: none; border: 1px dashed var(--gold); color: var(--gold); }
.road-body { position: relative; }
.road-name { font-size: 12px; color: var(--dim); margin: 6px 0 2px; }
.road-track { position: relative; height: 20px; border-radius: 3px; background: rgba(150, 175, 255, .05); }
.road-cell { position: absolute; top: 3px; width: 2.7%; min-width: 7px; height: 14px; border-radius: 2px; transform: translateX(-50%); }
.road-cell.ok { background: var(--ok); } .road-cell.warn { background: var(--warn); } .road-cell.bad { background: var(--bad); box-shadow: 0 0 0 2px rgba(255, 95, 120, .3); }
.road-far { position: absolute; inset: 0 auto 0 0; border-radius: 3px; border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(150, 175, 255, .16) 5px 6px); }
.road-reach { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--p1); opacity: .8; }
.road-axis { position: relative; height: 18px; margin-top: 4px; font: 500 11.5px var(--mono); color: var(--dim); }
.road-axis span { position: absolute; transform: translateX(-50%); } .road-axis span:first-child { transform: none; }
.road-axis .reach { color: var(--p1); }
.road-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }
.road-key span { display: inline-flex; align-items: center; gap: 6px; }
.road-key i, .road-band i { position: static; flex: none; display: inline-block; width: 12px; min-width: 0; height: 12px; transform: none; top: auto; }
.road-key i.road-reach { width: 0; height: 14px; } .road-band i.far { border: 1px solid var(--line-hi); border-radius: 2px;
  background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(150, 175, 255, .3) 3px 4px); }
.road-bands { display: grid; gap: 10px; }
.road-band > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
.road-band b { color: var(--text); } .road-band > div span { font: 500 12.5px var(--mono); color: var(--dim); }
/* one situation: how play gets there, the clips, what is proven, what is not */
.brute-card { border: 1px solid var(--line-hi); border-radius: 10px; background: rgba(10, 14, 44, .35); padding: 16px 18px 18px; }
.brute .prose > .brute-card { margin-top: 1.6em; }
.brute-card > * + * { margin-top: 14px; }
.brute-card > header { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.brute-card > header h2 { margin: 0 !important; padding: 0; font-size: 25px; } .brute-card > header h2::before { display: none; }
.brute-where { font: 500 12.5px var(--mono); color: var(--dim); }
.brute-part { border-left: 3px solid var(--line-hi); padding-left: 14px; }
.brute-card .brute-part > * + * { margin-top: .8em; }
.brute-part > h3 { margin: 0 0 .5em !important; font-size: 13px; letter-spacing: .1em; } .brute-part > h3::after { display: none; }
.brute-part.how { border-color: var(--hi); } .brute-part.how > h3 { color: var(--hi); }
.brute-part.is { border-color: var(--ok); } .brute-part.is > h3 { color: var(--ok); }
.brute-part.not { border-color: var(--warn); } .brute-part.not > h3 { color: var(--warn); }
.brute-part .brute-fact { border-left: 0; padding-left: 0; color: inherit; font-size: inherit; }
.brute-allow { border: 1px solid rgba(102, 224, 255, .3); border-radius: 6px; background: var(--hi-dim); padding: 8px 12px; font-size: 14.5px; }
.brute-allow b { color: var(--hi); }
.brute-score { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: start; }
.brute-score > div { border: 1px solid var(--line); border-top: 3px solid var(--line-hi); border-radius: 6px; background: rgba(10, 14, 44, .45); padding: 10px 12px 12px; font-size: 13.5px; line-height: 1.45; }
.brute-score h3 { margin: 0 0 8px !important; font-size: 13px; letter-spacing: .08em; } .brute-score h3::after { display: none; }
.brute-score ul { padding-left: 1.1em; }
.brute-score .s-start { border-top-color: var(--hi); } .brute-score .s-start h3 { color: var(--hi); }
.brute-score .s-here { border-top-color: var(--ok); } .brute-score .s-here h3 { color: var(--ok); }
.brute-score .s-sampled { border-top-color: var(--dim); } .brute-score .s-sampled h3 { color: var(--dim); }
.brute-score .s-open { border-top-color: var(--warn); } .brute-score .s-open h3 { color: var(--warn); }

.bp { border: 1px solid rgba(130, 150, 255, .22); border-radius: 8px; background: var(--panel); overflow: hidden; font-size: 14px; line-height: 1.45; color: var(--text); }
.bp-tabs { display: flex; flex-wrap: wrap; gap: 6px 2px; padding: 10px 10px 0; }
.bp-grid { display: grid; gap: 6px; padding: 10px 10px 0; font-size: 13px; align-items: stretch; }
.bp-corner { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; color: var(--dim); font-size: 11.5px; line-height: 1.2; padding-right: 2px; }
.bp-corner b { font: italic 900 22px var(--menu); color: var(--warn); }
.bp-h { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-weight: 600; line-height: 1.2; padding: 2px; }
.bp-h i { font: italic 800 15px var(--menu); opacity: .95; }
.bp-h.bp-row { align-items: flex-end; text-align: right; max-width: 6.2em; }
.bp-c1 { color: var(--p1); } .bp-c2 { color: var(--p2); }
button.bp-cell { display: flex; flex-direction: column; height: auto; gap: 1px; padding: 8px 4px; border: 1px solid var(--line-hi); border-image: none; border-radius: 6px;
  background: rgba(10, 14, 44, .5); color: var(--text); text-shadow: none; filter: none; font: 400 13px/1.25 var(--sans); white-space: normal; text-align: center; }
button.bp-cell:hover:not(:disabled) { transform: none; filter: none; color: var(--text); border-color: var(--gold); }
button.bp-cell b { font-weight: 600; } button.bp-cell span { font-size: 11.5px; color: var(--dim); }
button.bp-cell.v1 b { color: var(--p1); } button.bp-cell.vm b { color: var(--warn); }
button.bp-cell.on { border-color: var(--gold); background: rgba(244, 194, 50, .12); box-shadow: inset 0 0 0 1px var(--gold); }
button.bp-setup { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; width: calc(100% - 20px); height: auto; margin: 10px 10px 0; padding: 7px 10px;
  border: 1px dashed var(--line-hi); border-image: none; border-radius: 6px; background: none; color: var(--text); text-shadow: none; filter: none;
  font: 400 13px/1.3 var(--sans); white-space: normal; text-align: left; }
button.bp-setup:hover:not(:disabled) { transform: none; filter: none; color: var(--text); border-color: var(--hi); }
button.bp-setup b { color: var(--hi); font-weight: 600; } button.bp-setup span { color: var(--dim); }
button.bp-setup.on { border-style: solid; border-color: var(--hi); background: var(--hi-dim); }
.bp-caption { padding: 10px 14px 6px; margin: 0; font-size: 14.5px; color: #d5daf0; }
.bp-result { display: inline-block; font-weight: 600; color: var(--ok); }
.bp-result.hit { color: var(--warn); }
.bp canvas { display: block; width: 100%; touch-action: pan-y; }
.bp-beat { display: flex; gap: 12px; align-items: baseline; padding: 6px 14px 8px; border-top: 1px solid var(--line); min-height: 4.3em; }
.bp-frame { flex: none; font: italic 800 17px var(--menu); min-width: 5.6em; color: var(--text); }
.bp-frame small { display: block; font: 400 12px var(--sans); color: var(--dim); }
.bp-note { font-size: 14px; color: #d5daf0; }
.bp-hud { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.bp-who { padding: 8px 12px 9px; min-width: 0; font-size: 13px; }
.bp-who + .bp-who { border-left: 1px solid var(--line); }
.bp-name { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.bp-p1 .bp-name span:first-child { color: var(--p1); } .bp-p2 .bp-name span:first-child { color: var(--p2); }
.bp-pct.on { color: var(--warn); }
.bp-act { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-in { display: flex; align-items: center; gap: 7px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.bp-in b { color: var(--text); font-weight: 600; }
.bp-stick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--dim); position: relative; }
.bp-stick i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--text); }
.bp-bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 5px; overflow: hidden; }
.bp-bar i { display: block; height: 100%; background: currentColor; opacity: .7; }
.bp-p1 .bp-bar { color: var(--p1); } .bp-p2 .bp-bar { color: var(--p2); }
.bp-ctl { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.bp-ctl button { flex: none; }
.bp-track { flex: 1; min-width: 0; position: relative; padding-top: 7px; }
.bp-track input { width: 100%; margin: 0; padding: 0; display: block; border: 0; background: none; accent-color: var(--gold); }
.bp-mk { position: absolute; top: 0; width: 2px; height: 7px; margin-left: -1px; background: var(--dim); }
.bp-mk.hit { background: var(--warn); width: 4px; margin-left: -2px; border-radius: 1px; }
.bp-ctl select { flex: none; width: 5.6em; font-size: 12.5px; padding: 5px 22px 5px 8px; background-position: right 7px center; }
@media (max-width: 760px) {
  .brute-kinds { grid-template-columns: 1fr; }
  .brute .doc-hero h1 { font-size: 34px; }
  .brute .prose h2 { font-size: 24px; }
  .bp-grid { font-size: 12px; gap: 4px; padding: 8px 6px 0; }
  button.bp-cell { font-size: 12px; padding: 6px 2px; }
  .bp-h.bp-row { max-width: 4.6em; }
  .bp-frame { min-width: 4.9em; }
  .brute-score { grid-template-columns: 1fr; }
  .brute-card { padding: 12px 12px 14px; } .brute-card > header h2 { font-size: 22px; }
  .road { padding: 10px 10px 8px; } .road-pin { min-width: 19px; height: 19px; padding: 0 4px; font-size: 11px; }
  .bp-ctl { flex-wrap: wrap; } .bp-track { order: 5; flex-basis: 100%; padding-bottom: 4px; } .bp-ctl select { margin-left: auto; }
  .bp-who { padding: 7px 9px 8px; }
  .brute-status dl { grid-template-columns: 1fr; gap: 0; } .brute-status dd { margin-bottom: 6px; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .topbar { flex-wrap: wrap; height: auto; padding-top: 6px; padding-bottom: 4px; }
  #nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 6px 1px; overflow: visible; }
  .live-layout, .game-layout { grid-template-columns: 1fr; }
  .panel { height: 70vh; position: static; }
  .replay-frame { height: 70vh; }
  .video-wrap { width: 100%; }
}
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .doc-side { position: static; max-height: none; padding: 0; }
  .doc-side > .doc-side-label, .doc-toc { display: none; }
  .doc-search-wrap kbd { display: none; }
  .doc-list { flex-direction: row; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
  .doc-list a { border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px; }
  .doc-hero h1 { font-size: 36px; }
  .launch-grid { grid-template-columns: 1fr; }
  .vs-mark { display: none; }
  .match-grid, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { flex-wrap: wrap; height: auto; gap: 0 12px; padding: 0 12px; }
  .brand { height: 46px; }
  #nav { order: 3; flex-basis: 100%; margin: 0 -12px; padding: 4px 12px 8px; }
  #nav a { font-size: 14px; }
  .onair { max-width: 70vw; font-size: 12.5px; padding: 3px 10px; }
  .frame { --low: 26px; --r: 18px; width: calc(100% - 28px); margin: 18px auto 30px; padding: calc(var(--low) + 18px) 14px 18px; }
  .frame-title { left: 18px; top: calc(var(--low) - 30px); font-size: 22px; }
  .descbar { display: none; }
  h1 { font-size: 24px; }
  .card { padding: 14px; }
  .card.panel, .card.pcard { padding: 0; }
  .pagehead { margin-bottom: 16px; }
  .scorebug { min-height: 0; }
  .sb-side { padding: 8px 14px; gap: 8px; flex-direction: column; align-items: flex-start; }
  .sb-side.p2 { flex-direction: column; align-items: flex-end; }
  .sb-side .sb-score { flex-direction: row; gap: 8px; }
  .sb-side.p2 .sb-score { flex-direction: row-reverse; }
  .sb-name { font-size: 17px; }
  .sb-pct { font-size: 32px; min-width: 0; }
  .sb-mid { padding: 0 6px; min-width: 0; }
  .sb-game { font-size: 15px; }
  .sb-stage { font-size: 11px; white-space: normal; }
  .sb-phase { display: none; }
  .matchup { font-size: 24px; }
  .mc-grid { grid-template-columns: 1fr; }
  .filters > * { flex: 1 1 140px; }
  .filters input[type=search] { min-width: 0; }
  .file-list { columns: 1; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .stage-tiles { grid-template-columns: 1fr 1fr; }
  .pc-head { padding: 14px 16px 12px; } .pc-body { padding: 14px 16px; }
  .pc-port { font-size: 36px; } .pc-char { font-size: 24px; }
  .pcard .fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
