/* Nothing in the UI is text you are meant to select. Drag-selecting a label
   mid-firefight leaves a blue highlight stuck on screen, and on the globe it
   makes city names look like broken links. Inputs opt back in below. */
:root, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* In-game HUD. Everything here is non-interactive overlay except the buttons,
   so pointer-events stay off by default and are re-enabled selectively. */

#game-screen { position: fixed; inset: 0; }

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.crosshair {
  position: absolute;
  left: 50%; top: 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
.crosshair span {
  position: absolute;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}
.crosshair span:nth-child(1) { left: 50%; top: 0; width: 1.5px; height: 7px; margin-left: -0.75px; }
.crosshair span:nth-child(2) { left: 50%; bottom: 0; width: 1.5px; height: 7px; margin-left: -0.75px; }
.crosshair span:nth-child(3) { top: 50%; left: 0; height: 1.5px; width: 7px; margin-top: -0.75px; }
.crosshair span:nth-child(4) { top: 50%; right: 0; height: 1.5px; width: 7px; margin-top: -0.75px; }
.crosshair.hit span { background: #ff5f4a; }

/* Directional damage. The wedge rotates to point at whatever hit you, which is
   the only reliable way to locate a shooter you never saw. */
.damage-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 360px; height: 360px;
  margin: -180px 0 0 -180px;
  z-index: 5;
  pointer-events: none;
}
.damage-mark {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform-origin: 0 0;
  animation: dmg-fade 1.1s ease-out forwards;
}
.damage-mark::before {
  content: '';
  position: absolute;
  left: -46px;
  top: -172px;
  width: 92px;
  height: 26px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(to top, rgba(255, 70, 60, 0), rgba(255, 90, 74, 0.92));
}
@keyframes dmg-fade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

/* A restrained red edge on the screen, scaled by how hurt you are. */
.damage-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(ellipse at center,
    rgba(255, 40, 40, 0) 45%,
    rgba(255, 40, 40, 0.16) 78%,
    rgba(200, 20, 20, 0.42) 100%);
}
.damage-vignette.hit { transition: opacity 0.06s ease; }

/* Your own shield, seen from inside a dome.
   Straight hatching reads as flat glass, so the geometry here is curved: rings
   that compress toward the edge to imply a surface falling away from you, and
   meridians radiating from directly overhead. Together they read as a
   hemisphere rather than a pane. The centre stays clear for aiming. */
.shield-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  animation: shield-breathe 2.2s ease-in-out infinite;
}
/* Latitude rings. Spacing tightens with distance from centre, which is what
   sells curvature — evenly spaced rings would look like a flat target. */
.shield-overlay::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    repeating-radial-gradient(circle at 50% 58%,
      rgba(111, 232, 255, 0) 0 58px,
      rgba(111, 232, 255, 0.16) 58px 60px),
    repeating-radial-gradient(circle at 50% 58%,
      rgba(111, 232, 255, 0) 0 178px,
      rgba(111, 232, 255, 0.10) 178px 181px);
  -webkit-mask-image: radial-gradient(circle at 50% 58%,
    rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.75) 72%, rgba(0, 0, 0, 1) 100%);
  mask-image: radial-gradient(circle at 50% 58%,
    rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.75) 72%, rgba(0, 0, 0, 1) 100%);
}
/* Meridians converging on the apex, plus the rim glow where the dome meets
   the ground. */
.shield-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(from 0deg at 50% 58%,
      rgba(111, 232, 255, 0.13) 0deg 0.5deg,
      rgba(0, 0, 0, 0) 0.5deg 15deg),
    radial-gradient(ellipse at 50% 58%,
      rgba(79, 216, 255, 0) 46%,
      rgba(79, 216, 255, 0.10) 76%,
      rgba(79, 216, 255, 0.30) 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 58%,
    rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.9) 78%, rgba(0, 0, 0, 1) 100%);
  mask-image: radial-gradient(circle at 50% 58%,
    rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.9) 78%, rgba(0, 0, 0, 1) 100%);
}
@keyframes shield-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
/* The last second flickers, so the dome failing is never a surprise. */
.shield-overlay.expiring { animation: shield-fail 0.22s steps(2) infinite; }
@keyframes shield-fail {
  0% { opacity: 0.95; }
  100% { opacity: 0.3; }
}

/* Charge meter sits directly under the crosshair. You have to be able to judge
   it without taking your eyes off the target. */
