/* ============================================================
   STEEL SIEGE — interface styling
   ============================================================ */

:root {
  --bg: #050b0a;
  --bg-deep: #030807;
  --panel: rgba(10, 21, 18, 0.86);
  --panel-solid: #0a1512;
  --panel-raised: #0e1d19;
  --line: rgba(108, 173, 149, 0.16);
  --line-strong: rgba(108, 173, 149, 0.3);
  --mint: #59f3c2;
  --mint-dim: #2a9a7b;
  --amber: #ffb340;
  --red: #ff5b5f;
  --ink: #eaf5ef;
  --muted: #829a91;
  --muted-dark: #51695f;
  --display: "Arial Black", "Segoe UI Black", "Segoe UI", "Microsoft YaHei", sans-serif;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg-deep);
}

body {
  min-width: 280px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(89, 243, 194, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 243, 194, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 50% -15%, #0c221c 0%, transparent 46%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

button,
canvas {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 38vw;
  height: 38vw;
  min-width: 300px;
  min-height: 300px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.15;
  pointer-events: none;
}

.page-glow--left {
  top: 4vh;
  left: -18vw;
  background: #0f8b69;
}

.page-glow--right {
  right: -19vw;
  bottom: -7vh;
  background: #b25b18;
  opacity: 0.08;
}

.app {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 30px 28px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 28px;
  align-items: start;
}

.game-column {
  min-width: 0;
}

/* ---------- Brand ---------- */

.brandbar {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 66px;
  margin-bottom: 17px;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--mint);
  background:
    linear-gradient(135deg, rgba(89, 243, 194, 0.1), transparent 60%),
    #091511;
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  box-shadow: inset 0 0 24px rgba(89, 243, 194, 0.06);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.brand-mark::before {
  width: 1px;
  height: 42px;
  left: 50%;
  top: 8px;
}

.brand-mark::after {
  width: 42px;
  height: 1px;
  top: 50%;
  left: 8px;
}

.brand-mark__ring {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(89, 243, 194, 0.25);
  border-radius: 50%;
}

.brand-mark__tank {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 19px;
  margin-top: 3px;
  background: var(--mint);
  clip-path: polygon(0 24%, 22% 24%, 22% 0, 31% 0, 31% 24%, 78% 24%, 78% 36%, 100% 36%, 100% 76%, 78% 76%, 78% 100%, 22% 100%, 22% 76%, 0 76%);
  filter: drop-shadow(0 0 7px rgba(89, 243, 194, 0.45));
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.eyebrow span {
  color: var(--mint-dim);
}

.brandbar h1 {
  margin: 0;
  color: #f4faf7;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 38px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(89, 243, 194, 0.08);
}

.brandbar h1 span {
  color: var(--mint);
}

.brand-cn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  color: #a7b8b0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-cn i {
  width: 3px;
  height: 3px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
}

.top-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 0 11px;
  color: #aec0b8;
  background: rgba(10, 22, 18, 0.8);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.icon-btn:hover:not(:disabled) {
  color: var(--mint);
  background: rgba(89, 243, 194, 0.07);
  border-color: rgba(89, 243, 194, 0.35);
}

.icon-btn:disabled {
  cursor: default;
  opacity: 0.35;
}

.icon-btn.is-off {
  color: var(--muted-dark);
}

/* ---------- Stats ---------- */

.stats-deck {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
  background:
    linear-gradient(90deg, rgba(89, 243, 194, 0.035), transparent 38%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.stats-deck::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 1px;
  background: var(--mint);
  box-shadow: 0 0 13px var(--mint);
}

.stat {
  min-width: 0;
  padding: 10px 15px 11px;
  border-right: 1px solid var(--line);
}

.stat:last-of-type {
  border-right: 0;
}

.stat__label {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.stat__label em {
  margin-left: 5px;
  color: var(--muted-dark);
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.stat__value {
  display: block;
  margin-top: 2px;
  color: #dff7ed;
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  color: var(--muted-dark);
  font-size: 11px;
  letter-spacing: 0;
}

.stat--lives .stat__value {
  color: var(--mint);
}

.stat--hostiles .stat__value {
  color: var(--amber);
}

.buff-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  min-height: 0;
  padding: 0 12px;
  transition: padding 160ms ease;
}

.buff-row:not(:empty) {
  padding-top: 7px;
  padding-bottom: 7px;
  border-top: 1px solid var(--line);
}

.buff {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  color: var(--mint);
  background: rgba(89, 243, 194, 0.07);
  border: 1px solid rgba(89, 243, 194, 0.22);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.buff--shield {
  color: #7ad7ff;
  border-color: rgba(122, 215, 255, 0.25);
  background: rgba(122, 215, 255, 0.07);
}

/* ---------- Screen ---------- */

.screen-frame {
  position: relative;
  padding: 9px;
  background:
    linear-gradient(135deg, rgba(89, 243, 194, 0.055), transparent 30%),
    linear-gradient(315deg, rgba(255, 179, 64, 0.035), transparent 40%),
    #08120f;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.53),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.screen-frame::before,
.screen-frame::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.screen-frame::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--mint);
  border-left: 2px solid var(--mint);
}

.screen-frame::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
}

.screen-meta,
.screen-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 2px 8px;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.screen-meta {
  padding: 0 2px 8px;
}

.screen-meta b,
.screen-footer b {
  color: var(--mint-dim);
  font-weight: 700;
}

.screen-meta > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #779088;
}

.signal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 7px var(--red);
  animation: signal-pulse 1.8s ease-in-out infinite;
}

@keyframes signal-pulse {
  50% { opacity: 0.28; }
}

.canvas-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #06100d;
  border: 1px solid rgba(89, 243, 194, 0.18);
  cursor: crosshair;
  isolation: isolate;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

.screen-vignette,
.scanlines,
.screen-flare {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen-vignette {
  z-index: 4;
  box-shadow:
    inset 0 0 95px 16px rgba(0, 0, 0, 0.48),
    inset 0 0 18px rgba(0, 0, 0, 0.5);
}

.scanlines {
  z-index: 5;
  opacity: 0.24;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.25) 3px,
    transparent 4px
  );
  mix-blend-mode: multiply;
}

