/* Saltmere v1 — Stylesheet. Thin tactical language: white on world, hairlines, red for damage, blue for the zone. */
:root {
  /* One HUD unit is 1 px at 1920x1080. It scales with the window, with a floor that keeps small text readable. */
  --u: clamp(0.74px, min(0.0521vw, 0.0926vh), 1.5px);

  --ink: #ffffff;
  --ink-soft: #ecebe7;
  --ink-dim: rgba(255, 255, 255, 0.64);
  --ink-faint: rgba(255, 255, 255, 0.42);
  --hair: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.34);
  --red: #e23b2e;
  --blue: #2f7df6;
  --blue-light: #86b8ff;
  --squad: #6fe0a0; /* squadmates: nameplates, map, compass, pings */
  --glass: rgba(6, 9, 12, 0.42);
  --sheet: rgba(9, 12, 15, 0.9);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.55);
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b0f12;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-soft);
}

h1, h2, h3 {
  font-family: var(--cond);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

button, select, input {
  font-family: inherit;
}

button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

#game-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

.hidden {
  display: none !important;
}

#save-error {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(560px, calc(100% - 32px));
  padding: 12px 16px;
  background: #291a16;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Screen Overlays (Damage, Storm Front capped at 25%, Heal) */
.screen-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#damage-overlay {
  background: radial-gradient(circle, rgba(226, 59, 46, 0) 56%, rgba(226, 59, 46, 0.46) 100%);
}

#zone-overlay {
  background: radial-gradient(circle, rgba(47, 125, 246, 0) 52%, rgba(47, 125, 246, 0.25) 100%);
}

#heal-overlay {
  background: radial-gradient(circle, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, 0.16) 100%);
}

#damage-dir-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  width: calc(var(--u) * 300);
  height: calc(var(--u) * 300);
  transform: translate(-50%, -50%);
  border-top: 3px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 13;
}

/* Longshore 4x Mil-Dot Scope Overlay */
#scope-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(16, 26, 22, 0.04) 0px,
    rgba(12, 20, 18, 0.14) 210px,
    rgba(6, 9, 12, 0.94) 236px,
    rgba(3, 5, 7, 0.985) 300px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.scope-circle {
  width: 468px;
  height: 468px;
  border: 6px solid rgba(18, 22, 26, 0.98);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.88);
}

.scope-inner-bezel {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.scope-line-h {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(10,12,14,0.96) 0%, rgba(10,12,14,0.96) 24%, rgba(20,24,28,0.65) 46%, transparent 49.2%, transparent 50.8%, rgba(20,24,28,0.65) 54%, rgba(10,12,14,0.96) 76%, rgba(10,12,14,0.96) 100%);
}

.scope-line-v {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(10,12,14,0.96) 0%, rgba(10,12,14,0.92) 22%, rgba(20,24,28,0.45) 45%, transparent 49.2%, transparent 50.8%, rgba(20,24,28,0.78) 54%, rgba(10,12,14,0.96) 80%, rgba(10,12,14,0.98) 100%);
}

.scope-mil-dots {
  position: absolute;
  inset: 0;
}

.scope-bdc-ticks {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 24px;
  height: 140px;
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(to bottom, rgba(226, 59, 46, 0.88) 0px, rgba(226, 59, 46, 0.88) 2px, transparent 2px, transparent 22px);
  clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
}

.scope-windage-ticks {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 10px;
  transform: translate(-50%, -50%);
  background-image: repeating-linear-gradient(to right, rgba(16, 20, 24, 0.9) 0px, rgba(16, 20, 24, 0.9) 1.5px, transparent 1.5px, transparent 22px);
}

.scope-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.scope-telemetry-top {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  white-space: nowrap;
}

#scope-label {
  position: absolute;
  bottom: calc(50% - 266px);
  color: var(--ink-dim);
  font-family: var(--cond);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-shadow: var(--shadow);
}

/* In-Game HUD */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  font-family: var(--cond);
  color: var(--ink);
  text-shadow: var(--shadow);
}

/* Keeps the ammo, weapon and tip text readable over pale floors, sand and sky */
#hud::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28vh;
  background: linear-gradient(to top, rgba(8, 11, 13, 0.34), rgba(8, 11, 13, 0));
}

