:root { --accent: #ffb020; --bg: #11141a; --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%; overflow: hidden; background: var(--bg); color: #fff; font-family: Rajdhani, system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#cv, #hud { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
#look { position: fixed; inset: 0; touch-action: none; }
.hidden { display: none !important; }
button { font: 700 15px Rajdhani, system-ui, sans-serif; letter-spacing: .08em; color: #1d1300; background: var(--accent); border: 0; padding: 10px 16px; border-radius: 4px; }
button.ghost { background: rgba(15,18,24,.6); color: #fff; border: 1px solid rgba(255,255,255,.35); }

#joy { position: fixed; left: calc(var(--safe-l) + 40px); bottom: 34px; width: 128px; height: 128px; border-radius: 50%; touch-action: none; z-index: 3;
  background: radial-gradient(circle, rgba(10,12,16,.2), rgba(10,12,16,.45)); border: 2px solid rgba(255,255,255,.4); }
#joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255,255,255,.3); border: 2px solid rgba(255,255,255,.75); pointer-events: none; }
#joy.on { border-color: var(--accent); } #joy.on i { background: rgba(255,176,32,.45); border-color: var(--accent); }

#top { position: fixed; top: 12px; right: calc(var(--safe-r) + 12px); display: flex; gap: 10px; align-items: flex-start; z-index: 3; pointer-events: none; }
#here-box { background: rgba(15,18,24,.72); padding: 6px 12px; border-left: 3px solid var(--accent); margin-top: 8px; max-width: 46vw; }
#here-box small { display: block; font-size: 10px; letter-spacing: .14em; color: #aab; }
#here-box b { font-size: 17px; letter-spacing: .03em; }
#mini { pointer-events: auto; cursor: pointer; width: 140px; height: 140px; border-radius: 50%; background: rgba(15,18,24,.6); border: 2px solid rgba(255,255,255,.5); }
#buttons { position: fixed; top: 12px; left: calc(var(--safe-l) + 12px); display: flex; gap: 8px; z-index: 3; }
#fps { position: fixed; left: calc(var(--safe-l) + 12px); top: 58px; background: rgba(0,0,0,.55); padding: 4px 8px; font-size: 13px; z-index: 3; }
#credit { position: fixed; right: calc(var(--safe-r) + 10px); bottom: 6px; font-size: 11px; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; z-index: 3; }

#places { position: fixed; inset: 0; background: rgba(8,10,14,.7); display: grid; place-items: center; z-index: 10; }
#places .panel { background: #171b22; padding: 18px; width: min(560px, 92vw); max-height: 88vh; overflow: auto; border-top: 3px solid var(--accent); }
#places h2 { margin: 0 0 12px; letter-spacing: .14em; font-size: 20px; }
#places-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
#places-list button { background: #232935; color: #fff; text-align: left; letter-spacing: .03em; }

#loading { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: var(--bg); z-index: 20; gap: 6px; }
#loading .logo { font-size: 44px; font-weight: 700; letter-spacing: .12em; } #loading .logo span { color: var(--accent); }
#loading p { margin: 0; color: #cfd6de; } #loading small { color: #889; }
#btn-door { position: relative; z-index: 3; padding: 16px 22px; font-size: 17px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
#btn-door.hidden { display: none; }
#bigmap { position: fixed; inset: 0; z-index: 9; background: #11141a; touch-action: none; }
#bigmap.hidden { display: none; }
#bigmap-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
#bm-ui { position: absolute; top: 12px; right: calc(var(--safe-r) + 12px); display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
#bm-ui .ghost { background: rgba(23,27,34,.9); color: #fff; font-size: 22px; padding: 6px 0; min-width: 52px; }
#bm-legend { position: absolute; left: calc(var(--safe-l) + 12px); bottom: 10px; background: rgba(15,18,24,.8); padding: 6px 12px; font-size: 13px; color: #dde; display: flex; align-items: center; gap: 6px; }
#bm-legend span { display: inline-block; width: 11px; height: 11px; margin-left: 8px; }
#bm-legend .me { background: #ffb020; clip-path: polygon(50% 0, 100% 100%, 0 100%); margin-left: 0; }
#bm-legend .loc { background: #2ecc71; border: 1px solid #fff; }
#bm-legend .pl { background: #fff; border-radius: 50%; border: 2px solid #ffb020; }
#btn-boat { position: relative; z-index: 3; padding: 16px 22px; font-size: 17px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.4); background: #2a7fd4; color: #fff; }
#btn-boat.hidden { display: none; }

/* ---------- juego: HUD de armas (el de Laser AR) + supervivencia ---------- */
:root { --line: rgba(255,255,255,.28); --danger: #ff3b4e; --head: #ffb020; --muted: #9aa3ad; }
#vmcv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(170,0,10,.65)); }
#vignette.hit { animation: hurt .6s ease-out; }
@keyframes hurt { 0% { opacity: 1; } 100% { opacity: 0; } }
body.low-hp #vignette { opacity: .55; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
#crosshair { position: fixed; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); pointer-events: none; z-index: 2; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.8); }
#crosshair i:nth-child(1) { left: 50%; top: 0; width: 2px; height: 12px; margin-left: -1px; }
#crosshair i:nth-child(2) { left: 50%; bottom: 0; width: 2px; height: 12px; margin-left: -1px; }
#crosshair i:nth-child(3) { top: 50%; left: 0; height: 2px; width: 12px; margin-top: -1px; }
#crosshair i:nth-child(4) { top: 50%; right: 0; height: 2px; width: 12px; margin-top: -1px; }
#crosshair b { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px #000; }
body.ads #crosshair, body.scoped #crosshair { opacity: 0; }
#hitmarker { position: fixed; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; pointer-events: none; z-index: 2; opacity: 0;
  background: linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%); }
#hitmarker.head { filter: drop-shadow(0 0 2px var(--head)) sepia(1) saturate(6) hue-rotate(-10deg); }
#hitmarker.on { animation: hm .25s ease-out; }
@keyframes hm { 0% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(1); } }
#scope { position: fixed; inset: 0; pointer-events: none; z-index: 2; display: none;
  background: radial-gradient(circle at center, transparent min(40vh, 38vw), #000 calc(min(40vh, 38vw) + 1px)); }
#scope::before, #scope::after { content: ""; position: absolute; background: rgba(0,0,0,.85); }
#scope::before { left: 0; right: 0; top: 50%; height: 1.5px; } #scope::after { top: 0; bottom: 0; left: 50%; width: 1.5px; }
body.scoped #scope { display: block; }
#survival { position: fixed; left: calc(var(--safe-l) + 12px); top: 58px; z-index: 3; width: min(260px, 34vw); pointer-events: none; display: flex; flex-direction: column; gap: 4px; }
#survival .bar { position: relative; height: 10px; background: rgba(0,0,0,.55); border: 1px solid var(--line); }
#survival .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #f1f3f5; transition: width .2s; }
#survival .bar i.low { background: var(--danger); }
#survival .bar.st { height: 4px; } #survival .bar.st i { background: #6fc3ff; }
#hp-text { position: absolute; right: -34px; top: -5px; font-weight: 700; font-size: 14px; text-shadow: 0 0 3px #000; }
#zinfo { font-size: 13px; font-weight: 600; background: rgba(15,18,24,.6); padding: 2px 8px; align-self: flex-start; max-width: min(215px, 27vw); }
#zinfo b { color: var(--accent); } #zinfo em { font-style: normal; } #zinfo em.medio { color: #ffd166; } #zinfo em.alto { color: var(--danger); }
#fps { top: 118px; }
#hud-bottom { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 3; }
#slots { display: flex; gap: 6px; align-items: flex-end; }
.slot { position: relative; width: 66px; height: 44px; padding: 3px 5px 3px 16px; color: rgba(255,255,255,.55); font: inherit; border-radius: 0; letter-spacing: 0;
  background: rgba(10,12,16,.5); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; text-align: left; overflow: hidden; opacity: .85; }
.slot.empty { width: 40px; opacity: .45; }
.slot .n { position: absolute; left: 4px; top: 2px; font-size: .65rem; font-weight: 700; color: var(--muted); }
.slot .art { display: flex; align-items: center; justify-content: center; min-height: 0; }
.slot .art svg { height: 15px; width: auto; max-width: 100%; }
.slot .name, .slot .ammo .of { display: none; }
.slot .ammo { font-size: .62rem; font-weight: 600; justify-self: end; }
.slot .ammo b { font-size: .8rem; color: rgba(255,255,255,.85); }
.slot.active { width: min(190px, 24vw); height: 56px; padding: 4px 8px 4px 20px; grid-template-columns: 1fr auto; color: #fff; background: rgba(10,12,16,.72); border-color: rgba(255,255,255,.75); opacity: 1; }
.slot.active .art { grid-column: 1 / 3; } .slot.active .art svg { height: 24px; }
.slot.active .name { display: block; font-size: .56rem; letter-spacing: .06em; font-weight: 700; align-self: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding-right: 4px; }
.slot.active .ammo { font-size: .8rem; align-self: end; } .slot.active .ammo .of { display: inline; font-style: normal; }
.slot.active .ammo b { font-size: 1.05rem; color: #fff; } .slot .ammo b.low { color: var(--danger); }
.slot.active .n { color: var(--accent); }
.slot .rl { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.slot.reloading .rl { animation: rl var(--ms) linear forwards; }
@keyframes rl { to { width: 100%; } }
.round { width: 50px; height: 50px; border-radius: 50%; background: rgba(10,12,16,.55); border: 1px solid var(--line); color: #fff; font-size: 1.35rem; font-weight: 700; padding: 0; position: relative; letter-spacing: 0; }
.round.on { border-color: var(--accent); color: var(--accent); } .round.off { opacity: .4; }
.round small { position: absolute; right: -2px; bottom: -2px; font-size: 11px; background: var(--accent); color: #1d1300; border-radius: 8px; padding: 0 5px; }
#hud-right { position: fixed; right: calc(var(--safe-r) + 112px); bottom: 18px; z-index: 3; display: grid; grid-template-columns: 50px 50px; gap: 8px; }
#btn-fire { position: fixed; right: calc(var(--safe-r) + 10px); bottom: 24px; z-index: 3; width: 92px; height: 92px; border-radius: 50%; padding: 0; touch-action: none;
  background: rgba(10,12,16,.35); border: 2px solid rgba(255,255,255,.55); display: grid; place-items: center; }
#btn-fire span { width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6b78, var(--danger) 60%, #b3101f); box-shadow: 0 0 18px rgba(255,59,78,.5); }
#btn-fire:active span { transform: scale(.9); }
#btn-fire2 { position: fixed; left: calc(var(--safe-l) + 176px); bottom: 140px; z-index: 3; width: 70px; height: 70px; border-radius: 50%; padding: 0; touch-action: none;
  background: rgba(10,12,16,.35); border: 2px solid rgba(255,255,255,.55); display: grid; place-items: center; }
#btn-fire2 span { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6b78, var(--danger) 60%, #b3101f); box-shadow: 0 0 14px rgba(255,59,78,.45); }
#btn-fire2:active span { transform: scale(.9); }
html.nofire2 #btn-fire2 { display: none !important; }
#actions { position: fixed; left: 50%; transform: translateX(-50%); bottom: 78px; z-index: 3; display: flex; gap: 10px; }
#btn-loot { padding: 14px 20px; font-size: 16px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.4); background: #2ecc71; color: #0c2a17; }
#btn-door, #btn-boat, #btn-enter { padding: 14px 20px; font-size: 16px; }
#btn-enter { background: #c9a24a; color: #2a1d05; }
#toast { position: fixed; left: 50%; top: 112px; transform: translateX(-50%); z-index: 4; background: rgba(15,18,24,.62); border-left: 2px solid #2ecc71; padding: 3px 10px; font-weight: 600; font-size: 12px; line-height: 1.3; max-width: min(46vw, 420px); text-align: center; pointer-events: none; }
#dead { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(ellipse at center, rgba(90,0,12,.6), rgba(30,0,4,.92)); }
#dead b { font-size: 40px; letter-spacing: .14em; } #dead span { font-size: 17px; } #dead small { color: #cbb; }
#joy { bottom: 30px; }

/* ---------- menú y modos ---------- */
#menu, #pause { position: fixed; inset: 0; z-index: 12; display: flex; align-items: center; padding-left: calc(var(--safe-l) + 6vw);
  background: linear-gradient(90deg, rgba(10,12,16,.92) 0%, rgba(10,12,16,.7) 42%, rgba(10,12,16,0) 75%); }
#pause { background: rgba(8,10,14,.75); justify-content: center; padding: 0; }
.mpanel { width: min(380px, 86vw); display: flex; flex-direction: column; gap: 9px; max-height: 96vh; overflow: auto; }
.mpanel .logo { font-size: 46px; font-weight: 700; letter-spacing: .12em; line-height: 1; } .mpanel .logo span { color: var(--accent); }
.mpanel h2 { margin: 0; letter-spacing: .14em; font-size: 24px; }
.mpanel .tag { margin: 0 0 4px; color: #cfd6de; font-size: 15px; }
.mpanel .name { display: flex; flex-direction: column; gap: 4px; font-size: 12px; letter-spacing: .12em; color: #aab; }
.mpanel input { font: 700 18px Rajdhani, system-ui, sans-serif; padding: 9px 12px; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; letter-spacing: .06em; }
.mpanel button.big { padding: 13px; font-size: 18px; } .mpanel button.alt { background: #2ecc71; color: #0c2a17; }
.mpanel .join { display: flex; gap: 8px; } .mpanel .join input { width: 9em; text-transform: uppercase; text-align: center; letter-spacing: .3em; } .mpanel .join button { flex: 1; }
.mpanel .err { color: #ff6b78; margin: 0; min-height: 1em; font-size: 14px; }
.mpanel .ver { color: #778; margin-top: 4px; }
.mpanel .code { font-size: 54px; font-weight: 700; letter-spacing: .3em; color: var(--accent); line-height: 1; }
#m-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#m-players li { background: rgba(255,255,255,.07); padding: 6px 10px; font-weight: 600; font-size: 16px; border-left: 3px solid #2ecc71; }
#m-players li.host::after { content: " · anfitrión"; color: var(--accent); font-size: 13px; }
body.menu #hud, body.menu #top, body.menu #buttons, body.menu #joy, body.menu #look, body.menu #vmcv, body.menu #crosshair, body.menu #survival, body.menu #hud-bottom, body.menu #hud-right, body.menu #btn-fire, body.menu #btn-fire2, body.menu #actions, body.menu #credit, body.menu #toast { display: none !important; }
body.paseo #vmcv, body.paseo #crosshair, body.paseo #survival, body.paseo #hud-bottom, body.paseo #hud-right, body.paseo #btn-fire, body.paseo #btn-fire2, body.paseo #btn-loot, body.paseo #btn-revive, body.paseo #vignette { display: none !important; }
body:not(.paseo) #btn-places { display: none; }
body.paseo #fps { top: 58px; }
#btn-menu { font-size: 18px; padding: 8px 14px; }
#btn-revive { padding: 14px 20px; font-size: 16px; border-radius: 8px; background: #3ea6ff; color: #04223d; }
#down { position: fixed; left: 50%; top: 28%; transform: translateX(-50%); z-index: 4; text-align: center; background: rgba(90,0,12,.75); padding: 10px 18px; pointer-events: none; }
#down b { display: block; font-size: 22px; letter-spacing: .12em; } #down span { font-size: 15px; }
#netstat { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5; background: rgba(160,60,0,.85); padding: 4px 12px; font-weight: 700; }

/* ---------- v1.0: extracción, refugio y resultado ---------- */
#raidbar { position: fixed; left: 50%; top: 62px; max-width: 280px; transform: translateX(-50%); z-index: 4; text-align: center; background: rgba(12,15,20,.55); border: 1px solid rgba(255,255,255,.14); padding: 2px 10px 3px; pointer-events: none; }
#raidbar b { display: block; font-size: 13px; letter-spacing: .04em; } #raidbar small { color: #c9d1d9; font-size: 10px; }
#raidbar.open { border-color: #2ecc71; } #raidbar.open b { color: #6dffa0; } #raidbar.urgent b { color: #ff6b78; }
#raidbar.calling { border-color: #2ecc71; background: rgba(10,60,30,.8); } #raidbar.calling b { font-size: 14px; color: #6dffa0; }
#raidbar .arrow { display: inline-block; font-style: normal; color: #2ecc71; }
#btn-extract { padding: 14px 22px; font-size: 17px; border-radius: 8px; background: #2ecc71; color: #0c2a17; box-shadow: 0 0 22px rgba(46,204,113,.6); animation: pulse 1.2s ease-in-out infinite; }
#toast b { font-weight: 700; }
.mpanel.wide { width: min(560px, 90vw); }
.ref-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ref-top .scrap { font-size: 24px; font-weight: 700; color: var(--accent); } .ref-top .scrap small { font-size: 13px; color: #cbb; }
.ref-top .st { font-size: 13px; color: #aab; }
.mpanel .lbl { color: #9aa3ad; letter-spacing: .04em; }
.stash { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 34vh; overflow: auto; }
.stash .w { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); border-bottom: 3px solid var(--c); color: #fff; font-size: 12px; letter-spacing: 0; position: relative; }
.stash .w .art svg { height: 18px; width: auto; } .stash .w em { position: absolute; right: 5px; top: 3px; font-style: normal; color: #ccd; font-size: 11px; }
.stash .w.on { background: rgba(46,204,113,.25); border-color: #2ecc71; }
.stash .empty { grid-column: 1 / -1; margin: 0; color: #aab; font-size: 14px; }
.mpanel .warn { color: #ffb3b3; font-size: 13px; }
#result { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(90,0,12,.6), rgba(25,0,4,.94)); }
#result.ok { background: radial-gradient(ellipse at center, rgba(8,70,35,.65), rgba(2,20,10,.95)); }
#result .rbox { width: min(560px, 90vw); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
#res-title { font-size: 40px; letter-spacing: .14em; } #result.ok #res-title { color: #6dffa0; } #res-sub { color: #dde; }
#res-items { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-height: 30vh; overflow: auto; }
#res-items .chip { border: 1px solid var(--c); color: var(--c); background: rgba(0,0,0,.35); padding: 3px 8px; font-weight: 600; font-size: 13px; }
#res-stats { display: flex; gap: 18px; color: #cdd; font-size: 14px; } #res-stats b { color: #fff; }
#res-scrap { font-size: 44px; font-weight: 700; color: var(--accent); line-height: 1; } #res-scrap small { font-size: 16px; }
#res-total { color: #bbb; } #res-back { margin-top: 6px; padding: 12px 26px; }

/* ---------- v1.1: tienda del refugio e insumos ---------- */
#quick { position: fixed; right: calc(var(--safe-r) + 112px); bottom: 134px; z-index: 3; display: flex; flex-direction: row; gap: 8px; }
#quick .qk { width: 46px; height: 46px; font-size: 1.15rem; border-color: #c8a45a; }
body.menu #quick, body.paseo #quick { display: none !important; }
.ref-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ref-tabs button { flex: 1; padding: 7px 4px; font-size: 13px; letter-spacing: .06em; background: transparent; border: 1px solid rgba(255,255,255,.25); color: #cdd; }
.ref-tabs button.on { background: var(--accent); color: #1d1300; border-color: transparent; }
.ref-msg { min-height: 1.1em; margin: 0; color: #6dffa0; font-weight: 600; font-size: 14px; } .ref-msg.bad { color: #ff8a94; }
.ref-body { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.stash .w { cursor: pointer; } .stash .w .ic { font-size: 20px; }
.stash .sell { font-size: 10px; padding: 2px 6px; margin-top: 2px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #ffcf6b; letter-spacing: 0; }
.shop2 { display: grid; grid-template-columns: 170px 1fr; gap: 8px; }
.glist { display: flex; flex-direction: column; gap: 3px; max-height: 46vh; overflow: auto; }
.glist button { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px; padding: 4px 6px; font-size: 12px; letter-spacing: 0; text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-left: 3px solid var(--c, #888); color: #fff; }
.glist button svg { height: 13px; width: auto; } .glist button b { color: var(--accent); } .glist button.on { background: rgba(255,255,255,.16); }
.gview { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
#ref-cv { width: 100%; height: min(24vh, 150px); border: 1px solid rgba(255,255,255,.15); display: block; }
.gv-name { font-weight: 700; font-size: 18px; } .gv-name small { font-size: 12px; opacity: .8; }
.gv-txt { font-size: 12px; color: #ccd; line-height: 1.35; } .gv-txt em { color: #9aa3ad; font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: .1em; }
.gv-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-size: 10px; color: #9aa3ad; letter-spacing: .08em; }
.gv-meters i { display: block; position: relative; height: 5px; background: rgba(255,255,255,.12); } .gv-meters b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.gv-meters s { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; }
.gview .big { padding: 10px; font-size: 15px; }
.swatches, .jackets { display: flex; flex-wrap: wrap; gap: 5px; }
.sw, .jk { width: 38px; height: 30px; padding: 0; border: 2px solid rgba(255,255,255,.2); color: #fff; font-size: 13px; text-shadow: 0 0 3px #000; position: relative; }
.sw small, .jk small { position: absolute; bottom: -1px; right: 1px; font-size: 9px; } .sw.sel, .jk.sel { border-color: #fff; }
.ups { display: flex; flex-direction: column; gap: 5px; }
.up { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: rgba(255,255,255,.05); border-left: 3px solid var(--c); padding: 6px 8px; }
.up b { display: block; font-size: 14px; } .up small { display: block; color: #cdd; font-size: 12px; } .up em { display: block; color: #9aa3ad; font-size: 11px; font-style: normal; }
.up .pips { display: flex; gap: 3px; margin-top: 3px; } .up .pips i { width: 14px; height: 5px; background: rgba(255,255,255,.15); } .up .pips i.f { background: var(--c); }
.up button { white-space: nowrap; padding: 8px 10px; font-size: 12px; letter-spacing: .04em; } .up button.alt { background: #2ecc71; color: #0c2a17; } .up button[disabled] { opacity: .5; }

#menu.ref { background: rgba(10,12,16,.9); }
#m-refugio h2 { font-size: 19px; } #m-refugio > .tag { font-size: 13px; margin: 0; }
#m-refugio { max-height: 98vh; gap: 6px; } #m-refugio .big { padding: 10px; }
.ref-body { max-height: calc(100vh - 230px); }
.ref-go { display: flex; gap: 8px; } .ref-go #m-go { flex: 1; } .ref-go #m-ref-back { padding: 0 16px; }
.ref-body { max-height: calc(100vh - 190px); }

/* Protocolo Ceniza: destello blanco del impacto final */
#flash { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: #fffdf4; opacity: 0; }
#flash.go { animation: ashflash 3.2s ease-out forwards; }
@keyframes ashflash { 0% { opacity: 0; } 4% { opacity: 1; } 45% { opacity: .95; background: #fff4d8; } 100% { opacity: 0; background: #b0a898; } }
/* nombre obligatorio */
#m-name.need { border-color: #e74c3c !important; box-shadow: 0 0 0 2px rgba(231,76,60,.45); animation: needShake .35s; }
#m-name.need::placeholder { color: #ff8a7a; }
@keyframes needShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- mochila / inventario ---------- */
#btn-inv { pointer-events: auto; align-self: flex-start; font: 700 12px system-ui; letter-spacing: .06em; color: #fff; background: rgba(15,18,24,.72); border: 1px solid rgba(255,176,32,.55); border-radius: 8px; padding: 6px 10px; display: flex; gap: 6px; align-items: center; }
#btn-inv small { color: var(--accent); font-weight: 800; }
#btn-inv.full { border-color: var(--danger); } #btn-inv.full small { color: var(--danger); }
body.menu #btn-inv, body.paseo #btn-inv { display: none !important; }
#inv { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(8,10,14,.72); backdrop-filter: blur(3px); }
#inv .ibox { width: min(720px, 94vw); max-height: 88vh; overflow: auto; background: #161a21; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 14px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#inv .ihead { display: flex; align-items: center; gap: 10px; position: sticky; top: -12px; background: #161a21; padding: 4px 0 8px; z-index: 1; }
#inv .ihead b { font-size: 18px; letter-spacing: .14em; color: var(--accent); }
#inv .ihead span { flex: 1; font-size: 12px; color: var(--muted); }
#inv-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: #222833; color: #fff; font-size: 16px; }
#inv h4 { margin: 12px 0 6px; font-size: 11px; letter-spacing: .16em; color: var(--muted); font-weight: 700; }
#inv .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
#inv .it { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 10px; background: #1f2530; border: 1px solid rgba(255,255,255,.08); border-left: 4px solid var(--c, #6b7280); font-size: 13px; color: #e9edf2; }
#inv .it.on { outline: 2px solid var(--accent); }
#inv .it .art { height: 30px; display: block; } #inv .it .art svg { height: 100%; width: auto; max-width: 100%; }
#inv .it small { color: var(--muted); font-size: 11px; }
#inv .it .v { color: var(--accent); font-weight: 800; }
#inv .it button { margin-top: 4px; align-self: flex-start; font: 700 11px system-ui; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); background: #2a3140; color: #fff; }
#inv .it button.drop { border-color: rgba(255,59,78,.5); color: #ff8a95; }
#inv .row { display: flex; flex-wrap: wrap; gap: 8px; }
#inv .chip2 { padding: 6px 10px; border-radius: 8px; background: #1f2530; font-size: 13px; border: 1px solid rgba(255,255,255,.08); }
#inv .chip2 b { color: var(--accent); }
#inv .empty { color: var(--muted); font-size: 13px; font-style: italic; }
#inv .tip { margin-top: 12px; font-size: 11px; color: var(--muted); }

/* modos online */
.mpanel button.big small { display: block; font-size: 10px; letter-spacing: .08em; opacity: .75; font-weight: 600; }
#m-refugio .online-only { display: none; color: #ffb020; } #m-refugio.online .online-only { display: block; }
#m-oerr:empty { display: none; }

/* botón CORRER: arriba a la derecha del joystick (se prende y se apaga solo al detenerte) */
#btn-run { position: fixed; left: calc(var(--safe-l) + 75px); bottom: 178px; z-index: 3; width: 58px; height: 58px; font-size: 1.7rem; line-height: 1; }
#btn-run small { right: auto; left: 50%; bottom: -9px; transform: translateX(-50%); font-size: 9px; padding: 0 4px; background: rgba(10,12,16,.75); color: #fff; }
#btn-run.on small { background: var(--accent); color: #1d1300; }
body.menu #btn-run { display: none; }
#btn-jump { position: fixed; right: calc(var(--safe-r) + 28px); bottom: 134px; z-index: 3; width: 56px; height: 56px; font-size: 1.6rem; line-height: 1; }
#btn-jump small { right: auto; left: 50%; bottom: -9px; transform: translateX(-50%); font-size: 9px; padding: 0 4px; background: rgba(10,12,16,.75); color: #fff; }
body.menu #btn-jump { display: none; }

/* PC: controles de teclado y mouse; se esconden los táctiles */
body.pc #joy, body.pc #btn-fire, body.pc #btn-fire2, body.pc #btn-run, body.pc #btn-jump, body.pc #hud-right { display: none !important; }
#pc-hint { position: fixed; left: 50%; top: 58%; transform: translateX(-50%); z-index: 6; background: rgba(10,12,16,.82); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 22px; color: #fff; text-align: center; cursor: pointer; max-width: min(92vw, 720px); }
#pc-hint b { display: block; font-size: 18px; color: var(--accent); letter-spacing: .06em; margin-bottom: 6px; } #pc-hint small { font-size: 12px; line-height: 1.6; opacity: .9; }
body.locked { cursor: none; }
body.pc.locked.paseo #crosshair { display: block !important; } /* en el paseo también hay mira al capturar el mouse */
