:root {
  color-scheme: dark;
  --ink: #eaf7ff;
  --muted: #7891a6;
  --panel: rgba(7, 21, 34, 0.82);
  --panel-solid: #0a1b2a;
  --line: rgba(132, 197, 219, 0.16);
  --cyan: #40e9ff;
  --cyan-soft: #56c8dc;
  --lime: #bafc43;
  --orange: #ff8251;
  --violet: #9d7bff;
  --danger: #ff5575;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #06111b;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background:
    linear-gradient(rgba(28, 77, 95, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 77, 95, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 24% 0%, #123045 0, #081923 34%, #05101a 72%);
  background-size: 28px 28px, 28px 28px, auto;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient--one {
  top: -12rem;
  left: -8rem;
  background: var(--cyan);
}

.ambient--two {
  right: -12rem;
  bottom: -12rem;
  background: var(--violet);
}

.app {
  width: min(1560px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 16px;
}

.topbar,
.scoreboard,
.game-layout,
.footer {
  width: 100%;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  margin-bottom: 15px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(64, 233, 255, 0.3);
  background: linear-gradient(145deg, rgba(64, 233, 255, 0.17), rgba(64, 233, 255, 0.03));
  box-shadow: inset 0 0 22px rgba(64, 233, 255, 0.09);
  transform: rotate(-4deg);
}

.brand__mark svg {
  width: 34px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.brand strong {
  display: block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.brand strong span {
  color: var(--cyan);
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.57rem;
  letter-spacing: 0.24em;
}

.round-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 25, 38, 0.75);
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.69rem;
  letter-spacing: 0.09em;
}

.round-pill i {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.round-pill strong {
  color: var(--cyan);
  font-weight: 700;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 9px var(--lime);
}

.icon-button {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition: 160ms ease;
}

.topbar-actions {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
}

.language-switch {
  position: relative;
  display: block;
  width: 66px;
  height: 31px;
  cursor: pointer;
  animation: switchBoot 620ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.language-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-switch__track {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid rgba(64, 233, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 25, 38, 0.84);
  box-shadow: inset 0 0 14px rgba(64, 233, 255, 0.04);
}

.language-switch__track b {
  position: relative;
  z-index: 2;
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 0.52rem;
  line-height: 1;
  text-align: center;
  transition: color 240ms ease;
}

.language-switch__track b:last-of-type { color: #557185; }

.language-switch__track i {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 4px;
  width: 27px;
  height: 21px;
  border: 1px solid rgba(64, 233, 255, 0.46);
  border-radius: 999px;
  background: rgba(64, 233, 255, 0.12);
  box-shadow: 0 0 10px rgba(64, 233, 255, 0.13);
  transition: transform 280ms cubic-bezier(0.25, 1.4, 0.5, 1), background 220ms;
}

.language-switch input:checked + .language-switch__track i {
  background: rgba(157, 123, 255, 0.18);
  transform: translateX(29px);
}

.language-switch input:checked + .language-switch__track b:first-of-type { color: #557185; }
.language-switch input:checked + .language-switch__track b:last-of-type { color: #c7b8ff; }

.language-switch.is-switching {
  animation: languagePop 360ms ease;
}

@keyframes switchBoot {
  from { opacity: 0; transform: translateX(10px) scale(0.88); }
  to { opacity: 1; transform: none; }
}

@keyframes languagePop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.icon-button:hover {
  border-color: var(--cyan-soft);
  color: var(--cyan);
  transform: translateY(-1px);
}

.icon-button span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Consolas, monospace;
  font-size: 0.7rem;
}

.scoreboard {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 13px;
}

.fighter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fighter--enemy {
  text-align: right;
}

.fighter__avatar {
  display: grid;
  flex: 0 0 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(186, 252, 67, 0.4);
  border-radius: 50%;
  background: rgba(186, 252, 67, 0.1);
  color: var(--lime);
  box-shadow: inset 0 0 18px rgba(186, 252, 67, 0.08), 0 0 22px rgba(186, 252, 67, 0.07);
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.fighter--enemy .fighter__avatar {
  border-color: rgba(255, 130, 81, 0.45);
  background: rgba(255, 130, 81, 0.09);
  color: var(--orange);
  box-shadow: inset 0 0 18px rgba(255, 130, 81, 0.08), 0 0 22px rgba(255, 130, 81, 0.06);
}

.fighter__info {
  flex: 1;
  min-width: 0;
}

.fighter__name,
.fighter__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-family: Consolas, monospace;
}

.fighter--enemy .fighter__name,
.fighter--enemy .fighter__meta {
  flex-direction: row-reverse;
}

.fighter__name span {
  color: var(--lime);
  font-size: 0.69rem;
  letter-spacing: 0.12em;
}

.fighter--enemy .fighter__name span {
  color: var(--orange);
}

.fighter__name strong {
  overflow: hidden;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-track {
  height: 9px;
  margin: 6px 0 4px;
  overflow: hidden;
  border: 1px solid rgba(186, 252, 67, 0.22);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.28);
}

.health-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #78e93c, var(--lime));
  box-shadow: 0 0 13px rgba(186, 252, 67, 0.36);
  transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1), background 300ms;
}

.fighter--enemy .health-track {
  border-color: rgba(255, 130, 81, 0.25);
}

.fighter--enemy .health-track span {
  margin-left: auto;
  background: linear-gradient(90deg, var(--orange), #ffb35b);
  box-shadow: 0 0 13px rgba(255, 130, 81, 0.32);
}

.fighter__meta {
  color: var(--muted);
  font-size: 0.57rem;
  letter-spacing: 0.06em;
}

.fighter__meta b {
  color: var(--lime);
}

.fighter__meta em { font-style: normal; }

.fighter--enemy .fighter__meta b {
  color: var(--orange);
}

.fighter__meta strong {
  color: var(--ink);
  font-size: 0.63rem;
}

.versus {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(64, 233, 255, 0.18);
  border-radius: 50%;
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.versus::before,
.versus::after {
  position: absolute;
  width: 18px;
  height: 1px;
  background: var(--line);
  content: "";
}

.versus::before { right: 100%; }
.versus::after { left: 100%; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 276px;
  gap: 12px;
}

.arena-panel,
.control-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.arena-toolbar {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: #5f7c90;
  font-family: Consolas, monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terminal-dots {
  display: flex;
  gap: 5px;
  margin-right: 12px;
}

.terminal-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5e66;
}

.terminal-dots i:nth-child(2) { background: #ffc857; }
.terminal-dots i:nth-child(3) { background: #58e070; }

.wind-readout {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.wind-readout strong {
  min-width: 26px;
  color: var(--ink);
}

.wind-readout i {
  color: var(--cyan);
  font-size: 0.9rem;
  font-style: normal;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #071a28;
  touch-action: none;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  cursor: crosshair;
}

.turn-toast {
  position: absolute;
  top: 17%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 28px;
  border-right: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, transparent, rgba(4, 18, 28, 0.84) 18%, rgba(4, 18, 28, 0.84) 82%, transparent);
  font-family: Consolas, monospace;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px) scale(0.94);
  transition: 250ms ease;
}

.turn-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.turn-toast small {
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
}

.turn-toast strong {
  margin-top: 2px;
  color: var(--cyan);
  font-size: clamp(0.85rem, 1.7vw, 1.15rem);
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.power-meter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(90px, 160px) 32px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(64, 233, 255, 0.22);
  border-radius: 4px;
  background: rgba(3, 14, 23, 0.78);
  font-family: Consolas, monospace;
  font-size: 0.55rem;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: 180ms;
}

.power-meter.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.power-meter > div {
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: #142a37;
}

.power-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), #ffcc45, var(--danger));
}

.power-meter strong {
  color: var(--cyan);
  text-align: right;
}

.game-message {
  position: absolute;
  top: 12px;
  left: 50%;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: rgba(3, 14, 23, 0.7);
  color: var(--ink);
  font-family: Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: 180ms;
}

.game-message.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.desktop-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  min-height: 42px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.07em;
}

.desktop-hints span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.desktop-hints em,
.footer em,
.primary-button em {
  font-style: normal;
}

kbd {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid rgba(120, 145, 166, 0.36);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #0c2231;
  color: #b6cad7;
  font-family: inherit;
  font-size: 0.53rem;
}

.desktop-hints b { color: var(--cyan); font-size: 0.85rem; }

.mobile-controls {
  display: none;
}

.control-panel {
  padding-bottom: 11px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 14px 9px;
  border-bottom: 1px solid var(--line);
  font-family: Consolas, monospace;
}

.panel-heading span {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.panel-heading small {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

.weapon-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 11px 11px 8px;
}

.weapon-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(13, 36, 51, 0.68);
  cursor: pointer;
  transition: border-color 150ms, background 150ms, transform 150ms;
}

.weapon-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--weapon-color) 55%, transparent);
  transform: translateY(-1px);
}

.weapon-card.is-randomized {
  animation: stackPulse 420ms ease;
}

.weapon-card.is-selected {
  border-color: var(--weapon-color);
  background: color-mix(in srgb, var(--weapon-color) 12%, #0d2433);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--weapon-color) 10%, transparent), 0 0 12px color-mix(in srgb, var(--weapon-color) 9%, transparent);
}

.weapon-card.is-selected:disabled {
  filter: none;
  opacity: 1;
}

.weapon-card.is-selected::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--weapon-color);
  box-shadow: 0 0 5px var(--weapon-color);
  content: "";
}

.weapon-card:disabled {
  cursor: default;
  filter: saturate(0.3);
  opacity: 0.42;
}

@keyframes stackPulse {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.weapon-card__icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--weapon-color) 45%, transparent);
  border-radius: 5px;
  color: var(--weapon-color);
  font-family: Consolas, monospace;
  font-size: 0.59rem;
  font-weight: 900;
}

