:root {
  color-scheme: dark;
  --app-height: 100dvh;
  --control-scale: 1;
  --ink: #09121d;
  --panel: #101d2d;
  --line: rgba(218, 235, 255, .72);
  --gold: #ffd365;
  --hot: #ff5a49;
  --cyan: #5de4ff;
  --muted: #9fb0c5;
}

* { box-sizing: border-box; }

html, body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  color: #f8fbff;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 50% -10%, #1a526e 0, transparent 37%),
    linear-gradient(145deg, #06101d 0%, #101a32 53%, #070a12 100%);
}

button, kbd { font: inherit; }

.game-shell {
  position: relative;
  width: min(1280px, 100%);
  padding: clamp(8px, 1.5vw, 18px);
  isolation: isolate;
}

.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.4vw, 22px);
  margin: 0 2px 10px;
}

.fighter-hud { display: flex; align-items: center; min-width: 0; gap: 10px; }
.fighter-hud--right { flex-direction: row-reverse; text-align: right; }

.portrait {
  width: clamp(52px, 6.4vw, 80px);
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, #25536c, #132036 66%);
  box-shadow: inset 0 0 18px #0009, 0 5px 10px #0007;
}
.portrait--chicken { border-color: #ffe29a; }
.portrait--dog { border-color: #ffad65; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }

.fighter-bars { min-width: 0; flex: 1; }
.fighter-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 1px 5px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 2px 1px #000;
}
.fighter-hud--right .fighter-name { flex-direction: row-reverse; }
.fighter-name span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.round-wins { color: #ffd95a; font-style: normal; font-size: 12px; letter-spacing: .12em; text-shadow: 0 1px 2px #000; white-space: nowrap; }

.meter {
  position: relative;
  height: 15px;
  margin-top: 3px;
  overflow: hidden;
  border: 1px solid #e2efff;
  border-radius: 3px;
  background: #01050b;
  box-shadow: inset 0 1px 5px #000, 0 1px #ffffff23;
}
.meter__fill { width: 100%; height: 100%; transition: width 100ms linear; }
.meter b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 1px 2px #000, 1px 0 #000;
  pointer-events: none;
}
.meter--hp .meter__fill { background: linear-gradient(90deg, #8b101f, #f33145 60%, #ff9278); }
.meter--guard { height: 8px; border-color: #91ddff; }
.meter--guard .meter__fill { background: linear-gradient(90deg, #155d93, #70e3ff); }
.meter--guard b { display: none; }
.meter--energy { height: 9px; border-color: #ffd363; }
.meter--energy .meter__fill { background: linear-gradient(90deg, #b45e00, #ffc226 58%, #ffffa9); }

.round-panel { text-align: center; filter: drop-shadow(0 3px 2px #000b); }
.round-panel__label { color: #b5d7ed; font-size: 10px; font-weight: 800; letter-spacing: .18em; white-space: nowrap; }
.timer { color: #fff1a1; font-size: clamp(36px, 4vw, 54px); font-weight: 950; line-height: .9; text-shadow: 3px 3px #06101d, 0 0 15px #ffba2a77; }
.round-state { margin-top: 4px; color: #c9d9e8; font-size: 10px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }

.canvas-wrap { position: relative; overflow: hidden; border: 2px solid #e2f1ff; border-radius: 9px; box-shadow: 0 12px 38px #000c, inset 0 0 30px #0008; background: #0b4d71; }
canvas { display: block; width: 100%; height: auto; max-height: 70vh; touch-action: none; }

.status-banner {
  position: absolute;
  top: 11%; left: 50%;
  transform: translateX(-50%) scale(.8);
  padding: 7px 18px;
  color: #fff7cf;
  font-size: clamp(18px, 2.8vw, 34px);
  font-weight: 950;
  font-style: italic;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 3px 2px #000, 0 0 16px #ff9500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms, transform 150ms;
}
.status-banner.is-visible { opacity: 1; transform: translateX(-50%) scale(1); }

.touch-controls { display: none; }

.control-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 18px;
  margin: 10px 3px 0;
  color: #bdd0e2;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.control-card__minor { color: #8097ad; }
#control-bindings { display: contents; }
kbd { display: inline-block; min-width: 18px; margin: 0 1px; padding: 1px 4px; color: #fff; font-size: 10px; font-weight: 800; border: 1px solid #83a2ba; border-radius: 3px; background: #1e3143; box-shadow: 0 2px #02060c; }

.training-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 7px 3px 0; padding: 7px 10px; color: #d9efff; font-size: 10px; border: 1px solid #579ac5; border-radius: 7px; background: linear-gradient(100deg, #102d45, #0b192a); box-shadow: inset 0 1px #c8f2ff22; }
.training-toolbar b { color: #ffe48c; letter-spacing: .12em; }
.training-toolbar span { color: #a9d9ef; font-variant-numeric: tabular-nums; }

.screen {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(3, 9, 17, .78);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms, visibility 160ms;
}
.screen--visible { opacity: 1; visibility: visible; }
.screen__panel {
  max-width: 670px;
  padding: clamp(24px, 4vw, 48px);
  text-align: center;
  border: 1px solid #ffdf7a;
  border-radius: 14px;
  background: linear-gradient(145deg, #172b42f5, #0c1323f5);
  box-shadow: 0 0 0 5px #03070ebf, 0 20px 65px #000c, inset 0 1px #fff3;
}
.screen__panel--small { min-width: min(410px, 90vw); }
.screen__panel--settings { width: min(720px, 96vw); max-width: 720px; padding-block: clamp(20px, 3vw, 32px); }
.eyebrow { margin: 0 0 10px; color: #91c7e6; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.screen h1, .screen h2 { margin: 0; color: #fff3b5; font-size: clamp(31px, 5vw, 52px); line-height: 1.14; font-weight: 950; letter-spacing: .03em; text-shadow: 3px 4px #0b1320, 0 0 16px #f99e2688; }
.screen h1 i { color: var(--hot); font-size: .65em; font-style: normal; }
.screen h2 { font-size: clamp(28px, 4vw, 42px); }
.screen__lead { margin: 16px auto 20px; color: #d6e2ed; line-height: 1.7; }
.screen__hint { margin: 12px 0 0; color: #91a7ba; font-size: 11px; }
.home-panel { width: min(860px, 96vw); max-height: calc(100vh - 24px); padding: clamp(22px, 4vw, 42px); overflow: auto; background: radial-gradient(circle at 50% 0%, #285574d9, #101a2bf7 52%, #080d18fa); }
.home-title-row { display: grid; grid-template-columns: minmax(72px, 150px) minmax(0, 1fr) minmax(72px, 150px); align-items: center; gap: clamp(4px, 1.5vw, 16px); margin: 4px auto 18px; }
.home-title-row img { width: min(15vw, 132px); height: min(17vw, 145px); object-fit: contain; filter: drop-shadow(0 10px 9px #000a); animation: home-fighter-float 2.6s ease-in-out infinite alternate; }
.home-title-row img:last-child { animation-delay: -.9s; }
.home-title-row h1 { font-size: clamp(32px, 5.25vw, 58px); white-space: nowrap; }
.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.home-actions button { margin: 0; }
.home-actions button:first-child { min-width: 210px; }
.home-guide { max-width: 610px; margin: 14px auto 0; color: #b7d3e6; text-align: left; border: 1px solid #416d8d; border-radius: 8px; background: #07142491; }
.home-guide summary { padding: 8px 11px; color: #ffe497; font-size: 11px; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.home-guide p { margin: 0; padding: 0 11px 8px; font-size: 11px; line-height: 1.65; }
.home-guide b { color: #fff4b8; }
.selection-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: -2px 0 4px; }
.selection-top .eyebrow { margin: 0; }
button:disabled { cursor: wait; filter: grayscale(.35); opacity: .68; transform: none; }
@keyframes home-fighter-float { to { transform: translateY(-7px) rotate(-2deg); } }
.roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto 12px;
}
.roster--cpu { margin-bottom: 5px; }
.selection-label, .settings-title { margin: 10px 0 6px; color: #b9dffc; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.select-target { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 8px auto 2px; }
.select-target button { width: 100%; }
.roster-card {
  min-width: 0;
  min-height: 102px;
  margin: 0;
  padding: 5px 6px 7px;
  color: #e7f4ff;
  font-size: 12px;
  letter-spacing: .04em;
  border: 1px solid #426b8b;
  border-radius: 8px;
  background: linear-gradient(145deg, #18334c, #0b1728);
  box-shadow: inset 0 1px #dff4ff22, 0 2px #040912;
}
.roster-card:hover { filter: brightness(1.18); transform: translateY(-1px); }
.roster-card:active { transform: translateY(1px); box-shadow: inset 0 1px #dff4ff22, 0 1px #040912; }
.roster-card.is-selected { color: #fff4a8; border-color: #ffe38b; background: linear-gradient(145deg, #315a71, #172940); box-shadow: 0 0 0 2px #ffd15e66, 0 0 20px #ffbb4b42, inset 0 1px #fff9; }
.roster-card img { display: block; width: 74px; height: 66px; margin: 0 auto 2px; object-fit: contain; }
.cpu-pick { margin: 3px 0 12px; color: #a6d9ff; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.fighter-briefing {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  margin: 3px 0 10px;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid #3b6685;
  border-radius: 7px;
  background: linear-gradient(100deg, #102940, #0d192a);
}
.fighter-briefing span { color: #8fc3e8; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.fighter-briefing b { color: #ffe49a; font-size: 13px; letter-spacing: .08em; }
.fighter-briefing p { grid-column: 1 / -1; margin: 0; color: #c6d9e9; font-size: 11px; line-height: 1.45; }
.difficulty-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 auto 7px; }
.difficulty-picker#mode-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#mode-picker button { padding-inline: 5px; letter-spacing: .02em; }
.difficulty-picker button { width: 100%; min-width: 0; margin: 0; }
.difficulty-picker button.is-selected { color: #1b1510; border-color: #fff4c2; background: linear-gradient(180deg, #ffec8c, #ffb62d); box-shadow: 0 2px #8d4803, inset 0 1px #fff9; }
.cpu-trait { margin: -8px 0 10px; color: #87bcd9; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.online-options { margin: 5px 0 8px; padding: 8px 10px; border: 1px solid #7b70bb; border-radius: 8px; background: linear-gradient(115deg, #191d44, #10263d); }
.online-options .selection-label { margin-top: 0; color: #d7d1ff; }
.online-copy { max-width: 590px; margin: 0 auto 7px; color: #bdd9f0; font-size: 10px; line-height: 1.45; }
.online-actions { display: grid; grid-template-columns: auto minmax(110px, 1fr) auto; gap: 6px; align-items: end; max-width: 610px; margin: 0 auto; }
.online-actions button { margin: 0; }
.online-code-field { display: grid; gap: 3px; color: #bdc6f8; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-align: left; }
.online-code-field input { min-width: 0; padding: 6px 8px; color: #fff6bc; font: 900 13px/1.1 ui-monospace, Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; border: 1px solid #777ec7; border-radius: 5px; outline: none; background: #080f27; }
.online-code-field input:focus { border-color: #fff0a5; box-shadow: 0 0 0 2px #aaa3ff42; }
.online-status { min-height: 15px; margin: 7px 0 0; color: #a9d7ff; font-size: 10px; font-weight: 800; }
button { min-width: 154px; margin: 4px; padding: 12px 23px; color: #1b1510; font-weight: 950; letter-spacing: .09em; cursor: pointer; border: 1px solid #fff4c2; border-radius: 6px; background: linear-gradient(180deg, #ffec8c, #ffb62d); box-shadow: 0 4px #8d4803, inset 0 1px #fff9; transition: transform 100ms, filter 100ms; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:active { transform: translateY(3px); box-shadow: 0 1px #8d4803; }
.button--secondary { color: #dfeeff; border-color: #82acd0; background: linear-gradient(180deg, #315676, #173247); box-shadow: 0 4px #07121d, inset 0 1px #c9ecff3d; }
.button--compact { min-width: 0; margin: 0; padding: 5px 12px; font-size: 10px; letter-spacing: .06em; box-shadow: 0 2px #07121d, inset 0 1px #c9ecff3d; }
.key-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0 0 13px; }
.binding-row { display: flex; align-items: center; justify-content: space-between; min-width: 0; min-height: 36px; margin: 0; padding: 7px 9px; color: #ddecf8; font-size: 10px; letter-spacing: 0; text-align: left; border-color: #456e8d; border-radius: 6px; background: #10243a; box-shadow: inset 0 1px #dff4ff17; }
.binding-row kbd { color: #fff5b8; border-color: #d7b765; background: #473314; box-shadow: none; }
.binding-row.is-listening { color: #fff5b8; border-color: #ffe080; background: #4a3916; animation: binding-pulse .8s infinite alternate; }
.volume-setting { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 0; color: #cce5f7; font-size: 12px; font-weight: 800; }
.volume-setting input { width: min(330px, 52vw); accent-color: #ffd05a; }
.volume-setting output { width: 38px; color: #fff3ae; font-variant-numeric: tabular-nums; }
@keyframes binding-pulse { to { filter: brightness(1.22); } }

/* 选人页只保留一组角色卡，通过“玩家 / CPU”切换选择对象；常见笔记本高度无需滚动。 */
#start-screen .screen__panel { width: min(760px, 96vw); max-width: 760px; max-height: calc(100vh - 20px); padding: clamp(14px, 2.2vw, 26px); overflow: auto; }
#start-screen .eyebrow { margin-bottom: 5px; }
#start-screen h1 { font-size: clamp(28px, 4vw, 44px); }
#start-screen .screen__lead { max-width: 590px; margin: 7px auto 9px; font-size: 13px; line-height: 1.45; }
#start-screen .selection-label { margin: 6px 0 4px; }
#start-screen .roster { margin-bottom: 6px; }
#start-screen .roster-card { min-height: 72px; padding: 3px 5px 5px; }
#start-screen .roster-card img { width: 62px; height: 51px; margin-bottom: 0; }
#start-screen .fighter-briefing { margin: 2px 0 6px; padding: 6px 9px; }
#start-screen .fighter-briefing p { font-size: 10px; line-height: 1.35; }
  #start-screen .difficulty-picker { margin-bottom: 4px; }
#start-screen .cpu-pick { margin: 3px 0 4px; }
#start-screen .cpu-trait { margin: 0 0 6px; }
#start-screen .screen__hint { margin-top: 7px; }
#home-screen .screen__hint { margin-top: 9px; }

@media (max-height: 720px) {
  #start-screen .screen__panel { padding: 10px 14px; }
  #start-screen .screen__lead { display: none; }
  #start-screen .roster-card { min-height: 58px; font-size: 10px; }
  #start-screen .roster-card img { width: 48px; height: 38px; }
  #start-screen .fighter-briefing { padding-block: 4px; }
  #start-screen .fighter-briefing p { display: none; }
  #start-screen .cpu-trait, #start-screen .screen__hint { display: none; }
  .online-copy { margin-bottom: 4px; }
  .online-options { padding: 5px 7px; }
  .home-panel { padding-block: 14px; }
  .home-title-row img { width: min(13vw, 94px); height: min(14vw, 105px); }
  .home-guide { margin-top: 9px; }
}

@media (max-width: 680px) {
  .game-shell { padding: 7px; }
  .hud { grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); gap: 5px; margin-bottom: 6px; }
  .portrait { display: none; }
  .fighter-hud { gap: 0; }
  .fighter-name { font-size: 12px; letter-spacing: .02em; }
  .fighter-name span, .round-panel__label { display: none; }
  .meter { height: 11px; }
  .meter--guard, .meter--energy { height: 5px; }
  .meter b { font-size: 7px; }
  .timer { font-size: 31px; }
  .round-state { font-size: 7px; letter-spacing: .04em; }
  .control-card { gap: 4px 9px; font-size: 9px; }
  .screen__panel { padding: 24px 16px; }
  .home-panel { padding: 18px 12px; }
  .home-title-row { grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 0; }
  .home-title-row img { width: 70px; height: 92px; }
  .home-title-row h1 { font-size: clamp(25px, 7vw, 36px); }
  .home-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-actions button, .home-actions button:first-child { width: 100%; min-width: 0; padding-inline: 8px; }
  .home-actions button:first-child { grid-column: 1 / -1; }
  .online-actions { grid-template-columns: 1fr 1.15fr; }
  .online-code-field { grid-row: 1 / span 2; grid-column: 2; }
  .online-actions button { min-width: 0; padding-inline: 7px; }
  .home-guide p { font-size: 10px; }
  .selection-top { margin: 0 0 3px; }
  #start-screen .screen__panel { padding: 12px; }
  .roster { gap: 5px; }
  .roster-card { min-height: 82px; padding: 3px; font-size: 10px; }
  .roster-card img { width: 61px; height: 52px; }
  .fighter-briefing { padding: 6px 8px; }
  .fighter-briefing p { font-size: 10px; }
  .key-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .binding-row { min-height: 32px; padding: 5px 7px; font-size: 9px; }
}

@media (pointer: coarse), (hover: none) {
  html, body { width: 100%; height: var(--app-height); min-width: 0; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  body { display: block; }
  .game-shell { width: 100vw; height: var(--app-height); min-height: 0; max-height: var(--app-height); padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); display: flex; flex-direction: column; overflow: hidden; }
  .home-panel { width: min(760px, 96vw); max-height: calc(var(--app-height) - 12px); padding: 13px 11px; }
  .home-title-row img { width: min(16vw, 96px); height: min(18vw, 108px); }
  .home-guide { margin-top: 8px; }
  .home-guide summary { padding: 6px 9px; font-size: 9px; }
  .home-guide p { font-size: 9px; line-height: 1.45; }
  .hud { flex: none; min-height: 0; margin: 0 1px 4px; }
  .canvas-wrap { width: 100%; flex: 1 1 0; min-height: 0; display: grid; place-items: center; }
  canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; }
  .touch-controls { display: block; position: absolute; z-index: 3; inset: 0; margin: 0; pointer-events: none; touch-action: none; user-select: none; -webkit-user-select: none; }
  .mobile-joystick { display: grid; position: absolute; z-index: 1; left: calc(14px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); place-items: center; gap: 3px; color: #d9efff; font-size: 10px; font-weight: 900; letter-spacing: .08em; pointer-events: auto; touch-action: none; transform: scale(var(--control-scale)); transform-origin: left bottom; -webkit-tap-highlight-color: transparent; }
  .mobile-joystick__ring { position: relative; width: 142px; height: 142px; border: 3px solid #b6dcf7bd; border-radius: 50%; background: radial-gradient(circle, #5591ba5d 0 42%, #0a2035d9 43% 100%); box-shadow: inset 0 0 27px #bceaff48, 0 6px 18px #0009; }
  .mobile-joystick__knob { position: absolute; top: 50%; left: 50%; width: 62px; height: 62px; border: 3px solid #e6f8ff; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d9f7ff, #39779f 63%, #173755); box-shadow: 0 4px 10px #0009; transform: translate(-50%, -50%); will-change: transform; }
  .touch-controls__actions { display: grid; position: absolute; z-index: 1; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 270px; height: 204px; grid-template-columns: 82px 90px 90px; grid-template-rows: 58px 142px; grid-template-areas: "jump crouch crouch" "combo heavy light"; gap: 4px; pointer-events: auto; transform: scale(var(--control-scale)); transform-origin: right bottom; }
  .touch-button { display: grid; min-width: 0; margin: 0; padding: 4px 2px; place-items: center; align-content: center; gap: 1px; color: #e9f8ff; border: 1px solid #78acd0; border-radius: 12px; background: linear-gradient(180deg, #2d5a79, #132a43); box-shadow: 0 3px #06101d, inset 0 1px #e6f9ff35; -webkit-tap-highlight-color: transparent; touch-action: none; }
  .touch-button b { color: #fff6b4; font-size: 23px; line-height: 1; }
  .touch-button span { color: #c8e2f5; font-size: 10px; font-weight: 800; line-height: 1; white-space: nowrap; }
  .touch-button--jump { grid-area: jump; }
  .touch-button--crouch { grid-area: crouch; }
  .touch-button--light { grid-area: light; border-color: #8de6ff; background: linear-gradient(180deg, #266d95, #12334e); }
  .touch-button--heavy { grid-area: heavy; border-color: #ffaf70; background: linear-gradient(180deg, #79402e, #3e1d27); }
  .touch-button--special { grid-area: special; border-color: #ffe47d; background: linear-gradient(180deg, #815b1c, #3f2916); }
  .touch-button--special { grid-area: combo; }
  .touch-button--utility b { font-size: 17px; }
  .touch-button--utility span { font-size: 8px; }
  .touch-button--light b, .touch-button--heavy b, .touch-button--special b { font-size: 30px; }
  .touch-button.is-pressed, .touch-button:active { transform: translateY(2px) scale(.97); filter: brightness(1.28); box-shadow: 0 1px #06101d, inset 0 1px #fff8; }
  .control-card { display: none; }
  .training-toolbar { display: none; }
  .screen { padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); overflow: hidden; }
  #start-screen .screen__panel { width: min(700px, 96vw); max-height: calc(var(--app-height) - 12px); padding: 10px; overflow: auto; overscroll-behavior: contain; }
  #start-screen .eyebrow { margin: 0 0 3px; font-size: 8px; }
  #start-screen h1 { font-size: clamp(23px, 4vw, 31px); }
  #start-screen .screen__lead, #start-screen .screen__hint, #start-screen .fighter-briefing p { display: none; }
  #start-screen .selection-label { margin: 3px 0; font-size: 9px; }
  #start-screen .roster { gap: 4px; margin-bottom: 5px; }
  #start-screen .roster-card { min-height: 47px; padding: 2px; font-size: 9px; }
  #start-screen .roster-card img { width: 44px; height: 34px; margin-bottom: 0; }
  #start-screen .fighter-briefing { margin: 2px 0 5px; padding: 5px 7px; }
  #start-screen .difficulty-picker { margin-bottom: 3px; }
  #start-screen .difficulty-picker#mode-picker { gap: 3px; }
  #start-screen #mode-picker button { padding-inline: 2px; font-size: 8px; }
  #start-screen .cpu-pick, #start-screen .cpu-trait { margin: 3px 0; font-size: 9px; }
  #start-screen #start-button { min-width: 136px; margin: 2px; padding: 8px 14px; font-size: 11px; }
}

@media (pointer: coarse) and (max-height: 520px), (hover: none) and (max-height: 520px) {
  .mobile-joystick { left: 10px; bottom: 9px; }
  .mobile-joystick__ring { width: 126px; height: 126px; }
  .mobile-joystick__knob { width: 54px; height: 54px; }
  .touch-controls__actions { right: 9px; bottom: 9px; width: 238px; height: 180px; grid-template-columns: 72px 79px 79px; grid-template-rows: 51px 126px; gap: 3px; }
  .touch-button { border-radius: 9px; }
  .touch-button b { font-size: 19px; }
  .touch-button--light b, .touch-button--heavy b, .touch-button--special b { font-size: 26px; }
  .touch-button span { font-size: 8px; }
  #start-screen .screen__panel { padding: 7px 8px; }
  #start-screen h1 { font-size: 22px; }
  #start-screen .roster-card { min-height: 42px; }
  #start-screen .roster-card img { width: 39px; height: 29px; }
}

/* v0.44 · 统一街机界面：将对局信息、菜单和触控操作收束为同一套层级。 */
:root {
  --ink: #07101d;
  --panel: #0d1b2e;
  --panel-2: #102a43;
  --line: rgba(155, 215, 255, .48);
  --line-soft: rgba(155, 215, 255, .18);
  --gold: #ffd56a;
  --gold-deep: #c67812;
  --hot: #ff6a5b;
  --cyan: #72e5ff;
  --muted: #9db1c7;
}

body {
  background:
    radial-gradient(ellipse at 50% -18%, #24789a 0, transparent 44%),
    radial-gradient(ellipse at 10% 100%, #172c59 0, transparent 38%),
    linear-gradient(150deg, #040914 0%, #0a1627 54%, #050913 100%);
}

.game-shell {
  width: min(1400px, 100%);
  padding: clamp(10px, 1.6vw, 24px);
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border: 1px solid rgba(124, 202, 246, .1);
  border-radius: 24px;
  background:
    linear-gradient(rgba(124, 202, 246, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 202, 246, .025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hud {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr);
  gap: clamp(12px, 2.1vw, 34px);
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(7, 17, 31, .88), rgba(18, 48, 72, .6), rgba(7, 17, 31, .88));
  box-shadow: inset 0 1px rgba(225, 247, 255, .08), 0 8px 28px rgba(0, 0, 0, .24);
}
.hud::after {
  content: "";
  position: absolute;
  inset: 11px 50% 11px auto;
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 213, 106, .5), transparent);
}
.fighter-hud { gap: 12px; }
.portrait {
  width: clamp(56px, 5.9vw, 78px);
  border: 1px solid #a8dcf5;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 18%, #376e8d, #10253a 70%);
  box-shadow: inset 0 0 20px #0008, 0 4px 15px #0008;
}
.portrait::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; pointer-events: none; }
.fighter-name { margin-bottom: 6px; color: #fff0a1; font-size: clamp(12px, 1.3vw, 15px); letter-spacing: .1em; }
.fighter-name span { color: #9abbd2; font-size: 9px; }
.round-wins { color: #ffdf6a; font-size: 13px; }
.meter { height: 16px; margin-top: 4px; border-color: rgba(222, 244, 255, .72); border-radius: 5px; background: #040911; box-shadow: inset 0 2px 7px #000, 0 1px rgba(255,255,255,.14); }
.meter::before { content: ""; position: absolute; inset: 1px; opacity: .2; background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 22px); pointer-events: none; }
.meter b { z-index: 1; font-size: 9px; }
.meter--guard { height: 6px; border-color: #68c7ee; }
.meter--energy { height: 7px; border-color: #eec55d; }
.round-panel__label { color: #9ed6f0; font-size: 10px; letter-spacing: .23em; }
.timer { font-size: clamp(40px, 4.2vw, 58px); color: #fff3ad; text-shadow: 3px 4px #07101d, 0 0 20px rgba(255, 194, 58, .42); }
.round-state { color: #cfdeed; font-size: 9px; letter-spacing: .14em; }

.canvas-wrap {
  border: 1px solid rgba(214, 239, 255, .85);
  border-radius: 18px;
  background: #071729;
  box-shadow: 0 18px 44px #000b, 0 0 0 4px rgba(31, 83, 114, .36), inset 0 0 34px #0009;
}
.canvas-wrap::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .22), inset 0 -50px 50px rgba(3, 9, 18, .22);
  pointer-events: none;
}
.canvas-wrap canvas { position: relative; z-index: 0; }
.status-banner { z-index: 2; padding: 8px 20px; border: 1px solid rgba(255, 231, 137, .55); border-radius: 999px; background: linear-gradient(90deg, transparent, rgba(4, 12, 22, .72), transparent); }

.control-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  margin: 12px 0 0;
  padding: 9px 12px;
  color: #c0d8e9;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(14, 37, 57, .9), rgba(8, 20, 34, .94));
  box-shadow: inset 0 1px rgba(229, 248, 255, .08);
}
.control-card__main { display: flex; align-items: center; min-width: 0; gap: 11px; }
.control-card__title { flex: none; color: #ffd972; font-size: 10px; font-weight: 950; letter-spacing: .14em; }
#control-bindings { min-width: 0; }
.command-essentials { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: #d2e4f1; font-size: 10px; line-height: 1.35; }
.command-essentials span { white-space: nowrap; }
.command-details { display: inline-block; margin-left: 9px; color: #9bbcd1; font-size: 10px; }
.command-details summary { color: #8edbf4; font-weight: 800; cursor: pointer; }
.command-details[open] { display: block; margin: 7px 0 0; padding: 8px 9px; border-left: 2px solid #e7bb54; border-radius: 4px; background: rgba(5, 13, 23, .75); }
.command-details__copy { max-width: 900px; color: #b8cce0; line-height: 1.65; }
.command-details__copy + .command-details__copy { margin-top: 4px; }
.control-card__actions { display: flex; align-items: center; gap: 5px; }
.control-card kbd { min-width: 21px; padding: 2px 5px; color: #fff6c2; border-color: #5d819a; border-radius: 4px; background: #142b40; box-shadow: 0 1px #000; }

.training-toolbar { margin: 9px 0 0; border-color: rgba(111, 206, 246, .43); border-radius: 11px; background: linear-gradient(100deg, #0c2940, #0a1728); }
.training-toolbar[hidden] { display: none !important; }

.screen {
  z-index: 5;
  background: radial-gradient(circle at 50% 18%, rgba(23, 65, 91, .46), rgba(2, 8, 17, .9) 68%);
  backdrop-filter: blur(12px) saturate(.82);
  transition: opacity 180ms, visibility 180ms;
}
.screen__panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(252, 222, 127, .8);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% -18%, rgba(72, 146, 184, .45), transparent 43%),
    linear-gradient(140deg, rgba(16, 42, 66, .98), rgba(7, 15, 29, .98) 66%);
  box-shadow: 0 0 0 5px rgba(2, 7, 14, .7), 0 28px 90px rgba(0, 0, 0, .75), inset 0 1px rgba(255,255,255,.16);
  transform: translateY(12px) scale(.985);
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
}
.screen__panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(166, 219, 245, .12);
  border-radius: 14px;
  pointer-events: none;
}
.screen--visible .screen__panel { transform: translateY(0) scale(1); }
.eyebrow { position: relative; color: #a5d9f4; font-size: 10px; letter-spacing: .24em; }
.screen h1, .screen h2 { position: relative; color: #fff1a6; text-shadow: 3px 4px #07101d, 0 0 18px rgba(255, 179, 52, .5); }
.screen__lead { position: relative; color: #c6d9e8; }
.screen__hint { position: relative; color: #8fa9bf; }

button {
  min-width: 142px;
  padding: 11px 18px;
  border-color: #ffe8a3;
  border-radius: 9px;
  background: linear-gradient(180deg, #fff0a0, #ffc13d 58%, #e89717);
  box-shadow: 0 4px #9b5205, inset 0 1px #fffdf0;
}
button:hover { filter: brightness(1.1) saturate(1.08); }
button:active { box-shadow: 0 1px #9b5205; }
.button--secondary {
  color: #e5f5ff;
  border-color: #6fb3dd;
  background: linear-gradient(180deg, #315f80, #18374f 62%, #10253a);
  box-shadow: 0 4px #06111d, inset 0 1px rgba(229, 250, 255, .28);
}
.button--compact { padding: 6px 11px; border-radius: 7px; font-size: 10px; }
.button--compact.is-selected, .difficulty-picker button.is-selected { color: #2b1b05; border-color: #fff4c4; background: linear-gradient(180deg, #fff0a5, #ffc342); box-shadow: 0 3px #97500a, inset 0 1px #fff; }

.home-panel { width: min(900px, 96vw); padding: clamp(26px, 4vw, 50px); background: radial-gradient(ellipse at 50% 0%, rgba(67, 148, 190, .58), rgba(12, 29, 49, .98) 54%, rgba(5, 10, 20, .99)); }
.home-panel .eyebrow { margin-bottom: 6px; }
.home-title-row { position: relative; grid-template-columns: minmax(82px, 160px) minmax(0, 1fr) minmax(82px, 160px); gap: clamp(8px, 1.6vw, 20px); margin: 4px auto 20px; }
.home-title-row::before { content: ""; position: absolute; top: 50%; right: 12%; left: 12%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 217, 112, .45), transparent); }
.home-title-row img { z-index: 1; width: min(16vw, 142px); height: min(18vw, 152px); filter: drop-shadow(0 12px 12px #000c); }
.home-title-row h1 { position: relative; z-index: 1; font-size: clamp(34px, 5.4vw, 62px); letter-spacing: .02em; }
.home-actions { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 660px; }
.home-actions button { width: 100%; min-width: 0; margin: 0; }
.home-actions button:first-child { grid-column: 1 / -1; min-width: 0; font-size: 16px; }
.home-guide { position: relative; max-width: 660px; border-color: rgba(113, 185, 224, .45); border-radius: 10px; background: rgba(5, 17, 30, .58); }
.home-guide summary { color: #ffe29a; }

#start-screen .screen__panel { width: min(1080px, 97vw); max-width: 1080px; max-height: calc(100vh - 26px); padding: clamp(18px, 2.8vw, 32px); }
#start-screen h1 { font-size: clamp(30px, 4vw, 46px); }
#start-screen .screen__lead { margin: 6px auto 13px; font-size: 13px; }
.match-setup { display: grid; grid-template-columns: minmax(245px, .78fr) minmax(430px, 1.22fr); gap: 11px; align-items: stretch; margin-top: 7px; }
.match-setup__column { padding: 10px; border: 1px solid rgba(104, 181, 224, .31); border-radius: 12px; background: linear-gradient(145deg, rgba(19, 54, 78, .72), rgba(6, 20, 34, .72)); box-shadow: inset 0 1px rgba(223, 246, 255, .08); }
.match-setup__column--config { display: flex; flex-direction: column; }
.match-setup__column .selection-label:first-child { margin-top: 0; }
.selection-label, .settings-title { color: #9edaf6; font-size: 10px; letter-spacing: .16em; }
.select-target { gap: 6px; }
.select-target button { min-height: 38px; }
.difficulty-picker#mode-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#mode-picker button { min-height: 36px; padding-inline: 5px; }
.cpu-options-card { margin-top: auto; padding-top: 7px; border-top: 1px solid rgba(128, 196, 231, .18); }
.cpu-options-card .selection-label { margin-top: 2px; }
.cpu-pick { margin: 6px 0 2px; color: #d8efff; font-size: 11px; }
.cpu-trait { margin: 0; color: #8ec1de; font-size: 10px; }
.match-setup__column--roster { display: flex; flex-direction: column; }
.match-setup__column--roster .selection-label { margin-top: 0; }
.roster { gap: 7px; margin: 0 0 8px; }
.roster-card { min-height: 98px; padding: 5px 7px 8px; border-color: rgba(105, 174, 215, .58); border-radius: 10px; background: linear-gradient(150deg, #1a4564, #0b1b2e 72%); box-shadow: inset 0 1px rgba(222, 249, 255, .12), 0 2px #040b14; }
.roster-card:hover { transform: translateY(-2px); }
.roster-card.is-selected { color: #fff4b4; border-color: #ffe283; background: radial-gradient(circle at 50% 0%, #4e7890, #172a41 75%); box-shadow: 0 0 0 2px rgba(255, 204, 82, .34), 0 0 22px rgba(255, 186, 75, .26), inset 0 1px #fff9; }
.roster-card img { width: 82px; height: 69px; }
.fighter-briefing { margin: auto 0 0; padding: 9px 11px; border-color: rgba(104, 189, 232, .44); border-radius: 9px; background: linear-gradient(100deg, rgba(17, 59, 86, .92), rgba(10, 25, 43, .92)); }
.fighter-briefing b { color: #ffe49a; }
.online-options { padding: 10px 12px; border-color: rgba(162, 138, 244, .7); border-radius: 12px; background: linear-gradient(110deg, rgba(39, 35, 87, .92), rgba(15, 43, 66, .92)); }
.match-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin-top: 11px; }
.match-actions button { margin: 0; }
.match-actions #start-button { min-width: 196px; }

.screen__panel--small { padding: 34px; }
.screen__panel--settings { width: min(760px, 96vw); max-width: 760px; padding-block: clamp(24px, 3.5vw, 36px); }
.key-settings { gap: 8px; }
.binding-row { min-height: 42px; border-color: rgba(101, 180, 222, .65); border-radius: 8px; background: linear-gradient(135deg, #153750, #0c2034); }
.binding-row:hover { transform: translateY(-1px); filter: brightness(1.12); }
.volume-setting { margin-top: 8px; padding: 9px; border: 1px solid rgba(113, 183, 222, .32); border-radius: 9px; background: rgba(7, 20, 34, .54); }
.settings-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.settings-actions button { margin: 0; }

@media (max-width: 820px) {
  .game-shell { padding: 8px; }
  .hud { grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr); gap: 8px; padding: 6px 7px; }
  .portrait { display: none; }
  .fighter-hud { gap: 0; }
  .fighter-name { font-size: 12px; }
  .round-panel__label { display: none; }
  .canvas-wrap { border-radius: 13px; }
  .control-card { grid-template-columns: 1fr; text-align: center; }
  .control-card__main { flex-wrap: wrap; justify-content: center; }
  .control-card__actions { justify-content: center; }
  .match-setup { grid-template-columns: 1fr; }
  .match-setup__column { padding: 8px; }
  .match-setup__column--config { display: grid; grid-template-columns: 1fr 1.2fr; align-items: start; column-gap: 9px; }
  .match-setup__column--config > .selection-label, .match-setup__column--config > .select-target, .match-setup__column--config > #mode-picker { grid-column: 1; }
  .match-setup__column--config > .cpu-options-card { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding-top: 0; border-top: 0; border-left: 1px solid rgba(128, 196, 231, .18); padding-left: 9px; }
  .home-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .home-panel { padding: 20px 12px; }
  .home-title-row { grid-template-columns: 68px minmax(0, 1fr) 68px; gap: 1px; }
  .home-title-row img { width: 68px; height: 88px; }
  .home-title-row h1 { font-size: clamp(24px, 6.8vw, 35px); white-space: normal; }
  .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-actions button:nth-child(2) { grid-column: auto; }
  .home-actions button:last-child { grid-column: 1 / -1; }
  #start-screen .screen__panel { padding: 12px; }
  #start-screen .screen__lead, #start-screen .screen__hint { display: none; }
  .selection-top .eyebrow { font-size: 8px; }
  .match-setup__column--config { display: block; }
  .match-setup__column--config > .cpu-options-card { margin-top: 8px; padding-top: 8px; padding-left: 0; border-top: 1px solid rgba(128, 196, 231, .18); border-left: 0; }
  .roster-card { min-height: 70px; font-size: 10px; }
  .roster-card img { width: 56px; height: 47px; }
  .fighter-briefing p { display: none; }
  .match-actions { margin-top: 8px; }
  .match-actions #start-button { min-width: 150px; }
  .key-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (pointer: coarse), (hover: none) {
  .game-shell::before { display: none; }
  .hud { margin-bottom: 5px; border-radius: 9px; }
  .canvas-wrap { border-radius: 11px; box-shadow: 0 8px 22px #000a, 0 0 0 2px rgba(31, 83, 114, .38); }
  .canvas-wrap::after { box-shadow: inset 0 0 40px rgba(0,0,0,.18); }
  .home-panel { padding: 15px 11px; }
  .home-title-row { margin-bottom: 11px; }
  .home-actions { max-width: 570px; }
  .screen { backdrop-filter: blur(8px) saturate(.8); }
  #start-screen .screen__panel { width: min(860px, 97vw); padding: 9px; }
  .match-setup { grid-template-columns: minmax(190px, .8fr) minmax(300px, 1.25fr); gap: 5px; margin-top: 4px; }
  .match-setup__column { padding: 6px; border-radius: 9px; }
  .match-setup__column--config { display: flex; flex-direction: column; }
  .match-setup__column--config > .selection-label,
  .match-setup__column--config > .select-target,
  .match-setup__column--config > #mode-picker,
  .match-setup__column--config > .cpu-options-card { grid-column: auto; grid-row: auto; }
  .match-setup__column--config > .cpu-options-card { margin-top: auto; padding-top: 6px; padding-left: 0; border-top: 1px solid rgba(128, 196, 231, .18); border-left: 0; }
  .selection-label { margin: 4px 0 3px; font-size: 8px; }
  .select-target button, #mode-picker button { min-height: 31px; font-size: 9px; }
  .roster { gap: 4px; margin-bottom: 4px; }
  .roster-card { min-height: 54px; padding: 2px; font-size: 9px; }
  .roster-card img { width: 48px; height: 38px; }
  .fighter-briefing { padding: 4px 6px; }
  .fighter-briefing span { font-size: 8px; }
  .fighter-briefing b { font-size: 10px; }
  .cpu-pick, .cpu-trait { font-size: 8px; }
  .match-actions { gap: 4px; margin-top: 5px; }
  .match-actions button { min-width: 0; padding: 7px 10px; font-size: 10px; }
  .mobile-joystick { left: calc(18px + env(safe-area-inset-left)); bottom: calc(17px + env(safe-area-inset-bottom)); }
  .mobile-joystick__ring { width: 154px; height: 154px; border-width: 3px; background: radial-gradient(circle, #6dacce72 0 42%, #091b30e8 43% 100%); }
  .mobile-joystick__knob { width: 66px; height: 66px; background: radial-gradient(circle at 35% 30%, #effcff, #4c8fb6 61%, #16344f); }
  .touch-controls__actions { right: calc(17px + env(safe-area-inset-right)); bottom: calc(17px + env(safe-area-inset-bottom)); width: 296px; height: 218px; grid-template-columns: 82px 104px 104px; grid-template-rows: 60px 150px; gap: 5px; }
  .touch-button { border-radius: 16px; }
  .touch-button b { font-size: 25px; }
  .touch-button--light b, .touch-button--heavy b, .touch-button--special b { font-size: 34px; }
  .touch-button span { font-size: 10px; }
}

@media (pointer: coarse) and (max-height: 520px), (hover: none) and (max-height: 520px) {
  .mobile-joystick { left: 10px; bottom: 9px; }
  .mobile-joystick__ring { width: 132px; height: 132px; }
  .mobile-joystick__knob { width: 56px; height: 56px; }
  .touch-controls__actions { right: 10px; bottom: 9px; width: 250px; height: 186px; grid-template-columns: 74px 85px 85px; grid-template-rows: 52px 131px; gap: 3px; }
  .touch-button { border-radius: 11px; }
  .touch-button--light b, .touch-button--heavy b, .touch-button--special b { font-size: 27px; }
}

/* Desktop selection uses the briefing as a clear character-information card,
   rather than leaving an unhelpful empty area below the roster. */
@media (hover: hover) and (min-width: 821px) {
  html, body { height: 100%; overflow: hidden; }
  .game-shell { height: 100dvh; display: flex; flex-direction: column; }
  .hud, .control-card, .training-toolbar { flex: none; }
  .canvas-wrap { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
  .canvas-wrap canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; }
  .home-title-row { grid-template-columns: 124px minmax(360px, 1fr) 124px; }
  .home-title-row img { width: min(14vw, 116px); height: min(16vw, 132px); }
  .home-title-row img:last-child { width: min(12vw, 94px); justify-self: center; }
  .home-title-row h1 { font-size: clamp(30px, 4.5vw, 52px); }
  #start-screen .match-setup__column--roster .fighter-briefing { min-height: 122px; margin: auto 0 0; padding: 13px; }
  #start-screen .match-setup__column--roster .fighter-briefing p { display: block; max-width: 490px; margin-top: 7px; font-size: 12px; line-height: 1.55; }
}

/* v0.45 · 联机大厅：双方各自选角、准备状态实时同步。 */
.online-lobby { margin-top: 8px; padding: 10px; border: 1px solid rgba(179, 152, 255, .72); border-radius: 10px; background: linear-gradient(110deg, rgba(45, 34, 97, .9), rgba(12, 43, 67, .92)); }
.online-lobby[hidden] { display: none !important; }
.online-lobby__header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #f0ddff; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.online-lobby__header span { color: #b8dcff; font: 900 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.online-lobby__players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.online-lobby__slot { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-rows: auto 1fr; align-items: center; gap: 2px 7px; min-height: 56px; padding: 5px 7px; color: #d7ecff; text-align: left; border: 1px solid rgba(125, 184, 227, .47); border-radius: 8px; background: rgba(5, 19, 40, .62); transition: border-color 120ms, background 120ms, box-shadow 120ms; }
.online-lobby__slot > span { grid-column: 2; color: #8eb9dd; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.online-lobby__slot img { grid-column: 1; grid-row: 1 / span 2; width: 42px; height: 42px; object-fit: contain; }
.online-lobby__slot b { grid-column: 2; min-width: 0; color: #fff0ad; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-lobby__slot em { grid-column: 3; grid-row: 1 / span 2; padding: 4px 6px; color: #9ec3dc; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .05em; border: 1px solid rgba(131, 177, 211, .36); border-radius: 999px; background: rgba(16, 44, 69, .65); white-space: nowrap; }
.online-lobby__slot.is-me { border-color: #ffe083; box-shadow: inset 0 0 0 1px rgba(255, 217, 104, .24), 0 0 14px rgba(255, 199, 83, .12); }
.online-lobby__slot.is-ready { border-color: #8ef0b9; background: linear-gradient(125deg, rgba(24, 105, 82, .7), rgba(8, 42, 52, .8)); }
.online-lobby__slot.is-ready em { color: #c6ffe1; border-color: #77dca5; background: #1d7654; }
.online-lobby__slot.is-offline { opacity: .65; }
.online-lobby__actions { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.online-lobby__actions button { margin: 0; }
.online-lobby__hint { margin: 7px 0 0; color: #b9d8ed; font-size: 10px; font-weight: 700; }

@media (max-width: 600px) {
  .online-lobby { padding: 7px; }
  .online-lobby__header { margin-bottom: 5px; font-size: 9px; }
  .online-lobby__header span { font-size: 9px; }
  .online-lobby__players { gap: 4px; }
  .online-lobby__slot { grid-template-columns: 34px minmax(0, 1fr); min-height: 45px; padding: 3px 4px; gap: 1px 4px; }
  .online-lobby__slot img { width: 34px; height: 34px; }
  .online-lobby__slot > span { font-size: 7px; }
  .online-lobby__slot b { font-size: 10px; }
  .online-lobby__slot em { display: none; }
  .online-lobby__hint { margin-top: 4px; font-size: 8px; }
}

@media (pointer: coarse), (hover: none) {
  .online-options { margin: 4px 0; padding: 6px 7px; }
  .online-copy { font-size: 8px; line-height: 1.35; }
  .online-lobby { margin-top: 4px; padding: 5px; }
  .online-lobby__header { margin-bottom: 4px; font-size: 8px; }
  .online-lobby__header span { font-size: 8px; }
  .online-lobby__players { gap: 4px; }
  .online-lobby__slot { grid-template-columns: 31px minmax(0, 1fr); min-height: 39px; padding: 2px 4px; gap: 0 4px; }
  .online-lobby__slot img { width: 31px; height: 31px; }
  .online-lobby__slot > span { font-size: 7px; }
  .online-lobby__slot b { font-size: 9px; }
  .online-lobby__slot em { display: none; }
  .online-lobby__actions { margin-top: 4px; gap: 4px; }
  .online-lobby__actions button { padding: 5px 8px; font-size: 9px; }
  .online-lobby__hint { display: none; }
}