#pointer-lock-banner {
  position: absolute;
  top: calc(var(--u) * 106);
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: calc(var(--u) * 16);
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

#pointer-lock-banner b {
  font-weight: 600;
}

/* Top Compass */
#compass-container {
  position: absolute;
  top: calc(var(--u) * 20);
  left: 50%;
  width: calc(var(--u) * 660);
  transform: translateX(-50%);
  text-align: center;
}

#compass-marker {
  display: block;
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 8);
  margin: 0 auto calc(var(--u) * 5);
  fill: var(--ink);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

#compass-track {
  position: relative;
  height: calc(var(--u) * 33);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 83%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 83%, transparent 100%);
}

#compass-strip {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: calc(var(--u) * 2112);  /* 720 degrees at 44 units per 15 degrees */
  will-change: transform;
}

.compass-tick {
  position: absolute;
  top: 0;
  width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compass-tick::before {
  content: '';
  flex: none;
  width: 1px;
  height: calc(var(--u) * 7);
  margin-bottom: calc(var(--u) * 3);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}

.compass-tick span {
  font-size: calc(var(--u) * 15);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
}

.compass-tick.cardinal::before {
  width: 2px;
  height: calc(var(--u) * 9);
  margin-bottom: calc(var(--u) * 1);
  background: var(--ink);
}

.compass-tick.cardinal span {
  font-size: calc(var(--u) * 19);
  font-weight: 600;
  color: var(--ink);
}

#compass-waypoints {
  position: absolute;
  inset: 0;
}

.compass-wp {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--u) * 7);
  height: calc(var(--u) * 7);
  margin-left: calc(var(--u) * -3.5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
  will-change: transform;
}

.wp-zone {
  background: var(--blue);
}

.wp-drop {
  background: #f0dc72;
}

.wp-ping {
  background: var(--squad);
  border-radius: 50%;
}

#compass-heading {
  margin-top: calc(var(--u) * 1);
  font-size: calc(var(--u) * 20);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* Top Right Match Counters & Killfeed */
#match-counters {
  position: absolute;
  top: calc(var(--u) * 24);
  right: calc(var(--u) * 30);
  display: flex;
  gap: calc(var(--u) * 22);
}

.counter-box {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 9);
}

.counter-value {
  min-width: calc(var(--u) * 38);
  padding: calc(var(--u) * 2) calc(var(--u) * 8);
  background: var(--glass);
  font-size: calc(var(--u) * 28);
  font-weight: 600;
  line-height: 1.12;
  text-align: center;
  color: var(--ink);
}

.counter-label {
  font-size: calc(var(--u) * 22);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

#killfeed {
  position: absolute;
  top: calc(var(--u) * 72);
  right: calc(var(--u) * 30);
  width: calc(var(--u) * 520);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(var(--u) * 5);
}

.killfeed-item {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 13.5);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-soft);
  animation: killfeed-out 0.6s ease 5.4s forwards;
}

@keyframes killfeed-out {
  to { opacity: 0; }
}

.killfeed-item .weapon-silhouette {
  width: calc(var(--u) * 46);
  height: calc(var(--u) * 14);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.75));
}

.killfeed-item .is-player {
  font-weight: 700;
  color: var(--ink);
}

.killfeed-item .victim.is-player {
  color: var(--red);
}

/* Crosshair & Hit Feedback (§3.11): 1 px lines stay crisp, so these use real pixels */
#crosshair {
  --ch-gap: 6px;
  --ch-len: 7px;
  --ch-color: #ffffff;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 14;
}

.ch-line {
  position: absolute;
  background: var(--ch-color);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.45), 0 0 2px rgba(0, 0, 0, 0.6);
}

.ch-top { width: 1px; height: var(--ch-len); left: 0; bottom: var(--ch-gap); }
.ch-bottom { width: 1px; height: var(--ch-len); left: 0; top: var(--ch-gap); }
.ch-left { height: 1px; width: var(--ch-len); top: 0; right: var(--ch-gap); }
.ch-right { height: 1px; width: var(--ch-len); top: 0; left: var(--ch-gap); }

