:root {
  --bg: #111411; --panel: #1b201b; --panel2: #252b25; --line: #3a4338; --text: #e4e8df; --dim: #98a393;
  --accent: #d98e1f; --accent2: #f3b64f; --blue: #7fb2ff; --red: #ff8474; --ok: #a8d07a; --bad: #ff8b7b;
  --cond: Bahnschrift, "DIN Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
body { overflow: hidden; }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0 0 .6em; font-family: var(--cond); letter-spacing: .06em; }
h3 { font-size: 1.05rem; text-transform: uppercase; color: var(--accent2); letter-spacing: .14em; padding-left: 10px; border-left: 3px solid var(--accent); }
.mt { margin-top: 1.5em; }
.blue { color: var(--blue); } .red { color: var(--red); }

.screen { position: fixed; inset: 0; overflow: auto;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 14px),
    radial-gradient(1100px 620px at 50% -12%, #2c3528 0%, var(--bg) 62%); }
.logo { font-family: var(--cond); font-size: 2.3rem; font-weight: 800; letter-spacing: .1em; margin: 0; line-height: 1.05; }
.logo span { color: var(--accent); }
.logo.sm { font-size: 1.3rem; }
.authcard .logo { font-size: clamp(1.2rem, 6.2vw, 1.85rem); letter-spacing: .07em; white-space: nowrap; }
.tag { color: var(--dim); margin: .5em 0 1.4em; font-family: var(--cond); letter-spacing: .16em; font-size: .8rem; }
.panel { background: linear-gradient(180deg, #20261f, var(--panel)); border: 1px solid var(--line); clip-path: var(--cut); padding: 20px 22px; position: relative; }
.authcard { width: min(430px, 92vw); margin: 9vh auto 0; border-top: 3px solid var(--accent); }
.note { color: var(--dim); font-size: .88rem; margin: .5em 0; }
.msg { min-height: 1.3em; margin: .5em 0; color: var(--bad); font-size: .92rem; }
.msg.ok { color: var(--ok); }

label { display: block; margin: 0 0 12px; color: var(--dim); font-size: .85rem; }
input:not([type=range]), select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 2px; border: 1px solid var(--line); background: #0f120f; color: var(--text); font: inherit; }
input:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
button { font: inherit; font-family: var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; padding: 9px 16px; cursor: pointer; }
button:hover { border-color: #66735f; background: #2f372e; }
button.primary { background: var(--accent); border-color: var(--accent); color: #1a1205; font-weight: 700; }
button.primary:hover { background: var(--accent2); }
button.big { padding: 13px 24px; font-size: 1.05rem; }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button:disabled { opacity: .45; cursor: not-allowed; }
.authcard button.primary { width: 100%; margin-top: 4px; }

.tabs { display: flex; gap: 4px; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 16px; color: var(--dim); font-size: .9rem; letter-spacing: .14em; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs.small { margin-bottom: 16px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; }

#lobby header { display: flex; align-items: center; gap: 24px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: rgba(16,19,16,.94); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.who { margin-left: auto; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.who b { color: var(--accent2); font-size: 1.15rem; font-family: var(--cond); }
#lobUser { color: var(--text); margin-left: 12px; font-family: var(--cond); letter-spacing: .06em; }
.coin { color: var(--accent); }
.conn { background: #5a3a12; color: #ffd9a0; text-align: center; margin: 0; padding: 6px; }
.tab { padding: 22px 24px 40px; max-width: 1240px; margin: 0 auto; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
@media (min-width: 980px) { .cols.wide-left { grid-template-columns: 1.55fr 1fr; } }
.row { display: flex; align-items: center; } .row.gap { gap: 10px; margin-top: 16px; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.field { margin: 12px 0 4px; }
.field > span { display: block; color: var(--dim); font-family: var(--cond); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.field b { color: var(--accent2); font-size: 1rem; }
.field em { font-style: normal; color: #76816f; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 20px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 80px; }
.seg button.on { border-color: var(--accent); color: var(--accent2); background: #33291a; }
.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.mapcard { padding: 8px; text-align: left; text-transform: none; letter-spacing: 0; display: flex; flex-direction: column; gap: 6px; }
.mapcard canvas { width: 100%; height: 96px; background: #0e120f; border: 1px solid #2c342a; }
.mapcard b { font-family: var(--cond); letter-spacing: .12em; text-transform: uppercase; font-size: 1rem; }
.mapcard small { color: var(--dim); font-family: system-ui, sans-serif; }
.mapcard.on { border-color: var(--accent); background: #2c261a; }
.mapcard.on b { color: var(--accent2); }
.list { display: grid; gap: 6px; }
.list .item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--panel2); border-left: 3px solid var(--line); }
.list .item small { color: var(--dim); display: block; }
.list .empty { color: var(--dim); padding: 10px 0; }
.keys { line-height: 1.9; }
.teams { margin: 12px 0; } .teams .list { min-height: 60px; margin-bottom: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gun { background: linear-gradient(180deg, #20261f, var(--panel)); border: 1px solid var(--line); clip-path: var(--cut); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.gun.equipped { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.gun { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.gun:hover { transform: translateY(-3px); border-color: #7a8672; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.gun img, .gun .noimg { width: 100%; height: 132px; object-fit: contain; padding: 6px 10px;
  background: radial-gradient(ellipse at 50% 62%, #4a5446 0%, #262c25 55%, #171b16 100%); border: 1px solid rgba(255,255,255,.05); filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.gun .kind { color: var(--accent2); }
.gun h4 { margin: 4px 0 0; font-size: 1.05rem; }
.gun .kind { color: var(--dim); font-family: var(--cond); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.gun p { margin: 0; color: var(--dim); font-size: .85rem; min-height: 2.4em; }
.bars { display: grid; grid-template-columns: 64px 1fr; gap: 3px 8px; font-size: .74rem; color: var(--dim); align-items: center; }
.bars i { display: block; height: 5px; background: #0f120f; overflow: hidden; }
.bars i b { display: block; height: 100%; background: var(--accent); }
.gun .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { color: var(--accent2); font-weight: 700; font-family: var(--cond); font-size: 1.05rem; }
.owned { color: var(--ok); font-size: .85rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stats div { background: var(--panel2); border-left: 3px solid var(--accent); padding: 12px; }
.stats b { display: block; font-size: 1.6rem; color: var(--accent2); font-family: var(--cond); }
.stats span { color: var(--dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--cond); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--cond); }
td .pill { padding: 2px 8px; font-size: .78rem; }
.pill.pending { background: #5a3a12; color: #ffd9a0; } .pill.approved { background: #26421f; color: #b8e8a8; } .pill.disabled { background: #4a2320; color: #ffb3aa; }
td button { padding: 4px 10px; font-size: .8rem; margin-right: 4px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #2a3129; border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 18px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.5); }

/* ---------- match ---------- */
#game { position: fixed; inset: 0; background: #000; }
#cv { width: 100%; height: 100%; display: block; }
#hud { position: absolute; inset: 0; pointer-events: none; user-select: none; text-shadow: 0 1px 2px rgba(0,0,0,.9); font-variant-numeric: tabular-nums; font-family: var(--cond); letter-spacing: .04em; }
#hud .overlay { pointer-events: auto; text-shadow: none; font-family: system-ui, "Segoe UI", sans-serif; letter-spacing: 0; }
.hudpanel { background: linear-gradient(90deg, rgba(10,14,10,.62), rgba(10,14,10,.25)); padding: 8px 14px; border-left: 3px solid var(--accent); }
#crosshair { position: absolute; left: 50%; top: 50%; --gap: 6px; transition: opacity .1s; }
#crosshair i { position: absolute; background: #d8ffcf; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
#crosshair i:nth-child(1) { width: 2px; height: 9px; left: -1px; top: calc(-9px - var(--gap)); }
#crosshair i:nth-child(2) { width: 2px; height: 9px; left: -1px; top: var(--gap); }
#crosshair i:nth-child(3) { width: 9px; height: 2px; top: -1px; left: calc(-9px - var(--gap)); }
#crosshair i:nth-child(4) { width: 9px; height: 2px; top: -1px; left: var(--gap); }
#crosshair u { position: absolute; width: 2px; height: 2px; left: -1px; top: -1px; background: #d8ffcf; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
#hitmark { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; opacity: 0; transition: opacity .12s;
  background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
#hitmark.head { filter: drop-shadow(0 0 2px #ffd34d) sepia(1) saturate(6) hue-rotate(-10deg); }
#hitmark.kill { filter: drop-shadow(0 0 3px #f33) sepia(1) saturate(9) hue-rotate(-50deg); transform: scale(1.35); }
#vignette { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; background: radial-gradient(ellipse at center, transparent 45%, rgba(190,0,0,.75) 100%); }
#dmgdir { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; opacity: 0; transition: opacity .3s; transform: translate(-50%,-50%);
  background: conic-gradient(from -22deg, rgba(255,60,40,.9) 0deg, rgba(255,60,40,.9) 44deg, transparent 44deg);
  -webkit-mask: radial-gradient(circle, transparent 112px, #000 113px, #000 126px, transparent 127px); mask: radial-gradient(circle, transparent 112px, #000 113px, #000 126px, transparent 127px); }
/* the scope: thick posts that thin to fine lines near the middle, a red centre dot, a soft dark edge to the glass */
#scope { display: none; position: absolute; inset: 0; background:
  linear-gradient(#000, #000) 50% 100% / 7px 38vh no-repeat,
  linear-gradient(#000, #000) 0 50% / calc(50vw - 12vh) 7px no-repeat, linear-gradient(#000, #000) 100% 50% / calc(50vw - 12vh) 7px no-repeat,
  linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)) center / 2px 100vh no-repeat, linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)) center / 100vw 2px no-repeat,
  radial-gradient(circle at center, rgba(0,0,0,0) 0, rgba(0,0,0,0) 31vh, rgba(0,0,0,.45) 37vh, #000 40vh); }
#scope::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #ff2a1a; box-shadow: 0 0 4px rgba(255,40,20,.8); }
#scopeFade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
#radarbox { position: absolute; left: 16px; top: 14px; }
#radar { display: block; border: 1px solid rgba(190,205,185,.55); outline: 3px solid rgba(10,14,10,.5); max-width: 22vw; height: auto; }
#coinbox { position: relative; display: inline-block; margin-top: 8px; font-size: 1.15rem; background: rgba(10,14,10,.55); padding: 2px 12px; border-left: 3px solid var(--accent); }
#coinbox small { font-size: .7rem; color: #c9d0c2; letter-spacing: .14em; }
#coinpop { position: absolute; left: 100%; top: 0; margin-left: 8px; color: var(--accent2); font-weight: 800; opacity: 0; }
#coinpop.show { animation: pop 1s ease-out; }
@keyframes pop { 0% { opacity: 1; transform: translateY(6px); } 100% { opacity: 0; transform: translateY(-22px); } }
#topbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); text-align: center; }
#topbar .sc { display: inline-flex; align-items: stretch; background: rgba(10,14,10,.6); clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 100%, 0 100%); }
#topbar .side { min-width: 92px; padding: 3px 18px 4px; }
#topbar .side b { display: block; font-size: 1.7rem; line-height: 1.05; }
#topbar .side small { font-size: .68rem; letter-spacing: .12em; color: #d3d9cc; text-transform: uppercase; }
#topbar .side.blue { border-bottom: 3px solid var(--blue); } #topbar .side.red { border-bottom: 3px solid var(--red); }
#timer { font-size: 1.25rem; min-width: 74px; align-self: center; }
#subinfo { color: #d8ddd2; font-size: .74rem; margin-top: 4px; letter-spacing: .16em; }
#feed { position: absolute; top: 30px; right: 16px; text-align: right; font-size: .9rem; }
#feed div { background: rgba(10,14,10,.5); padding: 2px 9px; margin-bottom: 3px; display: inline-block; clear: both; float: right; border-right: 3px solid transparent; }
#feed div.mine { border-right-color: var(--accent); background: rgba(40,30,8,.6); }
#feed .self { font-weight: 800; }
#fps { position: absolute; top: 8px; right: 16px; font-size: .72rem; color: #c3cabc; letter-spacing: .1em; }
#center { position: absolute; top: 22%; left: 0; right: 0; text-align: center; opacity: 0; transition: opacity .35s; }
#streak { position: absolute; top: 36%; left: 0; right: 0; text-align: center; font-size: 1.5rem; font-weight: 700; letter-spacing: .28em; color: #ffd166; text-shadow: 0 2px 10px rgba(0,0,0,.8); opacity: 0; pointer-events: none; }
#streak.pop { animation: streakpop 1.6s ease-out; }
@keyframes streakpop { 0% { opacity: 0; transform: scale(1.5); } 12% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#reloadTip { position: absolute; top: 60%; left: 0; right: 0; text-align: center; font-size: .8rem; letter-spacing: .2em; color: #ffb4a2; text-shadow: 0 1px 6px rgba(0,0,0,.9); pointer-events: none; }
#center b { display: block; font-size: 3.2rem; letter-spacing: .2em; }
#center span { font-size: 1.05rem; color: #e3e7dc; letter-spacing: .14em; text-transform: uppercase; }
#dead { position: absolute; top: 60%; left: 0; right: 0; text-align: center; }
#dead b { display: block; font-size: 1.6rem; color: var(--red); letter-spacing: .1em; } #dead span { color: #ddd; letter-spacing: .1em; }
#hpbox { position: absolute; left: 18px; bottom: 18px; min-width: 210px; }
#hpbox .lbl, #ammobox #wname { font-size: .78rem; letter-spacing: .16em; color: #d8ddd2; text-transform: uppercase; }
#vest { color: var(--blue); margin-left: 8px; }
.big { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.big span { font-size: 1.05rem; font-weight: 400; color: #d8ddd2; }
.cross { display: inline-block; width: 22px; height: 22px; margin-right: 8px; vertical-align: -1px; background: linear-gradient(#d8ffcf, #d8ffcf) center / 100% 30% no-repeat, linear-gradient(#d8ffcf, #d8ffcf) center / 30% 100% no-repeat; }
#hpbar { height: 6px; background: rgba(0,0,0,.55); overflow: hidden; margin-top: 2px; }
#hpfill { display: block; height: 100%; width: 100%; background: #a8d07a; transition: width .15s; }
#ammobox { position: absolute; right: 18px; bottom: 18px; text-align: right; border-left: 0; border-right: 3px solid var(--accent); background: linear-gradient(270deg, rgba(10,14,10,.62), rgba(10,14,10,.25)); min-width: 210px; }
#slots { font-size: .8rem; color: #b6bdb0; margin-bottom: 6px; }
#slots .on { color: #fff; font-weight: 700; }
#nades { font-size: .78rem; color: #d8ddd2; letter-spacing: .1em; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(6,9,6,.62); }
#click { cursor: pointer; text-align: center; } #click b { display: block; font-family: var(--cond); font-size: 2.2rem; letter-spacing: .18em; } #click span { color: var(--dim); }
#pause .panel { width: min(380px, 90vw); display: grid; gap: 8px; max-height: calc(100vh - 24px); overflow-y: auto; }
#board { background: rgba(6,9,6,.5); }
#board .panel.wide { width: min(760px, 94vw); background: rgba(22,27,22,.95); max-height: 86vh; overflow: auto; }
#boardTitle { text-align: center; font-size: 1.9rem; letter-spacing: .2em; margin-bottom: .2em; }
#boardScore { text-align: center; font-size: 1.2rem; margin: 0 0 14px; font-family: var(--cond); letter-spacing: .1em; }
#board .col .row { justify-content: space-between; padding: 4px 10px; }
#board .col .row:nth-child(even) { background: rgba(255,255,255,.04); }
#board .col .row.self { outline: 1px solid var(--accent); }
#board .col .row.left { opacity: .6; font-style: italic; }
#boardNote { text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- controls tab ---------- */
.keys-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; margin: 10px 0 14px; }
.keys-table .krow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0 5px 10px; border-left: 3px solid var(--line); }
.keys-table .krow button { min-width: 128px; text-transform: none; letter-spacing: .02em; }
.keys-table .krow button.wait { border-color: var(--accent); color: var(--accent2); background: #33291a; }
.keys-table .krow button.unset { color: var(--bad); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
label.check input { width: auto; margin: 0; }
.tips { margin: 0; padding-left: 18px; color: var(--dim); font-size: .92rem; }
.tips li { margin-bottom: 9px; } .tips b { color: var(--text); }
.adminnote { color: var(--accent2); }

/* ---------- weapon HUD ---------- */
#slots .slot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 2px 0; opacity: .6; }
#slots .slot.on { opacity: 1; }
#slots .slot img { height: 24px; width: 54px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
#slots .slot.on img { height: 34px; width: 76px; }
#slots .slot:not(.on) span { display: none; }
#slots .slot:not(.on) img { height: 18px; width: 44px; }
#slots .slot { padding: 0; }
#slots kbd { font: inherit; font-size: .7rem; border: 1px solid rgba(255,255,255,.4); padding: 0 5px; min-width: 18px; text-align: center; }
#slots .slot.on span { color: #fff; font-weight: 700; }
#ammo.low { color: #ff7a66; }
#magbar { height: 5px; background: rgba(0,0,0,.55); margin: 2px 0 4px; overflow: hidden; }
#magfill { display: block; height: 100%; width: 100%; background: var(--accent2); margin-left: auto; }
#magbar.reloading #magfill { background: #9fb4c8; }
#reloadbar { position: absolute; left: 50%; top: calc(50% + 46px); width: 150px; margin-left: -75px; height: 5px; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .15s; }
#reloadbar i { display: block; height: 100%; width: 0; background: #d8ffcf; }
#reloadbar span { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-size: .7rem; letter-spacing: .2em; }
#zoomx { position: absolute; left: 50%; top: calc(50% + 74px); transform: translateX(-50%); font-size: .72rem; letter-spacing: .2em; color: #d8ffcf; }
#dmgnums { position: absolute; left: 50%; top: calc(50% - 70px); width: 0; }
#dmgnums span { position: absolute; white-space: nowrap; transform: translateX(-50%); font-size: 1.05rem; font-weight: 700; color: #fff; animation: dmg .8s ease-out forwards; }
#dmgnums span.head { color: #ffd34d; } #dmgnums span.kill { color: #ff6a55; font-size: 1.25rem; letter-spacing: .14em; }
@keyframes dmg { 0% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -38px; } }
#stance { font-size: .7rem; letter-spacing: .16em; color: #d8ddd2; margin-top: 5px; }
#hint { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); background: rgba(10,14,10,.6); padding: 5px 14px; font-size: .8rem; letter-spacing: .08em; transition: opacity .6s; max-width: min(900px, 86vw); text-align: center; line-height: 1.45; }

/* ---------- lobby background: a real concrete wall, darkened ---------- */
.screen { background:
    linear-gradient(180deg, rgba(14,17,14,.86), rgba(12,15,12,.95)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 2px, transparent 2px 14px),
    url(/textures/wall.jpg) center / 620px; }
/* ---------- locker ---------- */
.locker { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.locker { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.locker .gun img, .locker .gun .noimg { height: 300px; padding: 0; object-fit: cover; object-position: 50% 30%; background: radial-gradient(ellipse at 50% 78%, #55604d 0%, #232922 55%, #151914 100%); }
.tones { display: flex; gap: 8px; }
.tones button { width: 42px; height: 30px; padding: 0; border: 2px solid var(--line); }
.tones button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#fmode { font-size: .72rem; letter-spacing: .18em; color: #d8ddd2; }

/* ---------- mission setup ---------- */
.mission { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .mission { grid-template-columns: 1fr; } }
.mission-main { display: grid; gap: 14px; }
.mission-side { display: grid; gap: 14px; position: sticky; top: 70px; }
@media (max-width: 1000px) { .mission-side { position: static; } }
.step { background: linear-gradient(180deg, #1e241d, #191e18); border: 1px solid var(--line); padding: 16px 18px 18px; clip-path: var(--cut); }
.stephead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.stephead i { font-style: normal; font-family: var(--cond); font-weight: 800; width: 28px; height: 28px; display: grid; place-items: center; background: var(--accent); color: #1a1205; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.stephead h3 { margin: 0; border: 0; padding: 0; }
.stephead .note { margin: 0 0 0 auto; }
.modecards { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
@media (max-width: 640px) { .modecards { grid-template-columns: 1fr; } }
.modecard { position: relative; text-align: left; text-transform: none; letter-spacing: 0; padding: 16px 18px; background: linear-gradient(160deg, #262d24, #1b201a); min-height: 150px; }
.modecard b { display: block; font-family: var(--cond); font-size: 1.35rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.modecard p { margin: 0 0 8px; color: var(--dim); font-family: system-ui, sans-serif; font-size: .88rem; }
.modecard ul { margin: 0; padding-left: 18px; color: #b9c2b3; font-family: system-ui, sans-serif; font-size: .82rem; }
.modecard.on { border-color: var(--accent); background: linear-gradient(160deg, #3a2f18, #211c12); box-shadow: inset 0 0 0 1px rgba(243,182,79,.35), 0 8px 24px rgba(0,0,0,.35); }
.modecard.on b { color: var(--accent2); }
.badge { position: absolute; top: 12px; right: 12px; font-family: var(--cond); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; padding: 3px 8px; background: var(--accent); color: #1a1205; font-weight: 700; }
.diffcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .diffcards { grid-template-columns: repeat(2, 1fr); } }
.diffcard { text-align: left; text-transform: none; letter-spacing: 0; padding: 10px 12px; border-top: 3px solid #4a5446; }
.diffcard b { display: block; font-family: var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.diffcard small { color: var(--dim); font-family: system-ui, sans-serif; font-size: .78rem; }
.diffcard.d-easy { border-top-color: #6fae5a; } .diffcard.d-normal { border-top-color: #d9b44a; } .diffcard.d-hard { border-top-color: #e07a3a; } .diffcard.d-insane { border-top-color: #e04a4a; }
.diffcard.on { background: #2c261a; border-color: var(--accent); }
.forces { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .forces { grid-template-columns: 1fr; } }
.force { padding: 12px 14px; background: #151a15; border: 1px solid var(--line); border-left: 4px solid; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.force.blue { border-left-color: var(--blue); } .force.red { border-left-color: var(--red); }
.force span { font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.force span em, .force > em { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; font-family: system-ui, sans-serif; font-size: .78rem; margin-left: 6px; }
.force b { font-family: var(--cond); font-size: 1.6rem; color: var(--text); }
.force.blue b { color: var(--blue); } .force.red b { color: var(--red); }
.force input { grid-column: 1 / -1; }
.force.blue input { accent-color: var(--blue); } .force.red input { accent-color: var(--red); }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.mapcard canvas { height: 100px; }
.brief { border-top: 3px solid var(--accent); }
.brief h2 { font-size: 1.5rem; margin: 2px 0 10px; }
.eyebrow { font-family: var(--cond); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-size: .72rem; }
#bPlan { width: 100%; height: auto; aspect-ratio: 52 / 34; background: #0d110d; border: 1px solid var(--line); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; color: var(--dim); font-size: .78rem; }
.legend .lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg.blue { background: var(--blue); } .lg.red { background: var(--red); } .lg.nest { background: #ffd34d; } .lg.cover { background: #a8d07a; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.facts div { background: #151a15; padding: 7px 10px; border-left: 2px solid var(--accent); }
.facts dt { color: var(--dim); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--cond); }
.facts dd { margin: 0; font-family: var(--cond); font-size: 1.02rem; letter-spacing: .04em; }
button.wide { width: 100%; margin-top: 6px; }
.roomrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.roomrow input { margin: 0; }

/* ---------- workshop ---------- */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(5,7,5,.78); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; overflow: auto; }
.wsbox { width: min(1100px, 100%); border-top: 3px solid var(--accent); max-height: calc(100vh - 32px); overflow: auto; }
.wsbox h2 { font-size: 1.6rem; margin: 2px 0 0; }
.wsgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
@media (max-width: 820px) { .wsgrid { grid-template-columns: 1fr; } }
.wspic { background: radial-gradient(circle at 50% 45%, #2b3328, #0f130f 75%); border: 1px solid var(--line); aspect-ratio: 64 / 26; display: grid; place-items: center; margin-bottom: 12px; }
.wspic img { width: 100%; height: 100%; object-fit: contain; }
.cmpbars { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; font-size: .8rem; color: var(--dim); align-items: center; }
.cmpbars i { display: block; height: 7px; background: #0f120f; position: relative; overflow: hidden; }
.cmpbars i b { display: block; height: 100%; background: #9aa58f; }
.cmpbars i u { position: absolute; top: 0; bottom: 0; }
.cmpbars i u.up { background: var(--ok); } .cmpbars i u.down { background: var(--bad); }
.wsrow { margin-bottom: 14px; }
.wsrow h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent2); margin: 0 0 6px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.chip { text-align: left; text-transform: none; letter-spacing: 0; padding: 9px 11px; display: grid; gap: 2px; }
.chip b { font-family: var(--cond); letter-spacing: .06em; font-size: .95rem; }
.chip small { color: var(--dim); font-family: system-ui, sans-serif; font-size: .76rem; }
.chip .tagline { font-family: var(--cond); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); }
.chip.owned .tagline { color: var(--ok); }
.chip.on { border-color: var(--ok); background: #1f2c1c; box-shadow: inset 0 0 0 1px rgba(168,208,122,.35); }
.gun .fitted { color: var(--ok); font-size: .76rem; font-family: var(--cond); letter-spacing: .06em; margin-top: 4px; }
.gun .foot { gap: 6px; flex-wrap: wrap; }

/* ---------- sound ---------- */
.panel.sound { max-width: 760px; }
.soundgrid { display: grid; gap: 10px; margin: 12px 0; }
.srow { display: grid; grid-template-columns: 190px 1fr 48px auto; gap: 12px; align-items: center; }
.srow span { color: var(--dim); font-family: var(--cond); letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; }
.srow b { font-family: var(--cond); color: var(--accent2); text-align: right; }
.soundgrid.small .srow { grid-template-columns: 130px 1fr 42px; }
.soundgrid.small .srow button { display: none; }
@media (max-width: 560px) { .srow { grid-template-columns: 1fr 48px; } .srow input { grid-column: 1 / -1; grid-row: 2; } .srow button { display: none; } }

/* Grenade throw meter */
#nadeAim { position: absolute; left: 50%; top: calc(50% + 70px); width: 360px; margin-left: -180px; text-align: center; pointer-events: none; font: 600 11px/1.3 system-ui, sans-serif; letter-spacing: .12em; color: #f4ecd2; text-shadow: 0 1px 2px #000; }
#nadeAim .lbl { opacity: .8; margin-bottom: 4px; }
#nadeBar { position: relative; height: 12px; border-radius: 6px; background: rgba(10,12,10,.55); border: 1px solid rgba(255,241,184,.55); overflow: hidden; box-shadow: 0 0 10px rgba(0,0,0,.4); }
#nadeFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #8fd16a, #f2d24b 55%, #ff6a3c); }
#nadeBar s { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.45); }
#nadeInfo { margin-top: 5px; letter-spacing: .06em; font-weight: 500; }
#nadeAim.cook #nadeBar { border-color: #ff5a3c; box-shadow: 0 0 12px rgba(255,90,60,.6); }
#nadeAim.cook #nadeInfo { color: #ff8a6a; }

/* ---------- how to start ---------- */
/* The operator banner at the top of Deploy */
.hero { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 22px; align-items: stretch; margin-bottom: 18px; min-height: 230px;
  border: 1px solid var(--line); clip-path: var(--cut); overflow: hidden; position: relative;
  background: linear-gradient(100deg, rgba(217,142,31,.16) 0%, rgba(27,32,27,.2) 38%, rgba(16,19,16,.85) 100%), repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 12px), #1a1f1a; }
.hero::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.hero-pic { position: relative; background: radial-gradient(ellipse at 50% 80%, #5a6552 0%, #262c25 60%, transparent 100%); }
.hero-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.hero-text { padding: 22px 0; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hero-text h2 { font-size: 2.3rem; margin: 2px 0 4px; letter-spacing: .08em; text-transform: uppercase; }
.hero-text p { margin: 0; color: var(--dim); font-family: var(--cond); letter-spacing: .1em; }
.hero-kit { display: flex; gap: 10px; margin-top: 14px; }
.hero-kit img { height: 54px; width: 150px; object-fit: contain; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); padding: 4px 8px; }
.hero-kit img[src=""], .hero-pic img[src=""] { visibility: hidden; }
.hero-go { padding: 22px 26px 22px 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 8px; text-align: right; }
.hero-go b { font-family: var(--cond); font-size: 1.15rem; letter-spacing: .08em; max-width: 280px; }
.eyebrow { color: var(--accent2); font-family: var(--cond); letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 120px minmax(0, 1fr); } .hero-go { grid-column: 1 / -1; align-items: stretch; text-align: left; padding: 0 18px 18px; } }
/* Loading screen */
#loading { display: grid; place-items: center; z-index: 30; background: radial-gradient(900px 520px at 50% 40%, #2f392b 0%, #0d100d 70%); }
.load-box { width: min(560px, 88vw); text-align: center; }
.load-box h2 { font-size: 2.6rem; letter-spacing: .14em; text-transform: uppercase; margin: 6px 0 2px; }
.load-box .logo { font-size: 1.2rem; margin-bottom: 34px; opacity: .8; }
.load-bar { height: 4px; background: rgba(255,255,255,.1); margin: 26px 0 16px; overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 38%; background: var(--accent); animation: loadrun 1.2s ease-in-out infinite; }
@keyframes loadrun { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }
/* Cards, tabs and buttons: a little more life */
.tabs button { transition: color .15s ease, border-color .15s ease; }
.tabs button:hover { color: var(--text); background: transparent; }
button { transition: background .12s ease, border-color .12s ease, transform .08s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { box-shadow: 0 6px 18px rgba(217,142,31,.25); }
.panel { box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.howto { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; margin-bottom: 16px; padding: 12px 16px;
  background: linear-gradient(90deg, #2c2414, #1b201b); border: 1px solid #5a4520; border-left: 4px solid var(--accent); }
.howto-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.howto-steps b { color: var(--accent2); text-transform: uppercase; letter-spacing: .14em; font-family: var(--cond); }
.howto-steps span { display: inline-flex; align-items: center; gap: 8px; }
.howto-steps i { font-style: normal; font-weight: 800; width: 22px; height: 22px; display: grid; place-items: center; background: var(--accent); color: #1a1205; border-radius: 50%; font-size: .85rem; }
.howto-steps em { font-style: normal; color: var(--accent2); font-weight: 700; }
.howto-keys { display: flex; flex-wrap: wrap; grid-column: 1; color: var(--dim); font-size: .9rem; }
.howto #howClose { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.howto-keys #howKeys span, .clickkeys span { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; margin: 2px 14px 2px 0; }
kbd { white-space: nowrap; display: inline-block; min-width: 1.6em; padding: 1px 7px; border: 1px solid #5d6858; border-bottom-width: 3px; border-radius: 4px; background: #262d25; color: var(--text); font: 600 .8rem/1.4 system-ui, sans-serif; text-align: center; }
@media (max-width: 700px) { .howto { grid-template-columns: 1fr; } .howto #howClose { grid-column: 1; grid-row: auto; justify-self: start; } }
.startbar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px 16px;
  background: rgba(24,20,10,.96); border: 1px solid var(--accent); border-top: 3px solid var(--accent); box-shadow: 0 -8px 28px rgba(0,0,0,.55); }
.startbar .sb-text { flex: 1; min-width: 0; display: grid; }
.startbar .sb-text small { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; }
.startbar .sb-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.startbar #sbSolo { font-size: 1.2rem; padding: 14px 34px; letter-spacing: .1em; animation: sbPulse 2.4s ease-in-out infinite; }
@keyframes sbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,142,31,.0); } 50% { box-shadow: 0 0 0 6px rgba(217,142,31,.25); } }
@media (max-width: 640px) { .startbar { flex-wrap: wrap; } .startbar .sb-text { flex-basis: 100%; } .startbar button { flex: 1; } }
#click .clickkeys { display: flex; flex-wrap: wrap; justify-content: center; margin: 18px auto 0; max-width: 640px; color: var(--dim); font-size: .92rem; }
#click b { animation: sbBlink 1.6s ease-in-out infinite; } @keyframes sbBlink { 50% { opacity: .55; } }
#howKeys { display: contents; }


/* ===================== Console-style menus ===================== */
#nav { display: none; }
#lobby::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 560px at 82% 18%, rgba(217,142,31,.14), transparent 62%), radial-gradient(760px 520px at 8% 92%, rgba(61,125,255,.11), transparent 62%);
  animation: lobbyDrift 16s ease-in-out infinite alternate; }
@keyframes lobbyDrift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.08); } }
#lobby > * { position: relative; z-index: 1; }
#lobby header { z-index: 3; }
.crumb { display: flex; align-items: center; gap: 18px; padding: 12px 24px 0; max-width: 1400px; margin: 0 auto; }
.crumb b { font-family: var(--cond); font-size: 1.5rem; letter-spacing: .14em; text-transform: uppercase; }
.crumb button { padding: 8px 16px; }
.padhint { color: var(--dim); font-size: .8rem; letter-spacing: .08em; margin-left: auto; }
.padhint .gp { display: none; } .padhint.pad .gp { display: inline; } .padhint.pad .kb { display: none; }
.padfocus { outline: 3px solid var(--accent2) !important; outline-offset: 3px; }
#howto { display: none !important; }

/* main menu */
.tab.home { display: grid; grid-template-columns: minmax(300px, 460px) minmax(0, 1fr); gap: 40px; align-items: center; max-width: 1400px; min-height: calc(100vh - 64px); padding-top: 10px; }
.homemenu { display: grid; gap: 4px; margin-top: 10px; }
.homeitem { text-align: left; background: transparent; border: 0; border-left: 5px solid transparent; border-radius: 0; padding: 9px 18px; text-transform: none; letter-spacing: 0; display: grid;
  transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.homeitem b { font-family: var(--cond); font-size: 2.2rem; line-height: 1.1; letter-spacing: .1em; text-transform: uppercase; color: #9ba595; transition: color .16s ease, font-size .16s ease; }
.homeitem small { color: #cfd6c9; font-size: .9rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .18s ease, opacity .18s ease; }
.homeitem:hover, .homeitem:focus, .homeitem:focus-visible { background: linear-gradient(90deg, rgba(217,142,31,.26), rgba(217,142,31,0) 85%); border-left-color: var(--accent); transform: translateX(10px); outline: none; }
.homeitem:hover b, .homeitem:focus b { color: #fff; font-size: 2.7rem; }
.homeitem:hover small, .homeitem:focus small { max-height: 2.6em; opacity: 1; }
.homeitem.quiet { margin-top: 18px; } .homeitem.quiet b { font-size: 1.05rem; color: var(--dim); } .homeitem.quiet:hover b, .homeitem.quiet:focus b { font-size: 1.2rem; }
.home-hint { margin: 22px 0 0 22px; }
.home .hero { grid-template-columns: minmax(220px, 44%) minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: min(72vh, 640px); margin: 0; }
.home .hero-pic { grid-row: 1 / 3; }
.home .hero-pic img { object-fit: contain; object-position: 50% 100%; }
.home .hero-text { padding: 30px 26px 0 0; justify-content: flex-start; }
.home .hero-text h2 { font-size: 3rem; }
.home .hero-go { align-items: flex-start; text-align: left; padding: 0 26px 30px 0; }
.home .hero-go button { font-size: 1.2rem; padding: 15px 34px; }
@media (max-width: 900px) { .tab.home { grid-template-columns: 1fr; } .home .hero { min-height: 420px; } }

/* play: three steps */
.wiz { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 10px; }
.wiz li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 3px solid var(--line); color: var(--dim); font-family: var(--cond); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.wiz li i { font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; background: var(--panel2); color: var(--text); font-weight: 700; }
.wiz li.on { color: #fff; border-bottom-color: var(--accent); } .wiz li.on i { background: var(--accent); color: #1a1205; }
.wiz li.done { color: var(--accent2); border-bottom-color: #6b5a2e; }
#tab-play[data-step="1"] .mission-main > .step:not(:nth-of-type(1)), #tab-play[data-step="1"] .brief, #tab-play[data-step="1"] .startbar,
#tab-play[data-step="2"] .mission-main > .step:not(:nth-of-type(2)), #tab-play[data-step="2"] .mission-side, #tab-play[data-step="2"] .startbar,
#tab-play[data-step="3"] .mission-main > .step:nth-of-type(1), #tab-play[data-step="3"] .mission-main > .step:nth-of-type(2), #tab-play[data-step="3"] .mission-side > .panel:not(.brief) { display: none; }
#tab-play[data-step="2"] .mission { grid-template-columns: 1fr; }
#tab-play[data-step="2"] .step { background: transparent; border: 0; clip-path: none; padding: 0; }
#tab-play[data-step="2"] .stephead { display: none; }
#tab-play[data-step="1"] .modecards { grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { #tab-play[data-step="1"] .modecards { grid-template-columns: 1fr; } }
#tab-play[data-step="1"] .modecard { min-height: 300px; padding: 26px 26px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
#tab-play[data-step="1"] .modecard b { font-size: 2.2rem; }
#tab-play[data-step="1"] .modecard p { font-size: 1.02rem; } #tab-play[data-step="1"] .modecard ul { font-size: .95rem; line-height: 1.7; }
#tab-play[data-step="1"] .modecard:hover, #tab-play[data-step="1"] .modecard:focus { transform: translateY(-6px) scale(1.01); border-color: var(--accent); box-shadow: 0 22px 50px rgba(0,0,0,.5); outline: none; }

/* area carousel */
.carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.carousel .maps { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px calc(50% - 270px) 22px; scrollbar-width: none; grid-template-columns: none; }
.carousel .maps::-webkit-scrollbar { display: none; }
.carousel .mapcard { position: relative; flex: 0 0 540px; max-width: 78vw; scroll-snap-align: center; padding: 0 0 14px; gap: 0; overflow: hidden; opacity: .4; transform: scale(.84); transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease; background: #171b16; }
.carousel .mapcard.on { opacity: 1; transform: scale(1); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 26px 70px rgba(0,0,0,.65); background: #1d221c; }
.carousel .mapcard:focus { outline: none; }
.carousel .mapcard canvas, .carousel .mapcard .mapshot { width: 100%; height: 250px; object-fit: cover; display: block; border: 0; }
.carousel .mapcard .mapshot:not([hidden]) + canvas { position: absolute; right: 10px; top: 10px; width: 132px; height: 78px; border: 1px solid rgba(255,255,255,.3); box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.carousel .mapcard b { font-size: 1.5rem; padding: 14px 18px 0; } .carousel .mapcard small { padding: 0 18px; }
.car-arrow { font-size: 1.5rem; padding: 26px 16px; background: rgba(27,32,27,.8); }
.car-arrow:hover { background: var(--accent); color: #1a1205; border-color: var(--accent); }
.car-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 60px; }
.car-foot h2 { font-size: 2.2rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }
.car-foot .note { max-width: 720px; font-size: 1rem; }
.car-foot button { white-space: nowrap; font-size: 1.15rem; padding: 15px 30px; }
@media (max-width: 760px) { .car-foot { flex-direction: column; align-items: stretch; padding: 0 8px; } }

/* controller guide */
.padmap { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 10px 0; font-size: .9rem; color: #c9d0c3; }
.padmap b { display: inline-block; min-width: 92px; color: var(--accent2); font-family: var(--cond); letter-spacing: .08em; }


/* ===================== Play: four steps and a livelier match setup ===================== */
#tab-play[data-step="3"] .mission-side, #tab-play[data-step="3"] .startbar,
#tab-play[data-step="4"] .mission-main, #tab-play[data-step="4"] .mission-side > .panel:not(.brief) { display: none; }
#tab-play[data-step="3"] .mission, #tab-play[data-step="4"] .mission { grid-template-columns: 1fr; }
#tab-play[data-step="4"] .mission-side { position: static; max-width: 760px; margin: 0 auto; width: 100%; }
#tab-play[data-step="4"] .brief { border-top: 4px solid var(--accent); }
#tab-play[data-step="4"] .brief h2 { font-size: 2.2rem; letter-spacing: .1em; text-transform: uppercase; }
#tab-play[data-step="4"] #goSolo { font-size: 1.5rem; padding: 20px; animation: sbPulse 2.4s ease-in-out infinite; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 6px 0 18px; padding: 16px; background: linear-gradient(90deg, rgba(61,125,255,.16), rgba(0,0,0,.15) 50%, rgba(226,69,47,.16)); border: 1px solid var(--line); }
.vs-side b { display: block; font-family: var(--cond); letter-spacing: .16em; text-transform: uppercase; font-size: 1.05rem; }
.vs-side.blue b { color: var(--blue); } .vs-side.red { text-align: right; } .vs-side.red b { color: var(--red); }
.vs-side small { color: var(--dim); }
.vs-mid { font-family: var(--cond); font-size: 2.6rem; font-weight: 800; letter-spacing: .08em; color: var(--accent2); text-shadow: 0 0 22px rgba(243,182,79,.5); animation: vsBeat 1.8s ease-in-out infinite; }
@keyframes vsBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.pips { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; min-height: 26px; }
.vs-side.red .pips { justify-content: flex-end; }
.pips i { width: 11px; height: 24px; border-radius: 6px 6px 2px 2px; background: currentColor; opacity: .9; animation: pipIn .25s ease-out both; position: relative; }
.pips i::before { content: ""; position: absolute; left: 1.5px; top: -7px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vs-side.blue .pips { color: var(--blue); padding-top: 8px; } .vs-side.red .pips { color: var(--red); padding-top: 8px; }
.pips i.you { color: #fff; box-shadow: 0 0 10px rgba(255,255,255,.7); }
@keyframes pipIn { from { transform: translateY(8px) scale(.6); opacity: 0; } to { transform: none; opacity: .9; } }
#tab-play[data-step="3"] .diffcards { gap: 12px; }
#tab-play[data-step="3"] .diffcard { padding: 16px 14px 14px; min-height: 104px; position: relative; transition: transform .15s ease, box-shadow .15s ease; }
#tab-play[data-step="3"] .diffcard:hover, #tab-play[data-step="3"] .diffcard:focus { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.45); outline: none; }
.diffcard::before { display: block; font-size: 1.15rem; letter-spacing: .2em; margin-bottom: 4px; }
.diffcard.d-easy::before { content: "\2605"; color: #8fd18a; } .diffcard.d-normal::before { content: "\2605\2605"; color: var(--accent2); }
.diffcard.d-hard::before { content: "\2605\2605\2605"; color: #ff9d6b; } .diffcard.d-insane::before { content: "\2620"; color: #ff6b5e; font-size: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips button { padding: 7px 16px; border-radius: 999px; background: transparent; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #1a1205; font-weight: 700; }
.chips.big { margin: 0 0 16px; } .chips.big button { padding: 10px 22px; font-size: 1rem; }
.setup-go { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.setup-go p { margin: 0; font-family: var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--accent2); font-size: 1.05rem; }
.setup-go button { font-size: 1.15rem; padding: 15px 34px; }

/* ===================== Armory and Locker: a shelf and a spotlight ===================== */
.shelf { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 10px 22px; align-items: start; }
.shelf .gun, .wardrobe .gun { cursor: pointer; clip-path: none; position: relative; }
.shelf .gun:not(.sel) { grid-column: 1; display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; padding: 8px 10px; align-items: center; }
.shelf .gun:not(.sel) > :nth-child(n+4) { display: none; }
.shelf .gun:not(.sel) > img, .shelf .gun:not(.sel) > .noimg { grid-row: 1 / 3; height: 58px; padding: 3px; filter: none; }
.shelf .gun:not(.sel) > .kind { align-self: end; } .shelf .gun:not(.sel) > h4 { align-self: start; margin: 0; font-size: 1rem; }
.shelf .gun:not(.sel)::after, .wardrobe .gun:not(.sel)::after { content: attr(data-state); position: absolute; right: 8px; top: 6px; font-family: var(--cond); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); }
.shelf .gun.equipped:not(.sel)::after, .wardrobe .gun.equipped:not(.sel)::after { color: var(--ok); }
.shelf .gun:not(.sel):hover, .shelf .gun:not(.sel):focus { transform: translateX(6px); border-color: var(--accent); outline: none; }
.shelf .gun.sel { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: 76px; padding: 26px 30px 24px; gap: 10px; border-color: var(--accent); border-top: 4px solid var(--accent); cursor: default; transform: none; background: linear-gradient(170deg, #262d24, #171b16); animation: spotIn .22s ease-out; }
@keyframes spotIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.shelf .gun.sel > img, .shelf .gun.sel > .noimg { height: min(34vh, 300px); padding: 14px 24px; }
.shelf .gun.sel h4 { font-size: 2.4rem; letter-spacing: .08em; text-transform: uppercase; }
.shelf .gun.sel p { font-size: 1.05rem; min-height: 0; }
.shelf .gun.sel .bars { max-width: 560px; margin: 8px 0; font-size: .95rem; }
.shelf .gun.sel .foot { margin-top: 14px; justify-content: flex-start; gap: 12px; }
.shelf .gun.sel .foot button { padding: 13px 26px; font-size: 1.05rem; }
.shelf .gun.sel .price { font-size: 1.5rem; }
.gearpic { display: grid; place-items: center; font-family: var(--cond); font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; color: var(--accent2); }
.shelf .gun.sel > .gearpic { font-size: 5rem; }
#armory[data-filter="primary"] .gun:not([data-slot="primary"]), #armory[data-filter="sidearm"] .gun:not([data-slot="sidearm"]),
#armory[data-filter="melee"] .gun:not([data-slot="melee"]), #armory[data-filter="gear"] .gun:not([data-slot="gear"]) { display: none; }
@media (max-width: 860px) { .shelf { grid-template-columns: 1fr; } .shelf .gun.sel { grid-column: 1; grid-row: auto; position: static; order: -1; } }

.wardrobe { display: grid; grid-template-columns: minmax(300px, 440px) repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.wardrobe .gun:not(.sel) { padding: 8px; gap: 4px; }
.wardrobe .gun:not(.sel) > :nth-child(n+3) { display: none; }
.wardrobe .gun:not(.sel) > img, .wardrobe .gun:not(.sel) > .noimg { height: 210px; padding: 0; object-fit: cover; object-position: 50% 26%; background: radial-gradient(ellipse at 50% 78%, #55604d 0%, #232922 55%, #151914 100%); }
.wardrobe .gun:not(.sel) > h4 { font-size: .95rem; margin: 2px 0 0; }
.wardrobe .gun:not(.sel):hover, .wardrobe .gun:not(.sel):focus { transform: translateY(-5px); border-color: var(--accent); outline: none; }
.wardrobe .gun.sel { grid-column: 1; grid-row: 1 / span 12; position: sticky; top: 76px; padding: 0 0 22px; border-color: var(--accent); border-top: 4px solid var(--accent); cursor: default; transform: none; animation: spotIn .22s ease-out; }
.wardrobe .gun.sel > img, .wardrobe .gun.sel > .noimg { height: min(62vh, 600px); padding: 0; object-fit: contain; object-position: 50% 100%; background: radial-gradient(ellipse at 50% 82%, #5d6955 0%, #262c25 55%, #131712 100%); border: 0; }
.wardrobe .gun.sel > :not(img):not(.noimg) { margin-left: 22px; margin-right: 22px; }
.wardrobe .gun.sel h4 { font-size: 2.2rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 14px; }
.wardrobe .gun.sel p { font-size: 1.02rem; min-height: 0; }
.wardrobe .gun.sel .foot { margin-top: 12px; justify-content: flex-start; gap: 12px; }
.wardrobe .gun.sel .foot button { padding: 13px 30px; font-size: 1.05rem; }
@media (max-width: 860px) { .wardrobe { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .wardrobe .gun.sel { grid-column: 1 / -1; grid-row: auto; position: static; } }

/* ===================== Settings: a side menu and one section at a time ===================== */
#tab-controls { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 26px; align-items: start; }
#tab-controls.hidden { display: none; }
.submenu { display: grid; gap: 6px; position: sticky; top: 76px; }
.submenu button { text-align: left; display: grid; padding: 12px 16px; background: transparent; border: 0; border-left: 4px solid transparent; border-radius: 0; text-transform: none; letter-spacing: 0; transition: transform .15s ease, background .15s ease; }
.submenu button b { font-family: var(--cond); font-size: 1.35rem; letter-spacing: .1em; text-transform: uppercase; color: #9ba595; }
.submenu button small { color: var(--dim); }
.submenu button:hover, .submenu button:focus, .submenu button.on { background: linear-gradient(90deg, rgba(217,142,31,.24), transparent 90%); border-left-color: var(--accent); transform: translateX(6px); outline: none; }
.submenu button.on b, .submenu button:hover b { color: #fff; }
#tab-controls .cols.wide-left { display: block; }
.setsec { display: none; animation: spotIn .2s ease-out; }
#tab-controls[data-set="keys"] .setsec[data-set="keys"], #tab-controls[data-set="pad"] .setsec[data-set="pad"],
#tab-controls[data-set="game"] .setsec[data-set="game"], #tab-controls[data-set="guide"] .setsec[data-set="guide"] { display: block; }
#tab-controls[data-set="guide"] .cols > .panel:first-child, #tab-controls[data-set="pad"] .setsave { display: none; }
#tab-controls .setsec h3 { font-size: 1.5rem; margin-top: 0; }
#tab-controls .padmap { font-size: 1rem; gap: 10px 26px; }
#tab-controls .sliders label { font-size: 1rem; }
@media (max-width: 860px) { #tab-controls { grid-template-columns: 1fr; } .submenu { position: static; grid-template-columns: 1fr 1fr; } }

/* the Go step: the plan on the left, the facts and the start button on the right */
#tab-play[data-step="4"] .startbar { display: none; }
#tab-play[data-step="4"] .mission-side { max-width: 1120px; }
#tab-play[data-step="4"] .brief { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
#tab-play[data-step="4"] .brief > * { grid-column: 2; }
#tab-play[data-step="4"] .brief > .eyebrow, #tab-play[data-step="4"] .brief > h2 { grid-column: 1 / -1; }
#tab-play[data-step="4"] .brief > canvas { grid-column: 1; grid-row: 3 / span 7; width: 100%; height: auto; max-height: 52vh; object-fit: contain; }
#tab-play[data-step="4"] .brief > .legend { grid-column: 1; grid-row: 10; }
@media (max-width: 860px) { #tab-play[data-step="4"] .brief { display: block; } }


/* ===================== Points feed in the match ===================== */
#ptsfeed { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; z-index: 6; }
#ptsfeed div { font-family: var(--cond); letter-spacing: .14em; font-size: .95rem; color: #f2f4ee; text-shadow: 0 2px 6px rgba(0,0,0,.9); animation: ptsIn 2.6s ease-out both; white-space: nowrap; }
#ptsfeed div b { color: var(--accent2); margin-right: 4px; }
#ptsfeed div.big { font-size: 1.35rem; color: #ffd166; }
@keyframes ptsIn { 0% { opacity: 0; transform: translateY(10px) scale(1.25); } 10% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* ===================== Guest sign-in ===================== */
.guestbox { display: grid; gap: 8px; margin-top: 16px; text-align: center; }
.guestbox .or { color: var(--dim); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.guestbox button { width: 100%; font-size: 1.05rem; padding: 13px; border-color: var(--accent); }
.guestbox button:hover { background: rgba(217,142,31,.18); }
.note.fine { text-align: center; margin-top: 14px; font-size: .78rem; } .note.fine a, .docpage a { color: var(--accent2); }

/* ===================== Service record ===================== */
.record-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 26px 30px; margin-bottom: 18px; border: 1px solid var(--line); border-left: 5px solid var(--accent);
  background: linear-gradient(100deg, rgba(217,142,31,.18), rgba(27,32,27,.4) 45%, rgba(16,19,16,.9)), repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 12px), #1a1f1a; }
.rank-badge { width: 116px; height: 116px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 22%, 100% 70%, 50% 100%, 0 70%, 0 22%); background: linear-gradient(160deg, #f3b64f, #8a5a14); box-shadow: 0 0 40px rgba(243,182,79,.35); }
.rank-badge b { color: #2a1a04; font-size: 1.4rem; letter-spacing: .05em; text-align: center; line-height: 1.1; max-width: 90px; word-break: break-all; }
.rank-text h2 { font-size: 2.6rem; letter-spacing: .08em; text-transform: uppercase; margin: 2px 0; }
.rank-text p { margin: 0 0 10px; font-family: var(--cond); font-size: 1.3rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent2); }
.rank-bar { height: 8px; background: rgba(255,255,255,.1); max-width: 460px; overflow: hidden; } .rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .6s ease; }
.rank-points { text-align: right; } .rank-points b { display: block; font-family: var(--cond); font-size: 3rem; color: var(--accent2); line-height: 1; } .rank-points small { color: var(--dim); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; }
#tab-account .stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
#tab-account .stats div { padding: 16px; background: linear-gradient(160deg, #2a3128, #1c211b); }
#tab-account .stats b { font-size: 2.1rem; }
.ptstable { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; font-size: .95rem; }
.ptstable span { color: #cfd6c9; border-bottom: 1px dotted rgba(255,255,255,.08); padding-bottom: 4px; } .ptstable b { color: var(--accent2); font-family: var(--cond); font-size: 1.1rem; text-align: right; }
.claim { border-left: 4px solid var(--accent); margin-bottom: 18px; } .claim form { align-items: flex-end; } .claim label { flex: 1; min-width: 200px; margin: 0; }
@media (max-width: 760px) { .record-hero { grid-template-columns: 1fr; text-align: center; } .rank-badge { margin: 0 auto; } .rank-bar { margin: 0 auto; } .rank-points { text-align: center; } }

/* ===================== Sound ===================== */
.sound-hero { display: flex; align-items: center; gap: 20px; padding: 22px 28px; margin-bottom: 18px; border: 1px solid var(--line); border-left: 5px solid var(--accent); background: linear-gradient(100deg, rgba(61,125,255,.16), rgba(16,19,16,.9) 60%); }
.sound-hero > b { font-size: 3.4rem; color: var(--accent2); line-height: 1; text-shadow: 0 0 24px rgba(243,182,79,.4); }
.sound-hero h2 { font-size: 2.4rem; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
#tab-sound .soundgrid { gap: 14px; }
#tab-sound .soundgrid > * { background: linear-gradient(160deg, #262d24, #1a1f19); border: 1px solid var(--line); padding: 16px 18px; }
#tab-sound .soundgrid input[type=range] { height: 28px; }
#tab-sound .soundgrid input[type=range]::-webkit-slider-thumb { width: 22px; height: 22px; }
#tab-sound .soundgrid label, #tab-sound .soundgrid span { font-family: var(--cond); letter-spacing: .12em; text-transform: uppercase; font-size: 1rem; }

/* ===================== Plain pages (privacy) ===================== */
body.doc { overflow: auto; background: var(--bg); }
.docpage { max-width: 760px; margin: 0 auto; padding: 40px 22px 60px; line-height: 1.6; }
.docpage h2 { font-size: 2rem; margin-top: 22px; } .docpage h3 { margin-top: 26px; } .docpage li { margin: 6px 0; }


/* ---------- multiplayer ---------- */
.modecard.m-mp { background: linear-gradient(160deg, #1d2a33, #151c21); }
.modecard.m-mp .badge { background: #3fa7ff; color: #06121c; }
.modecard.m-mp.on { border-color: #5db4ff; background: linear-gradient(160deg, #1f3444, #141c22); box-shadow: inset 0 0 0 1px rgba(93,180,255,.4), 0 8px 24px rgba(0,0,0,.35); }
.modecard.m-mp.on b { color: #9fd2ff; }
.mapcard .live { font-style: normal; font-size: .8rem; color: #9fd2ff; font-family: system-ui, sans-serif; padding: 0 14px; }
.mapcard .live.busy::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6fe07a; margin-right: 6px; box-shadow: 0 0 6px #6fe07a; }
#mp { display: none; }
#tab-play[data-kind="mp"][data-step="3"] #mp { display: grid; gap: 16px; }
#tab-play[data-kind="mp"][data-step="3"] #setup, #tab-play[data-kind="mp"] .startbar, #tab-play[data-kind="mp"] .wiz li[data-s="4"] { display: none; }
.mp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-top: 4px solid #5db4ff;
  background: linear-gradient(120deg, rgba(31,52,68,.95), rgba(20,26,22,.95)); clip-path: var(--cut); }
.mp-head h2 { margin: 2px 0 4px; font-size: 2.4rem; letter-spacing: .1em; text-transform: uppercase; }
.mp-head p { margin: 0; }
#mpQuick { font-size: 1.3rem; padding: 16px 34px; animation: sbPulse 2.4s ease-in-out infinite; }
.mprooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mproom { display: grid; gap: 10px; padding: 16px 18px; background: linear-gradient(180deg, #1e241d, #191e18); border: 1px solid var(--line); clip-path: var(--cut); }
.mproom.mine { border-color: #5db4ff; }
.mproom.full { opacity: .7; }
.mpr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mpr-top b { font-family: var(--cond); font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; }
.mpr-state { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.mpr-state.on { color: #6fe07a; }
.mproom small { color: var(--dim); font-family: system-ui, sans-serif; }
.mpr-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mpr-n { font-family: var(--cond); font-size: 1.5rem; letter-spacing: .06em; }
.mpbar { position: relative; height: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.mpbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #3fa7ff, #9fd2ff); }
.mpbar s { position: absolute; top: 0; bottom: 0; left: calc(22 / 24 * 100%); width: 2px; background: var(--accent); }
.mp-rules { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--dim); font-size: .86rem; font-family: system-ui, sans-serif; }
.mp-rules b { color: var(--text); }
.mpfriends { color: #9fd2ff; font-family: system-ui, sans-serif; font-size: .9rem; }
@media (max-width: 640px) { .mp-head { flex-direction: column; align-items: stretch; } .mp-head h2 { font-size: 1.8rem; } }

/* in-game menu: change room, invite friends */
.pausemp { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pausemp .list { max-height: 180px; overflow: auto; }
.pausemp .item, .frcols .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pausemp .item small, .frcols .item small { display: block; color: var(--dim); font-family: system-ui, sans-serif; }

/* invite card */
.invitecard { position: fixed; right: 18px; top: 18px; z-index: 90; display: grid; gap: 6px; width: min(340px, calc(100vw - 32px)); padding: 16px 18px;
  background: linear-gradient(160deg, #1f3444, #141c22); border: 1px solid #5db4ff; box-shadow: 0 18px 44px rgba(0,0,0,.55); clip-path: var(--cut); animation: invIn .25s ease-out; }
.invitecard b { font-size: 1.05rem; }
.invitecard span { color: var(--dim); font-family: system-ui, sans-serif; font-size: .86rem; }
@keyframes invIn { from { transform: translateY(-14px); opacity: 0; } }

/* friends page */
.homeitem { position: relative; }
.homeitem .newsn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center;
  border-radius: 12px; background: #3fa7ff; color: #06121c; font-weight: 700; font-family: system-ui, sans-serif; }
.friends-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 14px; border: 1px solid var(--line);
  border-top: 4px solid #5db4ff; background: linear-gradient(120deg, rgba(31,52,68,.9), rgba(20,26,22,.9)); clip-path: var(--cut); }
.friends-hero h2 { margin: 2px 0 6px; font-size: 2.4rem; letter-spacing: .1em; text-transform: uppercase; }
.friends-hero p { margin: 0; max-width: 560px; }
.fradd { display: flex; gap: 10px; }
.fradd input { min-width: 220px; }
.frcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 800px) { .frcols { grid-template-columns: 1fr; } .fradd { width: 100%; } .fradd input { flex: 1; min-width: 0; } }
.frcols .sub { margin: 14px 0 6px; color: var(--dim); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.count { display: inline-grid; place-items: center; min-width: 22px; padding: 0 6px; margin-left: 6px; border-radius: 11px; background: #3fa7ff; color: #06121c; font-size: .8rem; }
.count:empty { display: none; }
.frgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.frcard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; background: #191e18; border: 1px solid var(--line); }
.frcard b { display: block; }
.frcard small { display: block; color: var(--dim); font-family: system-ui, sans-serif; font-size: .82rem; }
.frcard small.dim { opacity: .7; }
.frdot { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.frcard.online .frdot { background: #6fe07a; box-shadow: 0 0 6px #6fe07a; }
.frcard.playing { border-color: rgba(93,180,255,.5); }
.frcard.playing small:first-of-type { color: #9fd2ff; }
button.small { padding: 6px 10px; font-size: .78rem; }

/* admin: rooms per area */
.adrooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.adroom { display: grid; gap: 8px; padding: 14px 16px; background: #191e18; border: 1px solid var(--line); }
.adr-head { display: flex; justify-content: space-between; align-items: baseline; }
.adr-head b { font-family: var(--cond); font-size: 1.2rem; letter-spacing: .1em; text-transform: uppercase; }
.adr-n { color: #9fd2ff; font-weight: 700; }
.adr-room { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; align-items: center; }
.adr-room small { grid-column: 1 / -1; color: var(--dim); font-family: system-ui, sans-serif; font-size: .78rem; }

.mp-go { display: grid; gap: 10px; justify-items: end; }
.teampick { display: flex; gap: 6px; }
.teampick button { padding: 8px 14px; font-size: .85rem; }
.teampick button.on { border-color: var(--accent); background: #3a2f18; color: var(--accent2); }
.teampick button.blue.on { border-color: #5db4ff; background: #1f3444; color: #9fd2ff; }
.teampick button.red.on { border-color: #ff8474; background: #44201c; color: #ffb3a8; }
@media (max-width: 640px) { .mp-go { justify-items: stretch; } .teampick button { flex: 1; } }

#spec { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 8px 16px; background: rgba(8,12,10,.72); border: 1px solid rgba(93,180,255,.5);
  color: #cfe8ff; font: 600 .9rem system-ui, sans-serif; letter-spacing: .04em; white-space: nowrap; pointer-events: none; }
#spec:empty { display: none; }

#hud.specmode #hpbox, #hud.specmode #ammobox, #hud.specmode #crosshair, #hud.specmode #reloadTip { display: none; }

.mpwait { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--accent); background: linear-gradient(120deg, #3a2f18, #1b1a12); clip-path: var(--cut); }
.mpwait.hidden { display: none; }
.mpwait div { flex: 1; display: grid; gap: 4px; }
.mpwait b { font-size: 1.15rem; color: var(--accent2); }
.mpwait span { color: var(--dim); font-family: system-ui, sans-serif; font-size: .9rem; }
.mpwait .spin { width: 26px; height: 26px; border: 3px solid rgba(243,182,79,.25); border-top-color: var(--accent); border-radius: 50%; animation: mpspin 1s linear infinite; }
@keyframes mpspin { to { transform: rotate(360deg); } }
.mpr-state.wait { color: var(--accent2); }
@media (max-width: 640px) { .mpwait { flex-wrap: wrap; } }

/* weapon list: the weapon in hand, large; the full list only for a moment after switching */
#slots { display: grid; gap: 3px; justify-items: end; margin-bottom: 8px; }
#slots .slot { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 8px; padding: 3px 8px; opacity: 1; border-right: 3px solid transparent; }
#slots .slot img { height: 22px; width: 58px; object-fit: contain; filter: brightness(1.9) contrast(1.1) drop-shadow(0 1px 2px rgba(0,0,0,.9)); }
#slots .slot span { display: inline; font: 600 .78rem system-ui, sans-serif; color: #d8ddd3; letter-spacing: .02em; white-space: nowrap; }
#slots .slot:not(.on) { display: none; }
#slots .slot.on { order: 99; border-right-color: var(--accent); background: linear-gradient(270deg, rgba(243,182,79,.18), transparent); }
#slots .slot.on img { height: 40px; width: 104px; }
#slots .slot.on span { font-size: .9rem; color: #fff; }
#slots.open .slot { display: grid; animation: slotIn .14s ease-out; }
#slots.open .slot:not(.on) { background: rgba(10,14,12,.55); }
#slots.open .slot.on { order: 0; }
#slots .slot:not(.on) img { height: 22px; width: 58px; }
@keyframes slotIn { from { opacity: 0; transform: translateX(8px); } }
#slots:not(.open) .slot.on span, #slots:not(.open) .slot.on kbd { display: none; }

/* weapon kind beside each weapon in the list (snipers stand out) */
#slots .slot { grid-template-columns: auto auto auto auto; }
#slots .slot em { font: 700 .62rem system-ui, sans-serif; font-style: normal; letter-spacing: .08em; color: #aab3a6; border: 1px solid rgba(170,179,166,.45); border-radius: 3px; padding: 1px 4px; }
#slots .slot em.sniper { color: #f3b64f; border-color: rgba(243,182,79,.6); }
.gun .kind.sniper { color: #f3b64f; font-weight: 700; }

/* In-map Armory prompt and picker, RC car readout */
#usePrompt, #rcInfo { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; font-weight: 700; letter-spacing: .12em; font-size: .82rem; text-shadow: 0 1px 3px #000; }
#usePrompt { top: 64%; color: #f0dc8a; }
#rcInfo { top: 12%; color: #b9ffb0; }
#usePrompt:empty, #rcInfo:empty { display: none; }
#armoryUi { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 300px; padding: 12px 14px; background: rgba(12,16,14,.86); border: 1px solid rgba(240,220,138,.45); border-radius: 8px; pointer-events: none; }
#armoryUi h4 { margin: 0 0 8px; color: #f0dc8a; letter-spacing: .2em; font-size: .9rem; }
#armoryUi .arow { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 4px; color: #cfd6cf; font-size: .86rem; }
#armoryUi .arow b { color: #f0dc8a; text-align: center; border: 1px solid rgba(240,220,138,.4); border-radius: 3px; font-size: .75rem; }
#armoryUi .arow em { font-style: normal; color: #8c978c; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
#armoryUi .arow.side em { color: #9cc6ff; }
#armoryUi .arow.on { background: rgba(240,220,138,.16); color: #fff; }
#armoryUi p { margin: 8px 0 0; color: #a9b3a9; font-size: .74rem; }
.teampick.types button.on { background: rgba(240,220,138,.22); border-color: rgba(240,220,138,.7); color: #fff; }
.withfriends { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.withfriends select { flex: 1; min-width: 0; }
.frcard .frjoin { margin-left: auto; }

/* fixes from the menu check: the price tag clear of the type line; long names and empty weapon slots on the home card;
   the area carousel, the Play steps and the mode cards at narrow widths */
.shelf .gun:not(.sel) > .kind { padding-right: 64px; }
#heroName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#heroGun1[src=""], #heroGun2[src=""] { display: none; }
#tab-play[data-step="1"] .mission { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .carousel { grid-template-columns: 1fr; position: relative; }
  .carousel > button { position: absolute; top: 40%; z-index: 2; background: rgba(10,14,10,.75); }
  .carousel > button:first-child { left: 0; } .carousel > button:last-child { right: 0; }
  .carousel .maps { padding: 12px 0 18px; gap: 12px; }
  .carousel .mapcard { flex: 0 0 100%; max-width: 100%; transform: none; }
}
@media (max-width: 640px) {
  .wiz li { padding: 8px 6px; letter-spacing: .06em; font-size: .8rem; }
  .wiz li:not(.on) { flex: 0 0 auto; font-size: 0; gap: 0; }
  .wiz li:not(.on) i { font-size: .9rem; }
  .home .hero { grid-template-columns: 1fr; }
}

/* level and progress on the home card; level tags on the scoreboard */
.lvlbox { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; margin: 4px 0 8px; max-width: 420px; }
.lvlbox b { grid-row: span 2; font-family: var(--cond); font-size: 2rem; line-height: 1; color: var(--accent); min-width: 2.2ch; text-align: center; border: 2px solid var(--accent); padding: 4px 6px; }
.lvlbox span { font-family: var(--cond); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.lvlbox .lvlbar { display: block; height: 7px; background: rgba(255,255,255,.1); position: relative; overflow: hidden; }
.lvlbox .lvlbar s { position: absolute; inset: 0 auto 0 0; background: var(--accent); text-decoration: none; }
.lvlbox small { grid-column: 2; color: var(--dim); font-size: .75rem; }
.lvtag { display: inline-block; min-width: 2.2ch; margin-right: 6px; padding: 0 4px; font-size: .72rem; text-align: center; color: #1a1205; background: var(--accent2); border-radius: 2px; }

/* in-game HUD in narrow windows: smaller panels, kept apart (top: map left, score middle, kill feed below; bottom: health left, ammo right) */
@media (max-width: 700px) {
  #radarbox { left: 8px; top: 8px; }
  #radar { max-width: 26vw; }
  #coinbox { font-size: .85rem; padding: 1px 8px; }
  #topbar { top: 6px; left: auto; right: 8px; transform: none; }
  #topbar .side { min-width: 0; padding: 2px 9px 3px; }
  #topbar .side b { font-size: 1.15rem; }
  #topbar .side small, #subinfo { font-size: .58rem; letter-spacing: .08em; }
  #feed { top: 74px; right: 8px; font-size: .7rem; max-width: 58vw; }
  #hint { top: auto; bottom: 34%; font-size: .7rem; max-width: 92vw; }
  #hpbox, #ammobox { min-width: 0; bottom: 8px; padding: 4px 8px; }
  #hpbox { left: 8px; max-width: 46vw; } #ammobox { right: 8px; max-width: 46vw; }
  #hud .big { font-size: 1.5rem; } #hud .big span { font-size: .8rem; }
  #hud .cross { width: 15px; height: 15px; margin-right: 5px; }
  #slots .slot.on img { height: 26px; width: 66px; } #slots .slot span { font-size: .7rem; }
  #center b { font-size: 2rem; } #center span { font-size: .8rem; }
  #streak { font-size: 1.05rem; letter-spacing: .16em; }
  #rcInfo { top: 22%; font-size: .7rem; }
}
/* phones and tablets without a mouse: say what the game needs */
.touchnote { display: none; margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(243,182,79,.1); font-size: .9rem; }
@media (hover: none) and (pointer: coarse) { .touchnote { display: block; } }
/* the home card's text clears its accent edge on phones */
@media (max-width: 640px) { .home .hero .hero-text, .home .hero .hero-go { padding: 0 16px 16px; } .home .hero .hero-text { padding-top: 12px; } }
@media (max-width: 700px) { #fps { top: auto; bottom: 92px; right: auto; left: 8px; } }

/* ---------- touch controls (phones and tablets) ---------- */
#touch { position: absolute; inset: 0; pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; z-index: 1; }
#touch button { -webkit-tap-highlight-color: transparent; touch-action: none; font: 700 .72rem/1 system-ui, sans-serif; letter-spacing: .08em; color: #f1f4ec; text-shadow: none; }
.t-btn { position: absolute; width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: rgba(14,18,14,.42); padding: 0; display: grid; place-items: center; }
.t-btn.on, .t-chip.on { background: rgba(243,182,79,.55); border-color: var(--accent); }
.t-fire { width: 86px; height: 86px; right: 26px; bottom: 112px; font-size: .9rem; border-color: rgba(255,132,116,.75); background: rgba(120,30,20,.38); }
.t-aim { right: 124px; bottom: 150px; }
.t-jump { right: 34px; bottom: 214px; }
.t-crouch { right: 124px; bottom: 82px; font-size: .62rem; }
.t-reload { right: 196px; bottom: 112px; width: 52px; height: 52px; font-size: .6rem; }
.t-nade { right: 112px; bottom: 226px; width: 52px; height: 52px; }
.t-cycle { right: 196px; bottom: 182px; width: 52px; height: 52px; font-size: .6rem; }
.t-row { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 6px; }
.t-chip { padding: 8px 11px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(14,18,14,.5); }
.t-stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(14,18,14,.25); pointer-events: none; }
.t-stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(240,244,236,.5); }
.t-turn { display: none; }
#touch.rcmode .t-reload, #touch.rcmode .t-nade, #touch.rcmode .t-cycle { display: none; }
/* the touch layout replaces the mouse/keyboard help; the HUD panels make room for the thumbs */
body.touchplay #clickKeys, body.touchplay #reloadTip { display: none; }
body.touchplay #ammobox { bottom: 8px; right: 8px; min-width: 0; padding: 3px 8px; transform: scale(.78); transform-origin: right bottom; }
body.touchplay #hpbox { bottom: 8px; left: 8px; min-width: 0; transform: scale(.78); transform-origin: left bottom; }
body.touchplay #slots { display: none; }
body.touchplay #armoryUi { pointer-events: auto; right: 260px; width: min(280px, 40vw); max-height: 80vh; overflow-y: auto; }
body.touchplay #armoryUi .arow { padding: 7px 4px; }
/* held upright: ask for landscape (the buttons are laid out for it) */
@media (orientation: portrait) {
  body.touchplay .t-turn { display: grid; place-items: center; position: absolute; inset: 0; background: rgba(8,10,8,.9); font: 700 1.1rem system-ui, sans-serif; letter-spacing: .06em; color: #f0dc8a; text-align: center; padding: 24px; z-index: 5; }
}
/* small landscape phones: tighter */
@media (max-height: 420px) {
  .t-fire { width: 76px; height: 76px; bottom: 92px; right: 20px; }
  .t-aim { right: 108px; bottom: 124px; } .t-jump { right: 26px; bottom: 180px; }
  .t-crouch { right: 106px; bottom: 60px; } .t-reload { right: 176px; bottom: 82px; }
  .t-nade { right: 100px; bottom: 192px; } .t-cycle { right: 176px; bottom: 150px; }
  .t-chip { padding: 7px 9px; }
}

/* full screen on phones with a notch or rounded corners: keep the HUD and thumb buttons inside the safe area */
@supports (padding: env(safe-area-inset-left)) {
  #hud { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); box-sizing: border-box; }
  #radarbox { left: calc(16px + env(safe-area-inset-left)); top: calc(14px + env(safe-area-inset-top)); }
  #hpbox { left: calc(18px + env(safe-area-inset-left)); }
  #ammobox { right: calc(18px + env(safe-area-inset-right)); }
  body.touchplay #hpbox { left: calc(8px + env(safe-area-inset-left)); bottom: calc(8px + env(safe-area-inset-bottom)); }
  body.touchplay #ammobox { right: calc(8px + env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); }
  #touch { left: env(safe-area-inset-left); right: env(safe-area-inset-right); top: env(safe-area-inset-top); bottom: env(safe-area-inset-bottom); }
}
/* the menus use the real visible height on phones (100vh there includes the hidden browser bars) */
@supports (height: 100dvh) {
  .tab.home { min-height: calc(100dvh - 64px); }
  #pause .panel { max-height: calc(100dvh - 24px); }
}

/* pause button on screen (computers: top left, under the points; phones use the one in the touch layer) */
.hudpause { position: absolute; left: 16px; top: 150px; width: 38px; height: 34px; padding: 0; pointer-events: auto; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; background: rgba(10,14,10,.55); color: #f1f4ec; font: 700 .85rem/1 system-ui, sans-serif; letter-spacing: -.1em; }
.hudpause:hover { background: rgba(243,182,79,.35); }
body.touchplay .hudpause { display: none; }
.touchonly { display: none; }
body.touchplay .touchonly { display: grid; }

/* ---------- touch controls v2: bigger targets, analog stick, pause ---------- */
.t-btn::before, .t-pause::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }   /* a finger slightly off still hits */
.t-btn { width: 64px; height: 64px; background: rgba(14,18,14,.38); }
.t-fire { width: 96px; height: 96px; right: 24px; bottom: 104px; }
.t-aim { width: 68px; height: 68px; right: 136px; bottom: 150px; }
.t-jump { width: 66px; height: 66px; right: 36px; bottom: 216px; }
.t-crouch { width: 60px; height: 60px; right: 140px; bottom: 70px; }
.t-reload { width: 54px; height: 54px; right: 218px; bottom: 100px; }
.t-nade { width: 54px; height: 54px; right: 128px; bottom: 236px; }
.t-cycle { width: 54px; height: 54px; right: 218px; bottom: 176px; }
.t-pause { position: absolute; left: calc(14px + env(safe-area-inset-left, 0px)); top: 130px; width: 44px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(14,18,14,.55); padding: 0; font-size: .95rem !important; letter-spacing: -.1em !important; }
.t-stick { width: 136px; height: 136px; margin: -68px 0 0 -68px; }
.t-stick i { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
@media (max-height: 420px) {
  .t-fire { width: 84px; height: 84px; right: 18px; bottom: 86px; }
  .t-aim { width: 60px; height: 60px; right: 116px; bottom: 120px; }
  .t-jump { width: 58px; height: 58px; right: 26px; bottom: 180px; }
  .t-crouch { width: 54px; height: 54px; right: 116px; bottom: 50px; }
  .t-reload { width: 48px; height: 48px; right: 186px; bottom: 74px; }
  .t-nade { width: 48px; height: 48px; right: 106px; bottom: 192px; }
  .t-cycle { width: 48px; height: 48px; right: 186px; bottom: 140px; }
  .t-pause { top: 104px; }
}
/* phones: pause beside the map; the ammo panel shows just the weapon and the rounds (counts live on the buttons) */
.t-pause { left: calc(22vw + 30px); top: 12px; }
@media (max-height: 420px) { .t-pause { top: 10px; } }
body.touchplay #nades, body.touchplay #fmode, body.touchplay #magbar { display: none; }
body.touchplay #ammobox #wname { font-size: .62rem; }
.t-pause, .hudpause { letter-spacing: .12em !important; font-size: .8rem !important; }
.hudpause { left: calc(min(22vw, 192px) + 28px); top: 14px; }

/* inside the installed app: already full screen and already installed, so those buttons are hidden */
body.inapp .fsbtn, body.inapp #installBtn { display: none !important; }
