:root {
  --cyan: #ffcf85;
  --green: #a6e06a;
  --pink: #ff5a4a;
  --amber: #ffb545;
  --ink: #0c0a08;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Consolas", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--ink); }
body { font-family: var(--font); color: #fff; user-select: none; -webkit-user-select: none; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }

#hud {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ---------- static + dynamic vignettes ---------- */
#vignette {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(0, 0, 0, 0.35);
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
}
#dmg-vignette {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(255, 20, 40, 0.55) 100%);
  transition: opacity 0.08s linear;
}
/* time-warp (kill slow-mo) cue: a cool blue vignette + faint scanlines */
#timewarp {
  position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(125, 200, 255, 0.05) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, transparent 30%, rgba(70, 150, 255, 0.5) 100%);
}

/* ---------- ADS (iron sights) darkening ---------- */
#ads-vignette {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 26%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.8) 100%);
  transition: opacity 0.09s linear;
}

/* ---------- dash speed-lines (radial motion streaks) ---------- */
#dash-lines {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(230, 244, 255, 0) 0deg 3.4deg, rgba(220, 240, 255, 0.22) 3.4deg 4deg);
  -webkit-mask: radial-gradient(ellipse at center, transparent 38%, #000 74%);
          mask: radial-gradient(ellipse at center, transparent 38%, #000 74%);
}

/* ---------- finisher flash (execution pop) ---------- */
#finisher-flash {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse at center, rgba(255, 242, 205, 0.55) 0%, rgba(255, 176, 84, 0.28) 45%, transparent 74%);
}

/* ---------- crosshair ---------- */
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: opacity 0.1s linear; }
#crosshair.ads { opacity: 0.12; }
#crosshair .ch-dot {
  position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; border-radius: 50%;
  background: var(--cyan); transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--cyan);
}
#crosshair .ch.line {
  position: absolute; left: 50%; top: 50%; background: #eaffff;
  box-shadow: 0 0 5px rgba(125, 249, 255, 0.9); border-radius: 2px;
}
#crosshair .top, #crosshair .bottom { width: 2px; height: 8px; }
#crosshair .left, #crosshair .right { width: 8px; height: 2px; }

#crosshair .ch-hit {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px;
  transform: translate(-50%, -50%) scale(0.6); opacity: 0;
}
#crosshair .ch-hit::before, #crosshair .ch-hit::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 3px;
  background: #fff; border-radius: 2px; box-shadow: 0 0 6px #fff;
}
#crosshair .ch-hit::before { transform: translate(-50%, -50%) rotate(45deg); }
#crosshair .ch-hit::after { transform: translate(-50%, -50%) rotate(-45deg); }
#crosshair .ch-hit.show { animation: hitpop 0.32s ease-out forwards; }
#crosshair .ch-hit.head::before, #crosshair .ch-hit.head::after { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
#crosshair .ch-hit.kill { width: 30px; height: 30px; }
#crosshair .ch-hit.kill::before, #crosshair .ch-hit.kill::after { background: var(--pink); box-shadow: 0 0 10px var(--pink); width: 16px; height: 4px; }
@keyframes hitpop {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
}

/* ---------- hit flash (sharp punch when you take damage) ---------- */
#hit-flash {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255, 30, 50, 0.25) 0%, rgba(255, 0, 30, 0.6) 70%, rgba(180, 0, 20, 0.85) 100%);
}

/* ---------- directional damage indicators ---------- */
#hit-dir-layer { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.hit-dir {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  border-left: 34px solid transparent; border-right: 34px solid transparent;
  border-bottom: 44px solid rgba(255, 45, 70, 0.92);
  filter: drop-shadow(0 0 14px rgba(255, 40, 60, 0.95));
}

/* ---------- supply waypoint marker ---------- */
#waypoint {
  position: absolute; left: 0; top: 0; display: none; z-index: 6;
  flex-direction: column; align-items: center; gap: 2px; pointer-events: none;
  color: #7df9ff; font-family: var(--mono); font-weight: 800;
  text-shadow: 0 0 10px rgba(125, 249, 255, 0.9);
  filter: drop-shadow(0 0 6px rgba(125, 249, 255, 0.7));
}
#waypoint.show { display: flex; }
#waypoint-icon { font-size: 22px; line-height: 1; }
#waypoint-dist { font-size: 13px; letter-spacing: 0.06em; }
#waypoint.edge #waypoint-dist { display: none; }

