:root {
  --sand: #d7a45f;
  --sand-light: #ebc47e;
  --ink: #211b17;
  --ink-soft: #332820;
  --cream: #f4e7c9;
  --vermilion: #e45b36;
  --turquoise: #70b8b0;
  --shadow: rgba(15, 10, 7, 0.55);
  --edge: rgba(244, 231, 201, 0.28);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--cream);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid rgba(244, 231, 201, 0.4);
  border-radius: 3px;
  padding: 0.78rem 1.15rem;
  color: var(--cream);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055) 25%, transparent 25%) 0 0 / 8px 8px,
    var(--ink-soft);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.26);
  font-weight: 850;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

button:hover {
  border-color: var(--sand-light);
  background-color: #493527;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

button:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 4px;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.hidden {
  display: none !important;
}

#game {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, #e7bd78 0%, var(--sand) 48%, #a96f3c 100%);
}

#game canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  touch-action: none;
}

#game::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(228, 91, 54, 0.035), rgba(33, 27, 23, 0.08)),
    radial-gradient(ellipse at center, transparent 48%, rgba(33, 27, 23, 0.2) 76%, rgba(20, 13, 9, 0.65) 120%);
  mix-blend-mode: multiply;
}

/* Full-screen menu and result posters */
#menu,
#result {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: auto;
  background:
    linear-gradient(115deg, transparent 0 47%, rgba(244, 231, 201, 0.025) 47% 49%, transparent 49% 100%) 0 0 / 22px 22px,
    radial-gradient(circle at 50% 15%, rgba(215, 164, 95, 0.26), transparent 55%),
    rgba(33, 27, 23, 0.88);
  backdrop-filter: blur(8px) saturate(0.8);
}

#menu::before,
#result::before {
  content: "";
  position: fixed;
  inset: 10px;
  border: 1px solid rgba(215, 164, 95, 0.35);
  pointer-events: none;
}

#menu > .panel,
#menu > .menu-panel,
#menu > .poster,
#menu > .card,
#result > .panel,
#result > .result-panel,
#result > .poster,
#result > .card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(20px, 4vw, 42px);
  border: 2px solid var(--sand);
  outline: 1px solid rgba(244, 231, 201, 0.16);
  outline-offset: -8px;
  background:
    linear-gradient(135deg, rgba(215, 164, 95, 0.06) 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(180deg, rgba(65, 47, 35, 0.98), rgba(33, 27, 23, 0.98));
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55), inset 0 0 60px rgba(215, 164, 95, 0.035);
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) var(--ink);
}

h1,
h2,
h3,
.title,
.logo {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

#menu h1,
#menu .logo,
#menu .title {
  color: var(--cream);
  font-size: clamp(3rem, 11vw, 6.8rem);
  text-shadow: 4px 4px 0 var(--vermilion), 8px 8px 0 rgba(0, 0, 0, 0.25);
  transform: skew(-3deg);
}

#menu h2,
#result h2,
#result-title {
  color: var(--sand-light);
  font-size: clamp(1.7rem, 6vw, 3rem);
}

.tagline,
.subtitle,
.eyebrow {
  margin: 0.8rem 0;
  color: var(--sand-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.67rem, 2vw, 0.82rem);
  font-weight: 750;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--turquoise);
}

.rule,
.divider,
hr {
  width: 100%;
  height: 7px;
  margin: 1.1rem 0;
  border: 0;
  background: repeating-linear-gradient(135deg, var(--vermilion) 0 7px, transparent 7px 13px);
  opacity: 0.8;
}

.mode-row,
.modes,
.mode-select,
.controls-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
}

.mode {
  flex: 1 1 150px;
  border-color: rgba(215, 164, 95, 0.45);
  color: rgba(244, 231, 201, 0.72);
}

.mode.selected {
  border-color: var(--turquoise);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(33, 27, 23, 0.09) 25%, transparent 25%) 0 0 / 8px 8px,
    var(--turquoise);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--turquoise), 0 7px 20px rgba(112, 184, 176, 0.18);
  transform: translateY(-1px);
}