.ch-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--ch-color);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: -0.5px;
  left: -0.5px;
}

/* Dot-only when ADS without scope or when style=dot */
#crosshair.ads-dot-mode .ch-line,
#crosshair[data-style="dot"] .ch-line {
  display: none;
}

#crosshair.ads-dot-mode .ch-dot {
  width: 3px;
  height: 3px;
  top: -1px;
  left: -1px;
}

#crosshair.over-enemy .ch-line,
#crosshair.over-enemy .ch-dot {
  background: var(--red) !important;
}

#hitmarker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
}

.hm-line {
  position: absolute;
  width: 8px;
  height: 1.5px;
  background: var(--ink);
  box-shadow: 0 0 2px #000;
}

#hitmarker.headshot .hm-line {
  width: 10px;
  background: var(--red);
}

.hm-tl { top: 5px; left: 3px; transform: rotate(45deg); }
.hm-tr { top: 5px; right: 3px; transform: rotate(-45deg); }
.hm-bl { bottom: 5px; left: 3px; transform: rotate(-45deg); }
.hm-br { bottom: 5px; right: 3px; transform: rotate(45deg); }

#enemy-nameplate {
  position: absolute;
  top: calc(50% - 34px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 13.5);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

#kill-confirm-banner {
  position: absolute;
  top: calc(50% + var(--u) * 110);
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(var(--u) * 24);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

/* Action Progress & Pickup Prompt */
#action-progress {
  position: absolute;
  top: calc(50% + var(--u) * 58);
  left: 50%;
  width: calc(var(--u) * 220);
  transform: translateX(-50%);
  text-align: center;
}

#action-label {
  margin-bottom: calc(var(--u) * 5);
  font-size: calc(var(--u) * 16);
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.action-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
}

#action-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--ink);
}

#pickup-prompt {
  position: absolute;
  top: calc(50% + var(--u) * 150);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 14.5);
  font-weight: 500;
  white-space: nowrap;
}

.key-badge {
  min-width: calc(var(--u) * 24);
  padding: calc(var(--u) * 1) calc(var(--u) * 6);
  border: 1px solid var(--ink);
  background: var(--glass);
  font-family: var(--cond);
  font-size: calc(var(--u) * 17);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

/* Queued Banner & Onboarding */
#zone-banner {
  position: absolute;
  top: calc(var(--u) * 146);
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(var(--u) * 21);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

#onboarding-prompt {
  position: absolute;
  bottom: calc(var(--u) * 250);
  left: 50%;
  max-width: calc(var(--u) * 640);
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 14);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-soft);
  animation: hud-fade-in 0.2s ease;
}

/* Field Science card: left edge, clear of the crosshair and minimap */
#field-card {
  position: absolute;
  top: 38%;
  left: calc(var(--u) * 28);
  width: calc(var(--u) * 330);
  padding: calc(var(--u) * 14) calc(var(--u) * 16);
  border-left: 2px solid var(--ink-dim);
  background: rgba(13, 19, 23, 0.72);
  font-family: 'Inter', sans-serif;
  color: var(--ink-soft);
  animation: hud-fade-in 0.2s ease;
}
.field-card-kicker {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: calc(var(--u) * 13);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field-card-title {
  margin-top: calc(var(--u) * 4);
  font-size: calc(var(--u) * 17);
  font-weight: 600;
  color: var(--ink);
}
.field-card-body {
  margin: calc(var(--u) * 6) 0 0;
  font-size: calc(var(--u) * 13.5);
  line-height: 1.45;
}

@keyframes hud-fade-in {
  from { opacity: 0; }
}

#fps-drop-banner {
  position: absolute;
  top: calc(var(--u) * 186);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 14);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 13.5);
  white-space: nowrap;
  pointer-events: auto;
}

#fps-drop-banner button {
  padding: calc(var(--u) * 3) calc(var(--u) * 10);
  border: 1px solid var(--ink);
  background: var(--glass);
  color: var(--ink);
  font-family: var(--cond);
  font-size: calc(var(--u) * 15);
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* Bottom Center Player Status */
#player-hud {
  position: absolute;
  bottom: calc(var(--u) * 30);
  left: 50%;
  width: calc(var(--u) * 416);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.weapon-silhouette {
  display: block;
  color: var(--ink);
  fill: currentColor;
}