/* ---------- popups (floating numbers) ---------- */
#popup-layer { position: absolute; inset: 0; }
.popup {
  position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 800;
  font-size: 22px; will-change: transform, opacity; white-space: nowrap;
}
.popup.dmg { color: #ffffff; font-size: 20px; }
.popup.dmg.head { color: var(--amber); font-size: 30px; text-shadow: 0 0 10px rgba(255, 194, 74, 0.8); }
.popup.dmg.dash { color: #fff; font-size: 26px; text-shadow: 0 0 12px rgba(255, 176, 84, 0.9); }
.popup.dmg.slow { color: #9fe8ff; text-shadow: 0 0 12px rgba(124, 196, 255, 0.9); }
.popup.dmg.slow.head { color: #cdeeff; }
.popup.score { color: var(--green); font-size: 24px; text-shadow: 0 0 10px rgba(58, 255, 192, 0.7); }
.popup.finisher { color: var(--amber); font-size: 30px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 0 16px rgba(255, 176, 84, 0.95); }
.popup.ammo { color: var(--amber); font-size: 19px; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 181, 69, 0.75); }

/* ---------- bottom HUD ---------- */
#hud-bottom-left { position: absolute; left: 32px; bottom: 28px; }
#health-wrap { display: flex; align-items: center; gap: 12px; }
#health-icon { color: var(--green); font-size: 26px; filter: drop-shadow(0 0 6px var(--green)); }
#health-bar {
  width: 240px; height: 16px; background: rgba(10, 16, 24, 0.7);
  border: 1px solid rgba(125, 249, 255, 0.35); border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}
#health-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width 0.18s ease-out; }
#health-num { font-family: var(--mono); font-size: 30px; font-weight: 800; min-width: 56px; }
#health-wrap.pulse #health-icon { animation: hurt 0.3s ease-out; }
@keyframes hurt { 0% { transform: scale(1.6); color: #fff; } 100% { transform: scale(1); } }
#health-wrap.hit { animation: hitshake 0.32s ease-out; }
#health-wrap.hit #health-bar { animation: hitbar 0.32s ease-out; }
@keyframes hitshake { 0% { transform: translateX(-5px); } 25% { transform: translateX(5px); } 50% { transform: translateX(-3px); } 100% { transform: translateX(0); } }
@keyframes hitbar { 0% { border-color: #fff; box-shadow: 0 0 22px rgba(255, 40, 60, 0.9); } 100% { border-color: rgba(125, 249, 255, 0.35); } }

#hud-bottom-right { position: absolute; right: 32px; bottom: 28px; text-align: right; }
#weapon-name { font-size: 15px; letter-spacing: 3px; color: var(--cyan); opacity: 0.85; margin-bottom: 2px; }
#ammo { font-family: var(--mono); font-weight: 800; line-height: 1; }
#ammo.gain { animation: ammogain 0.5s ease-out; }
@keyframes ammogain {
  0% { color: var(--amber); text-shadow: 0 0 18px var(--amber); }
  100% { color: inherit; text-shadow: none; }
}
#ammo-mag { font-size: 52px; }
#ammo-mag.empty { color: var(--pink); }
#ammo-sep { font-size: 30px; opacity: 0.5; margin: 0 4px; }
#ammo-reserve { font-size: 30px; opacity: 0.7; }
#reload-bar {
  margin-top: 6px; margin-left: auto; width: 150px; height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.15); overflow: hidden; opacity: 0; transition: opacity 0.15s;
}
#reload-bar.show { opacity: 1; }
#reload-fill { height: 100%; width: 0%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
#grenades {
  margin-top: 8px; font-family: var(--mono); font-weight: 800; font-size: 20px;
  color: #ffb060; display: flex; align-items: center; justify-content: flex-end; gap: 5px;
}
#gren-icon { font-size: 18px; text-shadow: 0 0 10px #ff7a2a; }
#gren-key {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #0c0c10;
  background: #ffb060; border-radius: 4px; padding: 1px 5px; margin-left: 3px;
}
#grenades.empty { color: rgba(255,255,255,0.35); }
#grenades.empty #gren-icon { text-shadow: none; }
#grenades.empty #gren-key { background: rgba(255,255,255,0.25); }

/* tree-cache counter — banked loot waiting up in the great tree */
#cache {
  margin-top: 6px; font-family: var(--mono); font-weight: 800; font-size: 18px;
  color: #7df9ff; display: none; align-items: center; justify-content: flex-end; gap: 5px;
  text-shadow: 0 0 10px rgba(125, 249, 255, 0.7);
}
#cache.show { display: flex; }
#cache-icon { font-size: 15px; }
#cache-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #0c0c10;
  background: #7df9ff; border-radius: 4px; padding: 1px 5px; margin-left: 3px;
}
#cache.full { animation: cache-pulse 0.9s ease-in-out infinite; }
@keyframes cache-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- top stats ---------- */
#hud-top { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 46px; }
.stat { text-align: center; }
.stat-label { font-size: 11px; letter-spacing: 3px; opacity: 0.55; }
.stat-val { font-family: var(--mono); font-size: 28px; font-weight: 800; }
#score { color: var(--green); }
#enemies { color: var(--pink); }

