@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Press+Start+2P&display=swap');:root{font-family:Fredoka,system-ui,sans-serif;color:#fff;background:#101729}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 50% 0%,#354263,#101729 70%);min-height:100vh}.shell{max-width:1220px;margin:0 auto;padding:18px}.top{display:flex;align-items:center;gap:18px;justify-content:space-between;margin-bottom:12px}.brand{display:flex;align-items:center;gap:11px;white-space:nowrap}.brand-icon{font-size:36px}.brand b{font-size:22px;letter-spacing:.4px;color:#ffe18b}.brand small{display:block;font-size:12px;color:#b7c3d8}.hud{display:flex;justify-content:center;gap:7px}.hud>div{background:#202d46;border:2px solid #42516f;border-radius:11px;padding:7px 14px;min-width:105px;text-align:center}.hud small{display:block;color:#9cbed9;font-size:11px;letter-spacing:1px}.hud b{font-size:17px}.hud>div:nth-child(2) b{color:#ffca7c}.hud>div:nth-child(3) b{color:#ff8c98}.sound{background:#354563;color:#fff;border:2px solid #64718b;border-radius:9px;padding:11px;cursor:pointer;font-weight:bold}.gamebox{position:relative;border:5px solid #516588;border-radius:17px;overflow:hidden;background:#84c8ef;box-shadow:0 20px 55px #060b18aa}canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.overlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#0c1634a8;backdrop-filter:blur(3px)}.overlay.hidden{display:none}.panel{background:#17253deF;border:3px solid #f8dc87;border-radius:20px;padding:25px 36px;max-width:545px;text-align:center;box-shadow:0 12px 0 #101929,0 22px 60px #0008}.tag{display:inline-block;background:#ef8354;color:#2b1521;font-weight:700;letter-spacing:2px;font-size:12px;border-radius:30px;padding:7px 14px}.panel h1{font-size:clamp(37px,5vw,64px);line-height:.95;margin:18px 0;text-shadow:4px 5px 0 #0e1426}.panel em{font-style:normal;color:#ffca65}.panel p{color:#dce5ee;line-height:1.5}.primary{font-family:inherit;font-size:20px;cursor:pointer;background:#f6ca5b;border:0;color:#3c2830;border-radius:13px;padding:13px 25px;box-shadow:0 6px #b87839;font-weight:700}.primary:hover{transform:translateY(2px);box-shadow:0 4px #b87839}.primary span{margin-left:12px}.how{font-size:12px!important;color:#95aac0!important;margin-bottom:0}footer{display:flex;justify-content:space-between;color:#b2bdd3;gap:10px;font-size:13px}footer b{color:#f7d180}.mobile{display:none;justify-content:space-between;margin-top:12px}.mobile button{touch-action:none;user-select:none;-webkit-user-select:none;border:2px solid #6f81a7;background:#304260;color:white;border-radius:12px;font-family:inherit;font-weight:700;padding:17px 20px;min-width:76px;font-size:18px}.move,.actions{display:flex;gap:8px}.actions button{background:#b55f58;border-color:#ffb08c}.actions button:first-child{background:#456c86}@media(max-width:900px){.top{flex-wrap:wrap}.hud{order:3;width:100%;justify-content:space-between}.hud>div{flex:1;min-width:0;padding:5px}.hud b{font-size:14px}.mobile{display:flex}footer{font-size:11px}.shell{padding:8px}.panel{padding:18px;max-width:90%}.panel p{font-size:13px}.how{font-size:10px!important}}@media(max-width:500px){.brand b{font-size:18px}.brand-icon{font-size:27px}.brand small{font-size:10px}.panel h1{font-size:32px;margin:10px 0}.tag{font-size:9px}.primary{font-size:14px;padding:10px}.panel p{margin:8px 0}.how{line-height:1.35!important}.mobile button{min-width:62px;padding:13px;font-size:13px}footer p:last-child{display:none}}