.weapon-card strong {
  width: 100%;
  overflow: hidden;
  color: #bcd0dc;
  font-family: Consolas, monospace;
  font-size: 0.45rem;
  letter-spacing: -0.01em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weapon-details {
  margin: 0 11px 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(3, 14, 23, 0.28);
}

.weapon-details > div {
  display: inline-flex;
  width: calc(50% - 3px);
  flex-direction: column;
  gap: 2px;
  font-family: Consolas, monospace;
}

.weapon-details span {
  color: var(--muted);
  font-size: 0.47rem;
}

.weapon-details strong {
  color: var(--cyan);
  font-size: 0.67rem;
}

.weapon-details p {
  margin: 7px 0 0;
  color: #7f9aad;
  font-size: 0.61rem;
  line-height: 1.4;
}

.panel-heading--audio {
  border-top: 1px solid var(--line);
}

.panel-heading--audio button {
  padding: 3px 7px;
  border: 1px solid rgba(186, 252, 67, 0.35);
  border-radius: 3px;
  background: rgba(186, 252, 67, 0.07);
  color: var(--lime);
  font-family: Consolas, monospace;
  font-size: 0.5rem;
  cursor: pointer;
}

.panel-heading--audio button.is-muted {
  border-color: rgba(255, 85, 117, 0.4);
  color: var(--danger);
}

.mixer-row {
  display: grid;
  grid-template-columns: 68px 1fr 24px;
  align-items: center;
  gap: 7px;
  padding: 9px 13px 0;
}

.mixer-row label {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.49rem;
}

.mixer-row label b {
  font-size: inherit;
  font-weight: 400;
}

.mixer-row label span {
  display: inline-block;
  width: 14px;
  color: var(--cyan);
}

.mixer-row output {
  color: #a5bbc9;
  font-family: Consolas, monospace;
  font-size: 0.52rem;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  appearance: none;
  background: linear-gradient(90deg, var(--cyan) 50%, #173142 50%);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #092131;
  border-radius: 50%;
  appearance: none;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(64, 233, 255, 0.5);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 2px solid #092131;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(64, 233, 255, 0.5);
  cursor: pointer;
}

.intel-card {
  margin: 13px 11px 0;
  padding: 9px 10px;
  border-left: 2px solid var(--violet);
  background: rgba(157, 123, 255, 0.06);
}

.intel-card span {
  color: var(--violet);
  font-family: Consolas, monospace;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
}

.intel-card p {
  margin: 5px 0 0;
  color: #8199aa;
  font-size: 0.57rem;
  line-height: 1.4;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 11px 3px 0;
  color: #466274;
  font-family: Consolas, monospace;
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.footer b { color: #64849a; }
.footer i { color: var(--danger); font-style: normal; }
.footer__credit {
  color: #8aa6b6;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-align: center;
}
.footer__credit a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(64, 233, 255, 0.28);
  transition: color 160ms, border-color 160ms, text-shadow 160ms;
}
.footer__credit a:hover {
  color: #c9faff;
  border-color: var(--cyan);
  text-shadow: 0 0 9px rgba(64, 233, 255, 0.45);
}
.footer__tech { text-align: right; }

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(1, 8, 13, 0.74);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms;
  backdrop-filter: blur(13px);
}

.modal--visible {
  opacity: 1;
  pointer-events: auto;
}

.modal__card {
  position: relative;
  width: min(470px, 100%);
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid rgba(64, 233, 255, 0.25);
  border-radius: 11px;
  background:
    linear-gradient(rgba(64, 233, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 233, 255, 0.025) 1px, transparent 1px),
    #081b29;
  background-size: 20px 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.52), inset 0 0 60px rgba(64, 233, 255, 0.035);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 240ms;
}

.modal--visible .modal__card {
  transform: none;
}

.modal__card::before,
.modal__card::after {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: var(--cyan);
  content: "";
}

.modal__card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.modal__card::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.modal__card > small {
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.intro-card__icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 17px;
  place-items: center;
  border: 1px solid rgba(64, 233, 255, 0.34);
  border-radius: 16px;
  background: rgba(64, 233, 255, 0.07);
  color: var(--cyan);
  box-shadow: 0 0 35px rgba(64, 233, 255, 0.1);
  font-family: Consolas, monospace;
  font-weight: 900;
  transform: rotate(-4deg);
}

.intro-game-name {
  margin: 0 auto 10px;
  color: #eaf7ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1.7rem, 6vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(64, 233, 255, 0.12);
}

.intro-game-name strong {
  color: var(--cyan);
  font-weight: inherit;
}

.modal h1,
.modal h2 {
  margin: 9px 0 13px;
  font-family: Consolas, monospace;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.modal h1 {
  font-size: clamp(1.55rem, 5vw, 2.25rem);
}

.modal h1 span { color: var(--cyan); }

.modal h2 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
}

.modal p {
  margin: 0 auto 23px;
  color: #88a2b3;
  font-size: 0.88rem;
  line-height: 1.6;
}

.primary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(290px, 100%);
  min-height: 50px;
  gap: 0;
  padding: 13px 50px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  background: rgba(64, 233, 255, 0.1);
  color: var(--cyan);
  box-shadow: 0 0 28px rgba(64, 233, 255, 0.08), inset 0 0 18px rgba(64, 233, 255, 0.05);
  font-family: Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button > span:last-child {
  position: absolute;
  right: 18px;
  top: 50%;
  font-size: 1rem;
  transform: translateY(-50%);
}

.primary-button:hover {
  background: var(--cyan);
  color: #06131d;
  box-shadow: 0 0 28px rgba(64, 233, 255, 0.25);
  transform: translateY(-2px);
}

.intro-card__note {
  display: block;
  margin-top: 15px;
  color: #496779;
  font-family: Consolas, monospace;
  font-size: 0.56rem;
  font-style: normal;
}

.modal__close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0;
  text-align: left;
}

