/* =========================================================
   坦克大战 · TANK BATTLE
   Retro arcade shell — no external fonts, no dependencies
   ========================================================= */

:root {
  --bg: #05080e;
  --bg-soft: #0a111b;
  --panel: #0c141f;
  --panel-2: #111c2a;
  --line: rgba(126, 166, 190, 0.2);
  --line-strong: rgba(126, 166, 190, 0.36);
  --text: #e9eff6;
  --muted: #7d8da2;
  --dim: #516076;
  --amber: #ffb347;
  --amber-hot: #ff7a2f;
  --teal: #4fe3d0;
  --red: #ff5c4d;
  --green: #9fe870;
  --mono: "Consolas", "SFMono-Regular", "Cascadia Mono", "Liberation Mono", monospace;
  --sans: "Bahnschrift", "DIN Alternate", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

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

html {
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px 14px;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, #122236 0%, transparent 62%),
    radial-gradient(ellipse 60% 50% at 100% 110%, rgba(255, 122, 47, 0.07) 0%, transparent 65%),
    var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* ---------- ambient background ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(104, 151, 180, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 151, 180, 0.075) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(700px) rotateX(62deg) translateY(6%);
  transform-origin: center 74%;
  mask-image: radial-gradient(ellipse 62% 58% at 50% 62%, #000 5%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 62%, #000 5%, transparent 78%);
  animation: gridDrift 24s linear infinite;
}

.ambient-glow {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
}
.ambient-glow--amber { top: -18vw; right: -10vw; background: var(--amber-hot); }
.ambient-glow--teal { bottom: -24vw; left: -14vw; background: #1a8f92; opacity: 0.13; }

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 54px, 54px 0; }
}

/* ---------- cabinet ---------- */

.cabinet {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 32px), calc(100svh - 154px));
  min-width: 290px;
  background: linear-gradient(180deg, #101a27 0%, #0a111a 48%, #070c13 100%);
  border: 1px solid #2a3d50;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 26px 70px rgba(0, 0, 0, 0.72),
    0 0 90px rgba(255, 179, 71, 0.035);
}

.cabinet::before,
.cabinet::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #33475b;
  box-shadow: 0 0 0 1px #060a10, 0 0 6px rgba(79, 227, 208, 0.16);
  top: 8px;
}
.cabinet::before { left: 8px; }
.cabinet::after { right: 8px; }

/* ---------- top HUD ---------- */

.hud-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 179, 71, 0.045), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
}

.brand-cn {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-shadow: 0 0 20px rgba(255, 179, 71, 0.18);
}

.brand-en {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.46em;
  color: var(--amber);
  opacity: 0.76;
}

.stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2.2vw, 24px);
  min-width: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stat-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.22em;
  color: var(--dim);
  white-space: nowrap;
}

.stat-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stat-value--dim { color: #9fb0c2; }
.stat-value--red { color: var(--red); text-shadow: 0 0 12px rgba(255, 92, 77, 0.3); }
.stat-value--hull { color: var(--teal); font-size: 13px; letter-spacing: 0.08em; text-shadow: 0 0 12px rgba(79, 227, 208, 0.28); }
.stat-value--hull.is-low { color: var(--red); text-shadow: 0 0 12px rgba(255, 92, 77, 0.4); }
.stat-value--lives { color: var(--amber); font-size: 13px; letter-spacing: 0.1em; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.icon-btn:hover { border-color: var(--amber); transform: translateY(-1px); }
.icon-btn.is-muted { color: var(--dim); }

/* ---------- screen ---------- */

.screen {
  position: relative;
  margin: 10px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(126, 166, 190, 0.28);
  border-radius: 6px;
  background: #070c12;
  box-shadow:
    0 0 0 1px #020509,
    0 0 0 4px #0a121c,
    0 0 0 5px rgba(126, 166, 190, 0.14),
    0 16px 38px rgba(0, 0, 0, 0.46) inset;
  isolation: isolate;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #0b111a;
  touch-action: none;
}

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

.screen-tint {
  background:
    linear-gradient(120deg, rgba(79, 227, 208, 0.035), transparent 42%),
    linear-gradient(300deg, rgba(255, 122, 47, 0.045), transparent 40%);
  mix-blend-mode: screen;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.26) 3px,
    rgba(0, 0, 0, 0.26) 4px
  );
  opacity: 0.42;
  mix-blend-mode: multiply;
}