#weapon-bar {
  position: absolute;
  bottom: calc(100% + var(--u) * 16);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: calc(var(--u) * 26);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#weapon-bar.show {
  opacity: 1;
  transition-duration: 0.08s;
}

.weapon-slot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "art art art" "key name ammo";
  align-items: baseline;
  column-gap: calc(var(--u) * 6);
  width: calc(var(--u) * 116);
  opacity: 0.56;
  white-space: nowrap;
}

.weapon-slot.active {
  opacity: 1;
}

.slot-key {
  grid-area: key;
  font-size: calc(var(--u) * 15);
  font-weight: 500;
  color: var(--ink-soft);
}

.weapon-slot .weapon-silhouette {
  grid-area: art;
  width: 100%;
  height: calc(var(--u) * 34);
  margin-bottom: calc(var(--u) * 3);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.weapon-slot.empty .weapon-silhouette {
  visibility: hidden;
}

.slot-name {
  grid-area: name;
  font-size: calc(var(--u) * 15);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slot-ammo {
  grid-area: ammo;
  font-size: calc(var(--u) * 15);
  color: var(--ink-soft);
}

#active-weapon-silhouette {
  width: calc(var(--u) * 132);
  height: calc(var(--u) * 40);
  margin-bottom: calc(var(--u) * 3);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

#active-weapon-panel {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: calc(var(--u) * 12);
  margin-bottom: calc(var(--u) * 7);
}

#active-weapon-panel.no-reserve #ammo-reserve,
#active-weapon-panel.no-reserve .ammo-sep {
  visibility: hidden;
}

.status-side {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 12);
  min-width: 0;
}

.status-left {
  justify-content: flex-end;
}

#fire-mode-text {
  font-size: calc(var(--u) * 20);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
}

#ammo-mag {
  min-width: calc(var(--u) * 38);
  font-size: calc(var(--u) * 42);
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.ammo-sep {
  width: 1px;
  height: calc(var(--u) * 18);
  background: var(--ink-dim);
}

#ammo-reserve {
  font-size: calc(var(--u) * 26);
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.76);
}

.status-icon {
  display: block;
  width: calc(var(--u) * 19);
  height: calc(var(--u) * 19);
  color: var(--ink-soft);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.armor-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  padding-bottom: calc(var(--u) * 4);
}

.armor-badge {
  font-size: calc(var(--u) * 14);
  font-weight: 500;
  color: var(--ink-dim);
}

.armor-dur-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
}

#helmet-dur-fill, #vest-dur-fill {
  width: 0%;
  height: 100%;
  background: var(--ink-soft);
}

.consumable-slot {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
}

.item-count {
  font-size: calc(var(--u) * 15);
  font-weight: 500;
  color: var(--ink-dim);
}

.health-bar-wrap {
  position: relative;
  width: 100%;
  height: calc(var(--u) * 16);
  background: rgba(10, 13, 16, 0.5);
  /* Dark rim so a full bar still reads against pale ground */
  box-shadow: 0 0 0 1px rgba(8, 11, 13, 0.7), 0 1px 4px rgba(0, 0, 0, 0.45);
}

#health-bar-lag,
#health-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
}

#health-bar-lag {
  background: rgba(226, 59, 46, 0.78);
}

#health-bar-fill {
  background: #f4f3ef;
}

.health-bar-wrap.low #health-bar-fill {
  background: var(--red);
}

.health-bar-wrap.low #health-bar-lag {
  background: rgba(255, 255, 255, 0.5);
}

/* Bottom Right Map */
#minimap-panel {
  position: absolute;
  right: calc(var(--u) * 36);
  bottom: calc(var(--u) * 30);
  width: calc(var(--u) * 256);
  display: flex;
  flex-direction: column;
}

#stance-indicator {
  position: absolute;
  right: calc(100% + var(--u) * 12);
  bottom: 0;
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 30);
}

#stance-indicator svg {
  display: none;
  width: 100%;
  height: 100%;
  color: var(--ink);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.75));
}

