:root { --s: 2; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: #fff; user-select: none; -webkit-user-select: none;
  font-family: 'Press Start 2P', 'Courier New', monospace; font-size: calc(var(--s) * 6px); line-height: 1.35; }
img { image-rendering: pixelated; -webkit-user-drag: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; transition: filter .4s; }
#game.blur { filter: blur(5px) brightness(.85); transform: scale(1.04); }
.sh, .mc-btn, .title, .glabel-w { text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }

/* ---------- overlays ---------- */
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%); z-index: 1; }
#overlay-water { position: fixed; inset: 0; pointer-events: none; background: rgba(20, 50, 160, .22); opacity: 0; z-index: 2; }
#overlay-fire { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 2; background: linear-gradient(to top, rgba(255,120,0,.55) 0%, rgba(255,60,0,.25) 22%, transparent 40%); }
#overlay-hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 2; background: radial-gradient(ellipse at center, transparent 40%, rgba(200,0,0,.8) 100%); }
#overlay-pumpkin { position: fixed; inset: 0; pointer-events: none; opacity: 0; }
#overlay-black { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: #000; z-index: 3; }

/* ---------- HUD ---------- */
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud { position: absolute; inset: 0; }
#crosshair { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 9px); height: calc(var(--s) * 9px); transform: translate(-50%, -50%); mix-blend-mode: difference; }
#crosshair::before, #crosshair::after { content: ''; position: absolute; background: #ddd; }
#crosshair::before { left: 0; right: 0; top: calc(50% - var(--s) * 0.5px); height: calc(var(--s) * 1px); }
#crosshair::after { top: 0; bottom: 0; left: calc(50% - var(--s) * 0.5px); width: calc(var(--s) * 1px); }
#attack-ind { position: absolute; left: 50%; top: calc(50% + var(--s) * 9px); width: calc(var(--s) * 16px); height: calc(var(--s) * 4px); transform: translateX(-50%); background: rgba(40,40,40,.7); border: calc(var(--s) * 1px) solid rgba(0,0,0,.6); }
#attack-ind div { height: 100%; background: #ddd; }
#bottom { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: calc(var(--s) * 182px); }
#item-name { text-align: center; height: calc(var(--s) * 12px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; transition: opacity .2s; white-space: nowrap; }
#stats { position: relative; height: calc(var(--s) * 20px); margin-bottom: calc(var(--s) * 2px); }
.icons { position: absolute; display: flex; height: calc(var(--s) * 9px); }
.icons img { width: calc(var(--s) * 9px); height: calc(var(--s) * 9px); margin-right: calc(var(--s) * -1px); }
.icons.right { right: calc(var(--s) * 1px); flex-direction: row-reverse; }
.icons.right img { margin-right: 0; margin-left: calc(var(--s) * -1px); }
#hearts { bottom: 0; left: 0; } #food { bottom: 0; } #armor-row { top: 0; left: 0; } #bubble-row { top: 0; }
#xp { position: relative; height: calc(var(--s) * 5px); background: #0a0a0a; border: calc(var(--s) * 1px) solid #000; box-shadow: inset 0 0 0 calc(var(--s) * 1px) #1c3a08; margin-bottom: calc(var(--s) * 2px); }
#xp-fill { height: 100%; background: linear-gradient(#a0ff40, #5ec41a); width: 0; }
#xp-level { position: absolute; left: 50%; top: calc(var(--s) * -9px); transform: translateX(-50%); color: #80ff20;
  text-shadow: calc(var(--s)*1px) 0 0 #000, calc(var(--s)*-1px) 0 0 #000, 0 calc(var(--s)*1px) 0 #000, 0 calc(var(--s)*-1px) 0 #000; }
#hotbar { position: relative; display: flex; width: calc(var(--s) * 182px); height: calc(var(--s) * 22px); padding: calc(var(--s) * 1px);
  background: rgba(30,30,30,.62); border: calc(var(--s) * 1px) solid #111; box-shadow: inset 0 0 0 calc(var(--s) * 1px) rgba(140,140,140,.55); }
