/* ============================================================
   LINE OF FIRE
   Minimalist FPS interface — bone, ink, and one warning red.
   ============================================================ */

:root {
  --ink: #05070a;
  --ink-soft: #090c11;
  --panel: rgba(6, 8, 12, 0.82);
  --bone: #e9e7df;
  --bone-dim: #b8b8b2;
  --muted: #777e87;
  --line: rgba(222, 227, 231, 0.18);
  --line-soft: rgba(222, 227, 231, 0.09);
  --red: #ff3048;
  --red-hot: #ff6477;
  --red-deep: #8c1424;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Bahnschrift", "DIN Alternate", "Aptos Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

body {
  cursor: default;
}

button {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

#game {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(circle at 62% 35%, rgba(52, 65, 82, 0.13), transparent 42%),
    #05070a;
}

#viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

/* ---------- atmosphere overlays ---------- */

#vignette,
#grain,
#scanlines,
#damage-flash,
#fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#vignette {
  z-index: 5;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 34%, rgba(0, 0, 0, 0.34) 76%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.34));
  transition: background 0.7s ease;
}

#grain {
  z-index: 6;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 0.28s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 1%, 0); }
  50% { transform: translate3d(1%, -2%, 0); }
  75% { transform: translate3d(2%, 2%, 0); }
  100% { transform: translate3d(-1%, -1%, 0); }
}

#scanlines {
  z-index: 7;
  opacity: 0.12;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.4) 3px,
    rgba(0, 0, 0, 0.4) 4px
  );
  mix-blend-mode: multiply;
}

#damage-flash {
  z-index: 40;
  opacity: 0;
  background:
    radial-gradient(ellipse at center, transparent 24%, rgba(140, 0, 12, 0.12) 50%, rgba(255, 25, 50, 0.42) 100%),
    rgba(130, 8, 16, 0.08);
}

#damage-flash.hit {
  animation: hit-flash 0.46s ease-out;
}

#damage-flash.critical {
  animation: hit-flash-critical 0.82s ease-out;
}

@keyframes hit-flash {
  0% { opacity: 0.8; }
  18% { opacity: 0.36; }
  100% { opacity: 0; }
}

@keyframes hit-flash-critical {
  0% { opacity: 0.86; }
  25% { opacity: 0.62; }
  48% { opacity: 0.22; }
  70% { opacity: 0.4; }
  100% { opacity: 0; }
}

body.wounded #vignette {
  background:
    radial-gradient(ellipse at 50% 48%, transparent 30%, rgba(60, 0, 4, 0.32) 68%, rgba(0, 0, 0, 0.9) 100%),
    linear-gradient(to bottom, rgba(22, 0, 2, 0.25), transparent 25%, transparent 72%, rgba(28, 0, 3, 0.4));
}

body.critical #vignette {
  background:
    radial-gradient(ellipse at 50% 48%, transparent 22%, rgba(84, 0, 7, 0.44) 58%, rgba(0, 0, 0, 0.95) 100%),
    linear-gradient(to bottom, rgba(42, 0, 4, 0.38), transparent 18%, transparent 64%, rgba(46, 0, 5, 0.6));
  animation: critical-pulse 1.15s ease-in-out infinite;
}

@keyframes critical-pulse {
  0%, 100% { opacity: 0.86; }
  45% { opacity: 1; }
  70% { opacity: 0.9; }
}

#fade {
  z-index: 90;
  opacity: 0;
  background: #000;
  transition: opacity 0.38s ease;
  pointer-events: none;
}

#fade.visible {
  opacity: 1;
}

/* ---------- shared screen scaffolding ---------- */

.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
}

.overlay-screen {
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(2, 4, 7, 0.62);
  backdrop-filter: blur(6px);
}

.panel {
  position: relative;
  width: min(620px, calc(100vw - 48px));
  padding: 46px 52px 42px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 30%),
    rgba(6, 9, 13, 0.96);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 3px;
  background: var(--red);
}