/* ---------- combo + banner + low-ammo ---------- */
#combo {
  position: absolute; top: 33%; left: 50%; transform: translateX(-50%) scale(0.5);
  font-family: var(--mono); font-weight: 900; font-size: 40px; color: var(--amber);
  opacity: 0; text-shadow: 0 0 16px rgba(255, 194, 74, 0.9);
}
#combo.show { animation: combopop 0.9s ease-out; }
@keyframes combopop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.4) rotate(-8deg); }
  20% { opacity: 1; transform: translateX(-50%) scale(1.25) rotate(3deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(1) rotate(0); }
}

#banner {
  position: absolute; top: 24%; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0;
}
#banner-main { font-size: 54px; font-weight: 900; letter-spacing: 6px; text-shadow: 0 0 24px currentColor; }
#banner-sub { font-size: 18px; letter-spacing: 4px; opacity: 0.8; margin-top: 4px; }
#banner.show { animation: banner 2.6s ease-out forwards; }
@keyframes banner {
  0% { opacity: 0; transform: translateX(-50%) scale(1.3); letter-spacing: 14px; }
  12% { opacity: 1; transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(0.96); }
}

#grind-ind {
  position: absolute; left: 50%; top: 62%; transform: translateX(-50%) scale(0.9);
  font-weight: 900; letter-spacing: 4px; font-size: 20px; color: var(--cyan);
  text-shadow: 0 0 16px rgba(125, 249, 255, 0.9); opacity: 0; transition: opacity 0.1s, transform 0.1s;
}
#grind-ind.show { opacity: 1; transform: translateX(-50%) scale(1); }
#grind-ind b { font-family: var(--mono); color: #fff; }

/* ---------- slow-mo meter ---------- */
#slowmo-meter {
  position: absolute; left: 50%; bottom: 108px; transform: translateX(-50%);
  width: 132px; height: 7px; border-radius: 4px; overflow: hidden;
  background: rgba(10, 20, 34, 0.55); box-shadow: inset 0 0 0 1px rgba(120, 200, 255, 0.3);
  opacity: 0.6; transition: opacity 0.15s, transform 0.15s;
}
#slowmo-meter.active { opacity: 1; transform: translateX(-50%) scaleY(1.5); }
#slowmo-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #4aa8ff, #9fe0ff);
  box-shadow: 0 0 12px rgba(120, 200, 255, 0.85); transition: width 0.08s linear;
}
#slowmo-meter.empty #slowmo-fill { background: rgba(120, 140, 160, 0.4); box-shadow: none; }
#slowmo-label {
  position: absolute; left: 50%; top: -16px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: rgba(159, 224, 255, 0.7);
  opacity: 0; transition: opacity 0.15s;
}
#slowmo-meter.active #slowmo-label { opacity: 1; }

/* ---------- dash-charge meter ---------- */
#dash-meter {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%);
  display: flex; gap: 9px; opacity: 0.7; transition: opacity 0.12s, transform 0.12s;
}
#dash-meter.active { opacity: 1; transform: translateX(-50%) scale(1.12); }
#dash-meter i {
  position: relative; display: block; width: 34px; height: 6px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.1); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 181, 69, 0.3);
}
#dash-meter i::before {
  content: ""; position: absolute; inset: 0; width: var(--fillPct, 0%);
  background: rgba(255, 181, 69, 0.55);
}
#dash-meter i.full::before {
  width: 100%; background: linear-gradient(90deg, var(--amber), var(--cyan));
  box-shadow: 0 0 12px rgba(255, 181, 69, 0.9);
}

