/* Spindown: one deliberate look, arena-night broadcast. Single dark theme by design. */
:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --panel: #141a1f;
  --panel-2: #1b2229;
  --line: #2a333c;
  --line-2: #3a4550;
  --text: #e7ebee;
  --muted: #8e9aa5;
  --hazard: #f4c21b;
  --hazard-ink: #16140c;
  --red: #ef4632;
  --blue: #2f86f0;
  --green: #3ccf7a;
  --yellow: #f4c21b;
  --purple: #a36bff;
  --orange: #ff8a1f;
  --cyan: #22d3ee;
  --pink: #ff5fa8;
  --ok: #45d08a;
  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

#arena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---- controls ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 18px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 4px;
  font-weight: 600; letter-spacing: 0.01em; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.btn:hover { background: #242d36; border-color: #52606d; }
a.btn { text-decoration: none; color: inherit; }
.btn.ghost.discord { color: #9aa6ff; }
.btn.ghost.discord:hover { color: #c3caff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: progress; }
.btn:focus-visible, .bot-card:focus-visible, .g-item:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--hazard); outline-offset: 2px;
}
.btn.primary { background: var(--hazard); color: var(--hazard-ink); border-color: var(--hazard); }
.btn.primary:hover { background: #ffd23d; border-color: #ffd23d; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn.danger:hover { color: #ff8a7a; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 17px; }
.btn.mini { min-height: 30px; padding: 3px 10px; font-size: 13px; font-family: var(--mono); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-row .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 2px; }

select, input[type="text"] {
  width: 100%; min-height: 38px; padding: 6px 10px;
  background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px;
}
input[type="color"] { width: 100%; height: 38px; padding: 2px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; }
input[type="range"] { accent-color: var(--hazard); width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--hazard); }

.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.field > input, .field > select { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 14px; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.field-inline select { width: auto; min-width: 0; flex: 1; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.range { display: grid; grid-template-columns: 8.5em 1fr 5.2em; align-items: center; gap: 10px; font-size: 13px; }
.range .num { width: 100%; min-height: 30px; padding: 3px 6px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; font: 12px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.row2.even { grid-template-columns: 1fr 5.5em; }
.parts-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.part-row { display: grid; grid-template-columns: 1fr auto 8.5em; gap: 6px; align-items: center; font-size: 13px; padding: 2px 4px; border-radius: 3px; }
.part-row.sel { background: rgba(244,194,27,0.16); box-shadow: inset 3px 0 0 var(--hazard); }
.part-pick { all: unset; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.part-pick:focus-visible { outline: 2px solid var(--hazard); }
.part-pick .tris { color: var(--muted); margin-left: 6px; }
em.auto { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 2px; padding: 0 3px; }
.bulk { display: grid; gap: 6px; padding: 8px; background: rgba(244,194,27,0.08); border: 1px solid rgba(244,194,27,0.35); border-radius: 4px; font-size: 13px; }
#g-part-search { min-height: 32px; font-size: 13px; }
.part-row select { min-height: 30px; padding: 2px 6px; font-size: 13px; }
.range span { color: var(--muted); }
.range output { font-family: var(--mono); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 5.5em; gap: 10px; }

.mute {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 60;
  padding: 6px 12px; min-height: 32px; font-size: 12px; font-family: var(--mono);
  background: rgba(11,14,17,0.7); border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer;
}
.mute[aria-pressed="true"] { color: var(--muted); }
body[data-screen="fight"] .mute, body[data-screen="garage"] .mute, body[data-screen="gallery"] .mute { display: none; }

/* ---- touch controls ---- */
#arena { touch-action: none; }
.touch, .touch-bar { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.touch { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
.touch-drive { pointer-events: auto; position: absolute; left: 0; bottom: 0; width: 55%; height: 55%; }
.touch-base { position: absolute; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; border: 2px solid rgba(231,235,238,0.35); background: rgba(8,10,12,0.35); display: none; }
.touch-base.on { display: block; }
.touch-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(244,194,27,0.85); box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.touch-tip { position: absolute; left: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); font: 12px var(--mono); color: rgba(231,235,238,0.7); background: rgba(8,10,12,0.55); padding: 6px 10px; border-radius: 3px; pointer-events: none; }
.touch-drive.used .touch-tip { display: none; }
.touch-fire { pointer-events: auto; position: absolute; right: calc(22px + env(safe-area-inset-right, 0px)); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); width: 96px; height: 96px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3); background: rgba(239,70,50,0.85); color: #fff; font: 800 15px var(--display); letter-spacing: 0.04em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
.touch-fire.on { transform: scale(0.93); background: rgba(255,110,80,0.95); }
.touch-bar { position: fixed; z-index: 11; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(140px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; }
.touch-bar .btn { background: rgba(11,14,17,0.8); min-height: 38px; min-width: 88px; }
/* With touch controls, the weapon-power slider goes compact in the gap between thumbs. */
body.touch-ui .hud-power { width: min(46%, 200px); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
body.touch-ui .hud-power-row { grid-template-columns: 1fr 2.6em; padding: 6px 10px; }
body.touch-ui .hud-power-row .who, body.touch-ui .hud-power-row .keys { display: none; }
body.touch-ui .hud-keys { display: none; }
body.touch-ui .hud-out { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
#r-note:empty { display: none; }

/* ---- screens ------------------------------------------------------- */
.screen { position: fixed; inset: 0; z-index: 20; }
.overlay { display: grid; place-items: center; padding: 24px 16px; background: rgba(6,8,10,0.72); backdrop-filter: blur(3px); overflow-y: auto; }
.card { width: min(100%, 980px); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: grid; gap: 18px; }
.card.narrow { width: min(100%, 360px); }
.card h2 { font-family: var(--display); font-weight: 800; font-size: 40px; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
.bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(11,14,17,0.92); }
.bar h2 { font-family: var(--display); font-weight: 800; font-size: 28px; text-transform: uppercase; letter-spacing: 0.02em; flex: 1; }

/* Menu */
.menu { pointer-events: none; background: linear-gradient(90deg, rgba(6,8,10,0.92) 0%, rgba(6,8,10,0.6) 38%, rgba(6,8,10,0) 70%); }
.menu-inner { pointer-events: auto; position: absolute; left: max(16px, 6vw); bottom: max(28px, 9vh); width: min(520px, calc(100% - 32px)); display: grid; gap: 14px; }
.eyebrow { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hazard); }
.logo { font-family: var(--display); font-weight: 900; font-size: clamp(72px, 13vw, 168px); line-height: 0.82; letter-spacing: -0.01em; text-transform: uppercase; color: #f3f5f6; }
.logo.small { font-size: 56px; }
.hazard-bar { height: 14px; width: min(100%, 420px); background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--hazard-ink) 14px 28px); }
.tagline { margin: 0; font-size: 17px; max-width: 34em; color: #cfd6dc; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.m-account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: rgba(11,14,17,0.7); border: 1px solid var(--line); border-radius: 5px; font-size: 13px; }
.m-account .who { font-weight: 600; }
.m-account .muted { font-size: 12px; }
.m-account .sync-ok { color: var(--ok); font-family: var(--mono); font-size: 12px; }
.m-account .sync-err { color: #ff8a7a; font-family: var(--mono); font-size: 12px; }
.btn.discord-signin { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord-signin:hover { background: #4752c4; border-color: #4752c4; }
.formats { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.now-showing { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; background: rgba(6,8,10,0.6); padding: 6px 10px; border-radius: 3px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Help */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px 28px; }
.help-grid h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 20px; letter-spacing: 0.03em; color: var(--hazard); margin-bottom: 6px; }
.help-grid p, .help-grid ul { margin: 0 0 8px; color: #cdd4da; font-size: 14px; }
.help-grid ul { padding-left: 18px; display: grid; gap: 6px; }
.keys { border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.keys th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 12px 4px 0; white-space: nowrap; vertical-align: top; }
.keys td { padding: 4px 0; }
kbd { display: inline-block; min-width: 24px; padding: 1px 6px; margin: 0 2px 2px 0; font: 12px var(--mono); text-align: center; background: #0f1418; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; }

/* Setup */
.setup { place-items: stretch; padding: 0; }
.setup-wrap { display: grid; grid-template-rows: auto 1fr; min-height: 100%; }
.setup-body { display: grid; grid-template-columns: 1fr 280px; gap: 18px; padding: 18px 16px 24px; align-items: start; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.side0 { --c: var(--red); }
.side1 { --c: var(--blue); }
.side2 { --c: var(--green); }
.side3 { --c: var(--yellow); }
.side4 { --c: var(--purple); }
.side5 { --c: var(--orange); }
.side6 { --c: var(--cyan); }
.side7 { --c: var(--pink); }
.slot { display: grid; gap: 10px; align-content: start; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 4px; padding: 14px; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.corner-tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.you { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--c); border-radius: 2px; color: var(--c); }
.slot-player { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.slot-player .muted { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; }
.slot-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 40px; padding-top: 4px; border-top: 1px solid var(--line); }
.slot-info strong { width: 100%; font-weight: 600; }
.bc-sub { font-size: 12px; color: var(--muted); }
.bc-stats { display: grid; gap: 1px; font-family: var(--mono); font-size: 10px; color: var(--muted); justify-items: end; }
.bc-stats > span { display: flex; align-items: center; gap: 5px; }
.swatch { width: 14px; height: 14px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 12px; height: 12px; border-radius: 2px; background: #2a333c; }
.pips i.on { background: var(--hazard); }
.pips.sm i { width: 7px; height: 7px; border-radius: 1px; }
.setup-side { display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px; position: sticky; top: 16px; }
.setup-side .field select:disabled, .setup-side input:disabled { opacity: 0.6; }
.career { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.career h3 { margin: 0; font: 600 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.career dl { margin: 0; display: grid; gap: 4px; }
.career dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.career dt { color: var(--muted); font-size: 13px; }
.career dd { margin: 0; font: 600 14px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.career .beans dd { color: var(--hazard); }
.career p { margin: 0; }
.r-beans { color: var(--hazard); font-family: var(--mono); }
.room { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.room-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.room-row { display: flex; align-items: center; gap: 12px; }
.room-code { font-family: var(--display); font-weight: 900; font-size: 52px; line-height: 0.9; letter-spacing: 0.08em; color: var(--hazard); user-select: all; }
.room p { margin: 0; }

/* Online */
.online-card { width: min(100%, 720px); }
.online-card h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: 0.02em; }
.online-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.online-opt { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); }
.online-opt p { margin: 0; }
#o-code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; text-transform: uppercase; }
.online-card > p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; max-width: calc(100% - 32px); padding: 10px 16px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--hazard); border-radius: 3px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }

/* Garage */
.garage { display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.garage.busy { cursor: progress; }
.g-body { display: grid; grid-template-columns: 230px 1fr 400px; min-height: 0; }
.g-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; display: grid; align-content: start; gap: 4px; }
.g-list-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 12px 6px 4px; }
.g-list-head span { text-transform: none; letter-spacing: 0; opacity: 0.8; }
.g-empty { font-size: 13px; color: var(--muted); padding: 0 6px; margin: 0; }
.g-item { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 4px; border: 1px solid transparent; background: transparent; cursor: pointer; }
.g-item:hover { background: var(--panel); }
.g-item.on { background: var(--panel-2); border-color: var(--line-2); }
.g-item-text { display: grid; min-width: 0; }
.g-item-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item-sub { font-size: 12px; color: var(--muted); }
.g-preview { position: relative; min-height: 0; min-width: 0; }
#g-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.g-toggles { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.g-toggles .check { background: rgba(11,14,17,0.8); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; font-size: 13px; }
.g-hint { position: absolute; left: 12px; bottom: 10px; margin: 0; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.g-pick-tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); padding: 4px 9px; font: 600 12px var(--mono); white-space: nowrap; color: #e6ebef; background: rgba(8,10,12,0.9); border: 1px solid var(--line-2); border-left: 3px solid var(--hazard); border-radius: 3px; }
.g-drop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(6,8,10,0.75); border: 3px dashed var(--hazard); pointer-events: none; padding: 16px; }
.g-drop span { font-family: var(--display); font-size: 30px; font-weight: 800; text-transform: uppercase; text-align: center; max-width: 18em; }
.g-form { border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 24px; display: grid; align-content: start; gap: 14px; background: var(--panel); }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 12px 12px 14px; margin: 0; display: grid; gap: 12px; }
legend { font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 6px; }
.points { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--hazard); margin-left: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--hazard); color: var(--hazard-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--hazard); outline-offset: -4px; }
.stat-row { display: grid; grid-template-columns: 5em auto 1fr auto 1.4em; align-items: center; gap: 10px; }
.stat-name { font-size: 13px; color: var(--muted); }
.stat-row .pips { justify-self: center; }
.stat-val { font-family: var(--mono); text-align: right; }
.readout { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0; font-size: 13px; }
.readout dt { color: var(--muted); }
.readout dd { margin: 0; font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.note { margin: 0; padding: 8px 10px; border-left: 3px solid var(--hazard); background: rgba(244,194,27,0.08); font-size: 13px; }
.status { margin: 0; min-height: 1.5em; font-size: 13px; color: var(--ok); overflow-wrap: anywhere; }
.status.err { color: #ff8a7a; }
.status:empty { display: none; }
.g-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.g-actions .danger { margin-left: auto; }

/* HUD */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; font-family: var(--body); }
.hud-bar { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.hud-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.hud-col.right { justify-items: end; }
.hud-card { display: grid; gap: 4px; width: min(100%, 420px); }
.hud-col.right .hud-card { text-align: right; }
.hud-card.out { opacity: 0.55; }
.hud-name { display: flex; align-items: baseline; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.7); border-bottom: 3px solid var(--c); padding-bottom: 4px; min-width: 0; }
.hud-name .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-name .tag { font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; color: var(--c); white-space: nowrap; }
.hud-col.right .hud-name { flex-direction: row-reverse; }
.hud-hp { position: relative; height: 18px; background: rgba(8,10,12,0.8); border: 1px solid rgba(255,255,255,0.18); border-radius: 2px; overflow: hidden; }
.hud-hp-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(180deg, #58e39b, #2fae6c); transition: width 0.15s; }
.hud-col.right .hud-hp-fill, .hud-col.right .hud-wpn-fill { inset: 0 0 0 auto; }
.hud-hp-fill.low { background: linear-gradient(180deg, #ff6a4f, #d23a24); }
.hud-hp-num { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 8px; font: 600 12px var(--mono); color: #fff; text-shadow: 0 1px 2px #000; }
.hud-col.right .hud-hp-num, .hud-col.right .hud-wpn-text { justify-content: flex-end; }
.hud-wpn { position: relative; height: 15px; background: rgba(8,10,12,0.75); border-radius: 2px; overflow: hidden; }
.hud-wpn-fill { position: absolute; inset: 0 auto 0 0; background: rgba(244,194,27,0.55); }
.hud-wpn-text { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 8px; font: 11px var(--mono); letter-spacing: 0.06em; color: #fff; }
.hud-wpn-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,0.8); }
.hud-power { pointer-events: auto; position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 6px; width: min(calc(100% - 32px), 480px); }
.hud-out { pointer-events: auto; position: absolute; left: 50%; bottom: calc(var(--power-h, 16px) + 44px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; width: max-content; max-width: calc(100% - 32px); padding: 8px 12px; background: rgba(8,10,12,0.85); border: 1px solid var(--line-2); border-left: 4px solid var(--hazard); border-radius: 4px; font: 13px var(--body); color: #dfe5ea; }
.hud-out kbd { margin: 0 0 0 4px; }
.hud-power-row { display: grid; grid-template-columns: auto 1fr 3.4em auto; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(8,10,12,0.82); border: 1px solid var(--line-2); border-left: 4px solid var(--c); border-radius: 4px; }
.hud-power-row .who { font: 700 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
.hud-power-row input { width: 100%; min-height: 26px; accent-color: var(--hazard); cursor: pointer; }
.hud-power-row output { font: 700 16px var(--mono); color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.hud-power-row .keys { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.hud-parts { display: flex; flex-wrap: wrap; gap: 3px; }
.hud-col.right .hud-parts { justify-content: flex-end; }
.hud-parts i { width: 14px; height: 6px; border-radius: 1px; background: #45d08a; box-shadow: 0 0 0 1px rgba(0,0,0,0.5); }
.hud-parts i.r-wheel { width: 8px; }
.hud-parts i.r-weapon, .hud-parts i.r-mount { width: 18px; }
.hud-parts i.y { background: var(--hazard); }
.hud-parts i.r { background: #ff5a40; }
.hud-parts i.x { background: rgba(255,255,255,0.12); box-shadow: inset 0 0 0 1px rgba(255,90,64,0.7); }
.hud-sys { display: flex; flex-wrap: wrap; gap: 3px; }
.hud-col.right .hud-sys { justify-content: flex-end; }
.hud-sys span { font: 600 9px var(--mono); letter-spacing: 0.08em; padding: 1px 5px; border-radius: 2px; background: rgba(69,208,138,0.18); color: #7fe7ad; box-shadow: inset 0 0 0 1px rgba(69,208,138,0.45); }
.hud-sys span.dead { background: rgba(255,90,64,0.2); color: #ff8a70; box-shadow: inset 0 0 0 1px rgba(255,90,64,0.6); text-decoration: line-through; }
.hud-status { justify-self: start; font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; padding: 2px 10px; background: rgba(8,10,12,0.85); border-left: 4px solid #ff5a40; }
.hud-status.counting { border-left-color: var(--hazard); font-size: 22px; }
.hud-col.right .hud-status { justify-self: end; border-left: 0; border-right: 4px solid #ff5a40; }
.hud-col.right .hud-status.counting { border-right-color: var(--hazard); }
.hud-count { justify-self: start; font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; padding: 3px 10px; background: rgba(8,10,12,0.85); border-left: 4px solid var(--hazard); }
.hud-col.right .hud-count { justify-self: end; border-left: 0; border-right: 4px solid var(--hazard); }
.hud-clock { display: grid; justify-items: center; background: rgba(8,10,12,0.85); border: 1px solid rgba(255,255,255,0.14); border-bottom: 4px solid var(--hazard); padding: 4px 16px 6px; min-width: 110px; }
.hud-time { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.hud-sub { font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); min-height: 1.2em; }
.hud-clock.urgent .hud-time { color: #ff6a4f; animation: pulse 0.5s infinite; }
.hud-announce { position: absolute; left: 0; right: 0; top: 34%; text-align: center; opacity: 0; }
.hud-announce.show { animation: announce var(--dur, 1.4s) ease-out forwards; }
.hud-big { font-family: var(--display); font-weight: 900; font-size: clamp(56px, 12vw, 150px); line-height: 0.9; text-transform: uppercase; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,0.8); letter-spacing: 0.01em; padding: 0 16px; }
.hud-small { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 3.4vw, 34px); text-transform: uppercase; color: var(--hazard); text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.hud-announce.fight .hud-big, .hud-announce.hazard .hud-big { color: var(--hazard); }
.hud-announce.ko .hud-big { color: #ff5a40; }
.hud-announce.cam .hud-big { font-size: 34px; }
@keyframes announce {
  0% { opacity: 0; transform: scale(1.25); }
  10% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
.hud-ticker { position: absolute; left: 50%; top: calc(72px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: grid; gap: 4px; justify-items: center; width: min(90%, 520px); }
.tick { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; background: rgba(8,10,12,0.55); border-left: 2px solid #ff5a40; color: #d8dde2; animation: tick 3s ease-out forwards; }
.tick b { color: #ff8a70; font-weight: 800; }
@keyframes tick { 0% { opacity: 0; transform: translateY(8px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.hud-popups { position: absolute; inset: 0; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 800; font-size: 26px; color: #fff; text-shadow: 0 2px 6px #000; animation: pop 1s ease-out forwards; }
.pop.big { font-size: 42px; color: #ffd23d; }
@keyframes pop { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -150%); } }
.hud-keys { position: absolute; left: 50%; bottom: calc(var(--power-h, 16px) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); font: 12px var(--mono); color: #c9d1d8; background: rgba(8,10,12,0.75); padding: 6px 12px; border-radius: 3px; white-space: nowrap; transition: opacity 1s; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
.hud-keys.fade { opacity: 0; }
.hud-hide { pointer-events: auto; position: absolute; left: 16px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #c9d1d8; background: rgba(8,10,12,0.7); border: 1px solid rgba(255,255,255,0.14); border-radius: 3px; padding: 4px 8px; cursor: pointer; }
.hud-hide kbd { min-width: 0; margin: 0 0 0 4px; padding: 0 5px; font-size: 10px; }
body.touch-ui .hud-hide { display: none; }
body.ui-hidden .hud > :not(.hud-hide):not(.hud-chat-form) { display: none; }
body.ui-hidden .hud-hide { opacity: 0.35; }
body.ui-hidden .hud-hide:hover, body.ui-hidden .hud-hide:focus-visible { opacity: 1; }
body.ui-hidden #fps { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hud-chat { position: absolute; left: 16px; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 3px; width: min(46%, 420px); }
.hud-chat div { font: 13px var(--body); color: #e8edf1; background: rgba(8,10,12,0.72); padding: 4px 9px; border-radius: 3px; border-left: 3px solid var(--c, var(--line-2)); overflow-wrap: anywhere; animation: chat-in 0.2s ease-out; transition: opacity 0.8s; }
.hud-chat div.old { opacity: 0; }
.hud-chat div.sys { font-style: italic; color: #b7c0c8; border-left-color: var(--hazard); }
.hud-chat b, .chat-log b { color: var(--c, #fff); margin-right: 6px; }
.hud-chat-form { pointer-events: auto; position: absolute; left: 16px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); width: min(46%, 420px); }
.hud-chat-form input { width: 100%; min-height: 32px; padding: 4px 10px; background: rgba(8,10,12,0.9); border: 1px solid var(--hazard); border-radius: 3px; color: #fff; font: 13px var(--body); }
.rc-card { width: min(680px, calc(100% - 32px)); display: grid; gap: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.rc-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; padding: 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; }
.rc-ax { display: grid; grid-template-columns: 1.4em 1fr; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--muted); }
.rc-ax i { position: relative; height: 10px; background: #1d252c; border-radius: 2px; overflow: hidden; }
.rc-ax i::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.rc-ax b { position: absolute; top: 0; bottom: 0; background: var(--hazard); }
.rc-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; min-height: 18px; font: 11px var(--mono); }
.rc-btns span { background: var(--hazard); color: var(--hazard-ink); padding: 0 5px; border-radius: 2px; }
.rc-map { display: grid; gap: 8px; }
.rc-row { display: grid; grid-template-columns: 9em 1fr auto auto 7.5em; align-items: center; gap: 8px; }
.rc-row select { min-width: 0; }
.rc-name { font-weight: 600; }
.rc-name em { font-style: normal; font: 10px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rc-out { font: 12px var(--mono); color: var(--hazard); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .rc-row { grid-template-columns: 1fr 1fr; } .rc-out { text-align: left; } }
.paint-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.paint-modes [aria-pressed="true"] { background: var(--hazard); color: var(--hazard-ink); border-color: var(--hazard); }
.paint-colors { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.paint-colors input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 4px; background: none; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatches button { width: 22px; height: 22px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.25); cursor: pointer; padding: 0; }
.swatches button:focus-visible { outline: 2px solid var(--hazard); outline-offset: 1px; }
.g-preview.painting canvas { cursor: crosshair; }
.range.dmg { grid-template-columns: auto 1fr 5em; }
.dmg-note { margin: -6px 0 0; color: var(--hazard); }
.ready-btn.on { background: var(--ok); border-color: var(--ok); color: #06140c; }
.ready-pill { display: inline-block; vertical-align: middle; font: 700 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--muted); }
.ready-pill.on { background: var(--ok); border-color: var(--ok); color: #06140c; }
.settings-card { width: min(620px, calc(100% - 32px)); display: grid; gap: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.lb-tabs, .lb-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tabs [aria-selected="true"], .lb-metrics [aria-pressed="true"] { background: var(--hazard); border-color: var(--hazard); color: #111; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-height: 120px; }
.lb-list li { display: grid; grid-template-columns: 3ch 1fr auto; gap: 12px; align-items: baseline; padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 3px; }
.lb-list li:nth-child(-n+3) .rk { color: var(--hazard); font-weight: 800; }
.lb-list li.me { background: rgba(255,210,61,0.12); box-shadow: inset 3px 0 0 var(--hazard); }
.lb-list li.empty { grid-template-columns: 1fr; color: var(--muted); }
.lb-list .rk { font: 600 13px var(--mono); color: var(--muted); text-align: right; }
.lb-list .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list .vl { font: 700 14px var(--mono); font-variant-numeric: tabular-nums; }
.lb-mine { margin: 0; font-size: 14px; }
.phys-btn.changed { border-color: var(--hazard); color: var(--hazard); }
.ph-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ph-current { font: 700 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 3px; }
.ph-grid { display: grid; gap: 8px; }
.ph-grid.classes { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.ph-grid.chaos { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ph-btn { display: grid; gap: 3px; align-content: start; text-align: left; padding: 9px 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 5px; color: inherit; font: inherit; cursor: pointer; }
.ph-btn b { font-size: 13px; }
.ph-btn span { font-size: 11px; color: var(--muted); line-height: 1.35; }
.ph-btn:hover:not(:disabled) { border-color: var(--muted); }
.ph-btn.on { border-color: var(--hazard); box-shadow: inset 0 0 0 1px var(--hazard); }
.ph-btn:disabled { cursor: default; opacity: 0.7; }
.ph-btn.on:disabled { opacity: 1; }
.ph-knobs { display: grid; gap: 10px; }
.ph-user { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-user .ph-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.ph-user .ph-chip.on { border-color: var(--hazard); box-shadow: inset 0 0 0 1px var(--hazard); }
.ph-user .ph-chip button { background: #0f1418; border: 0; color: inherit; font: inherit; padding: 7px 10px; cursor: pointer; }
.ph-user .ph-chip button:hover:not(:disabled) { background: #1b2229; }
.ph-user .ph-chip .x { color: var(--muted); border-left: 1px solid var(--line-2); padding: 7px 9px; }
.ph-save { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-save input { flex: 1 1 180px; min-height: 38px; padding: 6px 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font: inherit; }
.ph-knob p { margin: 2px 0 0; }
.sync-chip { font-family: var(--mono); font-size: 12px; }
.asm-note { margin: 0; padding: 8px 10px; border-left: 2px solid var(--hazard); background: rgba(244, 194, 27, 0.06); line-height: 1.45; }
.sync-chip.ok { color: var(--ok); }
.sync-chip.err { color: #ff8a7a; }
.gallery { display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.gl-body { overflow-y: auto; padding: 16px; }
.gl-account { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gl-who { color: var(--muted); max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-off { max-width: 520px; margin: 10vh auto; text-align: center; display: grid; gap: 8px; }
.gl-off h3 { font-family: var(--display); font-size: 32px; text-transform: uppercase; }
.gl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.gl-tools input[type="search"] { flex: 1 1 220px; min-height: 38px; padding: 6px 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font: inherit; }
.gl-tools select { width: auto; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gl-card { display: grid; grid-template-rows: auto 1fr auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; }
.gl-card:hover { border-color: var(--line-2); }
.gl-card:focus-visible { outline: 2px solid var(--hazard); outline-offset: 2px; }
.gl-shot, .bd-shot, .sh-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #0f1418; }
.gl-meta { display: grid; gap: 4px; padding: 10px 12px 6px; align-content: start; }
.gl-meta h3 { font-size: 16px; overflow-wrap: anywhere; }
.gl-by { font-size: 12px; color: var(--muted); margin: 0; }
.gl-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; }
.gl-tags span { font: 600 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--muted); }
.gl-stats { display: flex; gap: 12px; margin: 4px 0 0; font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.gl-add { margin: 6px 12px 12px; }
.gl-note { text-align: center; margin: 14px 0 0; }
.gl-tags .hid { color: var(--red); border-color: var(--red); }
.sh-warn { border-left: 2px solid var(--hazard); padding-left: 10px; }
.gl-more { display: flex; justify-content: center; padding: 16px; }
.dlg { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 32px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 22px; position: relative; overflow-y: auto; }
.dlg::backdrop { background: rgba(6, 8, 10, 0.72); backdrop-filter: blur(3px); }
.dlg-narrow { width: min(400px, calc(100% - 32px)); }
.dlg h2 { font-family: var(--display); font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; }
.dlg .stack { display: grid; gap: 10px; }
.dlg-x { position: absolute; top: 8px; right: 8px; min-height: 34px; padding: 4px 10px; }
.bd-body { display: grid; gap: 14px; }
.bd-info { display: grid; gap: 8px; }
.bd-desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 14px; line-height: 1.5; }
.bd-minor { justify-content: flex-end; }
.btn.liked { color: var(--pink); border-color: var(--pink); }
.bd-h { margin: 16px 0 8px; font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.bd-comments { display: grid; gap: 10px; margin-bottom: 10px; }
.bd-c { display: grid; gap: 2px; padding: 8px 10px; background: #0f1418; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.bd-c p { margin: 0; overflow-wrap: anywhere; }
.bd-c .btn.mini { min-height: 22px; padding: 0 6px; font-size: 11px; }
.sh-shot-wrap { position: relative; }
.sh-shot-wrap .btn { position: absolute; right: 8px; bottom: 8px; }
.dlg textarea { width: 100%; padding: 8px 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font: 14px var(--body); text-transform: none; letter-spacing: 0; resize: vertical; }
.dlg input[type="email"] { width: 100%; min-height: 38px; padding: 6px 10px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font: 14px var(--body); text-transform: none; letter-spacing: 0; }
.settings-card h3 { margin: 6px 0 0; font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.fps { position: fixed; right: 10px; bottom: 10px; z-index: 30; font: 12px var(--mono); color: #cfd6dc; background: rgba(8,10,12,0.7); padding: 3px 7px; border-radius: 3px; pointer-events: none; }
.chat { display: grid; gap: 6px; margin-top: 8px; }
.chat-log { height: 150px; overflow-y: auto; display: grid; align-content: start; gap: 3px; padding: 6px 8px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; font-size: 13px; }
.chat-log div { overflow-wrap: anywhere; }
.chat-log .sys { color: var(--muted); font-style: italic; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.chat-form input { min-width: 0; min-height: 32px; padding: 4px 8px; background: #0f1418; border: 1px solid var(--line-2); border-radius: 4px; color: inherit; font: inherit; font-size: 13px; }
.hud-keys .sep { margin: 0 10px; color: var(--line-2); }
.hud-keys .k0 { color: var(--red); }
.hud-keys .k1 { color: var(--blue); }
.hud-keys .k2 { color: var(--green); }
.hud-keys .k3 { color: var(--yellow); }
.hud-keys .k4 { color: var(--purple); }
.hud-keys .k5 { color: var(--orange); }
.hud-keys .k6 { color: var(--cyan); }
.hud-keys .k7 { color: var(--pink); }
.hud.many .hud-col { gap: 6px; }
.hud.many .hud-name { font-size: 17px; border-bottom-width: 2px; }
.hud.many .hud-parts { display: none; }
.hud.many .hud-wpn { height: 12px; }

/* Result */
.result-card { width: min(100%, 720px); }
.r-table-wrap { overflow-x: auto; }
.r-reason { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hazard); }
.r-winner { color: var(--c, var(--text)); }
.card h2.r-winner { font-size: clamp(44px, 9vw, 72px); }
.r-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.r-table th, .r-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.r-table th:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.r-table thead th { font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; }
.r-table thead th[class^="side"] { color: var(--c); }
.r-table td { font-family: var(--mono); }

/* Loading */
.loading { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--bg); padding: 16px; text-align: center; }
.loading-text { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); max-width: 36em; }
.loading.error .loading-text { color: #ff8a7a; }

/* Narrow screens */
@media (max-width: 1100px) {
  .g-body { grid-template-columns: 190px 1fr 360px; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .setup-body { grid-template-columns: 1fr; }
  .setup-side { position: static; }
  .slots { grid-template-columns: 1fr; }
  .garage { position: fixed; overflow-y: auto; display: block; }
  .garage > .bar { flex-wrap: wrap; gap: 8px; }
  .garage > .bar h2 { font-size: 22px; }
  .garage > .bar .btn { white-space: nowrap; min-height: 36px; padding: 6px 10px; }
  /* The fight card's Start button stays in reach at the bottom of the screen. */
  .setup-body { padding-bottom: 96px; }
  #s-start { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 20; box-shadow: 0 6px 22px rgba(0,0,0,0.6); }
  .g-body { display: flex; flex-direction: column; }
  .g-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
  .g-preview { height: 46dvh; flex: none; }
  .g-form { border-left: 0; overflow: visible; }
  .hud-name { font-size: 16px; }
  .hud-name .tag, .hud-parts { display: none; }
  .hud-card { width: 100%; }
  .hud-time { font-size: 30px; }
  .hud-clock { min-width: 80px; padding: 4px 8px; }
  .hud-keys { display: none; }
  .menu { background: linear-gradient(0deg, rgba(6,8,10,0.95) 0%, rgba(6,8,10,0.55) 55%, rgba(6,8,10,0.1) 100%); }
  .now-showing { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; left: 16px; right: auto; max-width: calc(100% - 130px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .now-showing .live-dot { display: inline-block; margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot, .hud-clock.urgent .hud-time { animation: none; }
  .hud-announce.show { animation-duration: 0.01s; opacity: 1; }
  .pop { animation: none; opacity: 0; }
}