.screen-vignette {
  box-shadow:
    0 0 80px 12px rgba(0, 0, 0, 0.55) inset,
    0 0 22px rgba(0, 0, 0, 0.7) inset;
}

.corner {
  position: absolute;
  width: 17px;
  height: 17px;
  border-color: rgba(255, 179, 71, 0.8);
  border-style: solid;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(255, 179, 71, 0.35));
  z-index: 5;
}
.corner--tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.corner--tr { top: 6px; right: 6px; border-width: 1px 1px 0 0; }
.corner--bl { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; }
.corner--br { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }

/* ---------- overlay ---------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3.4%, 32px);
  overflow: auto;
  background:
    radial-gradient(ellipse 72% 60% at 50% 42%, rgba(8, 14, 22, 0.58), rgba(5, 8, 13, 0.9) 78%),
    linear-gradient(180deg, rgba(5, 8, 13, 0.52), rgba(5, 8, 13, 0.88));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-card {
  width: min(94%, 430px);
  margin-block: auto;
  text-align: center;
  animation: cardIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: clamp(7px, 1.05vw, 9px);
  letter-spacing: 0.34em;
  color: var(--amber);
  text-transform: uppercase;
}
.kicker i {
  width: clamp(18px, 5vw, 38px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 71, 0.65));
}
.kicker i:last-child { background: linear-gradient(90deg, rgba(255, 179, 71, 0.65), transparent); }

.game-title {
  display: flex;
  justify-content: center;
  gap: 0.06em;
  margin: 0;
  font-size: clamp(40px, 8.4vw, 62px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: 0.055em;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.8),
    0 0 26px rgba(255, 179, 71, 0.13);
}

.game-title span:first-child { color: #f4f8fc; }
.title-accent {
  color: var(--amber);
  text-shadow:
    0 2px 0 rgba(66, 25, 0, 0.72),
    0 0 30px rgba(255, 179, 71, 0.32);
}

.game-title-en {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: clamp(9px, 1.6vw, 13px);
  font-weight: 700;
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  color: rgba(255, 179, 71, 0.82);
}

.tagline {
  margin: 13px 0 16px;
  color: #b7c4d3;
  font-size: clamp(10px, 1.65vw, 13px);
  letter-spacing: 0.16em;
}

.menu-progress {
  margin: -8px 0 13px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--teal);
  opacity: 0.86;
}

.brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  text-align: left;
}

.brief > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 11px;
  background: rgba(8, 13, 21, 0.84);
}

.brief b {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--amber);
}
.brief span {
  font-size: 11px;
  color: #c9d4e0;
  letter-spacing: 0.04em;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn--primary {
  color: #1e1002;
  background: linear-gradient(100deg, #ffc35e, var(--amber) 42%, #ff8a3d);
  box-shadow:
    0 0 0 1px rgba(255, 210, 140, 0.62),
    0 7px 22px rgba(255, 130, 40, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.btn--primary i {
  font-style: normal;
  font-size: 10px;
  opacity: 0.72;
}

.btn--ghost {
  margin-top: 8px;
  color: #c3d0de;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(255, 220, 160, 0.8), 0 11px 30px rgba(255, 130, 40, 0.36); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn:active { transform: translateY(0); }

.btn:focus-visible,
.icon-btn:focus-visible,
.dpad-btn:focus-visible,
.fire-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.tip {
  margin: 12px 0 0;
  font-size: clamp(8px, 1.25vw, 10px);
  color: var(--dim);
  letter-spacing: 0.08em;
}

.btn--ghost i {
  font-style: normal;
  font-size: 10px;
  opacity: 0.6;
}

/* level select */