#stance-indicator[data-stance="stand"] svg[data-for="stand"],
#stance-indicator[data-stance="crouch"] svg[data-for="crouch"],
#stance-indicator[data-stance="sprint"] svg[data-for="sprint"],
#stance-indicator[data-stance="parachute"] svg[data-for="parachute"] {
  display: block;
}

#zone-distance-warning {
  margin-bottom: calc(var(--u) * 3);
  font-size: calc(var(--u) * 16);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue-light);
}

#zone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: calc(var(--u) * 3);
}

#zone-timer-text {
  font-size: calc(var(--u) * 18);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

#zone-phase-text {
  font-size: calc(var(--u) * 14);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

#zone-progress {
  height: 3px;
  margin-bottom: calc(var(--u) * 5);
  background: rgba(255, 255, 255, 0.22);
}

#zone-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--blue);
}

#minimap-wrap {
  position: relative;
  width: calc(var(--u) * 256);
  height: calc(var(--u) * 256);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: #18242b;
  overflow: hidden;
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#poi-location-label {
  position: absolute;
  top: calc(var(--u) * 26);
  left: calc(var(--u) * 12);
  right: calc(var(--u) * 12);
  font-size: calc(var(--u) * 20); /* was 46: the name covered half the minimap inside every named area */
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.74);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  animation: hud-fade-in 0.5s ease;
}

/* Modals & Screens */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(6, 9, 11, 0.74);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(6, 9, 11, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.title-backdrop {
  background: linear-gradient(180deg, rgba(6, 9, 11, 0.3) 0%, rgba(6, 9, 11, 0.42) 46%, rgba(6, 9, 11, 0.7) 100%);
  cursor: pointer;
}

.title-center-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  text-align: center;
  text-shadow: var(--shadow);
}

.title-center-card .menu-badge {
  font-size: 16px;
  color: var(--ink);
}

.hero-title {
  font-size: clamp(72px, 12vw, 148px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  margin-right: -0.14em;
  color: var(--ink);
}

.hero-title span, .game-title span {
  color: inherit;
  font-weight: 400;
}

.hero-subtitle {
  max-width: 460px;
  margin: 10px 0 34px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.click-to-start-pill {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--cond);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.menu-card {
  width: min(880px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--sheet);
  border: 1px solid var(--hair);
  padding: 26px 30px;
}

.small-modal-card {
  width: min(360px, 92vw);
}

#in-match-menu-modal .small-modal-card {
  width: min(420px, 92vw);
  max-height: 92vh;
  overflow-y: auto; /* squad and players lists can make it taller than a laptop screen */
}

.vertical-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.lobby-two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}

.lobby-nav-row {
  display: flex;
  gap: 8px;
}

.lobby-nav-row button {
  flex: 1;
}

.challenges-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hair);
}

.challenges-panel-header h3 {
  font-size: 17px;
  color: var(--ink);
}

.challenges-panel-header span {
  font-size: 11px;
  color: var(--ink-faint);
}

.challenges-list {
  display: flex;
  flex-direction: column;
}

.challenge-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
}

.challenge-count {
  flex: none;
  font-family: var(--cond);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.challenge-card.completed .challenge-count {
  color: var(--ink);
}

.challenge-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.challenge-bar-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.55s ease;
}

/* Pick Landing Layout */
.pick-selected {
  font-weight: 600;
  color: var(--ink);
}

.pick-landing-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  margin-top: 12px;
}

.pick-canvas-wrap canvas {
  display: block;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  cursor: crosshair;
}

.pick-poi-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pick-poi-sidebar h3 {
  padding-bottom: 8px;
  font-size: 15px;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--hair);
}

.poi-select-btn {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-soft);
  padding: 10px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.poi-select-btn b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.poi-select-btn small {
  font-size: 11px;
  color: var(--ink-dim);
}

.tier-pill {
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.tier-pill.high { color: var(--ink); font-weight: 600; }
.tier-pill.low { color: var(--ink-faint); }

.pick-timer-pill {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.pick-timer-pill b {
  font-weight: 600;
  color: var(--ink);
}

#confirm-drop-btn {
  flex: none;
  margin-top: auto;
}

/* Death Cam & Victory Overlays */
.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(var(--u) * 96);
  background: linear-gradient(180deg, transparent 58%, rgba(6, 9, 11, 0.62) 100%);
}

