/* 枪决三角洲 · 肃清街区 — tactical FPS HUD over the battlefield frame */
:root {
  --orange: #FF8A3D;
  --orange-bright: #FFB36F;
  --orange-deep: #E56A1B;
  --red: #FF4B3E;
  --ink: #050806;
  --panel: rgba(8, 12, 10, .78);
  --panel-solid: #0b100d;
  --line: rgba(255, 138, 61, .36);
  --line-soft: rgba(255, 255, 255, .13);
  --text: #F5F0E6;
  --muted: #B7B0A2;
  --mono: "SFMono-Regular", "Roboto Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050806;
  color: var(--text);
  font-family: var(--sans);
  overscroll-behavior: none;
}

body { position: fixed; inset: 0; }

button { font-family: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #050806;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* ---------- battlefield ---------- */
.scene {
  position: absolute;
  inset: 0;
  transform: scale(1.035);
  transform-origin: 50% 50%;
  will-change: transform;
  background: #060a08;
}

.battlefield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: saturate(1.04) contrast(1.03) brightness(.97);
  pointer-events: none;
  user-select: none;
}

.fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 72% at 50% 44%, rgba(0,0,0,0) 36%, rgba(3,7,5,.34) 100%),
    linear-gradient(to top, rgba(3,6,4,.82) 0%, rgba(3,6,4,.28) 20%, rgba(3,6,4,0) 46%),
    linear-gradient(to bottom, rgba(3,6,4,.6) 0%, rgba(3,6,4,.12) 14%, rgba(3,6,4,0) 30%);
}

.grade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 138, 61, .10) 0%, rgba(255, 138, 61, 0) 42%, rgba(0, 0, 0, .16) 100%);
  mix-blend-mode: soft-light;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------- boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 6, .9);
  backdrop-filter: blur(8px) saturate(.8);
  -webkit-backdrop-filter: blur(8px) saturate(.8);
  transition: opacity .5s ease, visibility .5s ease;
}

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

.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; }

.boot-icon {
  width: 38px; height: 38px;
  color: var(--orange);
  animation: bootSpin 3.6s linear infinite;
  filter: drop-shadow(0 0 14px rgba(255,138,61,.5));
}

.boot-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .34em;
  text-indent: .34em;
  color: #fff;
}

.boot-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--muted);
}

.boot-bar {
  width: 168px;
  height: 2px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}

.boot-bar span {
  display: block;
  width: 46%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  animation: bootScan 1.2s ease-in-out infinite;
}

@keyframes bootSpin { to { transform: rotate(360deg); } }
@keyframes bootScan {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(250%); }
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  font-size: 12px;
}

.hud::before,
.hud::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
}
.hud::before {
  top: 0; height: 108px;
  background: linear-gradient(to bottom, rgba(3,6,4,.58), rgba(3,6,4,0));
}
.hud::after {
  bottom: 0; height: 128px;
  background: linear-gradient(to top, rgba(3,6,4,.66), rgba(3,6,4,0));
}

/* mission block */
.mission {
  position: absolute;
  top: calc(12px + var(--st));
  left: calc(14px + var(--sl));
  padding: 9px 14px 10px;
  min-width: 142px;
  background: linear-gradient(135deg, rgba(8,13,10,.84), rgba(8,13,10,.46));
  border-top: 1px solid rgba(255,255,255,.09);
  border-left: 2px solid var(--orange);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

.mission-top { display: flex; align-items: center; gap: 6px; }

.mission-dot {
  width: 5px; height: 5px;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255,138,61,.9);
  transform: rotate(45deg);
}

.mission-op {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .2em;
  color: var(--orange);
  opacity: .95;
}

.mission-name {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

.mission-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--muted);
}

.mission-wave b {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange-bright);
  font-weight: 700;
}

.mission-wave .sep {
  width: 1px; height: 9px;
  background: rgba(255,255,255,.2);
}

/* score */
.scorebox {
  position: absolute;
  top: calc(10px + var(--st));
  left: 50%;
  transform: translateX(-50%);
  width: 168px;
  padding: 5px 8px 6px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(5,9,7,.62), rgba(5,9,7,0));
}

.scorebox::before,
.scorebox::after {
  content: "";
  position: absolute;
  top: 22px;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.65));
}
.scorebox::before { left: -8px; transform: scaleX(-1); }
.scorebox::after { right: -8px; }

.score-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: rgba(245,240,230,.62);
}

.score-num {
  margin-top: -1px;
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .06em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(255,138,61,.34), 0 2px 8px rgba(0,0,0,.5);
}

