/* Urban Legends 1.1.1 — Shell aislado, sin modificar Enfold u otros plugins */
html.aof-webapp-html,body.aof-webapp-body{margin:0!important;padding:0!important;min-height:100%!important;width:100%!important;max-width:none!important;overflow:hidden!important;background:var(--aof-app-bg,#081724)!important}
html.aof-webapp-html{height:100%;touch-action:manipulation}
body.aof-webapp-body{height:100dvh;height:100svh;height:100dvh;position:fixed;inset:0;overscroll-behavior:none;-webkit-overflow-scrolling:touch}
body.aof-webapp-body #aof-app-shell{position:fixed;inset:0;width:100%;height:100%;min-height:0;overflow:hidden;margin:0!important;padding:0!important;max-width:none!important;z-index:1}
body.aof-webapp-body #sos-aof.aof{box-sizing:border-box!important;position:relative;display:flex;flex-direction:column;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:max(3px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))!important;min-height:0;max-height:none!important;height:100%;width:100%;max-width:100%!important;overflow:hidden;touch-action:manipulation}
body.aof-webapp-body .aof-header{flex:none;flex-wrap:nowrap;gap:7px;margin:0;padding:0 2px 3px;border-color:#294657;min-height:38px;z-index:4}
body.aof-webapp-body .aof-header>img{width:34px!important;height:34px!important;flex:none}
body.aof-webapp-body .aof-header>div:not(.aof-app-actions){min-width:0;flex:1;overflow:hidden}
body.aof-webapp-body .aof-header strong{font-size:clamp(12px,1.8vw,18px);letter-spacing:1px;line-height:1.12;white-space:nowrap}
body.aof-webapp-body .aof-header small{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
body.aof-webapp-body .aof-quality-wrap{font-size:9px;gap:0;white-space:nowrap}
body.aof-webapp-body .aof-quality-wrap select{min-width:80px;font-size:11px;padding:4px}
body.aof-webapp-body .aof-app-actions{display:flex;flex:none;gap:4px;align-items:center;white-space:nowrap}
body.aof-webapp-body .aof-app-actions button{font-size:11px;line-height:1.1;padding:7px 9px;min-height:30px}
body.aof-webapp-body #aof-share{display:none}
body.aof-webapp-body .aof-hud{flex:none;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:3px;margin:3px 0;min-height:25px;overflow:hidden}
body.aof-webapp-body .aof-hud span{white-space:nowrap;font-size:clamp(9px,1.55vw,13px);padding:3px 5px}
body.aof-webapp-body .aof-exp{height:13px;min-height:13px;flex:none;margin:0 0 3px}
body.aof-webapp-body .aof-exp strong{line-height:11px;font-size:10px}
body.aof-webapp-body .aof-stage{flex:1;min-height:0;border:1px solid #526b57;border-radius:5px;position:relative;overflow:hidden}
body.aof-webapp-body .aof-stage canvas{display:block;width:100%;height:100%;max-height:100%;aspect-ratio:auto;object-fit:fill;touch-action:none;image-rendering:pixelated}
body.aof-webapp-body .aof-controls{z-index:3;position:absolute;left:max(15px,env(safe-area-inset-left));right:max(15px,env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom));width:auto;display:flex;justify-content:space-between;align-items:end;gap:12px;margin:0;pointer-events:none}
body.aof-webapp-body .aof-controls .aof-stick,body.aof-webapp-body .aof-controls button{pointer-events:auto;touch-action:none}
body.aof-webapp-body .aof-stick{flex:0 0 clamp(75px,13vh,105px);width:clamp(75px,13vh,105px);height:clamp(75px,13vh,105px);background:#143a4388;backdrop-filter:blur(2px)}
body.aof-webapp-body .aof-pad{display:none!important}
body.aof-webapp-body .aof-actions{flex:0 1 250px;max-width:250px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
body.aof-webapp-body .aof-actions button{min-width:0;min-height:36px;height:clamp(35px,8vh,45px);font-size:clamp(9px,1.6vw,12px);padding:3px;white-space:normal;background:#153344dc;backdrop-filter:blur(3px)}
body.aof-webapp-body .aof-actions #aof-auto{grid-column:span 2}
body.aof-webapp-body .aof-actions #aof-pause{grid-column:span 1}
body.aof-webapp-body .aof-bottom{position:absolute;bottom:calc(6px + env(safe-area-inset-bottom));right:max(8px,env(safe-area-inset-right));width:min(350px,94vw);max-height:72vh;overflow:auto;background:#071c2af6;border:1px solid #ad8752;border-radius:10px;padding:12px;z-index:8;display:none;flex-direction:column;box-shadow:0 5px 35px #000b}
body.aof-webapp-body .aof.aof-tools-open .aof-bottom{display:flex}
body.aof-webapp-body .aof-bottom>div:last-child{justify-content:space-between}
body.aof-webapp-body .aof-modal{z-index:20}
body.aof-webapp-body .aof-dialog{padding:18px;max-height:90dvh}
body.aof-webapp-body .aof-overlay{padding:4px 10px;z-index:6}
body.aof-webapp-body .aof-panel{max-height:100%;overflow:auto;padding:8px 16px}
body.aof-webapp-body .aof-panel>img{max-height:55px;height:12vh}
body.aof-webapp-body .aof-panel h2{font-size:clamp(16px,3vh,21px)}
body.aof-webapp-body .aof-panel p{font-size:clamp(10px,1.8vh,12px);margin:5px 0}
body.aof-webapp-body .aof-panel select{padding:5px;margin-bottom:5px}
body.aof-webapp-body .aof-panel button{padding:7px}
body.aof-webapp-body .aof-pwa-dialog{position:fixed;z-index:10005;inset:0;background:#020b16df;display:flex;align-items:center;justify-content:center;padding:14px}
body.aof-webapp-body .aof-pwa-dialog[hidden]{display:none!important}
body.aof-webapp-body .aof-pwa-box{background:#0f273a;color:#eff8fb;border:2px solid #be934b;border-radius:15px;width:min(480px,96vw);max-height:92dvh;overflow:auto;padding:18px;box-shadow:0 12px 55px #000c;font:14px system-ui,sans-serif}
body.aof-webapp-body .aof-pwa-box h2{font-size:21px;color:#f5d38b;margin:0 0 10px}
body.aof-webapp-body .aof-pwa-box button{padding:10px 14px;margin:5px;border:1px solid #af874e;border-radius:8px;background:#203c4f;color:white;cursor:pointer}
body.aof-webapp-body .aof-pwa-box button.aof-pwa-primary{background:#e6b760;color:#191d22;font-weight:800}
body.aof-webapp-body .aof-pwa-box p{margin:8px 0}
@media (max-width:750px){body.aof-webapp-body .aof-header small{display:none}body.aof-webapp-body .aof-actions{flex-basis:210px;max-width:210px}body.aof-webapp-body .aof-app-actions button{padding:5px 6px}}
@media (max-height:430px){body.aof-webapp-body .aof-header{min-height:27px}body.aof-webapp-body .aof-header>img{width:25px!important;height:25px!important}body.aof-webapp-body .aof-hud{min-height:21px}body.aof-webapp-body .aof-hud span{font-size:10px}body.aof-webapp-body .aof-controls{bottom:calc(7px + env(safe-area-inset-bottom))}body.aof-webapp-body .aof-actions button{min-height:29px;height:30px}body.aof-webapp-body .aof-stick{flex-basis:72px;width:72px;height:72px}body.aof-webapp-body .aof-stick-knob{width:35px;height:35px;margin-top:-17px;margin-left:-17px}body.aof-webapp-body .aof-panel>img{display:none}body.aof-webapp-body .aof-panel .aof-muted{display:none}}
@media (orientation:portrait) and (max-width:650px){body.aof-webapp-body .aof-header strong{font-size:13px}body.aof-webapp-body .aof-quality-wrap{display:none}body.aof-webapp-body .aof-hud span{font-size:9px}body.aof-webapp-body .aof-hud span:nth-child(5),body.aof-webapp-body .aof-hud span:nth-child(6){display:none}body.aof-webapp-body .aof-controls{bottom:calc(20px + env(safe-area-inset-bottom))}body.aof-webapp-body .aof-stick{flex-basis:90px;width:90px;height:90px}body.aof-webapp-body .aof-actions{flex-basis:195px;max-width:195px}body.aof-webapp-body .aof-actions button{font-size:9px}}

/* v1.1.1 PATCH INTEGRADO: HUD, joystick y mando DENTRO del lienzo; una sola pantalla. */
body.aof-webapp-body #sos-aof.aof{padding:0!important;display:block!important;position:relative!important;background:#071722!important}
body.aof-webapp-body .aof-stage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:#102d25!important}
body.aof-webapp-body .aof-stage canvas{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;max-width:100%!important;max-height:100%!important;aspect-ratio:auto!important}
body.aof-webapp-body .aof-game-top{position:absolute;left:max(5px,env(safe-area-inset-left));right:max(5px,env(safe-area-inset-right));top:env(safe-area-inset-top);z-index:9;pointer-events:none;background:linear-gradient(to bottom,#081923eb,#081923bb 80%,transparent);padding:3px 4px 7px;border-radius:0 0 7px 7px;max-height:34%;overflow:visible}
body.aof-webapp-body .aof-game-top button,body.aof-webapp-body .aof-game-top select,body.aof-webapp-body .aof-game-top label{pointer-events:auto}
body.aof-webapp-body .aof-header{min-height:26px!important;max-height:34px!important;border:0!important;padding:0!important;gap:5px!important}
body.aof-webapp-body .aof-header>img{width:31px!important;height:31px!important}
body.aof-webapp-body .aof-header strong{font-size:clamp(11px,1.7vw,16px)!important;line-height:1!important}
body.aof-webapp-body .aof-header small{display:none!important}
body.aof-webapp-body .aof-header>div:not(.aof-app-actions){min-width:0!important;flex:1!important}
body.aof-webapp-body .aof-app-actions{display:flex;align-items:center;gap:3px}
body.aof-webapp-body .aof-app-actions button{padding:5px!important;min-height:28px!important;font-size:clamp(9px,1.5vw,11px)!important}
body.aof-webapp-body .aof-quality-wrap{display:flex;gap:0!important;font-size:9px!important}
body.aof-webapp-body .aof-quality-wrap select{min-width:76px!important;padding:2px!important;font-size:10px!important}
body.aof-webapp-body .aof-hud{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px!important;margin:3px 0!important;min-height:20px!important;overflow:visible!important}
body.aof-webapp-body .aof-hud span{display:block!important;text-align:center;overflow:hidden;text-overflow:ellipsis;font-size:clamp(9px,1.45vw,12px)!important;min-width:0;padding:3px 1px!important;line-height:14px!important}
body.aof-webapp-body .aof-exp{height:10px!important;min-height:10px!important;margin:0!important;overflow:hidden}
body.aof-webapp-body .aof-exp strong{font-size:8px!important;line-height:9px!important}
body.aof-webapp-body .aof-controls{position:absolute!important;bottom:calc(9px + env(safe-area-inset-bottom))!important;left:calc(9px + env(safe-area-inset-left))!important;right:calc(9px + env(safe-area-inset-right))!important;margin:0!important;z-index:8!important;max-height:32%!important;align-items:end!important}
body.aof-webapp-body .aof-stick{flex:0 0 clamp(70px,16vh,108px)!important;width:clamp(70px,16vh,108px)!important;height:clamp(70px,16vh,108px)!important;box-shadow:inset 0 0 0 8px #07121a55,0 0 10px #0006!important}
body.aof-webapp-body .aof-actions{flex:0 1 245px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px!important;max-width:min(245px,55%)!important}
body.aof-webapp-body .aof-actions button{min-width:0!important;min-height:30px!important;height:clamp(30px,6vh,44px)!important;font-size:clamp(9px,1.5vw,12px)!important;line-height:1!important;padding:3px 2px!important;overflow:hidden;text-overflow:ellipsis}
body.aof-webapp-body .aof-actions #aof-auto{grid-column:span 2}
body.aof-webapp-body .aof-actions #aof-pause{grid-column:span 1}
body.aof-webapp-body .aof-pad{display:none!important}
body.aof-webapp-body .aof-overlay{z-index:15!important;padding:8px!important}
body.aof-webapp-body .aof-panel{width:min(430px,95%)!important;max-height:min(94%,600px)!important;overflow:auto!important;padding:clamp(6px,1.8vh,15px)!important}
body.aof-webapp-body .aof-panel>img{max-height:clamp(25px,10vh,65px)!important}
body.aof-webapp-body .aof-panel h2{font-size:clamp(15px,3.3vh,22px)!important}
body.aof-webapp-body .aof-panel p{font-size:clamp(10px,1.7vh,13px)!important;line-height:1.25!important;margin:4px 0!important}
body.aof-webapp-body .aof-panel select{padding:4px!important;margin:3px 0!important}
body.aof-webapp-body .aof-bottom{z-index:19!important;top:calc(66px + env(safe-area-inset-top))!important;bottom:auto!important;right:calc(6px + env(safe-area-inset-right))!important;max-height:calc(90% - 75px)!important;width:min(365px,calc(100% - 12px))!important}
body.aof-webapp-body .aof-modal{z-index:25!important}
@media (max-height:460px){
 body.aof-webapp-body .aof-header{max-height:27px!important;min-height:24px!important}
 body.aof-webapp-body .aof-header>img{width:24px!important;height:24px!important}
 body.aof-webapp-body .aof-hud{margin:1px 0!important;min-height:18px!important}
 body.aof-webapp-body .aof-hud span{font-size:10px!important;padding:1px!important;line-height:15px!important}
 body.aof-webapp-body .aof-exp{height:7px!important;min-height:7px!important}
 body.aof-webapp-body .aof-exp strong{font-size:7px!important;line-height:7px!important}
 body.aof-webapp-body .aof-actions button{min-height:27px!important;height:30px!important}
 body.aof-webapp-body .aof-stick{flex-basis:clamp(64px,19vh,78px)!important;width:clamp(64px,19vh,78px)!important;height:clamp(64px,19vh,78px)!important}
 body.aof-webapp-body .aof-stick-knob{width:32px;height:32px;margin:-16px 0 0 -16px}
 body.aof-webapp-body .aof-panel>img{max-height:25px!important}
}
@media (orientation:portrait) and (max-width:650px){
 body.aof-webapp-body .aof-game-top{max-height:22%!important}
 body.aof-webapp-body .aof-header{max-height:35px!important}
 body.aof-webapp-body .aof-header strong{font-size:clamp(11px,3.6vw,15px)!important}
 body.aof-webapp-body .aof-quality-wrap{display:none!important}
 body.aof-webapp-body .aof-app-actions button{font-size:10px!important;padding:5px 3px!important}
 body.aof-webapp-body .aof-hud{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px!important;margin:2px 0!important}
 body.aof-webapp-body .aof-hud span{display:block!important;font-size:11px!important;padding:2px 1px!important;line-height:14px!important}
 body.aof-webapp-body .aof-exp{height:11px!important;min-height:11px!important}
 body.aof-webapp-body .aof-controls{bottom:calc(16px + env(safe-area-inset-bottom))!important;gap:4px!important}
 body.aof-webapp-body .aof-stick{flex-basis:clamp(76px,21vw,100px)!important;width:clamp(76px,21vw,100px)!important;height:clamp(76px,21vw,100px)!important}
 body.aof-webapp-body .aof-actions{max-width:min(225px,65%)!important}
 body.aof-webapp-body .aof-actions button{font-size:10px!important;min-height:38px!important;height:43px!important}
 body.aof-webapp-body .aof-bottom{top:calc(115px + env(safe-area-inset-top))!important;max-height:calc(85% - 115px)!important}
}
@media (max-width:360px){
 body.aof-webapp-body .aof-header>img{display:none!important}
 body.aof-webapp-body .aof-app-actions button{font-size:9px!important;padding:4px 2px!important}
 body.aof-webapp-body .aof-controls{left:4px!important;right:4px!important}
 body.aof-webapp-body .aof-actions{max-width:67%!important}
 body.aof-webapp-body .aof-actions button{font-size:9px!important}
}

/* Survivor Worlds 1.2.0: mapa, combos y sexto control dentro del escenario. */
.aof #aof-battle-info{display:flex;gap:7px;align-items:center;justify-content:center;pointer-events:none;color:#fff3d0;text-shadow:0 2px 3px #000;min-height:18px;font:800 10px system-ui,sans-serif;letter-spacing:.3px}
.aof #aof-battle-info span{padding:2px 7px;background:#0a2132aa;border:1px solid #7a986e44;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aof #aof-combo-label{color:#ffc77d}
.aof #aof-buff-label:empty{display:none}
.aof #aof-special{background:linear-gradient(135deg,#7351aa,#30285a)!important;border-color:#e4bdff!important;color:#fff9e7!important}
body.aof-webapp-body #aof-battle-info{justify-content:flex-start;max-width:100%;min-height:14px;height:16px;gap:4px;font-size:clamp(8px,1.2vw,10px)}
body.aof-webapp-body #aof-battle-info span{max-width:45%;padding:1px 5px}
body.aof-webapp-body .aof-actions{flex-basis:258px!important;max-width:min(258px,57%)!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px}
body.aof-webapp-body .aof-actions #aof-auto{grid-column:span 1!important}
body.aof-webapp-body .aof-actions button{height:clamp(28px,6vh,43px)!important;min-height:27px!important}
body.aof-webapp-body .aof-panel #aof-world{max-width:100%}
@media(max-height:400px){body.aof-webapp-body #aof-battle-info{height:12px!important;min-height:12px!important;font-size:8px!important}body.aof-webapp-body .aof-actions button{height:27px!important;min-height:27px!important}}
@media (orientation:portrait) and (max-width:650px){body.aof-webapp-body #aof-battle-info{height:17px!important;font-size:9px!important}body.aof-webapp-body .aof-actions{max-width:min(224px,65%)!important}body.aof-webapp-body .aof-actions button{height:41px!important}}
@media (max-width:350px){body.aof-webapp-body .aof-actions{max-width:64%!important}body.aof-webapp-body #aof-battle-info span{font-size:8px!important}}

.aof #aof-hero-portrait{display:block;width:auto;height:68px;object-fit:contain;image-rendering:pixelated;margin:2px auto 3px}
@media(max-height:440px){body.aof-webapp-body #aof-hero-portrait{height:30px!important}}
@media (orientation:portrait) and (max-width:650px){body.aof-webapp-body #aof-hero-portrait{height:54px!important}}

/* v1.2.1 Cinematic Sound: control de audio integrado en el juego, no separado. */
body.aof-webapp-body #aof-sound-quick{min-width:30px;background:#173f53;color:#fff6b6;border-color:#9bbdd0}
body.aof-webapp-body .aof-boss-alert{position:absolute;top:26%;left:50%;transform:translateX(-50%);z-index:12;pointer-events:none;max-width:calc(100vw - 30px);text-align:center;white-space:normal;padding:12px 18px;background:linear-gradient(100deg,#630c19ed,#a12a1eea,#630c19ed);color:#fff6b7;text-shadow:0 2px 2px #210507;box-shadow:0 0 24px #ff3d3da5;border:2px solid #f9d187;border-radius:10px;font-weight:900;font-size:clamp(12px,3.8vw,27px);animation:aof-boss-flash .52s ease-in-out infinite alternate}
body.aof-webapp-body .aof-boss-alert[hidden]{display:none!important}
@keyframes aof-boss-flash{0%{filter:brightness(.86);scale:.98}100%{filter:brightness(1.25);scale:1.025}}
body.aof-webapp-body #aof-audio-notice{font-size:clamp(9px,1.9vh,12px);color:#ffe4a3;margin:4px 0 2px}
body.aof-webapp-body .aof-audio-settings{display:grid;gap:12px}
body.aof-webapp-body .aof-audio-settings label{display:grid;gap:5px;font-size:13px;color:#f6e3b2;font-weight:700}
body.aof-webapp-body .aof-audio-settings input[type=range]{width:100%;accent-color:#f2c770;touch-action:pan-x}
body.aof-webapp-body .aof-music-checkbox{display:flex!important;align-items:center!important;gap:9px!important}
body.aof-webapp-body .aof-music-checkbox input{width:20px!important;height:20px}
body.aof-webapp-body .aof-audio-tests{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.aof-webapp-body .aof-audio-tests button{font-size:13px;min-height:42px}
@media(max-width:610px){body.aof-webapp-body #aof-sound-quick{min-width:24px!important;padding:4px 3px!important}}

/* v1.3.0 Coop: indicador discreto dentro del mundo, nunca bajo el lienzo. */
body.aof-webapp-body #aof-coop-status{position:absolute;z-index:7;top:calc(97px + env(safe-area-inset-top));left:calc(10px + env(safe-area-inset-left));max-width:52%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e8f8ff;background:#062536bd;border:1px solid #62b6dc88;border-radius:6px;padding:3px 7px;font:700 11px system-ui;pointer-events:none}
body.aof-webapp-body .aof-panel #aof-room{background:#102b38;color:#fff;border:1px solid #a8cbe4;border-radius:5px;max-width:100%;width:100%;padding:6px;font-size:12px;box-sizing:border-box}
@media(max-height:450px){body.aof-webapp-body #aof-coop-status{top:calc(78px + env(safe-area-inset-top));font-size:9px;padding:2px 5px}body.aof-webapp-body .aof-panel #aof-room{padding:3px}}

/* v1.3.4 · Logo oficial de Urban Legends visible también en la tienda */
#aof-modal-body h2:has(.aof-shop-logo){display:flex;align-items:center;gap:10px;}
.aof-shop-logo{display:inline-block;width:42px;height:42px;object-fit:contain;flex-shrink:0;image-rendering:auto;}
@media (max-height:480px){.aof-shop-logo{width:28px;height:28px;}}

/* VB 2.0.0 · Glifos de marca nítidos */
body.aof-webapp-body .aof-header>img{image-rendering:auto!important}
body.aof-webapp-body #aof-hero-portrait{image-rendering:auto!important}
