/* PIXI STRIKE · Pixelab Interactive. Marca: negro #0B0B0B, hueso #FAFAFA, lima #B9E64D. Esquinas duras. */
@font-face { font-family: 'Jura'; src: url(../assets/fonts/jura-latin.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../assets/fonts/inter-latin.woff2) format('woff2'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(../assets/fonts/jetbrains-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url(../assets/fonts/funnel-display.ttf) format('truetype'); font-weight: 300 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0B0B0B; --bg2: #141414; --bg3: #1d1d1d; --line: #2c2c2c; --bone: #FAFAFA; --dim: #9a9a9a;
  --lime: #B9E64D; --lime2: #d6f58b; --t: #F0A43A; --ct: #62B0F5; --red: #ff4d4d;
  --display: 'Funnel Display', 'Jura', system-ui, sans-serif; --jura: 'Jura', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--bone); font-family: var(--body); overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
#gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; }

/* ---------------- arranque ---------------- */
#boot { position: absolute; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .5s; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-logo { width: min(200px, 40vw); height: auto; }
.boot-title { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 7vw, 76px); letter-spacing: .02em; line-height: 1; }
.boot-title b, .logo-title b { color: var(--lime); font-weight: 800; }
.boot-bar { width: min(360px, 70vw); height: 6px; background: var(--bg3); }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .2s; }
.boot-msg { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }

/* ---------------- pantallas ---------------- */
#ui { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#ui > .screen { pointer-events: auto; }
.screen { position: absolute; inset: 0; display: flex; overflow: auto; }
.screen.menu-bg { background: linear-gradient(90deg, rgba(11,11,11,.94) 0%, rgba(11,11,11,.78) 42%, rgba(11,11,11,.15) 100%); }
.screen.dim { background: rgba(8,8,8,.86); backdrop-filter: blur(3px); }
.panel { background: var(--bg2); border: 1px solid var(--line); padding: 22px; }
.logo-title { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6.4vw, 92px); line-height: .92; letter-spacing: .01em; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--lime); }
.sub { color: var(--dim); font-size: 14px; line-height: 1.5; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3vw, 38px); margin: 0 0 6px; }
h3 { font-family: var(--jura); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 18px 0 8px; color: var(--dim); }