.deathcam-card, .victory-banner-card {
  text-align: center;
  font-family: var(--cond);
  color: var(--ink);
  text-shadow: var(--shadow);
}

.deathcam-card h2 {
  margin-top: 2px;
  font-size: calc(var(--u) * 42);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.deathcam-card p {
  margin-top: 4px;
  font-size: calc(var(--u) * 20);
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.victory-banner-card h1 {
  font-size: calc(var(--u) * 72);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* Loading & Common UI */
.loading-card {
  display: flex;
  flex-direction: column;
  width: min(460px, 92vw);
}

.boot-card, #match-loading-screen .loading-card {
  align-items: center;
  text-align: center;
}

.loading-title {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin: 6px 0 8px;
  color: var(--ink);
}

.loading-subtitle {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.loading-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 8px;
}

#loading-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--ink);
  transition: width 0.15s ease;
}

.loading-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--cond);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.tip-box {
  margin-top: 26px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tip-label {
  display: block;
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

.error-box {
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--red);
  font-size: 11.5px;
  line-height: 1.4;
  color: #ffc9c4;
}

.menu-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.menu-badge {
  display: inline-block;
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

.asset-pill {
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

.game-title {
  font-family: var(--cond);
  font-size: 54px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.game-subtitle {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 640px;
  margin-bottom: 4px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.option-group label, .option-label {
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.option-group select, .option-group input[type="text"], #party-code-input {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 8px 10px;
  font-size: 13px;
}

.option-group select {
  width: 100%;
}

.option-group select option {
  background: #12171b;
}

.option-group input[type="range"], .checkbox-row input {
  accent-color: #ffffff;
}

.menu-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-primary {
  flex: 1;
  background: var(--ink-soft);
  color: #0b0f12;
  border: 1px solid var(--ink-soft);
  border-radius: 0;
  padding: 10px 20px;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 7px 14px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.danger-btn {
  border-color: rgba(226, 59, 46, 0.7);
  color: #ffb9b3;
}

/* Name & Party */
.option-group input[type="text"], #party-code-input {
  user-select: text;
  -webkit-user-select: text;
  font-family: inherit;
}

.option-group input[type="text"]:disabled {
  color: var(--ink-faint);
}

.friends-block {
  padding-top: 12px;
  margin-bottom: 14px;
  border-top: 1px solid var(--hair);
}

.friends-block h3 {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.friends-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.friends-or {
  font-size: 12px;
  color: var(--ink-faint);
}

#party-code-input {
  flex: 1;
  min-width: 0;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

#party-room {
  margin-top: 14px;
  padding-top: 12px;
  margin-bottom: 14px;
  border-top: 1px solid var(--hair);
}

.party-code-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.party-code-label {
  display: block;
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

.party-code-value {
  font-family: var(--cond);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.1;
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
}

.party-roster {
  list-style: none;
  margin-top: 10px;
}

.party-roster li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hair);
}

.party-roster li.party-open-seat {
  color: var(--ink-faint);
}

.party-tag {
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.party-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-dim);
}

.party-hint:empty {
  display: none;
}

.party-actions {
  margin-top: 10px;
  margin-bottom: 0;
}

.party-status {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* Inventory & Settings Grids */
.inventory-container {
  width: min(960px, 94vw);
  max-height: 86vh;
  background: var(--sheet);
  border: 1px solid var(--hair);
  padding: 20px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 10px;
}

.inventory-header h2 {
  font-size: 24px;
  color: var(--ink);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 28px;
  overflow-y: auto;
}

.inv-column {
  min-width: 0;
  padding-top: 10px;
}

.inv-column h3 {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hair);
}

.inv-section-gap {
  margin-top: 18px;
}

.inv-list {
  display: flex;
  flex-direction: column;
}

.inv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.inv-item b {
  font-weight: 600;
  color: var(--ink);
}

.inv-item small {
  display: block;
  color: var(--ink-dim);
}

.inv-item.inv-empty {
  color: var(--ink-faint);
}

.inv-weapon {
  flex-wrap: wrap;
}

.inv-weapon .weapon-silhouette {
  flex: 0 0 100%;
  width: 100%;
  height: 36px;
  margin-bottom: 2px;
}

.inv-item button {
  flex: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 3px 9px;
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
  margin-top: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* Full Map */
.fullmap-card {
  width: auto;
  max-width: 96vw;
  display: flex;
  gap: 22px;
  padding: 16px;
  overflow: visible;
}

.fullmap-card .pick-canvas-wrap canvas {
  width: min(84vh, 74vw);
  height: min(84vh, 74vw);
  cursor: default;
}

.fullmap-side {
  display: flex;
  flex-direction: column;
  width: 170px;
}

.fullmap-side h2 {
  font-size: 26px;
  letter-spacing: 0.12em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
}

.map-legend {
  list-style: none;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.legend-line {
  flex: none;
  width: 22px;
  height: 2px;
}

.legend-line.zone { background: var(--blue); }
.legend-line.next { background: var(--ink); }

.legend-mark {
  flex: none;
  width: 22px;
  height: 11px;
  background: var(--ink);
  clip-path: polygon(50% 0, 62% 100%, 50% 80%, 38% 100%);
}

#close-fullmap-btn {
  margin-top: auto;
}

/* Results & Stats */
.gameover-card {
  text-align: left;
}

.rank-badge {
  font-family: var(--cond);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

#gameover-title {
  font-size: 54px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.08;
  color: var(--ink);
}

#gameover-subtitle {
  font-size: 13.5px;
  color: var(--ink-dim);
}

.highlights-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 10px 0 0;
}

.highlight-pill {
  font-family: var(--cond);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 16px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.stat-item {
  padding: 10px 0 10px 14px;
  border-left: 1px solid var(--hair);
}

.stat-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-label {
  display: block;
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-bottom: 2px;
}

.stat-value {
  font-family: var(--cond);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}

.stats-modal-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stats-modal-grid .stat-item:nth-child(5) {
  padding-left: 0;
  border-left: 0;
}

.stats-modal-grid .stat-item:nth-child(n+5) {
  border-top: 1px solid var(--hair);
}

.results-challenges-box {
  text-align: left;
  margin-top: 12px;
}

.results-challenges-box h3 {
  font-size: 15px;
  color: var(--ink-dim);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hair);
}

.controls-card {
  margin-top: 12px;
}

.controls-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
  font-size: 12px;
  color: var(--ink-soft);
}

.controls-columns p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.controls-columns span {
  flex: none;
  min-width: 24px;
  padding: 0 6px;
  border: 1px solid var(--line);
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--ink);
}