#start-btn,
#restart-btn,
#resume-btn {
  border-color: #f08a65;
  color: #fff6df;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09) 25%, transparent 25%) 0 0 / 9px 9px,
    var(--vermilion);
  box-shadow: 0 5px 0 #8e321d, 0 12px 28px rgba(0, 0, 0, 0.25);
}

#start-btn {
  width: min(330px, 100%);
  min-height: 54px;
  margin: 0.35rem auto 0.75rem;
  font-size: 1rem;
}

#start-btn:hover,
#restart-btn:hover,
#resume-btn:hover {
  background-color: #f16b43;
  border-color: var(--cream);
}

#notes-btn {
  color: var(--sand-light);
  background: transparent;
  box-shadow: none;
}

.controls,
.instructions,
.help,
.key-guide {
  margin: 1rem auto;
  color: rgba(244, 231, 201, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.67rem, 2.3vw, 0.78rem);
  line-height: 1.75;
  text-align: center;
}

kbd {
  display: inline-block;
  min-width: 1.7em;
  margin: 0 0.12em;
  padding: 0.1em 0.35em;
  border: 1px solid rgba(244, 231, 201, 0.38);
  border-bottom-width: 3px;
  border-radius: 3px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  line-height: 1.35;
}

/* Crisp, entirely non-blocking game telemetry */
#hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.8);
}

.hud-top {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  left: max(18px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.hud-bottom {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.telemetry {
  color: var(--cream);
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 850;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

.hud-top .telemetry,
.hud-bottom .telemetry {
  position: relative;
  z-index: 2;
  padding: 9px 12px;
  border: 1px solid var(--edge);
  background: linear-gradient(110deg, rgba(33, 27, 23, 0.9), rgba(33, 27, 23, 0.62));
  box-shadow: 3px 3px 0 rgba(33, 27, 23, 0.25);
  white-space: nowrap;
}

.hud-label {
  display: block;
  margin-bottom: 4px;
  color: var(--sand-light);
  font-size: 0.62em;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

#health,
#ammo,
#kills,
#timer {
  position: static;
}

.health-panel {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  border-left: 4px solid var(--vermilion);
}

.timer-panel {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  border-top: 3px solid var(--vermilion);
  text-align: center;
}

.score-panel {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  border-left: 4px solid var(--turquoise);
}

.score-panel .hud-label {
  color: var(--turquoise);
}

#ammo {
  margin-left: auto;
  border-right: 4px solid var(--sand);
  font-size: clamp(0.95rem, 2.6vw, 1.25rem);
}

#timer {
  min-width: 76px;
  font-size: clamp(1rem, 3vw, 1.35rem);
}

#net-status {
  position: absolute;
  top: max(82px, calc(env(safe-area-inset-top) + 72px));
  right: max(18px, env(safe-area-inset-right));
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid var(--edge);
  color: var(--turquoise);
  background: rgba(33, 27, 23, 0.78);
  font-size: clamp(0.62rem, 1.8vw, 0.78rem);
  white-space: nowrap;
}

#net-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  vertical-align: 0.08em;
}

#feed {
  position: absolute;
  top: max(72px, calc(env(safe-area-inset-top) + 62px));
  right: max(18px, env(safe-area-inset-right));
  display: flex;
  width: min(360px, calc(100vw - 36px));
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--cream);
  font-size: clamp(0.67rem, 2vw, 0.82rem);
  font-weight: 750;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-align: right;
  text-transform: uppercase;
}

#feed > * {
  max-width: 100%;
  padding: 6px 9px;
  border-right: 3px solid var(--vermilion);
  background: rgba(33, 27, 23, 0.7);
  animation: feed-in 180ms ease-out both;
}

#feed .kill,
#feed .elimination {
  color: var(--sand-light);
}

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

#crosshair,
#hitmarker {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#crosshair {
  z-index: 4;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9));
}

#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--cream);
  transform: translate(-50%, -50%);
}

#crosshair::before {
  width: 28px;
  height: 2px;
  background: linear-gradient(to right, var(--cream) 0 9px, transparent 9px 19px, var(--cream) 19px 28px);
}

#crosshair::after {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, var(--cream) 0 9px, transparent 9px 19px, var(--cream) 19px 28px);
}

#hitmarker {
  z-index: 5;
  display: grid;
  place-items: center;
  color: #fff7dc;
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 4px #000, 0 0 9px var(--vermilion);
}

