:root {
  color-scheme: dark;
  --page: #05070d;
  --panel: #090e17;
  --panel-soft: rgba(11, 20, 31, 0.86);
  --line: rgba(116, 191, 219, 0.2);
  --text: #edfaff;
  --muted: #7d91a2;
  --cyan: #50e9ff;
  --green: #6cf3a6;
  --magenta: #ff5ebc;
  --orange: #ffad55;
  --danger: #ff526f;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(80, 233, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 233, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 76% 12%, rgba(82, 84, 255, 0.12), transparent 30%),
    radial-gradient(circle at 14% 80%, rgba(255, 94, 188, 0.07), transparent 24%),
    #05070d;
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.game-shell {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  height: 100svh;
  min-height: 0;
}

.command-bar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(80, 233, 255, 0.22);
  background: rgba(5, 8, 14, 0.88);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  color: #adc0ce;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover {
  color: var(--cyan);
  transform: translateX(-3px);
}

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

.game-brand strong,
.game-brand small {
  display: block;
}

.game-brand strong {
  color: #f3fdff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}

.game-brand small {
  margin-top: 2px;
  color: #63798b;
  font-size: 9px;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(80, 233, 255, 0.52);
  border-radius: 50%;
  box-shadow: inset 0 0 12px rgba(80, 233, 255, 0.1), 0 0 14px rgba(80, 233, 255, 0.12);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand-mark::before {
  inset: 6px;
  border: 1px solid rgba(255, 94, 188, 0.72);
}

.brand-mark::after {
  inset: 14px;
  background: #fff;
  box-shadow: 0 0 9px var(--cyan), 0 0 16px var(--magenta);
}

.brand-mark i {
  inset: -4px 14px;
  border: 1px solid rgba(108, 243, 166, 0.5);
}

.command-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

.engine-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 8px;
  color: #6d8495;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.engine-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 173, 85, 0.7);
}

.engine-status.is-online {
  color: #9ab8ac;
}

.engine-status.is-online i {
  background: var(--green);
  box-shadow: 0 0 10px rgba(108, 243, 166, 0.8);
}

.icon-command {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(117, 187, 214, 0.25);
  border-radius: 4px;
  background: rgba(11, 21, 32, 0.72);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-command:hover,
.icon-command:focus-visible {
  border-color: rgba(80, 233, 255, 0.72);
  color: var(--cyan);
  background: rgba(15, 37, 49, 0.86);
  outline: none;
}

.icon-command.is-muted {
  color: #5c6976;
  text-decoration: line-through;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(380px, 720px) minmax(150px, 190px);
  justify-content: center;
  gap: 18px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 18px 24px 22px;
}

.telemetry {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(113, 181, 208, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(rgba(80, 233, 255, 0.024) 1px, transparent 1px),
    rgba(7, 13, 22, 0.82);
  background-size: 100% 28px, auto;
  box-shadow: inset 0 0 32px rgba(80, 233, 255, 0.025), 0 28px 70px rgba(0, 0, 0, 0.3);
  scrollbar-width: thin;
}

.telemetry-heading,
.weapon-readout header,
.mission-log header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.telemetry-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.telemetry-heading p {
  margin: 0;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 850;
}

.telemetry-heading span {
  color: var(--orange);
  font-size: 10px;
}

.score-block {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
}

.score-block > span,
.score-block > small {
  display: block;
  color: #698092;
  font-size: 10px;
  font-weight: 750;
}

.score-block strong {
  display: block;
  margin: 3px 0 5px;
  color: #f5fdff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(80, 233, 255, 0.2);
}

.score-block b {
  color: #a2b5c4;
}

.vital-section {
  padding: 18px 0 12px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 5px;
  color: #7e92a2;
  font-size: 10px;
}

.meter-label b {
  color: #c8d7e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.meter {
  height: 6px;
  margin-bottom: 13px;
  overflow: hidden;
  border: 1px solid rgba(125, 176, 198, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.meter i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms ease;
}

.health-meter i {
  background: linear-gradient(90deg, var(--danger), var(--orange));
  box-shadow: 0 0 10px rgba(255, 82, 111, 0.5);
}

.shield-meter i {
  background: linear-gradient(90deg, #5988ff, var(--cyan));
  box-shadow: 0 0 10px rgba(80, 233, 255, 0.48);
}

.xp-meter i {
  background: linear-gradient(90deg, var(--magenta), #a875ff, var(--green));
  box-shadow: 0 0 10px rgba(255, 94, 188, 0.42);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stat-grid div {
  min-height: 60px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-grid span,
.stat-grid strong {
  display: block;
}

.stat-grid span {
  color: #667b8b;
  font-size: 9px;
}

.stat-grid strong {
  margin-top: 3px;
  color: #edfaff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
}

.weapon-readout {
  margin-top: 18px;
}

.weapon-readout header,
.mission-log header {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: #7890a1;
  font-size: 9px;
}

.weapon-readout header b {
  color: var(--green);
}

.weapon-readout dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.weapon-readout dl div {
  display: flex;
  justify-content: space-between;
  padding: 8px 7px;
  border-bottom: 1px solid rgba(116, 191, 219, 0.1);
}

.weapon-readout dt {
  color: #647989;
  font-size: 10px;
}

.weapon-readout dd {
  margin: 0;
  color: #cfe0ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.mission-log {
  margin-top: 18px;
}

.mission-log ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.mission-log li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  color: #8093a1;
  font-size: 10px;
  line-height: 1.4;
}

.mission-log time {
  color: var(--magenta);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.supply-guide {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px 14px;
  border: 1px solid rgba(113, 181, 208, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(rgba(80, 233, 255, 0.025) 1px, transparent 1px),
    rgba(7, 13, 22, 0.78);
  background-size: 100% 28px, auto;
  box-shadow: inset 0 0 28px rgba(80, 233, 255, 0.025), 0 24px 60px rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
}

.supply-guide header {
  display: grid;
  gap: 4px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.supply-guide header span,
.threat-guide p {
  margin: 0;
  color: var(--cyan);
  font: 850 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.supply-guide header b {
  color: #dceaf2;
  font-size: 13px;
}

.supply-guide ul {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.supply-guide li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(128, 181, 204, 0.14);
  background: rgba(5, 12, 20, 0.7);
}

.supply-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 900 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: inset 0 0 12px currentColor;
}

.is-health .supply-symbol { color: var(--danger); }
.is-shield .supply-symbol { color: var(--cyan); }
.is-overclock .supply-symbol { color: var(--orange); }

.supply-guide li strong,
.supply-guide li small {
  display: block;
}

.supply-guide li strong {
  color: #dceaf2;
  font-size: 11px;
}

.supply-guide li small {
  margin-top: 3px;
  color: #6f8595;
  font-size: 9px;
  line-height: 1.45;
}

.threat-guide {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.threat-guide span {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 7px;
  color: #778b99;
  font-size: 9px;
  line-height: 1.5;
}

.threat-guide i {
  display: block;
  width: 14px;
  height: 5px;
  margin-top: 4px;
  border-radius: 4px;
}

.boss-shot-mark { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.boundary-mark { border: 1px solid var(--cyan); }
.wave-mark { background: var(--orange); }

.arena-column {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr) 24px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.arena-meta,
.arena-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #536a7b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 750;
}

.arena-frame {
  position: relative;
  justify-self: center;
  width: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(86, 225, 255, 0.34);
  border-radius: 4px;
  background: #050812;
  box-shadow: 0 0 0 1px rgba(255, 94, 188, 0.08), 0 24px 70px rgba(0, 0, 0, 0.54), inset 0 0 36px rgba(69, 135, 255, 0.06);
}

.arena-frame::before,
.arena-frame::after {
  content: "";
  position: absolute;
  z-index: 18;
  pointer-events: none;
}

.arena-frame::before {
  inset: 0;
  border: 10px solid transparent;
  border-top-color: rgba(80, 233, 255, 0.12);
  border-bottom-color: rgba(255, 94, 188, 0.1);
  mix-blend-mode: screen;
}

.arena-frame::after {
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.018) 3px 4px);
  opacity: 0.48;
}

#game-root,
#game-root canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#game-root {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #eafaff;
  background: rgba(3, 7, 13, 0.86);
  text-align: center;
  backdrop-filter: blur(12px);
}

.stage-overlay::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(80, 233, 255, 0.16);
  pointer-events: none;
}

.overlay-kicker,
.loading-overlay small {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 850;
}

.stage-overlay h1,
.stage-overlay h2 {
  max-width: 420px;
  margin: 10px 0 16px;
  color: #fff;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 0 26px rgba(80, 233, 255, 0.26);
}

.stage-overlay > p:not(.overlay-kicker) {
  max-width: 420px;
  margin: 0 0 22px;
  color: #9bb0bf;
  font-size: 13px;
  line-height: 1.7;
}

.control-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
}

.control-hints span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #718797;
  font-size: 10px;
}

kbd {
  min-width: 24px;
  padding: 4px 6px;
  border: 1px solid rgba(117, 188, 214, 0.32);
  border-radius: 3px;
  color: #dff8ff;
  background: #0c1721;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: inset 0 -2px rgba(0, 0, 0, 0.35);
}

.launch-button {
  min-width: 170px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(80, 233, 255, 0.74);
  border-radius: 4px;
  color: #eaffff;
  background: linear-gradient(180deg, rgba(41, 200, 230, 0.34), rgba(15, 76, 101, 0.55));
  box-shadow: inset 0 0 20px rgba(80, 233, 255, 0.12), 0 0 22px rgba(80, 233, 255, 0.14);
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.launch-button:hover,
.launch-button:focus-visible {
  border-color: #fff;
  box-shadow: inset 0 0 24px rgba(80, 233, 255, 0.2), 0 0 30px rgba(80, 233, 255, 0.24);
  transform: translateY(-2px);
  outline: none;
}

.loading-reticle {
  width: 68px;
  height: 68px;
  margin-bottom: 16px;
  border: 1px solid rgba(80, 233, 255, 0.42);
  border-top-color: var(--magenta);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(80, 233, 255, 0.08), 0 0 22px rgba(80, 233, 255, 0.12);
  animation: reticle-spin 1.4s linear infinite;
}

.loading-reticle::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 24px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.loading-overlay p {
  margin: 0 0 5px;
  font-weight: 800;
}

.upgrade-overlay {
  justify-content: center;
  padding-block: 28px;
  background: linear-gradient(180deg, rgba(3, 7, 13, 0.35), rgba(3, 7, 13, 0.96) 44%);
}

.upgrade-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  max-width: 620px;
}

.upgrade-option {
  min-height: 138px;
  padding: 14px 12px;
  border: 1px solid rgba(95, 194, 224, 0.28);
  border-radius: 4px;
  color: #dcebf3;
  background: rgba(9, 18, 29, 0.92);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upgrade-option:hover,
.upgrade-option:focus-visible {
  border-color: var(--cyan);
  background: rgba(13, 38, 52, 0.96);
  transform: translateY(-3px);
  outline: none;
}

.upgrade-option b,
.upgrade-option span,
.upgrade-option small {
  display: block;
}

.upgrade-option b {
  color: var(--magenta);
  font: 850 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.upgrade-option span {
  margin: 9px 0 6px;
  color: #f5fdff;
  font-size: 14px;
  font-weight: 850;
}

.upgrade-option small {
  color: #7f93a2;
  font-size: 10px;
  line-height: 1.5;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(420px, 100%);
  margin: 0 0 24px;
}

.result-grid div {
  padding: 12px;
  border-right: 1px solid var(--line);
}

.result-grid div:last-child {
  border-right: 0;
}

.result-grid dt {
  color: #6f8494;
  font-size: 9px;
}

.result-grid dd {
  margin: 5px 0 0;
  color: #fff;
  font: 850 20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.boss-hud {
  position: absolute;
  z-index: 15;
  top: 18px;
  right: 18px;
  left: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 82, 111, 0.42);
  border-radius: 3px;
  background: rgba(13, 5, 12, 0.76);
  pointer-events: none;
}

.boss-hud div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #ff9db0;
  font: 800 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.boss-hud > i {
  display: block;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.boss-hud > i span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--danger), var(--magenta), var(--orange));
  box-shadow: 0 0 12px rgba(255, 82, 111, 0.6);
  transform-origin: left;
}

.stage-announcement {
  position: absolute;
  z-index: 20;
  top: 18%;
  left: 50%;
  min-width: 220px;
  padding: 9px 16px;
  border-top: 1px solid rgba(80, 233, 255, 0.4);
  border-bottom: 1px solid rgba(255, 94, 188, 0.32);
  color: #eaffff;
  background: rgba(3, 9, 16, 0.76);
  font: 850 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 180ms ease, transform 220ms ease;
}

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

.mobile-controls {
  position: absolute;
  z-index: 24;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.mobile-controls button {
  width: 78px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(80, 233, 255, 0.36);
  border-radius: 6px;
  color: #dffcff;
  background: rgba(5, 15, 24, 0.72);
  font-size: 24px;
  pointer-events: auto;
  touch-action: none;
}

.mobile-controls button:active,
.mobile-controls button.is-pressed {
  border-color: var(--cyan);
  background: rgba(26, 87, 105, 0.82);
  box-shadow: 0 0 18px rgba(80, 233, 255, 0.2);
}

@keyframes reticle-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .game-shell {
    grid-template-rows: 58px auto;
    height: auto;
    min-height: 100svh;
  }

  .command-bar {
    grid-template-columns: auto 1fr auto;
    min-height: 58px;
    padding: 0 14px;
  }

  .game-brand {
    justify-self: center;
  }

  .game-brand small,
  .engine-status {
    display: none;
  }

  .game-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    height: auto;
    overflow: visible;
    padding: 12px;
  }

  .supply-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    order: 3;
    overflow: visible;
  }

  .supply-guide header,
  .supply-guide ul,
  .threat-guide {
    grid-column: 1 / -1;
  }

  .supply-guide ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
  }

  .threat-guide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .threat-guide p {
    grid-column: 1 / -1;
  }

  .telemetry {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 1fr;
    gap: 12px;
    padding: 12px;
    overflow: visible;
  }

  .telemetry-heading,
  .mission-log {
    display: none;
  }

  .score-block,
  .vital-section,
  .weapon-readout {
    padding: 0;
    margin: 0;
    border: 0;
  }

  .score-block strong {
    font-size: 25px;
  }

  .stat-grid {
    display: none;
  }

  .weapon-readout dl div:nth-child(n + 5) {
    display: none;
  }

  .arena-column {
    grid-template-rows: 20px auto 28px;
    overflow: visible;
  }

  .arena-frame {
    width: min(100%, 480px);
    height: auto;
    min-height: 0;
  }

}

@media (max-width: 560px) {
  .back-link span:last-child {
    display: none;
  }

  .game-brand strong {
    font-size: 13px;
  }

  .telemetry {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .supply-guide ul,
  .threat-guide {
    grid-template-columns: 1fr;
  }

  .weapon-readout {
    display: none;
  }

  .arena-meta span:nth-child(2),
  .arena-footer span:nth-child(2) {
    display: none;
  }

  .stage-overlay {
    padding: 24px;
  }

  .stage-overlay h1,
  .stage-overlay h2 {
    font-size: 28px;
  }

  .upgrade-options {
    grid-template-columns: 1fr;
  }

  .upgrade-option {
    min-height: 88px;
  }

  .upgrade-overlay {
    justify-content: center;
    padding-bottom: 24px;
  }

  .result-grid dd {
    font-size: 16px;
  }
}

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