/* ---------- boss health bar ---------- */
#boss-bar {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%) translateY(-12px);
  width: min(620px, 70vw); text-align: center; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#boss-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#boss-name {
  font-family: var(--font); font-weight: 900; letter-spacing: 6px; font-size: 18px;
  color: #ff7a4a; text-shadow: 0 0 16px rgba(255, 68, 22, 0.8); margin-bottom: 6px;
}
#boss-track {
  height: 14px; background: rgba(20, 8, 6, 0.72); border: 1px solid rgba(255, 90, 50, 0.5);
  border-radius: 3px; overflow: hidden; box-shadow: 0 0 20px rgba(255, 60, 20, 0.4);
}
#boss-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #ff3311, #ff8a2a);
  box-shadow: 0 0 14px rgba(255, 100, 40, 0.9); transition: width 0.12s linear;
}

#low-ammo {
  position: absolute; left: 50%; top: 58%; transform: translateX(-50%);
  font-weight: 800; letter-spacing: 4px; color: var(--pink); opacity: 0;
  text-shadow: 0 0 12px var(--pink);
}
#low-ammo.show { opacity: 1; animation: blink 0.7s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- overlay / menus ---------- */
#overlay {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10, 14, 26, 0.72), rgba(3, 4, 10, 0.92));
  backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s ease; visibility: hidden;
}
#overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }

/* --- upgrade picker (between waves) --- */
#upgrade-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10, 14, 26, 0.6), rgba(3, 4, 10, 0.86));
  backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease; visibility: hidden; z-index: 20;
}
#upgrade-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
#upgrade-inner { text-align: center; }
#upgrade-eyebrow { font-size: 14px; letter-spacing: 6px; color: var(--lime, #b6f36a); opacity: 0.85; margin-bottom: 6px; }
#upgrade-title { font-size: 34px; font-weight: 900; letter-spacing: 4px; margin-bottom: 26px; color: #fff; }
#upgrade-cards { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.upgrade-card {
  position: relative; width: 210px; min-height: 210px; padding: 24px 20px 20px;
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.82), rgba(8, 10, 20, 0.82));
  border: 1.5px solid color-mix(in srgb, var(--uc) 45%, transparent); border-radius: 14px;
  color: #fff; font-family: inherit; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.upgrade-card:hover, .upgrade-card:focus {
  transform: translateY(-6px) scale(1.03); outline: none;
  border-color: var(--uc); box-shadow: 0 0 40px color-mix(in srgb, var(--uc) 40%, transparent);
}
.uc-key {
  position: absolute; top: 10px; left: 12px; width: 22px; height: 22px; border-radius: 6px;
  font-size: 13px; font-weight: 800; line-height: 22px; color: #0c0c10; background: var(--uc);
}
.uc-icon { font-size: 52px; line-height: 1; margin: 8px 0 12px; color: var(--uc); text-shadow: 0 0 20px var(--uc); }
.uc-name { font-size: 20px; font-weight: 800; letter-spacing: 2px; margin-bottom: 8px; }
.uc-desc { font-size: 13px; opacity: 0.82; letter-spacing: 1px; line-height: 1.4; }
.uc-stack {
  position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; color: var(--uc); opacity: 0.9;
}
#overlay-card {
  text-align: center; padding: 48px 56px; max-width: 640px;
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.7), rgba(8, 10, 20, 0.7));
  border: 1px solid rgba(125, 249, 255, 0.25); border-radius: 16px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(60, 120, 255, 0.06);
}
#overlay-card.dead { border-color: rgba(255, 58, 107, 0.4); }
#game-title { font-size: 66px; font-weight: 900; letter-spacing: 8px; line-height: 1; }
#game-title span { color: var(--cyan); text-shadow: 0 0 28px rgba(125, 249, 255, 0.7); }
#overlay-card.dead #game-title { color: var(--pink); text-shadow: 0 0 28px rgba(255, 58, 107, 0.6); }
#game-tag { margin-top: 10px; opacity: 0.6; letter-spacing: 3px; font-size: 14px; }