.panel-kicker {
  margin-bottom: 14px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.panel-copy {
  max-width: 44ch;
  margin: 20px 0 30px;
  color: var(--bone-dim);
  font-size: 14px;
  font-weight: 350;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.panel-actions.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- menu ---------- */

#menu {
  background: transparent;
}

#menu .menu-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 8, 0.98) 0%, rgba(3, 5, 8, 0.9) 31%, rgba(3, 5, 8, 0.3) 62%, rgba(3, 5, 8, 0.55) 100%),
    linear-gradient(0deg, rgba(3, 5, 8, 0.9) 0%, transparent 34%, rgba(3, 5, 8, 0.4) 100%);
}

#menu::before {
  content: "";
  position: fixed;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line), transparent);
  pointer-events: none;
}

#menu::after {
  content: "SCENE 01 / ATRIUM / 03:14";
  position: fixed;
  z-index: 1;
  right: 28px;
  bottom: 110px;
  color: rgba(233, 231, 223, 0.34);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  pointer-events: none;
}

.menu-frame {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 48px 24px 72px;
  pointer-events: none;
}

.menu-frame button,
.menu-frame a {
  pointer-events: auto;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.menu-header > span:first-child {
  color: var(--bone);
}

.header-center {
  opacity: 0.8;
}

.menu-main {
  width: min(760px, 67vw);
  margin: auto 0;
  padding: 5vh 0 3vh;
}

.menu-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
}

.menu-kicker > span {
  width: 34px;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 48, 72, 0.45);
}

h1 {
  margin: 0;
  color: var(--bone);
  font-size: clamp(5.6rem, 11.4vw, 11.6rem);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: -0.065em;
  text-transform: uppercase;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.045);
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 231, 223, 0.62);
}

.tagline {
  margin: 32px 0 34px;
  color: var(--bone-dim);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.primary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: 300px;
  padding: 15px 0 15px 18px;
  border: 1px solid rgba(255, 48, 72, 0.75);
  background: rgba(255, 48, 72, 0.06);
  color: var(--bone);
  text-align: left;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}

.primary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--red);
  transition: width 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: -1;
}

.primary-button > * {
  position: relative;
  z-index: 1;
}

.primary-button:hover {
  border-color: var(--red);
  color: #07090c;
  transform: translateX(4px);
}

.primary-button:hover::before,
.primary-button:focus-visible::before {
  width: 100%;
}

.primary-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 48, 72, 0.35);
}

.button-index {
  align-self: flex-start;
  padding-top: 3px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.primary-button:hover .button-index {
  color: #07090c;
}

.button-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: 0.06em;
}

.button-copy em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.22em;
  transition: color 0.2s ease;
}

.primary-button:hover .button-copy em {
  color: rgba(7, 9, 12, 0.65);
}

.button-arrow {
  padding: 0 22px;
  font-size: 22px;
  font-weight: 200;
}

.primary-button.compact {
  min-width: 230px;
  padding: 12px 0 12px 16px;
}

