:root {
  color-scheme: dark;
  --ink: #08080d;
  --panel: #111522;
  --panel-2: #181e2f;
  --line: #3b4357;
  --text: #fffdf4;
  --muted: #aeb8ca;
  --red: #ef3145;
  --red-dark: #861d2a;
  --blue: #2f79ff;
  --cyan: #41d9ff;
  --yellow: #ffd34f;
  --green: #47d47c;
  --sprite-idle: url("assets/characters/idle-rpg-roster-likeness-v2.webp");
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(47, 121, 255, 0.21), transparent 32rem),
    radial-gradient(circle at 88% 16%, rgba(239, 49, 69, 0.19), transparent 30rem),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 12px),
    #090b13;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #080b13;
  background: var(--yellow);
  transform: translateY(-180%);
  transition: transform 160ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.sprite-filter-defs {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}

.arcade-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 34px;
}

.arcade-header {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 6px 14px;
}

.brand-lockup {
  display: grid;
  line-height: 0.9;
}

.brand-kicker {
  margin: 0 0 7px 4px;
  color: #8995ac;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.brand-lockup strong {
  font-size: clamp(1.9rem, 5vw, 3.5rem);
  font-style: italic;
  letter-spacing: -0.04em;
  text-shadow: 4px 4px 0 #1e2537;
  transform: skewX(-5deg);
}

.brand-lockup strong span {
  margin-left: 0.12em;
  color: var(--red);
  text-shadow: 3px 3px 0 #65121e;
}

.career-card {
  display: grid;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  background: rgba(17, 21, 34, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.career-card span {
  color: #8290a8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.career-card strong {
  margin-top: 4px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

.career-card b {
  color: var(--yellow);
}

.screen {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(24, 30, 47, 0.97), rgba(10, 12, 20, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.05);
}

.select-screen {
  padding: 22px;
  clip-path: polygon(0 0, 98.5% 0, 100% 3%, 100% 100%, 1.5% 100%, 0 97%);
}

.select-heading,
.versus-setup,
.fight-toolbar,
.fight-hud,
.hud-name,
.meter-row,
.fight-statusbar,
.keyboard-guide,
.move-strip {
  display: flex;
  align-items: center;
}

.select-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.select-heading p {
  margin: 0 0 4px;
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.select-heading h1 {
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  font-style: italic;
  letter-spacing: 0.04em;
}

.select-heading > span {
  padding: 8px 12px;
  border: 1px solid #49536a;
  color: var(--muted);
  background: #101522;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
}

.select-heading > span b {
  color: var(--yellow);
}

.select-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: 18px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.roster-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 166px;
  grid-template-columns: minmax(86px, 0.9fr) minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  padding: 8px 9px;
  border: 1px solid #38435a;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--fighter-color) 13%, transparent), transparent 55%),
    #101522;
  text-align: left;
  transition: transform 130ms ease-out, border-color 180ms ease-out, filter 180ms ease-out;
}

.roster-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 7px;
  content: "";
  background: var(--fighter-color);
  opacity: 0.72;
}

.roster-card:hover {
  z-index: 2;
  border-color: #7d8ba6;
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.roster-card:active {
  transform: scale(0.98);
}

.roster-card.is-selected {
  border-color: var(--yellow);
  box-shadow: inset 0 0 0 2px #9c6d19, 0 0 18px rgba(255, 211, 79, 0.16);
}

.roster-card.is-selected::before {
  position: absolute;
  top: 7px;
  left: 8px;
  z-index: 4;
  padding: 3px 6px;
  color: #231700;
  background: var(--yellow);
  content: "P1";
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 900;
}

.character-sprite,
.fighter-sprite {
  background-image: var(--sprite-idle);
  background-repeat: no-repeat;
  background-position: var(--sprite-x) var(--sprite-y);
  background-size: 300% 300%;
  image-rendering: pixelated;
}

.roster-card .character-sprite {
  width: 92%;
  max-width: 124px;
  aspect-ratio: 0.94;
  place-self: end center;
  margin-bottom: 5px;
  filter: url("#sprite-edge-clean") drop-shadow(0 8px 4px rgba(0, 0, 0, 0.55));
  transform: scale(var(--motion-scale, 1));
  transform-origin: center bottom;
}

.roster-copy {
  position: relative;
  z-index: 3;
  display: grid;
  min-width: 0;
  align-self: center;
  gap: 4px;
}

.roster-copy strong {
  overflow: hidden;
  font-size: clamp(0.88rem, 2vw, 1.08rem);
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-copy span {
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fighter-profile {
  position: relative;
  display: grid;
  min-height: 548px;
  align-content: start;
  overflow: hidden;
  padding: 362px 18px 18px;
  border: 1px solid #47536b;
  background:
    linear-gradient(180deg, transparent 42%, rgba(8, 10, 16, 0.96) 76%),
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--fighter-color) 28%, transparent), transparent 44%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 10px),
    #101522;
}

.profile-sprite {
  position: absolute;
  top: 10px;
  left: 50%;
  width: min(82%, 315px);
  aspect-ratio: 0.94;
  background-image: var(--sprite-idle);
  background-repeat: no-repeat;
  background-position: var(--sprite-x) var(--sprite-y);
  background-size: 300% 300%;
  image-rendering: pixelated;
  filter: url("#sprite-edge-clean") drop-shadow(0 18px 7px rgba(0, 0, 0, 0.65));
  transform: translateX(-50%) scale(var(--motion-scale, 1));
  transform-origin: center bottom;
}

.profile-copy {
  position: relative;
  z-index: 2;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--fighter-color) 42%, #273143);
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.72), transparent 38%);
}

