@charset "UTF-8";
:root {
  color-scheme: dark;
  --ink: #222826;
  --paper: #edeee5;
  --orange: #ef603a;
  --green: #a8b77b;
  --muted: #8e9590;
  --border: #363c38;
  --safe-top: 0px;
  --safe-right: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #181b1b;
  color: #f0f0e7;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(18px, env(safe-area-inset-top), var(--safe-top))
    max(28px, env(safe-area-inset-right), var(--safe-right))
    max(18px, env(safe-area-inset-bottom), var(--safe-bottom))
    max(28px, env(safe-area-inset-left), var(--safe-left));
  user-select: none;
  -webkit-user-select: none;
}
button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.5;
}
button {
  transition:
    background 0.16s,
    color 0.16s,
    transform 0.16s;
}
button:hover {
  filter: brightness(1.09);
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.shell {
  width: min(1480px, calc((100dvh - 156px) * 16 / 9));
  max-width: 100%;
}
.masthead {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
}
.brand-mark {
  width: 42px;
  height: 42px;
  background: var(--orange);
  color: #181b1b;
  border-radius: 3px;
  font: 900 34px/42px Arial;
  position: relative;
  padding-left: 6px;
}
.brand-mark span {
  font-size: 20px;
  position: absolute;
  right: 1px;
  top: -9px;
}
.brand h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 750;
  letter-spacing: 1px;
}
.brand h1 i {
  font: italic 16px Georgia;
  color: #a5aaa5;
  margin: 0 5px;
}
.brand p {
  font:
    10px Consolas,
    monospace;
  color: #a6ada7;
  margin: 6px 0 0;
  letter-spacing: 2px;
}
.brand p span {
  color: var(--orange);
  margin: 0 4px;
}
.session {
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  letter-spacing: 1px;
}
.status-dot,
.live-dot {
  width: 6px;
  height: 6px;
  background: #a8b77b;
  border-radius: 50%;
  display: inline-block;
}
.status-dot {
  box-shadow: 0 0 10px #a8b77b44;
}
.session-divider {
  height: 14px;
  width: 1px;
  background: #4a514b;
  margin: 0 9px;
}
.muted {
  color: #89938c;
  font:
    11px Consolas,
    monospace;
}
.tools {
  display: flex;
  gap: 7px;
}
.tool {
  height: 34px;
  border: 1px solid #3b423d;
  background: transparent;
  color: #bfc7bf;
  border-radius: 4px;
  padding: 0 11px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool.active {
  background: #a8b77b18;
  border-color: #8c9e6580;
  color: #c6d7a0;
}
.tool span {
  font-size: 17px;
}
.tool kbd {
  background: none;
  border: none;
  color: inherit;
  font-size: 10px;
  padding: 0;
}
.icon-tool {
  width: 34px;
  justify-content: center;
  font: 20px Georgia;
  position: relative;
}
.mute-slash {
  position: absolute;
  transform: rotate(-35deg);
  width: 19px;
  height: 1px;
  background: currentColor;
}
.icon-tool[aria-pressed="true"] .mute-slash {
  display: none;
}
.arena {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  background: var(--paper);
  border: 1px solid #464d45;
  border-radius: 6px;
  overflow: hidden;
  container-type: inline-size;
  box-shadow: 0 12px 65px #0003;
  color: var(--ink);
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
.hud {
  position: absolute;
  top: 5%;
  left: 4.1%;
  right: 4.1%;
  display: grid;
  grid-template-columns: 1fr 12% 1fr;
  gap: 2.4%;
  pointer-events: none;
}
.fighter-heading {
  display: flex;
  align-items: center;
  gap: 1cqw;
  font-size: 1.65cqw;
}
.fighter-heading strong {
  font-size: 1.9cqw;
  font-weight: 800;
}
.player-id {
  font:
    bold 0.8cqw Consolas,
    monospace;
  border: 1px solid currentColor;
  padding: 0.3cqw 0.4cqw;
  line-height: 1;
}
.player-card .player-id {
  color: #d55635;
}
.fighter-heading small {
  font:
    0.8cqw Consolas,
    monospace;
  letter-spacing: 0.1cqw;
  color: #788174;
}
.health-number {
  margin-left: auto;
  font:
    bold 1.2cqw Consolas,
    monospace;
}
.health-number span {
  font-size: 0.85cqw;
  color: #899183;
}
.health-track {
  height: 1.25cqw;
  background: #cbd0c4;
  overflow: hidden;
  margin: 0.8cqw 0 0.55cqw;
  position: relative;
  border-radius: 1px;
}
.health-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 1px),
    #edeee548 calc(10% - 1px),
    #edeee548 10%
  );
}
.health-fill {
  height: 100%;
  background: var(--orange);
  width: 100%;
  transition: width 0.15s;
}
.fighter-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75cqw;
  color: #768071;
  letter-spacing: 0.05cqw;
}
.round {
  text-align: center;
  display: flex;
  align-items: center;
  flex-direction: column;
}
.round > span:first-child {
  font:
    0.7cqw Consolas,
    monospace;
  letter-spacing: 0.18cqw;
  color: #727a6b;
}
.round strong {
  font: 4.4cqw/0.95 Georgia;
  margin-top: 0.2cqw;
}
.round-dots {
  font-size: 0.8cqw;
  letter-spacing: 0.4cqw;
  color: #c37754;
  margin-top: 0.5cqw;
}
.arena-label {
  position: absolute;
  left: 4.1%;
  top: 22.5%;
  display: flex;
  align-items: center;
  gap: 0.65cqw;
  color: #7c8476;
  font:
    0.8cqw "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0.06cqw;
}
.arena-label > span:not(.live-dot) {
  color: #bac0b1;
  padding: 0 0.35cqw;
}
.arena-label .live-dot {
  width: 0.4cqw;
  height: 0.4cqw;
  background: #7a8e59;
}
.arena-actions {
  position: absolute;
  right: 4.1%;
  top: 21.5%;
  display: flex;
  gap: 6px;
}
.arena-button {
  background: #e5e8dcaa;
  color: #5c6659;
  border: 1px solid #b7c0ad;
  border-radius: 3px;
  height: 2.3cqw;
  min-height: 25px;
  padding: 0 0.8cqw;
  font-size: 0.8cqw;
}
.arena-button span {
  font-size: 1.3cqw;
}
.floor-caption {
  position: absolute;
  left: 4.1%;
  right: 4.1%;
  bottom: 19%;
  display: flex;
  justify-content: space-between;
  color: #87917d;
  font:
    0.8cqw Consolas,
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0.03cqw;
  pointer-events: none;
}
.floor-caption b {
  font-weight: 400;
  margin-left: 0.7cqw;
  color: #67745e;
}
.telemetry {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16.5%;
  background: #242a28;
  display: grid;
  grid-template-columns: 1.05fr 1.55fr 0.8fr;
  align-items: center;
  color: #e7eadd;
  padding: 0 4.1%;
  gap: 4%;
  border-top: 3px solid #a7b67a;
}
.move-summary {
  display: flex;
  flex-direction: column;
  gap: 0.35cqw;
}
.eyebrow {
  font:
    10px Consolas,
    monospace;
  letter-spacing: 2px;
  color: #9ba98c;
}
.move-summary .eyebrow,
.damage-summary .eyebrow {
  font-size: 0.68cqw;
  letter-spacing: 0.1cqw;
  color: #9ca58e;
}
.move-summary strong {
  font-size: 1.65cqw;
  font-weight: 600;
}
.move-summary > span:last-child {
  font-size: 0.72cqw;
  color: #849081;
}
.frame-section {
  border-left: 1px solid #495142;
  padding-left: 10%;
}
.frame-label {
  display: flex;
  justify-content: space-between;
  color: #b7c1aa;
  font-size: 0.72cqw;
  margin-bottom: 0.65cqw;
}
.frame-label > span:last-child {
  font-family: Consolas, monospace;
  color: #818d79;
}
.frame-track {
  height: 0.75cqw;
  display: flex;
  position: relative;
  gap: 2px;
  opacity: 0.55;
}
.frame-track.playing {
  opacity: 1;
}
.frame-track > span {
  width: 33.33%;
  height: 100%;
  transition: width 0.1s;
}
.startup {
  background: #b9a569;
}
.active-frames {
  background: var(--orange);
}
.recovery {
  background: #789b8c;
}
#frame-cursor {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 2px;
  background: #fff7e1;
  display: none;
}
.playing #frame-cursor {
  display: block;
}
.frame-legend {
  display: flex;
  gap: 1.5cqw;
  margin-top: 0.65cqw;
  font-size: 0.65cqw;
  color: #a6b19b;
}
.frame-legend > span {
  display: flex;
  gap: 0.35cqw;
  align-items: center;
}
.frame-legend b {
  font:
    0.72cqw Consolas,
    monospace;
  color: #dfe8cf;
}
.frame-legend i {
  width: 5px;
  height: 5px;
  border-radius: 1px;
}
.startup-dot {
  background: #b9a569;
}
.active-dot {
  background: var(--orange);
}
.recovery-dot {
  background: #789b8c;
}
.damage-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-left: 1px solid #495142;
  padding-left: 15%;
}
.damage-summary strong {
  grid-column: 2;
  grid-row: 1/3;
  font:
    3.2cqw/1 Consolas,
    monospace;
  letter-spacing: -0.2cqw;
  color: #d0dfa8;
}
.damage-summary > span:last-child {
  font-size: 0.7cqw;
  color: #88967d;
  margin-top: 0.8cqw;
}
.damage-summary b {
  color: #c1cdaa;
  font-family: Consolas, monospace;
  margin-left: 0.3cqw;
}
.combo {
  position: absolute;
  top: 36%;
  left: 5%;
  color: #da5735;
  display: flex;
  align-items: center;
  gap: 1cqw;
  opacity: 0;
  transform: translateX(-10px);
  transition: 0.18s;
  pointer-events: none;
}
.combo.show {
  opacity: 1;
  transform: translateX(0);
}
.combo > b {
  font:
    italic 5cqw/0.9 Impact,
    "Arial Black",
    sans-serif;
}
.combo > span {
  font:
    bold 1.2cqw Consolas,
    monospace;
  letter-spacing: 0.1cqw;
}
.combo > span > span {
  display: block;
  font-size: 0.7cqw;
  margin-top: 0.5cqw;
  color: #7e876f;
}
.hit-message {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translateX(-50%);
  font:
    italic bold 1.45cqw "Arial Black",
    "Microsoft YaHei",
    sans-serif;
  color: #ba4e32;
  opacity: 0;
  transition: opacity 0.12s;
  pointer-events: none;
}
.hit-message.show {
  opacity: 1;
}
.footer {
  min-height: 53px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #8d988d;
  font-size: 10px;
}
.keyboard-guide {
  display: flex;
  gap: 20px;
}
.keyboard-guide > span {
  display: flex;
  gap: 4px;
  align-items: center;
}
.keyboard-guide kbd:last-of-type {
  margin-right: 5px;
}
kbd {
  font:
    10px Consolas,
    monospace;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #465044;
  border-radius: 3px;
  color: #c3cbbb;
  background: #252a25;
  padding: 2px 4px;
}
.box-guide {
  display: flex;
  gap: 13px;
  margin-left: auto;
}
.box-guide > span,
.help-legend > span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.box-dot {
  width: 8px;
  height: 8px;
  border: 1px solid;
  display: inline-block;
  background: transparent;
}
.hurt {
  color: #e6726d;
}
.hit {
  color: #e9a246;
}
.push {
  color: #71a499;
}
.guard {
  color: #91bcd7;
}
.build-label {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1px;
  color: #65735f;
  border-left: 1px solid #414a3b;
  padding-left: 18px;
}
.overlay {
  position: absolute;
  inset: 0;
  background: #18211cd9;
  backdrop-filter: blur(7px);
  z-index: 5;
  display: grid;
  place-items: center;
  color: #f3f3e5;
}
.modal {
  position: relative;
  width: min(500px, 82%);
  padding: 34px;
  background: #242c27;
  border: 1px solid #657259;
  border-radius: 6px;
  box-shadow: 0 20px 80px #0003;
  text-align: center;
}
.modal h2 {
  font-size: 34px;
  margin: 12px 0 14px;
  letter-spacing: 1px;
}
.modal p {
  font-size: 13px;
  line-height: 1.8;
  color: #aebba4;
}
.primary {
  border: 0;
  border-radius: 3px;
  background: var(--orange);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  width: 100%;
  margin-top: 22px;
  min-height: 44px;
}
.primary span {
  font-size: 20px;
  line-height: 1;
}
.modal > small {
  display: block;
  margin-top: 16px;
  color: #8d9d82;
  font-size: 11px;
}
.ko-modal {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.ko-modal h2 {
  font:
    italic 100px/0.9 Impact,
    "Arial Black",
    sans-serif;
  color: #fa744b;
  margin: 25px 0;
}
.close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: transparent;
  color: #d5dfca;
  border: 0;
  font-size: 25px;
}
.help-modal {
  text-align: left;
  max-height: 94%;
  overflow: auto;
}
.help-modal h2 {
  font-size: 27px;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 20px;
}
.help-grid p {
  font-size: 11px;
  margin: 7px 0;
}
.help-grid kbd {
  margin-right: 4px;
}
.help-note {
  font-size: 11px !important;
  border-top: 1px solid #404f38;
  padding-top: 12px;
}
.help-legend {
  display: flex;
  gap: 14px;
  font-size: 10px;
  color: #b6c1a9;
  margin-top: 18px;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 10px);
  padding: 12px 20px;
  max-width: 90%;
  border: 1px solid #819467;
  background: #2e3929;
  color: #e2ecd8;
  font-size: 12px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 30;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.touch-controls {
  display: none;
}
.rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #1b221d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}
.rotate-overlay h2 {
  font-size: 30px;
  margin: 18px 0 4px;
}
.rotate-overlay p {
  font-size: 13px;
  line-height: 1.9;
  color: #a1b093;
}
.rotate-overlay .primary {
  max-width: 260px;
}
.rotate-phone {
  height: 106px;
  width: 64px;
  border: 3px solid #c4d2b2;
  border-radius: 13px;
  transform: rotate(90deg);
  display: grid;
  place-items: center;
  font: 44px Georgia;
  color: var(--orange);
  margin: 0 0 55px;
}
.rotate-overlay .eyebrow {
  font-size: 9px;
}
body.touch .touch-controls {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.joystick {
  position: absolute;
  left: max(25px, env(safe-area-inset-left), var(--safe-left));
  bottom: max(23px, env(safe-area-inset-bottom), var(--safe-bottom));
  width: 148px;
  height: 148px;
  border: 1px solid #dee5c663;
  border-radius: 50%;
  background: #3442398c;
  touch-action: none;
  pointer-events: auto;
  color: #dbe7c6;
  box-shadow: inset 0 0 0 17px #b2c7990b;
}
.joystick-knob {
  position: absolute;
  width: 60px;
  height: 60px;
  left: calc(50% - 30px);
  top: calc(50% - 30px);
  border-radius: 50%;
  border: 1px solid #d7e3c489;
  background: #bbc8a46b;
  box-shadow: 0 3px 8px #0002;
  pointer-events: none;
}
.joystick > span {
  position: absolute;
  font-size: 11px;
  opacity: 0.65;
  pointer-events: none;
}
.joystick-up {
  top: 8px;
  left: calc(50% - 6px);
}
.joystick-down {
  bottom: 8px;
  left: calc(50% - 6px);
}
.joystick-left {
  left: 8px;
  top: calc(50% - 12px);
  font-size: 20px !important;
}
.joystick-right {
  right: 8px;
  top: calc(50% - 12px);
  font-size: 20px !important;
}
.touch-buttons {
  position: absolute;
  right: max(24px, env(safe-area-inset-right), var(--safe-right));
  bottom: max(20px, env(safe-area-inset-bottom), var(--safe-bottom));
  width: 270px;
  height: 116px;
  pointer-events: none;
}
.touch-key {
  position: absolute;
  width: 80px;
  height: 80px;
  pointer-events: auto;
  touch-action: none;
  border-radius: 50%;
  border: 1px solid #e0e5d481;
  background: #37453ee8;
  color: #f1f5e5;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 3px 0 #15231cb3;
  backdrop-filter: blur(4px);
}
.touch-key span {
  font:
    12px Consolas,
    monospace;
  margin-top: 2px;
  opacity: 0.65;
}
.touch-key.pressed {
  background: #bcca9e;
  color: #1c2e1c;
  transform: scale(0.94);
}
.guard-key {
  left: 190px;
  bottom: 0;
}
.light-key {
  left: 0;
  bottom: 0;
  width: 88px;
  height: 88px;
  background: #c96a43ed;
}
.heavy-key {
  left: 96px;
  bottom: 36px;
  background: #a74a35ed;
}
.touch .keyboard-guide {
  display: none;
}
.touch .box-guide {
  margin-left: 0;
}
.touch .telemetry {
  grid-template-columns: 1fr;
  left: 27%;
  right: 34%;
  padding: 0 2%;
  background: transparent;
  border: 0;
  pointer-events: none;
  color: #303b2a;
}
.touch .frame-section,
.touch .move-summary > span:last-child,
.touch .damage-summary {
  display: none;
}
.touch .move-summary strong {
  font-size: 2cqw;
}
.touch .move-summary .eyebrow {
  color: #7e8e6d;
}
.touch .floor-caption {
  display: none;
}
.touch .arena-button {
  min-width: 44px;
  min-height: 38px;
  font-size: 11px;
}
.touch .arena-button span {
  font-size: 18px;
}
.touch .arena-actions {
  top: 24%;
}
.touch .arena-label {
  top: 25%;
}
.touch .help-modal {
  max-height: 95%;
  padding: 22px;
}
.touch .help-modal h2 {
  margin: 5px 0;
}
.touch .help-grid {
  margin-top: 5px;
}
.touch .help-note {
  margin: 6px 0;
  padding-top: 7px;
}
.touch .help-modal .primary {
  margin-top: 10px;
}
.touch .hud {
  top: 4%;
}
@media (max-width: 1050px) {
  .session {
    display: none;
  }
  .build-label {
    display: none;
  }
  .footer {
    gap: 10px;
  }
  .keyboard-guide {
    gap: 10px;
  }
  .box-guide {
    gap: 8px;
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: max(0px, env(safe-area-inset-top), var(--safe-top))
      max(0px, env(safe-area-inset-right), var(--safe-right))
      max(0px, env(safe-area-inset-bottom), var(--safe-bottom))
      max(0px, env(safe-area-inset-left), var(--safe-left));
  }
  .shell {
    width: min(100%, calc(100dvh * 16 / 9));
  }
  .masthead,
  .footer {
    display: none;
  }
  .arena {
    border-radius: 0;
    border: 0;
  }
  .telemetry {
    height: 16%;
  }
  .modal {
    padding: 22px;
  }
  .modal h2 {
    font-size: 26px;
  }
  .help-modal {
    max-height: 96%;
    padding: 20px;
  }
  .help-grid {
    margin-top: 8px;
  }
  .help-note {
    margin: 7px 0;
  }
  .help-modal .primary {
    margin-top: 12px;
  }
  .ko-modal h2 {
    font-size: 76px;
  }
}
body:has(.arena:fullscreen) {
  padding: 0;
}
.arena:fullscreen {
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
.shell:fullscreen {
  width: 100vw;
  height: 100dvh;
  background: #181b1b;
  display: grid;
  place-items: center;
}
.shell:fullscreen .masthead,
.shell:fullscreen .footer {
  display: none;
}
.shell:fullscreen .arena {
  width: min(100vw, calc(100dvh * 16 / 9));
}
.shell:fullscreen .touch-controls {
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.mobile-tool {
  display: none;
}
.touch .mobile-tool {
  display: inline-block;
}
.touch.controls-hidden .touch-controls {
  display: none;
}
.touch .fighter-heading strong {
  font-size: max(15px, 1.9cqw);
}
.touch .fighter-heading small {
  display: none;
}
.touch .fighter-heading {
  gap: 7px;
}
.touch .player-id {
  font-size: 8px;
  padding: 3px;
}
.touch .health-number {
  font-size: max(10px, 1.2cqw);
}
.touch .health-number span {
  font-size: 8px;
}
.touch .health-track {
  min-height: 8px;
  margin: 7px 0 5px;
}
.touch .fighter-meta {
  font-size: max(8px, 0.75cqw);
}
.touch .round > span:first-child {
  font-size: 7px;
}
.touch .arena-label {
  font-size: 8px;
}
.touch .round strong {
  font-size: max(27px, 4.4cqw);
}
.touch .move-summary strong {
  font-size: max(12px, 2cqw);
}
.touch .move-summary .eyebrow {
  font-size: 8px;
}
.shell {
  min-width: 0;
}
.portrait .shell {
  display: none;
}
select {
  font: inherit;
  cursor: pointer;
}
.fighter-heading select {
  pointer-events: auto;
  color: #28352b;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #9aab8c;
  font-size: 1.8cqw;
  font-weight: 800;
  max-width: 18cqw;
  padding: 0 2px 2px;
}
.fighter-heading select option {
  background: #eef0e4;
  color: #28352b;
}
.energy-row {
  display: flex;
  align-items: center;
  gap: 0.6cqw;
  margin-top: 0.65cqw;
  font:
    0.72cqw Consolas,
    "Microsoft YaHei",
    sans-serif;
  color: #6f785f;
}
.energy-track {
  position: relative;
  width: 12cqw;
  height: 0.65cqw;
  background: #c9cdbb;
}
.energy-track i {
  display: block;
  height: 100%;
  background: #cda541;
  transition: width 0.1s;
}
.energy-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 32%,
    #edf0e4 32%,
    #edf0e4 34%,
    transparent 34%,
    transparent 65%,
    #edf0e4 65%,
    #edf0e4 67%,
    transparent 67%
  );
}
.energy-row b {
  font-weight: normal;
  color: #957027;
}
.training-tools {
  gap: 0.4cqw;
  top: 22%;
}
.training-tools select {
  height: 2.3cqw;
  min-height: 25px;
  max-width: 8cqw;
  font-size: 0.8cqw;
  border: 1px solid #b7c0ad;
  background: #e5e8dc;
  color: #5c6659;
  border-radius: 3px;
}
.help-modal {
  width: min(760px, 88%);
}
.move-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin: 18px 0;
}
.move-guide > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid #475341;
  padding: 8px 0 12px;
}
.move-guide strong {
  font-size: 13px;
  color: #e2e8cf;
}
.move-guide span {
  font-size: 11px;
  color: #b5c296;
  line-height: 1.6;
}
.combo-guide {
  padding: 10px 13px;
  background: #b8cb8e12;
  border-left: 3px solid #d89b43;
  color: #d9dfc9 !important;
}
.command-note {
  font-size: 11px !important;
}
.touch .fighter-heading select {
  font-size: max(13px, 1.8cqw);
  max-width: 22cqw;
}
.touch .energy-row {
  font-size: 8px;
  gap: 6px;
}
.touch .energy-track {
  height: 6px;
  width: 12cqw;
}
.touch .training-tools {
  top: 23%;
  gap: 4px;
}
.touch .training-tools .arena-button {
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 9px;
}
.touch .training-tools select {
  font-size: 9px;
  max-width: 65px;
  min-height: 30px;
}
.touch .arena-actions {
  top: 23%;
}
.touch #input-history {
  max-width: 20cqw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 700px) {
  .fighter-heading small {
    display: none;
  }
  .move-guide {
    grid-template-columns: 1fr;
  }
  .touch .training-tools {
    gap: 3px;
    left: 2%;
  }
  .touch .arena-actions {
    right: 2%;
    gap: 3px;
  }
  .touch .arena-actions .arena-button {
    min-width: 30px;
    padding: 0 5px;
    min-height: 30px;
  }
  .touch .fighter-meta {
    letter-spacing: 0;
  }
}
/* Street-side main menu and arcade match presentation. */
.main-menu {
  position: relative;
  width: min(1600px, 100%);
  height: min(900px, calc(100dvh - 36px));
  min-height: 420px;
  overflow: hidden;
  background: #10111a url("./assets/stages/main-menu-versus.webp") center/cover;
  border: 1px solid #8c78514d;
  isolation: isolate;
}
.menu-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(10, 13, 24, 0.42),
      rgba(10, 13, 24, 0.16) 43%,
      rgba(10, 13, 24, 0.08) 78%
    ),
    linear-gradient(
      0deg,
      #0b1019 0%,
      rgba(10, 13, 24, 0.94) 28%,
      transparent 65%
    );
}
.menu-top {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 40px;
  font-size: 12px;
  letter-spacing: 2px;
}
.arcade-logo {
  font-size: 26px;
  font-weight: 900;
  color: #ffbb59;
}
.arcade-logo b {
  font-size: 12px;
  color: #ebe5cf;
  margin-left: 10px;
}
.menu-location {
  color: #e7ddc5;
}
.menu-top button {
  margin-left: auto;
}
.menu-small,
.menu-back,
.menu-links button {
  color: #efe9d6;
  background: #172321a8;
  border: 1px solid #b0b09c66;
  padding: 10px 18px;
  border-radius: 2px;
}
.menu-back {
  display: block;
  margin-bottom: 24px;
}
.menu-kicker {
  font-size: 11px;
  letter-spacing: 3px;
  color: #f5bd69;
  font-weight: 700;
}
.menu-home {
  padding: 10px 5% 34px;
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 30px;
  align-items: end;
  height: calc(100% - 99px);
}
.menu-copy h1 {
  font-size: clamp(48px, 6.8vw, 106px);
  line-height: 1.06;
  margin: 18px 0 12px;
  letter-spacing: -4px;
  font-weight: 900;
  text-shadow: 0 6px 25px #07100d99;
}
.menu-copy h1 span {
  color: #ffbd62;
}
.menu-copy h1 em {
  font: italic 34px Georgia;
  color: #d5c5a1;
  letter-spacing: 0;
}
.menu-copy .menu-title {
  width: min(540px, 100%);
  margin: 0 0 12px;
  line-height: 0;
}
.menu-title img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 5px 10px #000b);
}
@media (max-width: 900px), (max-height: 500px) {
  .menu-copy .menu-title {
    width: min(300px, 100%);
    margin: 0 0 8px;
  }
}
.menu-description {
  color: #d9d4c6;
  font-size: 15px;
  margin: 20px 0 30px;
}
.menu-buttons {
  width: min(365px, 100%);
  display: grid;
  gap: 12px;
}
.menu-primary {
  border: 0;
  background: #f3b859;
  color: #212d29;
  text-align: left;
  padding: 18px 23px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-weight: 800;
}
.menu-primary span {
  font-size: 11px;
  font-weight: 500;
}
.menu-secondary {
  border: 1px solid #b0b09c77;
  background: #182621cc;
  color: #f3eedc;
  display: flex;
  justify-content: space-between;
  padding: 17px 23px;
  font-size: 15px;
}
.menu-secondary span {
  font-size: 11px;
  color: #b4bfb1;
}
.menu-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.menu-links button {
  background: #192623c9;
  text-align: left;
  padding: 14px 23px;
  font-size: 13px;
}
.menu-record {
  padding: 25px;
  background: #152523e8;
  border: 1px solid #aeb48e55;
  backdrop-filter: blur(12px);
}
.menu-record h2 {
  font-size: 16px;
  margin: 12px 0 20px;
}
.record-grid {
  display: flex;
  gap: 35px;
}
.record-grid strong {
  display: block;
  font:
    38px Consolas,
    monospace;
  color: #f3bf73;
}
.record-grid span,
.menu-record p {
  font-size: 12px;
  color: #b3bfad;
}
.menu-record .menu-primary {
  width: 100%;
  margin-top: 20px;
  font-size: 14px;
}
.menu-bottom {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #d2d6c4;
  border-top: 1px solid #ffffff25;
  padding-top: 18px;
  letter-spacing: 1px;
}
.match-result {
  border-top: 1px solid #65756c;
  padding-top: 16px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.8;
}
.match-result strong {
  display: block;
  font-size: 22px;
  color: #ffc16b;
}
.match-result small {
  color: #b3bfad;
}
.menu-panel {
  margin: 0 4% 24px;
  padding: 24px 32px;
  max-height: calc(100% - 108px);
  overflow: auto;
  background: #14221fed;
  border: 1px solid #9ca98b50;
  backdrop-filter: blur(15px);
}
.menu-panel h2 {
  font-size: 36px;
  margin: 12px 0 24px;
}
.character-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.character-card {
  min-width: 0;
  background: linear-gradient(#354139, #25332c);
  border: 1px solid #68736388;
  position: relative;
  text-align: left;
  color: #f5edd8;
  padding: 10px 16px 16px;
  overflow: hidden;
}
.character-card[aria-pressed="true"] {
  border: 2px solid #ffbc62;
  background: linear-gradient(#6c6544, #2b3c32);
}
.character-card img {
  height: 170px;
  width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 5px #06100955);
}
.character-card strong {
  display: block;
  font-size: 19px;
  margin-top: 8px;
}
.character-card small {
  font-size: 11px;
  color: #c4cbb8;
}
.mode-choice {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}
.mode-choice button {
  flex: 1;
  text-align: left;
  border: 1px solid #647266;
  background: #1d3029;
  color: #eae7d6;
  padding: 16px 20px;
}
.mode-choice button[aria-pressed="true"] {
  border-color: #f9bf64;
  background: #484933;
}
.mode-choice b,
.mode-choice span {
  display: block;
}
.mode-choice span {
  font-size: 12px;
  margin-top: 7px;
  color: #c2c8b4;
}
.mode-note,
.setup-bottom p {
  font-size: 12px;
  line-height: 1.8;
  color: #c4cebb;
}
.setup-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 16px;
}
.setup-bottom small {
  color: #9cae9d;
}
.setup-bottom .menu-primary {
  min-width: 190px;
}
.rank-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.rank-controls select,
.guide-picker select {
  color: #edeedc;
  background: #24372e;
  border: 1px solid #687761;
  padding: 9px;
}
.rank-table-wrap {
  max-height: 370px;
  overflow: auto;
}
.rank-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.rank-table th {
  font-size: 12px;
  color: #bbbea8;
}
.rank-table th,
.rank-table td {
  padding: 18px;
  border-bottom: 1px solid #acb39c2b;
}
.rank-table td:last-child {
  font: 22px Consolas;
  color: #ffc679;
  text-align: right;
}
.rank-table th:last-child {
  text-align: right;
}
#rank-status {
  color: #c2cbb4;
  font-size: 13px;
  min-height: 22px;
}
.guide-picker {
  display: block;
  margin: 12px 0;
  font-size: 14px;
}
.global-help {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100;
  background: #101a18d9;
}
.global-help .help-modal {
  max-height: 90dvh;
  overflow: auto;
}
.duel-caption {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 4%;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  background: #142822cf;
  padding: 13px 20px;
  border-left: 3px solid #f8be67;
  color: #f7ebce;
  pointer-events: none;
}
.duel .telemetry,
.duel .training-tools,
.duel .floor-caption,
.duel #reset,
.duel .box-guide {
  display: none;
}
.duel .hud {
  background: linear-gradient(#12251fe0, transparent);
  padding-bottom: 25px;
}
.duel .fighter-heading select,
.duel .health-number,
.duel .fighter-meta,
.duel .round {
  color: #f9f0dd;
}
.duel .fighter-heading small {
  color: #e0e3ce;
}
.duel select:disabled {
  opacity: 1;
  background: transparent;
  border: 0;
  appearance: none;
}
.duel .round {
  filter: drop-shadow(0 2px 4px #000);
}
.duel .health-track {
  background: #152520a8;
}
.duel .arena {
  border-color: #ad9b65;
}
.duel .energy-row {
  color: #e7e6b9;
}
.duel .keyboard-guide {
  color: #ccc;
}
.duel #combo {
  filter: drop-shadow(0 2px 8px #121a10);
}
@media (max-height: 760px) {
  .menu-top {
    padding: 18px 30px;
  }
  .menu-home {
    height: calc(100% - 76px);
    padding-top: 0;
    gap: 18px;
  }
  .menu-copy h1 {
    font-size: 66px;
  }
  .menu-description {
    margin: 12px 0 20px;
  }
  .menu-panel {
    padding: 18px 24px;
    max-height: calc(100% - 85px);
  }
  .menu-panel h2 {
    font-size: 26px;
    margin: 8px 0 14px;
  }
  .menu-back {
    margin-bottom: 12px;
  }
  .character-card img {
    height: 130px;
  }
  .mode-choice {
    margin-top: 16px;
  }
  .menu-primary {
    padding: 14px 20px;
  }
}
@media (max-width: 900px), (max-height: 500px) {
  .main-menu {
    height: calc(100dvh - 16px);
    min-height: 0;
  }
  .menu-top {
    padding: 12px 20px;
    gap: 15px;
  }
  .menu-location {
    font-size: 10px;
  }
  .menu-home {
    padding: 0 24px 16px;
    grid-template-columns: 1fr 250px;
    height: calc(100% - 61px);
    gap: 12px;
  }
  .menu-copy h1 {
    font-size: 48px;
    line-height: 0.95;
    margin: 10px 0;
    letter-spacing: -2px;
  }
  .menu-copy h1 br {
    display: none;
  }
  .menu-copy h1 em {
    font-size: 22px;
  }
  .menu-description {
    font-size: 12px;
    margin: 12px 0;
  }
  .menu-buttons {
    gap: 7px;
    width: 300px;
  }
  .menu-primary,
  .menu-secondary {
    padding: 12px 16px;
    font-size: 13px;
  }
  .menu-links {
    gap: 7px;
  }
  .menu-links button {
    padding: 10px 16px;
  }
  .menu-record {
    padding: 16px;
  }
  .menu-record h2 {
    margin: 8px 0;
  }
  .record-grid strong {
    font-size: 27px;
  }
  .menu-bottom {
    padding-top: 10px;
    font-size: 9px;
  }
  .menu-kicker {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .menu-panel {
    margin: 0 20px 12px;
    padding: 14px 20px;
    max-height: calc(100% - 70px);
  }
  .character-cards {
    gap: 8px;
  }
  .character-card {
    padding: 7px 10px;
  }
  .character-card img {
    height: 90px;
  }
  .character-card strong {
    font-size: 14px;
  }
  .character-card small {
    font-size: 9px;
  }
  .mode-choice button {
    padding: 10px 14px;
  }
  .mode-note {
    margin: 8px 0;
  }
  .setup-bottom {
    margin-top: 8px;
  }
  .setup-bottom p {
    font-size: 10px;
  }
  .menu-panel h2 {
    font-size: 23px;
  }
  .menu-back {
    font-size: 11px;
    padding: 6px 12px;
  }
  .menu-top .menu-small {
    font-size: 11px;
    padding: 7px 12px;
  }
  .rank-table th,
  .rank-table td {
    padding: 10px;
  }
  .duel-caption {
    font-size: 10px;
    padding: 6px 12px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .main-menu {
    overflow: auto;
  }
  .menu-home {
    display: block;
    height: auto;
  }
  .menu-copy h1 {
    margin-top: 20px;
  }
  .menu-record {
    margin-top: 24px;
  }
  .menu-bottom {
    margin-top: 25px;
  }
  .menu-top {
    gap: 8px;
  }
  .menu-location {
    display: none;
  }
  .menu-buttons {
    width: 100%;
  }
  .character-cards {
    grid-template-columns: 1fr 1fr;
  }
  .setup-bottom {
    display: block;
  }
  .mode-choice {
    flex-direction: column;
  }
}

/* Thumb controls stay anchored to the device, independent of the world camera. */
body.touch button,
body.touch select {
  -webkit-tap-highlight-color: transparent;
}
.touch .arena-actions .arena-button,
.touch .training-tools .arena-button,
.touch .training-tools select {
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0 9px;
  font-size: 11px;
}
.touch .training-tools select {
  max-width: 96px;
}
.touch .training-tools {
  left: 2%;
  right: calc(2% + 216px);
  top: max(26%, 84px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  gap: 6px;
}
.touch .training-tools::-webkit-scrollbar {
  display: none;
}
.touch .arena-actions {
  right: 2%;
  top: max(26%, 84px);
  gap: 6px;
}
.touch .hud {
  top: 2%;
}
.touch .fighter-heading select {
  min-height: 32px;
}
.touch .main-menu button,
.touch .main-menu select,
.touch .modal button,
.touch .modal select {
  min-height: 44px;
}

/* The backdrop is edge-to-edge; only menu content respects the safe area. */
@media (orientation: landscape) {
  body.touch .main-menu {
    --menu-top: max(6px, env(safe-area-inset-top), var(--safe-top));
    --menu-right: max(8px, env(safe-area-inset-right), var(--safe-right));
    --menu-bottom: max(6px, env(safe-area-inset-bottom), var(--safe-bottom));
    --menu-left: max(8px, env(safe-area-inset-left), var(--safe-left));
    position: fixed;
    top: 0;
    left: 0;
    width: var(--viewport-width, 100vw);
    height: var(--viewport-height, 100dvh);
    padding: var(--menu-top) var(--menu-right) var(--menu-bottom)
      var(--menu-left);
    border: 0;
    min-height: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .touch .menu-top {
    flex: 0 0 48px;
    min-height: 0;
    padding: 2px 16px;
  }
  .touch .menu-top .arcade-logo {
    font-size: 22px;
  }
  .touch .menu-top .menu-small {
    padding: 6px 12px;
  }
  .touch .menu-home {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 0 16px 12px;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 30%);
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    align-items: end;
  }
  .touch .menu-copy {
    min-width: 0;
  }
  .touch .menu-copy .menu-title {
    width: min(
      100%,
      clamp(180px, calc(var(--viewport-height, 100dvh) * 0.65), 440px)
    );
    margin: 0 0 6px;
  }
  .touch .menu-buttons {
    width: min(365px, 100%);
    gap: 6px;
  }
  .touch .menu-primary,
  .touch .menu-secondary,
  .touch .menu-links button {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
    gap: 8px;
  }
  .touch .menu-primary span,
  .touch .menu-secondary span {
    font-size: 10px;
  }
  .touch .menu-links {
    gap: 6px;
  }
  .touch .menu-record {
    min-width: 0;
    padding: 12px;
  }
  .touch .menu-record h2 {
    font-size: 14px;
    margin: 0 0 8px;
  }
  .touch .record-grid {
    gap: 18px;
  }
  .touch .record-grid strong {
    font-size: 26px;
  }
  .touch .record-grid span,
  .touch .menu-record p {
    font-size: 10px;
  }
  .touch .menu-record p {
    margin: 6px 0;
  }
  .touch .menu-record .menu-primary {
    margin-top: 8px;
  }
  .touch .match-result {
    margin-top: 8px;
    padding-top: 6px;
    font-size: 10px;
    line-height: 1.4;
  }
  .touch .match-result strong {
    font-size: 16px;
  }
  .touch .menu-bottom {
    display: none;
  }
  .touch .menu-panel {
    flex: 1;
    min-height: 0;
    max-height: none;
    margin: 0 12px 8px;
    padding: 8px 12px;
  }
  .touch #menu-setup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(136px, 25%);
    grid-template-rows: 44px minmax(0, 1fr) 48px auto auto;
    grid-template-areas:
      "heading heading"
      "roster roster"
      "modes start"
      "note note"
      "score score";
    gap: 6px 12px;
    overflow: hidden;
  }
  .touch .setup-heading {
    grid-area: heading;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
  }
  .touch .setup-heading .menu-back {
    margin: 0;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
  }
  .touch .setup-heading .menu-kicker {
    display: none;
  }
  .touch .setup-heading h2 {
    margin: 0;
    font-size: clamp(17px, 2.4vw, 25px);
  }
  .touch .character-cards {
    grid-area: roster;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .touch .character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 4px 6px 6px;
    text-align: center;
  }
  .touch .character-card img {
    flex: 1;
    min-height: 0;
    height: 0;
    width: 100%;
    object-fit: contain;
  }
  .touch .character-card strong {
    flex-shrink: 0;
    font-size: 13px;
    line-height: 18px;
    margin-top: 2px;
  }
  .touch .character-card small {
    display: none;
  }
  .touch .mode-choice {
    grid-area: modes;
    margin: 0;
    gap: 8px;
    min-width: 0;
    flex-direction: row;
  }
  .touch .mode-choice button {
    min-width: 0;
    padding: 4px 8px;
    font-size: 13px;
  }
  .touch .mode-choice span {
    margin-top: 2px;
    font-size: 10px;
    line-height: 13px;
    white-space: nowrap;
  }
  .touch .mode-note {
    grid-area: note;
    font-size: 10px;
    line-height: 1.4;
    margin: 0;
  }
  .touch .setup-bottom {
    display: contents;
  }
  .touch .setup-bottom p {
    grid-area: score;
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
  }
  .touch .setup-bottom p br,
  .touch .setup-bottom p small {
    display: none;
  }
  .touch #start-versus {
    grid-area: start;
    min-width: 0;
    width: 100%;
    justify-content: center;
    font-size: 15px;
  }
}
@media (max-height: 380px) and (orientation: landscape) {
  .touch #menu-setup {
    grid-template-rows: 44px minmax(0, 1fr) 48px;
    grid-template-areas: "heading heading" "roster roster" "modes start";
  }
  .touch .mode-note,
  .touch .setup-bottom p {
    display: none;
  }
  .touch .menu-record {
    padding: 8px 10px;
  }
}
@media (max-height: 420px) and (orientation: landscape) {
  .touch .fighter-meta {
    display: none;
  }
  .touch .training-tools,
  .touch .arena-actions {
    top: max(20%, 70px);
  }
  .joystick {
    width: 136px;
    height: 136px;
    left: max(16px, env(safe-area-inset-left), var(--safe-left));
    bottom: max(12px, env(safe-area-inset-bottom), var(--safe-bottom));
  }
  .touch-buttons {
    right: max(16px, env(safe-area-inset-right), var(--safe-right));
    bottom: max(12px, env(safe-area-inset-bottom), var(--safe-bottom));
  }
}