.match-preview-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.match-preview-wrap canvas {
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

/* Debug overlay stays hidden until the game writes telemetry into it */
#debug-telemetry:empty { display: none !important; }

/* Hover, press & responsive scaling (1024x640 -> 2560x1440) */
.btn-primary,
.btn-secondary,
.poi-select-btn,
.inv-item button,
#fps-drop-banner button {
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) {
    background: #ffffff;
  }

  .btn-secondary:hover:not(:disabled),
  .inv-item button:hover:not(:disabled),
  #fps-drop-banner button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--ink);
  }

  .poi-select-btn:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.poi-select-btn:active:not(:disabled),
.inv-item button:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.72);
  color: #0b0f12;
}

@media (max-height: 780px), (max-width: 1360px) {
  .menu-card {
    padding: 18px 22px;
    max-height: 94vh;
  }
  .game-title {
    font-size: 42px;
  }
  #gameover-title {
    font-size: 42px;
  }
  .pick-landing-layout {
    grid-template-columns: 320px 1fr;
    gap: 16px;
  }
  .pick-canvas-wrap canvas {
    width: 316px;
    height: 316px;
  }
  .scope-circle {
    width: 400px;
    height: 400px;
  }
  #scope-label {
    bottom: calc(50% - 230px);
  }
}

@media (min-width: 2200px) {
  .menu-card {
    width: min(960px, 90vw);
    padding: 28px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .killfeed-item,
  #onboarding-prompt,
  #field-card,
  #poi-location-label {
    animation-name: none;
  }
  .screen-overlay,
  #weapon-bar {
    transition: none;
  }
}