.profile-copy > span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--fighter-color) 70%, #fff);
  color: color-mix(in srgb, var(--fighter-color) 60%, #fff);
  background: color-mix(in srgb, var(--fighter-color) 15%, transparent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
}

.profile-copy h2 {
  font-size: 2rem;
  font-style: italic;
  letter-spacing: 0.03em;
  text-shadow: 3px 3px #121725;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.profile-stat {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid #353f55;
  background: rgba(12, 16, 25, 0.78);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.56rem;
}

.stat-dots {
  display: flex;
  gap: 2px;
}

.stat-dots i {
  width: 12px;
  height: 4px;
  background: #3b4559;
}

.stat-dots i.is-on {
  background: var(--fighter-color);
}

.profile-move {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 4px solid var(--fighter-color);
  background: rgba(10, 13, 21, 0.88);
}

.profile-move span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.57rem;
}

.profile-move strong {
  display: block;
  margin-top: 3px;
  color: #ffe8a1;
  font-size: 0.95rem;
}

.versus-setup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr) auto auto;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-top: 1px solid #3d465b;
  background: #0c101a;
}

.versus-player {
  display: grid;
  padding-left: 10px;
  border-left: 4px solid var(--blue);
}

.versus-player--cpu {
  border-color: var(--red);
}

.versus-player span {
  color: #8290a8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.versus-player strong {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.versus-mark {
  color: var(--yellow);
  font-size: 1.8rem;
  font-style: italic;
  transform: skewX(-10deg);
}

.shuffle-button,
.toolbar-button,
.secondary-button {
  padding: 9px 14px;
  border: 1px solid #536079;
  background: #1a2132;
  transition: background 160ms ease-out, border-color 160ms ease-out, transform 100ms ease-out;
}

.shuffle-button:hover,
.toolbar-button:hover,
.secondary-button:hover {
  border-color: #8998b3;
  background: #252e43;
}

.start-button {
  position: relative;
  min-width: 150px;
  padding: 10px 20px;
  overflow: hidden;
  color: #fff;
  border: 1px solid #ff7582;
  background: linear-gradient(135deg, #ff4053, #a31328);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35), 0 7px 22px rgba(239, 49, 69, 0.22);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.05em;
  transition: filter 160ms ease-out, transform 100ms ease-out;
}

.start-button::after {
  position: absolute;
  top: 0;
  left: -35%;
  width: 26%;
  height: 100%;
  content: "";
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-20deg);
  transition: left 260ms ease-out;
}

.start-button:hover {
  filter: brightness(1.1);
}

.start-button:hover::after {
  left: 120%;
}

.start-button:active,
.shuffle-button:active,
.toolbar-button:active,
.secondary-button:active {
  transform: scale(0.97);
}

.keyboard-guide {
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: #8995aa;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
}

.keyboard-guide span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

kbd {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border: 1px solid #66738b;
  border-bottom-width: 3px;
  color: #fff;
  background: #1b2335;
  font: 700 0.65rem "SFMono-Regular", Consolas, monospace;
}

/* Fight screen */
.fight-screen {
  border-color: #515b70;
  background: #080b11;
}

.fight-toolbar {
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #303849;
  background: linear-gradient(180deg, #1c2231, #101522);
}

.stage-label {
  display: grid;
  text-align: center;
}

.stage-label span {
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
}

.stage-label strong {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
}

.toolbar-button {
  min-width: 100px;
  font-size: 0.75rem;
}

.fight-cabinet {
  position: relative;
  overflow: hidden;
  border: 5px solid #080a0f;
  border-top: 0;
  background: #07090f;
}

.fight-hud {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 8, 0.88), transparent);
}

.hud-fighter {
  min-width: 0;
}

.hud-name {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  text-shadow: 2px 2px #000;
}

.hud-name span {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.hud-fighter--cpu .hud-name {
  flex-direction: row-reverse;
}

.hud-fighter--cpu .hud-name span {
  color: #ff7280;
}

.hud-name strong {
  overflow: hidden;
  font-size: clamp(0.86rem, 2vw, 1.18rem);
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-frame {
  height: 20px;
  padding: 3px;
  border: 2px solid #f2e7bd;
  background: #121418;
  box-shadow: 3px 3px 0 #05060a;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.hud-fighter--cpu .life-frame {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%);
}

.life-frame span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2bc666 0 58%, #e6cf3d 78%, #ef3d4e 100%);
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 110ms ease-out, filter 180ms ease-out;
}

.hud-fighter--cpu .life-frame span {
  transform-origin: right center;
}

.meter-row {
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.round-pips {
  display: flex;
  gap: 4px;
}

.round-pip {
  width: 12px;
  height: 12px;
  border: 1px solid #718099;
  background: #121622;
  transform: rotate(45deg);
}

.round-pip.is-won {
  border-color: #fff2a0;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 211, 79, 0.5);
}

.power-frame {
  width: min(55%, 230px);
  height: 8px;
  padding: 2px;
  border: 1px solid #6f7790;
  background: #07090d;
}

.power-frame span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), #fff);
  transform: scaleX(0);
  transform-origin: left center;
}

