/* FELIZ CITY · estilos (atardecer marplatense: rosa, naranja y azul mar) */
:root { --sea: #0b2a4a; --ink: #0b1a2e; --sun: #ff8a3d; --pink: #ff4fa3; --gold: #ffd21f; --cyan: #6ee7ff; --white: #f7f4ee; --glass: rgba(10, 18, 34, 0.72); --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1a2e; color: var(--white); font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 10px 16px; background: rgba(255,255,255,0.12); color: var(--white); font-weight: 700; }
button:hover { background: rgba(255,255,255,0.2); }
.cta { background: linear-gradient(180deg, #ff9a4a, #ff4fa3); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); box-shadow: 0 6px 20px rgba(255,79,163,0.35); }
.cta:hover { filter: brightness(1.08); background: linear-gradient(180deg, #ffa860, #ff62ae); }
.danger { background: rgba(200, 40, 40, 0.35); }
select { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: 7px 10px; }

/* Logo (arte del dueño, assets/brand) */
.logo { position: relative; }
.logo-img { display: block; width: min(560px, 86vw); height: auto; filter: drop-shadow(0 10px 28px rgba(0,0,0,0.55)); }
#boot .logo-img { width: min(420px, 78vw); }
.beta { position: absolute; right: 2%; top: 4%; transform: rotate(8deg); background: linear-gradient(180deg, #ff4fa3, #d0206e); color: #fff; font: 900 clamp(13px, 2.6vw, 20px)/1 "Arial Black", system-ui; padding: 6px 12px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.45); letter-spacing: 0.08em; }
.sub { margin: -6px 0 0; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; font-size: 13px; text-shadow: 0 2px 6px rgba(0,0,0,0.8); }
@media (max-width: 480px) { .chars { gap: 8px; } .char { width: 27vw; padding: 6px; } .char img { width: 20vw; height: 20vw; } .pitch { font-size: 13px; } #title { gap: 12px; } #play { padding: 12px 36px; } }
@media (max-height: 640px) { #title .logo-img { width: min(360px, 60vw); } .pitch { display: none; } }
/* Logo de texto (respaldo) */
.logo { display: flex; flex-direction: column; align-items: center; line-height: 0.86; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5)); }
.logo .l1, .logo .l2 { font: 900 clamp(46px, 11vw, 96px)/0.9 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: 0.02em; background: linear-gradient(180deg, #ffe08a 0%, #ff9a4a 45%, #ff4fa3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px rgba(20, 10, 40, 0.55); }
.logo .l2 { background: linear-gradient(180deg, #8ef0ff 0%, #2fb6e8 55%, #1b5fa8 100%); -webkit-background-clip: text; background-clip: text; }
.logo .l3 { margin-top: 10px; font-weight: 800; letter-spacing: 0.32em; font-size: clamp(11px, 2.6vw, 15px); color: #fff; opacity: 0.9; }

/* Pantallas */
#boot, #title { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px calc(24px + var(--safe-b)); text-align: center; }
#boot { background: radial-gradient(ellipse at 50% 120%, #ff8a3d 0%, #b0306a 35%, #1a1a4a 70%, #0b1a2e 100%); z-index: 30; }
body[data-screen="title"] #boot, body[data-screen="game"] #boot { display: none; }
body[data-screen="loading"] #boot { display: flex; }
.bar { width: min(420px, 80vw); height: 8px; border-radius: 8px; background: rgba(255,255,255,0.18); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--pink)); transition: width 0.3s; }
#title { display: none; z-index: 20; background: linear-gradient(180deg, rgba(11,26,46,0.15) 0%, rgba(11,26,46,0.35) 40%, rgba(11,26,46,0.9) 100%); overflow-y: auto; justify-content: flex-start; }
#title > .logo { margin-top: auto; }
body[data-screen="title"] #title { display: flex; }
.pitch { max-width: 560px; margin: 0; font-size: 15px; opacity: 0.95; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.chars { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.char { width: 116px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--glass); border: 2px solid transparent; }
.char img { width: 96px; height: 96px; object-fit: contain; }
.char.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,210,31,0.25); }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
#play { font-size: 22px; padding: 14px 44px; letter-spacing: 0.08em; }
.help { max-width: 620px; background: var(--glass); border-radius: 12px; padding: 8px 14px; text-align: left; font-size: 13px; }
.help summary { cursor: pointer; font-weight: 800; }
.credits { font-size: 11px; opacity: 0.7; max-width: 620px; margin: 0; }

/* HUD */
#hud, #touch { display: none; }
body[data-screen="game"] #hud { display: block; }
#hud > * { position: fixed; z-index: 10; pointer-events: none; }
#hud-tr { top: calc(10px + var(--safe-t)); right: 12px; text-align: right; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
#hud-clock { font-weight: 800; font-size: 15px; opacity: 0.9; }
#hud-money { font: 900 26px/1.1 "Arial Black", system-ui, sans-serif; color: #7dffa0; -webkit-text-stroke: 1px #063; }
#hud-money.pop { animation: pop 0.5s; }
@keyframes pop { 40% { transform: scale(1.25); } }
#hud-stars { font-size: 24px; letter-spacing: 2px; }
#hud-stars i { font-style: normal; color: rgba(255,255,255,0.22); -webkit-text-stroke: 1px rgba(0,0,0,0.6); }
#hud-stars i.on { color: var(--gold); }
#hud-stars.flash i.on { animation: blink 0.6s infinite; }
@keyframes blink { 50% { color: #fff; } }
#hud-title { top: 18%; left: 0; right: 0; text-align: center; font: 900 clamp(22px, 5vw, 40px)/1 "Arial Black", system-ui; color: var(--gold); text-shadow: 0 3px 0 #000, 0 0 20px rgba(0,0,0,0.6); opacity: 0; }
#hud-title.show { animation: titleIn 3.5s forwards; }
@keyframes titleIn { 0% { opacity: 0; transform: translateY(10px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
#hud-obj { top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); max-width: min(640px, 64vw); padding: 8px 14px; background: var(--glass); border-radius: 12px; font-weight: 700; text-align: center; border-left: 4px solid var(--gold); }
#hud-obj.new { animation: objIn 1.6s; }
@keyframes objIn { 0%, 30%, 60% { background: rgba(255, 210, 31, 0.55); } 15%, 45%, 100% { background: var(--glass); } }
#hud-extra { top: calc(64px + var(--safe-t)); left: 50%; transform: translateX(-50%); padding: 4px 12px; background: rgba(0,0,0,0.55); border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--cyan); }
#hud-timer { top: calc(96px + var(--safe-t)); left: 50%; transform: translateX(-50%); font: 900 30px/1 "Arial Black", system-ui; color: #fff; text-shadow: 0 2px 0 #000; }
#hud-timer.low { color: #ff5a5a; animation: blink 0.8s infinite; }
#toasts { top: calc(112px + var(--safe-t)); left: 12px; display: flex; flex-direction: column; gap: 6px; max-width: min(380px, 70vw); }
.toast { background: var(--glass); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; animation: tin 0.3s; transition: opacity 0.5s; border-left: 3px solid var(--pink); }
.toast.out { opacity: 0; }
@keyframes tin { from { transform: translateX(-20px); opacity: 0; } }
#hud-bl { left: 12px; bottom: calc(12px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#minimap { width: 180px; height: 180px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,0.55), 0 6px 18px rgba(0,0,0,0.5); }
#hud-street { font-weight: 800; font-size: 14px; text-shadow: 0 2px 3px #000; opacity: 0; max-width: 220px; text-align: center; }
#hud-street.show { animation: street 5s forwards; }
@keyframes street { 0% { opacity: 0; } 8%, 80% { opacity: 1; } 100% { opacity: 0.55; } }
#hud-speed { right: 16px; bottom: calc(14px + var(--safe-b)); text-align: right; display: none !important; text-shadow: 0 2px 4px #000; }
body[data-mode="car"] #hud-speed { display: block !important; }
#hud-speed b { font: 900 46px/1 "Arial Black", system-ui; }
#hud-speed small { margin-left: 4px; font-weight: 800; opacity: 0.8; }
#hud-dmg { width: 120px; height: 6px; margin: 4px 0 4px auto; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; }
#hud-dmg i { display: block; height: 100%; background: linear-gradient(90deg, #ff4a4a, #ffd21f, #7dffa0); }
#hud-car { font-weight: 800; }
#hud-radio { font-size: 13px; color: var(--cyan); }
#prompt { left: 50%; bottom: calc(26% + var(--safe-b)); transform: translateX(-50%); background: var(--glass); padding: 8px 16px; border-radius: 22px; font-weight: 800; border: 2px solid var(--gold); }
#prompt:empty { display: none; }
#big { left: 0; right: 0; top: 34%; text-align: center; display: flex; flex-direction: column; gap: 6px; }
#big b { font: 900 clamp(30px, 8vw, 64px)/1 "Arial Black", Impact, system-ui; color: var(--gold); -webkit-text-stroke: 2px #000; text-shadow: 0 4px 0 #000; }
#big span { font-weight: 800; font-size: 18px; text-shadow: 0 2px 3px #000; }
#big.show { animation: bigIn 0.4s ease-out; }
@keyframes bigIn { from { transform: scale(1.5); opacity: 0; } }
#flash { inset: 0; background: #fff; opacity: 0; }
#flash.on { animation: flash 0.5s; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
#btn-pause, #btn-map { pointer-events: auto !important; top: calc(10px + var(--safe-t)); width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--glass); font-size: 18px; }
#btn-pause { left: 12px; }
#btn-map { left: 62px; }

/* Táctil */
body[data-screen="game"] #touch { display: block; }
@media (hover: hover) and (pointer: fine) { body[data-screen="game"] #touch { display: none; } }
#touch > * { position: fixed; z-index: 9; }
#stick-zone { left: 0; top: 30%; bottom: 0; width: 45%; }
#look-zone { right: 0; top: 18%; bottom: 0; width: 55%; }
#stick { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.25); pointer-events: none; opacity: 0; left: 90px; top: calc(100% - 120px); transition: opacity 0.2s; }
#stick.on { opacity: 1; }
#stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,0.45); }
.pad { right: 14px; bottom: calc(14px + var(--safe-b)); display: none; grid-template-columns: repeat(3, 64px); gap: 10px; justify-items: center; align-items: center; z-index: 11 !important; }
body[data-mode="foot"] .pad.foot, body[data-mode="car"] .pad.car { display: grid; }
.tbtn { width: 62px; height: 62px; border-radius: 50%; padding: 0; background: rgba(10, 18, 34, 0.55); border: 2px solid rgba(255,255,255,0.3); font-size: 13px; font-weight: 800; touch-action: none; }
.tbtn.big { width: 76px; height: 76px; font-size: 14px; }
.tbtn.down { background: rgba(255,210,31,0.5); transform: scale(0.94); }
.tbtn.gas { background: rgba(60, 200, 110, 0.45); font-size: 26px; grid-row: span 2; }
.tbtn.brake { background: rgba(230, 70, 70, 0.4); font-size: 22px; }
.tbtn.use { border-color: var(--gold); opacity: 0.45; }
body.can-use .tbtn.use { opacity: 1; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,210,31,0.25); } }
body[data-mode="car"] #hud-speed { bottom: calc(190px + var(--safe-b)); }
@media (hover: hover) and (pointer: fine) { body[data-mode="car"] #hud-speed { bottom: calc(14px + var(--safe-b)); } }

/* Pausa y mapa */
#pause, #bigmap { position: fixed; inset: 0; z-index: 40; background: rgba(6, 12, 24, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
#pause[hidden], #bigmap[hidden] { display: none; }
.card { width: min(420px, 100%); background: #0f2038; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.card h2 { margin: 0; font: 900 28px "Arial Black", system-ui; color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 8px; text-align: center; }
.stats small { display: block; opacity: 0.7; font-size: 11px; }
.stats b { font-size: 18px; }
#bigmap { padding: 0; }
#bigmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.mapbar { position: absolute; right: 14px; bottom: calc(14px + var(--safe-b)); display: flex; gap: 8px; }
.mapbar button { min-width: 48px; }
@media (max-width: 640px) {
  #minimap { width: 128px; height: 128px; }
  #hud-obj { font-size: 13px; max-width: 70vw; padding: 6px 10px; top: calc(60px + var(--safe-t)); }
  #hud-extra { top: calc(108px + var(--safe-t)); }
  #hud-timer { top: calc(136px + var(--safe-t)); }
  #toasts { top: calc(150px + var(--safe-t)); left: 8px; max-width: 62vw; }
  .toast { font-size: 12.5px; padding: 6px 10px; }
  .toast:nth-child(n+3) { display: none; }
  body[data-mode="car"] #hud-speed { top: calc(60px + var(--safe-t)); left: 12px; right: auto; bottom: auto !important; text-align: left; }
  body[data-mode="car"] #hud-speed b { font-size: 30px; }
  #hud-dmg { margin: 2px 0; width: 90px; }
  #hud-title { top: 24%; }
  #big { top: 40%; }
  #hud-money { font-size: 21px; }
}

/* ---- Vida, chaleco, arma, estados, mira y resistencia */
.age { margin: 0; max-width: 560px; font-size: 12.5px; background: rgba(0,0,0,0.45); border-radius: 10px; padding: 6px 10px; }
.age b { background: #c62828; border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
#hud-bars { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; margin-top: 4px; }
#hud-bars .bar { width: 150px; height: 9px; border-radius: 5px; background: rgba(0,0,0,0.5); box-shadow: 0 0 0 1.5px rgba(0,0,0,0.6); }
#hud-bars .bar i { transition: width 0.25s; }
#hud-bars .hp i { background: linear-gradient(90deg, #ff3b3b, #7dffa0); }
#hud-bars .hp.low i { animation: blink 0.7s infinite; }
#hud-bars .ar { height: 6px; }
#hud-bars .ar i { background: linear-gradient(90deg, #3a8bff, #9fd0ff); }
#hud-bars .ar.none { display: none; }
#hud-weapon { margin-top: 6px; display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-weight: 800; }
#hud-weapon .ic { font-size: 20px; }
#hud-weapon b { font-size: 13px; opacity: 0.9; }
#hud-weapon small { font: 900 18px/1 "Arial Black", system-ui; color: var(--gold); }
#hud-weapon.empty small { color: #ff6a6a; }
#hud-status { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; margin-top: 5px; max-width: 220px; margin-left: auto; }
#hud-status span, .chips span { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 8px; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 0.04em; }
.st-mareado { color: #9dff7a; } .st-en-pedo, .st-muy-en-pedo { color: #ffc35a; } .st-rescatado { color: #8ee8ff; } .st-bajón { color: #c0a0ff; } .st-herido { color: #ff6a6a; }
#crosshair { left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: none; }
body.aiming #crosshair { display: block; }
#crosshair::before, #crosshair::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
#crosshair::before { left: 12px; top: 2px; width: 2px; height: 22px; }
#crosshair::after { top: 12px; left: 2px; height: 2px; width: 22px; }
#crosshair i { position: absolute; inset: 9px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.85); }
body.locked-on #crosshair::before, body.locked-on #crosshair::after { background: #ff4a4a; }
#hud-stamina { left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: 120px; height: 5px; border-radius: 3px; background: rgba(0,0,0,0.45); overflow: hidden; opacity: 0; transition: opacity 0.4s; }
#hud-stamina.on { opacity: 1; }
#hud-stamina i { display: block; height: 100%; background: linear-gradient(90deg, #ffd21f, #ffffff); }
#hurt { inset: 0; opacity: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(200,0,0,0.75) 100%); transition: opacity 0.5s; }
#hurt.on { opacity: 1; transition: opacity 0.05s; }
#hurt.low { opacity: 0.55; animation: pulseHurt 1.2s infinite; }
@keyframes pulseHurt { 50% { opacity: 0.25; } }
#fade { inset: 0; background: #000; opacity: 0; transition: opacity 1.2s; }
#fade.on { opacity: 1; }
#scene.fx-high { filter: saturate(1.7) hue-rotate(var(--hue, 0deg)) contrast(1.05); }
#scene.fx-drunk { filter: blur(var(--blur, 0.6px)) saturate(1.15); }
#scene.fx-high.fx-drunk { filter: saturate(1.6) hue-rotate(var(--hue, 0deg)) blur(var(--blur, 0.6px)); }
#scene.fx-coke { filter: contrast(1.22) saturate(1.25) brightness(1.06); }
.tbtn.fire { background: rgba(230, 70, 70, 0.45); font-size: 26px; }
.pad.foot { grid-template-columns: repeat(4, 58px); }
.pad.foot .tbtn { width: 56px; height: 56px; font-size: 12px; }
.pad.foot .tbtn.big { width: 70px; height: 70px; grid-row: span 2; font-size: 28px; }

/* ---- Inventario, negocios y gimnasio */
.overlay { position: fixed; inset: 0; z-index: 42; background: rgba(6, 12, 24, 0.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.card.wide { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.card h3 { margin: 6px 0 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.sub2 { margin: -4px 0 0; opacity: 0.8; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.item { display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,0.06); border-radius: 12px; padding: 10px; }
.item .t { font-weight: 800; }
.item .t span { font-size: 20px; margin-right: 4px; }
.item small { opacity: 0.75; font-size: 12px; }
.item button { padding: 7px 10px; font-size: 13px; }
.item.sel { outline: 2px solid var(--gold); }
.empty-msg { opacity: 0.6; font-size: 13px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.row-buy { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border-radius: 12px; padding: 9px 12px; }
.row-buy .t { flex: 1; font-weight: 700; }
.row-buy .t small { display: block; font-weight: 500; opacity: 0.7; font-size: 12px; }
.row-buy .p { font-weight: 900; color: #7dffa0; min-width: 64px; text-align: right; }
.row-buy button { padding: 8px 14px; }
.row-buy.off { opacity: 0.5; }
.meter { position: relative; height: 26px; border-radius: 13px; background: rgba(255,255,255,0.12); overflow: hidden; }
.meter .zone { position: absolute; top: 0; bottom: 0; left: 42%; width: 16%; background: rgba(90, 220, 120, 0.7); }
.meter .needle { position: absolute; top: -2px; bottom: -2px; width: 5px; margin-left: -2px; background: #fff; box-shadow: 0 0 6px #000; left: 0; }
#gym-count { font: 900 22px "Arial Black", system-ui; text-align: center; color: var(--gold); }
#gym-tap { font-size: 20px; padding: 16px; }
@media (max-width: 640px) {
  #hud-bars .bar { width: 110px; }
  #hud-weapon b { display: none; }
  .pad.foot { grid-template-columns: repeat(4, 52px); gap: 8px; }
  .pad.foot .tbtn { width: 50px; height: 50px; font-size: 11px; }
  .pad.foot .tbtn.big { width: 62px; height: 62px; }
}

/* Siluetas de armas y gimnasio a la vista */
#hud-weapon .ic svg, .wsvg svg, .tbtn.fire svg { width: 30px; height: 15px; fill: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.8)); vertical-align: middle; }
.tbtn.fire svg { width: 40px; height: 20px; }
.wsvg svg { fill: var(--gold); }
#gym.overlay { background: linear-gradient(180deg, rgba(6,12,24,0) 45%, rgba(6,12,24,0.55) 100%); align-items: flex-end; padding-bottom: calc(18px + var(--safe-b)); }
#gym .card { width: min(380px, 100%); padding: 12px 14px; gap: 6px; }
#gym .card h2 { font-size: 22px; }
#gym .card p { margin: 0; font-size: 13px; }

.pad.foot .tbtn.icon { font-size: 24px; }
#btn-photo { pointer-events: auto !important; top: calc(10px + var(--safe-t)); left: 112px; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--glass); font-size: 18px; }

/* Modo online */
.online-row input { width: 190px; padding: 11px 14px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.45); color: #fff; font: inherit; font-weight: 700; user-select: text; -webkit-user-select: text; }
.online-row input:focus { outline: none; border-color: var(--gold); }
#play-online { font-size: 20px; padding: 12px 30px; letter-spacing: 0.06em; }
#hud-net { font-weight: 900; font-size: 12px; background: rgba(0,0,0,0.55); border-radius: 10px; padding: 2px 8px; display: inline-block; margin-bottom: 2px; }
#btn-chat { pointer-events: auto !important; top: calc(10px + var(--safe-t)); left: 162px; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--glass); font-size: 18px; display: none; }
body.net-on #btn-chat { display: block; }
#chat { position: fixed; z-index: 41; left: 12px; bottom: calc(210px + var(--safe-b)); }
#chat .chatgrid { display: grid; grid-template-columns: repeat(2, minmax(120px, 170px)); gap: 6px; background: rgba(6,12,24,0.8); padding: 8px; border-radius: 14px; }
#chat button { padding: 8px 10px; font-size: 13px; text-align: left; }
.toplist { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.toplist div { display: flex; justify-content: space-between; background: rgba(255,255,255,0.06); border-radius: 8px; padding: 4px 8px; }
.toplist div span:last-child { color: var(--gold); font-weight: 800; }
@media (max-width: 640px) { #chat { bottom: calc(150px + var(--safe-b)); } }
