/* ==========================================================================
   DEAD SECTOR // РўСЂРё СѓР»РёС†С‹ вЂ” interface
   ========================================================================== */
@font-face {
  font-family: 'Oswald XYT0P';
  font-style: normal;
  font-weight: 500;
  src: url('../assets/fonts/oswald-cyr-500.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald XYT0P';
  font-style: normal;
  font-weight: 700;
  src: url('../assets/fonts/oswald-cyr-700.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald XYT0P';
  font-style: normal;
  font-weight: 700;
  src: url('../assets/fonts/oswald-lat-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains XYT0P';
  font-style: normal;
  font-weight: 500;
  src: url('../assets/fonts/jetbrains-cyr-500.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains XYT0P';
  font-style: normal;
  font-weight: 500;
  src: url('../assets/fonts/jetbrains-lat-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

:root {
  --bg: #080a0a;
  --panel: rgba(10, 13, 13, .86);
  --panel-2: rgba(16, 20, 19, .9);
  --line: rgba(174, 194, 178, .2);
  --line-bright: rgba(197, 220, 198, .42);
  --text: #d9ded5;
  --muted: #8d998d;
  --dim: #5c665d;
  --amber: #e9ad4f;
  --amber-hot: #ffd57e;
  --teal: #67ddc8;
  --teal-dim: #2a8076;
  --blood: #be4433;
  --danger: #e3533d;
  --green: #8ec66a;
  --font-display: 'Oswald XYT0P', 'Arial Narrow', Impact, sans-serif;
  --font-mono: 'JetBrains XYT0P', Consolas, 'Courier New', monospace;
  --frame: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  --frame-sm: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: var(--bg); color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}
body { cursor: default; }
button { font-family: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }
input[type=range] { accent-color: var(--amber); }
kbd {
  display: inline-flex; min-width: 22px; height: 20px; align-items: center; justify-content: center;
  padding: 0 5px; border: 1px solid rgba(196, 214, 196, .32); border-bottom-color: rgba(196, 214, 196, .12);
  background: rgba(255, 255, 255, .04); color: var(--text); font-family: var(--font-mono);
  font-size: 10px; line-height: 1; border-radius: 1px; letter-spacing: .02em;
}
.hidden { display: none !important; }
#game-root { position: fixed; inset: 0; overflow: hidden; background: #050606; }

/* -------------------------------------------------------------------------- */
/* Canvas + post fx                                                           */
/* -------------------------------------------------------------------------- */
#game-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; image-rendering: pixelated; image-rendering: crisp-edges;
  outline: none; background: #050606;
}
body.fallback-look #game-canvas { cursor: none; }
#post-fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.fx-vignette {
  position: absolute; inset: -1px;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.18) 72%, rgba(0,0,0,.66) 100%),
    linear-gradient(90deg, rgba(255,106,48,.035), transparent 18%, transparent 82%, rgba(63,201,190,.035));
}
.fx-scanlines {
  position: absolute; inset: 0; opacity: .21; mix-blend-mode: multiply;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0, 0, 0, .58) 3px, transparent 4px);
  background-size: 100% 4px;
}
.fx-grain {
  position: absolute; inset: -30%; opacity: .055; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 65%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 48% 80%, #fff 0 1px, transparent 1.5px);
  background-size: 23px 27px, 31px 19px, 17px 37px;
  animation: grainShift .28s steps(2) infinite;
}
.fx-chroma { position: absolute; inset: 0; box-shadow: inset 0 0 80px rgba(0,0,0,.58); }
@keyframes grainShift {
  0% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(-7px,4px,0); }
  50% { transform: translate3d(5px,-6px,0); }
  75% { transform: translate3d(-3px,-2px,0); }
  100% { transform: translate3d(6px,5px,0); }
}
#damage-vignette {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(132, 10, 6, .32) 77%, rgba(105, 4, 3, .82) 100%);
  transition: opacity .12s linear;
}
#hit-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: rgba(255, 230, 184, .3); }
#low-health {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 150px rgba(152, 13, 8, .72);
  animation: lowPulse 1.6s ease-in-out infinite;
}
@keyframes lowPulse { 0%,100% { opacity: .16; } 50% { opacity: .58; } }

/* -------------------------------------------------------------------------- */
/* HUD                                                                        */
/* -------------------------------------------------------------------------- */
#hud { position: absolute; inset: 0; z-index: 8; pointer-events: none; color: var(--text); }
.hud-top {
  position: absolute; top: 18px; left: 20px; right: 20px;
  display: grid; grid-template-columns: minmax(210px, 250px) 1fr minmax(210px, 250px);
  align-items: start; gap: 24px;
}
.hud-panel {
  background: linear-gradient(160deg, rgba(12, 16, 15, .9), rgba(8, 11, 11, .68));
  border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(3px);
  clip-path: var(--frame-sm);
  position: relative;
}
.hud-panel::after {
  content: ''; position: absolute; left: 0; top: 0; width: 45px; height: 1px; background: var(--amber); opacity: .75;
}
.panel-cap {
  display: flex; align-items: center; gap: 7px; height: 25px; padding: 0 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted);
  border-bottom: 1px solid rgba(174,194,178,.12);
}
.cap-dot, .live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.map-clock { margin-left: auto; color: var(--dim); }
.minimap-panel { height: 254px; overflow: hidden; }
#minimap { display: block; width: 100%; height: 194px; }
.minimap-legend {
  display: flex; justify-content: space-between; padding: 5px 10px 8px;
  font-family: var(--font-mono); font-size: 9px; color: var(--dim); letter-spacing: .06em;
}
.minimap-legend span { display: flex; align-items: center; gap: 4px; }
.lg { width: 5px; height: 5px; display: inline-block; border-radius: 50%; }
.lg-player { background: var(--amber-hot); box-shadow: 0 0 6px var(--amber); }
.lg-zombie { background: var(--danger); }
.lg-ally { background: var(--teal); }

/* Level objective ---------------------------------------------------------- */
.objective-panel {
  position: absolute; left: 20px; top: 282px; width: 250px; padding: 10px 12px 11px;
  border-color: rgba(233,173,79,.3);
  background: linear-gradient(155deg, rgba(17,20,16,.94), rgba(8,11,10,.8));
}
.objective-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.objective-kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: .13em; color: var(--amber); }
.objective-ready { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .06em; white-space: nowrap; opacity: 0; transition: opacity .25s; }
.objective-ready.on { opacity: 1; color: var(--teal); animation: blink 1.2s steps(2) infinite; }
.objective-title { font-size: 20px; letter-spacing: .08em; color: #eee5d2; line-height: 1.05; margin-top: 4px; }
.objective-sub { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .04em; margin: 4px 0 7px; }
.objective-progress { height: 4px; background: rgba(210,230,210,.1); border: 1px solid rgba(174,194,178,.1); }
.objective-progress span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal-dim), var(--teal)); box-shadow: 0 0 7px rgba(103,221,200,.4); transition: width .3s ease; }
.objective-money { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; font-family: var(--font-mono); }
.objective-money b { font-size: 17px; font-weight: 500; color: var(--amber-hot); }
.objective-money span { font-size: 9.5px; color: var(--dim); }
.objective-money em { font-style: normal; font-size: 8.5px; color: var(--dim); letter-spacing: .08em; margin-left: auto; }
.objective-panel.ready { border-color: rgba(103,221,200,.45); box-shadow: 0 0 24px rgba(103,221,200,.08), inset 0 1px rgba(255,255,255,.04); }
.objective-panel.ready .objective-progress span { background: linear-gradient(90deg, var(--teal), #bbfff2); }

.wave-panel {
  justify-self: center; width: min(470px, 100%); padding: 9px 24px 10px; text-align: center;
  background: linear-gradient(180deg, rgba(7,10,10,.88), rgba(7,10,10,.46));
  border-top: 1px solid rgba(233,173,79,.3);
  border-bottom: 1px solid rgba(174,194,178,.1);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 22px 100%, 0 50%);
  position: relative;
}
.wave-panel::before, .wave-panel::after {
  content: ''; position: absolute; top: 0; width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent); left: 20%; opacity: .55;
}
.wave-kicker { font-family: var(--font-mono); color: var(--amber); font-size: 9.5px; letter-spacing: .28em; margin-bottom: 2px; text-shadow: 0 0 12px rgba(233,173,79,.38); }
.wave-main { display: flex; align-items: baseline; justify-content: center; gap: 8px; line-height: .95; }
.wave-label { font-size: 12px; letter-spacing: .24em; color: var(--muted); }
.wave-number { font-size: 46px; font-weight: 700; letter-spacing: .03em; color: #f2e8d4; text-shadow: 0 2px 0 #000, 0 0 18px rgba(233,173,79,.18); }
.wave-total { font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.wave-progress { height: 3px; margin: 4px 0 5px; background: rgba(220,235,220,.09); position: relative; overflow: hidden; }
.wave-progress span { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--teal-dim), var(--teal)); box-shadow: 0 0 9px rgba(103,221,200,.48); transition: width .25s ease; }
.wave-status { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--dim); }
#wave-status-text { color: var(--muted); }
#wave-enemies { color: var(--amber); }
.street-alert { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.street-alert span {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; color: var(--dim);
  padding: 2px 7px; border: 1px solid rgba(174,194,178,.09); background: rgba(255,255,255,.015);
  transition: color .18s, border-color .18s, background .18s;
}
.street-alert span.hot { color: #ffd7c8; border-color: rgba(227,83,61,.48); background: rgba(227,83,61,.13); animation: streetHot 1.2s ease-in-out infinite; }
.street-alert span.covered { color: var(--teal); border-color: rgba(103,221,200,.28); background: rgba(103,221,200,.06); }
@keyframes streetHot { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

.economy-panel { justify-self: end; width: 100%; min-height: 122px; padding: 11px 13px 9px; }
.coin-line { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(174,194,178,.12); padding-bottom: 8px; }
.coin-glyph { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #f5d077; background: radial-gradient(circle at 38% 34%, #ffe6a1, #c5872c 58%, #6e4412 100%); box-shadow: 0 0 12px rgba(233,173,79,.42); position: relative; flex: 0 0 auto; }
.coin-glyph i { position: absolute; inset: 5px; border-radius: 50%; border: 1px solid rgba(72,42,4,.6); }
.coin-glyph.small { width: 16px; height: 16px; }
#coin-count { font-family: var(--font-mono); font-size: 25px; font-weight: 500; color: var(--amber-hot); text-shadow: 0 0 14px rgba(233,173,79,.35); letter-spacing: -.04em; }
.coin-label { font-family: var(--font-mono); font-size: 9px; color: var(--dim); letter-spacing: .12em; margin-top: 5px; }
.stat-line { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--dim); padding-top: 5px; }
.stat-line b { color: var(--muted); font-weight: 500; }
.micro-btn { position: absolute; right: 9px; bottom: 7px; width: 20px; height: 20px; border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 10px; pointer-events: auto; }
.micro-btn:hover { border-color: var(--amber); color: var(--amber); }

#boss-wrap {
  position: absolute; top: 154px; left: 50%; transform: translateX(-50%);
  width: min(640px, 58vw); z-index: 2;
}
.boss-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 4px; text-shadow: 0 2px 4px #000; }
#boss-tag { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; color: var(--danger); }
#boss-name { font-size: 16px; letter-spacing: .17em; color: #f4e2d2; flex: 1; text-align: center; }
#boss-hp-text { font-family: var(--font-mono); font-size: 10px; color: var(--danger); }
.boss-track { height: 7px; border: 1px solid rgba(227,83,61,.36); padding: 1px; background: rgba(0,0,0,.4); position: relative; }
.boss-track span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #6e1b12, #d2442e 60%, #ff8b5f); box-shadow: 0 0 12px rgba(227,83,61,.4); transition: width .14s linear; }
.boss-track i { position: absolute; inset: -3px; border-left: 1px solid rgba(227,83,61,.3); border-right: 1px solid rgba(227,83,61,.3); pointer-events: none; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; --spread: 9px; }
.ch-line { position: absolute; background: rgba(240, 245, 232, .78); box-shadow: 0 0 3px rgba(0,0,0,.9); }
.ch-top, .ch-bottom { width: 1px; height: 7px; left: -.5px; }
.ch-left, .ch-right { height: 1px; width: 7px; top: -.5px; }
.ch-top { transform: translateY(calc(-1 * var(--spread) - 7px)); }
.ch-bottom { transform: translateY(var(--spread)); }
.ch-left { transform: translateX(calc(-1 * var(--spread) - 7px)); }
.ch-right { transform: translateX(var(--spread)); }
.ch-dot { position: absolute; width: 2px; height: 2px; background: rgba(255, 206, 122, .9); left: -1px; top: -1px; border-radius: 50%; box-shadow: 0 0 5px rgba(233,173,79,.8); }
#crosshair.aim .ch-line { background: var(--amber-hot); }
#crosshair.enemy .ch-line { background: #ff7359; }
#hitmarker { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; }
#hitmarker i { position: absolute; width: 7px; height: 1px; background: #fff; transform-origin: center; box-shadow: 0 0 3px rgba(0,0,0,.9); }
#hitmarker i:nth-child(1) { transform: translate(-9px,-9px) rotate(45deg); }
#hitmarker i:nth-child(2) { transform: translate(2px,-9px) rotate(-45deg); }
#hitmarker i:nth-child(3) { transform: translate(-9px,8px) rotate(-45deg); }
#hitmarker i:nth-child(4) { transform: translate(2px,8px) rotate(45deg); }
#hitmarker.show { animation: hitPop .22s ease-out; }
#hitmarker.crit i { background: var(--amber-hot); height: 2px; }
@keyframes hitPop { 0% { opacity: 1; transform: scale(.65); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.18); } }

#interact-prompt {
  position: absolute; left: 50%; bottom: 29%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px; padding: 7px 13px 7px 8px;
  background: rgba(8,11,10,.86); border: 1px solid rgba(233,173,79,.36);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .09em; color: var(--amber-hot);
  box-shadow: 0 0 28px rgba(0,0,0,.4); clip-path: var(--frame-sm);
  animation: promptFloat 1.8s ease-in-out infinite;
}
@keyframes promptFloat { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,-3px); } }
.keycap { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border: 1px solid var(--amber); color: var(--amber-hot); background: rgba(233,173,79,.12); font-family: var(--font-mono); font-size: 10px; }
#street-compass { position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%); width: 210px; text-align: center; opacity: .78; }
.compass-track { display: none; }
.compass-track::before, .compass-track::after { content: ''; position: absolute; top: -1px; width: 40px; height: 1px; background: rgba(174,194,178,.07); }
.compass-track::before { left: -45px; } .compass-track::after { right: -45px; }
.compass-tick { position: absolute; left: 50%; top: 0; width: 1px; height: 8px; background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.compass-n, .compass-s { position: absolute; top: 9px; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); }
.compass-n { left: 50%; transform: translateX(-50%); color: var(--amber); }
.compass-s { left: 50%; transform: translateX(-50%); top: 18px; }
#lane-indicator { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .13em; color: var(--muted); padding: 3px 8px; text-shadow: 0 1px 3px #000; background: rgba(5,8,8,.5); border-left: 1px solid rgba(233,173,79,.36); }