.ghost-button {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ghost-button:hover {
  color: var(--bone);
  border-color: var(--line);
}

.briefing {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.25fr;
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brief-cell {
  min-height: 95px;
  padding: 18px 22px 18px 0;
}

.brief-cell + .brief-cell {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.brief-cell label {
  display: block;
  margin-bottom: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.brief-cell p {
  margin: 0;
  color: var(--bone-dim);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.025em;
}

.alert-cell p {
  color: #d9a5ab;
}

.controls-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.controls-strip div {
  display: flex;
  align-items: center;
  gap: 8px;
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 4px 6px;
  border: 1px solid rgba(233, 231, 223, 0.2);
  background: rgba(255, 255, 255, 0.025);
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-align: center;
}

.menu-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.menu-footer span:nth-child(2) {
  opacity: 0.5;
}

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

#hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hud-top {
  position: absolute;
  top: 34px;
  right: 38px;
  left: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.mission-block {
  padding-left: 14px;
  border-left: 2px solid var(--red);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
}

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

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.mission-block h2 {
  margin: 7px 0 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
}

.objective-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.objective-line strong {
  color: var(--bone);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
}

.condition-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

#condition-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-height: 16px;
}

.condition-tag {
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  animation: condition-blink 2.2s ease-in-out infinite;
}

.condition-tag.sub {
  color: rgba(255, 124, 140, 0.7);
  font-size: 8px;
  letter-spacing: 0.18em;
}

@keyframes condition-blink {
  0%, 100% { opacity: 1; }
  52% { opacity: 0.46; }
}

.mute-hint {
  color: rgba(233, 231, 223, 0.25);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

#upper-feed {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 80vw;
}

.feed-item {
  padding: 5px 11px;
  border-left: 1px solid rgba(255, 48, 72, 0.65);
  background: rgba(3, 5, 8, 0.36);
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: feed-in 0.24s ease-out both;
}

.feed-item.head {
  color: var(--red-hot);
}

.feed-item.fade-out {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@keyframes feed-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* crosshair */

#crosshair {
  --gap: 9px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  color: var(--bone);
  transition: color 0.1s ease;
}

.ch {
  position: absolute;
  display: block;
  background: currentColor;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  transition: background 0.08s ease;
}

.ch-t, .ch-b {
  width: 1px;
  height: 7px;
  left: 0;
}

.ch-t { top: calc(-1 * var(--gap) - 7px); }
.ch-b { top: var(--gap); }

.ch-l, .ch-r {
  width: 7px;
  height: 1px;
  top: 0;
}

.ch-l { left: calc(-1 * var(--gap) - 7px); }
.ch-r { left: var(--gap); }

.ch-dot {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

#crosshair.on-target {
  color: var(--red);
}

#crosshair.on-target .ch {
  box-shadow: 0 0 10px rgba(255, 48, 72, 0.55);
}

#hitmarker {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
}

#hitmarker i {
  position: absolute;
  width: 6px;
  height: 1px;
  background: var(--bone);
  transform-origin: 0 50%;
}

#hitmarker i:nth-child(1) { transform: rotate(45deg) translateX(4px); }
#hitmarker i:nth-child(2) { transform: rotate(135deg) translateX(4px); }
#hitmarker i:nth-child(3) { transform: rotate(225deg) translateX(4px); }
#hitmarker i:nth-child(4) { transform: rotate(315deg) translateX(4px); }

#hitmarker.show {
  animation: hitmark 0.28s ease-out;
}

#hitmarker.head i {
  background: var(--red);
  box-shadow: 0 0 7px rgba(255, 48, 72, 0.8);
}

@keyframes hitmark {
  0% { opacity: 1; transform: scale(0.65); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

/* bottom HUD */

.hud-bottom {
  position: absolute;
  right: 38px;
  bottom: 30px;
  left: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.field-notes {
  display: flex;
  gap: 16px;
  color: rgba(233, 231, 223, 0.35);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.note-line span {
  color: rgba(233, 231, 223, 0.74);
  padding-right: 3px;
}

.weapon-block {
  min-width: 228px;
  padding: 12px 14px 10px;
  border-top: 1px solid rgba(233, 231, 223, 0.3);
  border-right: 1px solid transparent;
  background: linear-gradient(to left, rgba(3, 5, 8, 0.55), transparent);
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.weapon-label {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.weapon-label em {
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

.ammo-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 1px;
  color: var(--bone);
  font-family: var(--mono);
  line-height: 1;
}

#ammo-count {
  font-size: 43px;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.ammo-divider {
  color: var(--muted);
  font-size: 17px;
  font-weight: 300;
}

.ammo-reserve {
  color: var(--muted);
  font-size: 16px;
}

#bullet-rack {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  height: 10px;
  margin-top: 5px;
}

.bullet {
  width: 4px;
  height: 8px;
  background: rgba(233, 231, 223, 0.76);
  transition: background 0.12s ease, height 0.12s ease, opacity 0.12s ease;
}

.bullet.spent {
  height: 3px;
  align-self: flex-end;
  background: rgba(233, 231, 223, 0.16);
}

#reload-track {
  height: 1px;
  margin-top: 9px;
  background: rgba(233, 231, 223, 0.12);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.weapon-block.reloading #reload-track {
  opacity: 1;
}

#reload-fill {
  width: 0%;
  height: 100%;
  background: var(--red);
}

#reload-caption {
  margin-top: 5px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.2em;
  opacity: 0;
}

.weapon-block.reloading #reload-caption {
  opacity: 1;
}

.weapon-block.empty .ammo-line {
  color: var(--red);
}

/* toast, intro */

#toast {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  background: rgba(3, 5, 8, 0.55);
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
}