.hb-slot { position: relative; width: calc(var(--s) * 20px); height: calc(var(--s) * 20px); box-shadow: inset calc(var(--s)*-1px) 0 0 rgba(140,140,140,.45); }
.hb-slot .ic, .gslot .ic { position: absolute; left: calc(var(--s) * 2px); top: calc(var(--s) * 2px); width: calc(var(--s) * 16px); height: calc(var(--s) * 16px); }
.gslot .ic { left: calc(var(--s) * 1px); top: calc(var(--s) * 1px); }
.gslot.big .ic { left: calc(var(--s) * 5px); top: calc(var(--s) * 5px); }
#hb-sel { position: absolute; top: calc(var(--s) * -2px); width: calc(var(--s) * 24px); height: calc(var(--s) * 24px); border: calc(var(--s) * 2px) solid #f2f2f2; box-shadow: 0 0 0 calc(var(--s)*1px) #000, inset 0 0 0 calc(var(--s)*1px) #555; z-index: 2; }
.cnt { position: absolute; right: calc(var(--s) * 1px); bottom: 0; font-size: calc(var(--s) * 6px); color: #fff; text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; z-index: 3; }
.dur { position: absolute; left: calc(var(--s) * 3px); bottom: calc(var(--s) * 2px); width: calc(var(--s) * 13px); height: calc(var(--s) * 2px); background: #000; z-index: 3; }
.dur div { height: 50%; }
#chat { position: absolute; left: calc(var(--s) * 2px); bottom: calc(var(--s) * 52px); width: calc(var(--s) * 300px); max-width: 60vw; }
.cmsg { background: rgba(0,0,0,.45); padding: calc(var(--s) * 1px) calc(var(--s) * 2px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; word-break: break-word; }
#chat-input { position: fixed; left: calc(var(--s) * 2px); right: calc(var(--s) * 2px); bottom: calc(var(--s) * 2px); height: calc(var(--s) * 12px); z-index: 40;
  background: rgba(0,0,0,.55); color: #fff; border: none; outline: none; font: inherit; padding: 0 calc(var(--s) * 2px); }
#debug { position: absolute; left: calc(var(--s) * 2px); top: calc(var(--s) * 2px); white-space: pre; font-size: calc(var(--s) * 5px); line-height: 1.6;
  text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; background: rgba(0,0,0,.3); padding: calc(var(--s) * 2px); }
#clickhint { position: fixed; left: 50%; top: 60%; transform: translateX(-50%); z-index: 15; background: rgba(0,0,0,.55); padding: calc(var(--s) * 4px) calc(var(--s) * 8px); pointer-events: none; text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #3f3f3f; }

/* ---------- botones / menús ---------- */
#menus { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; align-items: safe center; justify-content: center; overflow-y: auto; }
#menus.menu-worlds, #menus.menu-create, #menus.menu-options, #menus.menu-controls { background: rgba(0,0,0,.45); }
#menus.menu-pause { background: rgba(10,10,10,.55); }
#menus.menu-loading { background-image: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)), var(--dirt); background-size: calc(var(--s) * 32px); image-rendering: pixelated; }
#menus.menu-death { background: linear-gradient(rgba(100,0,0,.45), rgba(170,0,0,.62)); }
.mc-btn { display: block; width: calc(var(--s) * 200px); height: calc(var(--s) * 20px); margin: calc(var(--s) * 2px) auto; padding: 0 calc(var(--s) * 3px);
  font: inherit; color: #e0e0e0; cursor: pointer; pointer-events: auto; white-space: nowrap; overflow: hidden;
  background: linear-gradient(#7d7d7d, #6b6b6b); border: calc(var(--s) * 1px) solid #000;
  box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #aaa, inset calc(var(--s)*-1px) calc(var(--s)*-2px) 0 #555; }
.mc-btn:hover { color: #ffffa0; background: linear-gradient(#8a93c9, #6f79b6); box-shadow: inset 0 0 0 calc(var(--s)*1px) #fff, inset calc(var(--s)*-1px) calc(var(--s)*-2px) 0 #4a5390; }
.mc-btn:disabled { color: #a0a0a0; background: #2c2c2c; box-shadow: none; cursor: default; }
.mc-btn.wide { width: calc(var(--s) * 200px); }
.btn-row { display: flex; gap: calc(var(--s) * 4px); justify-content: center; }
.btn-row .mc-btn { width: calc(var(--s) * 98px); margin: calc(var(--s) * 2px) 0; }
.panel-menu .btn-row .mc-btn { width: calc(var(--s) * 150px); }
.panel-menu.pause .btn-row .mc-btn, .panel-menu.narrow .btn-row .mc-btn { width: calc(var(--s) * 98px); }
.main-menu { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; justify-content: center; background: linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.35)); }
.logo { position: relative; margin-bottom: calc(var(--s) * 26px); display: flex; flex-direction: column; align-items: center; }
.logo-c { width: calc(var(--s) * 256px); image-rendering: pixelated; filter: drop-shadow(0 calc(var(--s)*2px) calc(var(--s)*2px) rgba(0,0,0,.6)); }
.edition { margin-top: calc(var(--s) * -4px); color: #fff; font-size: calc(var(--s) * 7px); letter-spacing: calc(var(--s) * 1px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }
.splash { position: absolute; right: calc(var(--s) * -40px); bottom: calc(var(--s) * 4px); color: #ffff00; font-size: calc(var(--s) * 7px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f00;
  transform: rotate(-20deg); animation: splash .55s ease-in-out infinite alternate; white-space: nowrap; }
@keyframes splash { from { transform: rotate(-20deg) scale(1); } to { transform: rotate(-20deg) scale(1.1); } }
.btn-col { display: flex; flex-direction: column; }
.footer { position: fixed; bottom: calc(var(--s) * 2px); left: calc(var(--s) * 2px); right: calc(var(--s) * 2px); display: flex; justify-content: space-between; font-size: calc(var(--s) * 5px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }
.panel-menu { display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * 2px); pointer-events: auto; }
.title { font-size: calc(var(--s) * 8px); margin-bottom: calc(var(--s) * 10px); }
.world-list { width: calc(var(--s) * 270px); height: calc(var(--s) * 130px); overflow-y: auto; background: rgba(0,0,0,.55); border-top: calc(var(--s)*1px) solid #000; border-bottom: calc(var(--s)*1px) solid #000; margin-bottom: calc(var(--s) * 8px); }
.world-item { padding: calc(var(--s) * 3px); margin: calc(var(--s) * 2px); cursor: pointer; border: calc(var(--s) * 1px) solid transparent; }
.world-item.sel { border-color: #bbb; background: rgba(0,0,0,.6); }
.wname { margin-bottom: calc(var(--s) * 2px); }
.winfo { color: #808080; font-size: calc(var(--s) * 5px); margin-top: calc(var(--s) * 1px); }
.empty { color: #aaa; text-align: center; margin-top: calc(var(--s) * 50px); }
.mc-input { width: calc(var(--s) * 200px); height: calc(var(--s) * 20px); background: #000; border: calc(var(--s) * 1px) solid #a0a0a0; color: #e0e0e0; font: inherit; padding: 0 calc(var(--s) * 4px); outline: none; margin-bottom: calc(var(--s) * 6px); user-select: text; }
.mc-input:focus { border-color: #fff; }
.panel-menu label { color: #a0a0a0; width: calc(var(--s) * 200px); }
.desc { color: #a0a0a0; width: calc(var(--s) * 220px); text-align: center; font-size: calc(var(--s) * 5px); margin: calc(var(--s) * 4px) 0 calc(var(--s) * 10px); line-height: 1.6; }
.opt-grid { display: grid; grid-template-columns: repeat(2, calc(var(--s) * 150px)); gap: calc(var(--s) * 4px) calc(var(--s) * 8px); margin-bottom: calc(var(--s) * 14px); }
.opt-grid .mc-btn { width: 100%; margin: 0; }
.mc-slider { overflow: hidden; position: relative; width: 100%; height: calc(var(--s) * 20px); background: #000; border: calc(var(--s) * 1px) solid #000; box-shadow: inset 0 0 0 calc(var(--s)*1px) #3a3a3a; pointer-events: auto; }
.mc-slider span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #e0e0e0; text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; white-space: nowrap; }
.mc-slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 100%; margin: 0; background: transparent; cursor: pointer; }
.mc-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: calc(var(--s) * 8px); height: calc(var(--s) * 20px); background: linear-gradient(#8a8a8a, #6b6b6b); border: calc(var(--s) * 1px) solid #000; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #bbb, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #555; }
.mc-slider input::-moz-range-thumb { width: calc(var(--s) * 8px); height: calc(var(--s) * 20px); background: #7a7a7a; border: calc(var(--s) * 1px) solid #000; border-radius: 0; }
.controls { display: grid; grid-template-columns: auto auto; gap: calc(var(--s) * 3px) calc(var(--s) * 12px); margin-bottom: calc(var(--s) * 6px); }
.ck { color: #ffff80; text-align: right; } .cv { color: #e0e0e0; }
.loading { display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * 6px); }
.ltext { text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }
.lsub { color: #c0c0c0; font-size: calc(var(--s) * 5px); }
.lbar { width: calc(var(--s) * 200px); height: calc(var(--s) * 4px); background: #808080; border: calc(var(--s) * 1px) solid #000; }
.lfill { height: 100%; width: 0; background: #80ff20; transition: width .15s; }
.death { display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * 2px); pointer-events: auto; }
.dtitle { font-size: calc(var(--s) * 14px); margin-bottom: calc(var(--s) * 14px); text-shadow: calc(var(--s) * 2px) calc(var(--s) * 2px) 0 #3f3f3f; }
.dmsg, .dscore { margin-bottom: calc(var(--s) * 8px); text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }
.dscore span { color: #ffff55; }

/* ---------- inventarios ---------- */
#gui { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; align-items: safe center; justify-content: center; justify-content: safe center; overflow: auto; background: rgba(16,16,16,.62); }
.gwin { position: relative; background: #c6c6c6; border: calc(var(--s) * 1px) solid #000; border-radius: calc(var(--s) * 3px);
  box-shadow: inset calc(var(--s)*2px) calc(var(--s)*2px) 0 #fff, inset calc(var(--s)*-2px) calc(var(--s)*-2px) 0 #555; color: #404040; }
.glabel { position: absolute; color: #404040; font-size: calc(var(--s) * 6px); white-space: nowrap; }
.gslot { position: absolute; width: calc(var(--s) * 18px); height: calc(var(--s) * 18px); background: #8b8b8b; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #373737, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #fff; }
.gslot.big { width: calc(var(--s) * 26px); height: calc(var(--s) * 26px); }
.gslot:hover::after, .gslot.drag::after { content: ''; position: absolute; left: calc(var(--s) * 1px); top: calc(var(--s) * 1px); right: calc(var(--s) * 1px); bottom: calc(var(--s) * 1px); background: rgba(255,255,255,.45); z-index: 4; }
.gslot .cnt { right: calc(var(--s) * 0px); bottom: calc(var(--s) * -1px); }
.gslot.big .cnt { right: calc(var(--s) * 4px); bottom: calc(var(--s) * 3px); }
.gslot .dur { left: calc(var(--s) * 2px); bottom: calc(var(--s) * 1px); }
.gslot.trash::before { content: '✕'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8a1a1a; font-size: calc(var(--s) * 8px); }
.gslot.armor-0::before, .gslot.armor-1::before, .gslot.armor-2::before, .gslot.armor-3::before { position: absolute; inset: calc(var(--s) * 3px); opacity: .25; display: flex; align-items: center; justify-content: center; color: #000; font-size: calc(var(--s) * 5px); }
.gslot.armor-0::before { content: 'Cab'; } .gslot.armor-1::before { content: 'Pec'; } .gslot.armor-2::before { content: 'Pie'; } .gslot.armor-3::before { content: 'Bot'; }
.arrow { position: absolute; width: calc(var(--s) * 22px); height: calc(var(--s) * 15px); background: #8b8b8b; clip-path: polygon(0 38%, 58% 38%, 58% 5%, 100% 50%, 58% 95%, 58% 62%, 0 62%); }
.arrow div { height: 100%; width: 0; background: #fff; }
.flame { position: absolute; width: calc(var(--s) * 14px); height: calc(var(--s) * 14px); background: #8b8b8b; clip-path: polygon(50% 0, 75% 30%, 100% 55%, 90% 90%, 50% 100%, 10% 90%, 0 55%, 25% 30%); display: flex; align-items: flex-end; }
.flame div { width: 100%; height: 0; background: linear-gradient(#ffe040, #ff6a00); }
.pv { position: absolute; width: calc(var(--s) * 49px); height: calc(var(--s) * 70px); box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #373737, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #fff; padding: calc(var(--s) * 1px); }
.pv canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.gwin.creative { margin-top: calc(var(--s) * 24px); }
.ctabs { position: absolute; top: calc(var(--s) * -23px); left: 0; display: flex; gap: calc(var(--s) * 1px); }
.ctab { width: calc(var(--s) * 18.5px); height: calc(var(--s) * 22px); background: #9a9a9a; border: calc(var(--s) * 1px) solid #000; border-bottom: none; border-radius: calc(var(--s) * 2px) calc(var(--s) * 2px) 0 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #ccc; }
.ctab.sel { background: #c6c6c6; height: calc(var(--s) * 24px); box-shadow: inset calc(var(--s)*2px) calc(var(--s)*2px) 0 #fff; }
.ctab img { width: calc(var(--s) * 14px); height: calc(var(--s) * 14px); }
.cscroll { position: absolute; width: calc(var(--s) * 12px); height: calc(var(--s) * 90px); background: #8b8b8b; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #373737, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #fff; }
.cscroll div { position: absolute; left: calc(var(--s) * 1px); width: calc(var(--s) * 10px); height: calc(var(--s) * 15px); background: #c6c6c6; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #fff, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #555; }
.csearch { position: absolute; width: calc(var(--s) * 89px); height: calc(var(--s) * 10px); background: #000; color: #fff; border: calc(var(--s) * 1px) solid #a0a0a0; font: inherit; font-size: calc(var(--s) * 5px); padding: 0 calc(var(--s) * 2px); outline: none; user-select: text; }
#tooltip { position: fixed; z-index: 70; pointer-events: none; background: rgba(16,0,16,.94); padding: calc(var(--s) * 3px) calc(var(--s) * 4px); border: calc(var(--s) * 1px) solid #2a0a5e; box-shadow: 0 0 0 calc(var(--s)*1px) rgba(16,0,16,.94); white-space: nowrap; line-height: 1.7; }
.tname { color: #fff; text-shadow: calc(var(--s) * 1px) calc(var(--s) * 1px) 0 #3f3f3f; }
.tgray { color: #a8a8a8; } .tgreen { color: #00aa00; } .tblue { color: #5555ff; }
#cursor-item { position: fixed; z-index: 60; pointer-events: none; width: calc(var(--s) * 16px); height: calc(var(--s) * 16px); transform: translate(-50%, -50%); }
#cursor-item img { width: 100%; height: 100%; }
#cursor-item .cnt { right: calc(var(--s) * -1px); bottom: calc(var(--s) * -2px); }
#overlay-portal { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 3; background: radial-gradient(ellipse at center, rgba(160,60,255,.35), rgba(90,10,180,.8)); }
#overlay-high { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 3; background: radial-gradient(ellipse at center, transparent 30%, rgba(60,160,40,.45) 100%); mix-blend-mode: screen; }
#overlay-poop { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 3;
  background: radial-gradient(circle at 28% 22%, rgba(240,240,228,.95) 0 4%, rgba(90,80,60,.9) 4.5% 5.5%, rgba(240,240,228,.85) 6% 9%, transparent 9.5%),
    radial-gradient(ellipse 7% 12% at 31% 34%, rgba(235,235,222,.9) 60%, transparent 62%),
    radial-gradient(circle at 70% 60%, rgba(240,240,228,.9) 0 3%, rgba(90,80,60,.85) 3.4% 4.2%, rgba(240,240,228,.8) 4.6% 7%, transparent 7.4%),
    radial-gradient(ellipse 4% 9% at 72% 70%, rgba(235,235,222,.85) 60%, transparent 62%),
    radial-gradient(circle at 55% 12%, rgba(240,240,228,.8) 0 2%, transparent 2.4%); }
#overlay-flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 4; background: #fff; transition: opacity .1s; }
#nametags { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.ntag { position: absolute; transform: translate(-50%, -100%); background: rgba(0,0,0,.4); padding: calc(var(--s)*1px) calc(var(--s)*2px); white-space: nowrap; font-size: calc(var(--s) * 5px); }
#effects { position: absolute; right: calc(var(--s) * 2px); top: calc(var(--s) * 2px); display: flex; flex-direction: column; gap: calc(var(--s) * 2px); align-items: flex-end; }
.eff { background: rgba(0,0,0,.55); border-left: calc(var(--s) * 3px) solid #888; padding: calc(var(--s) * 2px) calc(var(--s) * 3px); font-size: calc(var(--s) * 5px); text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #3f3f3f; }
.eff span { color: #aaa; margin-left: calc(var(--s) * 4px); }
#bossbar { position: absolute; left: 50%; top: calc(var(--s) * 4px); transform: translateX(-50%); text-align: center; display: none; }
#bossbar .bname { text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #3f3f3f; margin-bottom: calc(var(--s) * 2px); color: #ff55ff; }
#bossbar .bbar { width: calc(var(--s) * 182px); height: calc(var(--s) * 5px); background: #2a0a2a; border: calc(var(--s) * 1px) solid #000; }
#bossbar .bbar div { height: 100%; background: linear-gradient(#ff7aff, #b020b0); }
#plist { position: absolute; left: 50%; top: calc(var(--s) * 20px); transform: translateX(-50%); background: rgba(0,0,0,.55); padding: calc(var(--s) * 3px) calc(var(--s) * 8px); min-width: calc(var(--s) * 100px); text-align: center; line-height: 1.8; }
.ptitle { color: #ffff55; }
.hb-slot.ench .ic, .gslot.ench .ic { filter: drop-shadow(0 0 calc(var(--s) * 1.5px) #b060ff) saturate(1.3); animation: glint 1.5s ease-in-out infinite alternate; }
@keyframes glint { from { filter: drop-shadow(0 0 calc(var(--s) * 1px) #8040ff) brightness(1); } to { filter: drop-shadow(0 0 calc(var(--s) * 2px) #e0a0ff) brightness(1.25); } }
.ench-opt { position: absolute; width: calc(var(--s) * 108px); height: calc(var(--s) * 19px); background: #b0a080; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #e8d8b0, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #605030; cursor: pointer; font-size: calc(var(--s) * 4.5px); color: #3a2a6a; overflow: hidden; }
.ench-opt:hover { background: #c8b890; }
.ench-opt.off { background: #6a6a6a; color: #3a3a3a; cursor: default; }
.ench-opt .ecost { position: absolute; left: calc(var(--s) * 2px); top: calc(var(--s) * 6px); color: #80ff20; text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #000; font-size: calc(var(--s) * 6px); }
.ench-opt .ename { position: absolute; left: calc(var(--s) * 18px); top: calc(var(--s) * 2px); white-space: nowrap; }
.ench-opt .elapis { position: absolute; right: calc(var(--s) * 3px); bottom: calc(var(--s) * 2px); color: #2a4ab0; }
.brew-arrow { position: absolute; width: calc(var(--s) * 9px); height: calc(var(--s) * 28px); background: #8b8b8b; display: flex; align-items: flex-start; }
.brew-arrow div { width: 100%; height: 0; background: #fff; }
.trade-row { position: absolute; width: calc(var(--s) * 260px); height: calc(var(--s) * 18px); display: flex; align-items: center; gap: calc(var(--s) * 4px); padding: 0 calc(var(--s) * 4px); background: #8b8b8b; box-shadow: inset calc(var(--s)*1px) calc(var(--s)*1px) 0 #fff, inset calc(var(--s)*-1px) calc(var(--s)*-1px) 0 #373737; cursor: pointer; color: #fff; text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #3f3f3f; }
.trade-row:hover { background: #a0a8d8; }
.trade-row.off { opacity: .5; }
.trade-row img { width: calc(var(--s) * 16px); height: calc(var(--s) * 16px); }
.trade-row .tarrow { margin: 0 calc(var(--s) * 8px); color: #fff; }
.login .logo-c.small { width: calc(var(--s) * 160px); margin-bottom: calc(var(--s) * 8px); }
.err-msg { color: #ff5555; min-height: calc(var(--s) * 8px); margin-bottom: calc(var(--s) * 4px); text-align: center; }
.desc.big { font-size: calc(var(--s) * 6px); color: #e0e0e0; }
.code-box { background: rgba(0,0,0,.5); padding: calc(var(--s) * 4px) calc(var(--s) * 8px); margin: calc(var(--s) * 3px) 0; text-align: center; }
.code-box b { color: #ffff55; font-size: calc(var(--s) * 8px); letter-spacing: calc(var(--s) * 1px); }
.footer a { color: #aaa; pointer-events: auto; }
.skin-ed { display: flex; gap: calc(var(--s) * 10px); align-items: center; margin: calc(var(--s) * 6px) 0 calc(var(--s) * 10px); background: rgba(0,0,0,.4); padding: calc(var(--s) * 6px); }
.skin-pv { width: calc(var(--s) * 70px); height: calc(var(--s) * 100px); image-rendering: pixelated; }
.skin-rows { display: flex; flex-direction: column; gap: calc(var(--s) * 4px); }
.skin-row { display: flex; align-items: center; gap: calc(var(--s) * 2px); }
.skin-row span { width: calc(var(--s) * 50px); }
.swatch { width: calc(var(--s) * 10px); height: calc(var(--s) * 10px); border: calc(var(--s) * 1px) solid #000; cursor: pointer; pointer-events: auto; }
.swatch.sel { outline: calc(var(--s) * 1px) solid #fff; }
#err { position: fixed; top: 0; left: 0; right: 0; max-height: 45vh; overflow: auto; background: rgba(120,0,0,.9); color: #fff; font: 12px monospace; white-space: pre-wrap; display: none; z-index: 100; padding: 6px; user-select: text; }

/* ===== Panel de administrador ===== */
#menus.menu-admin, #menus.menu-admin_game { background: rgba(0,0,0,.6); }
.panel-menu.admin { max-height: 94vh; width: min(96vw, calc(var(--s) * 330px)); }
.admin-body { width: 100%; max-height: 64vh; overflow-y: auto; background: rgba(0,0,0,.5); border: calc(var(--s) * 1px) solid #555; padding: calc(var(--s) * 3px); box-sizing: border-box; }
.admin-body .subtitle { color: #ffff55; font-size: calc(var(--s) * 5px); margin: calc(var(--s) * 4px) 0 calc(var(--s) * 2px); }
.admin-table { width: 100%; border-collapse: collapse; font-size: calc(var(--s) * 4px); }
.admin-table th { color: #a0a0a0; text-align: left; border-bottom: calc(var(--s) * 1px) solid #555; padding: calc(var(--s) * 1px); }
.admin-table td { padding: calc(var(--s) * 1px); border-bottom: 1px solid #333; vertical-align: middle; }
.admin-table tr.banned td { color: #ff6060; }
.admin-table td.acts { display: flex; flex-wrap: wrap; gap: calc(var(--s) * 1px); }
.mc-btn.small { width: auto; height: calc(var(--s) * 11px); font-size: calc(var(--s) * 4px); margin: 0; padding: 0 calc(var(--s) * 3px); display: inline-block; }
.mc-btn.admin-btn { color: #ffd34a; }
.desc.ok { color: #7cff7c; }

/* ===== Controles táctiles (móvil) ===== */
body.touch, body.touch #game { touch-action: none; -webkit-touch-callout: none; }
#touch { display: none; position: fixed; inset: 0; z-index: 9; }
body.touch.t-playing #touch { display: block; }
body.touch #clickhint { display: none !important; }
body.touch #menus { overflow-y: auto; align-items: safe center; padding: 8px 0; box-sizing: border-box; }
body.touch #hotbar { pointer-events: auto; }
.t-move { position: absolute; left: 0; top: 18%; bottom: 0; width: 40%; }
.t-look { position: absolute; right: 0; top: 18%; bottom: 0; width: 60%; }
.t-stick { position: absolute; left: 18%; top: 72%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.35); pointer-events: none; opacity: .55; }
.t-stick.on { opacity: 1; }
.t-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.45); border: 2px solid rgba(255,255,255,.7); }
.t-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 12px; background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.45); color: #fff; font-size: 24px; font-family: sans-serif; -webkit-user-select: none; user-select: none; }
.t-btn.on { background: rgba(255,255,255,.35); }
.t-btn.lock { background: rgba(120,200,255,.45); }
.t-jump { right: calc(16px + env(safe-area-inset-right)); bottom: 70px; width: 70px; height: 70px; border-radius: 50%; }
.t-sneak { right: calc(96px + env(safe-area-inset-right)); bottom: 20px; border-radius: 50%; }
.t-atk { right: calc(16px + env(safe-area-inset-right)); bottom: 152px; }
.t-use { right: calc(86px + env(safe-area-inset-right)); bottom: 112px; }
.t-top { position: absolute; top: 6px; right: calc(8px + env(safe-area-inset-right)); display: flex; gap: 6px; }
.t-top .t-btn { position: static; width: 42px; height: 42px; font-size: 18px; border-radius: 8px; }
.t-rotate { display: none; position: absolute; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 10px 14px; font-size: 12px; text-align: center; pointer-events: none; }
@media (orientation: portrait) { .t-rotate { display: block; } }
#t-close { display: none; position: fixed; z-index: 31; top: 8px; right: 8px; width: 46px; height: 46px; border-radius: 8px; background: rgba(160,20,20,.85); border: 2px solid #fff; color: #fff; font: 26px sans-serif; align-items: center; justify-content: center; }
body.touch.t-screen #t-close { display: flex; }

/* corazones extra del porro */
#absorb { top: 0; left: 0; }
#armor-row.lifted { top: calc(var(--s) * -10px); }

/* ===== Libro de recetas ===== */
#gui.with-rbook { gap: calc(var(--s) * 4px); }
.rbook { position: relative; width: calc(var(--s) * 150px); height: calc(var(--s) * 166px); background: #c6c6c6; box-shadow: inset calc(var(--s)*2px) calc(var(--s)*2px) 0 #fff, inset calc(var(--s)*-2px) calc(var(--s)*-2px) 0 #555; padding: calc(var(--s) * 4px); box-sizing: border-box; display: flex; flex-direction: column; gap: calc(var(--s) * 2px); color: #3f3f3f; font-size: calc(var(--s) * 5px); }
.rb-head { display: flex; justify-content: space-between; }
.rb-x { cursor: pointer; padding: 0 calc(var(--s) * 2px); }
.rb-q { background: #000; color: #fff; border: calc(var(--s) * 1px) solid #a0a0a0; font: inherit; font-size: calc(var(--s) * 5px); padding: 0 calc(var(--s) * 2px); height: calc(var(--s) * 9px); outline: none; user-select: text; }
.rb-can { font-size: calc(var(--s) * 4px); display: flex; align-items: center; gap: 4px; }
.rb-list { flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: calc(var(--s) * 1px); background: #8b8b8b; padding: calc(var(--s) * 1px); min-height: calc(var(--s) * 40px); }
.rb-it { position: relative; width: calc(var(--s) * 16px); height: calc(var(--s) * 16px); background: #6b6b6b; cursor: pointer; opacity: .55; }
.rb-it.ok { opacity: 1; background: #7a9a6a; }
.rb-it.sel { outline: calc(var(--s) * 1px) solid #fff; }
.rb-it img, .rb-c img, .rb-res img { width: 100%; height: 100%; image-rendering: pixelated; }
.rb-it .cnt, .rb-res .cnt { position: absolute; right: 0; bottom: 0; color: #fff; text-shadow: 1px 1px 0 #000; font-size: calc(var(--s) * 4px); }
.rb-detail { display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * 2px); min-height: calc(var(--s) * 60px); }
.rb-name { color: #202020; text-align: center; }
.rb-row { display: flex; align-items: center; gap: calc(var(--s) * 3px); }
.rb-grid { display: grid; gap: 1px; background: #8b8b8b; padding: 1px; }
.rb-grid.g3 { grid-template-columns: repeat(3, calc(var(--s) * 12px)); }
.rb-grid.g2 { grid-template-columns: repeat(2, calc(var(--s) * 12px)); }
.rb-c { width: calc(var(--s) * 12px); height: calc(var(--s) * 12px); background: #b0b0b0; }
.rb-res { position: relative; width: calc(var(--s) * 18px); height: calc(var(--s) * 18px); background: #b0b0b0; }
.rb-arrow { font-size: calc(var(--s) * 8px); }
.rb-desc, .rb-hint, .rb-empty { font-size: calc(var(--s) * 4px); text-align: center; color: #404070; }
.rbook-tab { width: calc(var(--s) * 20px); height: calc(var(--s) * 20px); background: #c6c6c6; display: flex; align-items: center; justify-content: center; font-size: calc(var(--s) * 10px); cursor: pointer; align-self: flex-start; }
body.touch .rbook { height: auto; max-height: 90vh; }

/* ===== SecurityCraft: teclado numérico ===== */
.sc-keys { display: grid; grid-template-columns: repeat(3, calc(var(--s) * 30px)); gap: calc(var(--s) * 2px); margin: calc(var(--s) * 4px) 0; }
.sc-keys .mc-btn.small.key { width: calc(var(--s) * 30px); height: calc(var(--s) * 18px); font-size: calc(var(--s) * 8px); }
#menus.menu-sc_code, #menus.menu-sc_cfg { background: rgba(0,0,0,.5); }

/* ===== Ligar en el antro ===== */
#menus.menu-flirt, #menus.menu-pet, #menus.menu-pet_name { background: rgba(20,0,20,.45); }
.flirt .title { color: #ff8fd0; }
.flirt-bubble { background: #fff; color: #333; border-radius: 10px; padding: calc(var(--s) * 4px) calc(var(--s) * 6px); max-width: calc(var(--s) * 210px); font-size: calc(var(--s) * 5px); line-height: 1.5; text-align: center; margin-bottom: calc(var(--s) * 4px); }
.flirt-bubble.ok { background: #ffe0f0; } .flirt-bubble.bad { background: #e8e8e8; color: #7a2a2a; }
.flirt-lbl { font-size: calc(var(--s) * 5px); color: #ffb0e0; }
.flirt-bar { width: calc(var(--s) * 200px); height: calc(var(--s) * 7px); background: #2a1a2a; border: calc(var(--s) * 1px) solid #000; }
.flirt-bar .fill { height: 100%; width: 15%; transition: width .4s, background .4s; }
.flirt-bartxt { font-size: calc(var(--s) * 4px); color: #ddd; margin-bottom: calc(var(--s) * 4px); }
.flirt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--s) * 2px); width: calc(var(--s) * 220px); }
.flirt-grid .mc-btn.small { width: 100%; height: calc(var(--s) * 14px); font-size: calc(var(--s) * 4.5px); }
.ntag.pet { color: #ffe080; background: rgba(40,30,0,.45); }

/* ===== Comercio por páginas, huecos de ropa y editor del personaje ===== */
.trade-pg { position: absolute; color: #3f3f3f; font-size: calc(var(--s) * 6px); }
.trade-pg span { cursor: pointer; padding: 0 calc(var(--s) * 3px); background: #8b8b8b; color: #fff; }
.panel-menu.skin2 { width: min(96vw, calc(var(--s) * 300px)); }
.skin2-main { display: flex; gap: calc(var(--s) * 6px); align-items: flex-start; width: 100%; }
.skin2-pv { width: calc(var(--s) * 70px); height: calc(var(--s) * 110px); image-rendering: pixelated; background: rgba(0,0,0,.35); border: calc(var(--s) * 1px) solid #555; flex: none; }
.skin2-side { flex: 1; min-width: 0; }
.skin2-tabs { display: flex; flex-wrap: wrap; gap: calc(var(--s) * 1px); margin-bottom: calc(var(--s) * 3px); }
.skin2-tabs .mc-btn.on, .skin-row .mc-btn.on { color: #ffff80; box-shadow: inset 0 0 0 calc(var(--s)*1px) #fff; }
.skin2-body { background: rgba(0,0,0,.35); padding: calc(var(--s) * 3px); max-height: 52vh; overflow-y: auto; }
.skin2-body .skin-row { display: flex; align-items: center; gap: calc(var(--s) * 2px); margin: calc(var(--s) * 2px) 0; flex-wrap: wrap; font-size: calc(var(--s) * 5px); }
.skin2-body .skin-row > span { width: calc(var(--s) * 40px); color: #ddd; }
.skin2-body input[type=range] { flex: 1; }
.skin2-body .desc { width: auto; }


/* ===== Misiones ===== */
#menus.menu-quests { background: rgba(10,8,0,.55); }
.panel-menu.quests { width: min(96vw, calc(var(--s) * 260px)); }
.q-rank { font-size: calc(var(--s) * 5px); color: #ddd; margin-bottom: calc(var(--s) * 3px); } .q-rank b { color: #ffd040; }
.q-box { width: 100%; background: rgba(0,0,0,.45); border: calc(var(--s) * 1px) solid #6a5a2a; padding: calc(var(--s) * 4px); box-sizing: border-box; margin-bottom: calc(var(--s) * 3px); }
.q-say { font-style: italic; color: #ffe8a0; font-size: calc(var(--s) * 4.5px); margin-bottom: calc(var(--s) * 3px); line-height: 1.5; }
.q-title { color: #ffd040; font-size: calc(var(--s) * 5.5px); margin-bottom: calc(var(--s) * 2px); }
.q-desc { color: #ddd; font-size: calc(var(--s) * 4.5px); line-height: 1.5; }
.q-rw { color: #8fff8f; font-size: calc(var(--s) * 4.5px); margin-top: calc(var(--s) * 2px); }
.q-bar { height: calc(var(--s) * 4px); background: #222; margin: calc(var(--s) * 2px) 0; } .q-bar div { height: 100%; background: linear-gradient(#ffe070, #d09a10); }
.q-daily { color: #ccc; font-size: calc(var(--s) * 4.5px); margin: calc(var(--s) * 1px) 0; } .q-daily.done { color: #7aff7a; }
#q-track { position: absolute; left: calc(var(--s) * 3px); top: calc(var(--s) * 3px); background: rgba(0,0,0,.45); padding: calc(var(--s) * 2px) calc(var(--s) * 4px); font-size: calc(var(--s) * 4.5px); color: #ffe8a0; }
.q-toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 50; background: rgba(20,16,0,.85); border: 3px solid #6aff6a; padding: 10px 18px; text-align: center; color: #fff; font-size: 14px; pointer-events: none; transition: opacity .6s, transform .6s; }
.q-toast .q-tt { font-size: 18px; margin-bottom: 4px; } .q-toast.out { opacity: 0; transform: translateX(-50%) translateY(-20px); }


/* ===== Comandos: sugerencias, menú de funciones y títulos ===== */
#cmd-sug { position: fixed; z-index: 60; display: none; pointer-events: none; font-family: 'Press Start 2P', monospace; font-size: 11px; max-width: min(92vw, 720px); }
#cmd-sug .cs-list { background: rgba(0,0,0,.82); padding: 3px 0; display: inline-block; min-width: 160px; }
#cmd-sug .cs-row { padding: 3px 8px; color: #b8b8b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cmd-sug .cs-row.sel { color: #ffff55; }
#cmd-sug .cs-d { color: #6a6a6a; font-size: 9px; }
#cmd-sug .cs-row.sel .cs-d { color: #b0a040; }
#cmd-sug .cs-more { padding: 2px 8px; color: #777; font-size: 9px; }
#cmd-sug .cs-usage { background: rgba(0,0,0,.82); padding: 4px 8px; color: #aaa; margin-top: 2px; font-size: 10px; }
#cmd-sug .cs-usage .cs-cur { color: #ffff55; }
#menus.menu-cmds, #menus.menu-cmdblock { background: rgba(0,0,0,.6); }
.panel-menu.cmds { width: min(96vw, calc(var(--s) * 300px)); align-items: stretch; background: rgba(0,0,0,.55); padding: calc(var(--s) * 4px); box-sizing: border-box; }
.cmd-help { color: #bbb; font-size: calc(var(--s) * 4.5px); line-height: 1.5; margin: calc(var(--s) * 2px) 0; }
.cmd-sec { color: #ffd040; font-size: calc(var(--s) * 5px); margin-top: calc(var(--s) * 4px); }
.cmd-ta { width: 100%; box-sizing: border-box; background: #000; color: #e0e0e0; border: calc(var(--s) * 1px) solid #a0a0a0; font: calc(var(--s) * 4.5px)/1.5 'Press Start 2P', monospace; padding: calc(var(--s) * 2px); resize: vertical; }
.cmd-ta.big { min-height: calc(var(--s) * 70px); }
.cmd-out { background: rgba(0,0,0,.45); color: #ddd; font-size: calc(var(--s) * 4.5px); padding: calc(var(--s) * 2px); min-height: calc(var(--s) * 8px); max-height: calc(var(--s) * 40px); overflow: auto; }
.cmd-out .err { color: #ff6060; } .cmd-out .warn { color: #ffe060; }
.cmd-row { display: flex; gap: calc(var(--s) * 3px); flex-wrap: wrap; align-items: center; color: #ddd; font-size: calc(var(--s) * 4.5px); margin: calc(var(--s) * 2px) 0; }
.cmd-row .mc-btn { flex: 1; min-width: calc(var(--s) * 60px); }
.cmd-list { max-height: calc(var(--s) * 60px); overflow: auto; background: rgba(0,0,0,.35); padding: calc(var(--s) * 2px); }
.cmd-fn { display: flex; align-items: center; gap: calc(var(--s) * 2px); margin: calc(var(--s) * 1px) 0; }
.cmd-fn .nm { flex: 1; color: #e8e8e8; font-size: calc(var(--s) * 4.5px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-fn .mc-btn.small { width: auto; min-width: calc(var(--s) * 14px); padding: 0 calc(var(--s) * 3px); height: calc(var(--s) * 14px); }
.cmd-empty { color: #999; font-size: calc(var(--s) * 4.5px); padding: calc(var(--s) * 3px); }
.cb-inp { width: 100%; box-sizing: border-box; }
#mc-title { position: fixed; left: 0; right: 0; top: 26%; z-index: 15; text-align: center; pointer-events: none; color: #fff; font-family: 'Press Start 2P', monospace; text-shadow: 4px 4px 0 #3f3f3f; transition: opacity .8s; }
#mc-title.out { opacity: 0; }
#mc-title .t1 { font-size: clamp(22px, 5vw, 56px); }
#mc-title .t2 { font-size: clamp(12px, 2.2vw, 24px); margin-top: 14px; }
#mc-title .t3 { position: fixed; left: 0; right: 0; bottom: 22%; font-size: clamp(10px, 1.6vw, 16px); }


/* ===== Segunda mano y cartel de animales ===== */
#offhand-hud { position: absolute; display: none; width: calc(var(--s) * 22px); height: calc(var(--s) * 22px); left: calc(var(--s) * -29px); bottom: calc(var(--s) * 1px);
  background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 calc(var(--s)*1px) #8b8b8b; }
#offhand-hud img { position: absolute; left: calc(var(--s)*3px); top: calc(var(--s)*3px); width: calc(var(--s)*16px); height: calc(var(--s)*16px); image-rendering: pixelated; }
#offhand-hud span { position: absolute; right: calc(var(--s)*1px); bottom: 0; color: #fff; font-size: calc(var(--s)*6px); text-shadow: calc(var(--s)*1px) calc(var(--s)*1px) 0 #3f3f3f; }
.off-label { position: absolute; color: #404040; font-size: calc(var(--s) * 4.5px); white-space: nowrap; }
#mob-hint { position: fixed; left: 50%; top: 56%; transform: translateX(-50%); z-index: 12; display: none; pointer-events: none; background: rgba(0,0,0,.55); color: #ddd;
  font-family: 'Press Start 2P', monospace; font-size: 10px; line-height: 1.6; padding: 5px 9px; text-align: center; max-width: 80vw; }
#mob-hint .mh-t { color: #ffff55; }


/* ===== Contenido del mundo ===== */
#menus.menu-features { background: rgba(0,0,0,.55); }
.panel-menu.feats { width: min(96vw, calc(var(--s) * 220px)); }
.feat-desc { color: #bbb; font-size: calc(var(--s) * 4.5px); line-height: 1.5; margin: 0 0 calc(var(--s) * 3px); text-align: center; }


/* ===== Móvil: controles simplificados, descripción fija, objeto en la mano ===== */
.t-sneak-ind { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: none; color: #fff; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 8px; font: 12px sans-serif; pointer-events: none; }
.t-sneak-ind.on { display: block; }
body.touch .t-atk, body.touch .t-use, body.touch .t-sneak { display: none !important; }
#tooltip.sticky { position: fixed; left: 50% !important; top: 6px !important; transform: translateX(-50%); z-index: 60; max-width: 90vw; pointer-events: none; }
body.touch #cursor-item { left: 10px !important; top: 42% !important; transform: none !important; }
body.touch #cursor-item::before { content: "En la mano"; position: absolute; top: -16px; left: 0; color: #fff; font: 10px sans-serif; white-space: nowrap; text-shadow: 1px 1px 0 #000; }


/* ===== Teléfono (SMRphone) ===== */
#phone { position: fixed; right: 18px; bottom: -110%; z-index: 40; width: min(300px, 42vw); height: min(560px, 86vh); background: #0b0b10; border-radius: 34px; border: 3px solid #2a2a33;
  box-shadow: 0 10px 40px rgba(0,0,0,.6), inset 0 0 0 2px #000; padding: 12px 10px 18px; box-sizing: border-box; display: flex; flex-direction: column; transition: bottom .28s cubic-bezier(.2,.9,.3,1.1);
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif; color: #f2f2f2; user-select: none; }
#phone.on { bottom: 18px; }
#phone .ph-bar { height: 18px; font-size: 11px; color: #ccc; text-align: center; white-space: pre; flex: none; }
#phone .ph-screen { flex: 1; overflow-y: auto; overflow-x: hidden; border-radius: 22px; background: linear-gradient(160deg, #1d2b4a, #3a1a4a 60%, #4a1a2a); padding: 10px; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
#phone .ph-screen:not(.app-home) { background: #111318; }
#phone .ph-home-btn { width: 90px; height: 5px; border-radius: 3px; background: #888; margin: 9px auto 0; cursor: pointer; flex: none; }
.ph-wall { text-align: center; padding: 16px 0 8px; }
.ph-clock { font-size: 46px; font-weight: 300; letter-spacing: 1px; }
.ph-hint { font-size: 11px; color: #ccd; margin-top: 4px; }
.ph-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; margin-top: 18px; }
.ph-app { text-align: center; cursor: pointer; }
.ph-ic { position: relative; width: 54px; height: 54px; margin: 0 auto; border-radius: 15px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.ph-app:hover .ph-ic { background: rgba(255,255,255,.26); }
.ph-nm { font-size: 11px; margin-top: 5px; }
.ph-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; box-sizing: border-box; }
.ph-item .ph-badge { position: static; margin-left: auto; }
.ph-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid #2a2d36; }
.ph-back { font-size: 26px; line-height: 18px; cursor: pointer; color: #4aa3ff; padding: 0 4px; }
.ph-btn { background: #2b6be0; color: #fff; border: 0; border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer; font-family: inherit; }
.ph-btn:hover { filter: brightness(1.15); } .ph-btn.red { background: #c0392b; } .ph-btn.go { background: #1f9d55; margin-top: 4px; padding: 4px 10px; } .ph-btn.big { padding: 14px; font-size: 16px; }
.ph-btn.small { padding: 5px 7px; font-size: 11px; background: #2c3140; }
.ph-row { display: flex; gap: 6px; flex-wrap: wrap; } .ph-row .ph-btn { flex: 1; }
.ph-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: #1a1d25; cursor: pointer; }
.ph-item:hover { background: #232836; }
.ph-av { width: 34px; height: 34px; border-radius: 50%; background: #2c3140; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.ph-it-txt { min-width: 0; } .ph-it-txt b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-small { font-size: 11px; color: #9aa0ad; overflow: hidden; text-overflow: ellipsis; }
.ph-empty { color: #8a8f9c; font-size: 12px; text-align: center; padding: 20px 6px; }
.ph-cam-info { font-size: 12px; color: #c8ccd6; line-height: 1.5; }
.ph-gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ph-gal img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; cursor: pointer; }
.ph-big { width: 100%; border-radius: 10px; }
.ph-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; min-height: 120px; }
.ph-msg { max-width: 82%; padding: 7px 10px; border-radius: 14px; font-size: 13px; line-height: 1.35; word-wrap: break-word; }
.ph-msg.mine { align-self: flex-end; background: #1f8f5a; border-bottom-right-radius: 4px; }
.ph-msg.them { align-self: flex-start; background: #2c3140; border-bottom-left-radius: 4px; }
.ph-msg.sys { align-self: center; background: transparent; color: #8a8f9c; font-size: 11px; }
.ph-msg img { width: 100%; border-radius: 8px; margin-top: 4px; cursor: pointer; }
.ph-loc { font-size: 12px; margin-top: 3px; }
.ph-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.ph-compose { display: flex; gap: 5px; align-items: center; }
.ph-input { flex: 1; min-width: 0; background: #1e2129; border: 1px solid #333846; color: #fff; border-radius: 16px; padding: 8px 12px; font-size: 13px; outline: none; font-family: inherit; }
.ph-range { width: 100%; }
.mu-slot { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; }
#music-box { position: fixed; z-index: 41; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
#music-box iframe { width: 100%; height: calc(100% - 0px); border: 0; display: block; }
#music-box .mb-bar { display: none; }
#music-box.mini { left: 12px; bottom: 88px; width: 220px; height: 150px; }
#music-box.mini iframe { height: 124px; }
#music-box.mini .mb-bar { display: flex; justify-content: space-between; align-items: center; height: 26px; padding: 0 8px; font: 12px system-ui, sans-serif; color: #ddd; background: #15171d; }
#music-box .mb-x { cursor: pointer; padding: 0 4px; }
#ph-notif { position: fixed; right: 18px; top: -80px; z-index: 45; max-width: min(340px, 80vw); background: rgba(20,22,28,.94); color: #fff; padding: 10px 14px; border-radius: 14px; font: 13px system-ui, sans-serif; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: top .3s; pointer-events: none; }
#ph-notif.on { top: 14px; }
#ph-flash { position: fixed; inset: 0; background: #fff; z-index: 50; opacity: .85; pointer-events: none; animation: phflash .3s ease-out forwards; }
@keyframes phflash { to { opacity: 0; } }
#nav-arrow { position: fixed; left: 50%; top: 46px; transform: translateX(-50%); z-index: 11; display: none; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 14px; background: rgba(0,0,0,.35); color: #ffe066; font: 12px system-ui, sans-serif; pointer-events: none; text-shadow: 1px 1px 0 #000; }
#nav-arrow .na-ar { font-size: 20px; color: #ffd030; transition: transform .1s linear; }
#nav-arrow .na-v { color: #9fe0ff; font-weight: 700; }
#kiss-fx { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 54px; z-index: 22; pointer-events: none; opacity: 0; }
#kiss-fx.on { animation: kissfx 1.6s ease-out; }
@keyframes kissfx { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
body.touch #phone { width: min(280px, 46vw); height: 88vh; right: 10px; }
body.touch #phone.on { bottom: 6vh; }
/* ===== Venta de maría ===== */
.weed-btn { position: absolute; right: calc(var(--s) * 6px); bottom: calc(var(--s) * -16px); background: #2f8a3a; color: #fff; padding: calc(var(--s) * 2px) calc(var(--s) * 5px); font-size: calc(var(--s) * 5px); cursor: pointer; box-shadow: inset 0 calc(var(--s)*-1px) 0 #1a5a22; }
#menus.menu-weedsell { background: rgba(0,0,0,.55); }
.panel-menu.weed { width: min(96vw, calc(var(--s) * 260px)); background: rgba(0,0,0,.55); padding: calc(var(--s) * 4px); box-sizing: border-box; align-items: stretch; }
.weed-trust { display: flex; align-items: center; gap: calc(var(--s) * 3px); color: #ddd; font-size: calc(var(--s) * 5px); }
.weed-trust .flirt-bar { flex: 1; }
.weed-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: calc(var(--s) * 2px); margin: calc(var(--s) * 3px) 0; }
.weed-it { display: flex; align-items: center; gap: calc(var(--s) * 3px); background: rgba(0,0,0,.35); padding: calc(var(--s) * 2px); color: #eee; font-size: calc(var(--s) * 4.5px); }
.weed-it img { width: calc(var(--s) * 12px); height: calc(var(--s) * 12px); image-rendering: pixelated; }
.weed-it .nm { flex: 1; } .weed-it .pr { color: #7cf08a; }
.weed-it .mc-btn.small { width: auto; min-width: calc(var(--s) * 30px); padding: 0 calc(var(--s) * 3px); }

