/* Breachpoint — UI styles (menus, HUD, touch). Single dark look over the live 3D scene. */
:root {
  color-scheme: dark;
  --ink: #ece9e1;
  --ink-dim: #a7a49b;
  --ink-faint: #6f6d67;
  --panel: rgba(12, 13, 13, 0.72);
  --panel-solid: #121313;
  --line: rgba(236, 233, 225, 0.14);
  --amber: #e8b04a;
  --friendly: #4fb3ff;
  --enemy: #ff4d4d;
  --sel-bg: #ece9e1;
  --sel-ink: #121313;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0d0e; color: var(--ink); font-family: var(--body); user-select: none; -webkit-user-select: none; touch-action: none; }
#app, #app canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible, .pad-focus { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- loading ---------- */
#loading { flex-direction: column; gap: 18px; z-index: 50; background: #0b0d0e; }
.load-logo { font-family: var(--display); font-weight: 700; font-size: 44px; letter-spacing: 0.32em; padding-left: 0.32em; }
.load-bar { width: min(320px, 70vw); height: 2px; background: var(--line); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 40%; background: var(--ink); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#load-text { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: none; z-index: 20; }
.screen.on { display: flex; }
#menu { background: linear-gradient(90deg, rgba(8, 9, 9, 0.92) 0%, rgba(8, 9, 9, 0.7) 45%, rgba(8, 9, 9, 0.15) 100%); }
#pause, #end { align-items: center; justify-content: center; background: rgba(6, 7, 7, 0.72); backdrop-filter: blur(6px); padding: 16px; }

.mw { width: 100%; height: 100%; display: flex; flex-direction: column; padding: clamp(16px, 3vw, 40px) clamp(16px, 4vw, 56px); gap: 18px; overflow-y: auto; }
.mw.narrow { width: min(460px, 100%); height: auto; background: var(--panel); border: 1px solid var(--line); padding: 24px; }
.mw.wide { width: min(980px, 100%); height: auto; max-height: calc(100vh - 32px); background: var(--panel); border: 1px solid var(--line); padding: 28px; }
.mw-head { display: flex; align-items: center; gap: clamp(16px, 4vw, 48px); flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: 0.24em; display: flex; align-items: center; gap: 14px; }
.logo .mark { width: 14px; height: 14px; background: var(--enemy); box-shadow: 0 0 18px rgba(255, 77, 77, 0.6); }
.tabs { display: flex; align-items: center; gap: 4px; }
.tab { background: none; border: 0; padding: 8px 14px; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: 0.14em; color: var(--ink-faint); cursor: pointer; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink-dim); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }

.mw-body { flex: 1; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr) 300px; gap: 32px; align-items: start; min-height: 0; }
.pane { display: none; flex-direction: column; gap: 14px; grid-column: 1; min-width: 0; }
.pane.on { display: flex; }
#pane-options.on { grid-column: 1 / 3; }
.pane-title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 52px); letter-spacing: 0.08em; margin: 0; line-height: 1; text-wrap: balance; }
.pane-sub { margin: 0; color: var(--ink-dim); max-width: 46ch; }
.intel { grid-column: 3; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-content: start; background: var(--panel); border: 1px solid var(--line); padding: 14px; }
.intel-map { grid-column: 1 / 3; margin-bottom: 6px; }
.intel-map canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.intel-k { font-size: 11px; letter-spacing: 0.18em; color: var(--ink-faint); align-self: center; }
.intel-v { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; }
@media (max-width: 1100px) { .mw-body { grid-template-columns: minmax(0, 1fr); } .intel { grid-column: 1; } #pane-options.on { grid-column: 1; } }

.rows { display: flex; flex-direction: column; gap: 4px; }
.rows.two { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 760px) { .rows.two { grid-template-columns: 1fr; } }
.group { grid-column: 1 / -1; font-size: 11px; letter-spacing: 0.22em; color: var(--ink-faint); margin: 12px 0 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; background: var(--panel); border-left: 2px solid transparent; min-height: 46px; }
.row:focus-within, .row.pad-row { border-left-color: var(--ink); background: rgba(236, 233, 225, 0.08); }
.row label { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); display: flex; gap: 10px; align-items: baseline; }
.row output { color: var(--ink); font-variant-numeric: tabular-nums; }
select, input[type=text], input:not([type]) { font: inherit; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: 0.06em; color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 0; padding: 6px 10px; outline: none; min-width: 150px; }
select option { background: var(--panel-solid); }
input[type=range] { width: min(220px, 45vw); accent-color: var(--ink); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ink); }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--sel-bg); color: var(--sel-ink); border: 0; padding: 14px 20px; font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 0.2em; cursor: pointer; margin-top: 8px; transition: transform .1s, background .15s; }
.cta:hover { background: #fff; }
.cta:active { transform: scale(0.99); }
.menu-btn { background: var(--panel); border: 1px solid var(--line); padding: 12px 16px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.16em; cursor: pointer; text-align: left; }
.menu-btn:hover { background: rgba(236, 233, 225, 0.1); }
.mw-foot { display: flex; gap: 22px; flex-wrap: wrap; color: var(--ink-dim); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.mw-foot span { display: inline-flex; align-items: center; gap: 8px; }

/* weapon cards */
.weapons { display: grid; grid-template-columns: 1fr; gap: 6px; }
.wcard { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; text-align: left; padding: 12px 14px; background: var(--panel); border: 1px solid transparent; border-left: 2px solid transparent; cursor: pointer; }
.wcard:hover { background: rgba(236, 233, 225, 0.07); }
.wcard.on { border-left-color: var(--amber); background: rgba(232, 176, 74, 0.08); }
.wcard .wn { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; }
.wcard .wt { font-size: 12px; letter-spacing: 0.16em; color: var(--ink-faint); align-self: center; }
.stats { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 12px; }
.stat { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-faint); }
.stat i { display: block; height: 3px; background: var(--line); margin-top: 3px; }
.stat i b { display: block; height: 100%; background: var(--ink); }

.controls-ref { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: 0.16em; color: var(--ink-faint); padding: 6px 10px; text-transform: uppercase; }
td { padding: 6px 10px; border-top: 1px solid var(--line); white-space: nowrap; }

/* controller / key glyphs */
.glyph { display: none; }
body[data-device="pad"] .glyph, .glyph.show { display: inline-flex; }
.pg { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; font-family: var(--display); font-weight: 700; font-size: 14px; color: #0b0d0e; background: var(--ink); line-height: 1; }
.pg.a { background: #5fbf4a; } .pg.b { background: #e0443e; } .pg.x { background: #3f86e0; } .pg.y { background: #e8c23a; }
.pg.bump { border-radius: 4px; background: #8d8b85; min-width: 30px; }
.pg.stick { border-radius: 50%; background: #8d8b85; }
kbd { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); border: 1px solid var(--ink-dim); border-radius: 3px; padding: 1px 6px; }
.bumper { align-self: center; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 10; font-family: var(--display); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); }
#hud.on { display: block; }

#tl { position: absolute; top: 18px; left: 18px; display: flex; flex-direction: column; gap: 8px; width: 210px; }
#mm-wrap { position: relative; width: 210px; height: 210px; background: rgba(10, 12, 12, 0.55); border: 1px solid rgba(236, 233, 225, 0.25); overflow: hidden; }
#minimap { width: 100%; height: 100%; display: block; }
.mm-n { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 12px; color: var(--ink-dim); }
#scorebox { display: flex; flex-direction: column; gap: 3px; }
.srow { display: grid; grid-template-columns: 66px 1fr 34px; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; letter-spacing: 0.12em; }
.srow b { font-size: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.friendly { color: var(--friendly); }
.enemy { color: var(--enemy); }
.sbar { height: 6px; background: rgba(236, 233, 225, 0.15); }
.sbar i { display: block; height: 100%; width: 0; background: currentColor; transition: width .3s; }
.smeta { display: flex; gap: 8px; font-size: 14px; letter-spacing: 0.1em; color: var(--ink-dim); font-weight: 600; }
.smeta #timer { color: var(--ink); font-variant-numeric: tabular-nums; }
.smeta #timer.low { color: var(--amber); }
.smeta .dot { color: var(--ink-faint); }

#compass { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: min(520px, 46vw); text-align: center; }
#compass canvas { width: 100%; height: 32px; display: block; }
#bearing { font-weight: 600; font-size: 14px; letter-spacing: 0.1em; color: var(--ink); font-variant-numeric: tabular-nums; }

#killfeed { position: absolute; left: 18px; bottom: 120px; display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 16px; letter-spacing: 0.04em; }
.kf { display: flex; gap: 8px; align-items: center; transition: opacity .5s; }
.kf.fade { opacity: 0; }
.kf .kw { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.1em; }
.kf.mine .kw { color: var(--amber); }
#fps { position: absolute; top: 18px; right: 18px; font-size: 13px; color: var(--ink-dim); display: none; }

#crosshair { --gap: 8px; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: opacity .08s; }
#crosshair i { position: absolute; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 1px rgba(0, 0, 0, 0.9); }
#crosshair .t, #crosshair .b { width: 2px; height: 8px; left: -1px; }
#crosshair .l, #crosshair .r { height: 2px; width: 8px; top: -1px; }
#crosshair .t { bottom: var(--gap); } #crosshair .b { top: var(--gap); }
#crosshair .l { right: var(--gap); } #crosshair .r { left: var(--gap); }
#crosshair.enemy i { background: var(--enemy); }

#hitmarker { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
#hitmarker i { position: absolute; width: 2px; height: 8px; background: #fff; left: -1px; top: -4px; box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); }
#hitmarker i:nth-child(1) { transform: rotate(45deg) translateY(-11px); }
#hitmarker i:nth-child(2) { transform: rotate(135deg) translateY(-11px); }
#hitmarker i:nth-child(3) { transform: rotate(225deg) translateY(-11px); }
#hitmarker i:nth-child(4) { transform: rotate(315deg) translateY(-11px); }
#hitmarker.kill i { background: var(--enemy); height: 11px; }
#hitmarker.head i { background: var(--amber); }

#dmg-ind { position: absolute; left: 50%; top: 50%; }
.dmg { position: absolute; left: -90px; top: -190px; width: 180px; height: 380px; transform-origin: 90px 190px; transition: opacity 1s; }
.dmg::before { content: ''; position: absolute; left: 50px; top: 0; width: 80px; height: 22px; background: radial-gradient(ellipse at 50% 100%, rgba(255, 40, 30, 0.9), rgba(255, 40, 30, 0) 70%); }
.dmg.fade { opacity: 0; }

#score-pop { position: absolute; left: calc(50% + 46px); top: calc(50% - 10px); display: flex; flex-direction: column; gap: 1px; }
.sp { font-weight: 700; font-size: 18px; letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; animation: pop .22s ease-out; transition: opacity .5s; }
.sp.total { font-size: 26px; color: var(--amber); }
.sp.fade { opacity: 0; }
#medal { position: absolute; top: 26%; left: 50%; transform: translateX(-50%); text-align: center; }
.medal { font-weight: 700; font-size: 32px; letter-spacing: 0.14em; color: var(--amber); animation: medal .35s ease-out; transition: opacity .5s; }
.medal small { display: block; font-size: 15px; color: var(--ink-dim); letter-spacing: 0.2em; }
.medal.fade { opacity: 0; }
@keyframes pop { from { transform: translateX(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes medal { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#prompt { position: absolute; top: calc(50% + 46px); left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 16px; letter-spacing: 0.16em; display: flex; gap: 8px; align-items: center; }
#prompt.warn { color: var(--amber); }
#center-msg { position: absolute; top: 64%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.msg { font-weight: 600; font-size: 17px; letter-spacing: 0.14em; transition: opacity .5s; animation: pop .25s ease-out; }
.msg.big { font-size: 34px; color: var(--amber); }
.msg.fade { opacity: 0; }
#countdown { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-size: 110px; font-weight: 700; display: none; }
#countdown.on { display: block; animation: medal .3s ease-out; }
#protect { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); font-size: 13px; letter-spacing: 0.24em; color: var(--amber); display: none; }
#protect.on { display: block; }

#health-wrap { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); opacity: 0; transition: opacity .4s; }
#health-wrap.on { opacity: 1; }
#health-bar { width: 220px; height: 5px; background: rgba(236, 233, 225, 0.18); }
#health-fill { display: block; height: 100%; width: 100%; background: var(--ink); transition: width .15s; }
#health-fill.low { background: var(--enemy); }

#ammo { position: absolute; right: 24px; bottom: 22px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#weapon-name { font-weight: 600; font-size: 15px; letter-spacing: 0.16em; color: var(--ink-dim); }
.ammo-row { display: flex; align-items: flex-end; gap: 10px; line-height: 0.85; }
#ammo-mag { font-weight: 600; font-size: 64px; font-variant-numeric: tabular-nums; }
#ammo-mag.low { color: var(--amber); }
#ammo-mag.empty { color: var(--enemy); }
.ammo-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 4px; }
#ammo-res { font-size: 24px; font-weight: 600; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
#fire-mode { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-faint); border: 1px solid var(--ink-faint); padding: 1px 4px; }
.equip { display: flex; gap: 14px; margin-top: 6px; }
.eq { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 18px; }
.eq svg { width: 20px; height: 20px; color: var(--ink); }
.eq .pg { transform: scale(0.85); }

#scope { position: absolute; inset: 0; display: none; }
#scope.on { display: block; }
#scope .lens { position: absolute; left: 50%; top: 50%; width: min(92vh, 92vw); height: min(92vh, 92vw); transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 200vmax #050505, inset 0 0 60px 30px rgba(0, 0, 0, 0.85); }
#scope .h, #scope .v { position: absolute; background: rgba(0, 0, 0, 0.9); }
#scope .h { left: 0; right: 0; top: 50%; height: 1.5px; }
#scope .v { top: 0; bottom: 0; left: 50%; width: 1.5px; }
#scope .dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #ff3a2a; box-shadow: 0 0 6px #ff3a2a; }

#death { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); text-align: center; display: none; background: rgba(10, 11, 11, 0.7); padding: 14px 34px; border-top: 2px solid var(--enemy); min-width: 300px; }
#death.on { display: block; }
.d-label { font-size: 13px; letter-spacing: 0.3em; color: var(--ink-dim); }
#death-killer { font-weight: 700; font-size: 34px; letter-spacing: 0.06em; color: var(--enemy); }
#death-detail { font-size: 15px; letter-spacing: 0.1em; color: var(--ink-dim); }
#death-timer { margin-top: 8px; font-size: 16px; letter-spacing: 0.14em; color: var(--ink); }

#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(900px, 94vw); display: none; gap: 14px; font-family: var(--body); }
#scoreboard.on { display: flex; }
.sb-team { flex: 1; background: rgba(10, 11, 11, 0.86); border-top: 3px solid var(--tc); padding: 10px 12px; min-width: 0; }
.sb-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--tc); font-family: var(--display); font-weight: 700; letter-spacing: 0.14em; font-size: 18px; margin-bottom: 4px; }
.sb-head b { font-size: 30px; }
.sb-team table { font-size: 14px; }
.sb-team th { text-align: right; }
.sb-team th:first-child, .sb-team td:first-child { text-align: left; }
.sb-team td { text-align: right; max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
tr.me td { color: var(--amber); font-weight: 600; }
tr.dead td { opacity: 0.45; }
.tag { font-size: 9px; color: var(--ink-faint); border: 1px solid var(--ink-faint); padding: 0 3px; vertical-align: middle; letter-spacing: 0.1em; }
@media (max-width: 680px) { #scoreboard { flex-direction: column; } }

#toast { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); background: rgba(10, 11, 11, 0.8); border-left: 2px solid var(--amber); padding: 8px 16px; font-size: 15px; letter-spacing: 0.12em; opacity: 0; transition: opacity .4s; }
#toast.on { opacity: 1; }

/* end screen */
#end-title { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 7vw, 76px); letter-spacing: 0.2em; text-align: center; }
#end-title.win { color: var(--friendly); }
#end-title.lose { color: var(--enemy); }
#end-score { text-align: center; font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: 0.1em; }
#end-mvp { text-align: center; color: var(--amber); letter-spacing: 0.14em; margin: 4px 0 14px; font-family: var(--display); font-size: 18px; }
#end-board { display: flex; gap: 14px; }
@media (max-width: 680px) { #end-board { flex-direction: column; } }
.end-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.end-actions .cta { margin: 0; min-width: 240px; }

/* ---------- touch ---------- */
#touch { position: fixed; inset: 0; z-index: 11; display: none; }
body.ingame #touch.on { display: block; }
#stick { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); display: none; pointer-events: none; }
#stick.show { display: block; }
#stick-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.tb { position: absolute; width: 58px; height: 58px; border-radius: 50%; padding: 0; font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; }
.tb.big { width: 88px; height: 88px; font-size: 15px; background: rgba(255, 77, 77, 0.3); }
.tb.small { width: 48px; height: 34px; border-radius: 4px; }
.tb.down, .tb.active { background: rgba(255, 255, 255, 0.35); }
#tb-pause { top: 10px; right: 70px; }
#tb-score { top: 10px; right: 12px; }
#tb-fire { right: 22px; bottom: 92px; }
#tb-jump { right: 22px; bottom: 16px; }
#tb-ads { right: 122px; bottom: 156px; }
#tb-reload { right: 122px; bottom: 86px; }
#tb-crouch { right: 92px; bottom: 12px; }
#tb-swap { right: 192px; bottom: 30px; }
#tb-frag { right: 192px; bottom: 106px; }
#tb-melee { right: 34px; bottom: 196px; }
#tb-sprint { left: 22px; bottom: 112px; }
#stick.sprint { border-color: rgba(232, 176, 74, 0.9); box-shadow: 0 0 0 2px rgba(232, 176, 74, 0.35); }
#stick.sprint #stick-knob { background: rgba(232, 176, 74, 0.55); }
/* while aiming: a bigger fire button, plus a second one on the left so the right thumb can hold ADS and aim */
#tb-fire, #tb-fire2 { transition: width .12s, height .12s; }
#tb-fire2 { left: 24px; bottom: 92px; width: 92px; height: 92px; display: none; }
body.ads-on #tb-fire2 { display: block; }
body.ads-on #tb-fire { width: 104px; height: 104px; right: 18px; bottom: 86px; }

@media (pointer: coarse) {
  #tl { width: 116px; top: 8px; left: 8px; gap: 5px; }
  #mm-wrap { width: 116px; height: 116px; }
  /* sprint is the stick pushed fully forward on touch, so the button isn't needed */
  #tb-sprint { display: none; }
  #fps { top: 14px; right: 150px; }
  .tag .tn { font-size: 13px; }
  .srow { grid-template-columns: 52px 1fr 26px; font-size: 10px; }
  .srow b { font-size: 16px; }
  .smeta { font-size: 11px; }
  #compass { width: 34vw; top: 6px; }
  #killfeed { bottom: auto; top: 50px; left: 50%; transform: translateX(-50%); align-items: center; font-size: 11px; opacity: 0.92; }
  #ammo { top: 54px; bottom: auto; right: 130px; }
  #ammo-mag { font-size: 38px; }
  #ammo-res { font-size: 16px; }
  .equip { display: none; }
  #death { bottom: 40px; }
  #countdown { font-size: 70px; }
}
#rotate { position: fixed; inset: 0; z-index: 100; background: #0b0d0e; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink-dim); letter-spacing: 0.1em; }
#rotate div { font-size: 54px; color: var(--ink); }
@media (pointer: coarse) and (orientation: portrait) { body.ingame #rotate { display: flex; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- online ---------- */
.online-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.online-row .menu-btn { text-align: center; font-size: 16px; }
.pane-note { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; margin: 10px 0 0; line-height: 1.5; }
/* name tags over players (Black Ops 2 style: friendlies always, enemies when aimed at) */
#tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; white-space: nowrap; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 8px rgba(0,0,0,.6); will-change: transform; }
.tag .tn { font-size: 15px; line-height: 1; }
.tag .tc { width: 0; height: 0; margin-top: 3px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid currentColor; filter: drop-shadow(0 0 2px #000) drop-shadow(0 1px 1px #000); }
.tag.f { color: #5cc4ff; }
.tag.e { color: #ff5252; }
.tag.e .tc { display: none; }
.tag.far .tn { display: none; }
body:not(.touch) .touch-only { display: none !important; }
body:not(.has-relay) .relay-only { display: none !important; }
body:not(.online) .online-only, body:not(.is-host) .host-only { display: none !important; }
body.online #restart { display: none; }

.mw.lobby { display: flex; flex-direction: column; gap: 10px; max-height: 100%; overflow-y: auto; }
.lobby-view { display: none; flex-direction: column; gap: 10px; }
.lobby-view.on { display: flex; }
.code-label { font-size: 11px; letter-spacing: 0.24em; color: var(--ink-faint); text-align: center; margin-top: 6px; }
.code-big { font-family: var(--display); font-weight: 700; font-size: 64px; letter-spacing: 0.14em; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; user-select: all; }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-btn.small { font-size: 14px; padding: 9px 10px; text-align: center; letter-spacing: 0.12em; }
.lobby-block { display: flex; flex-direction: column; gap: 4px; }
.lobby-block .group { margin: 4px 0 2px; }
.plist { display: flex; flex-direction: column; gap: 4px; }
.plist .empty { font-size: 13px; color: var(--ink-faint); padding: 8px 12px; background: var(--panel); }
.prow { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; background: var(--panel); border-left: 3px solid var(--friendly); min-height: 42px; }
.prow.t1 { border-left-color: var(--enemy); }
.prow .pn { flex: 1; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pt { font-size: 11px; letter-spacing: 0.16em; color: var(--ink-faint); }
.prow .pp { font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.prow button { background: transparent; border: 1px solid var(--line); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; padding: 6px 10px; cursor: pointer; }
.prow button:hover { background: rgba(236, 233, 225, 0.1); }
.prow button.ok { background: var(--sel-bg); color: var(--sel-ink); border-color: transparent; }
.prow button.warn { color: var(--enemy); border-color: rgba(255, 77, 77, 0.4); }
.prow.req { border-left-color: var(--amber); }

.code-slots { display: flex; justify-content: center; gap: 8px; margin: 4px 0; }
.code-slots i { width: 46px; height: 60px; border: 1px solid var(--line); background: var(--panel); font-style: normal; font-family: var(--display); font-weight: 700; font-size: 40px; display: grid; place-items: center; color: var(--ink); }
.code-slots i.cur { border-color: var(--amber); }
.code-slots b { width: 10px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 24px; padding: 10px 0; cursor: pointer; }
.keypad button:hover { background: rgba(236, 233, 225, 0.1); }
.keypad button.go { background: var(--sel-bg); color: var(--sel-ink); font-weight: 700; letter-spacing: 0.16em; font-size: 20px; }
.keypad button:disabled { opacity: 0.35; cursor: default; }
.join-status { text-align: center; font-size: 14px; letter-spacing: 0.06em; color: var(--ink-dim); min-height: 20px; line-height: 1.5; }
.join-status.bad { color: var(--enemy); }
.join-status.good { color: var(--ink); }
.join-status .spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--ink-faint); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
#lobby-leave { text-align: center; }
.conn-note { font-size: 12px; letter-spacing: 0.06em; color: var(--ink-faint); text-align: center; min-height: 14px; }
.conn-note.hidden-ip { color: #7fd08a; }
#relay-status { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-dim); white-space: normal; }
#relay-status.ok { color: #7fd08a; }
#relay-status.bad { color: var(--enemy); }
.row:has(#relay-status) label { flex-wrap: wrap; }
.online-row .menu-btn.quick { grid-column: 1 / -1; background: rgba(232, 176, 74, 0.14); border-color: rgba(232, 176, 74, 0.5); display: flex; justify-content: space-between; align-items: baseline; }
.online-row .menu-btn.quick small { font-size: 11px; letter-spacing: 0.16em; color: var(--ink-dim); }
.notice { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0; padding: 10px 12px; background: var(--panel); border-left: 3px solid var(--amber); }
.notice.dim { color: var(--ink-dim); border-left-color: var(--line); }
.notice b { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) {
  .code-big { font-size: 48px; }
  .code-slots i { width: 38px; height: 50px; font-size: 32px; }
}
