/* The cabinet uses four portrait columns on both touch and keyboard layouts. */
#roster {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px;background:#243249;border:2px solid #182234;max-height:360px;overflow:auto;align-items:start}
#roster .character-card {min-width:0;min-height:0;padding:0;display:block;background:#27374c;color:#fff9e8;border:2px solid #536176;border-radius:0;box-shadow:none;text-align:left;isolation:isolate}
#roster .portrait {display:block;position:relative;aspect-ratio:1.35;overflow:hidden;background:repeating-linear-gradient(150deg,transparent 0 15px,#fff2 16px 17px),color-mix(in srgb,var(--fighter-ink) 35%,#dce0d7)}
#roster .portrait img {position:absolute;display:block;width:210%;max-width:none;height:auto;left:-55%;top:-7%;image-rendering:auto;object-fit:fill}
#roster .character-card b {padding:3px 2px;display:block;text-align:center;font-size:clamp(10px,2.6vw,13px);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0;color:inherit}
#roster .character-card[aria-pressed=true] {border-color:#ffcf5a;background:#ffd266;color:#202a3d;outline:1px solid #fff1ba;outline-offset:0}
#roster .picked {display:none;position:absolute;right:auto;left:0;top:0;padding:1px 4px;background:#ffcf5a;color:#202a3d;font:bold italic 12px/1.15 Consolas,monospace;border-radius:0}
#roster .character-card[aria-pressed=true] .picked {display:block}
#roster button:focus-visible,.move-tabs button:focus-visible,#demo-toggle:focus-visible {outline:3px solid #36a5fa;outline-offset:1px;z-index:2}
#character-detail {background:#26354b;color:#fff8df;padding:10px;border:2px solid #172539;border-top:0;margin:0;display:grid;gap:8px;border-radius:0}
.fighter-caption,.move-copy>div {display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.fighter-caption h3 {font-weight:900;font-size:20px;margin:0;color:#ffda78;line-height:1.25}
.fighter-caption span,.move-copy small {color:#cfdae1;font:12px/1.35 Consolas,'Microsoft YaHei',sans-serif}
.move-tabs {display:grid;grid-template-columns:repeat(3,1fr);gap:3px}
.move-tabs button {border:1px solid #8190a1;border-radius:1px;color:#e4e7e5;background:#34455d;font-weight:700;min-height:36px;padding:3px}
.move-tabs button[aria-pressed=true] {background:#ffda78;color:#202a3d;border-color:#ffda78;box-shadow:inset 0 -3px #c38d36}
.demo-mat {position:relative;overflow:hidden;background:#e8e8da;border:2px solid #102032}
#move-preview {display:block;width:100%;height:auto;aspect-ratio:650/335}
#demo-toggle {position:absolute;right:5px;bottom:5px;width:34px;height:30px;padding:0;border:1px solid #f5eac6;background:#26354be8;color:white;font:700 15px/1 monospace}
.move-copy strong {font-size:16px;color:#fff7dc}.move-copy p {margin:4px 0 0;color:#e1e8ec;font-size:13px;line-height:1.5}
.health-track {position:relative}.health-fill {position:relative;z-index:1;transition:none}.health-trail {display:block;position:absolute;inset:2px;background:#ffb955;transform-origin:left;pointer-events:none}.rival .health-trail {transform-origin:right}
.fighter-hud.low-life .health-track {border-color:#ad3040}.fighter-hud.low-life .fighter-name span {color:#a62937;font-weight:800}
@media (pointer:coarse){.move-tabs button {min-height:44px}#demo-toggle {width:44px;height:44px}}

.team-order {display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:4px 0 6px}
.team-order button {display:flex;align-items:center;gap:7px;min-height:44px;padding:6px 9px;border:2px solid #536176;border-radius:0;background:#26354b;color:#fff8df;text-align:left}
.team-order button[aria-pressed=true] {border-color:#e4ac39;box-shadow:inset 3px 0 #ffda78}
.team-order small {color:#ffda78;font-weight:800}.team-order b {font-size:13px}.team-order button:focus-visible {outline:3px solid #368ed3}
#roster .on-team .picked {display:block;opacity:1}
.team-hud {display:block;margin-top:3px;font-size:clamp(9px,1.6vw,12px);font-weight:700;line-height:1.3;color:#33415a}
.stage-overlay.round-ko,.stage-overlay.countdown {background:transparent;align-items:flex-start;padding-top:5%;pointer-events:none}
.stage-overlay.round-ko .overlay-content,.stage-overlay.countdown .overlay-content {background:#202b40e8;border:2px solid #ffda78;color:#fff7db;box-shadow:3px 3px 0 #152031;padding:6px 16px;transform:skew(-4deg)}
.stage-overlay.round-ko strong {color:#ffda78;font:italic 900 clamp(25px,5vw,60px)/1 Impact,'Microsoft YaHei',sans-serif}
.stage-overlay.countdown .overlay-content p,.stage-overlay .overlay-content>span {color:inherit}