.combo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 15px;
  margin-top: 1px;
  opacity: 0;
  transform: translateY(3px) scale(.94);
  transition: opacity .18s ease, transform .18s ease;
}

.combo.is-on { opacity: 1; transform: translateY(0) scale(1); }
.combo.is-pop { animation: comboPop .26s ease-out; }

.combo-x {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
}

.combo-txt {
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(245,240,230,.72);
}

@keyframes comboPop {
  0% { transform: scale(.82); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* top right actions */
.top-actions {
  position: absolute;
  top: calc(12px + var(--st));
  right: calc(14px + var(--sr));
  display: flex;
  gap: 7px;
  pointer-events: none;
}

.icon-btn {
  pointer-events: auto;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: rgba(7,11,9,.6);
  color: #EFE9DE;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 6px 20px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.icon-btn .mp-icon { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.92); background: rgba(255,138,61,.18); }
.icon-btn-primary { color: var(--orange); border-color: rgba(255,138,61,.52); }
.icon-btn:hover { border-color: rgba(255,138,61,.7); }

/* armor */
.armor-panel {
  position: absolute;
  left: calc(16px + var(--sl));
  bottom: calc(14px + var(--sb));
  width: clamp(140px, 20vw, 190px);
  padding: 9px 12px 10px;
  background: linear-gradient(135deg, rgba(8,13,10,.8), rgba(8,13,10,.44));
  border-left: 2px solid var(--orange);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.armor-head { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.armor-head .mp-icon { width: 14px; height: 14px; color: var(--orange); }
.armor-head span { font-size: 9px; letter-spacing: .18em; }
.armor-head b {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.armor-track {
  position: relative;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
  transform: skewX(-16deg);
}

.armor-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange), var(--orange-bright));
  box-shadow: 0 0 12px rgba(255,138,61,.55);
  transition: width .3s ease, background .3s ease;
}

.armor-track::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 15px, rgba(5,8,6,.7) 15px 17px);
  pointer-events: none;
}

.armor-panel.is-low { border-left-color: var(--red); }
.armor-panel.is-low .armor-track span { background: linear-gradient(90deg, #B7281D, var(--red)); }
.armor-panel.is-low .armor-head b { color: var(--red); }
.armor-panel.is-low { animation: lowArmor 1.15s ease-in-out infinite; }

@keyframes lowArmor {
  0%, 100% { box-shadow: 0 12px 30px rgba(0,0,0,.28); }
  50% { box-shadow: 0 12px 30px rgba(0,0,0,.28), 0 0 22px rgba(255,75,62,.35); }
}

/* ammo */
.ammo-panel {
  position: absolute;
  right: calc(16px + var(--sr));
  bottom: calc(14px + var(--sb));
  width: clamp(136px, 18vw, 172px);
  padding: 8px 13px 10px;
  text-align: right;
  border: 0;
  border-right: 2px solid var(--orange);
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(225deg, rgba(8,13,10,.82), rgba(8,13,10,.44));
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  pointer-events: auto;
  cursor: pointer;
  color: var(--text);
  transition: background .15s ease, transform .12s ease;
}
.ammo-panel:active { transform: scale(.97); background: rgba(255,138,61,.12); }

.ammo-head { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); }
.ammo-head .mp-icon { width: 14px; height: 14px; color: var(--orange); }
.ammo-head span { font-size: 9px; letter-spacing: .16em; }

.ammo-main {
  margin-top: 1px;
  font-family: var(--mono);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ammo-main b { font-size: 24px; font-weight: 800; color: #fff; }
.ammo-main > span { font-size: 11px; color: var(--muted); }

.ammo-track {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
  transform: skewX(-16deg);
}
.ammo-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-bright));
  box-shadow: 0 0 10px rgba(255,138,61,.5);
  transition: width .18s ease;
}

.ammo-panel.is-reloading { border-right-color: var(--orange-bright); background: rgba(255,138,61,.1); }
.ammo-panel.is-reloading .ammo-head .mp-icon { animation: reloadSpin .9s linear infinite; }
.ammo-panel.is-reloading .ammo-main b { color: var(--orange-bright); }
.ammo-panel.is-empty { border-right-color: var(--red); }
.ammo-panel.is-empty .ammo-main b { color: var(--red); }

@keyframes reloadSpin { to { transform: rotate(360deg); } }

/* hint */
.hint {
  position: absolute;
  left: 50%;
  bottom: calc(74px + var(--sb));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(5,9,7,.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(245,240,230,.86);
  font-size: 10px;
  letter-spacing: .05em;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .55s ease, transform .55s ease;
}
.hint .mp-icon { width: 14px; height: 14px; color: var(--orange); }
.hint.is-off { opacity: 0; transform: translateX(-50%) translateY(6px); }

/* wave banner */
.wave-banner {
  position: absolute;
  top: 22%;
  left: 50%;
  width: min(560px, 84vw);
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.wave-banner::before,
.wave-banner::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.62));
}
.wave-banner::before { left: 0; transform: scaleX(-1); }
.wave-banner::after { right: 0; }