.screen-flare {
  z-index: 6;
  opacity: 0.16;
  background:
    linear-gradient(112deg, transparent 19%, rgba(225, 255, 245, 0.09) 31%, transparent 41%),
    radial-gradient(circle at 20% 10%, rgba(89, 243, 194, 0.14), transparent 42%);
}

.screen-footer {
  padding: 8px 2px 0;
}

.screen-footer__hint {
  color: #61776e;
  letter-spacing: 0.06em;
}

/* ---------- Overlay ---------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(14px, 3.5vw, 34px);
  background:
    radial-gradient(circle at 50% 38%, rgba(9, 25, 20, 0.6) 0%, rgba(3, 9, 7, 0.9) 62%, rgba(2, 7, 5, 0.97) 100%);
  backdrop-filter: blur(3px);
  animation: overlay-in 240ms ease-out both;
}

.overlay[hidden] {
  display: none;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-card {
  position: relative;
  width: min(510px, 100%);
  padding: clamp(22px, 4vw, 36px);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(89, 243, 194, 0.06), transparent 38%),
    rgba(7, 17, 13, 0.91);
  border: 1px solid rgba(89, 243, 194, 0.27);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.5),
    inset 0 0 50px rgba(89, 243, 194, 0.025);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  animation: card-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.overlay-card::before,
.overlay-card::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 1px;
  background: var(--mint);
  opacity: 0.7;
}

.overlay-card::before {
  top: 0;
  left: 36px;
}

.overlay-card::after {
  right: 36px;
  bottom: 0;
  background: var(--amber);
}

.overlay-eyebrow {
  margin: 0 0 11px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.overlay-eyebrow::before,
.overlay-eyebrow::after {
  content: "—";
  margin: 0 8px;
  color: var(--muted-dark);
  letter-spacing: 0;
}

.overlay-title {
  margin: 0;
  color: #f4fbf8;
  font-family: var(--display);
  font-size: clamp(28px, 5.6vw, 46px);
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 0 36px rgba(89, 243, 194, 0.17);
}

.overlay-title--cn {
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(27px, 5.2vw, 42px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.overlay-title--danger {
  color: #ffe4e2;
  text-shadow: 0 0 36px rgba(255, 91, 95, 0.24);
}

.overlay-text {
  max-width: 38em;
  margin: 14px auto 0;
  color: #a9bbb3;
  font-size: clamp(12px, 1.5vw, 13px);
  line-height: 1.8;
}

.overlay-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 19px;
}

.overlay-stat {
  min-width: 94px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(129, 179, 159, 0.13);
}

.overlay-stat span {
  display: block;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.overlay-stat b {
  display: block;
  margin-top: 2px;
  color: #dff7ed;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.btn {
  appearance: none;
  min-height: 43px;
  padding: 0 25px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  position: relative;
  color: #04130e;
  background: var(--mint);
  border: 1px solid var(--mint);
  box-shadow: 0 0 24px rgba(89, 243, 194, 0.16);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.btn--primary:hover {
  background: #7dffd6;
  border-color: #7dffd6;
  box-shadow: 0 0 34px rgba(89, 243, 194, 0.28);
}

.btn--ghost {
  color: #a9bbb3;
  background: transparent;
  border: 1px solid rgba(129, 179, 159, 0.23);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(129, 179, 159, 0.5);
}

.overlay-hint {
  margin: 15px 0 0;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.overlay-hint kbd {
  margin: 0 2px;
}

/* ---------- Touch ---------- */