#hitmarker::before,
#hitmarker::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background: currentColor;
}

#hitmarker::before { transform: rotate(45deg); }
#hitmarker::after { transform: rotate(-45deg); }

#hitmarker.show,
#hitmarker.active,
#hitmarker.hit {
  animation: hit-pop 150ms ease-out both;
}

@keyframes hit-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

#damage-flash {
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(174, 30, 15, 0.2) 58%, rgba(174, 30, 15, 0.88) 120%);
  mix-blend-mode: screen;
}

#damage-flash.show,
#damage-flash.active {
  animation: damage-pulse 360ms ease-out;
}

@keyframes damage-pulse {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* Pause and results */
#pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  color: var(--cream);
  background: rgba(33, 27, 23, 0.72);
  backdrop-filter: blur(6px) grayscale(0.35);
  text-align: center;
}

#pause-overlay h2,
#pause-overlay .title {
  color: var(--sand-light);
  font-size: clamp(2.6rem, 10vw, 6rem);
  text-shadow: 4px 4px 0 var(--vermilion);
}

#result {
  z-index: 45;
}

#result-title {
  margin-bottom: 0.7rem;
  color: var(--cream);
  font-size: clamp(2.6rem, 10vw, 5.8rem);
  text-shadow: 3px 3px 0 var(--vermilion);
}

#result-score {
  margin: 1rem auto;
  color: var(--sand-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1rem, 4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

#restart-btn {
  min-width: min(280px, 100%);
  margin-top: 0.5rem;
}

/* Developer-notes dialog */
#notes-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(18, 13, 10, 0.82);
  backdrop-filter: blur(9px);
}

#notes-modal > div,
#notes-modal > article,
#notes-modal .modal,
#notes-modal .modal-content,
#notes-modal .notes-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(82dvh, 720px);
  overflow: auto;
  padding: clamp(24px, 5vw, 44px);
  border: 2px solid var(--sand);
  color: var(--cream);
  background:
    repeating-linear-gradient(135deg, rgba(215, 164, 95, 0.025) 0 8px, transparent 8px 16px),
    #2b231e;
  box-shadow: 9px 9px 0 rgba(228, 91, 54, 0.7), 0 25px 80px rgba(0, 0, 0, 0.65);
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) var(--ink);
  animation: notes-in 180ms ease-out both;
}

#notes-modal h2,
#notes-modal h3 {
  margin: 0 44px 1rem 0;
  color: var(--sand-light);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1;
}

#notes-modal p,
#notes-modal li {
  color: rgba(244, 231, 201, 0.85);
  font-size: clamp(0.8rem, 2.3vw, 0.95rem);
}

#notes-modal code {
  color: var(--turquoise);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#notes-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-color: rgba(244, 231, 201, 0.35);
  color: var(--cream);
  background: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

@keyframes notes-in {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Touch UI is inert and absent for mouse users, preserving pointer lock. */
#move-stick,
#look-zone,
#fire-btn,
#reload-btn {
  display: none;
}