.level-card {
  width: min(96%, 560px);
  margin-block: auto;
  text-align: center;
  animation: cardIn 0.4s ease both;
}

.level-kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--amber);
}

.level-title {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.level-progress {
  margin: 7px 0 14px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--teal);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  max-height: min(50vh, 350px);
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.level-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  padding: 5px 3px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
  color: #d5e0eb;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.level-node:hover:not(:disabled) {
  border-color: var(--amber);
  background: rgba(255, 179, 71, 0.1);
  transform: translateY(-1px);
}

.level-node.is-cleared {
  border-color: rgba(79, 227, 208, 0.55);
  background: rgba(79, 227, 208, 0.07);
}

.level-node.is-locked {
  opacity: 0.34;
  cursor: not-allowed;
}

.level-node-index {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--amber);
}

.level-node.is-cleared .level-node-index { color: var(--teal); }

.level-node-name {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-node-meta {
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.06em;
  color: var(--dim);
  white-space: nowrap;
}

.level-node.is-cleared .level-node-meta { color: var(--teal); }

.level-card .btn--ghost { margin-top: 10px; }

/* result / pause cards */

.result-card {
  width: min(94%, 410px);
  margin-block: auto;
  text-align: center;
  animation: cardIn 0.4s ease both;
}

.result-kicker {
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--amber);
}

.result-title {
  margin: 0;
  font-size: clamp(28px, 6.3vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.1em;
}
.result-title.is-danger { color: var(--red); text-shadow: 0 0 34px rgba(255, 92, 77, 0.3); }
.result-title.is-good { color: var(--amber); text-shadow: 0 0 34px rgba(255, 179, 71, 0.3); }

.result-sub {
  margin: 9px 0 15px;
  color: #aebccd;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.result-score span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--dim);
}
.result-score b {
  font-family: var(--mono);
  font-size: clamp(27px, 6vw, 38px);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 17px;
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}
.result-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 4px;
  background: rgba(8, 13, 21, 0.86);
}
.result-grid span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: var(--dim);
}
.result-grid b {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--amber);
}

/* ---------- banner ---------- */

.banner {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 10px;
  background: linear-gradient(90deg, transparent, rgba(5, 9, 15, 0.9) 18%, rgba(5, 9, 15, 0.9) 82%, transparent);
  border-top: 1px solid rgba(255, 179, 71, 0.5);
  border-bottom: 1px solid rgba(255, 179, 71, 0.5);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.banner.is-showing {
  animation: bannerFlash 2s ease both;
}

@keyframes bannerFlash {
  0% { opacity: 0; transform: translateY(-50%) scaleX(0.92); }
  12% { opacity: 1; transform: translateY(-50%) scaleX(1); }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

.banner-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--amber);
}

.banner-title {
  font-size: clamp(24px, 5.4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: #f4f8fc;
  text-shadow: 0 0 26px rgba(255, 179, 71, 0.28);
}

.banner-sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #b4c2d3;
}

/* ---------- bottom HUD ---------- */

.hud-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 17px 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(0, 0, 0, 0.15));
}

.mission-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--muted);
  white-space: nowrap;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 1.9s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.buffs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(79, 227, 208, 0.32);
  border-radius: 2px;
  background: rgba(79, 227, 208, 0.08);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.chip--amber { border-color: rgba(255, 179, 71, 0.35); background: rgba(255, 179, 71, 0.08); color: var(--amber); }
.chip i { font-style: normal; opacity: 0.65; }

.key-hints {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.09em;
  color: var(--dim);
  white-space: nowrap;
}

kbd {
  padding: 2px 4px;
  border: 1px solid rgba(126, 166, 190, 0.24);
  border-bottom-color: rgba(126, 166, 190, 0.36);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
  color: #a9b8c9;
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1;
}

/* ---------- touch controls ---------- */