#play-btn {
  margin-top: 28px; pointer-events: auto; cursor: pointer;
  font-family: var(--font); font-weight: 800; letter-spacing: 3px; font-size: 20px; color: var(--ink);
  background: linear-gradient(90deg, var(--green), var(--cyan)); border: none; border-radius: 8px;
  padding: 16px 40px; box-shadow: 0 0 28px rgba(125, 249, 255, 0.4); transition: transform 0.12s, box-shadow 0.12s;
}
#play-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 40px rgba(125, 249, 255, 0.7); }
#play-btn:active { transform: scale(0.98); }

#controls {
  margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px;
  font-size: 13px; opacity: 0.7; text-align: left;
}
#controls b { color: var(--cyan); font-family: var(--mono); }
#controls .wide { grid-column: 1 / -1; margin-top: 4px; opacity: 0.85; }
#controls .wide b { color: var(--amber); }

.result { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; margin: 28px 0 8px; }
.result > div { display: flex; flex-direction: column; }
.result span { font-family: var(--mono); font-size: 40px; font-weight: 900; color: var(--cyan); }
.result > div { font-size: 12px; letter-spacing: 3px; opacity: 0.6; }
.result > div span { letter-spacing: 0; }

/* best score + new-best */
#best-line { margin-top: 12px; font-family: var(--mono); font-size: 14px; letter-spacing: 2px; color: var(--amber); opacity: 0.85; }
.newbest { font-weight: 900; letter-spacing: 4px; color: var(--amber); font-size: 22px; text-shadow: 0 0 18px rgba(255, 194, 74, 0.8); animation: combopop 0.9s ease-out; }
.prevbest { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; opacity: 0.5; }

/* ---------- touch controls (mobile) ---------- */
#touch-controls { display: none; }
#hud.touch-mode #touch-controls { display: block; }
#move-stick {
  position: absolute; left: 0; top: 0; width: 130px; height: 130px; margin: -65px 0 0 -65px;
  border-radius: 50%; border: 2px solid rgba(125, 249, 255, 0.35);
  background: radial-gradient(circle, rgba(125, 249, 255, 0.08), transparent 70%);
  opacity: 0; pointer-events: none; transition: opacity 0.1s;
}
#move-knob {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(125, 249, 255, 0.3); border: 2px solid rgba(125, 249, 255, 0.7);
  box-shadow: 0 0 16px rgba(125, 249, 255, 0.5);
}
.tbtn {
  position: absolute; pointer-events: auto; -webkit-tap-highlight-color: transparent; touch-action: none;
  font-family: var(--font); font-weight: 800; letter-spacing: 1px; color: #eafcff;
  background: rgba(10, 16, 24, 0.4); border: 2px solid rgba(125, 249, 255, 0.45);
  border-radius: 50%; backdrop-filter: blur(2px); user-select: none;
}
.tbtn.active { background: rgba(125, 249, 255, 0.3); transform: scale(0.94); }
#touch-fire { right: 30px; bottom: 34px; width: 96px; height: 96px; font-size: 16px; border-color: rgba(255, 58, 107, 0.6); }
#touch-fire.active { background: rgba(255, 58, 107, 0.35); }
#touch-jump { right: 140px; bottom: 40px; width: 72px; height: 72px; font-size: 13px; }
#touch-dash { right: 44px; bottom: 142px; width: 68px; height: 68px; font-size: 13px; border-color: rgba(255, 181, 69, 0.6); }
#touch-dash.active { background: rgba(255, 181, 69, 0.32); }
#touch-aim { right: 150px; bottom: 132px; width: 62px; height: 62px; font-size: 12px; }
#touch-pause { right: 18px; top: 16px; width: 48px; height: 48px; font-size: 14px; }

/* keep the ammo readout clear of the fire/jump/reload buttons on mobile */
#hud.touch-mode #hud-bottom-right { bottom: 224px; right: 22px; }
#hud.touch-mode #ammo-mag { font-size: 40px; }
#hud.touch-mode #ammo-sep, #hud.touch-mode #ammo-reserve { font-size: 22px; }
#hud.touch-mode #hud-bottom-left { bottom: 20px; left: 20px; }
#hud.touch-mode #health-bar { width: 150px; }