.help-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(64, 233, 255, 0.025);
}

.help-grid b,
.help-grid span {
  display: block;
}

.help-grid b {
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.help-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.result-card h2 { color: var(--lime); }
.result-card.is-defeat h2 { color: var(--danger); }

@media (max-width: 1040px) {
  .app { width: min(920px, calc(100% - 24px)); }
  .game-layout { grid-template-columns: 1fr; }
  .control-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr); align-content: start; }
  .control-panel .panel-heading:first-child { grid-column: 1; }
  .weapon-list { grid-column: 1; grid-template-columns: repeat(6, 1fr); }
  .weapon-details { grid-column: 1; }
  .panel-heading--audio { grid-column: 2; grid-row: 1; }
  .mixer-row { grid-column: 2; }
  .intel-card { grid-column: 2; }
}

@media (max-width: 700px) {
  .app { width: min(100% - 16px, 620px); padding-top: 10px; }
  .topbar { grid-template-columns: 1fr auto; min-height: 48px; margin-bottom: 8px; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__mark svg { width: 29px; }
  .brand strong { font-size: 1rem; }
  .brand small { display: none; }
  .round-pill { position: fixed; z-index: 10; top: max(7px, env(safe-area-inset-top)); left: 50%; height: 29px; padding: 0 9px; background: rgba(5, 19, 29, 0.9); transform: translateX(-50%); }
  .round-pill #roundLabel, .round-pill i { display: none; }
  .icon-button { width: 34px; height: 34px; }
  .topbar-actions { gap: 6px; }
  .language-switch { width: 60px; height: 29px; }
  .language-switch__track i { top: 3px; left: 3px; width: 25px; height: 21px; }
  .language-switch input:checked + .language-switch__track i { transform: translateX(28px); }
  .scoreboard { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
  .versus { display: none; }
  .fighter { gap: 7px; }
  .fighter__avatar { flex-basis: 35px; height: 35px; font-size: 0.56rem; }
  .fighter__name strong { display: none; }
  .fighter__name span { font-size: 0.6rem; }
  .fighter__meta span { display: none; }
  .health-track { height: 7px; margin-top: 4px; }
  .fighter--enemy .fighter__info { order: 2; }
  .fighter--enemy .fighter__avatar { order: 1; }
  .arena-toolbar { height: 28px; }
  .arena-toolbar > span { display: none; }
  .terminal-dots { margin-right: 0; }
  .desktop-hints { display: none; }
  .mobile-controls { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 62px; padding: 8px 10px; border-top: 1px solid var(--line); background: rgba(5, 18, 28, 0.88); }
  .control-cluster { display: flex; gap: 6px; }
  .control-button { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(64, 233, 255, 0.22); border-radius: 8px; background: #0c2636; color: var(--cyan); font-size: 1rem; touch-action: none; }
  .control-button:active, .control-button.is-active { background: rgba(64, 233, 255, 0.18); transform: translateY(1px); }
  .fire-button { align-self: stretch; min-width: 92px; border: 1px solid var(--orange); border-radius: 8px; background: rgba(255, 130, 81, 0.1); color: var(--orange); font-family: Consolas, monospace; touch-action: none; }
  .fire-button span, .fire-button small { display: block; }
  .fire-button span { font-size: 0.68rem; font-weight: 800; }
  .fire-button small { margin-top: 1px; font-size: 0.42rem; }
  .fire-button:active, .fire-button.is-active { background: var(--orange); color: #101a1e; }
  .control-panel { display: block; }
  .weapon-list { grid-template-columns: repeat(6, minmax(52px, 1fr)); overflow-x: auto; }
  .weapon-details { display: none; }
  .panel-heading--audio { border-top: 1px solid var(--line); }
  .intel-card { display: none; }
  .footer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .footer { gap: 8px; }
  .footer > span:first-child { display: none; }
  .footer { grid-template-columns: 1fr; }
  .footer__credit { justify-self: center; font-size: 0.72rem; text-align: center; }
  .footer__tech { display: none; }
}

@media (max-width: 430px) {
  .app { width: calc(100% - 10px); }
  .brand__mark { width: 32px; height: 32px; }
  .brand strong { font-size: 0.86rem; }
  .round-pill { font-size: 0.58rem; }
  .weapon-list { padding-inline: 7px; }
  .weapon-card { min-height: 55px; }
  .weapon-card__icon { width: 24px; height: 24px; font-size: 0.52rem; }
  .control-button { width: 40px; height: 40px; }
  .fire-button { min-width: 82px; }
  .power-meter { bottom: 6px; grid-template-columns: auto minmax(70px, 115px) 27px; padding: 5px 7px; }
  .modal { padding: 12px; }
  .modal__card { padding: 32px 20px; }
  .help-grid { grid-template-columns: 1fr; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .app { width: calc(100% - 12px); padding-top: 5px; }
  .topbar { min-height: 36px; margin-bottom: 4px; }
  .brand__mark { width: 30px; height: 30px; }
  .brand small, .scoreboard, .footer { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 220px; }
  .control-panel { display: block; }
  .arena-panel { max-height: calc(100vh - 47px); }
  .canvas-wrap { max-height: calc(100vh - 122px); }
  #gameCanvas { width: 100%; height: 100%; object-fit: contain; }
  .weapon-list { grid-template-columns: repeat(3, 1fr); padding: 7px; }
  .weapon-card { min-height: 49px; }
  .weapon-card__icon { width: 22px; height: 22px; }
  .weapon-details, .intel-card { display: none; }
  .panel-heading { padding: 8px; }
  .panel-heading--audio { border-top: 1px solid var(--line); }
  .mixer-row { padding: 6px 8px 0; }
  .mobile-controls { min-height: 52px; padding: 5px 8px; }
  .control-button { width: 38px; height: 38px; }
}

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