:root{--ui:#12141acc;--line:#ffffff55}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;min-height:100%;overflow:hidden;background:#11151a;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;touch-action:none;overscroll-behavior:none}
body{height:var(--apoteko-vh,100dvh);width:var(--apoteko-vw,100vw)}
canvas{position:fixed;left:0;top:0;width:var(--apoteko-vw,100vw);height:var(--apoteko-vh,100dvh);display:block;touch-action:none}
#hud{position:fixed;z-index:5;left:10px;top:10px;color:#f5ead2;background:linear-gradient(180deg,#302719ee,#17140fee);padding:9px 11px 10px;border:1px solid #b69354aa;border-radius:8px;font-size:11px;line-height:1.2;pointer-events:none;box-shadow:0 4px 15px #0008,inset 0 0 0 1px #0007;min-width:194px;max-width:54vw;font-family:Georgia,"Times New Roman",serif}
#hud .brand{font-weight:900;letter-spacing:2px;font-size:15px;color:#e9c777;text-shadow:0 1px #000;border-bottom:1px solid #b6935466;padding-bottom:5px;margin-bottom:5px}
#hud .clockrow{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#fff3d2;margin-bottom:6px}
#hud .clock{font-size:15px;font-weight:900;color:#fff}
#hud .place{opacity:.82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:112px}
#hud .stats{display:grid;grid-template-columns:1fr 1fr;gap:3px 9px}
#hud .stat{background:#0003;border-radius:4px;padding:3px 5px}
#hud .statusline{margin-top:6px;padding-top:5px;border-top:1px solid #b693543f;color:#ded2bc}
#hud .danger{color:#f1a4a4;font-weight:900}
#hud .safe{color:#cbd8ab;font-weight:900}
#message{position:fixed;z-index:8;left:50%;top:13px;transform:translateX(-50%);padding:8px 12px;color:#fff;background:#101216e8;border:1px solid #ffffff2e;border-radius:10px;font-weight:750;font-size:13px;opacity:0;transition:opacity .12s;pointer-events:none;text-align:center;max-width:72vw}

#crisisBanner{display:none;position:fixed;z-index:11;left:50%;top:55px;transform:translateX(-50%);max-width:min(720px,88vw);padding:9px 15px;background:linear-gradient(180deg,#6f1717f2,#3e0c0cf2);border:1px solid #e09b72;border-radius:9px;color:#ffe4c5;font:900 13px Georgia,"Times New Roman",serif;letter-spacing:.4px;text-align:center;box-shadow:0 5px 18px #0009;pointer-events:none;text-shadow:0 1px #000}
#joystick{position:fixed;z-index:7;left:22px;bottom:22px;width:142px;height:142px;border-radius:50%;border:2px solid #ffffff40;background:#1118;touch-action:none}
#stick{position:absolute;left:41px;top:41px;width:58px;height:58px;border-radius:50%;background:#ffffff36;border:2px solid #ffffff66;pointer-events:none}
.button{position:fixed;z-index:7;border-radius:50%;border:2px solid #ffffff55;background:#17191fc7;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;text-align:center;user-select:none;-webkit-user-select:none;touch-action:none;box-shadow:0 4px 14px #0005}
#action{right:26px;bottom:28px;width:82px;height:82px;background:#743434d4}
#form{right:34px;bottom:126px;width:70px;height:70px;background:#3e2a5ed4;font-size:11px}
#carry{right:120px;bottom:42px;width:68px;height:68px;background:#2b5267d4;font-size:11px}
#carry.disabled{opacity:.28!important;filter:grayscale(.75);pointer-events:none}
#wheelbarrow{display:none;right:196px;bottom:44px;width:62px;height:62px;background:#6a4b2fd4;font-size:10px;white-space:pre-line}
@media(pointer:coarse){#wheelbarrow.available{display:flex}}
#map{display:none;right:120px;bottom:122px;width:62px;height:62px;background:#554425dc;border-color:#d1b16b88;color:#f4e2b7;font-size:10px}

#gameMenuBtn{position:fixed;z-index:12;right:12px;top:116px;width:42px;height:34px;border:1px solid #b69354aa;border-radius:8px;background:linear-gradient(180deg,#302719ee,#17140fee);color:#f2dfb2;font:700 18px Georgia,serif;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px #0007;touch-action:none;user-select:none;cursor:pointer}
#gameMenuBtn:hover{filter:brightness(1.12)}
#audioBtn{position:fixed;z-index:12;right:12px;top:158px;width:42px;height:34px;border:1px solid #b69354aa;border-radius:8px;background:linear-gradient(180deg,#302719ee,#17140fee);color:#f2dfb2;font:700 16px Georgia,serif;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px #0007;touch-action:none;user-select:none}
#audioPanel{display:none;position:fixed;z-index:13;right:12px;top:198px;width:218px;padding:11px 12px;background:linear-gradient(180deg,#302719f7,#17140ff7);border:1px solid #b69354aa;border-radius:9px;color:#f5ead2;box-shadow:0 5px 18px #0009;font:12px Georgia,"Times New Roman",serif;touch-action:auto}
#audioPanel.open{display:block}
#audioPanel .audioTitle{font-weight:900;letter-spacing:1px;color:#e9c777;margin-bottom:8px;border-bottom:1px solid #b6935466;padding-bottom:6px}
#audioPanel label{display:grid;grid-template-columns:64px 1fr 32px;gap:7px;align-items:center;margin:8px 0}
#audioPanel input[type=range]{width:100%;accent-color:#b69354}
#audioPanel .muteRow{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
#audioPanel button{border:1px solid #b6935488;background:#17140f;color:#f5ead2;border-radius:6px;padding:5px 9px;font:700 11px Georgia,serif}

#restart{display:none;position:fixed;z-index:20;inset:0;background:#090b0edc;color:white;align-items:center;justify-content:center;flex-direction:column;gap:16px;text-align:center;padding:24px}
#restart h1{margin:0;font-size:40px}
#endScore{font:900 clamp(28px,6vw,48px) Georgia,"Times New Roman",serif;color:#e9c777;letter-spacing:1px;text-shadow:0 2px 8px #000;margin-top:-4px}
#restart button{font:700 18px system-ui;padding:12px 24px;border:0;border-radius:12px;background:#eee;color:#111}
@media (pointer:fine){
  #joystick,.button{opacity:.64}
}

/* ---------- menú principal 0.6.0 (arquitectura modular) ---------- */
body.menu-active #hud,body.menu-active #message,body.menu-active #objectivePanel,body.menu-active #crisisBanner,body.menu-active #gameMenuBtn,body.menu-active #audioBtn,body.menu-active #audioPanel,body.menu-active #joystick,body.menu-active .button,body.menu-active #altarActions,body.menu-active #mobileZoomControls,body.menu-active .gameModal{display:none!important}
#mainMenu{position:fixed;z-index:100;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#05070b url("../assets/images/menu_pc.png") center center/cover no-repeat;color:#eee;touch-action:auto}
#mainMenu.hidden{display:none}
#mainMenu::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(1,2,5,.05),rgba(1,2,5,.02) 45%,rgba(1,2,5,.48) 100%)}
.menuLogo{position:absolute;z-index:2;left:50%;top:3.5%;transform:translateX(-50%);width:min(760px,58vw);max-height:28vh;object-fit:contain;filter:drop-shadow(0 8px 18px #000b);pointer-events:none}
.menuActions{position:absolute;z-index:3;left:50%;bottom:7.5%;transform:translateX(-50%);display:flex;flex-direction:column;gap:12px;width:min(360px,78vw)}
.menuButton{position:relative;padding:13px 22px;border:1px solid #b58b55;border-radius:7px;background:linear-gradient(180deg,rgba(45,35,52,.95),rgba(17,14,23,.97));color:#f3dfba;font:900 18px Georgia,"Times New Roman",serif;letter-spacing:.6px;text-shadow:0 2px 2px #000;box-shadow:0 5px 18px #000a,inset 0 0 0 1px #2f2140;cursor:pointer;touch-action:manipulation}
.menuButton::before{content:"";position:absolute;inset:3px;border:1px solid rgba(141,90,176,.35);border-radius:4px;pointer-events:none}
.menuButton:hover{filter:brightness(1.14)}
.menuButton:active{transform:translateY(1px);filter:brightness(.92)}
.menuVersion{position:absolute;z-index:3;right:12px;bottom:9px;color:#c7b89c99;font:11px Georgia,serif;text-shadow:0 1px #000}
.menuModal{display:none;position:absolute;z-index:5;inset:0;align-items:center;justify-content:center;padding:20px;background:#05060bd1;touch-action:auto}
.menuModal.open{display:flex}
.menuPanel{position:relative;width:min(620px,92vw);max-height:86vh;overflow:auto;padding:25px 25px 22px;background:linear-gradient(180deg,#2b241df8,#121015fa);border:1px solid #b58b55;border-radius:10px;color:#eadfc9;box-shadow:0 15px 50px #000d,inset 0 0 0 1px #281b35;font:15px/1.48 Georgia,"Times New Roman",serif}
.menuPanel h2{margin:0 38px 16px 0;color:#e9c777;letter-spacing:1px;font-size:24px}
.menuPanel h3{margin:16px 0 6px;color:#d3b889;font-size:16px}
.menuPanel p{margin:7px 0}
.menuPanel .howGrid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.menuPanel .howBox{padding:12px 14px;background:#0004;border:1px solid #b6935444;border-radius:7px}
.menuClose{position:absolute;right:10px;top:9px;width:34px;height:34px;border:1px solid #b58b5577;border-radius:6px;background:#17131b;color:#eadfc9;font:bold 20px Georgia,serif;cursor:pointer}
.menuAudio label{display:grid;grid-template-columns:86px 1fr 36px;gap:9px;align-items:center;margin:13px 0}
.menuAudio input[type=range]{width:100%;accent-color:#8b56a7}
.menuAudio .muteRow{display:flex;justify-content:space-between;align-items:center;margin-top:15px;padding-top:12px;border-top:1px solid #b6935444}
.menuAudio .muteRow button{padding:6px 14px;border:1px solid #b58b55;background:#17131b;color:#eadfc9;border-radius:6px;font:bold 13px Georgia,serif}
@media (pointer:coarse), (max-width:760px){
  #map{display:flex}
  #mainMenu{background-image:url("../assets/images/menu_mobile.png");background-position:center top}
  .menuLogo{top:2.5%;width:min(88vw,620px);max-height:22vh}
  .menuActions{bottom:7%;width:min(360px,80vw);gap:10px}
  .menuButton{font-size:17px;padding:12px 16px}
  .menuPanel{font-size:14px;padding:22px 18px 18px}
  .menuPanel .howGrid{grid-template-columns:1fr;gap:10px}
}
@media (max-height:620px) and (pointer:fine){
  .menuLogo{top:1%;width:min(520px,46vw);max-height:22vh}
  .menuActions{bottom:4%;gap:7px;width:min(330px,55vw)}
  .menuButton{padding:9px 16px;font-size:15px}
}


/* ---------- tutorial, Espectro y altar 0.6.1 ---------- */
#objectivePanel{display:none;position:fixed;z-index:10;left:50%;top:74px;transform:translateX(-50%);width:min(520px,76vw);padding:8px 13px 9px;background:linear-gradient(180deg,#25182eea,#120d17ed);border:1px solid #8d5ba8aa;border-radius:8px;color:#efe2f5;box-shadow:0 4px 16px #0008,inset 0 0 0 1px #3a2447;font:700 12px/1.28 Georgia,"Times New Roman",serif;text-align:center;pointer-events:none}
#objectivePanel.open{display:block}
.objectiveEyebrow{font-size:9px;letter-spacing:1.7px;color:#ba83d1;margin-bottom:3px}
#objectiveText{font-size:13px}
#altarActions{display:none;position:fixed;z-index:14;left:50%;bottom:18px;transform:translateX(-50%);width:min(430px,70vw);padding:9px;background:linear-gradient(180deg,#24162dea,#100c14f2);border:1px solid #905aa8aa;border-radius:10px;box-shadow:0 5px 18px #000a;gap:7px;grid-template-columns:1fr 1fr;touch-action:auto}
#altarActions.open{display:grid}
.altarTitle{grid-column:1/-1;color:#c99cdd;text-align:center;font:900 10px Georgia,serif;letter-spacing:1.2px;padding-bottom:3px}
.altarAction{min-height:42px;border:1px solid #9b6aae;border-radius:7px;background:linear-gradient(180deg,#4a285a,#22162b);color:#f4e6f7;font:900 13px Georgia,serif;cursor:pointer;touch-action:manipulation}
.altarAction span{display:block;color:#d6b4e3;font-size:10px;margin-top:2px}
.altarAction.locked,.altarAction:disabled{opacity:.48;filter:saturate(.35);cursor:not-allowed}
.gameModal{display:none;position:fixed;z-index:30;inset:0;align-items:center;justify-content:center;padding:18px;background:#06040bd8;touch-action:auto}
.gameModal.open{display:flex}
.gamePanel{position:relative;width:min(610px,92vw);max-height:86vh;overflow:auto;padding:24px;background:linear-gradient(180deg,#241a2df8,#100c14fb);border:1px solid #9f6bb4;border-radius:11px;color:#eee2f2;box-shadow:0 15px 55px #000e,inset 0 0 0 1px #3c2648;font:14px/1.45 Georgia,"Times New Roman",serif}
.gamePanel h2{margin:2px 42px 8px 0;color:#ddb7ec;font-size:25px}.gamePanel h3{margin:0 0 5px;color:#e0c2ec}.gamePanel p{margin:4px 0}
.gameClose{position:absolute;right:10px;top:9px;width:34px;height:34px;border:1px solid #9866aa;border-radius:6px;background:#15101b;color:#eee2f2;font:bold 20px Georgia,serif}

.ingameMenuPanel{width:min(410px,90vw)}
.ingameMenuActions{display:grid;gap:10px;margin-top:18px}
.ingameMenuAction{width:100%;padding:11px 14px;border:1px solid #8f765b;border-radius:7px;background:linear-gradient(180deg,#342b24,#181411);color:#f1dfbd;font:800 15px Georgia,"Times New Roman",serif;letter-spacing:.3px;cursor:pointer;touch-action:manipulation}
.ingameMenuAction:hover{filter:brightness(1.12)}
.ingameMenuAction.network{border-color:#78a990;background:linear-gradient(180deg,#293b35,#121b18);color:#cce8d8}
.ingameMenuAction.dangerAction{border-color:#a96565;background:linear-gradient(180deg,#492727,#221313);color:#efc1c1}
.ingameMenuAction:disabled{opacity:.42;cursor:default;filter:none}
.networkInfoPanel{width:min(520px,92vw)}
.networkInfoGrid{display:grid;grid-template-columns:110px 1fr;gap:8px 14px;align-items:center;margin:14px 0 18px;padding:13px;background:#090c0e77;border:1px solid #78978355;border-radius:8px}
.networkInfoGrid span{color:#a99f8c;font-size:12px}.networkInfoGrid b{color:#eadfc9;min-width:0;overflow:hidden;text-overflow:ellipsis}
.networkRoomCode{font:900 25px ui-monospace,Consolas,monospace!important;letter-spacing:3px;color:#c7ebd4!important}
.networkInfoActions{display:grid;gap:8px}.networkInfoHint{margin-top:13px!important;color:#a99d87;font-size:12px!important}
#hud .netline{margin-top:5px;padding-top:5px;border-top:1px solid #6fa08455;color:#bfe0ca;font-weight:800;letter-spacing:.2px}
.shopSpecter{font-size:10px;letter-spacing:2px;color:#aa77bf}.shopEssence{margin:10px 0 14px;padding:8px 10px;background:#0005;border:1px solid #835b9266;border-radius:6px;color:#dbc5e4}.shopEssence b{color:#e5b7f3;font-size:18px}
.upgradeCard{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;padding:13px;background:#110c17;border:1px solid #714a8266;border-radius:8px}.upgradeCard button{min-width:150px;padding:10px 12px;border:1px solid #a271b5;border-radius:6px;background:#432450;color:#f4e7f7;font:bold 12px Georgia,serif}.upgradeCard button:disabled{opacity:.5}.upgradeCard.unlocked{border-color:#78945d88}.upgradeCard.unlocked button{background:#26351d;border-color:#728f58;color:#dceacb}.shopHint{margin-top:14px!important;color:#aa9caf;font-size:11px;font-style:italic}
@media (pointer:coarse),(max-width:720px){#objectivePanel{top:64px;width:82vw}.upgradeCard{grid-template-columns:1fr}.upgradeCard button{width:100%}#altarActions{width:74vw;bottom:112px;left:50%}.altarAction{font-size:11px;min-height:40px}}

/* ---------- Android / WebView 0.6.15 ---------- */
@media (pointer:coarse), (max-width:760px){
  #hud{left:8px;top:8px;min-width:0;width:min(200px,calc(100vw - 150px));max-width:200px;padding:6px 7px 7px;font-size:9.5px;line-height:1.12;border-radius:7px}
  #hud .brand{font-size:12px;letter-spacing:1.2px;padding-bottom:3px;margin-bottom:3px}
  #hud .clockrow{gap:5px;margin-bottom:3px}
  #hud .clock{font-size:12px}
  #hud .place{max-width:82px}
  #hud .stats{gap:2px 4px}
  #hud .stat{padding:2px 3px}
  #hud .statusline{margin-top:3px;padding-top:3px;font-size:9px}
  #objectivePanel{left:8px;right:58px;top:116px;transform:none;width:auto;max-width:none;padding:6px 8px 7px;font-size:10px}
  #objectiveText{font-size:11px}
  #gameMenuBtn{right:8px;top:112px;width:42px;height:34px}
  #audioBtn{right:8px;top:152px;width:42px;height:34px}
  #audioPanel{right:8px;top:192px;width:min(218px,calc(100vw - 16px))}
  #message{top:154px;max-width:calc(100vw - 24px);font-size:11px;padding:6px 9px}
  #crisisBanner{top:196px;max-width:calc(100vw - 24px);font-size:11px}
  #joystick{left:calc(14px + env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));width:132px;height:132px}
  #stick{left:37px;top:37px;width:54px;height:54px}
  #action{right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));width:78px;height:78px}
  #form{right:calc(24px + env(safe-area-inset-right,0px));bottom:calc(112px + env(safe-area-inset-bottom,0px));width:68px;height:68px}
  #carry{right:calc(104px + env(safe-area-inset-right,0px));bottom:calc(30px + env(safe-area-inset-bottom,0px));width:66px;height:66px}
  #wheelbarrow{right:calc(178px + env(safe-area-inset-right,0px));bottom:calc(33px + env(safe-area-inset-bottom,0px));width:60px;height:60px}
  #map{right:calc(104px + env(safe-area-inset-right,0px));bottom:calc(108px + env(safe-area-inset-bottom,0px));width:60px;height:60px}
  #altarActions{bottom:calc(154px + env(safe-area-inset-bottom,0px));width:calc(100vw - 32px)}
}

/* ---------- multijugador 0.8.0 ---------- */
.menuButtonNetwork{background:linear-gradient(180deg,rgba(38,48,55,.96),rgba(14,20,25,.98));border-color:#8fae9c;box-shadow:0 5px 18px #000a,inset 0 0 0 1px #233a35}
.menuButtonNetwork::before{border-color:rgba(108,162,139,.34)}
.multiplayerPanel{width:min(560px,92vw)}
.mpIntro{color:#cfc5b2;margin-bottom:18px!important}
.mpField{display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:center;margin:12px 0;font:bold 14px Georgia,"Times New Roman",serif}
.mpField input{width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #8d7658;border-radius:6px;background:#0d0f12;color:#f0dfbd;font:14px ui-monospace,Consolas,monospace;outline:none}
.mpField input:focus{border-color:#b9d0bf;box-shadow:0 0 0 2px #6d9c8133}
.mpConnect{width:100%;margin-top:14px;font-size:16px}
.mpStatus{margin-top:13px;padding:10px 12px;border:1px solid #6d9c8155;border-radius:6px;background:#0d1713aa;color:#bfe0ca;font:13px/1.35 system-ui,sans-serif}
.mpStatus.error{border-color:#a8595955;background:#1c0e0eaa;color:#efb3b3}
.mpHint{margin-top:13px!important;color:#a99d87;font-size:12px!important}
@media (pointer:coarse),(max-width:760px){.mpField{grid-template-columns:1fr;gap:5px}.multiplayerPanel{max-height:90vh}.menuActions{gap:7px}.menuButtonNetwork{font-size:15px;padding:10px 14px}}

@media (pointer:coarse),(max-width:560px){.networkInfoGrid{grid-template-columns:86px 1fr;gap:7px 10px}.networkRoomCode{font-size:21px!important}}

/* ---------- lobby cooperativo 0.8.6 ---------- */
.lobbyPanel{width:min(560px,92vw);text-align:center}
.lobbyRole{color:#cfc5b2;margin-bottom:14px!important}
.lobbyCodeBox{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;margin:12px 0 16px;padding:12px 14px;background:#080d0bcc;border:1px solid #6d9c8155;border-radius:8px;text-align:left}
.lobbyCodeBox span{font:800 10px system-ui,sans-serif;letter-spacing:1.4px;color:#91aa9a}.lobbyCodeBox b{font:900 25px ui-monospace,Consolas,monospace;letter-spacing:4px;color:#d5f0df}
.lobbyCodeBox button{padding:7px 10px;border:1px solid #789783;border-radius:6px;background:#17231e;color:#d3e7da;font:bold 12px Georgia,serif;cursor:pointer}
.lobbyPlayers{display:grid;gap:7px;margin:10px 0 14px;text-align:left}.lobbyPlayer{display:grid;grid-template-columns:18px 1fr auto;gap:9px;align-items:center;padding:9px 11px;background:#090b0dcc;border:1px solid #8d765844;border-radius:7px}.lobbyPlayer.me{border-color:#b7d0bf88;background:#111a16dd}.lobbyPlayer span:last-child{font:11px ui-monospace,Consolas,monospace;color:#a9a08f}.lobbyColor{width:14px;height:14px;border-radius:50%;box-shadow:0 0 0 2px #0007,0 0 8px #fff2}
.lobbyStart{width:100%;margin-top:14px;background:linear-gradient(180deg,#31513f,#17291f);border-color:#8db49b}.lobbyLeave{width:100%;margin-top:8px;background:linear-gradient(180deg,#452828,#211414);border-color:#9c6868}.mpStatus.error{color:#efb3b3}
#revivePlayerBtn{grid-column:1/-1;border-color:#bc9b66;background:linear-gradient(180deg,#5a4424,#2d2113);color:#f3ddb1}
@media (pointer:coarse),(max-width:620px){.lobbyCodeBox{grid-template-columns:1fr auto}.lobbyCodeBox span{grid-column:1/-1}.lobbyCodeBox b{font-size:22px}.lobbyPanel{max-height:90vh}}


#spectatorHud{display:none;position:fixed;z-index:14;left:50%;bottom:22px;transform:translateX(-50%);min-width:min(520px,calc(100vw - 26px));max-width:620px;padding:10px 14px 12px;border:1px solid #b69354aa;border-radius:12px;background:#120f13e8;color:#f4e7ca;text-align:center;box-shadow:0 6px 22px #0009;backdrop-filter:blur(4px)}
#spectatorHud.open{display:block}.spectatorDeath{font:700 17px Georgia,serif;color:#d9a7b0;letter-spacing:.08em}.spectatorHint{margin:4px 0 8px;font:12px system-ui;color:#cbbfa9}.spectatorControls{display:flex;align-items:center;justify-content:center;gap:10px}.spectatorControls button{width:42px;height:32px;border:1px solid #a98851;border-radius:8px;background:#2a2119;color:#f1ddb1;font:700 16px system-ui;cursor:pointer}.spectatorControls button:hover{filter:brightness(1.14)}#spectatorTarget{min-width:150px;font:700 13px system-ui;color:#fff2d5}
body.menu-active #spectatorHud{display:none!important}
@media(max-width:720px){#spectatorHud{bottom:9px;padding:8px 10px}.spectatorHint{font-size:10px}.spectatorControls button{width:38px;height:30px}}

/* 0.8.18 — estado de reconexión: mantiene la partida visible pero bloquea input hasta resincronizar. */
#networkRecoveryHud{display:none;position:fixed;z-index:18;left:50%;top:18px;transform:translateX(-50%);min-width:min(460px,calc(100vw - 28px));padding:9px 14px;border:1px solid #c39b5e99;border-radius:10px;background:#151116ed;color:#f3e4c8;text-align:center;box-shadow:0 6px 24px #0009;pointer-events:none}
#networkRecoveryHud.open{display:flex;flex-direction:column;gap:3px}#networkRecoveryTitle{font:700 13px Georgia,serif;letter-spacing:.08em;color:#e6bd7b}#networkRecoveryText{font:12px system-ui;color:#d9cdb7}
body.menu-active #networkRecoveryHud{display:none!important}
@media(max-width:720px){#networkRecoveryHud{top:8px;padding:7px 10px}#networkRecoveryText{font-size:10px}}

/* ---------- 0.8.22 · Mando ritual RTS ---------- */
#ritualCommandBtn{position:fixed;z-index:12;right:12px;top:202px;display:flex;align-items:center;justify-content:center;gap:6px;min-width:88px;height:38px;padding:0 9px;border:1px solid #97714d;border-radius:7px;background:linear-gradient(180deg,#463526,#201811);color:#f0d8ad;box-shadow:0 5px 16px #0009,inset 0 0 0 1px #b78b5630;font:800 10px Georgia,serif;letter-spacing:.6px;cursor:pointer;touch-action:manipulation}
#ritualCommandBtn:hover{filter:brightness(1.13)}#ritualCommandBtn .ritualCommandGlyph{font-size:17px;color:#c48cd4;text-shadow:0 0 9px #8d46a0}.ritualCommandLabel{white-space:nowrap}#ritualCommandBadge{display:none;min-width:17px;height:17px;padding:0 3px;box-sizing:border-box;border-radius:9px;background:#79425d;color:#fff2df;font:800 10px/17px system-ui;text-align:center}#ritualCommandBadge.active{display:inline-block}
#ritualCommandDrawer{position:fixed;z-index:24;left:50%;bottom:0;width:min(900px,calc(100vw - 20px));transform:translate(-50%,calc(100% + 24px));opacity:.2;pointer-events:none;transition:transform .24s cubic-bezier(.2,.78,.25,1),opacity .18s ease}
#ritualCommandDrawer.open{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.ritualCommandFrame{margin:0 auto 8px;border:2px solid #866746;border-bottom-width:3px;border-radius:10px 10px 6px 6px;background:linear-gradient(180deg,#33281eeb,#17120fee);box-shadow:0 -10px 38px #000b,inset 0 0 0 2px #1a1009;color:#ead9bb;backdrop-filter:blur(5px);overflow:hidden}
.ritualCommandHeader{display:grid;grid-template-columns:1fr auto 38px;gap:14px;align-items:center;padding:9px 12px;border-bottom:1px solid #8c69484d;background:linear-gradient(180deg,#4a3928,#2b2118)}.ritualCommandHeader h2{margin:1px 0 0;font:700 18px Georgia,serif;color:#f0dfbd}.ritualEyebrow{font:800 8px system-ui;letter-spacing:1.7px;color:#b88cc3}.ritualStock{display:flex;gap:8px;align-items:baseline;padding:5px 9px;border:1px solid #75583d;border-radius:5px;background:#120e0bd9}.ritualStock span{font:700 9px system-ui;color:#afa18c}.ritualStock b{font:900 15px ui-monospace,Consolas,monospace;color:#e2c7a0}.ritualDrawerClose{width:34px;height:32px;border:1px solid #8b6548;border-radius:5px;background:#2b1d17;color:#e7cbb5;font:700 22px/28px Georgia,serif;cursor:pointer}
.ritualCommandBody{display:grid;grid-template-columns:minmax(0,1fr) 330px;min-height:190px;max-height:42vh}.ritualCommandCatalog{padding:12px;overflow:auto}.ritualCommandView.hidden,.rtsCommandTile.hidden{display:none!important}.ritualTileGrid,.ritualCommandRoot{display:grid;grid-template-columns:repeat(auto-fill,minmax(116px,1fr));gap:9px;align-content:start}.rtsCommandTile{position:relative;aspect-ratio:1.08/1;min-height:108px;padding:8px;border:2px ridge #886744;border-radius:4px;background:linear-gradient(145deg,#4b3a27,#241b13 70%);color:#ead8b8;box-shadow:inset 0 0 0 1px #14100b,0 3px 7px #0008;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px;cursor:pointer}.rtsCommandTile[data-hotkey]::after{content:attr(data-hotkey);position:absolute;top:5px;right:6px;min-width:18px;height:18px;padding:0 2px;display:grid;place-items:center;border:1px solid #c8a56d;border-radius:3px;background:#17110ce8;color:#f3d99f;font:900 11px/1 ui-monospace,Consolas,monospace;box-shadow:0 2px 4px #0009}.rtsCommandTile:hover:not(:disabled){filter:brightness(1.15);border-color:#b38d5e}.rtsCommandTile:disabled{filter:grayscale(.72);opacity:.48;cursor:default}.rtsTileIcon{display:grid;place-items:center;width:47px;height:47px;border:1px solid #ad885d;border-radius:3px;background:radial-gradient(circle at 45% 35%,#60472f,#21170f 68%);font:700 26px Georgia,serif;color:#d9b87f;box-shadow:inset 0 0 10px #0009}.ritualIconSacrifice{color:#d56f77;text-shadow:0 0 8px #8f2734}.ritualIconReanimate{color:#9bb984;text-shadow:0 0 8px #50743a}.rtsCommandTile b{font:700 12px Georgia,serif}.rtsCommandTile small{font:9px system-ui;color:#b5a68e}.categoryTile .rtsTileIcon{color:#c592d4}.ritualBackBtn{margin-bottom:9px;padding:6px 10px;border:1px solid #70563e;border-radius:4px;background:#231a13;color:#ccb99b;font:700 10px system-ui;cursor:pointer}
.ritualQueuePanel{padding:10px;border-left:1px solid #80624655;background:#100d0bdc;overflow:auto}.ritualQueueTitle{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:7px;color:#d7c19e}.ritualQueueTitle span{font:800 9px system-ui;letter-spacing:1.2px}.ritualQueueTitle small{font:8px system-ui;color:#8f8373}.ritualQueueList{display:grid;gap:5px}.ritualQueueEmpty{padding:12px;border:1px dashed #66513d;color:#827565;text-align:center;font:10px system-ui}.ritualQueueJob{position:relative;overflow:hidden;padding:7px 8px;border:1px solid #5c4937;border-radius:4px;background:#211811;color:#d6c4a6}.ritualQueueJob.active{border-color:#9d7151;background:#2c1e16}.ritualQueueJobHead{position:relative;z-index:2;display:flex;justify-content:space-between;gap:8px;font:700 10px system-ui}.ritualQueueJobHead small{font:8px system-ui;color:#9e8b77}.ritualQueueProgress{position:absolute;z-index:0;left:0;bottom:0;width:0;height:100%;background:linear-gradient(90deg,#744b673e,#9b6b7655);pointer-events:none}.ritualQueueJob.pending .ritualQueueProgress{display:none}
.specterShopList{display:grid;gap:10px}.specterShopCard{grid-template-columns:64px 1fr auto}.shopItemIcon{display:grid;place-items:center;width:54px;height:54px;border:1px solid #8f6a9b;border-radius:6px;background:radial-gradient(circle at 40% 30%,#4b3452,#150f19 72%);color:#d6aee0;font:700 28px Georgia,serif;box-shadow:inset 0 0 12px #000a}.storageIcon{color:#c8a477;border-color:#8b704d;background:radial-gradient(circle at 40% 30%,#57442c,#18120d 72%)}.shopMiniText{margin-top:4px!important;font-size:10px!important;color:#a89b8d!important}
body.menu-active #ritualCommandBtn,body.menu-active #ritualCommandDrawer{display:none!important}
@media(pointer:coarse),(max-width:720px){#ritualCommandBtn{right:8px;top:192px;min-width:42px;width:42px;height:34px;padding:0}.ritualCommandLabel{display:none}#ritualCommandBtn .ritualCommandGlyph{font-size:15px}#ritualCommandBadge{position:absolute;right:-4px;top:-5px}.ritualCommandBody{grid-template-columns:1fr;max-height:55vh}.ritualQueuePanel{border-left:0;border-top:1px solid #80624655;max-height:150px}.ritualCommandDrawer{width:calc(100vw - 12px)}.ritualCommandFrame{margin-bottom:4px}.ritualCommandHeader{grid-template-columns:1fr auto 34px;padding:7px 8px;gap:7px}.ritualCommandHeader h2{font-size:15px}.ritualStock span{display:none}.ritualTileGrid,.ritualCommandRoot{grid-template-columns:repeat(3,minmax(86px,1fr))}.rtsCommandTile{min-height:92px}.rtsTileIcon{width:40px;height:40px;font-size:22px}.specterShopCard{grid-template-columns:54px 1fr}.specterShopCard button{grid-column:1/-1}}
/* Ajuste de estructura real de la cola 0.8.22 */
.ritualQueueJob{display:grid;grid-template-columns:42px minmax(0,1fr) 28px;gap:8px;align-items:center}.ritualQueueThumb{position:relative;z-index:2;display:grid;place-items:center;width:38px;height:38px;border:1px solid #76573f;border-radius:4px;background:radial-gradient(circle at 40% 32%,#513d2c,#17100c 72%);box-shadow:inset 0 0 9px #000a}.ritualQueueThumb span{font:700 21px Georgia,serif}.ritualQueueThumb i{position:absolute;right:-4px;bottom:-4px;display:grid;place-items:center;min-width:15px;height:15px;padding:0 2px;border:1px solid #785c43;border-radius:8px;background:#130e0a;color:#cfbea1;font:800 8px ui-monospace,monospace;font-style:normal}.ritualQueueThumb.sacrifice span{color:#d56f77;text-shadow:0 0 7px #8f2734}.ritualQueueThumb.reanimate span{color:#9bb984;text-shadow:0 0 7px #50743a}.ritualQueueInfo{position:relative;z-index:2;display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;min-width:0}.ritualQueueInfo b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 10px Georgia,serif}.ritualQueueInfo>span{font:8px system-ui;color:#a69580}.ritualQueueTrack{grid-column:1/-1;height:5px;border:1px solid #4e3b2e;border-radius:3px;background:#0b0907;overflow:hidden}.ritualQueueTrack i{display:block;width:0;height:100%;background:linear-gradient(90deg,#815568,#b07b72);transition:width .08s linear}.ritualQueueCancel{position:relative;z-index:3;width:26px;height:26px;padding:0;border:1px solid #754b43;border-radius:4px;background:#2a1715;color:#e3b3aa;font:800 17px/22px Georgia,serif;cursor:pointer}.ritualQueueCancel:hover{background:#49211d;border-color:#aa6255;color:#fff0e8}
#ritualCommandBadge.show{display:inline-block}

@media(pointer:coarse),(max-width:720px){body.ritual-drawer-open #joystick{z-index:26;opacity:.88}}

/* ---------- 0.8.29 · Árbol de la Epidemia + Brujería ---------- */
.epidemicModal{align-items:center}.epidemicShop{width:min(1120px,96vw);max-height:92vh;padding:20px 22px 22px;background:radial-gradient(circle at 50% 0,#203323 0,#121911 34%,#0b0d0b 72%);border-color:#6d8f65;box-shadow:0 20px 70px #000f,inset 0 0 70px #213c2138}.epidemicShopHeader{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;padding:3px 48px 12px 2px;border-bottom:1px solid #70856955}.epidemicShopHeader h2{margin:3px 0 3px;color:#b8d99f;text-shadow:0 0 14px #66905055}.epidemicShopHeader p{max-width:660px;color:#a9b49d;font-size:12px}.epidemicShopHeader .shopSpecter{color:#87af7b}.epidemicShopHeader .shopEssence{margin:0;min-width:180px;border-color:#718f675f;background:#091108cc;color:#b9caaa}.epidemicShopHeader .shopEssence b{color:#b8e48d}
.epidemicBranchHint{margin:10px 0;padding:8px 12px;border:1px solid #71846655;border-radius:6px;background:#10170ecc;color:#adbba2;font:11px/1.4 system-ui}.epidemicTreeRoot{display:grid;gap:18px;padding:12px 4px 18px}.epidemicTrunk{display:flex;flex-direction:column;align-items:center}.epidemicConnector{width:2px;height:14px;background:linear-gradient(#5a7356,#293b2b);box-shadow:0 0 7px #789b6550}.epidemicNode{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:12px;align-items:center;width:min(620px,100%);min-height:78px;padding:9px 10px;border:1px solid #51634d;border-radius:8px;background:linear-gradient(135deg,#182018,#0d110d 72%);box-shadow:inset 0 0 0 1px #293628,0 4px 12px #0007;transition:.16s transform,.16s filter,.16s border-color}.epidemicNode img{width:62px;height:62px;border-radius:8px;object-fit:cover;box-shadow:0 0 14px #0009}.epidemicNodeText h3{margin:0 0 2px;color:#d7e5c9;font-size:15px}.epidemicNodeText span{font:800 9px system-ui;letter-spacing:.65px;color:#789b6f}.epidemicNodeText p{margin:4px 0 0;color:#a9b2a1;font:11px/1.35 system-ui}.epidemicNode button{min-width:126px;padding:8px 9px;border:1px solid #739168;border-radius:5px;background:#24351f;color:#dcebd0;font:800 10px Georgia,serif;cursor:pointer}.epidemicNode.available:hover{transform:translateY(-1px);border-color:#9bc18d;filter:brightness(1.09)}.epidemicNode.owned{border-color:#7eb66e;background:linear-gradient(135deg,#1d321c,#101a10 72%)}.epidemicNode.owned button{background:#162313;color:#8fb780}.epidemicNode.locked{filter:grayscale(.78);opacity:.58}.epidemicNode.blocked{filter:grayscale(1);opacity:.38;border-color:#5a4949}.epidemicNode.poor button{opacity:.55}.epidemicNode.ultimate{border-width:2px;box-shadow:inset 0 0 22px #6a9a5625,0 0 18px #0009}.epidemicNode.ultimate h3{font-size:16px;letter-spacing:.8px}
.epidemicFork{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:22px}.epidemicFork:before{content:"";position:absolute;left:25%;right:25%;top:-9px;height:2px;background:linear-gradient(90deg,#5f8b71,#495443,#925750)}.epidemicBranch{padding:10px;border:1px solid #4c5a48;border-radius:10px;background:#0a0d0aaa}.epidemicBranch>header{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:10px;padding:4px 5px 9px;border-bottom:1px solid #ffffff12}.epidemicBranch>header b{font:800 12px Georgia,serif;letter-spacing:1px}.epidemicBranch>header small{font:9px system-ui;color:#8e9b8a}.epidemicBranch .epidemicNode{width:auto;grid-template-columns:62px minmax(0,1fr);}.epidemicBranch .epidemicNode img{width:54px;height:54px}.epidemicBranch .epidemicNode button{grid-column:1/-1;width:100%}.epidemicBranch.silent{border-color:#4f7e6d}.epidemicBranch.silent>header b,.epidemicNode.silent .epidemicNodeText span{color:#78bd9d}.epidemicNode.silent.owned{border-color:#5a9d81;background:linear-gradient(135deg,#152a22,#0b1410 72%)}.epidemicBranch.rabid{border-color:#81524b}.epidemicBranch.rabid>header b,.epidemicNode.rabid .epidemicNodeText span{color:#c57969}.epidemicNode.rabid.owned{border-color:#a45f52;background:linear-gradient(135deg,#321a17,#170d0c 72%)}
.epidemicUtilities{margin-top:4px;padding-top:14px;border-top:1px solid #64705d55}.epidemicUtilitiesTop{margin:12px 0 8px;padding:10px 0 12px;border-top:0;border-bottom:1px solid #64705d55}.epidemicUtilityTitle{display:flex;justify-content:space-between;gap:10px;margin-bottom:9px;color:#bfcaaf}.epidemicUtilityTitle b{font:800 10px system-ui;letter-spacing:1.4px}.epidemicUtilityTitle span{font:9px system-ui;color:#8f9988}.witchCategory .rtsTileIcon{color:#86be79;text-shadow:0 0 9px #4d8543}.witchcraftIntro{display:flex;justify-content:space-between;gap:8px;margin-bottom:9px;padding:7px 9px;border:1px solid #58714f;border-radius:5px;background:#10180f;color:#bdcfb5}.witchcraftIntro b{font:800 10px system-ui;letter-spacing:1.3px}.witchcraftIntro span{font:9px system-ui;color:#91a18b}.witchTile{aspect-ratio:auto;min-height:132px}.rtsSkillImg{width:52px;height:52px;border-radius:5px;border:1px solid #7f916e;box-shadow:0 0 12px #0009}.witchTile.silent{border-color:#4e806d;background:linear-gradient(145deg,#27483a,#14241d 72%)}.witchTile.rabid{border-color:#875448;background:linear-gradient(145deg,#4b2821,#251511 72%)}.witchTile.ultimate{box-shadow:inset 0 0 14px #b8d56f28,0 3px 9px #0009}.witchcraftGrid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr))}
@media(max-width:820px){.epidemicShop{padding:14px 12px}.epidemicShopHeader{display:grid;padding-right:42px}.epidemicShopHeader .shopEssence{min-width:0}.epidemicFork{grid-template-columns:1fr}.epidemicFork:before{display:none}.epidemicNode{grid-template-columns:58px minmax(0,1fr)}.epidemicNode img{width:52px;height:52px}.epidemicNode button{grid-column:1/-1;width:100%}.epidemicBranch .epidemicNode{grid-template-columns:52px minmax(0,1fr)}.epidemicUtilityTitle{display:grid}.epidemicShopHeader h2{font-size:21px}.witchcraftIntro{display:grid}}

/* ---------- 0.8.30 · Estado de crisis urbana ---------- */
.citycrisis{margin-top:5px;padding:4px 7px;border:1px solid #6d6754aa;border-radius:4px;background:#17150fd9;color:#cfc6a8;font:800 9px system-ui;letter-spacing:.9px}.citycrisis-1{border-color:#9a7c45;color:#d9bf7c}.citycrisis-2{border-color:#a46f45;color:#e0a56f}.citycrisis-3{border-color:#a84c43;color:#ef8f82;box-shadow:inset 0 0 10px #7d271f33}.citycrisis-4{border-color:#762d37;color:#f06d76;background:#241013e6;box-shadow:inset 0 0 14px #8b243844}


/* ---------- demo + configuración + chat 0.8.40 ---------- */
.menuDemoBadge{position:absolute;z-index:4;left:calc(50% + min(25vw,325px));top:8.5%;transform:rotate(4deg);padding:5px 10px;border:1px solid #d8b66b99;border-radius:4px;background:#17120ed9;color:#e8c77f;font:900 13px/1 system-ui,sans-serif;letter-spacing:2px;box-shadow:0 4px 16px #000b;text-shadow:0 1px #000;pointer-events:none}
.setupPanel{width:min(520px,92vw);text-align:left}.setupPanel>p{color:#cfc5b2}.setupStart{width:100%;margin-top:16px}
.densitySetting{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1.25fr) 58px;align-items:center;gap:12px;margin:13px 0;padding:12px;border:1px solid #8d765855;border-radius:8px;background:#090b0dcc;color:#eadfc9}.densitySetting>span{display:grid;gap:3px}.densitySetting small{font:11px/1.25 system-ui,sans-serif;color:#a89d8b}.densitySetting input[type=range]{width:100%;accent-color:#9d7b4e}.densitySetting>b:last-child{font:800 13px ui-monospace,Consolas,monospace;text-align:right;color:#e7c985;white-space:nowrap}.mpDensitySetting{margin:6px 0 11px}.lobbyDensitySetting{margin:12px 0;text-align:left}.lobbyDensitySetting input:disabled{opacity:.55}.ingameVersion{font-size:10px;opacity:.65;margin-left:5px}
#mpChat{position:fixed;z-index:14;left:12px;bottom:12px;width:min(420px,calc(100vw - 24px));display:none;pointer-events:auto;font-family:system-ui,sans-serif}#mpChat.open{display:block}#mpChatMessages{max-height:150px;overflow:auto;display:flex;flex-direction:column;gap:3px;padding:7px 8px;background:linear-gradient(180deg,#080a0bcf,#080a0ba8);border:1px solid #9b7c5155;border-radius:7px 7px 0 0;scrollbar-width:thin}.mpChatMessage{display:grid;grid-template-columns:auto 1fr;gap:7px;align-items:start;padding:2px 1px;color:#eee3d1;font-size:12px;line-height:1.25;text-shadow:0 1px 2px #000}.mpChatMessage b{white-space:nowrap}.mpChatMessage span{overflow-wrap:anywhere}#mpChatForm{display:grid;grid-template-columns:1fr auto;background:#11100fe6;border:1px solid #9b7c5177;border-top:0;border-radius:0 0 7px 7px;overflow:hidden}#mpChatInput{min-width:0;border:0;outline:0;padding:8px 9px;background:transparent;color:#f5ead7;font:12px system-ui,sans-serif}#mpChatInput::placeholder{color:#a79b87}#mpChatSend{border:0;border-left:1px solid #9b7c5155;padding:0 10px;background:#34291e;color:#e7c985;font:bold 11px Georgia,serif;cursor:pointer}
body.menu-active #mpChat{display:none!important}
@media (pointer:coarse),(max-width:760px){.menuDemoBadge{left:auto;right:8%;top:5.5%;font-size:10px;padding:4px 7px}.densitySetting{grid-template-columns:1fr 54px;gap:8px}.densitySetting>span{grid-column:1/-1}.densitySetting input[type=range]{grid-column:1}.densitySetting>b:last-child{grid-column:2}.setupPanel{max-height:88vh}#mpChat{left:8px;bottom:174px;width:min(330px,calc(100vw - 16px))}#mpChatMessages{max-height:105px}.mpChatMessage{font-size:11px}#mpChatInput{font-size:16px;padding:7px 8px}}

/* ---------- controles ingame 0.8.40 ---------- */
.controlsInfoPanel{width:min(760px,94vw);max-height:90vh;overflow:auto}
.controlsInfoGrid{display:grid;gap:8px;margin:14px 0 12px}
.controlRow{display:grid;grid-template-columns:minmax(160px,210px) 1fr;gap:14px;align-items:center;padding:10px 11px;border:1px solid #68574488;border-radius:6px;background:linear-gradient(90deg,#1a1512e8,#100d0be8)}
.controlKeys{display:flex;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:wrap;color:#9e917d;font:700 10px system-ui;text-transform:uppercase}
.controlKeys kbd{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:30px;padding:4px 9px;border:1px solid #a88a67;border-bottom-width:3px;border-radius:5px;background:linear-gradient(180deg,#3b3027,#211a15);box-shadow:0 2px 5px #0008;color:#f2dfbd;font:800 12px system-ui;white-space:nowrap}
.controlRow b{display:block;margin-bottom:2px;color:#efd9b4;font:800 13px Georgia,"Times New Roman",serif}
.controlRow small{display:block;color:#b7aa95;font:11px/1.35 system-ui}
.controlsInfoHint{margin:6px 0 13px;color:#9f9380;font:11px/1.4 system-ui}
@media (max-width:620px){.controlsInfoPanel{max-height:92vh;padding:15px}.controlRow{grid-template-columns:1fr;gap:7px}.controlKeys{justify-content:flex-start}.controlKeys kbd{min-height:28px;font-size:11px}}


/* ---------- 0.8.40 · notas de parche + zoom Android ---------- */
.patchNotesSideButton{position:absolute;z-index:3;left:18px;bottom:18px;padding:9px 13px;border:1px solid #9e8058;border-radius:7px;background:linear-gradient(180deg,#302719e8,#17140fe8);color:#e8d4ae;font:800 12px Georgia,"Times New Roman",serif;letter-spacing:.35px;cursor:pointer;box-shadow:0 4px 14px #0009;touch-action:manipulation}
.patchNotesSideButton:hover{filter:brightness(1.13)}
.patchNotesPanel{width:min(760px,94vw);max-height:88vh;overflow:auto;text-align:left}
.patchNotesEyebrow{font:800 10px/1.2 system-ui;letter-spacing:1.8px;color:#b49a72;margin-bottom:4px}.patchNotesIntro{color:#bdb09a!important}.patchNotesList{display:grid;gap:12px;margin-top:15px}.patchNoteEntry{padding:14px 16px;border:1px solid #8f765955;border-radius:9px;background:#0d0d10cc;box-shadow:inset 0 0 0 1px #0008}.patchNoteEntry header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:9px;margin-bottom:8px;border-bottom:1px solid #8f765944}.patchNoteEntry header div{display:flex;align-items:center;gap:8px}.patchNoteEntry header b{font:900 18px Georgia,serif;color:#edcf91}.patchNoteEntry header span{padding:3px 6px;border:1px solid #8c6a9d77;border-radius:5px;color:#caa8d8;font:800 9px system-ui;letter-spacing:1px}.patchNoteEntry time{color:#9e927f;font:11px ui-monospace,Consolas,monospace}.patchNoteEntry ul{margin:0;padding-left:20px;color:#d6cab7;font:13px/1.45 system-ui}.patchNoteEntry li+li{margin-top:6px}
#mobileZoomControls{display:none;position:fixed;z-index:12;right:8px;top:234px;align-items:center;gap:4px;padding:4px;border:1px solid #b6935477;border-radius:8px;background:#17140fe8;box-shadow:0 4px 13px #0008;touch-action:none;user-select:none}
#mobileZoomControls.available{display:flex}.mobileZoomButton{width:34px;height:32px;padding:0;border:1px solid #b6935488;border-radius:6px;background:linear-gradient(180deg,#392e21,#1d1811);color:#f2dfb2;font:900 20px/1 Georgia,serif;touch-action:manipulation}.mobileZoomButton:disabled{opacity:.32}#mobileZoomLabel{min-width:43px;color:#d8c39c;font:800 10px ui-monospace,Consolas,monospace;text-align:center}
@media(pointer:fine){#mobileZoomControls{display:none!important}}
@media(pointer:coarse),(max-width:760px){.patchNotesSideButton{left:8px;bottom:8px;padding:7px 10px;font-size:10px}.patchNotesPanel{max-height:92vh;padding:15px}.patchNoteEntry header{align-items:flex-start;flex-direction:column;gap:5px}.patchNoteEntry{padding:12px}.patchNoteEntry ul{font-size:12px}#mobileZoomControls{right:8px;top:232px}}

/* ---------- 0.9.1 · HUD móvil compacto ---------- */
#mpChatToggle{display:none}
@media (pointer:coarse),(max-width:760px){
  /* Las opciones secundarias viven en ESC; evitamos una columna de botones permanente. */
  #audioBtn{display:none!important}
  #hud{left:6px;top:6px;width:min(166px,calc(100vw - 58px));max-width:166px;padding:4px 5px 5px;font-size:8.5px;line-height:1.06;border-radius:6px;background:linear-gradient(180deg,#302719d9,#17140fd9)}
  #hud .brand{font-size:10px;letter-spacing:.7px;padding-bottom:2px;margin-bottom:2px;gap:4px}
  #hud .brand>span:first-child>span{display:none}
  #hud .brand>span:last-child{font-size:9px!important}
  #hud .clockrow{gap:4px;margin-bottom:2px}#hud .clock{font-size:10px}
  #hud .clock{font-size:10px}#hud .place{max-width:72px}
  #hud .stats{gap:1px 3px}#hud .stat{padding:1px 2px}
  #hud .citycrisis{margin-top:2px;padding:2px 4px;font-size:8px;letter-spacing:.35px}
  #hud .statusline{margin-top:2px;padding-top:2px;font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #hud .netline{margin-top:2px;padding-top:2px;font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* Barra secundaria compacta a la derecha. */
  #gameMenuBtn{right:6px;top:6px;width:38px;height:30px;border-radius:7px;font-size:16px}
  #ritualCommandBtn{right:6px;top:42px;min-width:38px;width:38px;height:30px;border-radius:7px;padding:0}
  #map{display:flex;right:6px;top:78px;bottom:auto;width:38px;height:34px;border-radius:7px;font-size:8px;border-width:1px}
  #mobileZoomControls{right:6px;top:118px;gap:2px;padding:2px;border-radius:7px}
  #mobileZoomLabel{display:none}.mobileZoomButton{width:30px;height:28px;border-width:1px;font-size:18px}

  #objectivePanel{left:6px;right:50px;top:102px;transform:none;width:auto;max-width:none;padding:4px 7px 5px;font-size:9px;opacity:.94}
  #objectiveText{font-size:10px}.objectiveEyebrow{font-size:7px;margin-bottom:1px}
  #message{top:140px;max-width:calc(100vw - 60px);font-size:10px;padding:5px 7px}
  #crisisBanner{top:174px;max-width:calc(100vw - 60px);padding:6px 9px;font-size:9px}

  /* Controles esenciales: más pequeños, pero conservan una superficie táctil cómoda. */
  #joystick{left:calc(10px + env(safe-area-inset-left,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));width:110px;height:110px;border-width:1px}
  #stick{left:33px;top:33px;width:42px;height:42px;border-width:1px}
  #action{right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));width:64px;height:64px;font-size:11px;border-width:1px}
  #form{right:calc(14px + env(safe-area-inset-right,0px));bottom:calc(82px + env(safe-area-inset-bottom,0px));width:52px;height:52px;font-size:9px;border-width:1px}
  #carry{right:calc(80px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));width:52px;height:52px;font-size:9px;border-width:1px}
  #wheelbarrow{right:calc(138px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));width:50px;height:50px;font-size:8px;border-width:1px}
  #altarActions{bottom:calc(118px + env(safe-area-inset-bottom,0px));width:calc(100vw - 20px);padding:6px;gap:5px}

  /* Chat: por defecto solo ocupa una franja pequeña; el campo aparece al tocar 💬. */
  #mpChat{left:6px;bottom:calc(126px + env(safe-area-inset-bottom,0px));width:min(248px,64vw);pointer-events:none}
  #mpChatToggle{display:block;position:absolute;left:0;bottom:0;width:34px;height:30px;padding:0;border:1px solid #9b7c5177;border-radius:7px;background:#211a14e8;color:#ead5ae;font-size:15px;pointer-events:auto;touch-action:manipulation}
  #mpChatMessages{margin-left:39px;max-height:48px;padding:4px 5px;border-radius:6px;background:#080a0b9f;pointer-events:auto}
  #mpChatMessages:empty{display:none}.mpChatMessage{font-size:9.5px;gap:4px;padding:1px 0}
  #mpChatForm{display:none;margin-left:39px;border-radius:6px;border-top:1px solid #9b7c5177;pointer-events:auto}
  #mpChat.typing{width:min(315px,calc(100vw - 12px))}#mpChat.typing #mpChatMessages{max-height:78px;background:#080a0bdf}#mpChat.typing #mpChatForm{display:grid}
  #mpChatInput{font-size:16px;padding:6px 7px}#mpChatSend{padding:0 8px;font-size:10px}
}

@media (pointer:coarse) and (orientation:landscape) and (max-height:560px){
  #hud{width:150px;max-width:150px;font-size:7.8px;padding:3px 4px}#hud .brand{font-size:9px}#hud .clock{font-size:9px}#hud .statusline,#hud .netline{display:none}
  #objectivePanel{left:160px;right:50px;top:6px;max-height:46px;overflow:hidden;padding:3px 6px}
  #message{top:56px}#crisisBanner{top:88px}
  #joystick{width:96px;height:96px;bottom:7px}#stick{left:29px;top:29px;width:36px;height:36px}
  #action{width:58px;height:58px;bottom:7px}#form{width:46px;height:46px;bottom:70px;right:12px}#carry{width:46px;height:46px;bottom:12px;right:73px}#wheelbarrow{width:44px;height:44px;bottom:13px;right:124px;font-size:7px}
  #gameMenuBtn{top:5px}#ritualCommandBtn{top:40px}#map{top:75px;height:30px}#mobileZoomControls{top:111px}
  #mpChat{left:5px;bottom:calc(108px + env(safe-area-inset-bottom,0px));width:min(230px,48vw)}
  #altarActions{bottom:106px}
}

/* ---------- buscador de salas 0.9.2 ---------- */
.mpField select,.roomBrowserFilters select,.roomBrowserFilters input{box-sizing:border-box;width:100%;padding:9px 10px;border:1px solid #78684f;background:#0b0d0dcc;color:#eadfc9;border-radius:6px;font:13px Georgia,serif;outline:none}
.mpField select:focus,.roomBrowserFilters select:focus,.roomBrowserFilters input:focus{border-color:#b89868;box-shadow:0 0 0 2px #b8986822}
.mpRangeInline{display:grid;grid-template-columns:1fr 32px;gap:10px;align-items:center}.mpRangeInline input{width:100%;accent-color:#9d7b4e}.mpRangeInline b{text-align:center;color:#e7c985;font:800 14px ui-monospace,Consolas,monospace}
.roomBrowserPanel{width:min(920px,95vw);max-height:90vh;overflow:auto;text-align:left}.roomBrowserTop{display:grid;grid-template-columns:1fr 1fr;gap:10px}.roomBrowserFilters{display:grid;grid-template-columns:minmax(180px,1.7fr) repeat(3,minmax(120px,.8fr));gap:8px;align-items:center;margin:12px 0}.roomFilterCheck{display:flex;align-items:center;gap:7px;padding:7px 9px;color:#d7ccb8;font:12px system-ui,sans-serif}.roomFilterCheck input{width:auto}.roomRefreshBtn{padding:9px 12px;border:1px solid #789783;border-radius:6px;background:#17231e;color:#d3e7da;font:bold 12px Georgia,serif;cursor:pointer}.roomBrowserStatus{min-height:20px;margin:4px 0 9px;color:#a99d89;font:12px system-ui,sans-serif}.roomBrowserStatus.error{color:#efb3b3}.roomBrowserList{display:grid;gap:8px;min-height:120px}.roomCard{display:grid;grid-template-columns:minmax(170px,1.7fr) minmax(120px,.8fr) auto auto auto auto;gap:10px;align-items:center;padding:11px 12px;background:#080b0acc;border:1px solid #7f6b4f55;border-radius:8px}.roomCard:hover{border-color:#a98d665f;background:#10130fdd}.roomCardTitle{display:grid;gap:3px;min-width:0}.roomCardTitle b{font:700 15px Georgia,serif;color:#f0e3ca;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.roomCardTitle small,.roomMeta{font:11px system-ui,sans-serif;color:#9f9585}.roomAccess{font-size:15px}.roomPlayers{font:800 13px ui-monospace,Consolas,monospace;color:#d7c293;white-space:nowrap}.roomPing{min-width:58px;text-align:right;font:800 12px ui-monospace,Consolas,monospace;color:#b8d4c2}.roomPing.bad{color:#dfaa8e}.roomPing.unknown{color:#827b70}.roomJoinBtn{padding:8px 12px;border:1px solid #789783;border-radius:6px;background:linear-gradient(180deg,#31513f,#17291f);color:#e8f4ec;font:bold 12px Georgia,serif;cursor:pointer}.roomJoinBtn:disabled{opacity:.4;cursor:not-allowed}.roomEmpty{padding:28px 12px;text-align:center;color:#8f8779;border:1px dashed #75654e55;border-radius:8px}.lobbySummary{margin:-7px 0 10px;color:#9f9585;font:12px system-ui,sans-serif}
@media(max-width:760px){.roomBrowserTop{grid-template-columns:1fr}.roomBrowserFilters{grid-template-columns:1fr 1fr}.roomBrowserFilters>input:first-child{grid-column:1/-1}.roomCard{grid-template-columns:1fr auto auto}.roomCardTitle{grid-column:1/2}.roomCard .roomMeta{display:none}.roomJoinBtn{grid-column:3}.roomBrowserPanel{padding:18px 12px}}
@media(max-width:480px){.roomBrowserFilters{grid-template-columns:1fr}.roomBrowserFilters>input:first-child{grid-column:auto}.roomCard{grid-template-columns:1fr auto;gap:7px}.roomAccess{display:none}.roomPlayers{grid-column:2}.roomPing{grid-column:1;text-align:left}.roomJoinBtn{grid-column:2}.roomBrowserTop .mpField{grid-template-columns:1fr}.roomBrowserTop .mpField span{margin-bottom:3px}}

/* ---------- 0.9.3 · protección táctil de la tienda del Espectro ---------- */
#essenceShopModal.shopInputLocked .specterShopCard button,#essenceShopModal.shopInputLocked [data-buy-epidemic]{pointer-events:none!important;filter:saturate(.55);opacity:.48}
@media (pointer:coarse),(max-width:760px){
  .epidemicShop{padding-bottom:calc(26px + env(safe-area-inset-bottom,0px))}
  .epidemicUtilitiesTop .specterShopCard button{width:min(210px,100%);max-width:210px;justify-self:start}
  .epidemicUtilitiesTop .specterShopCard{padding-right:72px}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:560px){
  .epidemicUtilitiesTop .specterShopCard button{width:min(190px,100%);max-width:190px}
  .epidemicUtilitiesTop .specterShopCard{padding-right:76px}
}

/* 0.9.6 — acceso multijugador simplificado y Discord oficial */
.menuButtonDiscord{display:block;box-sizing:border-box;text-align:center;text-decoration:none;background:linear-gradient(180deg,rgba(75,82,160,.96),rgba(38,42,94,.98));border-color:#9ba7ff;color:#f3f5ff}.menuButtonDiscord::before{border-color:rgba(155,167,255,.28)}
.multiplayerModePanel{width:min(500px,92vw);text-align:center}.multiplayerModeActions{display:grid;gap:11px;margin-top:18px}.multiplayerModeActions .menuButton{width:100%}.roomPasswordPanel{width:min(460px,92vw)}

/* ---------- 0.9.8 · Reportes de bugs ---------- */
.menuButtonBug{background:linear-gradient(180deg,rgba(91,62,48,.96),rgba(45,29,24,.98));border-color:#c9966d;color:#f3dec6}.menuButtonBug::before{border-color:rgba(201,150,109,.28)}
.ingameMenuAction.bugAction{border-color:#bc8b62;background:linear-gradient(180deg,#493629,#231a15);color:#f0d5b9}
.bugReportOverlay{display:none;position:fixed;z-index:160;inset:0;align-items:center;justify-content:center;padding:18px;background:#050409e8;touch-action:auto}.bugReportOverlay.open{display:flex}
.bugReportPanel{position:relative;width:min(680px,94vw);max-height:92vh;overflow:auto;padding:24px;background:linear-gradient(180deg,#292019fa,#120f13fc);border:1px solid #b8875f;border-radius:11px;color:#eadfc9;box-shadow:0 18px 65px #000f,inset 0 0 0 1px #3c2b27;font:14px/1.45 Georgia,"Times New Roman",serif}.bugReportPanel h2{margin:3px 42px 7px 0;color:#e9c777;font-size:25px}.bugReportPanel>p{margin:0 0 16px;color:#c5b7a5}.bugReportEyebrow{font:800 10px system-ui,sans-serif;letter-spacing:1.5px;color:#bc966f}.bugReportClose{position:absolute;right:12px;top:10px;width:34px;height:34px;border:1px solid #9a7658;border-radius:7px;background:#17110e;color:#ead7bc;font-size:23px;cursor:pointer}.bugReportPanel form{display:grid;gap:13px}.bugReportPanel label{display:grid;gap:6px}.bugReportPanel label>span{font-weight:800;color:#ddc5a5}.bugReportPanel label small{font-weight:400;color:#9f9181}.bugReportPanel input[type=text],.bugReportPanel input:not([type]),.bugReportPanel textarea{width:100%;border:1px solid #79624e;border-radius:7px;background:#0d0b0c;color:#f0e7dc;padding:10px 11px;font:13px/1.4 system-ui,sans-serif;outline:none}.bugReportPanel textarea{resize:vertical;min-height:150px}.bugReportPanel input:focus,.bugReportPanel textarea:focus{border-color:#d0a77a;box-shadow:0 0 0 2px #a77c4e22}.bugReportPanel input[type=file]{width:100%;padding:9px;border:1px dashed #795f4a;border-radius:7px;background:#0c0a0b;color:#cdbca7;font:12px system-ui,sans-serif}.bugReportStatus{min-height:20px;color:#b7cba7;font:12px system-ui,sans-serif}.bugReportStatus.error{color:#e49a9a}.bugReportActions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:2px}.bugReportActions button{padding:11px 13px;border:1px solid #8d7057;border-radius:7px;background:linear-gradient(180deg,#34271e,#19120f);color:#eadfc9;font:800 13px Georgia,"Times New Roman",serif;cursor:pointer}.bugReportActions button[type=submit]{border-color:#7d9970;background:linear-gradient(180deg,#31402a,#182016);color:#d7ebcd}.bugReportActions button:disabled{opacity:.5;cursor:default}.bugReportPanel.busy{cursor:progress}
@media(max-width:620px){.bugReportPanel{padding:20px 15px 16px}.bugReportActions{grid-template-columns:1fr}.bugReportPanel textarea{min-height:130px}}