#vitals { position: absolute; left: 20px; bottom: 20px; width: 330px; padding: 9px 12px 8px; }
.vital-head { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--dim); margin-bottom: 5px; }
.marine-mark { color: var(--teal); font-size: 11px; }
.dash-state { margin-left: auto; color: var(--teal); font-size: 9px; }
.dash-state.cool { color: var(--dim); }
.vital-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vital-icon { width: 15px; font-size: 12px; text-align: center; color: var(--dim); }
.health-row .vital-icon { color: #d75c47; }
.armor-row .vital-icon { color: #65b5c8; }
.vital-bar { position: relative; height: 10px; flex: 1; background: rgba(0,0,0,.5); border: 1px solid rgba(174,194,178,.16); overflow: hidden; }
.vital-bar span { display: block; height: 100%; width: 100%; transition: width .16s ease; }
.health-row .vital-bar span { background: linear-gradient(90deg, #7d1f17, #cf4833 58%, #f07455); box-shadow: 0 0 9px rgba(207,72,51,.36); }
.armor-row .vital-bar span { background: linear-gradient(90deg, #1f545f, #3e99a9 58%, #70d3d8); box-shadow: 0 0 9px rgba(62,153,169,.32); }
.vital-bar i { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0,0,0,.28) 18px 19px); pointer-events: none; }
.vital-row b { width: 31px; text-align: right; font-family: var(--font-mono); font-size: 16px; font-weight: 500; color: #f1ece0; }
.vital-foot { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .08em; margin-top: 3px; }
#health-note { color: var(--muted); }

#weapon-hud { position: absolute; right: 20px; bottom: 20px; width: 342px; padding: 9px 12px 8px; }
.weapon-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
#weapon-slot { font-family: var(--font-mono); font-size: 9.5px; color: var(--amber); border: 1px solid rgba(233,173,79,.32); padding: 1px 4px; }
#weapon-name { font-size: 17px; letter-spacing: .13em; color: #e9e5d7; flex: 1; }
#weapon-level { font-family: var(--font-mono); font-size: 9.5px; color: var(--teal); letter-spacing: .08em; }
.weapon-art { height: 42px; color: var(--teal); opacity: .7; display: flex; align-items: center; justify-content: flex-end; margin: -2px 0 -1px; }
.weapon-art svg { width: 180px; height: 42px; }
.weapon-bottom { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; border-top: 1px solid rgba(174,194,178,.1); padding-top: 3px; }
#ammo-value { font-family: var(--font-mono); font-size: 27px; color: #f1ecdf; line-height: 1; }
.ammo-sep { color: var(--dim); font-family: var(--font-mono); font-size: 12px; }
#ammo-max { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.reload-hint { margin-left: auto; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .08em; }
.reload-hint.active { color: var(--amber); animation: blink 1s steps(2) infinite; }
.weapon-slots { display: flex; gap: 3px; margin-top: 5px; }
.wslot { flex: 1; text-align: center; padding: 2px 0; border: 1px solid rgba(174,194,178,.09); font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); }
.wslot.active { color: var(--amber-hot); border-color: rgba(233,173,79,.5); background: rgba(233,173,79,.1); }
.wslot.locked { opacity: .3; }
.wslot.owned { color: var(--muted); }
@keyframes blink { 50% { opacity: .32; } }

#help-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 8.5px; color: rgba(166,182,168,.42); letter-spacing: .06em; white-space: nowrap; }
#help-hint b { color: rgba(233,173,79,.68); font-weight: 500; }

#toast-stack { position: absolute; left: 50%; top: 220px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 420px; }
.toast {
  padding: 5px 11px; background: rgba(8,11,10,.74); border-left: 2px solid var(--amber);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .07em; color: var(--text);
  animation: toastIn .24s ease-out; backdrop-filter: blur(4px);
}
.toast.good { border-left-color: var(--teal); color: #c9f4e8; }
.toast.bad { border-left-color: var(--danger); color: #ffd3c7; }
.toast.fade { opacity: 0; transition: opacity .35s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

#kill-feed { position: absolute; right: 22px; top: 166px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.kill-item { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: .05em; padding: 2px 7px; background: rgba(5,8,8,.5); animation: killIn .22s ease-out; }
.kill-item b { color: var(--danger); font-weight: 500; }
.kill-item.boss b { color: var(--amber); }
@keyframes killIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

#damage-layer { position: absolute; inset: 0; overflow: hidden; }
.dmg-num {
  position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: #fff0cf; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.8); will-change: transform, opacity;
  animation: dmgFloat .7s ease-out forwards;
}
.dmg-num.crit { color: var(--amber-hot); font-size: 16px; }
.dmg-num.kill { color: #e24f39; }
@keyframes dmgFloat {
  0% { opacity: 1; transform: translate(-50%,-50%) scale(.8); }
  20% { transform: translate(-50%,-70%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%,-190%) scale(1); }
}

#banner-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.wave-banner { text-align: center; animation: bannerIn 2.9s ease both; }
.wave-banner .kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: .38em; color: var(--danger); text-shadow: 0 0 16px rgba(227,83,61,.4); }
.wave-banner .title { font-size: clamp(54px, 9vw, 120px); font-weight: 700; line-height: .85; letter-spacing: .03em; color: #f1e7d2; text-shadow: 0 4px 0 rgba(0,0,0,.7), 0 0 40px rgba(233,173,79,.16); margin: 8px 0; }
.wave-banner .sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .2em; }
.wave-banner .rule { width: 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--amber), transparent); margin: 12px auto; }
.wave-banner.danger .title { color: #ffd5c4; text-shadow: 0 4px 0 rgba(0,0,0,.7), 0 0 50px rgba(227,83,61,.35); }
.wave-banner.boss .title { color: #ff8c6e; }
.wave-banner.teal .title { color: #bdf3e5; }
@keyframes bannerIn {
  0% { opacity: 0; transform: scale(1.08); filter: blur(3px); }
  10% { opacity: 1; transform: scale(1); filter: blur(0); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.985); }
}

#subtitles { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); width: min(640px, 80vw); text-align: center; opacity: 0; transition: opacity .3s; }
#subtitles.show { opacity: 1; }
#subtitle-text { display: inline; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; letter-spacing: .04em; color: #cdd4c8; background: rgba(3,5,5,.66); padding: 4px 8px; box-decoration-break: clone; text-shadow: 0 1px 2px #000; }

/* -------------------------------------------------------------------------- */
/* Screens                                                                    */
/* -------------------------------------------------------------------------- */
.screen { position: absolute; inset: 0; z-index: 20; }
.hidden { display: none !important; }
.overlay-screen {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(5,7,7,.62), rgba(3,4,4,.93));
  backdrop-filter: blur(5px); padding: 24px;
}
.screen :is(button, input, a) { pointer-events: auto; }

/* Start menu --------------------------------------------------------------- */
.menu-screen {
  display: grid; grid-template-rows: 78px 1fr 44px;
  background:
    linear-gradient(90deg, rgba(4,6,6,.97) 0%, rgba(4,6,6,.89) 31%, rgba(4,6,6,.25) 60%, rgba(4,6,6,.6) 100%),
    linear-gradient(0deg, rgba(4,6,6,.92), transparent 28%);
  overflow: hidden;
}
.menu-screen::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(163,189,172,.035) 79px 80px);
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}
.menu-bg-mark {
  position: absolute; right: 3vw; top: 16vh; font-family: var(--font-display); font-weight: 700; font-size: 34vw;
  line-height: .7; color: transparent; -webkit-text-stroke: 1px rgba(190, 214, 195, .055);
  pointer-events: none; z-index: -1; letter-spacing: -.08em;
}
.menu-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 34px 0; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-bar { width: 5px; height: 33px; background: var(--amber); box-shadow: 0 0 18px rgba(233,173,79,.35); }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: .24em; line-height: 1; color: #efe9da; }
.brand-sub { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .23em; color: var(--dim); margin-top: 5px; }
.menu-build { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--dim); align-self: flex-start; }
.menu-content { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: center; gap: 50px; padding: 0 6vw 0 7vw; max-width: 1500px; width: 100%; margin: 0 auto; }
.eyebrow { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.menu-hero { max-width: 850px; animation: heroIn .8s ease both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-title { margin: 14px 0 28px; font-weight: 700; line-height: .92; letter-spacing: -.01em; display: flex; flex-direction: column; }
.hero-title .line1 { font-size: clamp(66px, 10.2vw, 154px); color: #eae2d0; text-shadow: 0 5px 0 rgba(0,0,0,.36); }
.hero-title .line2 { font-size: clamp(78px, 12.8vw, 192px); color: #f3c86e; position: relative; margin-left: .05em; text-shadow: 0 6px 0 rgba(52,26,0,.24), 0 0 80px rgba(233,173,79,.13); }
.hero-title .line2::after { content: ''; display: inline-block; width: 2px; height: .67em; background: var(--amber); margin-left: .06em; vertical-align: .03em; animation: cursorBlink 1.1s steps(2) infinite; }
.hero-title .line3 { margin-top: 14px; font-family: var(--font-mono); font-size: clamp(16px, 2.2vw, 32px); font-weight: 500; letter-spacing: .18em; color: #aeb7aa; }
.hero-dot { color: var(--danger); font-size: .38em; vertical-align: .13em; margin-left: .04em; letter-spacing: 0; }
@keyframes cursorBlink { 50% { opacity: 0; } }
.hero-copy { max-width: 600px; font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: #9da79b; border-left: 1px solid rgba(233,173,79,.36); padding-left: 16px; margin: 0 0 26px; letter-spacing: -.01em; }
.menu-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.menu-hero { min-width: 0; }
/* narrow screens: the main button gets its own full-width row, the rest share one row */
@media (max-width: 760px) {
  .menu-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .menu-actions .big-btn { grid-column: 1 / -1; }
  .menu-actions .ghost-btn { min-height: 48px; padding: 0 6px; font-size: 9px; letter-spacing: .08em; text-align: center; line-height: 1.35; }
  .menu-actions .skins-btn i { display: none; }
  .menu-actions .coop-btn i { display: inline-block; margin: 3px 0 0; }
}
.big-btn {
  display: flex; align-items: center; gap: 13px; min-height: 59px; padding: 0 18px;
  background: linear-gradient(100deg, var(--amber), #c98931); color: #161207; text-align: left;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  box-shadow: 0 8px 32px rgba(203,143,47,.16); position: relative; overflow: hidden;
  transition: filter .16s, transform .16s;
}
.big-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.25) 46%, transparent 62%); transform: translateX(-130%); transition: transform .5s; }
.big-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.big-btn:hover::after { transform: translateX(130%); }
.big-btn:active { transform: translateY(0); }
.big-btn-num { font-family: var(--font-mono); font-size: 10px; opacity: .54; align-self: flex-start; margin-top: 4px; }
.big-btn-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.big-btn-body b { font-size: 19px; letter-spacing: .1em; font-weight: 700; line-height: 1; }
.big-btn-body small { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; opacity: .58; }
.big-btn-arrow { font-size: 27px; font-weight: 300; line-height: 1; }
.big-btn.compact { min-height: 50px; padding: 0 14px; }
.big-btn.compact .big-btn-body b { font-size: 15px; }
.ghost-btn {
  min-height: 59px; padding: 0 18px; border: 1px solid rgba(183,204,187,.24); background: rgba(8,11,10,.4);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--muted);
  transition: border-color .16s, color .16s, background .16s;
}
.ghost-btn:hover { border-color: var(--amber); color: var(--amber-hot); background: rgba(233,173,79,.06); }
.ghost-btn.danger-ghost:hover { border-color: var(--danger); color: #ffac98; background: rgba(227,83,61,.06); }
.menu-meta { margin-top: 15px; display: flex; gap: 10px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .11em; color: var(--dim); }
.menu-side { display: flex; flex-direction: column; gap: 12px; animation: heroIn .8s .12s ease both; }
.brief-card, .controls-card { border: 1px solid rgba(174,194,178,.16); background: rgba(8,11,10,.67); padding: 13px 14px; clip-path: var(--frame-sm); }
.brief-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .15em; color: var(--amber); padding-bottom: 8px; border-bottom: 1px solid rgba(174,194,178,.12); }
.blink { animation: blink 1.4s steps(2) infinite; color: var(--teal); }
.brief-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 7px; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: .05em; }
.brief-row b { font-size: 11px; color: var(--text); font-weight: 500; }
.brief-row b.danger { color: var(--danger); font-size: 9.5px; }
.controls-title { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--amber); margin-bottom: 8px; }
.ctrl { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }
.ctrl kbd { min-width: 68px; font-size: 9px; color: #c6d2c3; }
.quote { padding: 4px 3px 0; font-family: var(--font-mono); font-size: 9.5px; line-height: 1.7; color: rgba(177,193,176,.45); letter-spacing: .03em; }
.quote span { display: block; color: rgba(233,173,79,.4); font-size: 8.5px; margin-top: 3px; }
.menu-footer { display: flex; justify-content: space-between; align-items: center; padding: 0 34px 14px; font-family: var(--font-mono); font-size: 8.5px; color: rgba(147,164,147,.35); letter-spacing: .09em; }

/* Pause, help, generic modal ----------------------------------------------- */
.modal {
  width: min(960px, 94vw); background: linear-gradient(150deg, rgba(17,21,20,.97), rgba(7,10,10,.98));
  border: 1px solid rgba(183,204,187,.24); box-shadow: 0 30px 100px rgba(0,0,0,.66), inset 0 1px rgba(255,255,255,.05);
  clip-path: var(--frame); position: relative;
}
.modal::before { content: ''; position: absolute; left: 0; top: 0; width: 90px; height: 2px; background: var(--amber); z-index: 2; }
.modal-rail { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 1px; background: linear-gradient(180deg, rgba(233,173,79,.34), transparent 60%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 29px 36px 18px; }
.modal-head h2 { font-size: 50px; line-height: .9; margin: 6px 0 0; letter-spacing: .06em; color: #e9e2d2; }
.modal-code { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: .12em; }
.pause-modal { width: min(720px, 92vw); }
.pause-grid { display: grid; grid-template-columns: 1fr 220px; gap: 35px; padding: 5px 36px 25px 48px; }
.settings-col { display: flex; flex-direction: column; gap: 17px; }
.setting { display: block; font-family: var(--font-mono); }
.setting > span { display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.setting > span b { font-weight: 500; color: var(--text); }
.setting output { color: var(--amber); }
.setting input { width: 100%; height: 3px; appearance: none; background: rgba(190,212,191,.18); outline: none; cursor: pointer; }
.setting input::-webkit-slider-thumb { appearance: none; width: 12px; height: 18px; background: var(--amber); border: 0; border-radius: 0; box-shadow: 0 0 10px rgba(233,173,79,.3); }
.pause-stats { display: flex; flex-direction: column; border-left: 1px solid rgba(174,194,178,.14); padding-left: 24px; gap: 3px; }
.pause-stats div { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid rgba(174,194,178,.07); font-family: var(--font-mono); font-size: 9px; color: var(--dim); letter-spacing: .08em; }
.pause-stats b { font-size: 15px; color: var(--text); font-weight: 500; }
.pause-actions { display: flex; gap: 9px; padding: 0 36px 31px 48px; flex-wrap: wrap; }
.pause-actions .big-btn { flex: 1.4; }
.pause-actions .ghost-btn { flex: 1; min-height: 50px; }

.x-btn { width: 34px; height: 34px; border: 1px solid rgba(183,204,187,.22); color: var(--muted); font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.x-btn:hover { border-color: var(--danger); color: #ffb39f; background: rgba(227,83,61,.1); }

.help-modal { width: min(900px, 94vw); max-height: 92vh; display: flex; flex-direction: column; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(174,194,178,.11); border-top: 1px solid rgba(174,194,178,.11); border-bottom: 1px solid rgba(174,194,178,.11); overflow-y: auto; min-height: 0; }
.help-block { background: #0b0e0d; padding: 15px 20px; }
.help-block h3 { font-size: 12px; letter-spacing: .16em; color: var(--amber); margin: 0 0 6px; font-weight: 500; }
.help-block p { margin: 0; font-family: var(--font-mono); font-size: 10px; line-height: 1.8; color: var(--muted); }
.help-block kbd { font-size: 8.5px; height: 17px; }
.help-ok { margin: 20px 24px 24px auto; display: flex; width: 280px; }

/* Shop ---------------------------------------------------------------------- */
.shop-modal {
  width: min(1160px, 96vw); height: min(790px, 92vh);
  display: grid; grid-template-rows: 82px 48px minmax(0, 1fr) 38px;
  background:
    linear-gradient(120deg, rgba(17,21,20,.985), rgba(5,8,8,.99)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.02) 3px 4px);
  border: 1px solid rgba(185,207,188,.25);
  box-shadow: 0 32px 120px rgba(0,0,0,.8), inset 0 1px rgba(255,255,255,.05);
  clip-path: var(--frame); position: relative; overflow: hidden;
}
.shop-modal::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .11;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(210,235,211,.2) 4px 5px);
}
.shop-header { display: flex; align-items: center; padding: 0 25px 0 29px; border-bottom: 1px solid rgba(174,194,178,.15); position: relative; z-index: 1; }
.shop-brand { display: flex; flex-direction: column; gap: 1px; }
.vend-logo { font-weight: 700; font-size: 31px; letter-spacing: .04em; line-height: 1; color: #efeadb; }
.vend-logo span { color: var(--amber); text-shadow: 0 0 16px rgba(233,173,79,.35); }
.shop-sub { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; color: var(--dim); margin-top: 4px; }
.shop-wallet { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-right: 18px; }
.shop-wallet b { font-family: var(--font-mono); font-size: 27px; font-weight: 500; color: var(--amber-hot); }
.shop-wallet small { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); align-self: flex-end; margin-bottom: 5px; letter-spacing: .09em; }
.shop-wallet.flash b { animation: walletFlash .45s ease; }
@keyframes walletFlash { 30% { transform: scale(1.16); color: #fff; } }
.shop-tabs { display: flex; align-items: stretch; gap: 1px; padding: 0 29px; border-bottom: 1px solid rgba(174,194,178,.14); position: relative; z-index: 1; }
.shop-tab { padding: 0 24px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--dim); border-bottom: 2px solid transparent; transition: .15s; }
.shop-tab span { font-size: 8.5px; color: rgba(233,173,79,.42); margin-right: 7px; }
.shop-tab:hover { color: var(--text); background: rgba(255,255,255,.02); }
.shop-tab.active { color: var(--amber-hot); border-bottom-color: var(--amber); background: linear-gradient(0deg, rgba(233,173,79,.07), transparent); }
.shop-tab-note { margin-left: auto; align-self: center; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--dim); }
.shop-body { display: grid; grid-template-columns: minmax(0, 1fr) 268px; min-height: 0; position: relative; z-index: 1; }
.shop-grid { padding: 17px 18px 24px 25px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px; scrollbar-width: thin; scrollbar-color: rgba(233,173,79,.35) transparent; }
.shop-grid::-webkit-scrollbar { width: 5px; }
.shop-grid::-webkit-scrollbar-thumb { background: rgba(233,173,79,.32); }
.shop-card {
  border: 1px solid rgba(174,194,178,.17); background: linear-gradient(150deg, rgba(21,26,24,.85), rgba(10,13,12,.72));
  padding: 12px 13px 11px; position: relative; min-height: 146px;
  display: flex; flex-direction: column;
  transition: border-color .16s, background .16s, transform .16s;
}
.shop-card:hover { border-color: rgba(233,173,79,.38); background: linear-gradient(150deg, rgba(28,32,29,.92), rgba(12,16,14,.8)); transform: translateY(-1px); }
.shop-card.owned { border-color: rgba(103,221,200,.22); }
.shop-card.maxed { border-color: rgba(103,221,200,.35); }
.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card-info { min-width: 0; flex: 1 1 auto; }
.card-action { margin-left: auto; flex: 0 0 auto; align-self: flex-start; padding-left: 4px; }
.card-action .buy-btn { font-size: 10px; padding: 6px 9px; }
.card-info .tag-owned { display: inline-block; margin-top: 4px; }
.card-icon { width: 59px; height: 44px; flex: 0 0 auto; border: 1px solid rgba(174,194,178,.12); background: rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; color: var(--teal); }
.card-icon svg { width: 48px; height: 30px; }
.card-icon.def { color: var(--amber); }
.card-icon.supply { color: var(--green); }
.card-id { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .09em; color: var(--dim); }
.card-name { font-size: 17px; letter-spacing: .08em; line-height: 1.05; color: #e9e4d6; margin: 2px 0 3px; }
.card-tag { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .04em; }
.card-desc { font-family: var(--font-mono); font-size: 9.5px; line-height: 1.55; color: var(--muted); margin: 7px 0; flex: 1; }
.card-stats { display: flex; gap: 8px; margin: 1px 0 7px; }
.card-stat { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .06em; }
.card-stat i { width: 48px; height: 2px; background: rgba(176,201,180,.12); overflow: hidden; display: block; }
.card-stat i span { display: block; height: 100%; background: var(--teal); }
.card-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(174,194,178,.1); padding-top: 7px; }
.card-price { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--amber-hot); margin-right: auto; }
.card-price .coin-glyph { width: 11px; height: 11px; }
.card-price .coin-glyph i { inset: 3px; }
.buy-btn { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; padding: 6px 9px; border: 1px solid rgba(233,173,79,.42); color: var(--amber); background: rgba(233,173,79,.06); transition: .15s; white-space: nowrap; }
.buy-btn:hover:not(:disabled) { background: var(--amber); color: #171206; }
.buy-btn:disabled { opacity: .3; cursor: not-allowed; }
.buy-btn.alt { border-color: rgba(103,221,200,.38); color: var(--teal); background: rgba(103,221,200,.05); }
.buy-btn.alt:hover:not(:disabled) { background: var(--teal); color: #071110; }
.level-pips { display: flex; gap: 3px; margin-right: 5px; }
.level-pips i { width: 10px; height: 4px; background: rgba(174,194,178,.15); transform: skewX(-20deg); }
.level-pips i.on { background: var(--teal); box-shadow: 0 0 5px rgba(103,221,200,.35); }
.tag-owned { font-family: var(--font-mono); font-size: 8.5px; color: var(--teal); border: 1px solid rgba(103,221,200,.25); padding: 2px 4px; letter-spacing: .05em; }
.card-note { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); margin-top: 4px; }

.shop-aside { border-left: 1px solid rgba(174,194,178,.13); padding: 17px 20px 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: thin; }
.aside-block { border: 1px solid rgba(174,194,178,.12); background: rgba(7,10,9,.38); padding: 10px 11px; }
.aside-title { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: var(--amber); border-bottom: 1px solid rgba(174,194,178,.1); padding-bottom: 6px; margin-bottom: 5px; }
.aside-stat { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .04em; padding: 4px 0; }
.aside-stat b { color: var(--text); font-weight: 500; text-align: right; }
.aside-goal { border-color: rgba(233,173,79,.28); }
.aside-goal p { margin: 7px 0 0; font-family: var(--font-mono); font-size: 8.5px; line-height: 1.65; color: var(--dim); }
.lane-schema { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); line-height: 1.6; }
.lane-schema-streets { height: 38px; display: flex; justify-content: space-around; margin: 7px 0 6px; position: relative; }
.lane-schema-streets::before { content: ''; position: absolute; left: 10%; right: 10%; top: 9px; height: 1px; background: rgba(174,194,178,.16); }
.lane-schema-streets i { width: 18%; height: 38px; background: linear-gradient(0deg, rgba(233,173,79,.22), rgba(233,173,79,.02)); border: 1px solid rgba(233,173,79,.22); }
.lane-schema p { margin: 8px 0 0; color: var(--muted); }
.shop-tip { margin-top: auto; font-family: var(--font-mono); font-size: 9px; line-height: 1.7; color: var(--dim); border-left: 1px solid rgba(103,221,200,.28); padding-left: 8px; }
.shop-footer { border-top: 1px solid rgba(174,194,178,.13); display: flex; align-items: center; justify-content: space-between; padding: 0 29px; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .07em; position: relative; z-index: 1; }
.shop-footer kbd { height: 16px; font-size: 8.5px; }

/* Deploy -------------------------------------------------------------------- */
.deploy-modal { width: min(1010px, 96vw); }
.deploy-head { display: flex; justify-content: space-between; gap: 24px; padding: 25px 31px 15px; border-bottom: 1px solid rgba(174,194,178,.12); }
.deploy-head h2 { margin: 5px 0 3px; font-size: 32px; letter-spacing: .08em; color: #ece5d5; }
.deploy-head p { margin: 0; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.deploy-price { border-left: 1px solid rgba(233,173,79,.26); padding-left: 17px; text-align: right; flex: 0 0 auto; }
.deploy-price span { display: block; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .11em; color: var(--dim); }
.deploy-price b { display: block; font-family: var(--font-mono); font-size: 28px; font-weight: 500; color: var(--amber-hot); line-height: 1.15; }
.deploy-price small { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); }
.deploy-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.deploy-map-wrap { padding: 17px 21px 19px; display: flex; flex-direction: column; gap: 7px; min-height: 0; }
.deploy-map {
  position: relative; width: 100%; aspect-ratio: 1.24; max-height: 51vh; margin: 0 auto;
  background:
    radial-gradient(ellipse at center, rgba(34,44,38,.8), rgba(8,11,10,.95)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(180,205,184,.04) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(180,205,184,.04) 23px 24px);
  border: 1px solid rgba(174,194,178,.18); overflow: hidden;
}
.deploy-map::after { content: 'РўРђРљРўРР§Р•РЎРљРђРЇ РЎРҐР•РњРђ / N в†‘'; position: absolute; right: 7px; bottom: 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; color: rgba(174,194,178,.28); }
.dm-street { position: absolute; top: 0; bottom: 0; width: 15%; background: linear-gradient(90deg, rgba(92,109,93,.16), rgba(114,133,113,.24), rgba(92,109,93,.16)); border-left: 1px solid rgba(174,194,178,.12); border-right: 1px solid rgba(174,194,178,.12); }
.dm-street.center { left: 42.5%; }
.dm-street::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(233,173,79,.2); }
.dm-cross { position: absolute; left: 0; right: 0; height: 10%; background: rgba(112,131,113,.16); border-top: 1px solid rgba(174,194,178,.12); border-bottom: 1px solid rgba(174,194,178,.12); }
.dm-cross.bottom { top: 67%; }
.dm-label { position: absolute; bottom: 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .11em; color: rgba(190,210,191,.34); transform: translateX(-50%); }
.dm-label.left { left: 4%; bottom: 24%; } .dm-label.center { left: 50%; bottom: 5%; } .dm-label.right { right: 4%; left: auto; bottom: 24%; }
.dm-vend { position: absolute; left: 52.6%; top: 49%; transform: translate(-50%,-50%); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .05em; color: var(--amber); text-align: center; opacity: .8; }
.dm-vend span { display: block; width: 13px; height: 13px; line-height: 12px; border: 1px solid var(--amber); background: rgba(233,173,79,.15); margin: 0 auto 2px; font-size: 8.5px; }
.deploy-coverage { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.deploy-pads { position: absolute; inset: 0; }
.deploy-pad {
  position: absolute; width: 26px; height: 26px; transform: translate(-50%,-50%);
  border: 1px solid rgba(103,221,200,.53); border-radius: 50%; background: rgba(8,18,16,.8);
  box-shadow: 0 0 0 4px rgba(103,221,200,.06), 0 0 10px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; color: var(--teal); font-family: var(--font-mono); font-size: 9.5px;
  transition: .15s; z-index: 2;
}
.deploy-pad::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(103,221,200,.28); border-radius: 50%; }
.deploy-pad:hover { background: rgba(103,221,200,.25); box-shadow: 0 0 0 6px rgba(103,221,200,.09), 0 0 14px rgba(103,221,200,.25); transform: translate(-50%,-50%) scale(1.1); }
.deploy-pad.selected { background: var(--teal); color: #06100e; box-shadow: 0 0 0 5px rgba(103,221,200,.18), 0 0 18px rgba(103,221,200,.3); }
.deploy-pad.occupied { border-color: rgba(233,173,79,.55); color: var(--amber); background: rgba(33,23,9,.86); }
.deploy-pad.full { border-color: rgba(227,83,61,.5); color: var(--danger); background: rgba(30,10,8,.86); opacity: .6; }
.deploy-pad .pad-count { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--dim); white-space: nowrap; }
.deploy-legend { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .05em; }
.deploy-legend span { display: flex; align-items: center; gap: 4px; }
.pad-dot { width: 6px; height: 6px; border: 1px solid var(--teal); border-radius: 50%; display: inline-block; }
.pad-dot.occupied { border-color: var(--amber); }
.cover-line { width: 15px; height: 1px; background: var(--amber); display: inline-block; box-shadow: 0 0 5px var(--amber); }
.deploy-side { border-left: 1px solid rgba(174,194,178,.12); padding: 17px 21px 18px; display: flex; flex-direction: column; gap: 11px; }
.selected-pad-card { border: 1px solid rgba(174,194,178,.15); background: rgba(7,10,9,.45); min-height: 106px; padding: 12px 13px; }
.spc-empty { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: .06em; line-height: 1.7; }
.spc-head { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .09em; }
.spc-title { font-size: 20px; letter-spacing: .07em; color: #e9e3d4; margin: 4px 0; }
.spc-cover { font-family: var(--font-mono); font-size: 9px; color: var(--teal); line-height: 1.65; }
.spc-occupants { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); margin-top: 7px; border-top: 1px solid rgba(174,194,178,.1); padding-top: 6px; }
.deploy-note { font-family: var(--font-mono); font-size: 9px; line-height: 1.65; color: var(--dim); border-left: 1px solid rgba(227,83,61,.35); padding-left: 9px; }
.deploy-note b { color: var(--danger); font-weight: 500; }
.deploy-actions { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.deploy-actions .ghost-btn { min-height: 35px; font-size: 8.5px; }
.deploy-actions .big-btn:disabled { filter: grayscale(.8) brightness(.55); cursor: not-allowed; transform: none; }

/* Game over ----------------------------------------------------------------- */
.gameover-modal { width: min(690px, 92vw); text-align: center; padding: 31px 44px 30px; overflow: hidden; }
.gameover-modal::before { left: 50%; transform: translateX(-50%); width: 130px; background: var(--danger); }
.go-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,90,65,.025) 3px 4px); }
.danger-text { color: var(--danger); justify-content: center; }
.go-title { font-size: clamp(58px, 10vw, 102px); line-height: .82; margin: 13px 0 13px; letter-spacing: .05em; color: #f0dfce; text-shadow: 0 5px 0 #2a0e08, 0 0 50px rgba(227,83,61,.15); }
.go-sub { max-width: 430px; margin: 0 auto 20px; font-family: var(--font-mono); font-size: 10px; line-height: 1.8; color: var(--muted); }
.go-stats { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(174,194,178,.14); border-bottom: 1px solid rgba(174,194,178,.14); margin-bottom: 12px; }
.go-stats div { padding: 10px 4px; border-right: 1px solid rgba(174,194,178,.09); }
.go-stats div:last-child { border-right: 0; }
.go-stats span { display: block; font-family: var(--font-mono); font-size: 8.5px; color: var(--dim); letter-spacing: .08em; margin-bottom: 3px; }
.go-stats b { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: #e5dfd0; }
.go-record { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; color: var(--amber); margin-bottom: 18px; }
.go-actions { display: flex; gap: 8px; justify-content: center; }
.go-actions .big-btn { width: 280px; }
.go-actions .ghost-btn { min-height: 50px; }

/* Level transition --------------------------------------------------------- */
.transition-screen {
  position: absolute; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: radial-gradient(ellipse at 50% 70%, rgba(0,0,0,.2), rgba(0,0,0,.94) 70%), #050606;
  transition: opacity .45s ease;
}
.transition-screen.fade { opacity: 0; }
.transition-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 62%, rgba(255, 87, 173, .1) 62.4%, transparent 63%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(90, 230, 255, .08) 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(255, 91, 180, .05) 59px 60px);
  transform: perspective(500px) rotateX(62deg) scale(1.8) translateY(20%);
  transform-origin: center bottom; opacity: .8;
}
.transition-scan {
  position: absolute; inset: 0; mix-blend-mode: screen; opacity: .22;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.09) 4px 5px);
}
.transition-inner { position: relative; z-index: 2; width: min(900px, 90vw); text-align: center; }
.transition-level { font-family: var(--font-mono); font-size: 10px; letter-spacing: .5em; color: var(--teal); text-shadow: 0 0 20px rgba(90,230,255,.4); }
.transition-sub { margin-top: 22px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .24em; color: var(--dim); }
.transition-title { font-size: clamp(60px, 9.2vw, 134px); font-weight: 700; line-height: .9; letter-spacing: .02em; margin: 10px 0 22px; color: #f5e9d5; text-shadow: 0 5px 0 rgba(0,0,0,.4), 0 0 60px rgba(255,91,180,.18); }
.transition-copy { max-width: 660px; margin: 0 auto; font-family: var(--font-mono); font-size: 10px; line-height: 1.8; color: #aeb8ad; letter-spacing: .04em; }
.transition-line { width: min(470px, 70%); height: 1px; margin: 22px auto 13px; background: linear-gradient(90deg, transparent, var(--teal), var(--amber), transparent); box-shadow: 0 0 16px rgba(90,230,255,.3); }
.transition-line span { display: block; width: 34%; height: 2px; margin-top: -1px; background: #f2e9d3; box-shadow: 0 0 12px var(--teal); animation: transitionScan 1.5s ease-in-out infinite; }
.transition-tip { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--dim); }
@keyframes transitionScan { 0%,100% { transform: translateX(0); opacity: .4; } 50% { transform: translateX(190%); opacity: 1; } }

/* Victory ------------------------------------------------------------------ */
.victory-modal {
  width: min(760px, 93vw); text-align: center; padding: 30px 44px 26px; overflow: hidden;
  max-height: 93vh; overflow-y: auto;
  background: linear-gradient(150deg, rgba(24,18,26,.98), rgba(7,10,12,.99));
  border-color: rgba(255, 91, 180, .28);
}
.victory-modal::before { left: 50%; transform: translateX(-50%); width: 180px; background: linear-gradient(90deg, var(--teal), #ff5bb4); }
.victory-eyebrow { justify-content: center; color: var(--teal); }
.victory-title { margin: 10px 0 18px; font-size: clamp(50px, 7.2vw, 88px); line-height: .92; letter-spacing: .02em; color: #f5e5cf; text-shadow: 0 5px 0 #1a0b15, 0 0 60px rgba(255,91,180,.18); }
.victory-title span { display: block; color: #ff8acd; }
.victory-sub { max-width: 460px; margin: 0 auto 16px; font-family: var(--font-mono); font-size: 10px; line-height: 1.8; color: #adaba7; }
.credits-block { margin: 18px 0 16px; border-top: 1px solid rgba(255,91,180,.18); border-bottom: 1px solid rgba(255,91,180,.18); padding: 10px 0 8px; text-align: left; }
.credits-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: var(--teal); }
.credits-head span:last-child { color: var(--dim); letter-spacing: .08em; }
.credits-list { max-height: 190px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,91,180,.45) transparent; }
.credits-list::-webkit-scrollbar { width: 4px; }
.credits-list::-webkit-scrollbar-thumb { background: rgba(255,91,180,.45); }
.credit-row { display: flex; gap: 9px; padding: 4px 2px; border-bottom: 1px solid rgba(255,255,255,.04); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.55; color: #a9a6a0; }
.credit-index { color: var(--amber); opacity: .65; flex: none; }
.credit-row b { color: #f2e8db; font-weight: 500; }
.credit-row em { color: #ff8acd; font-style: normal; font-size: 8.5px; letter-spacing: .08em; }
.credit-empty { padding: 18px 8px; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }
.credits-hint { margin-top: 7px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; color: #6f6b68; text-align: right; }
.victory-record { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--amber); margin: 13px 0 18px; }
.victory-modal .go-stats { border-color: rgba(255,91,180,.2); }

/* HUD accent for cyberpunk level 2 ---------------------------------------- */
body.level-two {
  --amber: #ff5bb4;
  --amber-hot: #ffa6dc;
  --teal: #5ce9ff;
  --teal-dim: #24788f;
  --danger: #ff624f;
}
body.level-two .objective-panel { border-color: rgba(255,91,180,.36); background: linear-gradient(155deg, rgba(28,17,28,.95), rgba(8,11,14,.82)); }
body.level-two .objective-kicker { color: #ff89cf; }
body.level-two .objective-ready.on { color: var(--teal); }

body.level-three {
  --amber: #dce9ff;
  --amber-hot: #ffffff;
  --teal: #8fbcff;
  --teal-dim: #3b5d8d;
  --danger: #ff3b45;
}
body.level-three .objective-panel { border-color: rgba(156,196,255,.4); background: linear-gradient(155deg, rgba(15,24,38,.96), rgba(5,8,14,.86)); }
body.level-three .objective-kicker { color: #a9ccff; }
body.level-three .objective-ready.on { color: #dce9ff; }
body.level-three .vend-logo span { color: #ff4a52; }
body.level-three .victory-modal { border-color: rgba(156,196,255,.38); background: linear-gradient(150deg, rgba(15,23,36,.99), rgba(4,6,10,.99)); }
body.level-three .victory-title span { color: #bfd8ff; }
body.level-three .victory-modal::before { background: linear-gradient(90deg, #8fbcff, #ff3b45); }


body.level-two .hud-panel::after { background: var(--teal); }
body.level-two .hud-panel { border-color: rgba(255, 138, 218, .18); }
body.level-two .wave-panel { border-top-color: rgba(255,91,180,.4); }
body.level-two .wave-kicker { color: #ff8acd; }
body.level-two .wave-number { text-shadow: 0 2px 0 #000, 0 0 20px rgba(255,91,180,.25); }
body.level-two .fx-vignette { background: radial-gradient(ellipse at center, transparent 45%, rgba(23,0,31,.2) 72%, rgba(0,0,0,.7) 100%), linear-gradient(90deg, rgba(255,65,168,.045), transparent 18%, transparent 82%, rgba(74,225,255,.05)); }

@media (max-width: 860px) {
  .objective-panel { left: 10px; top: 236px; width: 180px; padding: 8px 9px; }
  .objective-title { font-size: 16px; }
  .objective-sub { display: none; }
  .objective-money b { font-size: 14px; }
  .weapon-slots .wslot { font-size: 8px; }
  .transition-title { font-size: 12vw; }
  .transition-copy { font-size: 9.5px; }
  .victory-modal { padding: 27px 20px; }
}
@media (max-height: 740px) {
  .objective-panel { top: 282px; }
  .victory-modal { padding: 22px 30px 20px; }
  .victory-title { font-size: 54px; margin: 6px 0 12px; }
  .victory-sub { margin-bottom: 12px; font-size: 9.5px; }
  .credits-list { max-height: 105px; }
}

/* Helpers ------------------------------------------------------------------- */
#loading-screen {
  position: absolute; inset: 0; z-index: 60; background: #070909;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px;
  transition: opacity .55s ease, visibility .55s;
}
#loading-screen.done { opacity: 0; visibility: hidden; }
.load-mark { font-size: 38px; font-weight: 700; letter-spacing: .11em; color: var(--amber); border: 1px solid rgba(233,173,79,.3); width: 174px; height: 76px; display: flex; align-items: center; justify-content: center; clip-path: var(--frame-sm); }
.load-text { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--muted); }
.load-bar { width: 210px; height: 2px; background: rgba(174,194,178,.14); }
.load-bar span { display: block; height: 100%; width: 12%; background: var(--amber); transition: width .35s; }
.load-dots { animation: blink 1s steps(2) infinite; }

.no-select { user-select: none; -webkit-user-select: none; }
.danger-text { color: var(--danger); }

@media (max-width: 1120px) {
  .menu-content { grid-template-columns: 1fr 250px; gap: 25px; padding-left: 5vw; padding-right: 4vw; }
  .hero-copy { font-size: 10px; }
  .hud-top { grid-template-columns: 210px 1fr 210px; gap: 12px; }
  .wave-panel { width: min(420px, 100%); padding-left: 16px; padding-right: 16px; }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-body { grid-template-columns: minmax(0,1fr) 240px; }
  .shop-aside { padding-left: 14px; padding-right: 14px; }
  .deploy-body { grid-template-columns: minmax(0,1fr) 290px; }
}
@media (max-width: 860px) {
  .menu-screen { grid-template-rows: 65px 1fr 35px; }
  .menu-content { grid-template-columns: 1fr; padding: 0 8vw; }
  .hero-title .line1 { font-size: 19vw; } .hero-title .line2 { font-size: 22vw; }
  .hero-copy { max-width: 520px; }
  .hud-top { grid-template-columns: 180px 1fr 180px; left: 10px; right: 10px; top: 10px; gap: 8px; }
  .minimap-panel { height: 214px; } #minimap { height: 158px; }
  .wave-number { font-size: 36px; } .wave-panel { padding-left: 10px; padding-right: 10px; }
  .economy-panel { min-height: 104px; } #coin-count { font-size: 20px; }
  .panel-cap { font-size: 8.5px; } .wave-kicker { font-size: 8px; }
  .wave-status { font-size: 8px; } .street-alert { display: none; }
  #vitals, #weapon-hud { width: 275px; bottom: 12px; }
  #vitals { left: 12px; } #weapon-hud { right: 12px; }
  .weapon-art { display: none; }
  #help-hint { display: none; }
  .shop-modal { grid-template-rows: 70px 43px minmax(0,1fr) 32px; height: 94vh; }
  .shop-header { padding: 0 15px 0 18px; } .shop-tabs { padding: 0 18px; } .shop-tab { padding: 0 12px; }
  .shop-tab-note { display: none; } .shop-body { grid-template-columns: 1fr; } .shop-aside { display: none; }
  .deploy-modal { max-height: 94vh; overflow-y: auto; } .deploy-body { grid-template-columns: 1fr; }
  .deploy-map { max-height: 42vh; } .deploy-side { border-left: 0; border-top: 1px solid rgba(174,194,178,.12); }
  .deploy-actions { flex-direction: row; } .deploy-actions > * { flex: 1; }
  .gameover-modal { padding: 26px 20px; } .go-stats b { font-size: 18px; }
  .pause-grid { grid-template-columns: 1fr; } .pause-stats { border-left: 0; padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-height: 740px) {
  .menu-screen { grid-template-rows: 60px 1fr 34px; }
  .hero-title { margin: 8px 0 18px; }
  .hero-copy { margin-bottom: 14px; line-height: 1.65; }
  .menu-side .quote { display: none; }
  .shop-modal { height: 95vh; }
  .shop-card { min-height: 132px; }
  .deploy-map { max-height: 45vh; }
}

/* Readability pass over the deliberately tiny 90s HUD */
.panel-cap { font-size: 10.5px; }
.minimap-legend { font-size: 9.5px; }
.wave-kicker { font-size: 10px; }
.wave-status { font-size: 10px; }
.street-alert span { font-size: 9px; }
.coin-label { font-size: 9.5px; }
.stat-line { font-size: 10px; }
.vital-head { font-size: 10px; }
.dash-state { font-size: 9.5px; }
.vital-foot { font-size: 9px; }
.reload-hint { font-size: 9px; }
.wslot { font-size: 9.5px; }
#help-hint { font-size: 9px; }
#subtitle-text { font-size: 10.5px; }
.toast { font-size: 10px; }
.kill-item { font-size: 9.5px; }
#boss-tag { font-size: 9.5px; }
#boss-hp-text { font-size: 10.5px; }
#boss-name { font-size: 17px; }
.shop-sub { font-size: 9px; }
.shop-tab { font-size: 10px; }
.card-id, .card-tag { font-size: 9px; }
.card-desc { font-size: 10px; }
.card-stat { font-size: 8.5px; }
.card-note { font-size: 8.5px; }
.buy-btn { font-size: 9.5px; }
.aside-stat { font-size: 9px; }
.shop-tip { font-size: 9.5px; }
.shop-footer { font-size: 9px; }
.deploy-head p { font-size: 10px; }
.spc-empty { font-size: 10px; }
.spc-cover, .spc-occupants { font-size: 9.5px; }
.deploy-note { font-size: 9.5px; }
#lane-indicator { font-size: 9px; }

/* Shop legibility & surface polish */
.shop-card { background: linear-gradient(150deg, rgba(28, 34, 31, .94), rgba(12, 16, 14, .88)); border-color: rgba(174,194,178,.22); }
.shop-card::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: rgba(233,173,79,.26); }
.shop-card.owned::before, .shop-card.maxed::before { background: rgba(103,221,200,.55); }
.shop-card:hover::before { background: var(--amber); }
.shop-card:hover { border-color: rgba(233,173,79,.5); }
.card-name { font-size: 18px; }
.card-id, .card-tag { font-size: 9.5px; color: #859186; }
.card-desc { font-size: 10.5px; line-height: 1.6; color: #aeb9ac; }
.card-stat { font-size: 9px; color: #7d8a7e; }
.card-stat i { width: 52px; height: 3px; background: rgba(176,201,180,.15); }
.card-stat i span { background: linear-gradient(90deg, var(--teal-dim), var(--teal)); }
.card-price { font-size: 12px; }
.buy-btn { font-size: 10px; padding: 7px 11px; letter-spacing: .06em; }
.level-pips i { width: 13px; height: 5px; }
.card-note { font-size: 9px; color: #68756b; }
.aside-stat { font-size: 10px; padding: 5px 0; }
.aside-title { font-size: 9.5px; }
.shop-tip { font-size: 10px; line-height: 1.75; color: #778478; }
.shop-tab { font-size: 10.5px; }
.shop-sub { font-size: 9.5px; }
.shop-footer { font-size: 9.5px; }
.shop-header { background: linear-gradient(90deg, rgba(233,173,79,.035), transparent 45%); }
.card-icon { background: radial-gradient(circle at 50% 60%, rgba(103,221,200,.1), rgba(0,0,0,.28)); border-color: rgba(174,194,178,.18); }
.card-icon.def { background: radial-gradient(circle at 50% 60%, rgba(233,173,79,.12), rgba(0,0,0,.28)); }
.card-icon.supply { background: radial-gradient(circle at 50% 60%, rgba(142,198,106,.1), rgba(0,0,0,.28)); }
.pause-modal .modal-head h2 { font-size: 56px; }
.setting > span { font-size: 10px; }
.pause-stats div { font-size: 10px; }
.help-block p { font-size: 10px; }
.help-block h3 { font-size: 13px; }
.shop-grid { gap: 11px; }

/* Overlay copy readability */
.help-block p { font-size: 10px; line-height: 1.8; color: #a7b2a6; }
.help-block h3 { font-size: 14px; margin-bottom: 8px; }
.help-block { padding: 18px 24px; }
.modal-head h2 { font-size: 54px; }
.setting > span { font-size: 10.5px; color: #9eaa9e; }
.pause-stats div { font-size: 10px; }
.pause-stats b { font-size: 17px; }
.deploy-head h2 { font-size: 35px; }
.deploy-note { line-height: 1.75; color: #89968a; }
.spc-cover { color: #82e8d6; }
#subtitle-text { color: #dfe5d8; }


/* Weapon upgrade matrix */
.upgrade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 7px 0 2px; }
.upgrade-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 7px 5px; border: 1px solid rgba(199,218,202,.16); background: rgba(9,14,12,.6); color: var(--muted); text-align: left; transition: border-color .15s, background .15s; }
.upgrade-btn:hover:not(:disabled) { border-color: rgba(113,255,213,.5); background: rgba(19,32,27,.78); }
.upgrade-btn:disabled { opacity: .55; cursor: not-allowed; }
.upgrade-btn.maxed { opacity: .9; border-color: rgba(235,174,73,.3); }
.upg-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; color: var(--text); }
.upg-pips { display: flex; gap: 3px; }
.upg-pips i { width: 12px; height: 3px; background: rgba(190,212,191,.18); }
.upg-pips i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(113,255,213,.5); }
.upg-price { font-family: var(--font-mono); font-size: 8.5px; color: var(--amber); letter-spacing: .05em; }
.upgrade-btn.maxed .upg-price { color: var(--cyan); }

/* XP + perks ---------------------------------------------------------------- */
.xp-panel { position: absolute; right: 20px; bottom: 198px; width: 342px; z-index: 5; padding: 7px 11px 8px; background: linear-gradient(180deg, rgba(10,15,13,.86), rgba(8,12,11,.74)); border: 1px solid rgba(174,194,178,.16); }
.xp-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--muted); }
.xp-head b { color: var(--cyan); font-size: 11px; margin-left: 3px; }
.xp-track { height: 4px; margin: 5px 0 5px; background: rgba(190,212,191,.13); overflow: hidden; }
.xp-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4fd8ff, #b18cff); box-shadow: 0 0 9px rgba(92,203,255,.55); transition: width .2s linear; }
.xp-perks { display: flex; gap: 4px; min-height: 11px; align-items: center; font-family: var(--font-mono); font-size: 9.5px; color: var(--cyan); }
.xp-perks .empty { color: var(--dim); font-size: 8px; letter-spacing: .1em; }
.xp-perks > span:not(.empty):not(.ps-sep) { display: inline-flex; width: 15px; height: 15px; align-items: center; justify-content: center; border: 1px solid rgba(207,134,255,.35); background: rgba(80,40,100,.25); }

.perk-modal { width: min(1000px, 94vw); }
.perk-lead { margin: 0; padding: 0 36px 14px; font-family: var(--font-mono); font-size: 9.5px; line-height: 1.6; color: var(--muted); }
.perk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 30px 20px; }
.perk-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 235px; padding: 18px 16px 15px; border: 1px solid color-mix(in srgb, var(--rarity) 55%, transparent); background: linear-gradient(165deg, color-mix(in srgb, var(--rarity) 13%, rgba(8,12,10,.92)), rgba(8,12,10,.94)); color: var(--text); text-align: left; overflow: hidden; transition: transform .14s, border-color .14s, background .14s; }
.perk-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--rarity); box-shadow: 0 0 18px var(--rarity); }
.perk-card:hover { transform: translateY(-3px); border-color: var(--rarity); background: linear-gradient(165deg, color-mix(in srgb, var(--rarity) 22%, rgba(8,12,10,.92)), rgba(8,12,10,.97)); }
.perk-card.perk-locked { opacity: .66; cursor: wait; filter: saturate(.65); transform: none; }
.perk-card.perk-locked:hover { transform: none; }
.perk-rarity { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .22em; color: var(--rarity); }
.perk-icon { font-size: 30px; line-height: 1; color: var(--rarity); text-shadow: 0 0 18px var(--rarity); }
.perk-name { font-family: var(--font-display, var(--font-cond)); font-size: 21px; line-height: 1; letter-spacing: .03em; }
.perk-desc { font-family: var(--font-mono); font-size: 9.5px; line-height: 1.65; color: var(--muted); flex: 1; }
.perk-effect { width: 100%; padding-top: 5px; border-top: 1px solid rgba(174,194,178,.11); font-family: var(--font-mono); font-size: 9px; line-height: 1.45; color: #c9d1c4; }
.perk-effect b { color: var(--amber); font-size: 8px; font-weight: 500; letter-spacing: .13em; margin-right: 5px; }
.perk-effect.next b { color: var(--teal); }
.perk-effect.next { color: #e4f6ee; }
.perk-pick { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; color: var(--rarity); border-bottom: 1px solid var(--rarity); padding-bottom: 3px; }
.perk-foot { padding: 0 36px 24px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; color: var(--dim); }

/* Damage direction arrows */
.damage-indicators { position: absolute; left: 50%; top: 50%; z-index: 7; pointer-events: none; width: 0; height: 0; }
.damage-arrow { position: absolute; left: 0; top: 0; width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-bottom: 24px solid rgba(255,52,38,.95); filter: drop-shadow(0 0 7px rgba(255,52,38,.8)); transform-origin: 0 0; animation: dmgPulse 1.4s ease-out forwards; }
@keyframes dmgPulse { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Red dot sight */
.ch-sight { display: none; position: absolute; left: 50%; top: 50%; z-index: 6; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ff1f12; border: 1px solid rgba(15,0,0,.9); box-shadow: 0 0 6px #ff1f12, 0 0 18px rgba(255,35,20,.95); } .ch-sight::before { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 1px solid rgba(255,55,40,.55); border-radius: 50%; box-shadow: 0 0 8px rgba(255,40,25,.45) inset; }
#crosshair.reddot .ch-line { opacity: .16; }
#crosshair.reddot .ch-dot { opacity: 0; }
#crosshair.reddot .ch-sight { display: block; }

@media (max-width: 900px) {
  .xp-panel { width: 270px; right: 12px; bottom: 190px; }
  .perk-cards { grid-template-columns: 1fr; padding: 0 15px 14px; }
  .perk-card { min-height: 0; }
}

/* Arsenal: one full-width card per row with actions on the right */
.shop-grid { grid-template-columns: 1fr; grid-auto-rows: max-content; gap: 12px; }
.shop-card { display: grid; grid-template-columns: minmax(0, 1fr) 252px; align-items: stretch; padding: 0; min-height: 0; }
.card-main { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 12px 19px; }
.card-main .card-top { padding-right: 4px; }
.card-main .card-desc { flex: 0 1 auto; }
.card-main .card-stats { margin-top: auto; }
.card-side { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; padding: 13px 14px 13px 15px; border-left: 1px solid rgba(174,194,178,.14); background: rgba(5,8,7,.24); }
.side-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: var(--dim); }
.side-price { margin: 0 !important; font-size: 17px; }
.card-side .side-buy { width: 100%; padding: 10px 8px; font-size: 10.5px; }
.card-side .upgrade-grid { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; }
.card-side .upgrade-btn { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 7px; width: 100%; padding: 8px 9px; }
.card-side .upg-label { font-size: 9.5px; }
.card-side .upg-pips { align-self: center; }
.card-side .upg-pips i { width: 11px; }
.card-side .upg-price { font-size: 9.5px; text-align: right; }
.card-main .card-foot { margin-top: 3px; }
.card-main .card-price { margin-right: 0; }
@media (max-width: 1050px) {
  .shop-card { grid-template-columns: minmax(0, 1fr) 220px; }
  .card-side .upgrade-btn { grid-template-columns: 52px 1fr auto; }
}
@media (max-width: 760px) {
  .shop-card { grid-template-columns: 1fr; }
  .card-side { border-left: 0; border-top: 1px solid rgba(174,194,178,.14); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .card-side .upgrade-grid { flex: 1 1 100%; }
  .side-price { margin-right: auto !important; }
  .card-side .side-buy { width: auto; min-width: 130px; }
}

/* While pointer lock is unavailable, no stray cursor over the play field */
body.fallback-look, body.fallback-look #hud, body.fallback-look #game-canvas,
body.fallback-look #crosshair, body.fallback-look #damage-indicators { cursor: none !important; }

/* Mouse-capture recovery after Esc */
.lock-overlay { position: fixed; inset: 0; z-index: 16; display: flex; align-items: center; justify-content: center; background: rgba(3,6,5,.52); backdrop-filter: blur(2px); }
.lock-card { width: min(560px, 92vw); padding: 34px 38px 28px; border: 1px solid rgba(233,173,79,.5); background: linear-gradient(145deg, rgba(18,24,21,.98), rgba(6,9,8,.99)); box-shadow: 0 30px 110px rgba(0,0,0,.72); }
.lock-card .eyebrow { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; color: var(--amber); margin-bottom: 8px; }
.lock-card h3 { margin: 0 0 10px; font-size: 44px; line-height: .95; letter-spacing: .03em; color: var(--text); }
.lock-card p { margin: 0 0 20px; font-family: var(--font-mono); font-size: 10px; line-height: 1.75; color: var(--muted); }
.lock-card .big-btn { width: 100%; margin-bottom: 9px; }
.lock-card .ghost-btn { width: 100%; min-height: 42px; }
.lock-card kbd { border: 1px solid rgba(233,173,79,.35); padding: 1px 5px; color: var(--amber); font-family: var(--font-mono); font-size: 10px; }

.relics-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; min-height: 0; }
.relics-line span { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .04em; color: var(--amber); border: 1px solid rgba(233,173,79,.25); padding: 2px 4px; background: rgba(70,45,15,.22); }
.relics-line b { font-size: 10px; line-height: 1; }

/* The long title needs breathing room before the brief */
.hero-copy { margin-top: 32px; max-width: 620px; }
@media (max-height: 800px) {
  .hero-copy { margin-top: 20px; }
}

/* ---------------------------------------------------------------- death cinematic */
.death-cinematic {
  position: fixed; inset: 0; z-index: 17; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(8,9,9,.05) 0%, rgba(4,4,4,.38) 48%, rgba(2,2,2,.88) 100%);
  opacity: 0; transition: opacity .45s ease;
}
.death-cinematic.visible { opacity: 1; }
.death-cinematic.hidden { display: none; }
.death-grain {
  position: absolute; inset: -20%; pointer-events: none; opacity: .15;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px);
  animation: deathGrain .18s steps(2) infinite;
}
@keyframes deathGrain { 0% { transform: translateY(0); } 50% { transform: translateY(2px); } 100% { transform: translateY(-1px); } }
.death-main {
  position: relative; z-index: 2; max-width: 1180px; padding: 0 36px; text-align: center;
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .7s ease, transform .7s ease;
  font-weight: 700; line-height: .98; letter-spacing: -.01em;
}
.death-main.show { opacity: 1; transform: translateY(0) scale(1); }
.death-main span { display: block; color: #e9e2d2; font-size: clamp(24px, 3.4vw, 54px); letter-spacing: .02em; }
.death-main b { display: block; margin-top: 12px; color: #f04435; font-size: clamp(44px, 7.2vw, 118px); text-shadow: 0 0 34px rgba(240,68,53,.35); }
.death-parts {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center;
  max-width: 1100px; padding: 0 30px; margin-top: 36px; text-align: center;
}
.death-parts span {
  opacity: 0; transform: translateY(18px) scale(.94); transition: opacity .35s ease, transform .35s ease;
  color: #f0e9d8; font-size: clamp(22px, 3.8vw, 64px); font-weight: 700; letter-spacing: .015em; line-height: 1;
  text-shadow: 0 3px 0 rgba(0,0,0,.45), 0 0 24px rgba(255,75,45,.18);
}
.death-parts span.show { opacity: 1; transform: translateY(0) scale(1); }
.death-parts span:last-child { color: #f04435; }
.death-caption {
  position: absolute; bottom: 42px; z-index: 2; color: #8e938a; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .34em; opacity: 0; transition: opacity 1s ease;
}
.death-cinematic.visible .death-caption { opacity: .8; }
@media (max-width: 700px) {
  .death-parts { gap: 6px 12px; margin-top: 24px; }
  .death-main { padding: 0 20px; }
}

/* ---------------------------------------------------------------- main menu player / top */
.menu-content { grid-template-columns: minmax(0, 1fr) 322px; }
.player-name-field {
  display: flex; align-items: center; gap: 12px; margin: 13px 0 16px; max-width: 430px;
}
.player-name-field > span {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; color: var(--accent);
}
.player-name-field input {
  flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 12px;
  border: 1px solid rgba(174,194,178,.26); border-left: 2px solid var(--accent);
  background: rgba(7,11,9,.82); color: #efe9da; outline: none;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .09em;
}
.player-name-field input::placeholder { color: rgba(174,194,178,.42); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; }
.player-name-field input:focus { border-color: var(--accent); background: rgba(14,20,16,.96); box-shadow: 0 0 0 1px rgba(243,200,110,.18); }
.leaderboard-card {
  border: 1px solid rgba(243,200,110,.25); background: rgba(8,11,10,.83); padding: 10px 12px 11px;
  box-shadow: inset 0 0 30px rgba(243,200,110,.035);
}
.leaderboard-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .2em; color: #f3c86e;
  border-bottom: 1px solid rgba(243,200,110,.16); padding-bottom: 7px;
}
.leaderboard-list { max-height: 238px; overflow: auto; padding-right: 2px; }
.leaderboard-list::-webkit-scrollbar { width: 3px; }
.leaderboard-list::-webkit-scrollbar-thumb { background: rgba(243,200,110,.35); }
.lb-row {
  display: grid; grid-template-columns: 18px minmax(0,1fr) 44px; gap: 7px; align-items: start;
  padding: 7px 0; border-bottom: 1px solid rgba(174,194,178,.08);
}
.lb-row:last-child { border-bottom: 0; }
.lb-place { font-family: var(--font-mono); font-size: 9.5px; color: rgba(174,194,178,.52); padding-top: 1px; }
.lb-main { min-width: 0; }
.lb-name { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; font-family: var(--font-display); font-size: 13px; letter-spacing: .07em; color: #eee7d7; line-height: 1.1; }
.lb-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-score { flex: 0 0 auto; color: #f3c86e; font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; }
.lb-guns, .lb-perks { margin-top: 3px; font-family: var(--font-mono); font-size: 8.5px; color: #9da59a; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-guns::before { content: 'ОРУЖИЕ: '; color: rgba(243,200,110,.7); }
.lb-perks::before { content: 'ПЕРКИ: '; color: rgba(255,91,180,.72); }
.lb-kills { text-align: right; font-family: var(--font-mono); font-size: 9.5px; color: #d7d2c4; line-height: 1.25; }
.lb-kills b { display: block; font-size: 14px; color: #f0eadb; font-weight: 500; }
.lb-kills span { font-size: 8px; color: var(--muted); letter-spacing: .05em; }
.lb-empty { padding: 12px 4px; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-align: center; letter-spacing: .1em; }
.lb-badge { display: inline-block; margin-left: 4px; color: #70e0b8; font-size: 8px; letter-spacing: .08em; }
.go-stats { grid-template-columns: repeat(6, 1fr); }
#go-class, #win-class { font-size: 17px; letter-spacing: .04em; }
@media (max-width: 1120px) {
  .menu-content { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .leaderboard-list { max-height: 210px; }
}
/* narrow desktop windows (or Windows scaling 125–150 %): the side column with
   open co-op rooms and the top moves under the menu instead of disappearing */
@media (max-width: 900px) {
  .menu-content {
    grid-template-columns: 1fr; align-items: start; align-content: start; gap: 16px;
    max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
  }
  .menu-side { display: flex; max-height: none; overflow: visible; padding-bottom: 12px; }
  .menu-side .brief-card, .menu-side .controls-card, .menu-side .quote { display: none; }
  .menu-side .leaderboard-list { max-height: 240px; }
}
@media (max-width: 520px) {
  .player-name-field { max-width: none; }
  .go-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------- zombie walk epilogue */
#screen-gameover.walk-mode {
  justify-content: flex-end; align-items: center;
  background: linear-gradient(90deg, rgba(3,5,4,0) 0%, rgba(3,5,4,.06) 48%, rgba(3,5,4,.88) 78%, rgba(2,3,3,.96) 100%);
  pointer-events: none;
}
#screen-gameover.walk-mode .gameover-modal {
  width: 382px; max-width: 42vw; max-height: 90vh; margin: 0 22px 0 0;
  padding: 16px 18px 15px; overflow-y: auto; pointer-events: auto;
  background: rgba(8,11,10,.94); border-color: rgba(240,68,53,.28);
}
#screen-gameover.walk-mode .go-title { font-size: clamp(34px, 3.3vw, 54px); margin: 7px 0 8px; }
#screen-gameover.walk-mode .go-sub { font-size: 10px; line-height: 1.5; }
#screen-gameover.walk-mode .go-stats { grid-template-columns: repeat(2, 1fr); margin-top: 11px; }
#screen-gameover.walk-mode .go-stats div { padding: 7px 3px; }
#screen-gameover.walk-mode .go-stats b { font-size: 17px; }
#screen-gameover.walk-mode .go-record { font-size: 8.5px; margin-top: 8px; }
#screen-gameover.walk-mode .go-actions { margin-top: 10px; gap: 8px; }
#screen-gameover.walk-mode .go-credits {
  display: block; margin: 10px 0 0; padding: 9px 0 2px; border-top: 1px solid rgba(174,194,178,.12);
  max-height: 175px; overflow: auto;
}
#screen-gameover.walk-mode .go-credits::-webkit-scrollbar { width: 3px; }
#screen-gameover.walk-mode .go-credits::-webkit-scrollbar-thumb { background: rgba(240,68,53,.35); }
.go-credits { display: none; }
.go-credits-title { color: var(--danger); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; margin-bottom: 5px; }
.go-credit-row { display: flex; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(174,194,178,.07); font-family: var(--font-mono); font-size: 8.5px; line-height: 1.4; color: #9da59a; }
.go-credit-index { flex: 0 0 14px; color: rgba(240,68,53,.7); }
.go-credit-row b { color: #d8d2c3; font-weight: 500; }
.go-credit-empty { font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); padding: 3px 0 7px; }
@media (max-width: 760px) {
  #screen-gameover.walk-mode { justify-content: center; background: rgba(3,5,4,.84); }
  #screen-gameover.walk-mode .gameover-modal { width: calc(100% - 24px); max-width: none; max-height: 84vh; margin: 0; }
}

/* ---------------------------------------------------------------- gate integrity */
.gate-health {
  margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255,120,86,.18);
}
.gate-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .13em; color: #ff9b7a;
}
.gate-head b { font-size: 10px; font-weight: 500; color: #ffd0bf; letter-spacing: .04em; }
.gate-track {
  height: 5px; margin-top: 4px; padding: 1px;
  border: 1px solid rgba(255,120,86,.35); background: rgba(0,0,0,.45);
}
.gate-track span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #7b2016, #d64a30 62%, #ff9a6d);
  box-shadow: 0 0 9px rgba(227,83,61,.45); transition: width .16s linear;
}
.gate-health.critical .gate-track span { background: linear-gradient(90deg, #6e130c, #ff3b25); }
.gate-state {
  margin-top: 4px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; color: #ff9b7a;
}
.gate-health.hidden { display: none; }

/* ---------------------------------------------------------------- gate attack alert */
#gate-alert {
  position: absolute; left: 50%; top: 29%; transform: translate(-50%, -50%);
  z-index: 4; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(32px, 5.2vw, 72px);
  font-weight: 700; letter-spacing: .06em; color: #ff6748;
  text-shadow: 0 4px 0 rgba(0,0,0,.62), 0 0 26px rgba(255,63,32,.5), 0 0 70px rgba(255,63,32,.28);
  animation: gate-alert-pulse .72s steps(2, end) infinite;
}
#gate-alert.hidden { display: none; }
@keyframes gate-alert-pulse {
  0%, 100% { opacity: .64; transform: translate(-50%, -50%) scale(.985); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.015); }
}
@media (max-width: 760px) {
  #gate-alert { top: 25%; font-size: clamp(24px, 8vw, 44px); }
}

/* ---------------------------------------------------------------- mobile controls */
#mobile-controls { display: none; }
body.mobile-device #game-canvas { touch-action: none; }
body.mobile-device.mobile-playing #mobile-controls { display: block; }
body.mobile-device #help-hint { display: none; }
body.mobile-device .hud-top { grid-template-columns: 96px 1fr; gap: 6px; top: 8px; left: 8px; right: 8px; }
body.mobile-device .economy-panel { display: none; }
body.mobile-device .minimap-panel { width: 96px; height: 96px; padding: 0; overflow: hidden; }
body.mobile-device .minimap-panel .panel-cap,
body.mobile-device .minimap-legend { display: none; }
body.mobile-device #minimap { width: 96px; height: 96px; display: block; }
body.mobile-device .objective-panel { left: 8px; top: 112px; width: 205px; padding: 8px 10px; }
body.mobile-device #xp-panel { display: none; }
body.mobile-device #subtitles { display: none; }
body.mobile-device #street-compass { display: none; }
body.mobile-device #vitals,
body.mobile-device #weapon-hud {
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
  width: calc(50% - 14px); max-width: 180px;
}
body.mobile-device #vitals { left: 8px; }
body.mobile-device #weapon-hud { right: 8px; }
body.mobile-device #xp-panel {
  bottom: calc(300px + env(safe-area-inset-bottom, 0px));
  right: 8px; width: calc(50% - 14px); max-width: 180px;
}
.mobile-pad {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 110px; height: 110px; border-radius: 50%;
  border: 1px solid rgba(233,173,79,.43);
  background: radial-gradient(circle at 50% 45%, rgba(30,42,37,.55), rgba(7,11,10,.32));
  box-shadow: 0 0 20px rgba(0,0,0,.32), inset 0 0 22px rgba(233,173,79,.08);
  z-index: 20; pointer-events: auto; touch-action: none; user-select: none;
  -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.move-pad { left: 14px; }
.look-pad { right: 14px; }
.mobile-pad::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%;
  border: 1px dashed rgba(174,194,178,.15);
}
.pad-knob {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,221,164,.38), rgba(160,103,38,.22));
  border: 1px solid rgba(233,173,79,.5);
  box-shadow: 0 0 14px rgba(233,173,79,.15);
  pointer-events: none;
}
.mobile-pad.active { border-color: rgba(114,238,213,.7); box-shadow: 0 0 26px rgba(103,221,200,.2), inset 0 0 22px rgba(103,221,200,.08); }
.mobile-pad.active .pad-knob { background: radial-gradient(circle at 35% 30%, rgba(190,255,238,.34), rgba(33,105,86,.3)); border-color: rgba(114,238,213,.7); }
.pad-label {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: rgba(174,194,178,.5);
}
.mobile-auto {
  position: absolute; left: 50%; bottom: calc(17px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); width: 100px; height: 42px; z-index: 21;
  border: 1px solid rgba(233,173,79,.38); background: rgba(8,12,10,.62);
  color: var(--muted); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .09em;
  pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.mobile-auto.active { color: #0a1612; background: var(--teal); border-color: var(--teal); box-shadow: 0 0 18px rgba(103,221,200,.35); }
.mobile-fire-hint {
  position: absolute; left: 50%; bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 19; pointer-events: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; color: rgba(174,194,178,.48);
}
@media (max-height: 540px) {
  .mobile-pad { width: 88px; height: 88px; }
  .mobile-pad .pad-knob { width: 38px; height: 38px; }
  .mobile-auto { width: 86px; height: 36px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-device #vitals, body.mobile-device #weapon-hud { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-device #xp-panel { display: none; }
  .mobile-fire-hint { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
}

/* --------------------------------------------------------- mobile orientation */
body.mobile-device { overscroll-behavior: none; }
body.mobile-device.mobile-playing { overflow: hidden; }
body.mobile-device.mobile-playing #game-root { touch-action: none; }
body.mobile-device.mobile-landscape .hud-top {
  grid-template-columns: 84px 1fr; gap: 5px; top: 6px; left: 6px; right: 6px;
}
body.mobile-device.mobile-landscape .minimap-panel { width: 84px; height: 84px; }
body.mobile-device.mobile-landscape #minimap { width: 84px; height: 84px; }
body.mobile-device.mobile-landscape .objective-panel {
  top: 102px; left: 6px; width: 188px; padding: 6px 8px;
}
body.mobile-device.mobile-landscape .objective-title { font-size: 16px; }
body.mobile-device.mobile-landscape .objective-sub { font-size: 8px; margin: 3px 0 5px; }
body.mobile-device.mobile-landscape #vitals,
body.mobile-device.mobile-landscape #weapon-hud {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: calc(50% - 12px); max-width: 190px;
}
body.mobile-device.mobile-landscape #xp-panel { display: none; }
body.mobile-device.mobile-landscape .mobile-pad {
  width: 84px; height: 84px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
body.mobile-device.mobile-landscape .pad-knob { width: 34px; height: 34px; }
body.mobile-device.mobile-landscape .mobile-auto {
  width: 88px; height: 32px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  font-size: 7.5px;
}
body.mobile-device.mobile-landscape .mobile-fire-hint { bottom: calc(54px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------- mobile main menu */
body.mobile-device .menu-side {
  display: flex; flex-direction: column; gap: 8px; min-height: 0;
}
body.mobile-device .menu-side .brief-card,
body.mobile-device .menu-side .controls-card,
body.mobile-device .menu-side .quote { display: none; }
body.mobile-device .menu-side .leaderboard-card { padding: 8px 10px 9px; }
body.mobile-device .menu-side .leaderboard-list { max-height: 190px; }
body.mobile-device .menu-content {
  grid-template-columns: 1fr; gap: 12px; padding: 0 6vw 10px;
  align-items: start; align-content: start;
  max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain;
}
body.mobile-device .menu-hero { max-width: 100%; min-width: 0; }
body.mobile-device.mobile-portrait .menu-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.mobile-device.mobile-portrait .menu-actions .big-btn { grid-column: 1 / -1; }
body.mobile-device.mobile-portrait .menu-actions .ghost-btn { min-height: 48px; padding: 0 6px; font-size: 9px; letter-spacing: .08em; text-align: center; line-height: 1.35; }
body.mobile-device.mobile-portrait .menu-actions .skins-btn i { display: none; }
body.mobile-device .hero-copy { display: none; }
body.mobile-device .menu-meta { display: none; }
body.mobile-device .eyebrow { font-size: 8.5px; }
body.mobile-device.mobile-portrait .hero-title .line1 { font-size: 17vw; }
body.mobile-device.mobile-portrait .hero-title .line2 { font-size: 19vw; }
body.mobile-device .menu-screen { grid-template-rows: 58px 1fr 30px; }
body.mobile-device .menu-top { padding: 10px 16px 0; }
body.mobile-device .brand-name { font-size: 15px; }
body.mobile-device .brand-sub { font-size: 8px; }
body.mobile-device .menu-footer { padding: 0 12px 8px; font-size: 8px; gap: 10px; }
body.mobile-device .menu-footer span:nth-child(2) { display: none; }

body.mobile-device.mobile-landscape .menu-screen { grid-template-rows: 36px 1fr; }
body.mobile-device.mobile-landscape .menu-footer { display: none; }
body.mobile-device.mobile-landscape .menu-top { padding: 5px 14px 0; }
body.mobile-device.mobile-landscape .brand-name { font-size: 13px; }
body.mobile-device.mobile-landscape .menu-build { font-size: 8px; }
body.mobile-device.mobile-landscape .menu-content {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 28vw);
  gap: 14px; padding: 0 14px 8px; align-items: center;
  max-height: calc(100dvh - 36px); overflow: hidden;
}
body.mobile-device.mobile-landscape .eyebrow { display: none; }
body.mobile-device.mobile-landscape .hero-title { margin: 4px 0 10px; line-height: .9; }
body.mobile-device.mobile-landscape .hero-title .line1 { font-size: clamp(32px, 7vw, 64px); }
body.mobile-device.mobile-landscape .hero-title .line2 { font-size: clamp(40px, 8.5vw, 76px); }
body.mobile-device.mobile-landscape .player-name-field { margin: 6px 0 8px; }
body.mobile-device.mobile-landscape .player-name-field input { height: 30px; font-size: 16px; }
body.mobile-device.mobile-landscape .menu-actions { gap: 7px; }
body.mobile-device.mobile-landscape .big-btn { min-height: 46px; padding: 0 12px; }
body.mobile-device.mobile-landscape .big-btn-body b { font-size: 13px; }
body.mobile-device.mobile-landscape .big-btn-body small { font-size: 8px; }
body.mobile-device.mobile-landscape .ghost-btn { min-height: 46px; font-size: 9.5px; }
body.mobile-device.mobile-landscape .menu-side .leaderboard-list { max-height: calc(100dvh - 180px); }
body.mobile-device.mobile-landscape .leaderboard-head { margin-bottom: 4px; padding-bottom: 4px; }
body.mobile-device.mobile-landscape .lb-row { padding: 4px 0; }
body.mobile-device.mobile-landscape .lb-name { font-size: 11px; }
body.mobile-device.mobile-landscape .lb-guns,
body.mobile-device.mobile-landscape .lb-perks { display: none; }

/* visible-viewport anchoring protects against Safari zoom/address-bar offsets */
body.mobile-device.mobile-playing #game-root {
  inset: auto;
  left: var(--vv-left, 0px); top: var(--vv-top, 0px);
  width: var(--vv-width, 100vw); height: var(--vv-height, 100dvh);
}
body.mobile-device.mobile-playing #game-canvas { width: 100%; height: 100%; }

/* --------------------------------------------- adaptive mobile HUD / sticks */
body.mobile-device .weapon-art,
body.mobile-device .weapon-slots { display: none; }
body.mobile-device .mobile-pad {
  width: clamp(86px, min(25vw, 14vh), 112px);
  height: clamp(86px, min(25vw, 14vh), 112px);
}
body.mobile-device .move-pad { left: clamp(10px, 3vw, 20px); }
body.mobile-device .look-pad { right: clamp(30px, 8vw, 52px); }
body.mobile-device .mobile-auto {
  width: clamp(82px, 23vw, 100px);
  height: 40px;
}
body.mobile-device #vitals,
body.mobile-device #weapon-hud {
  width: min(calc(50vw - 10px), 166px);
  max-width: 166px;
  bottom: calc(124px + env(safe-area-inset-bottom, 0px));
}
body.mobile-device.mobile-portrait .hud-top {
  grid-template-columns: 78px 1fr; gap: 5px; top: 6px; left: 6px; right: 6px;
}
body.mobile-device.mobile-portrait .minimap-panel { width: 78px; height: 78px; }
body.mobile-device.mobile-portrait #minimap { width: 78px; height: 78px; }
body.mobile-device.mobile-portrait .objective-panel {
  top: 90px; left: 6px; width: 192px; padding: 7px 9px;
}
body.mobile-device.mobile-portrait .objective-title { font-size: 17px; }
body.mobile-device.mobile-portrait .objective-sub { font-size: 8px; margin: 3px 0 5px; }
body.mobile-device.mobile-portrait .mobile-fire-hint { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape .mobile-pad { width: 84px; height: 84px; }
body.mobile-device.mobile-landscape .move-pad { left: 14px; }
body.mobile-device.mobile-landscape .look-pad { right: 34px; }
body.mobile-device.mobile-landscape .mobile-auto { width: 88px; height: 32px; }
body.mobile-device.mobile-landscape .mobile-fire-hint { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape #vitals,
body.mobile-device.mobile-landscape #weapon-hud {
  width: min(calc(25vw - 8px), 190px); max-width: 190px;
  bottom: calc(98px + env(safe-area-inset-bottom, 0px));
}
@media (max-height: 540px) and (orientation: landscape) {
  body.mobile-device .mobile-pad { width: 82px; height: 82px; }
  body.mobile-device .mobile-auto { width: 84px; height: 30px; }
  body.mobile-device #vitals, body.mobile-device #weapon-hud { bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
}

/* compact objective only in short landscape */
body.mobile-device.mobile-landscape .objective-panel {
  top: 88px; left: 6px; width: 170px; padding: 5px 7px;
}
body.mobile-device.mobile-landscape .objective-title { font-size: 14px; margin-top: 2px; }
body.mobile-device.mobile-landscape .objective-sub { display: none; }
body.mobile-device.mobile-landscape .objective-progress { display: none; }
body.mobile-device.mobile-landscape .objective-money { margin-top: 2px; }
body.mobile-device.mobile-landscape .objective-money em { display: none; }
body.mobile-device.mobile-landscape .gate-health { margin-top: 4px; padding-top: 4px; }

body.mobile-device.mobile-portrait .objective-panel { top: 102px; }
body.mobile-device.mobile-portrait .reload-hint { display: none; }

/* same description under the title on phones */
body.mobile-device .hero-copy {
  display: block; max-width: 100%; margin: 8px 0 12px; padding-left: 10px;
  border-left: 1px solid rgba(233,173,79,.42);
  font-family: var(--font-mono); font-size: 10px; line-height: 1.6;
  letter-spacing: -.01em; color: #9da79b;
}
body.mobile-device.mobile-landscape .hero-copy {
  margin: 2px 0 8px; font-size: 10px; line-height: 1.5;
}

/* staged opening message */
.wave-banner.staged .title {
  font-size: clamp(40px, 5.5vw, 88px);
  line-height: .94; letter-spacing: -.025em; max-width: 94vw;
}
.wave-banner.staged .title span {
  display: inline-block; opacity: 0; transform: translateY(.4em);
  animation: stagedWordIn .52s cubic-bezier(.2,.75,.25,1) forwards;
  animation-delay: calc(.35s + var(--i) * .58s);
}
@keyframes stagedWordIn {
  from { opacity: 0; transform: translateY(.4em); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.wave-banner.staged .kicker { margin-bottom: 10px; }

/* two-line objective banner */
.wave-banner.two-line .title { font-size: clamp(48px, 7.4vw, 108px); line-height: .9; }
.wave-banner.two-line .banner-line {
  display: block; opacity: 0; transform: translateY(.28em);
  animation: bannerLineIn .55s cubic-bezier(.2,.75,.25,1) forwards;
  animation-delay: var(--delay, 0s);
}
.wave-banner.two-line .banner-line.second {
  margin-top: .16em; font-size: .72em; letter-spacing: .055em; color: #f2e6c8;
}
@keyframes bannerLineIn {
  from { opacity: 0; transform: translateY(.28em); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

body.mobile-device.mobile-portrait .hero-title .line3 { margin-top: 8px; font-size: 11px; letter-spacing: .12em; }
body.mobile-device.mobile-landscape .hero-title .line3 { margin-top: 3px; font-size: 10px; letter-spacing: .1em; }

/* compact Egor item notification: one mono font for the whole block */
.egor-item-banner {
  width: min(560px, 90vw); padding: 15px 18px 14px;
  border: 1px solid rgba(112,224,184,.55); border-left: 3px solid var(--teal);
  background: rgba(6,12,10,.9); box-shadow: 0 0 34px rgba(112,224,184,.12);
  font-family: var(--font-mono); font-size: 10px; line-height: 1.65;
  color: #d4eee5; text-align: left; animation: bannerIn 3.8s ease both;
}
.egor-item-head {
  font-family: var(--font-mono); font-size: 10px; line-height: 1.4;
  letter-spacing: .16em; color: var(--teal); font-weight: 600;
}
.egor-item-name {
  margin: 6px 0 5px; font-family: var(--font-mono); font-size: 15px;
  line-height: 1.2; letter-spacing: .05em; color: #f2e6c8; font-weight: 600;
}
.egor-item-copy { font-family: var(--font-mono); font-size: 10px; color: #aebdb4; }
.egor-item-collection {
  margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(112,224,184,.18);
  font-family: var(--font-mono); font-size: 10px; color: #bdf3e5;
}
body.mobile-device .egor-item-banner { width: min(92vw, 430px); padding: 12px 14px; }

/* keep desktop menu buttons away from the footer */
@media (min-width: 861px) {
  .menu-content { padding-bottom: 4.5vh; }
}

/* make death-screen actions reachable on short desktop windows */
.gameover-modal { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.go-actions {
  position: sticky; bottom: 0; z-index: 3;
  padding-top: 8px; background: linear-gradient(180deg, transparent, rgba(7,10,10,.97) 38%);
}
@media (max-height: 740px) {
  .gameover-modal { padding: 20px 32px 18px; }
  .go-title { font-size: clamp(46px, 6.6vw, 72px); margin: 8px 0 10px; }
  .go-sub { margin-bottom: 12px; line-height: 1.5; }
  .go-stats div { padding: 7px 3px; }
  .go-stats b { font-size: 19px; }
  .go-record { margin-bottom: 12px; }
}

/* compact desktop menu for low windows */
@media (min-width: 861px) and (max-height: 820px) {
  .menu-screen { grid-template-rows: 64px 1fr 36px; }
  .menu-content { padding-bottom: 1.5vh; }
  .menu-top { padding-top: 10px; }
  .hero-title { margin: 8px 0 14px; line-height: .9; }
  .hero-title .line1 { font-size: clamp(50px, 10.5vh, 120px); }
  .hero-title .line2 { font-size: clamp(62px, 12.5vh, 145px); }
  .hero-title .line3 { margin-top: 8px; font-size: clamp(12px, 2vh, 24px); }
  .hero-copy { font-size: 10.5px; line-height: 1.55; margin-bottom: 14px; padding-left: 12px; }
  .player-name-field { margin: 8px 0 12px; }
  .player-name-field input { height: 30px; }
  .menu-actions .big-btn { min-height: 50px; }
  .menu-actions .ghost-btn { min-height: 50px; }
  .menu-meta { margin-top: 8px; font-size: 8px; }
  .menu-footer { padding-bottom: 10px; }
}

@media (min-width: 861px) and (max-height: 620px) {
  .menu-screen { grid-template-rows: 52px 1fr 30px; }
  .eyebrow { display: none; }
  .hero-copy { font-size: 10px; line-height: 1.45; margin-bottom: 10px; }
  .menu-meta { display: none; }
  .menu-actions .big-btn, .menu-actions .ghost-btn { min-height: 46px; }
  .player-name-field { margin: 5px 0 9px; }
}

/* compact right menu column on short desktop windows */
@media (min-width: 861px) and (max-height: 820px) {
  .menu-side { gap: 8px; max-height: calc(100dvh - 126px); overflow-y: auto; padding-right: 2px; }
  .menu-side .quote { display: none; }
  .menu-side .leaderboard-list { max-height: 150px; }
  .menu-side .brief-card,
  .menu-side .controls-card { padding: 10px 12px; }
  .brief-row { padding-top: 5px; }
  .controls-title { margin-bottom: 5px; }
  .ctrl { padding: 2px 0; }
}
@media (min-width: 861px) and (max-height: 620px) {
  .menu-side .brief-card { display: none; }
  .menu-side .leaderboard-list { max-height: 118px; }
}

/* look stick centered, auto-fire on the right */
body.mobile-device .look-pad {
  left: 50%; right: auto; transform: translateX(-50%);
}
body.mobile-device .mobile-auto {
  left: auto; right: calc(14px + env(safe-area-inset-right, 0px));
  transform: none;
}
body.mobile-device.mobile-landscape .look-pad {
  left: 50%; right: auto; transform: translateX(-50%);
}
body.mobile-device.mobile-landscape .mobile-auto {
  left: auto; right: calc(20px + env(safe-area-inset-right, 0px));
  transform: none;
}
body.mobile-device #lock-overlay { display: none !important; }

/* dark plate behind the description under the game title */
.hero-copy {
  padding: 12px 16px;
  background: linear-gradient(100deg, rgba(4,8,6,.82), rgba(6,10,8,.62));
  border: 1px solid rgba(174,194,178,.12);
  border-left: 1px solid rgba(233,173,79,.58);
  box-shadow: 0 10px 28px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(3px);
}
body.mobile-device .hero-copy { padding: 8px 10px; }

/* patch notes */
button.menu-build { cursor: pointer; color: var(--dim); text-align: right; }
button.menu-build:hover { color: var(--amber); }
.patch-modal {
  width: min(760px, 92vw); max-height: min(84vh, 760px);
  display: flex; flex-direction: column; padding: 24px 28px 18px;
}
.patch-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid rgba(174,194,178,.14); }
.patch-head h2 { margin: 5px 0 0; font-size: 44px; line-height: .9; letter-spacing: .05em; color: #e9e2d2; }
.patch-list { min-height: 0; overflow-y: auto; padding: 14px 4px 8px 0; display: flex; flex-direction: column; gap: 11px; }
.patch-list::-webkit-scrollbar { width: 4px; }
.patch-list::-webkit-scrollbar-thumb { background: rgba(233,173,79,.4); }
.patch-entry { border: 1px solid rgba(174,194,178,.14); background: rgba(6,10,8,.52); padding: 13px 15px 11px; }
.patch-entry-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--dim); }
.patch-version { color: var(--amber); font-size: 10px; letter-spacing: .08em; }
.patch-date { color: rgba(174,194,178,.55); }
.patch-current-tag { margin-left: auto; color: var(--teal); border: 1px solid rgba(112,224,184,.35); padding: 2px 5px; font-size: 8px; }
.patch-entry h3 { margin: 7px 0 6px; font-size: 16px; letter-spacing: .06em; color: #eee7d7; }
.patch-entry ul { margin: 0; padding-left: 16px; font-family: var(--font-mono); font-size: 10px; line-height: 1.7; color: #aeb8ac; }
.patch-entry li + li { margin-top: 3px; }
.patch-foot { padding-top: 11px; border-top: 1px solid rgba(174,194,178,.14); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--dim); text-align: right; }
.patch-foot b { color: var(--amber); font-weight: 500; }
@media (max-width: 760px) {
  .patch-modal { width: calc(100% - 22px); max-height: calc(100dvh - 24px); padding: 16px 15px 12px; }
  .patch-head h2 { font-size: 30px; }
  .patch-entry { padding: 10px 11px; }
  .patch-entry h3 { font-size: 14px; }
  .patch-entry ul { font-size: 9.5px; }
}

/* grouped leaderboard + per-player history */
.lb-row { grid-template-columns: 18px minmax(0,1fr) 44px 24px; }
.lb-more-btn {
  align-self: start; justify-self: end; width: 22px; height: 20px; padding: 0;
  border: 1px solid rgba(243,200,110,.28); color: var(--amber);
  font-family: var(--font-mono); font-size: 10px; line-height: 1; cursor: pointer;
  background: rgba(8,12,10,.7);
}
.lb-more-btn:hover, .lb-more-btn[aria-expanded="true"] {
  color: #0a1410; background: var(--teal); border-color: var(--teal);
}
.lb-more-btn.empty { border: 0; background: transparent; pointer-events: none; }
.lb-history {
  margin: 0 0 7px 25px; padding: 6px 8px 7px; border-left: 1px solid rgba(112,224,184,.28);
  background: rgba(5,10,8,.58);
}
.lb-history-head {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em;
  color: var(--teal); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-history-row {
  display: grid; grid-template-columns: 58px minmax(0,1fr) 52px 40px; gap: 5px;
  align-items: baseline; padding: 3px 0; border-top: 1px solid rgba(174,194,178,.06);
  font-family: var(--font-mono); font-size: 8.5px; color: #9da59a;
}
.lb-history-score { color: #f3c86e; text-align: right; }
.lb-history-kills { color: #d7d2c4; text-align: right; }
.lb-history-time { color: var(--dim); text-align: right; }
body.mobile-device .lb-history { margin-left: 29px; }



/* grenade auto-throw countdown beside ammo */
.grenade-timer {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(174,194,178,.1);
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--dim);
}
.grenade-timer b { color: var(--amber); font-weight: 500; letter-spacing: .04em; }
.grenade-timer.ready b { color: var(--teal); animation: blink 1.2s steps(2) infinite; }
body.mobile-device .grenade-timer { font-size: 8.5px; margin-top: 4px; padding-top: 4px; }

/* =========================================================================
   v1.0 — player classes, ultimate meter, vacation, ability screen effects
   ========================================================================= */
:root { --cyan: #5ccbff; --cls: #ffb347; }
#subtitles { bottom: 166px; }

/* ---- skins / «ВНЕШНОСТЬ» ---- */
.skins-btn i { font-style: normal; margin-left: 6px; padding: 1px 4px; font-size: 8px; color: #0b0f0e; background: var(--amber); }
.coop-skins-btn { width: 100%; }
.skins-modal { width: min(820px, 94vw); max-height: 94vh; overflow-y: auto; }
.skins-body { display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 4px 36px 30px; }
.skins-stage {
  position: relative; height: 470px;
  background: radial-gradient(ellipse at 50% 85%, rgba(233,173,79,.16), rgba(5,8,8,.0) 60%), linear-gradient(180deg, rgba(20,26,24,.6), rgba(6,9,9,.85));
  border: 1px solid rgba(233,173,79,.18);
}
#skin-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: grab; touch-action: none; }
#skin-canvas:active { cursor: grabbing; }
.skins-drag { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; color: rgba(166,182,168,.5); pointer-events: none; }
.skins-side { display: flex; flex-direction: column; gap: 14px; }
.skin-rows { display: flex; flex-direction: column; gap: 8px; }
.skin-row {
  display: grid; grid-template-columns: 74px 34px 1fr 34px 38px; align-items: center; gap: 6px;
  padding: 6px 8px; background: rgba(8,12,11,.62); border: 1px solid rgba(255,255,255,.07);
}
.skin-slot { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--dim); }
.skin-swatch { display: inline-block; width: 11px; height: 11px; margin-right: 7px; vertical-align: 1px; border: 1px solid rgba(255,255,255,.4); }
.skin-val { text-align: center; font-family: var(--font-display); font-size: 15px; letter-spacing: .05em; color: #f2ead8; font-weight: 400; }
.skin-arrow {
  height: 30px; border: 1px solid rgba(233,173,79,.35); background: rgba(233,173,79,.06); color: var(--amber);
  font-size: 11px; cursor: pointer; transition: background .12s, transform .08s;
}
.skin-arrow:hover { background: rgba(233,173,79,.2); }
.skin-arrow:active { transform: scale(.94); }
.skin-count { font-family: var(--font-mono); font-size: 9px; color: rgba(166,182,168,.55); text-align: right; }
.skins-note { margin: 0; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: var(--muted); }
.skins-actions { display: flex; gap: 8px; }
.skins-actions .ghost-btn { flex: 1; }
@media (max-width: 760px) {
  .skins-body { grid-template-columns: 1fr; padding: 0 16px 20px; gap: 14px; }
  .skins-modal .modal-head h2 { font-size: 34px; }
  .skins-stage { height: 260px; }
  .skin-row { grid-template-columns: 62px 40px 1fr 40px 32px; }
  .skin-arrow { height: 36px; }
}

/* ---- menu header: «КАК ИГРАТЬ» top right ---- */
.menu-top-right { display: flex; align-items: center; gap: 14px; align-self: flex-start; }
.menu-howto {
  height: 26px; padding: 0 12px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em;
  color: var(--amber); background: rgba(8,11,10,.55); border: 1px solid rgba(233,173,79,.4); cursor: pointer;
}
.menu-howto:hover { background: rgba(233,173,79,.16); }
@media (max-width: 760px) {
  .menu-top-right { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
  .menu-howto { height: 24px; padding: 0 8px; font-size: 8.5px; }
}
/* the main button row now has 3 items */
@media (max-width: 760px) {
  .menu-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.mobile-device.mobile-portrait .menu-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- mobile crouch toggle ---- */
#mobile-crouch { display: none; }
body.mobile-device #mobile-crouch { display: block; }
body.mobile-device #mobile-controls .mobile-crouch {
  left: calc(8px + env(safe-area-inset-left, 0px)); right: auto; width: 72px; font-size: 9.5px;
  bottom: calc(218px + env(safe-area-inset-bottom, 0px)); border-color: rgba(233,173,79,.4);
}
body.mobile-device #mobile-controls .mobile-crouch[aria-pressed="true"] { background: rgba(233,173,79,.35); color: #fff; }
body.mobile-device.mobile-landscape #mobile-controls .mobile-crouch { bottom: auto; top: calc(66px + env(safe-area-inset-top, 0px)); }

/* ---- non-blocking perk offer under the crosshair ---- */
#perk-bar {
  position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(3, 190px); gap: 8px; z-index: 25; pointer-events: auto;
}
#perk-bar.hidden { display: none; }
#perk-bar .pb-head { grid-column: 1 / -1; text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--amber); text-shadow: 0 1px 3px #000; }
#perk-bar .pb-head b { display: inline-block; margin-left: 4px; padding: 0 5px; border: 1px solid var(--amber); }
#perk-bar .pb-card {
  display: grid; grid-template-columns: 18px 26px 1fr; align-items: center; gap: 6px; padding: 6px 8px; text-align: left;
  background: rgba(6,9,9,.62); border: 1px solid var(--rarity); border-left-width: 3px; cursor: pointer; opacity: .92;
}
#perk-bar .pb-card:hover { background: rgba(20,24,20,.85); opacity: 1; }
#perk-bar .pb-key { font-family: var(--font-mono); font-size: 12px; color: var(--amber); font-weight: 700; }
#perk-bar .pb-icon { font-size: 18px; text-align: center; }
#perk-bar .pb-text b { display: block; font-family: var(--font-mono); font-size: 10.5px; color: #f2ead8; letter-spacing: .04em; }
#perk-bar .pb-text em { display: block; font-style: normal; font-family: var(--font-mono); font-size: 9px; color: var(--rarity); line-height: 1.3; }
/* perks 2.0: svg icons, level pips, combo / reward cards */
#perk-bar { grid-template-columns: repeat(3, 190px); top: calc(50% + 46px); }
#perk-bar .pb-combo .pb-text em { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#perk-bar .pb-card { grid-template-columns: 18px 30px 1fr; }
#perk-bar .pb-icon { color: var(--pc, var(--rarity)); display: flex; align-items: center; justify-content: center; }
#perk-bar .pb-icon svg { width: 28px; height: 28px; filter: drop-shadow(0 0 4px var(--pc, transparent)); }
#perk-bar .pb-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 1px; }
#perk-bar .pb-tag { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .12em; color: var(--rarity); border: 1px solid var(--rarity); padding: 0 3px; line-height: 12px; }
#perk-bar .pb-tag.combo { color: #ff9be6; border-color: #ff5bd6; background: rgba(255,91,214,.16); }
#perk-bar .pb-tag.reward { color: #9ff0cf; border-color: #7ee0b8; }
#perk-bar .pb-opens { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; color: #ff9be6; }
#perk-bar .pb-pips { display: inline-flex; gap: 2px; font-style: normal; }
#perk-bar .pb-pips s, .ps-pips s { display: block; width: 6px; height: 4px; background: rgba(255,255,255,.14); text-decoration: none; }
#perk-bar .pb-pips s.on { background: var(--pc); }
#perk-bar .pb-pips s.nx { background: var(--pc); animation: pip-blink .7s steps(2) infinite; }
@keyframes pip-blink { 50% { opacity: .2; } }
#perk-bar .pb-text small { display: block; font-family: var(--font-mono); font-size: 7.5px; color: var(--dim); letter-spacing: .06em; margin: 1px 0; }
#perk-bar .pb-combo { background: linear-gradient(135deg, rgba(60,10,50,.78), rgba(10,8,14,.7)); box-shadow: 0 0 14px rgba(255,91,214,.35); }
#perk-bar .pb-combo .pb-text em { color: #f6d6ee; }
@media (max-width: 760px) {
  #perk-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); width: calc(100vw - 16px); top: calc(50% + 50px); }
  #perk-bar .pb-card { grid-template-columns: 1fr; text-align: center; gap: 2px; justify-items: center; }
  #perk-bar .pb-key, #perk-bar .pb-text small, #perk-bar .pb-opens { display: none; }
  #perk-bar .pb-text em { font-size: 8px; }
}

/* perk + combo slots in the XP panel */
.xp-perks { min-height: 32px; gap: 6px; }
.xp-perks .ps-row { display: flex; gap: 4px; }
.xp-perks .ps-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.12); margin: 0 1px; }
.xp-perks .ps-slot { position: relative; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--pc, #888) 55%, transparent); background: rgba(0,0,0,.35); color: var(--pc, #ccc); }
.xp-perks span.ps-slot:not(.empty) { width: 30px; height: 30px; }
.xp-perks .ps-slot svg { width: 20px; height: 20px; margin-top: -4px; filter: drop-shadow(0 0 3px var(--pc)); }
.xp-perks .ps-slot.empty { border: 1px dashed rgba(190,212,191,.2); background: rgba(0,0,0,.18); }
.xp-perks .ps-pips { position: absolute; left: 3px; right: 3px; bottom: 2px; display: flex; gap: 2px; font-style: normal; }
.xp-perks .ps-pips s { flex: 1; width: auto; height: 3px; }
.xp-perks .ps-pips s.on { background: var(--pc); }
.xp-perks .ps-slot.combo { --pc: #ff5bd6; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border: 0; background: rgba(255,91,214,.18); }
.xp-perks .ps-slot.combo svg { width: 26px; height: 26px; margin: 0; }
.xp-perks .ps-slot.combo.empty { background: rgba(255,91,214,.06); }
@media (max-width: 900px) {
  .xp-perks .ps-slot, .xp-perks span.ps-slot:not(.empty) { width: 25px; height: 25px; }
  .xp-perks .ps-slot svg { width: 16px; height: 16px; }
  .xp-perks .ps-slot.combo svg { width: 22px; height: 22px; }
}

/* ---- leaderboard tabs + co-op top ---- */
.lb-tabs { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4px; margin: 0 0 6px; }
.lb-tabs button {
  height: 26px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--dim);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); cursor: pointer;
}
.lb-tabs button.active { color: #0b0f0e; background: var(--amber); border-color: var(--amber); }
.ct-team { display: flex; flex-wrap: wrap; gap: 3px 8px; margin: 3px 0 2px; }
.ct-player { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; color: #e8e2d4; letter-spacing: .04em; }
.ct-player i { width: 7px; height: 7px; background: var(--cls); display: inline-block; }
.ct-player em { font-style: normal; color: rgba(243,200,110,.75); font-size: 9px; }

/* ---- co-op: room privacy, lobby chat, open rooms, in-game chat ---- */
.coop-privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.coop-privacy button {
  height: 34px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted);
  background: rgba(8,12,11,.62); border: 1px solid rgba(255,255,255,.1); cursor: pointer;
}
.coop-privacy button.active { color: #0b0f0e; background: var(--amber); border-color: var(--amber); }
.coop-privacy button:disabled { cursor: default; opacity: .75; }
.coop-privacy-note { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; color: var(--dim); min-height: 14px; }
.coop-chat { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.coop-chat-log {
  height: 128px; overflow-y: auto; padding: 6px 8px; background: rgba(5,8,8,.62); border: 1px solid rgba(255,255,255,.07);
  display: flex; flex-direction: column; gap: 3px;
}
.chat-line { font-family: var(--font-mono); font-size: 11px; line-height: 1.45; color: #e8e2d4; word-break: break-word; }
.chat-line b { font-weight: 600; margin-right: 6px; }
.chat-line b::after { content: ':'; }
.chat-line.sys { color: rgba(166,182,168,.6); font-size: 10px; letter-spacing: .05em; }
.coop-chat-row { display: grid; grid-template-columns: 1fr 44px; gap: 6px; }
.coop-chat-row input {
  height: 34px; padding: 0 10px; font-family: var(--font-mono); font-size: 11px; color: #f2ead8;
  background: rgba(5,8,8,.75); border: 1px solid rgba(233,173,79,.25); outline: none;
}
.coop-chat-row input:focus { border-color: var(--amber); }
.coop-chat-row .ghost-btn { height: 34px; padding: 0; }

.coop-open-list { max-height: 168px; background: rgba(5,8,8,.5); border: 1px solid rgba(103,221,200,.18); }
.coop-open-list .or-row:first-child { border-top: 0; }
/* open co-op rooms: right under the main buttons, on every layout */
.open-rooms-card {
  margin-top: 12px; max-width: 640px; padding: 8px 12px 6px;
  background: rgba(8,12,11,.78); border: 1px solid rgba(103,221,200,.26);
}
.open-rooms-card .leaderboard-head { color: var(--teal); border-bottom-color: rgba(103,221,200,.16); margin-bottom: 2px; }
.open-rooms-list { display: flex; flex-direction: column; max-height: 190px; overflow-y: auto; }
#open-rooms-list { max-height: 138px; }
#open-rooms-list .or-row { padding-left: 0; padding-right: 0; }
#open-rooms-list .or-row:first-child { border-top: 0; }
#open-rooms-list .lb-empty { padding: 6px 0 4px; }
@media (min-width: 861px) and (max-height: 760px) { #open-rooms-list { max-height: 92px; } }
.or-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid rgba(255,255,255,.05); }
.or-main b { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 400; color: #f2ead8; letter-spacing: .04em; }
.or-main span { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); letter-spacing: .08em; }
.or-dots { display: flex; gap: 3px; }
.or-dots i { width: 8px; height: 8px; display: block; }
.or-join { height: 26px; padding: 0 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: #0b0f0e; background: var(--teal); border: 0; cursor: pointer; }
.or-row.busy { opacity: .55; }
.or-row em { font-style: normal; font-family: var(--font-mono); font-size: 9px; color: var(--dim); letter-spacing: .08em; }

#chat-entry { position: absolute; left: 18px; bottom: 96px; width: min(440px, 70vw); z-index: 30; pointer-events: auto; }
#chat-entry.hidden { display: none; }
#chat-history { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; padding: 6px 8px; background: rgba(5,8,8,.6); max-height: 170px; overflow: hidden; }
#chat-history:empty { display: none; }
#chat-entry label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 0 10px; height: 36px; background: rgba(5,8,8,.86); border: 1px solid var(--amber); }
#chat-entry label b { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--amber); font-weight: 600; }
#chat-entry input { background: transparent; border: 0; outline: none; color: #f2ead8; font-family: var(--font-mono); font-size: 12px; }
body.mobile-device #chat-entry { left: 8px; right: 8px; width: auto; bottom: auto; top: 120px; }
body.mobile-device.net-coop #mobile-chat { display: block; }
#mobile-chat { display: none; }
body.mobile-device #mobile-controls .mobile-chat { bottom: calc(350px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape #mobile-controls .mobile-chat { bottom: auto; top: calc(198px + env(safe-area-inset-top, 0px)); }

/* ---- co-op: pings, comms feed, emote wheel ---- */
#ping-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.ping {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center;
  margin: -9px 0 0 -70px; width: 140px; --pc: #fff; will-change: transform;
}
.ping-gem {
  width: 14px; height: 14px; transform: rotate(45deg); border: 2px solid var(--pc);
  background: rgba(8,10,10,.55); box-shadow: 0 0 10px var(--pc);
  animation: pingPulse 1s ease-in-out infinite;
}
.ping.enemy .ping-gem { border-color: #ff4a3a; box-shadow: 0 0 12px #ff4a3a; background: rgba(120,10,0,.55); }
.ping.gate .ping-gem { border-color: #e9ad4f; box-shadow: 0 0 12px #e9ad4f; }
.ping-label {
  margin-top: 5px; padding: 2px 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; color: #fff; background: rgba(5,8,8,.72); border-left: 2px solid var(--pc); white-space: nowrap;
}
.ping.enemy .ping-label { color: #ff8a7a; }
.ping-meta { margin-top: 2px; font-family: var(--font-mono); font-size: 9px; color: var(--pc); text-shadow: 0 1px 2px #000; white-space: nowrap; }
.ping.edge .ping-label { font-size: 9.5px; }
.ping.edge .ping-gem { width: 11px; height: 11px; }
.ping.fresh .ping-gem { transform: rotate(45deg) scale(2.2); opacity: 0; }
.ping .ping-gem { transition: transform .25s ease-out, opacity .25s; }
@keyframes pingPulse { 50% { box-shadow: 0 0 2px var(--pc); } }

#comms-feed { position: absolute; left: 18px; bottom: 150px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; max-width: 320px; }
.comms-row {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; padding: 3px 8px;
  background: rgba(5,8,8,.62); border-left: 2px solid rgba(255,255,255,.25); animation: killIn .22s ease-out;
  transition: opacity .5s;
}
.comms-row b { font-weight: 600; margin-right: 6px; }
.comms-row b::after { content: ':'; }
.comms-row.out { opacity: 0; }
body.mobile-device #comms-feed { left: 8px; bottom: auto; top: 120px; max-width: 60vw; }

#emote-wheel {
  position: fixed; left: 50%; top: 50%; width: 340px; height: 340px; margin: -170px 0 0 -170px;
  z-index: 60; pointer-events: auto; touch-action: none; user-select: none;
}
#emote-wheel.hidden { display: none; }
#emote-wheel .ew-ring {
  position: absolute; inset: 40px; border-radius: 50%;
  background: radial-gradient(circle, rgba(5,8,8,.15) 30%, rgba(5,8,8,.72) 31%, rgba(5,8,8,.6) 70%, transparent 71%);
  border: 1px solid rgba(233,173,79,.25);
}
#emote-wheel .ew-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center;
  font-family: var(--font-mono); pointer-events: none;
}
#emote-wheel .ew-center b { display: block; font-family: var(--font-display); font-size: 17px; color: #fff; letter-spacing: .06em; }
#emote-wheel .ew-center i { display: block; margin-top: 3px; font-style: normal; font-size: 8.5px; color: rgba(166,182,168,.6); letter-spacing: .1em; }
body.mobile-device #emote-wheel .ew-center i { visibility: hidden; }
#emote-wheel .ew-item {
  position: absolute; transform: translate(-50%,-50%); min-width: 84px; padding: 6px 8px 6px 20px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--ec);
  background: rgba(8,11,11,.86); border: 1px solid rgba(255,255,255,.12); cursor: pointer; white-space: nowrap;
  transition: transform .1s, background .1s, border-color .1s;
}
#emote-wheel .ew-item span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 8.5px; color: rgba(166,182,168,.55); }
#emote-wheel .ew-item.sel { transform: translate(-50%,-50%) scale(1.14); background: rgba(30,24,12,.95); border-color: var(--ec); box-shadow: 0 0 12px rgba(0,0,0,.6); }
body.emote-open #crosshair { opacity: .2; }

.coop-keys { margin-top: 14px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; color: rgba(166,182,168,.7); line-height: 1.6; }
.coop-keys b { color: rgba(233,173,79,.85); font-weight: 500; }

#mobile-ping, #mobile-emote { display: none; }
body.mobile-device.net-coop #mobile-ping, body.mobile-device.net-coop #mobile-emote { display: block; }
body.mobile-device #mobile-controls .mobile-comms {
  left: calc(8px + env(safe-area-inset-left, 0px)); right: auto; width: 72px; font-size: 9.5px;
  border-color: rgba(127,227,196,.4);
}
body.mobile-device #mobile-controls .mobile-ping { bottom: calc(262px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device #mobile-controls .mobile-emote { bottom: calc(306px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape #mobile-controls .mobile-ping { bottom: auto; top: calc(110px + env(safe-area-inset-top, 0px)); }
body.mobile-device.mobile-landscape #mobile-controls .mobile-emote { bottom: auto; top: calc(154px + env(safe-area-inset-top, 0px)); }

/* ---- co-op: wounded state ---- */
body.net-downed #low-health { opacity: 1 !important; }
body.net-downed #post-fx::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(120,0,0,.05) 30%, rgba(90,0,0,.6) 100%);
  animation: downedPulse 1.4s ease-in-out infinite;
}
body.net-downed #crosshair, body.net-downed #weapon-hud { opacity: .25; }
@keyframes downedPulse { 50% { opacity: .55; } }

/* ---- co-op lobby ---- */
.coop-btn i { font-style: normal; margin-left: 6px; padding: 1px 4px; font-size: 8px; color: #0b0f0e; background: var(--teal); }
.coop-modal { width: min(860px, 94vw); max-height: 94vh; overflow-y: auto; }
.coop-lead { margin: 0; padding: 0 36px 16px; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: var(--muted); }
.coop-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 0 36px 28px; }
.coop-col { display: flex; flex-direction: column; gap: 12px; }
.coop-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; color: var(--dim); }
.coop-classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.coop-classes button { padding: 9px 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--cls); border: 1px solid color-mix(in srgb, var(--cls) 35%, transparent); background: rgba(0,0,0,.3); }
.coop-classes button.active { color: #0b0f0e; background: var(--cls); border-color: var(--cls); }
.coop-entry { display: flex; flex-direction: column; gap: 10px; }
.coop-join { display: flex; gap: 8px; }
.coop-join input { flex: 1; min-width: 0; padding: 10px 12px; font-family: var(--font-mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-hot); background: rgba(0,0,0,.45); border: 1px solid var(--line-bright); outline: none; }
.coop-join input:focus { border-color: var(--amber); }
.coop-join .ghost-btn { white-space: nowrap; }
.coop-status { min-height: 16px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--teal); }
.coop-status.bad { color: var(--danger); }
.coop-code { font-family: var(--font-mono); font-size: 34px; letter-spacing: .14em; color: var(--amber-hot); text-shadow: 0 0 18px rgba(233,173,79,.35); user-select: all; }
.coop-players { display: flex; flex-direction: column; gap: 5px; }
.coop-player { display: grid; grid-template-columns: 16px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; font-family: var(--font-mono); font-size: 11px; border-left: 3px solid var(--cls); background: rgba(0,0,0,.32); }
.coop-player b { color: #f1ecdf; font-weight: 500; letter-spacing: .06em; }
.coop-player em { font-style: normal; color: var(--cls); font-size: 9.5px; letter-spacing: .14em; }
.coop-player span { color: var(--dim); font-size: 9px; letter-spacing: .14em; }
.coop-player .coop-crown { color: var(--amber-hot); }
.coop-player.me { background: rgba(255,255,255,.05); }
.coop-player.empty { --cls: rgba(174,194,178,.25); display: block; color: var(--dim); font-size: 9.5px; letter-spacing: .14em; }
.coop-wait { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); animation: blink 1.4s steps(2) infinite; }
@media (max-width: 760px) {
  .coop-body { grid-template-columns: 1fr; padding: 0 18px 20px; }
  .coop-lead { padding: 0 18px 12px; }
}
/* retro mode: the canvas is upscaled by an exact integer, so it may overhang
   the viewport by a pixel or two; screen-space scanlines/grain don't line up
   with the game pixels and only muddy them, so they are switched off. */
#game-root { overflow: hidden; }
body.retro-on .fx-scanlines, body.retro-on .fx-grain { display: none; }
.boss-track { position: relative; }
.boss-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff3d0; box-shadow: 0 0 8px #ffd27a; }
#boss-wrap.phase2 #boss-fill { background: linear-gradient(90deg, #6a0a0a, #ff3020 60%, #ff9a50); box-shadow: 0 0 16px rgba(255,60,30,.7); animation: bossRage 1s ease-in-out infinite; }
#boss-wrap.phase2 #boss-tag { color: #ff6a40; }
#boss-wrap.invuln #boss-fill { filter: grayscale(1) brightness(1.6); }
@keyframes bossRage { 50% { filter: brightness(1.3); } }

/* compact side notifications (everything except the opening hero banner) */
#banner-layer:not(.hero) { display: block; pointer-events: none; }
.wave-banner.compact, #banner-layer .egor-item-banner {
  position: absolute; left: 40px; top: var(--banner-top, 50%);
  width: min(340px, 42vw); text-align: left;
  padding: 9px 14px 10px; background: linear-gradient(90deg, rgba(6,9,9,.86), rgba(6,9,9,.55));
  border: 0; border-left: 3px solid var(--banner-accent, var(--amber));
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
  animation-name: bannerSlide;
}
.wave-banner.compact.danger { --banner-accent: var(--danger); }
.wave-banner.compact.boss { --banner-accent: #ff8c6e; }
.wave-banner.compact.teal { --banner-accent: var(--teal); }
.wave-banner.compact .kicker { font-size: 9px; letter-spacing: .2em; text-shadow: none; }
.wave-banner.compact .title { font-size: 24px; line-height: 1; margin: 4px 0 3px; letter-spacing: .03em; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.wave-banner.compact .rule { display: none; }
.wave-banner.compact .sub { font-size: 9px; letter-spacing: .12em; line-height: 1.5; }
.wave-banner.compact.two-line .title { font-size: 24px; }
.wave-banner.compact.two-line .banner-line.second { font-size: .7em; margin-top: 3px; }
#banner-layer .egor-item-banner { --banner-accent: var(--teal); font-size: 10px; line-height: 1.55; }
#banner-layer .egor-item-banner .egor-item-name { font-size: 13px; margin: 4px 0 3px; }
#banner-layer .egor-item-banner .egor-item-copy,
#banner-layer .egor-item-banner .egor-item-collection { font-size: 10px; }
@keyframes bannerSlide {
  0% { opacity: 0; transform: translateX(-18px); }
  8% { opacity: 1; transform: translateX(0); }
  85% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-10px); }
}
body.mobile-device .wave-banner.compact, body.mobile-device #banner-layer .egor-item-banner {
  left: 8px; width: min(250px, 62vw); padding: 7px 10px 8px;
}
body.mobile-device .wave-banner.compact .title { font-size: 17px; }
body.mobile-device.mobile-portrait .wave-banner.compact,
body.mobile-device.mobile-portrait #banner-layer .egor-item-banner { top: 33%; }
body.mobile-device.mobile-landscape .wave-banner.compact,
body.mobile-device.mobile-landscape #banner-layer .egor-item-banner { top: 24%; left: 50%; transform: none; margin-left: -125px; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.setting-toggle > span { flex: 1; margin: 0; }
.setting-toggle input { appearance: auto; -webkit-appearance: checkbox; width: 16px; height: 16px; background: none; accent-color: var(--amber); }

/* class chip in the vitals header */
.class-chip {
  color: var(--cls); letter-spacing: .14em; font-size: 9.5px;
  padding: 1px 6px; border: 1px solid color-mix(in srgb, var(--cls) 45%, transparent);
  background: color-mix(in srgb, var(--cls) 10%, transparent);
}

/* leaderboard class tag */
.lb-cls-line { margin: 2px 0 2px; line-height: 1; }
.lb-class {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px 2px 5px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; font-weight: 600;
  color: var(--cls); background: color-mix(in srgb, var(--cls) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cls) 55%, transparent);
}
.lb-class i { font-style: normal; font-size: 9.5px; }
.lb-class.legacy { --cls: #7d877d; font-weight: 500; opacity: .75; }
.lb-history-time .lb-class { margin-left: 6px; padding: 0 4px; font-size: 8.5px; }
.lb-history-time .lb-class i { display: none; }

/* ---- class select screen ---- */
.class-screen { display: flex; align-items: center; justify-content: center; }
.class-modal { width: min(1120px, 95vw); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; }
.class-lead { margin: 0; padding: 0 36px 16px; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: var(--muted); }
.class-lead kbd, .class-hint kbd { color: var(--amber-hot); }
.class-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 30px 18px; overflow-y: auto; min-height: 0; }
.class-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 18px 18px 16px; text-align: left; color: var(--text); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cls) 30%, rgba(174,194,178,.15));
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--cls) 16%, transparent), transparent 60%),
    linear-gradient(170deg, rgba(14,18,17,.96), rgba(7,9,9,.97));
  transition: transform .16s ease, border-color .16s, box-shadow .16s, filter .16s;
  filter: saturate(.7) brightness(.86);
}
.class-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--cls); opacity: .45; transition: opacity .16s; }
.class-card:hover { transform: translateY(-3px); filter: none; border-color: color-mix(in srgb, var(--cls) 60%, transparent); }
.class-card.selected {
  filter: none; transform: translateY(-4px);
  border-color: var(--cls);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cls) 40%, transparent), 0 18px 50px color-mix(in srgb, var(--cls) 18%, transparent);
}
.class-card.selected::before { opacity: 1; box-shadow: 0 0 18px var(--cls); }
.cls-num { position: absolute; right: 16px; top: 13px; font-family: var(--font-mono); font-size: 10px; color: var(--dim); letter-spacing: .14em; }
.cls-icon { width: 58px; height: 58px; color: var(--cls); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--cls) 45%, transparent)); }
.cls-icon svg { width: 100%; height: 100%; }
.class-card.selected .cls-icon { animation: clsFloat 2.4s ease-in-out infinite; }
@keyframes clsFloat { 50% { transform: translateY(-4px) rotate(-3deg); } }
.cls-name { font-family: var(--font-display); font-size: 25px; line-height: 1; letter-spacing: .04em; color: #f1ecdf; }
.cls-motto { font-family: var(--font-mono); font-size: 9.5px; color: var(--cls); letter-spacing: .02em; }
.cls-bio { font-family: var(--font-mono); font-size: 9px; line-height: 1.6; color: var(--muted); min-height: 36px; }
.cls-ability { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 8px 10px; border-left: 2px solid color-mix(in srgb, var(--cls) 55%, transparent); background: rgba(0,0,0,.28); }
.cls-ability small { font-family: var(--font-mono); font-size: 8px; letter-spacing: .2em; color: var(--dim); }
.cls-ability b { font-family: var(--font-display); font-size: 14px; font-weight: 500; letter-spacing: .05em; color: #ece7da; }
.cls-ability span { font-family: var(--font-mono); font-size: 9px; line-height: 1.55; color: #bfc8bc; }
.cls-ability.ult { border-left-color: var(--cls); background: color-mix(in srgb, var(--cls) 8%, rgba(0,0,0,.3)); }
.cls-ability.ult small { color: var(--cls); }
.cls-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; width: 100%; margin-top: 2px; }
.cls-stat { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--dim); }
.cls-stat em { font-style: normal; }
.cls-stat i { display: flex; gap: 2px; }
.cls-stat b, .cls-stat u { display: block; width: 9px; height: 5px; background: var(--cls); box-shadow: 0 0 6px color-mix(in srgb, var(--cls) 50%, transparent); }
.cls-stat u { background: rgba(174,194,178,.14); box-shadow: none; }
.cls-pick { margin-top: auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: var(--cls); border-bottom: 1px solid var(--cls); padding-bottom: 3px; }
.class-card.selected .cls-pick { color: #0b0f0e; background: var(--cls); border: 0; padding: 3px 8px; }
.class-actions { display: flex; align-items: center; gap: 18px; padding: 0 30px 26px 30px; flex-wrap: wrap; }
.class-actions .big-btn { min-width: 300px; }
.class-hint { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--dim); }
.class-cards { grid-auto-rows: max-content; }
@media (max-width: 900px) {
  .class-modal { max-height: calc(var(--vv-height, 100vh) - 24px); }
  .class-modal .modal-head { padding: 18px 20px 10px; }
  .class-modal .modal-head h2 { font-size: 34px; }
  .class-lead { padding: 0 20px 12px; }
  .class-cards { grid-template-columns: 1fr; padding: 0 14px 14px; gap: 9px; }
  .class-card { padding: 12px 14px; gap: 6px; }
  .class-card .cls-icon { position: absolute; right: 14px; top: 26px; width: 40px; height: 40px; }
  .cls-name { font-size: 21px; }
  .cls-bio, .cls-stats { display: none; }
  .class-actions { padding: 0 14px 16px; }
  .class-actions .big-btn { min-width: 0; flex: 1; }
  .class-hint { display: none; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .class-modal .modal-head { padding: 18px 36px 10px; }
  .class-modal .modal-head h2 { font-size: 38px; }
  .cls-bio { display: none; }
  .cls-icon { width: 44px; height: 44px; }
}

/* ---- ultimate meter ---- */
.ult-meter {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);
  width: 132px; height: 92px; display: flex; flex-direction: column; align-items: center;
  pointer-events: none; color: var(--cls); background: none; border: 0; padding: 0;
}
.ult-ring { position: relative; width: 66px; height: 66px; }
.ult-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ult-track { fill: rgba(6,9,9,.62); stroke: rgba(174,194,178,.16); stroke-width: 6; }
.ult-arc { fill: none; stroke: var(--cls); stroke-width: 6; stroke-linecap: butt; transition: stroke-dashoffset .25s ease; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cls) 70%, transparent)); }
.ult-core { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 66px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ult-core b { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: #f1ecdf; letter-spacing: .02em; }
.ult-core .keycap { width: 15px; height: 15px; font-size: 9.5px; font-style: normal; border-color: var(--cls); color: var(--cls); background: rgba(0,0,0,.4); }
.ult-name { margin-top: 5px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: rgba(214,222,210,.62); white-space: nowrap; text-shadow: 0 1px 3px #000; }
.ult-meter.ready .ult-ring { animation: ultReady 1.1s ease-in-out infinite; }
.ult-meter.ready .ult-track { fill: color-mix(in srgb, var(--cls) 22%, rgba(6,9,9,.7)); }
.ult-meter.ready .ult-core b { font-size: 10px; letter-spacing: .14em; color: var(--cls); }
.ult-meter.ready .ult-name { color: var(--cls); }
.ult-meter.active .ult-ring { animation: ultSpin .5s linear infinite; }
.ult-meter.pulse .ult-ring { animation: ultPulse .7s ease-out 1, ultReady 1.1s ease-in-out .7s infinite; }
@keyframes ultReady { 50% { transform: scale(1.07); filter: drop-shadow(0 0 14px var(--cls)); } }
@keyframes ultPulse { 0% { transform: scale(1.6); filter: drop-shadow(0 0 30px var(--cls)); } 100% { transform: scale(1); } }
@keyframes ultSpin { to { transform: rotate(360deg); } }

/* ---- full-screen ability effects ---- */
.ult-fx { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0; }
.ult-fx.on.dash {
  background:
    radial-gradient(ellipse at center, transparent 32%, rgba(255,179,71,.18) 62%, rgba(255,140,40,.4) 100%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,236,200,.0) 0deg 4deg, rgba(255,236,200,.22) 4deg 5deg);
  -webkit-mask: radial-gradient(circle at center, transparent 22%, #000 60%);
          mask: radial-gradient(circle at center, transparent 22%, #000 60%);
  animation: fxDash .65s ease-out forwards;
}
@keyframes fxDash { 0% { opacity: 0; transform: scale(1.25); } 15% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.ult-fx.on.bfg-charge { background: radial-gradient(circle at 60% 72%, rgba(141,255,122,.38), transparent 45%); animation: fxCharge .6s ease-in forwards; }
@keyframes fxCharge { from { opacity: 0; } to { opacity: 1; } }
.ult-fx.on.bfg-fire { background: radial-gradient(circle at center, rgba(232,255,217,.95), rgba(141,255,122,.75) 35%, rgba(20,120,40,.4) 75%); mix-blend-mode: screen; animation: fxFire .9s ease-out forwards; }
@keyframes fxFire { 0% { opacity: 1; } 100% { opacity: 0; } }
.ult-fx.on.vacation-return { background: radial-gradient(circle at center, rgba(255,255,255,.95), rgba(95,200,255,.6) 50%, rgba(255,240,200,.3)); animation: fxFire .7s ease-out forwards; }

/* floating salary popup */
.float-coins {
  position: absolute; right: 220px; top: 66px; display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); pointer-events: none; animation: floatCoins 1.7s ease-out forwards;
  text-shadow: 0 2px 6px #000;
}
.float-coins b { font-size: 22px; color: var(--amber-hot); font-weight: 500; }
.float-coins span { font-size: 9.5px; letter-spacing: .18em; color: var(--cls); }
@keyframes floatCoins { 0% { opacity: 0; transform: translateY(14px); } 15% { opacity: 1; transform: translateY(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }

/* ---- vacation overlay ---- */
.vacation-overlay { position: absolute; inset: 0; z-index: 18; pointer-events: none; overflow: hidden; }
.vac-bars i { position: absolute; left: 0; right: 0; height: 9vh; background: #000; transition: transform .6s ease; }
.vac-bars i:first-child { top: 0; } .vac-bars i:last-child { bottom: 0; }
.vacation-overlay.arriving .vac-bars i:first-child { transform: translateY(-100%); }
.vacation-overlay.arriving .vac-bars i:last-child { transform: translateY(100%); }
.vac-card {
  position: absolute; left: 5vw; bottom: calc(9vh + 26px); width: min(420px, 86vw);
  padding: 18px 22px 16px; background: rgba(255,250,238,.9); color: #24323a;
  box-shadow: 0 18px 60px rgba(30,60,80,.35); transform: rotate(-2deg);
  border: 8px solid #fff; animation: vacCard .8s cubic-bezier(.2,1.3,.4,1) .5s both;
}
@keyframes vacCard { from { opacity: 0; transform: translateY(40px) rotate(-8deg); } to { opacity: 1; transform: translateY(0) rotate(-2deg); } }
.vac-kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: .22em; color: #e0763f; }
.vac-title { margin: 6px 0 6px; font-family: var(--font-display); font-size: 40px; line-height: .95; letter-spacing: .03em; color: #1f5d84; }
.vac-title span { color: #ff6b4a; }
.vac-copy { margin: 0 0 12px; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: #4b5a60; }
.vac-row { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: #4b5a60; }
.vac-row em { font-style: normal; font-size: 13px; color: #24323a; text-align: right; }
.vac-track { height: 9px; background: rgba(36,50,58,.14); overflow: hidden; }
.vac-track b { display: block; height: 100%; width: 0; transition: width .12s linear; }
.vac-track.hp b { background: linear-gradient(90deg, #ff7b5c, #ff4f4f); }
.vac-track.ar b { background: linear-gradient(90deg, #4fc3ff, #2d8fd6); }
.vac-timer { margin-top: 10px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; color: #6b7a80; }
.vac-timer b { color: #e0763f; font-size: 12px; font-weight: 500; }
.vac-stamp {
  position: absolute; right: 6vw; top: calc(9vh + 30px); padding: 10px 14px;
  font-family: var(--font-display); font-size: 18px; line-height: 1.1; letter-spacing: .06em; text-align: center;
  color: rgba(214,64,52,.86); border: 3px double rgba(214,64,52,.8); transform: rotate(9deg);
  animation: vacStamp .35s ease-in 1.6s both;
}
@keyframes vacStamp { from { opacity: 0; transform: scale(2.4) rotate(9deg); } to { opacity: 1; transform: scale(1) rotate(9deg); } }
.vac-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.vacation-overlay.arriving .vac-flash { animation: vacFlashIn .9s ease-out forwards; }
.vacation-overlay.leaving .vac-flash { animation: vacFlashOut .55s ease-in forwards; }
@keyframes vacFlashIn { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes vacFlashOut { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ---- mobile: ult + dash buttons ---- */
body.mobile-device .ult-meter {
  pointer-events: auto; left: auto; transform: none;
  right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  width: 96px; height: 86px; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
body.mobile-device #mobile-controls .mobile-dash { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); border-color: rgba(103,221,200,.45); }
body.mobile-device.mobile-portrait .ult-meter { bottom: calc(204px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape .ult-meter {
  bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  right: calc(110px + env(safe-area-inset-right, 0px));
}
#mobile-dash, #mobile-jump { display: none; }
body.mobile-device #mobile-dash, body.mobile-device #mobile-jump { display: block; }
body.mobile-device #mobile-controls .mobile-jump { bottom: calc(210px + env(safe-area-inset-bottom, 0px)); border-color: rgba(233,173,79,.45); }
body.mobile-device.mobile-portrait .ult-meter { bottom: calc(258px + env(safe-area-inset-bottom, 0px)); }
body.mobile-device.mobile-landscape #mobile-controls .mobile-jump { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); right: calc(214px + env(safe-area-inset-right, 0px)); }
@media (max-width: 860px) {
  .ult-meter { bottom: 58px; }
  .vac-title { font-size: 30px; }
  .vac-stamp { display: none; }
}

/* ---------------------------------------------------- slot machine buffs */
.dm-vend.dm-slot { left: 47.4%; color: #ff5a4a; }
.dm-vend.dm-slot span { border-color: #ff5a4a; background: rgba(255,90,74,.15); }
#slot-buffs { position: absolute; left: 20px; bottom: 150px; display: flex; gap: 6px; flex-wrap: wrap; max-width: 340px; pointer-events: none; z-index: 6; }
#slot-buffs.hidden, .sb-chip[hidden] { display: none; }
.sb-chip { --c: #ffc45a; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--c); background: linear-gradient(180deg, rgba(14,10,18,.92), rgba(8,8,10,.84)); border: 1px solid var(--c); box-shadow: 0 0 14px -2px var(--c), inset 0 0 10px -4px var(--c); animation: sbIn .35s cubic-bezier(.2,1.6,.4,1); }
.sb-chip i { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 3px; font-weight: 700; color: #0b0809; background: var(--c); }
.sb-chip b { color: #fff; font-weight: 600; }
.sb-chip.quad { --c: #b277ff; }
.sb-chip.mega { --c: #ff4a5e; }
.sb-chip.legend { --c: #ffc83a; }
.sb-chip.blink { animation: sbBlink .5s steps(2) infinite; }
@keyframes sbIn { from { transform: translateY(8px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sbBlink { 50% { opacity: .35; } }
#quad-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; box-shadow: inset 0 0 170px 30px rgba(146,68,255,.5); z-index: 1; }
#quad-vignette.on { opacity: 1; animation: quadPulse 1.3s ease-in-out infinite; }
#quad-vignette.ending { animation: quadPulse .32s steps(2) infinite; }
@keyframes quadPulse { 50% { box-shadow: inset 0 0 120px 18px rgba(146,68,255,.32); } }
.health-row.mega .vital-bar span { background: linear-gradient(90deg, #a0102a, #ff3a52 50%, #ffd36a); box-shadow: 0 0 12px rgba(255,90,110,.6); }
.health-row.mega .vital-icon { color: #ffd36a; text-shadow: 0 0 8px rgba(255,211,106,.8); }
.health-row.mega b { width: auto; min-width: 31px; font-size: 13px; color: #ffd36a; }
.pb-card.pb-legend { box-shadow: 0 0 0 1px #ffc83a, 0 0 22px -2px rgba(255,200,58,.75); }
.pb-boost { margin-left: 4px; padding: 0 4px; font-size: 8px; letter-spacing: .08em; color: #1a1000; background: #ffc83a; }
body.mobile-playing #interact-prompt { pointer-events: auto; cursor: pointer; }