.wb-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .38em;
  text-indent: .38em;
  color: var(--orange);
  opacity: .9;
}

.wb-title {
  margin-top: 2px;
  font-size: clamp(25px, 4.6vw, 42px);
  font-weight: 900;
  letter-spacing: .12em;
  text-indent: .12em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.72), 0 0 40px rgba(255,138,61,.24);
}

.wb-sub {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(245,240,230,.7);
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}

.wave-banner.is-on { animation: waveIn 2.1s cubic-bezier(.2,.7,.2,1) forwards; }

@keyframes waveIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.97); }
  14% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  76% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(1.015); }
}

/* crosshair */
.crosshair {
  position: fixed;
  left: 0; top: 0;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s ease;
  z-index: 20;
}
.crosshair.is-on { opacity: .95; }

.crosshair span {
  position: absolute;
  background: var(--orange);
  box-shadow: 0 0 7px rgba(255,138,61,.85), 0 0 1px rgba(0,0,0,.9);
  transition: transform .12s ease, background .12s ease;
}
.ch-t { left: 18px; top: 2px; width: 2px; height: 9px; }
.ch-b { left: 18px; bottom: 2px; width: 2px; height: 9px; }
.ch-l { left: 2px; top: 18px; width: 9px; height: 2px; }
.ch-r { right: 2px; top: 18px; width: 9px; height: 2px; }

.ch-dot {
  position: absolute;
  left: 17px; top: 17px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255,138,61,.9);
}

.crosshair.is-lock span { background: #FF6A43; }
.crosshair.is-lock .ch-t { transform: translateY(-3px); }
.crosshair.is-lock .ch-b { transform: translateY(3px); }
.crosshair.is-lock .ch-l { transform: translateX(-3px); }
.crosshair.is-lock .ch-r { transform: translateX(3px); }

.crosshair.is-fire { animation: chKick .14s ease-out; }
@keyframes chKick {
  0% { transform: scale(1.34); }
  100% { transform: scale(1); }
}

/* damage flash */
.damage-flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 82% 80% at 50% 48%, rgba(255,75,62,0) 48%, rgba(255,45,30,.6) 100%);
}
.damage-flash.is-hit { animation: damageHit .55s ease-out; }

@keyframes damageHit {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 7, 5, .68);
  backdrop-filter: blur(11px) saturate(.72);
  -webkit-backdrop-filter: blur(11px) saturate(.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}
.overlay.is-on { opacity: 1; visibility: visible; pointer-events: auto; }

.panel {
  position: relative;
  width: min(560px, 92vw);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: clamp(20px, 3.4vw, 32px);
  background:
    linear-gradient(155deg, rgba(19, 25, 21, .98), rgba(7, 11, 9, .99));
  border: 1px solid rgba(255, 138, 61, .34);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .66),
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 0 70px rgba(255, 138, 61, .035);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 72px; height: 2px;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(255,138,61,.65);
}

.panel::after {
  content: "";
  position: absolute;
  right: 12px; bottom: 10px;
  width: 24px; height: 24px;
  border-right: 1px solid rgba(255,138,61,.32);
  border-bottom: 1px solid rgba(255,138,61,.32);
  pointer-events: none;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .3em;
  color: var(--orange);
}
.eyebrow-red { color: var(--red); }

.panel-id {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: rgba(255,255,255,.34);
}

.panel h2 {
  margin: 12px 0 0;
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 900;
  letter-spacing: .1em;
  color: #fff;
  text-shadow: 0 4px 22px rgba(0,0,0,.5);
}

.panel-sub {
  margin: 5px 0 0;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0 18px;
}

.stat {
  padding: 9px 10px;
  background: rgba(255,255,255,.025);
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.stat span {
  display: block;
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(245,240,230,.52);
}
.stat b {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 800;
  color: var(--orange-bright);
  font-variant-numeric: tabular-nums;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn .mp-icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.985); }