#intro-card {
  position: absolute;
  top: 17%;
  left: 50%;
  width: min(530px, 80vw);
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

#intro-card.show {
  animation: intro-card 4.4s ease both;
}

.intro-rule {
  width: 52px;
  height: 1px;
  margin: 0 auto 20px;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 48, 72, 0.5);
}

.intro-kicker {
  color: rgba(233, 231, 223, 0.48);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.intro-title {
  margin: 11px 0 10px;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.025em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.85);
}

.intro-sub {
  color: rgba(233, 231, 223, 0.58);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.12em;
}

@keyframes intro-card {
  0% { opacity: 0; transform: translate(-50%, 12px); }
  11% { opacity: 1; transform: translate(-50%, 0); }
  68% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -5px); }
}

#lock-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 80px);
  color: rgba(233, 231, 223, 0.6);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 8px #000;
}

/* end stats */

.end-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.end-stats > div {
  padding: 16px 12px 15px 0;
}

.end-stats > div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

.end-stats label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.end-stats strong {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 350;
  letter-spacing: -0.02em;
}

#end.victory .panel::before {
  background: var(--bone);
}

#end.victory .panel-kicker {
  color: var(--bone-dim);
}

#end.death .panel h2 {
  color: var(--red);
}

.pause-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

/* boot error */

#boot-error {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 40px;
  background: #05070a;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* responsive */

@media (max-width: 1100px) {
  .menu-frame { padding-left: 52px; }
  .menu-main { width: min(720px, 82vw); }
  h1 { font-size: clamp(5rem, 13vw, 9.5rem); }
  .header-center { display: none; }
  .briefing { grid-template-columns: 1fr 1fr; }
  .alert-cell { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line); padding-left: 0 !important; min-height: auto; }
}

@media (max-width: 760px) {
  #menu::before, #menu::after { display: none; }
  .menu-frame { padding: 20px 22px; }
  .menu-main { width: 100%; margin: 9vh 0 auto; padding-bottom: 30px; }
  h1 { font-size: clamp(4.4rem, 20vw, 7rem); }
  .tagline { font-size: 14px; margin: 24px 0; }
  .briefing { grid-template-columns: 1fr; margin-top: 28px; }
  .brief-cell { min-height: auto; padding: 14px 0 !important; border-left: 0 !important; }
  .brief-cell + .brief-cell { border-top: 1px solid var(--line); }
  .controls-strip { display: none; }
  .menu-footer { flex-direction: column; gap: 6px; }
  .hud-top { top: 20px; right: 20px; left: 20px; }
  .mission-block h2 { font-size: 13px; }
  .hud-bottom { right: 20px; bottom: 18px; left: 20px; }
  .field-notes { display: none; }
  .weapon-block { min-width: 170px; }
  #ammo-count { font-size: 34px; }
  .panel { padding: 32px 28px; }
  .end-stats { grid-template-columns: 1fr 1fr; }
  .end-stats > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .end-stats > div:nth-child(4) { border-top: 1px solid var(--line-soft); }
}

@media (max-height: 720px) and (min-width: 761px) {
  .menu-main { padding: 2vh 0; }
  h1 { font-size: clamp(4.6rem, 9vw, 8.5rem); }
  .tagline { margin: 20px 0; }
  .brief-cell { min-height: 78px; padding-top: 13px; padding-bottom: 13px; }
  .controls-strip { margin-top: 13px; }
}