@media (pointer: coarse), (hover: none) and (max-width: 900px) {
  #touch-controls {
    display: flex;
  }

  #move-stick,
  #fire-btn,
  #reload-btn {
    position: fixed;
    display: flex;
    z-index: 30;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  #look-zone {
    top: 18%;
    right: 0;
    bottom: 0;
    width: 58%;
    pointer-events: auto;
  }

  #move-stick {
    left: max(20px, env(safe-area-inset-left));
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px));
    width: 116px;
    height: 116px;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(244, 231, 201, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33, 27, 23, 0.12) 0 37%, rgba(33, 27, 23, 0.45) 38% 100%);
    box-shadow: inset 0 0 0 8px rgba(244, 231, 201, 0.035);
    pointer-events: auto;
  }

  #move-stick::after {
    content: "";
    width: 48px;
    height: 48px;
    border: 2px solid rgba(244, 231, 201, 0.65);
    border-radius: 50%;
    background: rgba(215, 164, 95, 0.52);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
  }

  #move-stick .knob,
  #move-stick .stick-knob,
  #move-stick .stick-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 2px solid rgba(244, 231, 201, 0.75);
    border-radius: 50%;
    background: rgba(215, 164, 95, 0.75);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    pointer-events: none;
  }

  #move-stick:has(.knob)::after,
  #move-stick:has(.stick-knob)::after,
  #move-stick:has(.stick-handle)::after {
    display: none;
  }

  #fire-btn,
  #reload-btn {
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid rgba(244, 231, 201, 0.72);
    border-radius: 50%;
    pointer-events: auto;
    text-align: center;
  }

  #fire-btn {
    right: max(22px, env(safe-area-inset-right));
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 66px));
    width: 82px;
    height: 82px;
    color: #fff4df;
    background: rgba(228, 91, 54, 0.84);
    box-shadow: 0 5px 0 rgba(100, 31, 17, 0.8), inset 0 0 0 6px rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
  }

  #reload-btn {
    right: max(116px, calc(env(safe-area-inset-right) + 106px));
    bottom: max(66px, calc(env(safe-area-inset-bottom) + 56px));
    width: 62px;
    height: 62px;
    color: var(--ink);
    background: rgba(112, 184, 176, 0.88);
    box-shadow: 0 4px 0 rgba(28, 76, 72, 0.8);
    font-size: 0.57rem;
    letter-spacing: 0.06em;
  }

  #fire-btn:active,
  #reload-btn:active {
    transform: scale(0.92);
    filter: brightness(1.18);
  }

  #health {
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  #ammo {
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  #menu,
  #result {
    align-items: center;
    justify-content: flex-start;
    padding: max(12px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  #menu::before,
  #result::before {
    inset: 5px;
  }

  #menu > .panel,
  #menu > .menu-panel,
  #menu > .poster,
  #menu > .card,
  #result > .panel,
  #result > .result-panel,
  #result > .poster,
  #result > .card {
    max-height: calc(100dvh - 24px);
    padding: 20px 17px;
  }

  #menu h1,
  #menu .logo,
  #menu .title {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
    text-shadow: 3px 3px 0 var(--vermilion), 6px 6px 0 rgba(0, 0, 0, 0.22);
  }

  .tagline,
  .subtitle,
  .eyebrow {
    margin: 0.55rem 0;
  }

  .rule,
  .divider,
  hr {
    margin: 0.75rem 0;
  }

  .mode-row,
  .modes,
  .mode-select {
    gap: 8px;
    margin: 0.7rem 0;
  }

  .mode {
    flex-basis: 125px;
    padding-inline: 0.65rem;
    font-size: 0.72rem;
  }

  .controls,
  .instructions,
  .help,
  .key-guide {
    margin: 0.7rem auto;
    line-height: 1.55;
  }

  #health,
  #ammo,
  #kills,
  #timer,
  #net-status {
    padding: 7px 8px;
  }

  .hud-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .hud-top .telemetry {
    min-width: 0;
    padding: 7px 8px;
    white-space: normal;
  }

  .timer-panel {
    grid-column: 1;
    grid-row: 1;
    justify-self: stretch;
    text-align: left;
  }

  .score-panel {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
  }

  #mode-display {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
  }

  #net-status {
    top: max(112px, calc(env(safe-area-inset-top) + 102px));
    right: max(10px, env(safe-area-inset-right));
    max-width: calc(100vw - 20px);
    padding: 6px 8px;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  #feed {
    top: max(148px, calc(env(safe-area-inset-top) + 138px));
    right: max(10px, env(safe-area-inset-right));
  }

  #health::before,
  #ammo::before,
  #kills::before {
    display: block;
    margin-bottom: 2px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  #menu > .panel,
  #menu > .menu-panel,
  #menu > .poster,
  #menu > .card {
    padding: 16px 24px;
  }

  #menu h1,
  #menu .logo,
  #menu .title {
    font-size: clamp(2.4rem, 12vh, 4.5rem);
  }

  .controls,
  .instructions,
  .help,
  .key-guide {
    line-height: 1.4;
  }

  #move-stick {
    bottom: 48px;
    width: 94px;
    height: 94px;
  }

  #fire-btn {
    bottom: 50px;
    width: 70px;
    height: 70px;
  }

  #reload-btn {
    right: 105px;
    bottom: 43px;
  }
}

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