.main-menu { flex-direction: column; justify-content: center; padding: 6vh max(6vw, calc(24px + var(--safe-l))); gap: 26px; max-width: 760px; }
.main-menu .btns { display: flex; flex-direction: column; gap: 10px; width: min(420px, 100%); }
.btn { appearance: none; border: 1px solid var(--line); background: var(--bg2); color: var(--bone); padding: 14px 18px; font-family: var(--jura); font-weight: 700; font-size: 17px; letter-spacing: .1em; text-transform: uppercase; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: background .12s, color .12s, border-color .12s; }
.btn:hover, .btn:focus-visible { background: var(--bg3); border-color: var(--lime); outline: none; }
.btn.primary { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.btn.primary:hover { background: var(--lime2); }
.btn small { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; opacity: .7; text-transform: none; }
.btn.sm { padding: 9px 12px; font-size: 13px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.foot { font-family: var(--mono); font-size: 11px; color: #6c6c6c; letter-spacing: .06em; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.foot img { height: 34px; }

.setup { flex-direction: column; padding: max(3vh, 16px) max(4vw, calc(16px + var(--safe-l))); gap: 14px; }
.setup .row { display: flex; gap: 14px; flex-wrap: wrap; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.card { border: 1px solid var(--line); background: var(--bg2); cursor: pointer; position: relative; overflow: hidden; min-height: 96px; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; }
.card:hover { border-color: #555; }
.card.sel { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.card .nm { font-family: var(--display); font-weight: 700; font-size: 20px; position: relative; }
.card .ds { font-size: 12px; color: var(--dim); position: relative; }
.card .thumb { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; }
.card.sel .thumb { opacity: .8; }
.chars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.char { border: 1px solid var(--line); background: var(--bg2); cursor: pointer; display: flex; flex-direction: column; align-items: center; padding: 8px 6px 10px; position: relative; }
.char img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.char .nm { font-family: var(--display); font-weight: 700; font-size: 18px; }
.char .ds { font-size: 11px; color: var(--dim); text-align: center; }
.char.sel { border-color: var(--lime); background: #1a2011; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt label { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: var(--bg2); padding: 9px 6px; cursor: pointer; font-family: var(--jura); font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--dim); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--lime); color: var(--bg); }
input[type=text], input:not([type]) { background: var(--bg); border: 1px solid var(--line); color: var(--bone); padding: 10px 12px; font-family: var(--mono); font-size: 15px; outline: none; width: 100%; }
input[type=text]:focus, input:not([type]):focus { border-color: var(--lime); }
input[type=range] { width: 100%; accent-color: var(--lime); }
.code { font-family: var(--mono); font-weight: 700; font-size: 38px; letter-spacing: .25em; color: var(--lime); }

.lobby { flex-direction: column; padding: 3vh max(4vw, calc(16px + var(--safe-l))); gap: 12px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.plist { display: flex; flex-direction: column; gap: 4px; }
.pl { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg2); border-left: 3px solid var(--line); font-size: 14px; }
.pl.t { border-left-color: var(--t); } .pl.ct { border-left-color: var(--ct); }
.pl img { width: 28px; height: 28px; object-fit: contain; }
.pl .tag { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.teams2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tlabel { font-family: var(--jura); font-weight: 700; letter-spacing: .12em; font-size: 13px; margin-bottom: 6px; }
.tlabel.t { color: var(--t); } .tlabel.ct { color: var(--ct); }
.lchat { height: 150px; overflow: auto; background: var(--bg); border: 1px solid var(--line); padding: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }

/* ---------------- HUD ---------------- */
#hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; font-family: var(--jura); font-weight: 700; color: var(--bone); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#xhair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#xhair i { position: absolute; background: var(--lime); box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
#hitmark { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; transition: opacity .05s; }
#hitmark::before, #hitmark::after { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; background: linear-gradient(#fff 0 32%, transparent 32% 68%, #fff 68%); }
#hitmark::before { transform: rotate(45deg); } #hitmark::after { transform: rotate(-45deg); }
#hitmark.hs::before, #hitmark.hs::after { background: linear-gradient(var(--red) 0 32%, transparent 32% 68%, var(--red) 68%); }
#top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; gap: 6px; }
.scorebox { display: flex; align-items: stretch; background: rgba(11,11,11,.72); border: 1px solid rgba(255,255,255,.08); }
.scorebox .sc { min-width: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-family: var(--display); }
.scorebox .sc.t { color: var(--t); } .scorebox .sc.ct { color: var(--ct); }
.scorebox .timer { min-width: 82px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-family: var(--mono); background: rgba(0,0,0,.35); padding: 4px 10px; }
.scorebox .timer.low { color: var(--red); }
.teamcol { display: flex; align-items: center; }
.alive { display: flex; gap: 3px; }
.alive i { width: 26px; height: 30px; background: rgba(11,11,11,.72); border-bottom: 3px solid currentColor; display: block; background-size: cover; background-position: center top; }
.alive i.dead { opacity: .25; filter: grayscale(1); }
.teamcol.t { color: var(--t); flex-direction: row-reverse; } .teamcol.ct { color: var(--ct); }
#bombicon { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; padding: 3px 10px; font-size: 12px; letter-spacing: .16em; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .55; } }
/* rehenes: un icono por rehén bajo el marcador */
/* etiqueta de misión en las miniaturas de mapa */
.card .thumb { position: relative; }
.card .thumb .mis { position: absolute; left: 6px; top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 2px 6px; background: rgba(11,11,11,.78); color: #ffb0b0; border: 1px solid rgba(255,77,77,.5); }
.card .thumb .mis.h { color: #a9d5ff; border-color: rgba(98,176,245,.6); }
#hostinfo { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; background: rgba(11,11,11,.72); border: 1px solid rgba(255,255,255,.08); padding: 4px 9px; font-size: 11px; letter-spacing: .14em; }
#hostinfo span { color: #cfd6dc; margin-right: 3px; }
#hostinfo b { font-family: var(--mono); font-size: 13px; letter-spacing: 0; margin-left: 4px; color: #8CC8FF; }
#hostinfo i { width: 11px; height: 15px; display: block; border-radius: 6px 6px 2px 2px; background: #F2EEE8; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
#hostinfo i.follow { background: #62B0F5; }
#hostinfo i.rescued { background: var(--lime); }
#hostinfo i.dead { background: var(--red); opacity: .45; }
.kf .host { color: #F2EEE8; }
#tags .tag b.host { color: #F2EEE8; }
#killfeed { position: absolute; top: 12px; right: calc(12px + var(--safe-r)); display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.kf { background: rgba(11,11,11,.72); padding: 5px 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; border: 1px solid transparent; font-family: var(--body); font-weight: 600; }
.kf.me { border-color: var(--red); }
.kf .t { color: var(--t); } .kf .ct { color: var(--ct); } .kf .dm { color: var(--lime); }
.kf .w { font-family: var(--mono); font-size: 11px; color: #ddd; background: rgba(255,255,255,.08); padding: 1px 5px; }
.kf .hs { color: var(--red); font-size: 12px; }
#radar { position: absolute; top: 10px; left: calc(10px + var(--safe-l)); width: 200px; height: 200px; background: rgba(11,11,11,.55); border: 1px solid rgba(255,255,255,.08); }
#radar canvas { width: 100%; height: 100%; display: block; }
#money { position: absolute; left: calc(14px + var(--safe-l)); top: 222px; font-family: var(--display); font-size: 26px; color: var(--lime); }
#money .lbl { opacity: .8; margin-right: 2px; }
#moneyd { font-size: 15px; font-family: var(--mono); }
#moneyd .p { color: var(--lime); } #moneyd .n { color: var(--red); }
#buyzone { position: absolute; left: calc(14px + var(--safe-l)); top: 262px; font-size: 12px; letter-spacing: .14em; background: rgba(185,230,77,.16); border: 1px solid rgba(185,230,77,.4); padding: 4px 8px; color: var(--lime); }
#vitals { position: absolute; left: calc(14px + var(--safe-l)); bottom: 14px; display: flex; gap: 8px; }
.vit { background: rgba(11,11,11,.72); padding: 6px 14px 6px 10px; display: flex; align-items: center; gap: 10px; font-size: 34px; font-family: var(--display); min-width: 120px; }
.vit .ico { font-size: 24px; color: var(--lime); width: 18px; text-align: center; }
.vit.low { color: var(--red); } .vit.low .ico { color: var(--red); }
#ammo { position: absolute; right: calc(14px + var(--safe-r)); bottom: 14px; background: rgba(11,11,11,.72); padding: 6px 14px; font-family: var(--display); font-size: 36px; text-align: right; min-width: 150px; }
#ammo .sep { opacity: .4; margin: 0 4px; font-size: 26px; }
#ammo #resv { font-size: 22px; opacity: .8; }
#ammo #wname { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
#ammo.low #clipv { color: var(--red); }
#inv { position: absolute; right: calc(14px + var(--safe-r)); bottom: 96px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.invi { font-family: var(--mono); font-size: 12px; background: rgba(11,11,11,.55); padding: 3px 8px; color: #bbb; display: flex; gap: 8px; }
.invi.on { color: var(--bg); background: var(--lime); }
.invi b { opacity: .6; }
#center-msg { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; font-family: var(--display); font-size: clamp(22px, 3.4vw, 44px); letter-spacing: .02em; white-space: nowrap; }
#center-msg .small { display: block; font-family: var(--jura); font-size: 15px; letter-spacing: .16em; opacity: .85; margin-top: 4px; }
#center-msg .t { color: var(--t); } #center-msg .ct { color: var(--ct); }
.banner { background: rgba(11,11,11,.8); padding: 14px 28px; border-top: 3px solid var(--lime); }
#progress { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); width: min(360px, 70vw); text-align: center; }
#progress .lbl { font-size: 13px; letter-spacing: .2em; margin-bottom: 6px; }
#progress .bar { height: 8px; background: rgba(11,11,11,.7); border: 1px solid rgba(255,255,255,.2); }
#progress .bar i { display: block; height: 100%; width: 0; background: var(--lime); }
#chatlog { position: absolute; left: calc(14px + var(--safe-l)); bottom: 110px; width: min(420px, 50vw); display: flex; flex-direction: column; gap: 2px; font-family: var(--body); font-weight: 600; font-size: 14px; }
#chatlog div { background: rgba(11,11,11,.45); padding: 2px 8px; animation: fadeout 9s forwards; }
@keyframes fadeout { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#chatin { position: absolute; left: calc(14px + var(--safe-l)); bottom: 76px; width: min(420px, 60vw); display: flex; align-items: center; gap: 8px; background: rgba(11,11,11,.85); padding: 4px 8px; pointer-events: auto; }
#chatin input { padding: 6px 8px; font-size: 14px; }
#spec { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(11,11,11,.75); padding: 8px 18px; font-size: 16px; text-align: center; }
#spec small { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; }
#dmg { position: absolute; inset: 0; }
#dmg i { position: absolute; left: 50%; top: 50%; width: 90px; height: 14px; margin: -7px 0 0 -45px; background: linear-gradient(90deg, transparent, rgba(255,60,60,.85), transparent); transform-origin: 45px 7px; animation: dmgfade 1.1s forwards; }
@keyframes dmgfade { from { opacity: 1; } to { opacity: 0; } }
#netinfo { position: absolute; right: calc(8px + var(--safe-r)); top: 150px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.55); font-weight: 400; text-align: right; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 12; }
/* rastro de la cegadora: debajo del blanco, borroso y aclarando (no tapa lo que se mueve) */
#flashimg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; z-index: 11; filter: blur(3px) brightness(1.35); mix-blend-mode: screen; }
#vignette { position: absolute; inset: 0; pointer-events: none; z-index: 9; box-shadow: inset 0 0 160px rgba(160,0,0,0); transition: box-shadow .2s; }
#scope { position: absolute; inset: 0; }
#scope .scope-ring { position: absolute; left: 50%; top: 50%; width: 100vh; height: 100vh; margin: -50vh 0 0 -50vh; border-radius: 50%; box-shadow: 0 0 0 100vmax #000, inset 0 0 50px 10px rgba(0,0,0,.8); }
#scope .scope-h { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
#scope .scope-v { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #000; }

/* marcador (Tab) */
.scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(880px, 94vw); max-height: 86vh; overflow: auto; background: rgba(11,11,11,.93); border: 1px solid var(--line); padding: 16px; pointer-events: none; font-family: var(--body); z-index: 30; }
.scoreboard .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.scoreboard .hd b { font-family: var(--display); font-size: 22px; }
.scoreboard table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.scoreboard th { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; padding: 4px 8px; letter-spacing: .08em; }
.scoreboard th:first-child, .scoreboard td:first-child { text-align: left; }
.scoreboard td { text-align: right; padding: 5px 8px; border-top: 1px solid #202020; font-weight: 600; }
.scoreboard tr.me td { background: rgba(185,230,77,.08); }
.scoreboard tr.dead td { opacity: .45; }
.scoreboard .tt { color: var(--t); } .scoreboard .ctt { color: var(--ct); }
.scoreboard .team-h { font-family: var(--jura); font-weight: 700; letter-spacing: .14em; font-size: 14px; display: flex; justify-content: space-between; padding: 6px 8px; }
.scoreboard .team-h.t { background: rgba(240,164,58,.14); color: var(--t); } .scoreboard .team-h.ct { background: rgba(98,176,245,.14); color: var(--ct); }

/* menú de compra */
.buymenu { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(980px, 96vw); max-height: 92vh; overflow: auto; background: rgba(11,11,11,.95); border: 1px solid var(--line); padding: 16px; z-index: 30; pointer-events: auto; font-family: var(--body); }
.buymenu .hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.buymenu .hd b { font-family: var(--display); font-size: 24px; }
.buymenu .hd .m { font-family: var(--display); font-size: 24px; color: var(--lime); }
.buycats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.buycat h4 { margin: 0 0 6px; font-family: var(--jura); font-size: 12px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.buycat h4 b { color: var(--lime); margin-right: 5px; }
.bitem { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg2); padding: 8px; margin-bottom: 6px; cursor: pointer; font-family: var(--body); }
.bitem:hover { border-color: var(--lime); background: var(--bg3); }
.bitem .n { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 4px; }
.bitem .n kbd { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.bitem .p { font-family: var(--mono); font-size: 12px; color: var(--lime); }
.bitem .s { font-size: 11px; color: var(--dim); }
.bitem.no { opacity: .35; }
.bitem.own { border-color: #555; }
.bitem.own .p::after { content: ' · equipado'; color: var(--dim); }
.buyfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); gap: 10px; flex-wrap: wrap; }

/* fin de partida */
.results { flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; }

/* ---------------- táctil ---------------- */
#touch { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
#touch .tz { position: absolute; pointer-events: auto; }
#touch .look { right: 0; top: 0; width: 60%; height: 100%; }
#touch .joy { left: 0; bottom: 0; width: 40%; height: 70%; }
#touch .stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 2px solid rgba(250,250,250,.35); border-radius: 50%; background: rgba(11,11,11,.25); pointer-events: none; display: none; }
#touch .stick i { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(185,230,77,.55); }
#touch .tb { position: absolute; pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(250,250,250,.4); background: rgba(11,11,11,.35); color: var(--bone); font-family: var(--jura); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; letter-spacing: .04em; line-height: 1.05; }
#touch .tb.on { background: rgba(185,230,77,.55); color: var(--bg); border-color: var(--lime); }
#touch .tb.fire { width: 86px; height: 86px; font-size: 14px; border-color: rgba(255,77,77,.7); }
#touch .tb.sq { border-radius: 0; width: 56px; height: 40px; font-size: 11px; }
#rotate { position: absolute; inset: 0; z-index: 200; background: var(--bg); display: none; align-items: center; justify-content: center; text-align: center; padding: 30px; }
#rotate div { display: flex; flex-direction: column; gap: 8px; } #rotate b { font-family: var(--display); font-size: 28px; color: var(--lime); } #rotate span { color: var(--dim); }
@media (orientation: portrait) and (pointer: coarse) { body.ingame #rotate, body.touchdev #rotate { display: flex; } }

@media (max-width: 900px), (max-height: 560px) {
  #radar { width: 130px; height: 130px; }
  #money { top: 146px; font-size: 20px; } #buyzone { top: 176px; }
  .vit { font-size: 24px; min-width: 88px; padding: 4px 10px 4px 8px; } .vit .ico { font-size: 18px; }
  #ammo { font-size: 26px; min-width: 110px; } #ammo .sep { font-size: 18px; } #ammo #resv { font-size: 16px; }
  #inv { display: none; }
  .kf { font-size: 12px; padding: 3px 7px; }
  .scorebox .sc { font-size: 17px; min-width: 32px; } .scorebox .timer { font-size: 18px; min-width: 64px; }
  .alive i { width: 18px; height: 22px; }
  .buycats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lobby-grid { grid-template-columns: 1fr; }
  .chars { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
}
body.touchdev #vitals { bottom: 8px; } body.touchdev #ammo { bottom: auto; top: 150px; right: calc(8px + var(--safe-r)); }
body.touchdev #chatlog { bottom: 170px; }

/* ---------------- añadidos v1 ---------------- */
.screen.setup, .screen.lobby { background: rgba(8,8,8,.9); }
.setup .opts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 18px; }
.seg button { white-space: nowrap; padding: 9px 8px; }
.seg.tabs { max-width: 900px; }
.cards .card { min-height: 120px; }
.cards.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.small .card { min-height: 70px; }
.card .thumb { background-color: #1a1a1a; }
.chars { grid-template-columns: repeat(4, minmax(0, 190px)); }
.chars.big { grid-template-columns: repeat(4, minmax(0, 240px)); }
.char img { background: radial-gradient(circle at 50% 60%, #242424, #151515); }
.char.na { opacity: .35; cursor: not-allowed; }
.char.na::after { content: 'Próximamente'; position: absolute; top: 8px; right: 8px; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.panel .sub + .row { margin-top: 10px; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys td { padding: 5px 0; border-top: 1px solid #222; } .keys td:last-child { text-align: right; font-family: var(--mono); color: var(--lime); }
.opts.keys { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 10px; }
.opts.keys .btn { justify-content: center; font-family: var(--mono); letter-spacing: .04em; }
.xhprev { height: 120px; margin-bottom: 14px; background: linear-gradient(135deg, #7d6a4b, #b99b6c 50%, #4c5a33); position: relative; border: 1px solid var(--line); }
.xhprev .xhwrap { position: absolute; left: 50%; top: 50%; }
.results { background: rgba(8,8,8,.9); }
.results .btns .btn { justify-content: center; }
.bigscore { font-family: var(--display); font-size: clamp(40px, 6vw, 72px); display: flex; gap: 18px; align-items: center; }
.bigscore .t, h2.t { color: var(--t); } .bigscore .ct, h2.ct { color: var(--ct); }
.restable { width: 100%; border-collapse: collapse; font-size: 14px; }
.restable th { font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; text-align: right; padding: 4px 8px; }
.restable td { text-align: right; padding: 6px 8px; border-top: 1px solid #222; font-weight: 600; }
.restable th:first-child, .restable td:first-child { text-align: left; }
.restable tr.me td { background: rgba(185,230,77,.08); }
.boot-bar { margin: 0 auto; }
#tags { position: absolute; inset: 0; overflow: hidden; }
#tags .tag { position: absolute; left: 0; top: 0; font-family: var(--body); font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 3px #000; will-change: transform; }
#tags .tag b.t { color: var(--t); } #tags .tag b.ct { color: var(--ct); } #tags .tag b.dm { color: #ff6b6b; }
#tags .tag small { display: block; font-family: var(--mono); font-size: 10px; color: #fff; font-weight: 400; }
#smokeveil { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(205,205,200,.92), rgba(185,185,180,.98)); }
#ammo.noammo #clipv, #ammo.noammo .sep, #ammo.noammo #resv { display: none; }
#ammo.noammo { min-width: 0; font-size: 18px; padding: 8px 14px; }
#hitmark.kill { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
#xhair i { position: absolute; }
.buycat.sel h4 { color: var(--lime); }
.buymenu .hd .bt { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: auto; margin-right: 12px; }
.scoreboard { font-variant-numeric: tabular-nums; }
#killfeed .kf { font-variant-numeric: tabular-nums; }
.pause h2 { margin-bottom: 8px; }
.lobby .code { font-size: 30px; vertical-align: middle; }
.lchat + input { margin-top: 6px; }
@media (max-width: 900px), (max-height: 560px) {
  .chars, .chars.big { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .setup .opts { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .char .ds { display: none; }
  .cards .card { min-height: 80px; }
}
/* ---- diseño táctil (celular horizontal) ---- */
body.touchdev #radar { width: 108px; height: 108px; top: 6px; left: calc(6px + var(--safe-l)); }
body.touchdev #money { top: 118px; font-size: 18px; left: calc(10px + var(--safe-l)); }
body.touchdev #buyzone, body.touchdev #inv { display: none; }
body.touchdev #vitals { bottom: 6px; left: calc(6px + var(--safe-l)); gap: 4px; }
body.touchdev .vit { font-size: 20px; min-width: 74px; padding: 3px 8px 3px 6px; gap: 6px; } body.touchdev .vit .ico { font-size: 15px; }
body.touchdev #ammo { top: auto; bottom: 6px; right: calc(31% + 6px); font-size: 20px; min-width: 84px; padding: 3px 10px; }
body.touchdev #ammo .sep { font-size: 15px; } body.touchdev #ammo #resv { font-size: 14px; } body.touchdev #ammo #wname { font-size: 9px; }
body.touchdev #killfeed { top: 46px; } body.touchdev .kf { font-size: 11px; padding: 2px 6px; }
body.touchdev #chatlog { bottom: 60px; width: 40vw; font-size: 12px; }
body.touchdev #netinfo { top: 44px; right: auto; left: 120px; text-align: left; }
body.touchdev #top { top: 4px; } body.touchdev .scorebox .timer { font-size: 16px; min-width: 56px; } body.touchdev .alive i { width: 15px; height: 18px; }
body.touchdev #center-msg { top: 18%; font-size: 20px; }
body.touchdev #progress { top: 58%; }
#touch .tb.sq.slot { width: 40px; height: 34px; font-size: 13px; }
#touch .tb.sq[data-a=score], #touch .tb.sq[data-a=menu] { width: 50px; height: 32px; }
#touch .tb.sq[data-a=buy] { width: 74px; height: 34px; }
@media (max-height: 420px) { body.touchdev .alive { display: none; } }

#hint { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); font-family: var(--jura); font-size: 15px; letter-spacing: .06em; background: rgba(11,11,11,.7); padding: 6px 14px; border-left: 3px solid var(--lime); opacity: 0; transition: opacity .25s; white-space: nowrap; }
#hint.on { opacity: 1; }
body.touchdev #hint { bottom: 30%; font-size: 12px; }

/* ---- barras de vida y blindaje ---- */
.vit .bar { position: relative; flex: 1; align-self: center; height: 10px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); min-width: 60px; }
.vit .bar b, .vit .bar s { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.vit .bar b { background: var(--lime); transition: width .12s ease-out, background-color .3s; }
.vit .bar s { background: rgba(255,255,255,.85); transition: width .5s ease-in .35s; }
.vit.hp { min-width: 270px; }
.vit.arm { min-width: 190px; } .vit.arm .bar { height: 6px; } .vit.arm .bar b { background: #9fb4c8; }
.vit.hp.mid .bar b { background: #f2c14e; } .vit.hp.mid .ico { color: #f2c14e; }
.vit.low .bar b { background: var(--red); }
.vit.low { animation: lowpulse .9s infinite; }
@keyframes lowpulse { 50% { background: rgba(120,0,0,.55); } }
@media (max-width: 900px), (max-height: 560px) { .vit.hp { min-width: 180px; } .vit.arm { min-width: 120px; } .vit .bar { min-width: 40px; height: 8px; } }
body.touchdev .vit.hp { min-width: 150px; } body.touchdev .vit.arm { min-width: 96px; } body.touchdev .vit .bar { min-width: 30px; height: 6px; }

/* ---- impactos en pantalla ---- */
#hurtfx { position: absolute; inset: 0; pointer-events: none; z-index: 9; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(190,0,0,.35) 68%, rgba(120,0,0,.85) 100%); }
#missfx { position: absolute; inset: 0; pointer-events: none; z-index: 9; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%); }
#dmg i { position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; border: 12px solid transparent; border-top-color: rgba(255,45,45,.95); background: none; animation: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 42% 58%, transparent 78%); mask-image: linear-gradient(90deg, transparent 22%, #000 42% 58%, transparent 78%); filter: drop-shadow(0 0 8px rgba(255,0,0,.9)); transform-origin: 50% 50%; }
body.touchdev #dmg i { width: 220px; height: 220px; margin: -110px 0 0 -110px; border-width: 9px; }

/* ---- etiquetas sobre los jugadores con barra de vida ---- */
#tags .tag .hpb { display: block; width: 46px; height: 4px; margin: 2px auto 0; background: rgba(0,0,0,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
#tags .tag .hpb i { display: block; height: 100%; background: var(--lime); }
#tags .tag .hpb.mid i { background: #f2c14e; } #tags .tag .hpb.low i { background: var(--red); }
#tags .tag.enemy b { color: #ff6b6b; }
#tags .tag .mk { display: block; margin: 0 auto; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid currentColor; }
#tags .tag.t .mk { color: var(--t); } #tags .tag.ct .mk { color: var(--ct); }

/* ---- nombre del jugador: bien visible en el menú, en línea y en la sala ---- */
.namecard { width: min(420px, 100%); background: rgba(16,16,16,.88); border: 2px solid var(--lime); padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.namecard label { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--lime); cursor: text; }
.namecard .nrow { display: flex; align-items: center; gap: 10px; }
.namecard input { flex: 1; min-width: 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: .01em; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); color: var(--bone); }
.namecard input:focus { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(185,230,77,.25); }
.namecard small { font-size: 12px; color: var(--dim); }
.namecard .ok { font-family: var(--mono); font-size: 12px; color: var(--lime); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.namecard .ok.on { opacity: 1; }
.namecard.todo { animation: namepulse 1.6s ease-in-out infinite; }
@keyframes namepulse { 50% { box-shadow: 0 0 0 4px rgba(185,230,77,.3), 0 0 26px rgba(185,230,77,.35); } }
.namecard.sm { width: min(520px, 100%); flex-direction: row; align-items: center; gap: 12px; padding: 8px 12px; }
.namecard.sm label { white-space: nowrap; }
.namecard.sm .nrow { flex: 1; }
.namecard.sm input { font-size: 22px; padding: 6px 10px; }
@media (max-width: 900px), (max-height: 560px) { .namecard input { font-size: 22px; padding: 6px 10px; } .namecard small { display: none; } }
