/* PROXY WARS: CONQUEST — UI styles. Everything uses system fonts so the game works offline. */
:root {
  --ui-scale: 1;
  --crosshair: #ffffff;
  --bg: #0b0f15;
  --panel: rgba(11, 15, 22, 0.86);
  --panel2: rgba(22, 28, 38, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #e9eef4;
  --muted: #8d98a7;
  --accent: #3cf0c5;
  --accent-ink: #04211b;
  --gold: #ffd25e;
  --friendly: #4cb6ff;
  --enemy: #ff4d4d;
  --font: Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { font-size: calc(15px * var(--ui-scale)); }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; user-select: none; }
#app { position: fixed; inset: 0; }
canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; cursor: pointer; }
kbd { font-family: var(--mono); font-size: 0.72rem; padding: 1px 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; background: rgba(255,255,255,0.06); color: var(--text); margin: 0 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.title-skew { font-style: italic; font-weight: 800; letter-spacing: 0.02em; transform: skewX(-6deg); display: inline-block; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; margin: 14px 0 8px; display: flex; justify-content: space-between; }
.eyebrow:first-child { margin-top: 0; }
.eyebrow .r { color: var(--text); opacity: 0.7; }
.sect { font-size: 0.7rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }

/* ---------- buttons ---------- */
.btn { background: rgba(255,255,255,0.05); border: 1px solid var(--line2); border-radius: 6px; padding: 9px 14px; font-weight: 700; letter-spacing: 0.08em; font-size: 0.85rem; transition: background .12s, border-color .12s; }
.btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.btn.small { padding: 6px 10px; font-size: 0.75rem; }
.btn.danger { border-color: rgba(255,77,77,0.5); color: #ff8a8a; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: linear-gradient(100deg, var(--accent), #8affd9); color: var(--accent-ink); border: none; border-radius: 6px; padding: 14px 18px; font-weight: 900; font-style: italic; letter-spacing: 0.06em; font-size: 1.15rem; display: flex; align-items: center; justify-content: space-between; width: 100%; box-shadow: 0 6px 24px rgba(60,240,197,0.22); transition: filter .12s, transform .12s; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary kbd { color: var(--accent-ink); border-color: rgba(4,33,27,0.35); background: rgba(255,255,255,0.35); font-style: normal; }
.btn-primary.wait { background: linear-gradient(100deg, #46525f, #5b6774); color: #dfe6ee; box-shadow: none; }
.link-btn { background: none; border: 1px dashed var(--line2); color: var(--gold); padding: 9px; width: 100%; border-radius: 6px; font-weight: 800; letter-spacing: 0.1em; margin-top: 8px; }
.seg { display: inline-flex; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 7px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { background: none; border: none; padding: 7px 11px; border-radius: 5px; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); }
.seg button:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.seg button.sel { background: var(--text); color: #0b0f15; }
.chip { background: rgba(255,255,255,0.05); border: 1px solid var(--line2); border-radius: 20px; padding: 6px 12px; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; }
.chip.sel { background: var(--text); color: #0b0f15; }
.mini { background: rgba(255,255,255,0.06); border: 1px solid var(--line2); border-radius: 5px; padding: 3px 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.toast { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); background: #11161e; border: 1px solid var(--line2); padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 50; animation: toastIn .2s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- boot / loading ---------- */
.boot, .loading { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(ellipse at center, #1a2230 0%, #07090d 75%); transition: opacity .5s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-logo { font-size: 3.6rem; background: linear-gradient(90deg, #ff7a2f, #9be33a, #2ad4ff, #b36bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-bar { width: 260px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: bootbar 1.1s ease-in-out infinite; }
@keyframes bootbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.boot-txt, .ld-sub { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--muted); }
.ld-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ld-title { font-size: 2.6rem; }
/* Editions (src/config/edition.js, src/ui/brand.js): the logo with the edition's name under it on
   the boot and loading screens, and the logo in the menu's top-left corner. */
.ed-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ed-hero img { display: block; width: min(380px, 72vw, 70vh); height: auto; filter: drop-shadow(0 6px 22px rgba(0,0,0,0.55)); }
.ed-name { font-size: 3rem; letter-spacing: 0.12em; background: linear-gradient(90deg, #ffffff, #c9efff 45%, #4cb6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot.ed { gap: 22px; }
.ld-hero { margin-bottom: 6px; }
.ld-hero img { width: min(280px, 60vw, 52vh); }
.ld-hero .ed-name { font-size: 2.2rem; }
.ld-hero + .ld-title { font-size: 1.1rem; letter-spacing: 0.26em; color: var(--accent); }
.ed-logo { display: block; height: 40px; width: auto; }
.fatal { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
#errbox { position: fixed; left: 10px; bottom: 10px; max-width: 70vw; background: rgba(120,10,20,0.92); color: #fff; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; padding: 10px 12px; border-radius: 6px; z-index: 999; display: none; }

/* ---------- main menu ---------- */
.menu { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.menu > * { pointer-events: auto; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 24px; padding: 0 20px; background: linear-gradient(180deg, rgba(5,7,11,0.92), rgba(5,7,11,0.55) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #2ad4ff); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 900; font-style: italic; font-size: 1.1rem; }
.bt b { display: block; font-weight: 800; letter-spacing: 0.04em; font-size: 1.05rem; }
.bt small { display: block; color: var(--muted); letter-spacing: 0.3em; font-size: 0.62rem; }
.tabs { display: flex; align-items: center; gap: 2px; }
.tabs .tk { opacity: 0.6; }
.tab { background: none; border: none; padding: 20px 14px; font-weight: 800; letter-spacing: 0.1em; font-size: 0.86rem; color: var(--muted); position: relative; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 3px; border-radius: 2px; background: var(--accent); }
.topright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.wallet { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 20px; padding: 6px 12px; background: rgba(0,0,0,0.3); font-weight: 800; }
.wallet .cr { color: var(--gold); }
.wallet .cr-l { color: var(--muted); font-size: 0.72rem; }
.wallet .rk { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--accent); }
.wallet.big { font-size: 1.3rem; }
.card-btn { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.35); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 12px 6px 8px; text-align: left; }
.card-btn b { display: block; font-size: 0.9rem; }
.card-btn small { display: block; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.1em; }
.fi svg { width: 26px; height: 26px; fill: currentColor; stroke: currentColor; }
.menu-body { position: absolute; top: 68px; bottom: 50px; left: 20px; right: 20px; pointer-events: none; }
.menu-body > * { pointer-events: auto; }
.bottombar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: flex; align-items: center; gap: 16px; padding: 0 20px; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted); background: linear-gradient(0deg, rgba(5,7,11,0.9), transparent); }
.bottombar .rinfo { margin-left: auto; }
.padhint { opacity: 0.7; }

/* Play tab */
.left-col { position: absolute; left: 0; top: 0; width: 370px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.maplist { display: flex; flex-direction: column; gap: 8px; }
.map-card { position: relative; text-align: left; border: 1px solid rgba(60,240,197,0.5); border-radius: 9px; padding: 18px 16px 14px; background: linear-gradient(160deg, rgba(60,240,197,0.18), rgba(10,14,20,0.6) 60%); }
.map-card h2 { margin: 6px 0 4px; font-size: 2.1rem; font-style: italic; font-weight: 900; letter-spacing: 0.01em; }
.map-card p { margin: 0 0 8px; color: #c8d1dc; font-size: 0.85rem; line-height: 1.35; }
.map-card small { color: var(--accent); font-weight: 800; letter-spacing: 0.12em; font-size: 0.7rem; }
.tag { background: rgba(0,0,0,0.5); border: 1px solid var(--line2); border-radius: 4px; padding: 2px 6px; font-size: 0.62rem; letter-spacing: 0.14em; font-weight: 800; }
.map-row { display: flex; align-items: center; justify-content: space-between; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.map-row:hover { background: rgba(255,255,255,0.07); }
.map-row h3 { margin: 0; font-size: 1.25rem; font-style: italic; font-weight: 900; }
.map-row span { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; }
.opt-row { display: flex; align-items: center; gap: 10px; }
.opt-l { width: 44px; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; }
.play-btn { font-size: 1.9rem; padding: 16px 20px; margin-top: 4px; }
.btn.online { display: flex; align-items: center; justify-content: space-between; }
.record { position: absolute; right: 0; top: 0; width: 320px; }
.xpbar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #2ad4ff); }
.rec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; text-align: center; }
.rec-grid b { display: block; font-size: 1.3rem; }
.rec-grid span { font-size: 0.6rem; letter-spacing: 0.14em; color: var(--muted); }
.agent { position: absolute; right: 0; bottom: 0; width: 380px; }
.faction-row { display: flex; gap: 6px; }
.fac { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 9px 4px; color: var(--fc); }
.fac svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; }
.fac span { font-size: 0.66rem; letter-spacing: 0.12em; font-weight: 800; color: var(--text); }
.fac.sel { border-color: var(--fc); background: color-mix(in srgb, var(--fc) 18%, transparent); box-shadow: inset 0 0 0 1px var(--fc); }
.fac-name { margin: 10px 0 0; font-size: 1.8rem; font-style: italic; font-weight: 900; }
.agent p { margin: 2px 0 10px; }
.cls-seg { width: 100%; }
.cls-seg button { flex: 1; }
.agent-lines { margin-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.al { display: flex; gap: 10px; font-size: 0.85rem; }
.al .k { width: 86px; flex: none; font-size: 0.64rem; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; padding-top: 3px; }
.al b { display: block; font-size: 0.95rem; }
.al small { color: var(--muted); line-height: 1.35; display: block; }

/* Armory */
.side-panel { position: absolute; left: 0; top: 0; bottom: 0; width: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.side-panel h1 { margin: 0; font-size: 2rem; }
.side-panel p { margin: 2px 0 6px; }
.fl { font-size: 0.68rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 800; margin-top: 12px; }
.fl small { letter-spacing: 0.05em; }
.txt { background: rgba(0,0,0,0.35); border: 1px solid var(--line2); border-radius: 6px; color: var(--text); padding: 10px 12px; font-family: var(--font); font-size: 1rem; outline: none; user-select: text; }
.txt:focus { border-color: var(--accent); }
.items { display: flex; flex-wrap: wrap; gap: 6px; }
.item { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; }
.item.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: rgba(60,240,197,0.1); }
.item.locked { opacity: 0.75; }
.item small { color: var(--gold); font-weight: 800; }
.item .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
/* Armory items as picture tiles, four to a row (pictures: src/ui/thumbs.js). */
.item.tile { flex-direction: column; align-items: stretch; gap: 0; padding: 0; width: calc((100% - 18px) / 4); overflow: hidden; text-align: left; }
.item.tile:hover { border-color: var(--line2); }
.item.tile .it-pic { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.item.tile .thumb-img { object-fit: cover; }
.item.tile:hover .thumb-img { transform: scale(1.06); }
.item.tile .it-name { display: flex; align-items: center; gap: 5px; padding: 5px 6px 6px; font-size: 0.64rem; letter-spacing: 0.04em; line-height: 1.15; min-width: 0; }
.item.tile .it-name > span { overflow-wrap: anywhere; }
.item.tile small { padding: 0 6px 6px; margin-top: -2px; font-size: 0.62rem; }
.item.tile .dot { width: 9px; height: 9px; flex: none; }
.side-panel .btn-primary { margin-top: 14px; justify-content: center; }
.drag-hint { position: absolute; right: 30%; bottom: 8px; font-size: 0.68rem; letter-spacing: 0.18em; color: var(--muted); }

/* Loadout */
.wl-panel { position: absolute; left: 0; top: 0; bottom: 0; width: 320px; overflow-y: auto; }
.wl-panel > .seg { margin-bottom: 4px; }
.wlist { display: flex; flex-direction: column; gap: 6px; }
.wrow { text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; position: relative; }
.wrow b { display: block; font-size: 0.95rem; font-style: italic; }
.wrow span { display: block; font-size: 0.74rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.wrow small { display: block; color: var(--gold); font-size: 0.7rem; margin-top: 4px; font-weight: 700; }
.wrow em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 0.6rem; letter-spacing: 0.14em; color: var(--accent); font-weight: 800; }
.wrow.sel { border-color: var(--accent); background: rgba(60,240,197,0.08); }
.wrow.locked b { opacity: 0.8; }
.weapon-title { position: absolute; left: 340px; top: 4px; }
.weapon-title h1 { margin: 0; font-size: 2.6rem; font-style: italic; font-weight: 900; }
.weapon-title p { margin: 2px 0; color: var(--muted); letter-spacing: 0.14em; font-size: 0.72rem; }
.stats-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 310px; overflow-y: auto; display: flex; flex-direction: column; }
.bar-row { display: grid; grid-template-columns: 82px 1fr 30px; align-items: center; gap: 8px; font-size: 0.7rem; letter-spacing: 0.08em; margin: 3px 0; }
.bar-row b { text-align: right; font-size: 0.75rem; }
.sbar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, #e9eef4, var(--accent)); }
.spec { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 4px 0; border-bottom: 1px solid var(--line); }
.spec span { color: var(--muted); letter-spacing: 0.06em; font-size: 0.7rem; }
.stats-panel .btn-primary { margin-top: auto; justify-content: center; }
.att-panel { position: absolute; left: 340px; right: 330px; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-height: 42%; overflow-y: auto; padding: 12px; }
.att-slot { min-width: 0; }
.att-slot .eyebrow { margin: 0 0 6px; }
.att-opts { display: flex; flex-direction: column; gap: 4px; }
.att { text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.att b { display: block; font-size: 0.74rem; }
.att small { display: block; color: var(--muted); font-size: 0.64rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att.sel { border-color: var(--accent); background: rgba(60,240,197,0.08); }
.att.locked small { color: var(--gold); }

/* Upgrades */
.up-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(820px, 64vw); overflow-y: auto; }
.up-head { display: flex; align-items: center; justify-content: space-between; }
.up-head h1 { margin: 0; font-size: 2rem; }
.rank-card { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin: 12px 0; }
.emblem { width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #2ad4ff); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900; font-style: italic; }
.rc-main { flex: 1; }
.rc-main b { display: block; font-size: 1.1rem; }
.rc-main small { color: var(--muted); letter-spacing: 0.1em; font-size: 0.7rem; }
.up-tabs { margin-bottom: 12px; }
.how { background: rgba(255,210,94,0.08); border: 1px solid rgba(255,210,94,0.3); border-radius: 8px; padding: 10px 12px; font-size: 0.82rem; color: #e8dcbc; }
.how b { color: var(--gold); letter-spacing: 0.12em; font-size: 0.7rem; margin-right: 8px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.store-item { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, background .15s; }
.store-item:hover { border-color: var(--line2); background: rgba(255,255,255,0.05); }
.store-item b { font-style: italic; }
.store-item small { color: var(--muted); font-size: 0.72rem; line-height: 1.3; }
.si-body { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px 10px; flex: 1; }
.si-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 0.72rem; }
.si-foot em { font-style: normal; color: var(--accent); font-weight: 800; letter-spacing: 0.14em; font-size: 0.68rem; }
.si-foot .buy { color: var(--gold); border-color: rgba(255,210,94,0.4); }
.si-foot .buy:hover { background: rgba(255,210,94,0.12); border-color: var(--gold); }
.si-foot .buy.cant { color: var(--muted); border-color: var(--line2); }
.store-item.owned .si-body > b, .store-item.owned .si-body > small { opacity: 0.65; }
.store-item.owned .thumb-img { filter: saturate(0.45) brightness(0.75); }
.si-own { position: absolute; top: 8px; right: 8px; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgba(11,15,22,0.55); }
/* Item pictures (src/ui/thumbs.js): a soft studio backdrop, and a shimmer until the picture is in. */
.si-pic, .it-pic { position: relative; display: block; overflow: hidden; background: radial-gradient(ellipse 58% 70% at 50% 60%, var(--glow, rgba(130,176,232,0.15)), transparent 72%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.2)); }
.si-pic { aspect-ratio: 16 / 9; max-height: 9.5rem; border-bottom: 1px solid var(--line); }
.si-pic::after, .it-pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,0.07) 50%, transparent 65%) 0 0 / 250% 100%; animation: thumbWait 1.4s linear infinite; }
.si-pic.has-img::after, .it-pic.has-img::after, .si-pic.fail::after, .it-pic.fail::after { display: none; }
@keyframes thumbWait { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s ease, transform .25s ease; pointer-events: none; }
.thumb-img.on { opacity: 1; }
.store-item:hover .thumb-img { transform: scale(1.04); }
@media (max-height: 700px) { .store-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); } }
.career-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cg { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.cg b { display: block; font-size: 1.5rem; }
.cg span { font-size: 0.64rem; letter-spacing: 0.14em; color: var(--muted); }
.hist { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.hist th { text-align: left; font-size: 0.64rem; letter-spacing: 0.12em; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--line2); }
.hist td { padding: 6px; border-bottom: 1px solid var(--line); }
.hist tr.won td:nth-child(4) { color: var(--accent); }
.hist tr.lost td:nth-child(4) { color: var(--enemy); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(3,5,8,0.6); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal-panel { width: min(760px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: #0f141b; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.5rem; }
.modal-body { padding: 8px 18px 18px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-body p { line-height: 1.5; color: #cfd7e2; }
.set-sect { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--accent); font-weight: 800; margin: 18px 0 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.set-row label { font-size: 0.9rem; }
.set-row label small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; max-width: 360px; }
.ctl { display: flex; align-items: center; gap: 8px; }
.ctl input[type=range] { width: 200px; accent-color: var(--accent); }
.ctl .val { width: 48px; text-align: right; font-family: var(--mono); font-size: 0.8rem; }
.swatches { display: flex; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.sw.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.6) inset; }

/* ---------- deploy ---------- */
.deploy { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(5,7,11,0.25), rgba(5,7,11,0.7)); }
.deploy-panel { display: flex; gap: 18px; width: min(1080px, 96vw); max-height: 92vh; background: rgba(11,15,22,0.9); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,0.55); }
.dp-left { width: 46%; overflow-y: auto; }
.dp-left h1 { margin: 0; font-size: 2.1rem; }
.dp-head { display: flex; align-items: center; justify-content: space-between; }
.dp-left p { margin: 4px 0 12px; }
.class-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.class-card { text-align: left; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.class-card b { display: block; font-size: 1.1rem; font-style: italic; }
.class-card span { display: block; font-size: 0.75rem; color: var(--muted); margin: 2px 0 6px; }
.class-card small { font-size: 0.72rem; color: var(--gold); }
.class-card.sel { border-color: var(--accent); background: rgba(60,240,197,0.1); box-shadow: inset 0 0 0 1px var(--accent); }
.lo-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.lo-row b { font-style: italic; }
.lo-row span { color: var(--muted); font-size: 0.75rem; flex: 1; }
/* Map weapons (the Relay 7 crossbow): an icy chip on the deploy screen and an EXPERIMENTAL tag. */
.chip.exp { display: block; width: 100%; text-align: left; margin: 0 0 8px; border-color: #8fd2ff; color: #cfeeff; background: rgba(110, 190, 255, 0.08); border-radius: 6px; }
.chip.exp.sel { background: #cfeeff; color: #0b1a2a; }
em.exp { font-style: normal; font-weight: 800; font-size: 0.62rem; letter-spacing: 0.1em; color: #0b1a2a; background: #8fd2ff; border-radius: 3px; padding: 1px 6px; }
.wrow.exp { border-left: 3px solid #8fd2ff; }
.att-cyc { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.att-cyc .chip { font-size: 0.66rem; padding: 5px 9px; }
.kit-lines { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: #c9d2dd; line-height: 1.4; }
.dp-right { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.overview { width: 100%; aspect-ratio: 520 / 360; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; background: #0d1218; }
.spawn-list { display: flex; gap: 6px; flex-wrap: wrap; }
.deploy-btn { margin-top: auto; justify-content: space-between; font-size: 1.6rem; }

/* ---------- death / pause / end ---------- */
.death { position: fixed; top: 11%; left: 50%; transform: translateX(-50%); z-index: 15; pointer-events: none; }
.death-card { text-align: center; background: rgba(11,15,22,0.8); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 30px; }
.death-card small { letter-spacing: 0.3em; color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.death-card h2 { margin: 4px 0; font-size: 2.2rem; font-style: italic; font-weight: 900; }
.death-card p { margin: 2px 0; font-size: 0.85rem; letter-spacing: 0.06em; }
.pause { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(3,5,8,0.55); backdrop-filter: blur(4px); }
.pause-panel { width: 340px; display: flex; flex-direction: column; gap: 10px; background: #0f141b; border: 1px solid var(--line2); border-radius: 12px; padding: 22px; }
.pause-panel h1 { margin: 0 0 6px; font-size: 2rem; }
.pause-panel .btn-primary { justify-content: center; }
.endscreen { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(3,5,8,0.6); backdrop-filter: blur(4px); }
.end-panel { width: min(720px, 94vw); max-height: 92vh; overflow-y: auto; background: #0f141b; border: 1px solid var(--line2); border-radius: 14px; padding: 24px; text-align: center; }
.end-title { font-size: 4rem; margin: 0; }
.end-panel.won .end-title { color: var(--accent); }
.end-panel.lost .end-title { color: var(--enemy); }
.end-tickets { display: flex; justify-content: center; gap: 14px; font-weight: 900; font-size: 1.3rem; margin: 8px 0 14px; }
.end-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.end-grid .stat { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px 4px; }
.end-grid b { display: block; font-size: 1.5rem; }
.end-grid span { font-size: 0.6rem; letter-spacing: 0.12em; color: var(--muted); }
.end-rewards { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 16px 0; font-size: 1.1rem; }
.end-rewards b { color: var(--gold); }
.rankline { min-width: 200px; text-align: left; font-weight: 800; letter-spacing: 0.08em; font-size: 0.8rem; }
.rankline em { color: var(--accent); font-style: normal; }
.end-top { text-align: left; max-width: 420px; margin: 0 auto; }
.end-top .tr { display: grid; grid-template-columns: 24px 1fr 60px 70px; padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.end-top .tr b { text-align: right; }
.end-top .tr.you { background: rgba(60,240,197,0.08); }
.end-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.end-actions .btn-primary { width: auto; min-width: 200px; justify-content: center; }

/* ---------- HUD ---------- */
/* Developer mode tag (game/devTools.js) */
.dev-tag { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; pointer-events: none; padding: 6px 14px; border-radius: 6px; background: rgba(10, 14, 20, 0.72); border: 1px solid rgba(255, 210, 94, 0.55); color: #ffd25e; text-align: center; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.dev-tag b { display: block; font-size: 13px; }
.dev-tag small { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #e8dcc0; }
.dev-tag.hidden { display: none; }
.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 0 1px rgba(0,0,0,0.9); }
.hud-top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tickets { display: flex; align-items: center; gap: 12px; background: radial-gradient(ellipse at center, rgba(8,12,18,0.5), rgba(8,12,18,0) 70%); padding: 2px 14px; }
.team { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 8px; min-width: 190px; }
.t-friendly { justify-items: end; }
.t-friendly .tname { grid-column: 1; color: var(--friendly); font-size: 0.7rem; letter-spacing: 0.14em; }
.t-friendly .tnum { grid-column: 2; font-size: 1.6rem; color: var(--friendly); }
.t-enemy .tnum { font-size: 1.6rem; color: var(--enemy); }
.t-enemy .tname { color: var(--enemy); font-size: 0.7rem; letter-spacing: 0.14em; }
.tbar { grid-column: 1 / 3; width: 190px; height: 5px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; }
.t-friendly .tbar { direction: rtl; }
.tbar i { display: block; height: 100%; transition: width .3s; }
.t-friendly .tbar i { background: var(--friendly); }
.t-enemy .tbar i { background: var(--enemy); }
.flags-row { display: flex; gap: 5px; }
.fchip { position: relative; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.95rem; color: var(--text); }
.fchip svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.fchip circle { fill: rgba(8,12,18,0.75); stroke-width: 3.5; }
.fchip .prog { fill: none; stroke-dasharray: 0 94.2; }
.fchip span { position: relative; color: var(--text); }
.fchip.contested { animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.match-sub { font-size: 0.72rem; letter-spacing: 0.14em; color: #cfd7e2; }
.match-sub .mpts { color: var(--gold); font-size: 0.85rem; }
.match-sub .sep { opacity: 0.5; margin: 0 4px; }
.spotted { margin-top: 4px; padding: 4px 12px; border-radius: 4px; background: rgba(255,77,77,0.85); color: #fff; font-size: 0.75rem; letter-spacing: 0.2em; opacity: 0; transition: opacity .15s; }
.spotted.show { opacity: 1; animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0.55; } }
.killfeed { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.kf { display: flex; gap: 8px; align-items: center; background: rgba(8,12,18,0.7); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; transition: opacity .8s; }
.kf.mine { border: 1px solid rgba(255,210,94,0.6); }
.kf.fade { opacity: 0; }
.kf .friendly { color: var(--friendly); }
.kf .enemy { color: var(--enemy); }
.kf .you { text-decoration: underline; }
.kf .kw { color: #cfd7e2; font-size: 0.7rem; letter-spacing: 0.08em; }
.kf .kw em { color: var(--gold); font-style: normal; }
.center { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.crosshair { position: absolute; left: 0; top: 0; --gap: 10px; transition: opacity .1s; }
.crosshair i { position: absolute; background: var(--crosshair); box-shadow: 0 0 2px rgba(0,0,0,0.9); }
.ch-t, .ch-b { width: 2px; height: 9px; left: -1px; }
.ch-l, .ch-r { width: 9px; height: 2px; top: -1px; }
.ch-t { top: calc(-1 * var(--gap) - 9px); }
.ch-b { top: var(--gap); }
.ch-l { left: calc(-1 * var(--gap) - 9px); }
.ch-r { left: var(--gap); }
.ch-dot { width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }
.hitmarker { position: absolute; left: 0; top: 0; opacity: 0; }
.hitmarker i { position: absolute; width: 2px; height: 10px; background: #fff; left: -1px; top: -5px; }
.hitmarker i:nth-child(1) { transform: rotate(45deg) translateY(-12px); }
.hitmarker i:nth-child(2) { transform: rotate(135deg) translateY(-12px); }
.hitmarker i:nth-child(3) { transform: rotate(225deg) translateY(-12px); }
.hitmarker i:nth-child(4) { transform: rotate(315deg) translateY(-12px); }
.hitmarker.show { animation: hit .22s ease-out; }
.hitmarker.head i { background: var(--gold); }
.hitmarker.kill i { background: var(--enemy); height: 14px; }
.hitmarker.kill.show { animation: hit .4s ease-out; }
@keyframes hit { 0% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(1); } }
.popups { position: absolute; left: 40px; top: 30px; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.popup { font-size: 0.85rem; letter-spacing: 0.1em; color: #e9eef4; transition: opacity .6s; animation: popIn .15s ease-out; }
.popup b { color: var(--gold); }
.popup.fade { opacity: 0; }
@keyframes popIn { from { transform: translateX(-8px); opacity: 0; } }
.capture { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity .15s; }
.capture.show { opacity: 1; }
.cap-label { font-size: 0.85rem; letter-spacing: 0.2em; }
.cap-bar { width: 240px; height: 6px; margin-top: 6px; background: rgba(255,255,255,0.15); border-radius: 3px; overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: var(--friendly); }
/* Vehicles: the prompt beside one, and the HUD while driving (no crosshair, kit dimmed). */
.hud-prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); padding: 6px 14px; border-radius: 6px; background: rgba(6,10,14,0.55); font-size: 0.82rem; letter-spacing: 0.18em; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }
.hud-prompt.show { opacity: 1; }
.hud-prompt kbd { margin-right: 8px; }
.hud.driving .hud-kit, .hud.driving .w-slots { opacity: 0.35; }
.banner { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; opacity: 0; }
.banner.show { animation: bannerIn 0.3s ease-out forwards; }
.banner h2 { margin: 0; font-size: 2.2rem; font-style: italic; font-weight: 900; letter-spacing: 0.02em; background: rgba(8,12,18,0.55); padding: 4px 22px; border-radius: 6px; }
.banner p { margin: 6px 0 0; font-size: 0.85rem; letter-spacing: 0.12em; color: #d6dee8; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -8px) scale(1.05); } to { opacity: 1; transform: translate(-50%, 0); } }
.vignette { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(190,10,20,0.75) 100%); transition: opacity .2s; }
.dmgdirs { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.dmgdir { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.dmgdir i { position: absolute; left: -70px; top: -190px; width: 140px; height: 26px; border-top: 5px solid rgba(255,60,60,0.95); border-radius: 50% 50% 0 0; filter: drop-shadow(0 0 6px rgba(255,0,0,0.7)); }
.scope { position: absolute; inset: 0; display: none; }
.scope.show { display: block; }
.scope-ring { position: absolute; left: 50%; top: 50%; width: 86vh; height: 86vh; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 200vmax #000, inset 0 0 60px 20px rgba(0,0,0,0.9); border: 2px solid #000; }
/* Scope reticles (SVG, one per scope): an 8x duplex with mil dots and a 3x lit chevron with
   bullet-drop marks. The ring's shadow blacks out everything outside the lens. */
.scope-ret { position: absolute; left: 50%; top: 50%; width: 86vh; height: 86vh; transform: translate(-50%, -50%); display: none; overflow: visible; }
.scope[data-optic="long8"] .ret-long8, .scope[data-optic="prism3"] .ret-prism3 { display: block; }
.scope-ret .ret-glow { fill: #ff2a2a; stroke: #ff3a2a; filter: drop-shadow(0 0 3px rgba(255, 40, 30, 0.95)); }
.ret-prism3 .ret-glow { fill: none; }
.scope-glare { position: absolute; left: 50%; top: 50%; width: 86vh; height: 86vh; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 28%, rgba(190, 225, 255, 0.10), rgba(190, 225, 255, 0) 38%), radial-gradient(circle, rgba(0, 0, 0, 0) 62%, rgba(0, 12, 20, 0.35) 100%); }
/* FROST SCOPE (crossbow): icy rim, dark lines with a light halo so they read against snow, a drop
   ladder for 25-100 m (placed by hud.js) and a rangefinder reading under the crosshair. */
.scope[data-optic="frost6"] .ret-frost6 { display: block; }
.scope[data-optic="frost6"] .scope-ring { border: 3px solid #8fd2ff; box-shadow: 0 0 0 200vmax #000, inset 0 0 70px 24px rgba(70, 150, 225, 0.6), inset 0 0 14px 4px rgba(200, 235, 255, 0.7); }
.scope[data-optic="frost6"] .scope-glare { background: radial-gradient(circle at 34% 28%, rgba(220, 240, 255, 0.14), rgba(220, 240, 255, 0) 38%), radial-gradient(circle, rgba(0, 0, 0, 0) 64%, rgba(150, 200, 240, 0.28) 100%); }
.ret-frost6 .halo { stroke: rgba(235, 245, 255, 0.55); stroke-width: 6; fill: none; }
.ret-frost6 .frost-num { font: 700 22px var(--font); fill: #0b1a2a; stroke: rgba(235, 245, 255, 0.7); stroke-width: 5px; paint-order: stroke; }
.ret-frost6 .ret-glow { fill: #5fd0ff; stroke: #9fe4ff; filter: drop-shadow(0 0 3px rgba(80, 200, 255, 0.95)); }
.frost-range { display: none; position: absolute; left: 50%; top: calc(50% + 34vh); transform: translateX(-50%); font: 700 1.05rem var(--mono); color: #0b1a2a;
  background: rgba(225, 242, 255, 0.78); border: 1px solid #8fd2ff; border-radius: 3px; padding: 1px 10px; letter-spacing: 0.06em; }
.scope[data-optic="frost6"] .frost-range { display: block; }
.markers { position: absolute; inset: 0; overflow: hidden; }
.mk { position: absolute; left: 0; top: 0; will-change: transform; }
.mk-flag b { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid; display: flex; align-items: center; justify-content: center; background: rgba(8,12,18,0.7); font-size: 0.8rem; }
.mk-flag small { position: absolute; top: 14px; left: -30px; width: 60px; text-align: center; font-size: 0.62rem; color: #cfd7e2; }
.mk-friend span { position: absolute; left: -60px; top: -22px; width: 120px; text-align: center; font-size: 0.66rem; color: var(--friendly); white-space: nowrap; }
.mk-friend i { position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-right: 2px solid var(--friendly); border-bottom: 2px solid var(--friendly); transform: rotate(45deg); }
.mk-friend.low span { color: #ffb0b0; }
.mk-enemy i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--enemy); transform: rotate(45deg); box-shadow: 0 0 8px rgba(255,60,60,0.8); }
.dmgnum { position: absolute; transform: translate(-50%, 0); font-size: 0.85rem; font-weight: 900; color: #fff; animation: dmgUp .9s ease-out forwards; }
.dmgnum.head { color: var(--gold); font-size: 1rem; }
@keyframes dmgUp { to { transform: translate(-50%, -34px); opacity: 0; } }
.hud-bl { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: flex-end; gap: 12px; }
.minimap { border-radius: 50%; background: rgba(8,12,18,0.6); }
.health { min-width: 220px; background: linear-gradient(90deg, rgba(8,12,18,0.55), rgba(8,12,18,0)); padding: 4px 10px 6px; border-radius: 8px; }
.hp-row { display: flex; align-items: baseline; gap: 6px; }
.hp { font-size: 2.2rem; font-style: italic; }
.hp-row span { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.15em; }
.hpbar { height: 7px; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; margin: 4px 0; }
.hpbar i { display: block; height: 100%; background: linear-gradient(90deg, #e9eef4, var(--accent)); transition: width .15s; }
.hpbar.low i { background: var(--enemy); }
.who { font-size: 0.68rem; letter-spacing: 0.1em; color: #b8c2cf; }
.hud-kit { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; }
.slot { position: relative; width: 132px; background: rgba(8,12,18,0.7); border: 1px solid var(--line2); border-radius: 7px; padding: 7px 9px 7px 36px; overflow: hidden; }
.slot kbd { position: absolute; left: 8px; top: 9px; }
.s-name { font-size: 0.66rem; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sub { font-size: 0.8rem; color: var(--gold); margin-top: 2px; }
.s-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(255,255,255,0.08); }
.slot.ready { border-color: rgba(60,240,197,0.55); }
.slot.ready .s-sub { color: var(--accent); }
.s-ability.ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,210,94,0.35); animation: pulseB 1s infinite alternate; }
@keyframes pulseB { to { box-shadow: 0 0 22px rgba(255,210,94,0.6); } }
.pips i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: rgba(255,255,255,0.15); margin-right: 3px; vertical-align: middle; }
.pips i.on { background: var(--gold); }
.s-sub small { color: var(--muted); font-size: 0.65rem; }
.slot.empty .s-sub { color: var(--enemy); }
.hud-weapon { position: absolute; right: 18px; bottom: 16px; text-align: right; min-width: 240px; background: linear-gradient(270deg, rgba(8,12,18,0.55), rgba(8,12,18,0)); padding: 4px 10px 6px; border-radius: 8px; }
.w-slots { display: flex; justify-content: flex-end; gap: 6px; font-size: 0.66rem; letter-spacing: 0.08em; color: var(--muted); }
.ws { padding: 2px 6px; border-radius: 3px; }
.ws.active { background: rgba(255,255,255,0.12); color: var(--text); }
.w-ammo { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; }
.w-mag { font-size: 3rem; font-style: italic; line-height: 1; }
.w-mag.low { color: var(--enemy); }
.w-res { font-size: 1.1rem; color: var(--muted); }
.w-info { display: flex; justify-content: flex-end; gap: 8px; font-size: 0.72rem; letter-spacing: 0.1em; }
.w-mode { border: 1px solid var(--line2); border-radius: 3px; padding: 0 5px; color: var(--gold); }
.w-reload { font-size: 0.75rem; letter-spacing: 0.2em; color: var(--gold); opacity: 0; }
.w-reload.show { opacity: 1; animation: blink .6s infinite; }
.hud-hints { position: absolute; right: 18px; bottom: 132px; font-size: 0.62rem; letter-spacing: 0.1em; color: rgba(233,238,244,0.6); }
.hud-fps { position: absolute; right: 6px; top: 2px; font-family: var(--mono); font-size: 11px; color: #9fe; display: none; }
.scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1000px, 94vw); background: rgba(10,14,20,0.92); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; display: none; text-shadow: none; }
.scoreboard.show { display: block; }
.sb-head { display: flex; justify-content: space-between; font-size: 0.75rem; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 10px; }
.sb-cols { display: flex; gap: 16px; }
.sb-team { flex: 1; }
.sb-team h3 { margin: 0 0 6px; display: flex; justify-content: space-between; font-style: italic; }
.sb-team.friendly h3 { color: var(--friendly); }
.sb-team.enemy h3 { color: var(--enemy); }
.sb-team table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.sb-team th { text-align: left; font-size: 0.6rem; letter-spacing: 0.12em; color: var(--muted); padding: 4px; border-bottom: 1px solid var(--line2); }
.sb-team td { padding: 4px; border-bottom: 1px solid var(--line); }
.sb-team td.nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-team tr.you td { background: rgba(255,210,94,0.12); }
.sb-team tr.dead td { opacity: 0.5; }
.sb-team em { font-style: normal; font-size: 0.6rem; color: var(--gold); }
.sb-team td.sc { text-align: right; font-weight: 900; }

.hud.nolife .health, .hud.nolife .hud-kit, .hud.nolife .hud-weapon, .hud.nolife .hud-hints, .hud.nolife .center, .hud.nolife .vignette, .hud.nolife .scope, .hud.nolife .dmgdirs { display: none; }
.hud.nolife .hud-bl { opacity: 0.85; }
.hud.nolife .banner { top: 40%; }

/* ---------- touch ---------- */
.touch { position: fixed; inset: 0; z-index: 6; touch-action: none; }
.t-stick { position: absolute; width: 120px; height: 120px; left: 60px; bottom: 60px; top: auto; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); opacity: 0.35; }
.t-stick.on { opacity: 0.8; bottom: auto; }
.t-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.t-btns { position: absolute; right: 20px; bottom: 20px; display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; }
.t-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); background: rgba(10,14,20,0.45); font-weight: 800; font-size: 0.7rem; color: #fff; }
.t-btn.big { grid-column: span 3; width: 100%; border-radius: 34px; height: 70px; font-size: 1rem; background: rgba(255,77,77,0.35); }
.t-btn.on { background: rgba(60,240,197,0.4); }
.t-btn.ctx { background: rgba(255,210,94,0.35); }
.t-pause { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 44px; height: 36px; border-radius: 8px; background: rgba(10,14,20,0.5); border: 1px solid rgba(255,255,255,0.3); font-weight: 900; }
.t-rotate { display: none; position: fixed; inset: 0; background: #07090d; align-items: center; justify-content: center; flex-direction: column; gap: 8px; z-index: 200; }
@media (orientation: portrait) and (pointer: coarse) { .t-rotate { display: flex; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .record { display: none; }
  .agent { width: 330px; }
  .left-col { width: 330px; }
  .stats-panel { width: 260px; }
  .att-panel { right: 280px; }
}
@media (max-height: 700px) {
  html { font-size: calc(13px * var(--ui-scale)); }
}

/* Language switch (CG / EN) in the menu's bottom bar */
.lang-seg { flex: none; flex-wrap: nowrap; padding: 2px; margin-left: 10px; }
.lang-seg button { padding: 4px 9px; font-size: 0.7rem; }

/* ---------------------------------------------------------------- ONLINE (src/ui/online.js, src/net) */
/* The ONLINE tab uses the PLAY tab's panels; these are its extras. */
.seg.wrap { flex-wrap: wrap; }
.seg.static { pointer-events: none; }
.online-col .play-btn { font-size: 1.6rem; white-space: nowrap; }
.online-col .opt-row .ol-note { font-size: 0.72rem; }
.opt-row.top { align-items: flex-start; }
.opt-row.top .opt-l { padding-top: 9px; }
.opt-row .seg.wrap { flex: 1; }
.ol-note { font-size: 0.8rem; color: var(--muted); line-height: 1.35; flex: 1; }
.ol-code { flex: 1; min-width: 0; font-family: var(--mono); letter-spacing: 0.2em; text-transform: uppercase; padding: 8px 12px; font-size: 0.95rem; }
.ol-msg { min-height: 1.1em; margin-top: -4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.ol-msg:empty { display: none; }
.ol-msg.bad { color: var(--enemy); }
.ol-server { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ol-host { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 0.78rem; color: var(--text); opacity: 0.85; }
.ol-edit { display: flex; flex-direction: column; gap: 8px; }
.ol-edit .txt { font-family: var(--mono); font-size: 0.85rem; padding: 8px 10px; }
.ol-edit-b { display: flex; gap: 8px; }
.ol-edit small { line-height: 1.35; }
.ol-st { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; }
.ol-st .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.ol-st[data-s="connected"] { color: var(--accent); opacity: 1; }
.ol-st[data-s="connected"] .dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.ol-st[data-s="connecting"] .dot { background: var(--gold); animation: olblink 0.8s infinite; }
.ol-st[data-s="failed"] { color: var(--enemy); opacity: 1; }
.ol-st[data-s="failed"] .dot { background: var(--enemy); }
@keyframes olblink { 50% { opacity: 0.3; } }
.btn.online .gl { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn.online > span:first-child { display: inline-flex; align-items: center; }
.net-overlay { position: fixed; inset: 0; z-index: 7; pointer-events: none; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 0 1px rgba(0,0,0,0.9); }
/* Room line, top left: the HUD's small caps (like MATCH PTS under the tickets). */
.net-tag { position: absolute; left: 16px; top: 14px; font-size: 0.72rem; letter-spacing: 0.14em; color: #cfd7e2; display: flex; align-items: center; gap: 2px; }
.net-tag b { color: var(--accent); }
.net-tag .sep { opacity: 0.5; margin: 0 5px; }
.net-tag em { color: var(--enemy); font-style: normal; }
.net-tag kbd { font-size: 0.62rem; margin-right: 4px; text-shadow: none; }
/* Chat lines: kill feed rows, on the left above the minimap. */
.net-chat { position: absolute; left: 16px; bottom: 250px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 42vw; }
.net-chat .cm { background: rgba(8,12,18,0.7); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; transition: opacity .8s; }
.net-chat .cm small { color: #cfd7e2; font-size: 0.66rem; letter-spacing: 0.1em; margin-right: 2px; }
.net-chat .cm i { color: #cfd7e2; font-style: normal; font-size: 0.72rem; letter-spacing: 0.08em; }
.net-chat .cm.fade { opacity: 0; }
/* Quick chat list (Z): the HUD's kit-slot panels. */
.net-qc { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 230px; background: rgba(8,12,18,0.78); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; }
.net-qc .qc-head { font-size: 0.7rem; letter-spacing: 0.16em; color: var(--accent); }
.net-qc .qc-hint { font-size: 0.66rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; }
.net-qc .qc-row { display: flex; align-items: center; gap: 8px; }
.net-qc kbd { width: 20px; text-align: center; margin: 0; text-shadow: none; }
.pause-online { display: flex; justify-content: space-between; align-items: baseline; margin: -2px 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pause-online .k { font-size: 0.7rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; }
.pause-online b { font-size: 0.95rem; letter-spacing: 0.12em; }
.pause-online b.code { font-family: var(--mono); font-size: 1.15rem; color: var(--accent); }
.end-vote { text-align: left; max-width: 420px; margin: 0 auto; }
.end-vote .sect { display: flex; justify-content: space-between; }
.end-vote .sect .r { color: var(--text); opacity: 0.75; }
.vote-list { display: flex; flex-direction: column; gap: 6px; }
.vote-map { display: flex; align-items: center; justify-content: space-between; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.vote-map:hover { background: rgba(255,255,255,0.07); }
.vote-map h3 { margin: 0; font-size: 1.15rem; font-style: italic; font-weight: 900; }
.vote-map span { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; }
.vote-map.sel { border-color: rgba(60,240,197,0.5); background: linear-gradient(160deg, rgba(60,240,197,0.18), rgba(10,14,20,0.6) 60%); }
.vote-map.sel span { color: var(--accent); }
.scoreboard td.ping { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