.btn-primary {
  background: linear-gradient(135deg, #FFAE6E 0%, #FF8A3D 44%, #F0711F 100%);
  color: #1D0F05;
  box-shadow: 0 12px 32px rgba(240, 113, 31, .28), inset 0 1px 0 rgba(255,255,255,.42);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.16);
  color: #E9E3D8;
}
.btn-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,138,61,.4); }

.btn-wide { width: 100%; margin-top: 14px; }

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: rgba(255,255,255,.34);
}

.final-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
}
.final-score > span {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
}
.final-score b {
  font-family: var(--mono);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 900;
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px rgba(255,138,61,.3);
}
.final-score em {
  display: none;
  padding: 3px 7px;
  border: 1px solid rgba(255,138,61,.55);
  font-style: normal;
  font-size: 8px;
  letter-spacing: .14em;
  color: var(--orange-bright);
  background: rgba(255,138,61,.1);
}
.final-score em.is-on { display: inline-block; animation: badgePop .5s ease-out; }

@keyframes badgePop {
  0% { transform: scale(.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.res {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255,255,255,.025);
  border-left: 1px solid rgba(255,138,61,.28);
}
.res span { font-size: 9px; letter-spacing: .08em; color: rgba(245,240,230,.52); }
.res b {
  font-family: var(--mono);
  font-size: 16px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.best-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
}
.best-line .mp-icon { width: 15px; height: 15px; color: var(--orange); }
.best-line b {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--orange-bright);
}

.panel-over h2 { color: #fff; }
.panel-over .final-score b { color: var(--orange); }

/* focus */
button:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.ammo-panel:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
}

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .mission { min-width: 128px; padding: 8px 11px 9px; }
  .mission-name { font-size: 13px; }
  .scorebox { width: 142px; }
  .score-num { font-size: 23px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 8px; }
  .icon-btn .mp-icon { width: 18px; height: 18px; }
  .armor-panel { width: 148px; }
  .ammo-panel { width: 144px; }
  .hint { bottom: calc(68px + var(--sb)); font-size: 9px; }
}

@media (max-height: 470px) {
  .mission { top: calc(8px + var(--st)); padding: 7px 11px 8px; min-width: 126px; }
  .mission-name { font-size: 13px; margin-top: 1px; }
  .mission-wave { margin-top: 2px; }
  .scorebox { top: calc(6px + var(--st)); }
  .score-num { font-size: 23px; }
  .combo { height: 12px; }
  .top-actions { top: calc(8px + var(--st)); }
  .icon-btn { width: 38px; height: 38px; }
  .armor-panel { width: 144px; padding: 7px 10px 8px; }
  .ammo-panel { width: 140px; padding: 7px 10px 8px; }
  .ammo-main b { font-size: 21px; }
  .hint { bottom: calc(62px + var(--sb)); padding: 6px 11px; }
  .panel { padding: 18px 20px; }
  .panel h2 { margin-top: 8px; font-size: 24px; }
  .stat-row { margin: 13px 0 12px; }
  .stat { padding: 6px 9px; }
  .stat b { font-size: 16px; }
  .btn { min-height: 43px; }
  .final-score { margin: 10px 0 8px; }
  .final-score b { font-size: 32px; }
  .res { padding: 6px 9px; }
  .result-grid { gap: 5px; }
  .best-line { margin-top: 8px; padding-top: 8px; }
  .btn-wide { margin-top: 10px; }
  .panel-foot { margin-top: 10px; }
}

@media (orientation: portrait) {
  .battlefield { object-position: 38% 45%; }
  .mission { top: calc(14px + var(--st)); left: calc(12px + var(--sl)); }
  .scorebox { top: calc(12px + var(--st)); width: 126px; }
  .score-num { font-size: 21px; }
  .top-actions { top: calc(14px + var(--st)); right: calc(12px + var(--sr)); }
  .armor-panel { width: 132px; left: calc(12px + var(--sl)); }
  .ammo-panel { width: 132px; right: calc(12px + var(--sr)); }
  .hint { max-width: 88vw; white-space: normal; text-align: center; justify-content: center; }
  .wave-banner { top: 25%; }
  .panel { width: min(520px, 94vw); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-icon, .boot-bar span, .armor-panel.is-low { animation: none; }
  .wave-banner.is-on { animation-duration: .01s; opacity: 1; }
  .crosshair.is-fire { animation: none; }
  .damage-flash.is-hit { animation-duration: .01s; }
  .scene { transform: scale(1.035) !important; }
}