.charge-meter {
  position: absolute;
  left: 50%; top: 50%;
  width: 90px; height: 3px;
  margin: 26px 0 0 -45px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}
.charge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2f7f96, #9fe8ff);
  transition: width 0.05s linear;
}
.charge-meter.full .charge-fill {
  background: #cff4ff;
  box-shadow: 0 0 10px #9fe8ff;
}
.charge-meter.full { animation: pulse-mark 0.5s ease-in-out infinite; }

.shield-state {
  position: absolute;
  bottom: 62px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cool);
  border: 1px solid rgba(79, 216, 255, 0.3);
  background: rgba(6, 16, 26, 0.5);
  padding: 4px 10px;
  border-radius: 2px;
  pointer-events: none;
}
.shield-state.cooling { color: var(--muted); border-color: var(--line); opacity: 0.6; }

.hud-corner { position: absolute; z-index: 4; pointer-events: none; }
.hud-bl { left: 30px; bottom: 28px; }
.hud-br { right: 30px; bottom: 28px; text-align: right; }
.hud-tr { right: 30px; top: 26px; text-align: right; }

.hearts { display: flex; gap: 5px; margin-bottom: 14px; }
.heart {
  width: 15px; height: 15px;
  background: #ff4d5e;
  clip-path: polygon(50% 100%, 0 38%, 0 16%, 22% 0, 50% 16%, 78% 0, 100% 16%, 100% 38%);
  box-shadow: 0 0 9px rgba(255, 77, 94, 0.55);
}
.heart.empty { background: rgba(255, 255, 255, 0.16); box-shadow: none; }
.heart.partial { opacity: 0.5; }

.stamina-bar {
  width: 132px;
  height: 3px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 13px;
}
.stamina-fill {
  height: 100%;
  width: 100%;
  background: var(--cool);
  border-radius: 2px;
  transition: width 0.08s linear, background 0.25s ease;
}
/* Exhausted has to be unmistakable — it is why you just stopped sprinting. */
.stamina-fill.exhausted {
  background: #ff5f4a;
  animation: pulse-mark 0.9s ease-in-out infinite;
}