.touch-controls {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 460px;
  margin: 13px auto 0;
  padding: 0 8px;
  user-select: none;
  -webkit-user-select: none;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  flex: 0 0 auto;
  gap: 3px;
}

.touch-btn,
.touch-fire {
  appearance: none;
  color: #c8e0d5;
  background: rgba(15, 31, 25, 0.92);
  border: 1px solid rgba(112, 177, 151, 0.28);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.touch-btn {
  display: grid;
  place-items: center;
  font-size: 15px;
}

.touch-btn:active,
.touch-btn.is-active {
  color: #06120e;
  background: var(--mint);
  border-color: var(--mint);
}

.touch-btn--up { grid-column: 2; grid-row: 1; }
.touch-btn--left { grid-column: 1; grid-row: 2; }
.touch-btn--right { grid-column: 3; grid-row: 2; }
.touch-btn--down { grid-column: 2; grid-row: 3; }

.dpad__core {
  grid-column: 2;
  grid-row: 2;
  margin: 13px;
  background: rgba(89, 243, 194, 0.12);
  border: 1px solid rgba(89, 243, 194, 0.2);
  border-radius: 50%;
}

.touch-fire {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border-color: rgba(255, 179, 64, 0.36);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 24px rgba(255, 179, 64, 0.055);
}

.touch-fire span,
.touch-fire small {
  display: block;
}

.touch-fire small {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

.touch-fire:active,
.touch-fire.is-active {
  color: #1a0e02;
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 30px rgba(255, 179, 64, 0.24);
}

/* ---------- Sidebar ---------- */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 83px;
}

.panel {
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(89, 243, 194, 0.028), transparent 35%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.panel-index {
  color: var(--mint-dim);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.panel-heading h2 {
  margin: 0;
  color: #d6e8e0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.panel-heading h2 small {
  margin-left: 3px;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.status-chip {
  margin-left: auto;
  padding: 2px 5px;
  color: var(--red);
  border: 1px solid rgba(255, 91, 95, 0.32);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.mission-panel {
  padding-bottom: 17px;
  border-color: rgba(255, 179, 64, 0.16);
  background:
    linear-gradient(140deg, rgba(255, 179, 64, 0.04), transparent 42%),
    var(--panel);
}

.mission-lead {
  margin: 0;
  color: #c4d5cd;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
}

.mission-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.objectives {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 15px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.objectives li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #96a9a0;
  font-size: 10px;
  line-height: 1.5;
}

.objectives span {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 8px;
}

.control-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
}

.keys {
  display: flex;
  gap: 2px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  color: #a5b9b0;
  background: #0d1a16;
  border: 1px solid #294039;
  border-bottom-color: #1a2b25;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.keys--arrows kbd {
  min-width: 14px;
  padding: 0 2px;
  font-size: 8px;
}

kbd.kbd--wide {
  min-width: 45px;
  letter-spacing: 0.04em;
}

.intel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intel-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--mint);
  background: rgba(89, 243, 194, 0.06);
  border: 1px solid rgba(89, 243, 194, 0.17);
  font-family: var(--mono);
  font-size: 13px;
}

.intel-icon--rapid {
  color: var(--amber);
  border-color: rgba(255, 179, 64, 0.2);
  background: rgba(255, 179, 64, 0.05);
}

.intel-icon--shield {
  color: #7ad7ff;
  border-color: rgba(122, 215, 255, 0.2);
  background: rgba(122, 215, 255, 0.05);
}

.intel div {
  min-width: 0;
}

.intel b {
  display: block;
  color: #b4c7be;
  font-size: 10px;
  font-weight: 600;
}

.intel small {
  display: block;
  margin-top: 1px;
  color: var(--muted-dark);
  font-size: 9px;
  line-height: 1.4;
}

.record-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: rgba(8, 17, 14, 0.64);
  border: 1px solid var(--line);
}

.record-label {
  display: block;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.record-panel strong {
  display: block;
  margin-top: 2px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.record-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.record-bars i {
  display: block;
  width: 3px;
  background: var(--mint);
  opacity: 0.3;
}

.record-bars i:nth-child(1) { height: 25%; }
.record-bars i:nth-child(2) { height: 48%; }
.record-bars i:nth-child(3) { height: 34%; }
.record-bars i:nth-child(4) { height: 64%; opacity: 0.45; }
.record-bars i:nth-child(5) { height: 42%; }
.record-bars i:nth-child(6) { height: 78%; opacity: 0.6; }
.record-bars i:nth-child(7) { height: 55%; }
.record-bars i:nth-child(8) { height: 90%; opacity: 0.8; }
.record-bars i:nth-child(9) { height: 65%; }
.record-bars i:nth-child(10) { height: 100%; opacity: 1; }
.record-bars i:nth-child(11) { height: 72%; opacity: 0.5; }
.record-bars i:nth-child(12) { height: 84%; opacity: 0.7; }

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 2px 0;
  color: #3f554c;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .app {
    width: min(900px, 100%);
    grid-template-columns: 1fr;
  }

  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 0;
  }

  .mission-panel {
    grid-row: span 2;
  }

  .record-panel,
  .page-footer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 17px 13px 20px;
    gap: 17px;
  }

  .brandbar {
    gap: 12px;
    margin-bottom: 13px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-mark__ring {
    width: 30px;
    height: 30px;
  }

  .brand-mark__tank {
    width: 23px;
    height: 16px;
  }

  .top-actions .icon-btn span {
    display: none;
  }

  .icon-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .screen-frame {
    padding: 8px;
  }

  .stat {
    padding: 8px 10px 9px;
  }

  .stat__label em {
    display: none;
  }

  .stat__value {
    font-size: 17px;
  }

  .screen-footer__hint {
    display: none;
  }

  .overlay {
    padding: 12px;
  }

  .overlay-card {
    padding: 21px 18px;
  }

  .overlay-text {
    font-size: 11px;
    line-height: 1.65;
  }

  .overlay-stats {
    margin-top: 14px;
  }

  .overlay-stat {
    min-width: 78px;
    padding: 6px 8px;
  }

  .overlay-stat b {
    font-size: 12px;
  }

  .overlay-actions {
    margin-top: 17px;
  }

  .btn {
    min-height: 39px;
    padding: 0 18px;
    font-size: 9px;
  }

  .overlay-hint {
    display: none;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .mission-panel {
    grid-row: auto;
  }

  .record-panel,
  .page-footer {
    grid-column: auto;
  }

  .screen-meta {
    font-size: 7px;
  }
}

@media (max-width: 430px) {
  .overlay {
    padding: 9px;
  }

  .overlay-card {
    padding: 17px 14px;
  }

  .overlay-eyebrow {
    margin-bottom: 8px;
    font-size: 7px;
    letter-spacing: 0.2em;
  }

  .overlay-eyebrow::before,
  .overlay-eyebrow::after {
    margin: 0 4px;
  }

  .overlay-title {
    font-size: 25px;
  }

  .overlay-text {
    margin-top: 9px;
    font-size: 10px;
    line-height: 1.55;
  }

  .overlay-stats {
    display: none;
  }

  .overlay-actions {
    margin-top: 13px;
  }

  .btn {
    min-height: 37px;
  }

  .brandbar h1 {
    font-size: 23px;
  }

  .brand-cn {
    font-size: 9px;
    letter-spacing: 0.11em;
  }

  .eyebrow {
    font-size: 7px;
  }

  .stat__label {
    font-size: 7px;
    letter-spacing: 0.08em;
  }

  .stat__value {
    font-size: 15px;
  }

  .stats-deck {
    margin-bottom: 9px;
  }

  .screen-meta > span:last-child,
  .screen-footer > span:first-child {
    display: none;
  }

  .dpad {
    grid-template-columns: repeat(3, 45px);
    grid-template-rows: repeat(3, 45px);
  }

  .touch-fire {
    width: 82px;
    height: 82px;
  }
}

@media (hover: none), (pointer: coarse) {
  .touch-controls {
    display: flex;
  }

  .screen-footer__hint {
    display: none;
  }
}

@media (pointer: coarse) {
  .canvas-wrap {
    cursor: default;
  }
}

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