.touch-ui {
  display: none;
  width: min(720px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px calc(10px + env(safe-area-inset-bottom));
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
  gap: 4px;
  touch-action: none;
}

.dpad-btn,
.fire-btn {
  border: 1px solid rgba(126, 166, 190, 0.3);
  background: linear-gradient(180deg, rgba(29, 44, 61, 0.85), rgba(12, 20, 30, 0.9));
  color: #d9e3ee;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dpad-btn {
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 15px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.dpad-btn--up { grid-column: 2; grid-row: 1; }
.dpad-btn--left { grid-column: 1; grid-row: 2; }
.dpad-btn--right { grid-column: 3; grid-row: 2; }
.dpad-btn--down { grid-column: 2; grid-row: 3; }
.dpad-center {
  grid-column: 2;
  grid-row: 2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 227, 208, 0.18), transparent 70%);
  border: 1px solid rgba(79, 227, 208, 0.15);
}
.dpad-btn.is-pressed {
  color: var(--amber);
  border-color: rgba(255, 179, 71, 0.6);
  background: linear-gradient(180deg, rgba(80, 54, 24, 0.92), rgba(40, 26, 12, 0.95));
  transform: translateY(1px);
}

.fire-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #1d1002;
  background: radial-gradient(circle at 36% 30%, #ffd478, #ff9b3e 55%, #c95a1b);
  border-color: rgba(255, 215, 150, 0.72);
  box-shadow: 0 0 0 5px rgba(255, 122, 47, 0.08), 0 5px 0 #7a3510, 0 10px 22px rgba(0, 0, 0, 0.45);
  font-weight: 900;
}
.fire-btn span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }
.fire-btn small { font-size: 8px; letter-spacing: 0.15em; color: rgba(55, 25, 3, 0.65); }
.fire-btn.is-pressed { transform: translateY(3px); box-shadow: 0 0 0 5px rgba(255, 122, 47, 0.1), 0 2px 0 #7a3510; }

.page-foot {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.22em;
  color: #405066;
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  body {
    justify-content: flex-start;
    gap: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  }

  .cabinet {
    width: 100%;
    min-width: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .hud-top {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 13px;
  }

  .brand-cn { font-size: 18px; }
  .brand-en { font-size: 6px; letter-spacing: 0.38em; }
  .icon-btn { width: 28px; height: 28px; }

  .stats {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(126, 166, 190, 0.11);
  }
  .stat-value { font-size: 13px; }
  .stat-label { font-size: 6px; letter-spacing: 0.13em; }
  .stat-value--lives { font-size: 11px; }

  .screen { margin: 7px; }
  .hud-bottom { padding: 7px 13px 9px; }
  .key-hints { display: none; }
  .mission-line { font-size: 7px; }
  .buffs { justify-content: flex-end; }

  .game-title { font-size: clamp(38px, 11.5vw, 52px); }
  .tagline { margin: 9px 0 12px; }
  .menu-progress { margin: -5px 0 10px; font-size: 7px; letter-spacing: 0.16em; }
  .brief { margin-bottom: 12px; }
  .brief > div { padding: 7px 9px; }
  .brief span { font-size: 10px; }
  .btn { min-height: 43px; font-size: 13px; }
  .tip { margin-top: 9px; }
  .level-grid { gap: 4px; max-height: 27vh; }
  .level-node { min-height: 42px; padding: 4px 2px; }
  .level-node-index { font-size: 11px; }
  .level-node-name { font-size: 7px; }
  .level-node-meta { font-size: 5.5px; }
  .level-progress { margin: 5px 0 10px; }
  .page-foot { display: none; }
}

@media (max-width: 380px) {
  .game-title { font-size: 36px; }
  .kicker { letter-spacing: 0.22em; }
  .tagline { font-size: 9px; letter-spacing: 0.1em; }
  .brief b { font-size: 7px; }
  .brief span { font-size: 9px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  body { padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .hud-top { padding-top: 8px; padding-bottom: 8px; }
  .hud-bottom { padding-top: 6px; padding-bottom: 7px; min-height: 30px; }
  .screen { margin: 7px; }
}

@media (hover: none), (pointer: coarse) {
  .touch-ui { display: flex; }
  .page-foot { display: none; }
  body {
    justify-content: flex-start;
    padding-bottom: 8px;
  }
}

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