.hud-fighter--cpu .power-frame span {
  background: linear-gradient(90deg, #fff, #ff8a78, var(--red));
  transform-origin: right center;
}

.power-frame.is-max {
  border-color: var(--yellow);
  box-shadow: 0 0 9px rgba(255, 211, 79, 0.55);
}

.round-clock {
  display: grid;
  justify-items: center;
  margin-top: -3px;
  text-shadow: 3px 3px #000;
}

.round-clock span {
  color: #aeb8ca;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
}

.round-clock strong {
  color: var(--yellow);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-style: italic;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.fight-stage {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  isolation: isolate;
  background: #07101a;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.62);
}

.fight-stage::before,
.fight-stage::after {
  position: absolute;
  inset: 0;
  z-index: 21;
  content: "";
  pointer-events: none;
}

.fight-stage::before {
  opacity: 0.12;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.68) 3px 4px);
}

.fight-stage::after {
  box-shadow:
    inset 0 -64px 90px rgba(0, 0, 0, 0.58),
    inset 0 0 110px rgba(0, 0, 0, 0.48);
}

.stage-sky {
  position: absolute;
  inset: 0 0 36%;
  z-index: -10;
  background:
    radial-gradient(circle at 74% 18%, #e3f7ff 0 2.1%, rgba(150, 220, 255, 0.22) 2.5% 7%, transparent 7.5%),
    radial-gradient(ellipse at 51% 92%, rgba(18, 154, 184, 0.28), transparent 43%),
    linear-gradient(180deg, #020711 0%, #07172a 48%, #102e3d 78%, #236174 100%);
}

.stage-sky::before,
.stage-sky::after {
  position: absolute;
  content: "";
}

.stage-sky::before {
  top: 13%;
  left: 11%;
  width: 3px;
  height: 3px;
  background: #d8f6ff;
  box-shadow:
    72px 31px rgba(216, 246, 255, 0.72),
    164px -12px rgba(216, 246, 255, 0.62),
    278px 42px rgba(216, 246, 255, 0.55),
    410px -22px rgba(216, 246, 255, 0.7),
    536px 19px rgba(216, 246, 255, 0.55),
    690px -5px rgba(216, 246, 255, 0.62),
    820px 44px rgba(216, 246, 255, 0.48);
}

.stage-sky::after {
  inset: 47% 0 0;
  opacity: 0.34;
  background: linear-gradient(180deg, transparent, #4cd8e4);
  filter: blur(24px);
}

.stage-clouds {
  position: absolute;
  inset: 3% -35% 50%;
  z-index: -9;
  opacity: 0.82;
  background:
    radial-gradient(ellipse at 8% 55%, rgba(43, 63, 80, 0.72) 0 8%, transparent 9%),
    radial-gradient(ellipse at 20% 38%, rgba(27, 45, 62, 0.9) 0 12%, transparent 13%),
    radial-gradient(ellipse at 39% 59%, rgba(51, 73, 86, 0.75) 0 13%, transparent 14%),
    radial-gradient(ellipse at 58% 35%, rgba(23, 39, 54, 0.88) 0 14%, transparent 15%),
    radial-gradient(ellipse at 76% 57%, rgba(45, 65, 79, 0.8) 0 12%, transparent 13%),
    radial-gradient(ellipse at 92% 32%, rgba(26, 42, 57, 0.86) 0 11%, transparent 12%);
  filter: blur(4px);
  animation: harbor-clouds 22s linear infinite;
}

.stage-cranes {
  position: absolute;
  inset: 17% 0 34%;
  z-index: -7;
  opacity: 0.84;
  background:
    linear-gradient(83deg, transparent 0 13%, #071019 13.2% 14.2%, transparent 14.4%),
    linear-gradient(8deg, transparent 0 34%, #08111b 34.2% 35.4%, transparent 35.6%),
    linear-gradient(96deg, transparent 0 81%, #070f18 81.2% 82.2%, transparent 82.4%),
    linear-gradient(-9deg, transparent 0 67%, #071019 67.2% 68.4%, transparent 68.6%);
}

.stage-cranes::before,
.stage-cranes::after {
  position: absolute;
  top: 4%;
  width: 31%;
  height: 78%;
  content: "";
  border-top: 7px solid #09131d;
  border-left: 9px solid #09131d;
  background: repeating-linear-gradient(136deg, transparent 0 18px, rgba(10, 21, 31, 0.95) 19px 23px, transparent 24px 39px);
  transform: skewX(-5deg);
}

.stage-cranes::before {
  left: 4%;
}

.stage-cranes::after {
  right: 2%;
  transform: scaleX(-1) skewX(-5deg);
}

.stage-city {
  position: absolute;
  inset: 24% -2% 34%;
  z-index: -8;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(66, 230, 255, 0.52) 15px 18px, transparent 19px 31px),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(255, 204, 91, 0.28) 18px 21px, transparent 22px 31px),
    linear-gradient(90deg, #07111b 0 7%, #0b1924 7% 14%, #061019 14% 22%, #0c1b27 22% 31%, #07131e 31% 42%, #0b1b27 42% 54%, #06111b 54% 62%, #0c1a25 62% 74%, #07121c 74% 84%, #0a1924 84% 93%, #061019 93%);
  clip-path: polygon(0 38%, 6% 38%, 6% 18%, 14% 18%, 14% 31%, 22% 31%, 22% 5%, 31% 5%, 31% 25%, 41% 25%, 41% 11%, 53% 11%, 53% 33%, 62% 33%, 62% 3%, 74% 3%, 74% 22%, 84% 22%, 84% 9%, 93% 9%, 93% 35%, 100% 35%, 100% 100%, 0 100%);
  filter: drop-shadow(0 -10px 18px rgba(41, 211, 239, 0.18));
}

.stage-city::before,
.stage-city::after {
  position: absolute;
  bottom: 0;
  content: "";
}

.stage-city::before {
  left: 9%;
  width: 2px;
  height: 72%;
  background: #5ff1ff;
  box-shadow: 88px 26px #ff4d8d, 205px -8px #ffc857, 337px 34px #5ff1ff, 478px 2px #ff4d8d, 612px 22px #ffc857, 758px -12px #5ff1ff, 892px 18px #ff4d8d;
  opacity: 0.7;
}

.stage-city::after {
  right: 0;
  left: 0;
  height: 15%;
  background: linear-gradient(180deg, rgba(59, 227, 255, 0.18), transparent);
}

.stage-gantry {
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: -5;
  width: min(76%, 850px);
  height: 36%;
  border: 10px solid #0b1219;
  border-bottom: 0;
  box-shadow: inset 0 0 0 3px rgba(58, 223, 239, 0.2), 0 0 24px rgba(0, 0, 0, 0.64);
  transform: translateX(-50%);
}

.stage-gantry::before,
.stage-gantry::after {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(45deg, transparent 0 42px, #0d171f 43px 50px, transparent 51px 84px);
}

.stage-gantry::after {
  background: repeating-linear-gradient(-45deg, transparent 0 42px, rgba(14, 25, 34, 0.9) 43px 50px, transparent 51px 84px);
}

.stage-neon {
  position: absolute;
  top: 24%;
  right: 6%;
  left: 6%;
  z-index: -4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.neon-card,
.neon-score {
  display: grid;
  place-items: center;
  border: 3px solid currentColor;
  background: rgba(2, 8, 15, 0.9);
  box-shadow: 0 0 8px currentColor, inset 0 0 12px currentColor;
  text-transform: uppercase;
  animation: neon-breathe 2.2s steps(2, end) infinite;
}

.neon-card {
  width: 108px;
  min-height: 70px;
  color: #46efff;
  transform: rotate(-3deg);
}

.neon-card--right {
  color: #ff4c8c;
  transform: rotate(3deg);
  animation-delay: -0.8s;
}

.neon-card b {
  font-size: 1.42rem;
  letter-spacing: 0.08em;
}

.neon-card small,
.neon-score small,
.neon-score i {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.46rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

.neon-score {
  width: min(34vw, 310px);
  min-height: 86px;
  color: #ffd451;
  border-color: #5defff;
  box-shadow: 0 0 9px #5defff, inset 0 0 18px rgba(93, 239, 255, 0.44);
  transform: translateY(-18px);
}

.neon-score b {
  color: #fff7ca;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.08em;
  text-shadow: 0 0 9px #ff375f, 3px 3px #8b1836;
}

.neon-score i {
  color: #ff527a;
}

.stage-crowd {
  position: absolute;
  right: 0;
  bottom: 25.5%;
  left: 0;
  z-index: -3;
  height: 102px;
  opacity: 0.96;
  background:
    radial-gradient(circle at 3% 34%, #11141c 0 9px, transparent 10px),
    radial-gradient(circle at 10% 18%, #151923 0 11px, transparent 12px),
    radial-gradient(circle at 18% 38%, #0e121a 0 10px, transparent 11px),
    radial-gradient(circle at 27% 15%, #151923 0 12px, transparent 13px),
    radial-gradient(circle at 36% 34%, #10151e 0 10px, transparent 11px),
    radial-gradient(circle at 45% 17%, #171b25 0 11px, transparent 12px),
    radial-gradient(circle at 55% 36%, #10141d 0 10px, transparent 11px),
    radial-gradient(circle at 64% 18%, #161a24 0 12px, transparent 13px),
    radial-gradient(circle at 73% 37%, #10141d 0 10px, transparent 11px),
    radial-gradient(circle at 82% 16%, #171b25 0 11px, transparent 12px),
    radial-gradient(circle at 91% 32%, #10141d 0 11px, transparent 12px),
    linear-gradient(180deg, transparent 0 29px, #0d1119 30px 100%);
}

.stage-crowd::after {
  position: absolute;
  inset: 6px 1% 0;
  content: "";
  opacity: 0.88;
  background:
    linear-gradient(72deg, transparent 8%, #56f4ff 8.3% 8.8%, transparent 9.1%),
    linear-gradient(106deg, transparent 20%, #ff538e 20.3% 20.8%, transparent 21.1%),
    linear-gradient(74deg, transparent 34%, #ffd451 34.3% 34.8%, transparent 35.1%),
    linear-gradient(105deg, transparent 49%, #56f4ff 49.3% 49.8%, transparent 50.1%),
    linear-gradient(73deg, transparent 66%, #ff538e 66.3% 66.8%, transparent 67.1%),
    linear-gradient(107deg, transparent 81%, #ffd451 81.3% 81.8%, transparent 82.1%),
    linear-gradient(75deg, transparent 93%, #56f4ff 93.3% 93.8%, transparent 94.1%);
  filter: drop-shadow(0 0 6px currentColor);
  animation: crowd-lights 1.4s steps(2, end) infinite;
}

.stage-railing {
  position: absolute;
  right: -2%;
  bottom: 24%;
  left: -2%;
  z-index: -2;
  height: 23px;
  border-top: 6px solid #1f333d;
  border-bottom: 4px solid #071018;
  background: repeating-linear-gradient(90deg, #101b22 0 5px, transparent 5px 74px);
  box-shadow: 0 -2px 0 rgba(71, 222, 237, 0.32), 0 7px 14px rgba(0, 0, 0, 0.6);
}

.stage-floor {
  position: absolute;
  inset: 61% -10% -20%;
  z-index: -3;
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(48, 220, 241, 0.12) 28%, transparent 36% 62%, rgba(255, 53, 111, 0.12) 70%, transparent 80%),
    repeating-linear-gradient(90deg, transparent 0 77px, rgba(122, 189, 199, 0.14) 78px 80px),
    repeating-linear-gradient(0deg, transparent 0 45px, rgba(122, 189, 199, 0.13) 46px 48px),
    linear-gradient(180deg, #21363c, #132128 56%, #080d12);
  transform: perspective(360px) rotateX(48deg) scale(1.2);
  transform-origin: top center;
}

.stage-puddles {
  position: absolute;
  inset: 66% 2% 5%;
  z-index: -1;
  opacity: 0.52;
  background:
    radial-gradient(ellipse at 23% 42%, rgba(75, 233, 255, 0.36) 0 8%, transparent 18%),
    radial-gradient(ellipse at 76% 57%, rgba(255, 72, 137, 0.28) 0 7%, transparent 17%),
    radial-gradient(ellipse at 52% 80%, rgba(255, 213, 81, 0.16) 0 5%, transparent 14%);
  filter: blur(3px);
  transform: skewX(-8deg);
}

.stage-foreground {
  position: absolute;
  right: -4%;
  bottom: -8px;
  left: -4%;
  z-index: 12;
  height: 33px;
  border-top: 5px solid #33454a;
  background:
    repeating-linear-gradient(135deg, #10171c 0 22px, #e2aa32 23px 38px, #10171c 39px 60px),
    #10171c;
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.7), inset 0 3px rgba(255, 232, 159, 0.2);
  transform: rotate(-0.8deg);
}

.stage-rain {
  position: absolute;
  inset: -35% -25%;
  z-index: 16;
  opacity: 0.24;
  pointer-events: none;
  background: repeating-linear-gradient(104deg, transparent 0 15px, rgba(194, 240, 255, 0.72) 16px 17px, transparent 18px 31px);
  background-size: 37px 74px;
  filter: blur(0.35px);
  animation: harbor-rain 0.5s linear infinite;
}

.fighter {
  position: absolute;
  bottom: 56px;
  left: var(--fighter-x);
  z-index: 10;
  width: clamp(170px, 22vw, 260px);
  aspect-ratio: 0.94;
  pointer-events: none;
  transform: translateX(-50%);
  transition: filter 100ms ease-out;
  will-change: left, filter;
}

.fighter-sprite {
  position: absolute;
  bottom: 0;
  left: -70%;
  width: 240%;
  height: 240%;
  background-position: center bottom;
  background-size: contain;
  filter: url("#sprite-edge-clean") drop-shadow(0 14px 6px rgba(0, 0, 0, 0.62));
  scale: var(--motion-scale, 1);
  transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing));
  transform-origin: center 88.55%;
  will-change: transform;
}

.fighter-shadow {
  position: absolute;
  right: 18%;
  bottom: clamp(38px, 5vw, 62px);
  left: 18%;
  height: 18px;
  border-radius: 50%;
  opacity: var(--shadow-opacity);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.92) 0 36%, rgba(0, 0, 0, 0.62) 52%, transparent 76%);
  filter: blur(1.5px);
  transform: scale(var(--shadow-scale));
  transform-origin: center;
}

.fighter-shadow::after {
  position: absolute;
  right: 24%;
  bottom: 5px;
  left: 24%;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  content: "";
}

.fighter.is-walking .fighter-sprite {
  animation: fighter-walk 180ms steps(2, end) infinite;
}

.fighter.is-light .fighter-sprite {
  animation: attack-light 220ms ease-out;
}

.fighter.is-heavy .fighter-sprite {
  animation: attack-heavy 360ms ease-out;
}

.fighter.is-special .fighter-sprite {
  filter: url("#sprite-edge-clean") drop-shadow(0 14px 6px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 10px var(--fighter-color));
  animation: attack-special 540ms ease-out;
}

.fighter.is-hit {
  filter: brightness(1.8) saturate(0.5);
}

.fighter.is-hit .fighter-sprite {
  animation: fighter-hit 220ms ease-out;
}

.fighter.is-ko .fighter-sprite {
  animation: fighter-ko 700ms ease-in forwards;
}

.fighter.is-guarding .guard-flash {
  position: absolute;
  top: 24%;
  left: 50%;
  width: 54%;
  aspect-ratio: 1;
  border: 4px solid rgba(111, 218, 255, 0.78);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(78, 182, 255, 0.18), 0 0 18px rgba(78, 182, 255, 0.42);
  transform: translate(-50%, calc(var(--jump-y) * -1));
}

.fighter.is-super {
  filter: drop-shadow(0 0 14px var(--yellow));
}

.effects-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.projectile {
  position: absolute;
  bottom: var(--projectile-y);
  left: var(--projectile-x);
  width: clamp(34px, 5vw, 66px);
  aspect-ratio: 1;
  border: 4px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--projectile-color) 22% 55%, transparent 59%);
  filter: drop-shadow(0 0 10px var(--projectile-color));
  transform: translateX(-50%) scaleX(var(--projectile-facing));
}

.projectile::before,
.projectile::after {
  position: absolute;
  top: 35%;
  right: 74%;
  width: 90%;
  height: 22%;
  content: "";
  background: var(--projectile-color);
  clip-path: polygon(0 50%, 100% 0, 84% 100%);
}

.projectile::after {
  top: 58%;
  width: 65%;
  opacity: 0.6;
}

.projectile.is-arrow {
  width: clamp(52px, 8vw, 96px);
  height: 8px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: var(--projectile-color);
  box-shadow: 0 0 8px var(--projectile-color);
}

.projectile.is-arrow::before {
  top: -7px;
  right: -16px;
  width: 20px;
  height: 22px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.projectile.is-arrow::after {
  display: none;
}

.hit-spark {
  position: absolute;
  top: var(--spark-y);
  left: var(--spark-x);
  width: 16px;
  height: 16px;
  background: #fff7ad;
  box-shadow: 16px 0 #ff6c52, -16px 0 #ff6c52, 0 16px #ffba3b, 0 -16px #ffba3b, 10px 10px #fff, -10px -10px #fff;
  animation: spark-pop 260ms steps(3, end) forwards;
  transform: translate(-50%, -50%);
}

.damage-number {
  position: absolute;
  top: var(--spark-y);
  left: var(--spark-x);
  color: #fff6bd;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  font-weight: 900;
  text-shadow: 2px 2px #8d1d28;
  animation: damage-float 620ms ease-out forwards;
  transform: translate(-50%, -50%);
}

.super-flash {
  position: absolute;
  inset: 0;
  z-index: 17;
  background: radial-gradient(circle at var(--flash-x) 56%, #fff, var(--flash-color) 18%, transparent 48%);
  animation: super-flash 520ms ease-out forwards;
  pointer-events: none;
}

.announcer {
  position: absolute;
  top: 42%;
  right: 0;
  left: 0;
  z-index: 40;
  color: #fff;
  font-size: clamp(3.2rem, 10vw, 7.6rem);
  font-style: italic;
  line-height: 0.9;
  text-align: center;
  text-shadow: 6px 6px 0 #171827, 10px 10px 0 rgba(0, 0, 0, 0.45);
  transform: skewX(-8deg);
  pointer-events: none;
}

.announcer.is-showing {
  animation: announce 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.announcer.is-ko {
  color: var(--red);
  text-shadow: 5px 5px 0 #fff, 10px 10px 0 #52111d;
}

.pause-curtain {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: grid;
  place-content: center;
  color: #fff;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(4px);
  text-align: center;
}

.pause-curtain strong {
  font-size: clamp(2rem, 7vw, 4rem);
  font-style: italic;
}

.pause-curtain span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.fight-statusbar {
  min-height: 42px;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #394155;
  color: #d5dbea;
  background: linear-gradient(180deg, #161d2d, #0d111b);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
}

.combo-readout {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.combo-readout span {
  color: #7f8da5;
  font-size: 0.55rem;
}

.combo-readout strong {
  color: var(--yellow);
  font-size: 1.1rem;
}

.mobile-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1fr);
  gap: 18px;
  padding: 16px 18px;
  border-top: 1px solid #303849;
  background: #0e131f;
}

.direction-pad {
  display: grid;
  width: 218px;
  height: 118px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 7px;
}

.control-key,
.attack-key {
  border: 1px solid #5d687f;
  border-bottom-width: 4px;
  background: linear-gradient(180deg, #283249, #151b2a);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09);
  transition: filter 100ms ease-out, transform 80ms ease-out, border-bottom-width 80ms ease-out;
}

.control-key.is-pressed,
.control-key:active,
.attack-key.is-pressed,
.attack-key:active {
  border-bottom-width: 1px;
  filter: brightness(1.35);
  transform: translateY(3px);
}

.control-key--up {
  grid-column: 2;
}

.control-key--left {
  grid-column: 1;
  grid-row: 2;
}

.control-key--guard {
  grid-column: 2;
  grid-row: 2;
  color: var(--cyan);
  font-size: 0.78rem;
}

.control-key--right {
  grid-column: 3;
  grid-row: 2;
}

.attack-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  align-items: end;
  gap: 10px;
}

.attack-key {
  display: grid;
  min-height: 82px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
}

.attack-key b {
  font-size: 1.1rem;
}

.attack-key span {
  color: #bfc8d8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
}

.attack-key--light {
  border-color: #49a4ff;
  background: linear-gradient(180deg, #2669c7, #18335f);
}

.attack-key--heavy {
  border-color: #ff6e7f;
  background: linear-gradient(180deg, #c73247, #691d2a);
}

.attack-key--special {
  min-height: 104px;
  border-color: #ffe56e;
  background: linear-gradient(180deg, #d89d2f, #74420f);
}

.move-strip {
  justify-content: center;
  gap: 10px;
  padding: 12px;
  color: #9da9bc;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
}

.move-chip {
  padding: 6px 9px;
  border: 1px solid #39445b;
  background: #0d121d;
}

.move-chip b {
  margin-right: 5px;
  color: var(--yellow);
}

.result-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 5, 9, 0.78);
  backdrop-filter: blur(7px);
}

.result-card {
  width: min(460px, 100%);
  padding: 28px;
  border: 2px solid #707d96;
  background:
    linear-gradient(135deg, rgba(47, 121, 255, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(239, 49, 69, 0.18), transparent 42%),
    #111725;
  box-shadow: var(--shadow);
  text-align: center;
  clip-path: polygon(0 0, 94% 0, 100% 8%, 100% 100%, 6% 100%, 0 92%);
}

.result-card p {
  color: #8290a8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

.result-card h2 {
  margin: 8px 0 4px;
  color: var(--yellow);
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-style: italic;
  text-shadow: 5px 5px #57121f;
}

.result-card > span {
  color: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.25rem;
}

.result-card > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.secondary-button {
  min-width: 0;
}

@keyframes fighter-walk {
  0%, 100% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)) translateY(0); }
  50% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)) translateY(-3px); }
}

@keyframes attack-light {
  0%, 100% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  45% { transform: translateY(calc(var(--jump-y) * -1)) translateX(calc(15px * var(--facing))) scaleX(var(--facing)) rotate(-3deg); }
}

@keyframes attack-heavy {
  0%, 100% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  28% { transform: translateY(calc(var(--jump-y) * -1)) translateX(calc(-8px * var(--facing))) scaleX(var(--facing)) rotate(5deg); }
  65% { transform: translateY(calc(var(--jump-y) * -1)) translateX(calc(24px * var(--facing))) scaleX(var(--facing)) rotate(-8deg); }
}

@keyframes attack-special {
  0%, 100% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  35% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  70% { transform: translateY(calc(var(--jump-y) * -1)) translateX(calc(28px * var(--facing))) scaleX(var(--facing)); }
}

@keyframes fighter-hit {
  0%, 100% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  45% { transform: translateY(calc(var(--jump-y) * -1)) translateX(calc(-12px * var(--facing))) scaleX(var(--facing)) rotate(8deg); }
}

@keyframes fighter-ko {
  0% { transform: translateY(calc(var(--jump-y) * -1)) scaleX(var(--facing)); }
  100% { transform: translateY(24px) translateX(calc(-28px * var(--facing))) scaleX(var(--facing)) rotate(82deg); opacity: 0.72; }
}

@keyframes spark-pop {
  0% { transform: translate(-50%, -50%) scale(0.3) rotate(0); opacity: 0; }
  45% { transform: translate(-50%, -50%) scale(1.35) rotate(30deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.4) rotate(70deg); opacity: 0; }
}

@keyframes damage-float {
  0% { transform: translate(-50%, -30%) scale(0.7); opacity: 0; }
  20% { transform: translate(-50%, -70%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -180%) scale(0.9); opacity: 0; }
}

@keyframes super-flash {
  0% { opacity: 0; }
  18% { opacity: 0.95; }
  100% { opacity: 0; }
}

@keyframes announce {
  0% { transform: translateX(-25%) skewX(-8deg) scale(1.6); opacity: 0; }
  34% { transform: translateX(0) skewX(-8deg) scale(1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateX(12%) skewX(-8deg) scale(0.92); opacity: 0; }
}

@keyframes harbor-clouds {
  from { transform: translateX(0); }
  to { transform: translateX(12%); }
}

@keyframes neon-breathe {
  0%, 100% { opacity: 0.82; filter: brightness(0.92); }
  50% { opacity: 1; filter: brightness(1.18); }
}

@keyframes crowd-lights {
  0%, 100% { opacity: 0.58; transform: translateY(0); }
  50% { opacity: 0.98; transform: translateY(-3px); }
}

@keyframes harbor-rain {
  from { transform: translate3d(-3%, -7%, 0); }
  to { transform: translate3d(3%, 7%, 0); }
}

@media (max-width: 900px) {
  .arcade-shell {
    width: min(100% - 16px, 760px);
    padding-top: 10px;
  }

  .select-layout {
    grid-template-columns: 1fr;
  }

  .fighter-profile {
    min-height: 400px;
    align-content: center;
    padding: 18px;
  }

  .profile-sprite {
    top: 50%;
    left: 24%;
    width: min(45%, 276px);
    transform: translate(-50%, -50%) scale(var(--motion-scale, 1));
    transform-origin: center;
  }

  .profile-copy {
    width: 52%;
    margin-left: auto;
  }

  .fight-stage {
    min-height: 500px;
  }
}

@media (max-width: 680px) {
  .arcade-shell {
    width: 100%;
    padding: 0 0 max(14px, env(safe-area-inset-bottom));
  }

  .arcade-header {
    min-height: 62px;
    padding: 7px 10px;
  }

  .brand-kicker {
    font-size: 0.48rem;
  }

  .brand-lockup strong {
    font-size: 1.58rem;
  }

  .career-card {
    min-width: 128px;
    padding: 7px 9px;
  }

  .career-card strong {
    font-size: 0.68rem;
  }

  .select-screen {
    padding: 12px 9px 16px;
    border-right: 0;
    border-left: 0;
    clip-path: none;
  }

  .select-heading > span {
    display: none;
  }

  .roster-grid {
    gap: 6px;
  }

  .roster-card {
    min-height: 144px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 5px;
  }

  .roster-card .character-sprite {
    width: 84%;
    max-width: 96px;
    margin-bottom: 8px;
  }

  .roster-copy {
    gap: 1px;
    padding: 4px;
    background: rgba(5, 7, 12, 0.7);
  }

  .roster-copy strong {
    font-size: 0.73rem;
  }

  .roster-copy span {
    font-size: 0.53rem;
  }

  .fighter-profile {
    display: block;
    min-height: 0;
    padding: 14px 14px 16px;
  }

  .profile-sprite {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    width: min(72vw, 280px);
    margin: 2px auto 24px;
    transform: scale(var(--motion-scale, 1));
    transform-origin: center bottom;
  }

  .profile-copy {
    width: 100%;
    margin: 0;
    padding-top: 12px;
  }

  .profile-copy h2 {
    font-size: 1.55rem;
  }

  .versus-setup {
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
    padding: 10px 6px;
  }

  .versus-player {
    min-width: 0;
  }

  .shuffle-button,
  .start-button {
    grid-column: span 3;
  }

  .keyboard-guide {
    display: none;
  }

  .fight-screen {
    border-right: 0;
    border-left: 0;
  }

  .fight-toolbar {
    padding: 7px 8px;
  }

  .toolbar-button {
    min-width: 86px;
    padding: 7px 9px;
    font-size: 0.68rem;
  }

  .fight-cabinet {
    border-width: 2px;
    border-top: 0;
  }

  .fight-hud {
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    gap: 4px;
    padding: 8px 6px;
  }

  .hud-name strong {
    font-size: 0.72rem;
  }

  .hud-name span {
    font-size: 0.43rem;
  }

  .life-frame {
    height: 15px;
    padding: 2px;
    border-width: 1px;
  }

  .round-clock strong {
    font-size: 2rem;
  }

  .round-clock span {
    font-size: 0.42rem;
  }

  .power-frame {
    width: 68%;
  }

  .round-pip {
    width: 8px;
    height: 8px;
  }

  .fight-stage {
    min-height: 400px;
  }

  .stage-gantry {
    top: 19%;
    width: 88%;
    height: 37%;
    border-width: 7px;
  }

  .stage-neon {
    top: 25%;
    right: 3%;
    left: 3%;
  }

  .neon-card {
    width: 72px;
    min-height: 50px;
    border-width: 2px;
  }

  .neon-card b {
    font-size: 0.92rem;
  }

  .neon-card small {
    display: none;
  }

  .neon-score {
    width: min(42vw, 190px);
    min-height: 61px;
    transform: translateY(-10px);
  }

  .neon-score b {
    font-size: 1.08rem;
  }

  .stage-crowd {
    height: 76px;
  }

  .stage-rain {
    opacity: 0.18;
  }

  .fighter {
    bottom: 42px;
    width: clamp(122px, 38vw, 160px);
  }

  .fight-statusbar {
    font-size: 0.6rem;
  }

  .mobile-controls {
    grid-template-columns: 1fr 1.22fr;
    gap: 10px;
    padding: 12px 9px max(12px, env(safe-area-inset-bottom));
  }

  .direction-pad {
    width: 100%;
    height: 128px;
    gap: 6px;
  }

  .attack-pad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .attack-key {
    min-width: 0;
    min-height: 66px;
  }

  .attack-key--special {
    min-height: 86px;
  }

  .move-strip {
    display: none;
  }
}

@media (max-width: 390px) {
  .career-card span {
    display: none;
  }

  .career-card {
    min-width: 108px;
  }

  .roster-card {
    min-height: 132px;
  }

  .fight-stage {
    min-height: 360px;
  }

  .mobile-controls {
    grid-template-columns: 0.95fr 1.25fr;
  }

  .direction-pad {
    height: 112px;
  }

  .attack-key {
    min-height: 58px;
  }

  .attack-key--special {
    min-height: 74px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .arcade-header {
    display: none;
  }

  .fight-toolbar {
    min-height: 42px;
    padding-block: 3px;
  }

  .fight-stage {
    min-height: calc(100dvh - 180px);
  }

  .mobile-controls {
    position: absolute;
    inset: auto 0 0;
    z-index: 60;
    grid-template-columns: 230px 320px;
    justify-content: space-between;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    pointer-events: none;
  }

  .direction-pad,
  .attack-pad {
    opacity: 0.72;
    pointer-events: auto;
  }

  .move-strip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