.stat-line { display: flex; align-items: baseline; gap: 9px; margin-top: 5px; }
.stat-label {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.stat-value.muted { font-size: 14px; color: var(--ink); opacity: 0.75; }

/* Carried value escalates with wealth: brighter, warmer, and finally lit. */
.stat-value.carried-t0 { color: var(--ink); }
.stat-value.carried-t1 { color: #ffd591; }
.stat-value.carried-t2 { color: var(--accent); text-shadow: 0 0 8px rgba(245, 179, 66, 0.4); }
.stat-value.carried-t3 {
  color: #ffc766;
  font-size: 24px;
  text-shadow: 0 0 14px rgba(245, 179, 66, 0.65);
}
.stat-value.carried-t4 {
  color: #ffdca0;
  font-size: 27px;
  text-shadow: 0 0 22px rgba(255, 200, 110, 0.9);
  animation: pulse-mark 1.5s ease-in-out infinite;
}
.stat-value.bump { animation: gain-bump 0.28s ease; }
@keyframes gain-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.gain-layer { position: relative; width: 0; height: 0; }
.gold-gain {
  position: absolute;
  left: 6px;
  bottom: -6px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(245, 179, 66, 0.6);
  animation: gain-float 0.9s ease-out forwards;
  pointer-events: none;
}
.gold-gain.heal { color: #ff6b72; text-shadow: 0 0 10px rgba(255, 107, 114, 0.6); }
@keyframes gain-float {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-30px); }
}

.seg { display: flex; gap: 4px; }
.seg button {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.seg button:hover { color: var(--ink); }
.seg button.active { border-color: var(--accent); color: var(--accent); }

.glow-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}
.glow-pip.t1 { opacity: 0.5; box-shadow: 0 0 6px var(--accent); }
.glow-pip.t2 { opacity: 0.7; box-shadow: 0 0 10px var(--accent); }
.glow-pip.t3 { opacity: 0.85; box-shadow: 0 0 16px var(--accent); }
.glow-pip.t4 { opacity: 1; box-shadow: 0 0 24px var(--accent); animation: pulse-mark 1.4s ease-in-out infinite; }

.weapon-name {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.weapon-ammo {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.weapon-ammo.empty { color: #ff5f4a; }
.weapon-slots { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.weapon-slot {
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
}
.weapon-slot.active { border-color: var(--accent); color: var(--accent); }

.portal-compass { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.compass-arrow {
  font-size: 19px;
  color: var(--cool);
  display: inline-block;
  transition: transform 0.08s linear;
}
.compass-dist {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cool);
}
.compass-label {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.portal-move {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 5px;
  min-height: 14px;
}
.portal-move.urgent { color: var(--accent); }

/* The minimap itself is drawn by WebGL into a scissored corner of the main
   canvas; this is only the frame sitting on top of it. */
.minimap-frame {
  position: absolute;
  top: 26px; left: 30px;
  width: 190px; height: 190px;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(0, 0, 0, 0.55);
  z-index: 4;
  pointer-events: none;
}
.minimap-tag {
  position: absolute;
  bottom: 5px; right: 7px;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  opacity: 0.7;
}

.killfeed {
  position: absolute;
  top: 26px; left: 30px;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: top 0.2s ease;
}
.minimap-on .killfeed { top: 232px; }
.kill-row {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: rgba(6, 10, 18, 0.6);
  padding: 5px 10px;
  border-left: 2px solid var(--line);
  border-radius: 2px;
  animation: feed-in 0.25s ease;
}
.kill-row .killer { color: var(--accent); font-weight: 600; }
.kill-row .victim { color: var(--muted); }
.kill-row.event { border-left-color: var(--cool); color: var(--cool); }
@keyframes feed-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

.tag-warning {
  position: absolute;
  top: 16%; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: #ff5f4a;
  border: 1px solid rgba(255, 95, 74, 0.4);
  background: rgba(30, 6, 6, 0.55);
  padding: 7px 15px;
  border-radius: 2px;
  pointer-events: none;
  animation: pulse-mark 1.3s ease-in-out infinite;
}
/* Out in the field this is context, not an alarm — no pulse, no red panic. */
.tag-warning.subtle {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(6, 10, 18, 0.5);
  animation: none;
  font-size: 10px;
}

/* Calm, not alarming — the bubble is a good place to be. It just explains why
   your weapons are doing nothing. */
.safe-zone {
  position: absolute;
  top: 15%; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--cool);
  border: 1px solid rgba(79, 216, 255, 0.3);
  background: rgba(6, 16, 26, 0.45);
  padding: 5px 13px;
  border-radius: 2px;
  pointer-events: none;
}

.boundary-warning {
  position: absolute;
  top: 22%; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--cool);
  border: 1px solid rgba(79, 216, 255, 0.35);
  background: rgba(6, 16, 26, 0.5);
  padding: 6px 14px;
  border-radius: 2px;
  pointer-events: none;
}
.boundary-warning.critical {
  color: #ff5f4a;
  border-color: rgba(255, 95, 74, 0.45);
  background: rgba(30, 6, 6, 0.55);
  animation: pulse-mark 1s ease-in-out infinite;
}

/* Field Forge. Sits low-centre so it never fights the crosshair, and only
   appears while standing on a terminal. */
.forge-panel {
  position: absolute;
  bottom: 20%; left: 50%;
  transform: translateX(-50%);
  width: 340px;
  z-index: 5;
  padding: 16px 18px 14px;
  background: rgba(6, 14, 24, 0.82);
  border: 1px solid rgba(79, 216, 255, 0.3);
  border-radius: 3px;
  pointer-events: none;
  animation: feed-in 0.18s ease;
}
.forge-head {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--cool);
  margin-bottom: 4px;
}
.forge-sub {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.75;
  margin-bottom: 12px;
}
.forge-list { display: flex; flex-direction: column; gap: 6px; }

.forge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.forge-key {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}
.forge-name { flex: 1; font-size: 12px; color: var(--ink); }
.forge-desc { font-size: 9.5px; color: var(--muted); letter-spacing: 0.05em; }
.forge-cost {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
/* Unaffordable and already-owned states have to be readable at a glance while
   someone is standing exposed in the open. */
.forge-item.poor { opacity: 0.42; }
.forge-item.poor .forge-cost { color: #ff5f4a; }
.forge-item.owned { border-color: rgba(79, 216, 255, 0.45); opacity: 0.6; }
.forge-item.owned .forge-cost { color: var(--cool); font-size: 10px; }

.forge-channel { margin-top: 12px; }
.forge-channel-label {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--cool);
  margin-bottom: 6px;
}
.forge-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.forge-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cool), var(--accent));
  transition: width 0.1s linear;
}
.forge-channel-warn {
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff9d6b;
}

/* Active kit, bottom-centre above the hearts. Present but quiet. */
.module-strip {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 4;
  pointer-events: none;
}
.module-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cool);
  border: 1px solid rgba(79, 216, 255, 0.35);
  background: rgba(6, 16, 26, 0.55);
  padding: 4px 9px;
  border-radius: 2px;
  animation: feed-in 0.25s ease;
}
.module-chip b {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.module-chip.spent { opacity: 0.4; }

.extract-panel {
  position: absolute;
  bottom: 16%; left: 50%;
  transform: translateX(-50%);
  width: 320px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
}
.extract-label {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--cool);
  margin-bottom: 9px;
}
.extract-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.extract-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cool), var(--accent));
  transition: width 0.12s linear;
}
.extract-sub {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.center-banner {
  position: absolute;
  top: 26%; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(6, 10, 18, 0.7);
  padding: 10px 20px;
  border-radius: 2px;
  pointer-events: none;
  animation: feed-in 0.3s ease;
}

.overlay {
  position: absolute;
  inset: 0;
  /* Must sit above .click-to-play, or that layer swallows clicks meant for
     these buttons and silently re-locks the pointer. */
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(3px);
  /* Transient overlays (death) must not eat clicks; buttons re-enable this. */
  pointer-events: none;
}
.overlay-title {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ff5f4a;
}
.overlay-title.success { color: var(--accent); }
.overlay-sub { font-size: 12.5px; letter-spacing: 0.12em; color: var(--muted); }
.overlay-hint {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
  margin-top: -4px;
}
.overlay-timer {
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.overlay .enter-btn { width: 220px; margin-top: 18px; pointer-events: auto; }
.overlay .ghost-btn { margin-top: 4px; pointer-events: auto; }

/* TEMPORARY DEV TUNING PANEL — REMOVE BEFORE LAUNCH */
.admin-panel {
  position: absolute;
  top: 20px; right: 20px;
  width: 330px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  z-index: 20;
  padding: 18px 20px 20px;
  background: rgba(8, 11, 20, 0.94);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  pointer-events: auto;
}
.admin-title {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 16px;
}
.admin-note { font-size: 11px; color: var(--muted); }
.admin-panel .setting-name { font-size: 11px; }
.admin-panel .setting-row { margin-bottom: 8px; gap: 8px; }
.admin-panel input[type="range"] { width: 110px; }
.admin-val { width: 42px; }
.admin-panel .ghost-btn { width: 100%; margin-top: 6px; }

/* Second panel: world-level switches, parked beside the tuning panel. */
.world-panel { right: 370px; width: 280px; }
.world-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-bottom: 8px; padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  color: var(--text);
  font-family: inherit; font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer;
}
.world-toggle:hover { background: rgba(255, 255, 255, 0.07); }
.world-toggle em { font-style: normal; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }
.world-toggle.on { border-color: var(--accent); }
.world-toggle.on em { color: var(--accent); }
.world-toggle.off em { color: #ff7a6b; }

/* Field guide. The colour chip on each row is the actual in-world colour, so
   the guide teaches recognition rather than vocabulary. */
.guide-overlay {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.86);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.guide-panel {
  width: 520px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 30px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.guide-title {
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--accent);
  margin-bottom: 14px;
}
.guide-loop {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.guide-group {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 10px;
}
.guide-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 11px;
}
.guide-chip {
  width: 15px; height: 15px;
  border-radius: 3px;
  flex: 0 0 auto;
  margin-top: 2px;
  box-shadow: 0 0 9px currentColor;
  background: currentColor;
}
.guide-chip.ring {
  background: transparent;
  border: 2px solid currentColor;
  box-shadow: 0 0 8px currentColor;
}
.guide-text { flex: 1; }
.guide-name {
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 2px;
}
.guide-name b {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
  font-size: 11px;
}
.guide-desc {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.guide-panel .enter-btn { width: 100%; margin-top: 18px; }

.pause-menu {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.pause-panel {
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 30px 30px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.pause-title {
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--muted);
  margin-bottom: 24px;
}

.settings-section { margin-bottom: 22px; }
.settings-heading {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.setting-name {
  flex: 1;
  font-size: 12px;
  color: var(--ink);
}
.setting-val {
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 26px;
  text-align: right;
}

.setting-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}
.setting-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.setting-row input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.toggle {
  width: 40px; height: 21px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle i {
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}
.toggle[aria-checked="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.toggle[aria-checked="true"] i {
  transform: translateX(19px);
  background: var(--accent);
}

.pause-panel .enter-btn { width: 100%; margin-top: 6px; }
.pause-panel .ghost-btn { width: 100%; margin-top: 9px; }

.click-to-play {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.7);
  cursor: pointer;
}
.ctp-inner { text-align: center; }
.ctp-title {
  font-size: 16px;
  letter-spacing: 0.34em;
  color: var(--ink);
  margin-bottom: 22px;
}
.ctp-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  max-width: 460px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ctp-keys b { color: var(--accent); font-weight: 700; margin-right: 4px; }


/* Sunburst drop tracker: loud, central-top, impossible to miss. */
.strike-tracker {
  position: absolute;
  top: 84px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px;
  background: rgba(30, 6, 4, 0.82);
  border: 1px solid #ff5a3a;
  border-radius: 3px;
  z-index: 6;
  pointer-events: none;
  white-space: nowrap;
}
.strike-tracker em {
  font-style: normal;
  font-size: 10px; letter-spacing: 0.22em;
  color: #ff8a6a;
}
.strike-tracker strong {
  font-size: 20px; font-weight: 600;
  color: #fff0e2;
  font-variant-numeric: tabular-nums;
}
.strike-tracker i {
  font-style: normal;
  font-size: 11px; letter-spacing: 0.1em;
  color: rgba(255, 220, 200, 0.75);
}
.strike-tracker.inbound { animation: strikePulse 1s ease-in-out infinite; }
@keyframes strikePulse {
  0%, 100% { border-color: #ff5a3a; box-shadow: 0 0 0 rgba(255, 90, 58, 0); }
  50%      { border-color: #ffb08a; box-shadow: 0 0 22px rgba(255, 90, 58, 0.45); }
}
.module-chip.owned { opacity: 0.9; }


/* The control list also appears in the pause menu, where it sits inside a
   panel rather than floating over the world — so it wraps tighter and drops
   the drop shadow it needs against the skyline. */
.pause-keys {
  margin-top: 2px;
  gap: 6px 14px;
  text-shadow: none;
}
.pause-keys span { font-size: 10.5px; }


/* Menu affordance, always on screen. Clickable when the cursor is free, and a
   standing reminder of the key when it is not. */
.menu-tab {
  position: absolute;
  /* Top-left: the only free corner. Top-right is the compass, bottom-left the
     minimap, bottom-right the score readout — the first placement sat on top
     of the portal distance. */
  top: 26px; left: 30px;
  z-index: 7;
  padding: 5px 10px;
  background: rgba(8, 11, 20, 0.6);
  border: 1px solid rgba(150, 180, 220, 0.28);
  border-radius: 3px;
  color: rgba(220, 232, 248, 0.75);
  font-family: inherit;
  font-size: 9px; letter-spacing: 0.18em;
  cursor: pointer;
  pointer-events: auto;
}
.menu-tab b { color: var(--accent); font-weight: 600; margin-right: 5px; }
.menu-tab:hover {
  background: rgba(8, 11, 20, 0.85);
  border-color: var(--accent-dim);
  color: #fff;
}
/* The minimap occupies the bottom-left, so the tab is unaffected by it. */


/* Re-entry after the first time: the player has read the hints, so the prompt
   shrinks to a target rather than a tutorial. */
.click-to-play.returning { background: rgba(4, 6, 12, 0.55); }
.click-to-play.returning .ctp-title { font-size: 20px; letter-spacing: 0.3em; }
.click-to-play.returning .ctp-keys { display: none; }


/* Direction pointer on the drop tracker, in place of a compass label. */
.strike-arrow {
  display: inline-block;
  font-size: 17px; line-height: 1;
  color: #ffb08a;
  /* Rotation is applied inline; this only keeps it spinning about its centre. */
  transform-origin: 50% 50%;
}


/* Per-section reset, sitting on the heading it undoes. */
.heading-row { display: flex; align-items: center; justify-content: space-between; }
.reset-mini {
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: inherit;
  font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
}
.reset-mini:hover { border-color: var(--accent-dim); color: var(--accent); }


/* Empty rack slots: present but plainly not yours yet. Dim enough to read as
   unavailable at a glance, legible enough to tell you what to go looking for. */
.weapon-slot.locked {
  opacity: 0.3;
  border-style: dashed;
}