/* Emote wheel (hold G) */
#emote-wheel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(46vh, 380px);
  height: min(46vh, 380px);
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 11, 13, 0.15) 0 22%, rgba(8, 11, 13, 0.55) 23% 64%, rgba(8, 11, 13, 0) 65%);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#emote-wheel.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.emote-item {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 88px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.emote-item b { font-size: 12px; opacity: 0.7; }
.emote-item.active { color: var(--ink); background: rgba(244, 243, 239, 0.16); box-shadow: 0 0 0 1px rgba(244, 243, 239, 0.5); }
@media (prefers-reduced-motion: reduce) { #emote-wheel { transition: none; } }

/* Character picker (title screen) */
.character-row { display: flex; gap: 12px; align-items: stretch; }
#character-picker { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; align-content: start; }
.character-choice {
  display: flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 6px 10px;
  border: 1px solid rgba(244, 243, 239, 0.18); border-radius: 4px;
  background: rgba(244, 243, 239, 0.04); color: var(--ink-soft);
  font: 500 14px var(--cond); letter-spacing: 0.06em; text-transform: uppercase; text-align: left; cursor: pointer;
}
.character-choice::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 3px;
  background: linear-gradient(135deg, var(--swatch) 0 60%, var(--trim) 60%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.character-choice:hover { background: rgba(244, 243, 239, 0.1); color: var(--ink); }
.character-choice[aria-checked="true"] { border-color: var(--ink); color: var(--ink); background: rgba(244, 243, 239, 0.14); }
.character-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#character-preview { width: 120px; height: 150px; flex: none; }

/* Squad (online): panel in the in-match menu, list on the HUD */
.squad-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  text-align: left;
}

.squad-section h3 {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

#squad-code-input {
  flex: 1;
  min-width: 0;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
}

#squad-room .party-code-value {
  color: var(--squad);
}

#squad-hud {
  position: absolute;
  top: calc(var(--u) * 26);
  left: calc(var(--u) * 30);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 4);
  font-family: var(--cond);
  font-size: calc(var(--u) * 20);
  text-shadow: var(--shadow);
}

#squad-hud li {
  display: flex;
  gap: calc(var(--u) * 10);
  align-items: baseline;
  color: var(--squad);
}

#squad-hud li .sq-dist {
  font-size: calc(var(--u) * 16);
  color: var(--ink-dim);
}

#squad-hud li.sq-down {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.squad-section .players-title {
  margin-top: 14px;
}

.players-row-actions {
  display: flex;
  gap: 6px;
}

.players-row-actions button {
  font-size: 12px;
  padding: 2px 8px;
}

/* Chat: bottom left, above the health bar line */
#chat-box {
  position: absolute;
  left: calc(var(--u) * 30);
  bottom: calc(var(--u) * 150);
  width: calc(var(--u) * 520);
  font-family: 'Inter', sans-serif;
  font-size: calc(var(--u) * 17);
  text-shadow: var(--shadow);
}

#chat-log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 3);
}

#chat-log li {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  transition: opacity 1s ease;
}

#chat-log li.chat-old {
  opacity: 0;
}

#chat-box.chat-open #chat-log li.chat-old {
  opacity: 0.8;
}

#chat-log .chat-name {
  font-weight: 600;
  margin-right: 6px;
}

#chat-log .chat-tag {
  font-family: var(--cond);
  color: var(--ink-dim);
  margin-right: 6px;
}

#chat-log .chat-squad .chat-name,
#chat-log .chat-squad .chat-tag {
  color: var(--squad);
}

#chat-log .chat-system {
  color: var(--ink-dim);
  font-style: italic;
}

#chat-entry {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  margin-top: calc(var(--u) * 6);
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: calc(var(--u) * 4) calc(var(--u) * 8);
}

#chat-channel {
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  min-width: 5em;
}

#chat-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  outline: none;
}

#voice-indicator {
  position: absolute;
  left: calc(var(--u) * 30);
  bottom: calc(var(--u) * 118);
  font-family: var(--cond);
  font-size: calc(var(--u) * 18);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--squad);
  text-shadow: var(--shadow);
}