/* Single compact location chooser, visible only when the overlay is open. */
.location-picker{display:flex;align-items:center;justify-content:center;gap:10px;margin:14px auto 17px;max-width:390px}
.location-picker label{font-size:11px;letter-spacing:1.4px;font-weight:700;color:#ffdc8a;white-space:nowrap}
.location-picker select{min-width:0;flex:1;max-width:300px;padding:10px 33px 10px 12px;border:1px solid #748aa5;border-radius:10px;background:#263953;color:#fff;font:600 14px Fredoka,system-ui,sans-serif;cursor:pointer;outline-offset:3px}
.location-picker select:focus-visible{outline:2px solid #ffdc8a}
@media(max-width:500px){.location-picker{gap:6px;margin:9px auto}.location-picker label{font-size:9px}.location-picker select{font-size:11px;padding:7px 9px;max-width:225px}}

/* V2.5: fullscreen responsive layout and mobile touch controls */
.top-actions{display:flex;align-items:center;gap:8px}.top-actions .sound{white-space:nowrap}.gamepad-status{font-size:12px;font-weight:700;color:#ffe18b;white-space:nowrap}
.shell:fullscreen,.shell:-webkit-full-screen,.shell.pseudo-fullscreen{max-width:none;width:100%;height:100dvh;min-height:0;padding:8px;display:flex;flex-direction:column;background:#101729;overflow:hidden}
.shell:fullscreen .top,.shell:-webkit-full-screen .top,.shell.pseudo-fullscreen .top{flex:none;margin-bottom:6px;gap:8px}
.shell:fullscreen .brand img,.shell:-webkit-full-screen .brand img,.shell.pseudo-fullscreen .brand img{max-height:44px;width:auto}
.shell:fullscreen .hud>div,.shell:-webkit-full-screen .hud>div,.shell.pseudo-fullscreen .hud>div{padding:3px 9px}
.shell:fullscreen .hud b,.shell:-webkit-full-screen .hud b,.shell.pseudo-fullscreen .hud b{font-size:13px}
.shell:fullscreen .sound,.shell:-webkit-full-screen .sound,.shell.pseudo-fullscreen .sound{padding:8px}
.shell:fullscreen .gamebox,.shell:-webkit-full-screen .gamebox,.shell.pseudo-fullscreen .gamebox{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;border-width:2px;border-radius:8px}
.shell:fullscreen canvas,.shell:-webkit-full-screen canvas,.shell.pseudo-fullscreen canvas{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}
.shell:fullscreen footer,.shell:-webkit-full-screen footer,.shell.pseudo-fullscreen footer{display:none}
.shell:fullscreen .mobile,.shell:-webkit-full-screen .mobile,.shell.pseudo-fullscreen .mobile{flex:none;margin-top:5px;min-height:64px;align-items:center}
.shell:fullscreen .mobile button,.shell:-webkit-full-screen .mobile button,.shell.pseudo-fullscreen .mobile button{min-height:55px;min-width:70px}
@media(pointer:coarse){.shell:fullscreen .mobile,.shell:-webkit-full-screen .mobile,.shell.pseudo-fullscreen .mobile{display:flex}}
@media(max-width:600px){.shell:fullscreen .top,.shell:-webkit-full-screen .top,.shell.pseudo-fullscreen .top{flex-wrap:wrap}.shell:fullscreen .brand,.shell:-webkit-full-screen .brand,.shell.pseudo-fullscreen .brand{display:none}.shell:fullscreen .hud,.shell:-webkit-full-screen .hud,.shell.pseudo-fullscreen .hud{order:0;flex:1;gap:3px}.shell:fullscreen .hud>div,.shell:-webkit-full-screen .hud>div,.shell.pseudo-fullscreen .hud>div{padding:3px 2px}.shell:fullscreen .hud small,.shell:-webkit-full-screen .hud small,.shell.pseudo-fullscreen .hud small{font-size:8px}.shell:fullscreen .hud b,.shell:-webkit-full-screen .hud b,.shell.pseudo-fullscreen .hud b{font-size:10px}.shell:fullscreen .top-actions,.shell:-webkit-full-screen .top-actions,.shell.pseudo-fullscreen .top-actions{gap:3px}.shell:fullscreen .sound,.shell:-webkit-full-screen .sound,.shell.pseudo-fullscreen .sound{font-size:11px;padding:7px}.gamepad-status{display:none}.shell:fullscreen .mobile button,.shell:-webkit-full-screen .mobile button,.shell.pseudo-fullscreen .mobile button{min-height:56px;min-width:60px;padding:10px}}
@media(max-height:430px){.shell:fullscreen .brand,.shell:-webkit-full-screen .brand,.shell.pseudo-fullscreen .brand{display:none}.shell:fullscreen .mobile button,.shell:-webkit-full-screen .mobile button,.shell.pseudo-fullscreen .mobile button{min-height:42px}.shell:fullscreen .mobile,.shell:-webkit-full-screen .mobile,.shell.pseudo-fullscreen .mobile{min-height:45px}.shell:fullscreen .top,.shell:-webkit-full-screen .top,.shell.pseudo-fullscreen .top{margin-bottom:2px}}
/* No native Fullscreen API (notably some iOS browsers): immersive layout fallback. */
.shell.pseudo-fullscreen{position:fixed;inset:0;z-index:1000}

/* V2.5.1: mobile fullscreen button is always discoverable and tappable. */
@media(max-width:900px){
 .top{position:relative;align-items:center;gap:6px}
 .top-actions{margin-left:auto;order:2;display:flex;flex:none;gap:5px;z-index:3}
 #fullscreen{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:24px;padding:6px;touch-action:manipulation}
 .top .brand{min-width:0;flex:0 1 auto}
 .top .brand img{max-width:120px;height:auto}
 .hud{order:3}
}
html.game-immersive,html.game-immersive body{overflow:hidden!important;overscroll-behavior:none}
.shell.pseudo-fullscreen{height:100dvh;height:100svh;max-height:100dvh;box-sizing:border-box;padding:env(safe-area-inset-top, 5px) 6px env(safe-area-inset-bottom, 5px)}
@media(max-width:900px){
 .shell.pseudo-fullscreen .mobile,.shell:fullscreen .mobile{display:flex!important;width:100%;justify-content:space-between;z-index:5;gap:8px}
 .shell.pseudo-fullscreen .top-actions,.shell:fullscreen .top-actions{order:2}
 .shell.pseudo-fullscreen .top,.shell:fullscreen .top{flex-wrap:nowrap}
 .shell.pseudo-fullscreen .brand,.shell:fullscreen .brand{display:none}
 .shell.pseudo-fullscreen .hud,.shell:fullscreen .hud{order:0;min-width:0;width:auto;flex:1}
 .shell.pseudo-fullscreen .gamebox,.shell:fullscreen .gamebox{overflow:hidden}
}
@media(max-width:900px) and (orientation:portrait){
 .shell.pseudo-fullscreen .mobile button,.shell:fullscreen .mobile button{min-width:57px;min-height:53px}
}

/* V2.6 - Seleção horizontal de personagens, compacta no overlay */
.overlay{overflow-y:auto;overscroll-behavior:contain;padding:10px}
.panel{width:min(620px,96%);max-width:620px;max-height:100%;overflow-y:auto;scrollbar-width:thin}
.panel h1{font-size:clamp(28px,3.7vw,43px);margin:7px 0 9px}
.panel p{margin:6px auto}
.character-picker{margin:9px auto 8px;max-width:100%;min-width:0}
.character-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 6px;text-align:left}
.character-heading strong{font-size:11px;letter-spacing:1px;color:#ffdc8a}
.character-heading span{font-size:10px;color:#acccdf;text-align:right}
.character-list{display:flex;gap:9px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;padding:5px 3px 10px;scrollbar-color:#7f9abb #202f48;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.character-card{position:relative;display:flex;flex:0 0 104px;min-width:0;flex-direction:column;align-items:center;gap:3px;scroll-snap-align:center;cursor:pointer;border:2px solid #58728a;border-radius:12px;background:#263953;color:#fff;padding:5px 4px 7px;font:inherit;transition:background .18s,border-color .18s}
.character-card img{width:92px;height:94px;object-fit:contain;pointer-events:none;user-select:none}
.character-card span{font-weight:700;font-size:12px;line-height:1}
.character-card small{font-size:8px;line-height:1.2;color:#adbed0;min-height:20px}
.character-card.chosen{border-color:#ffce65;background:#4a423b;box-shadow:0 0 0 1px #ffce654d}
.character-card.chosen small{color:#ffdd88}
.character-card.locked img{filter:grayscale(1) brightness(.45)}
.character-card.locked::after{content:'🔒';position:absolute;top:34px;left:50%;transform:translateX(-50%);font-size:24px;pointer-events:none}
.character-caption{min-height:16px;font-size:11px;color:#c5d6e8;margin-top:3px}
.location-picker{margin:7px auto 10px}
@media(max-width:700px){.overlay{padding:4px}.panel{width:97%;max-width:97%;padding:10px 11px;border-width:2px}.panel h1{font-size:25px;margin:3px 0 5px}.panel p{font-size:11px;margin:3px}.tag{font-size:8px;padding:4px 8px}.character-heading span{font-size:8px}.character-heading strong{font-size:9px}.character-card{flex-basis:80px;padding:4px 2px}.character-card img{width:75px;height:67px}.character-card span{font-size:10px}.character-card small{font-size:7px}.character-list{gap:6px;padding-bottom:5px}.character-caption{font-size:9px}.location-picker{margin:5px auto}.how{font-size:9px!important}}
@media(max-height:570px){.panel{padding:7px 12px}.panel h1{font-size:22px;margin:2px}.panel p{font-size:10px}.character-card img{height:55px}.character-card{flex-basis:74px}.character-heading{margin-bottom:1px}.location-picker{margin:3px auto}}

/* V2.8 - Fase especial bloqueada */
.special-stage-box{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px auto 8px;padding:12px 14px;border:2px solid #566781;border-radius:14px;background:linear-gradient(180deg,#1a263d,#131d31);text-align:left;max-width:430px}
.special-stage-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.special-stage-copy strong{font-size:13px;letter-spacing:1px;color:#f1d690}
.special-stage-copy small{font-size:11px;line-height:1.25;color:#bfcce1}
.secondary{font-family:inherit;font-size:15px;cursor:pointer;background:#5b6f9d;border:0;color:#fff;border-radius:12px;padding:11px 16px;box-shadow:0 6px #344566;font-weight:700;white-space:nowrap}
.secondary:hover:not(:disabled){transform:translateY(2px);box-shadow:0 4px #344566}
.secondary:disabled{cursor:not-allowed;opacity:.72;box-shadow:none;background:#354055;color:#d7dde6}
.secondary.unlocked{background:#7b4d9d;box-shadow:0 6px #4c2d67}
.secondary.unlocked:hover{box-shadow:0 4px #4c2d67}
@media(max-width:700px){.special-stage-box{flex-direction:column;align-items:stretch;padding:10px;gap:8px}.special-stage-copy strong{font-size:11px}.special-stage-copy small{font-size:10px}.secondary{font-size:13px;padding:10px 12px}}
