:root{color-scheme:dark;--bg:#071329;--panel:#132344;--panel2:#182b50;--stroke:rgba(176,211,255,.19);--text:#f4f8ff;--muted:#a4b7d5;--mint:#68f3ce;--indigo:#818dff;--gold:#ffd77e;--font:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;color:var(--text);background:radial-gradient(ellipse 900px 600px at 10% 5%,#1d376b 0,transparent 75%),radial-gradient(ellipse 800px 600px at 95% 35%,#202857 0,transparent 78%),var(--bg);font-family:var(--font);-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.52;cursor:not-allowed}a{color:inherit;text-decoration:none}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(2.45rem,5vw,4.95rem);line-height:1.085;letter-spacing:-.055em;font-weight:860}h2{font-size:clamp(1.35rem,2.2vw,2rem);letter-spacing:-.035em;font-weight:800}em{color:var(--mint);font-style:normal}.muted{color:var(--muted);line-height:1.65}.sky-noise{position:fixed;inset:0;pointer-events:none;opacity:.22;background-image:radial-gradient(#ffffff1c .7px,transparent .7px);background-size:15px 15px;z-index:0}.topbar,.page-shell,.footer{position:relative;z-index:1}.topbar{max-width:1460px;padding:22px 34px;margin:auto;min-height:93px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #a0caff18}.brand{display:inline-flex;align-items:center;gap:13px;flex-shrink:0}.brand-mark{height:46px;width:46px;display:grid;place-items:center;border-radius:15px;color:#173050;background:linear-gradient(140deg,#82ffe8,#74abff);font-size:29px;box-shadow:0 10px 28px #41b6ff26}.brand-copy{display:flex;flex-direction:column;font-weight:880;font-size:18px;letter-spacing:.015em;line-height:1.2}.brand-copy strong{color:var(--mint);font-weight:860}.brand-copy small{font-size:9px;letter-spacing:.14em;color:var(--muted);margin-top:4px;font-weight:730}.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.account-label{font-size:13px;color:#e1efff;font-weight:750;margin-right:9px}.page-shell{width:min(1320px,calc(100% - 48px));margin:42px auto 80px;min-height:calc(100vh - 235px)}.footer{border-top:1px solid #d0e4ff17;padding:25px 34px;display:flex;justify-content:space-between;gap:15px;font-size:12px;color:var(--muted);max-width:1460px;margin:auto}.kicker{font-size:11px;letter-spacing:.185em;font-weight:870;color:var(--mint);margin-bottom:16px}.light-dot{width:7px;height:7px;display:inline-block;background:#81fcd7;box-shadow:0 0 0 5px #75ffd51d;border-radius:50%;vertical-align:middle;margin-right:10px}.btn{border:1px solid transparent;border-radius:12px;padding:12px 19px;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;font-size:13px;font-weight:800;line-height:1.2;transition:transform .18s,background .18s,border-color .18s,color .18s,box-shadow .18s;white-space:nowrap}.btn:not(:disabled):hover{transform:translateY(-2px)}.btn:focus-visible,.form-switch button:focus-visible,.level-card:focus-visible,input:focus-visible,select:focus-visible,.touch-key:focus-visible{outline:3px solid #8affe0;outline-offset:3px}.btn.primary{color:#0c2740;background:linear-gradient(125deg,#7fffe2,#6ccaff);box-shadow:0 12px 30px #25cfba22}.btn.primary:hover{box-shadow:0 15px 35px #25cfba45}.btn.subtle{background:#ffffff0c;border-color:#ffffff1c;color:#eaf4ff}.btn.subtle:hover{background:#ffffff20;border-color:#ffffff44}.btn.outline{background:transparent;color:#e7f7ff;border-color:#8bdfff77}.btn.outline:hover{background:#6bd6fd13}.btn.large{padding:16px 25px;font-size:14px;min-height:54px}.btn.full{width:100%}.auth-screen{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.75fr);gap:clamp(24px,5vw,85px);align-items:center;min-height:640px}.showcase{padding:22px 0 0}.showcase h1{margin-bottom:22px}.showcase>p{color:#c0d2e8;max-width:580px;line-height:1.82;font-size:15px}.feature-strip{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.feature-strip span{background:#ffffff0c;border:1px solid var(--stroke);border-radius:25px;color:#d8e9ff;font-size:12px;font-weight:720;padding:10px 14px}.decor-scene{margin-top:26px;height:185px;position:relative;overflow:hidden;border-radius:25px;background:linear-gradient(#55b3de,#9ceaca 78%,#53b77a 78%);border:2px solid #ffffff22}.deco-sun{position:absolute;left:76%;top:18px;width:74px;height:74px;border-radius:50%;background:#fff2bb;box-shadow:0 0 0 20px #fff2bb29,0 0 70px #ffe1a4}.deco-hill{position:absolute;border-radius:50% 50% 0 0;width:340px;height:160px;bottom:25px}.hill-one{background:#70ca88;left:-30px;transform:rotate(10deg)}.hill-two{background:#3ba878;left:52%;bottom:20px;transform:rotate(-11deg)}.deco-ground{position:absolute;left:0;bottom:0;right:0;height:31px;background:#4da46f;border-top:8px solid #85dd8c}.deco-coin{position:absolute;z-index:2;font-size:35px;color:#ffdf6f;text-shadow:0 0 12px #ffe5a3;animation:float 2.7s ease-in-out infinite}.deco-coin.c1{left:25%;top:33px}.deco-coin.c2{left:49%;top:64px;animation-delay:.6s}.deco-coin.c3{left:68%;top:36px;animation-delay:1.3s}.deco-hero{position:absolute;left:13%;bottom:20px;width:78px;height:89px;background:linear-gradient(#ffe6a5,#ffaf76);border-radius:42% 42% 35% 35%;z-index:3;box-shadow:inset 0 -9px #ef9b6930;animation:hop 3s ease-in-out infinite}.deco-hero:before,.deco-hero:after{content:'';position:absolute;top:-17px;width:21px;height:37px;border-radius:16px;background:#ffbb79}.deco-hero:before{left:12px;transform:rotate(-20deg)}.deco-hero:after{right:12px;transform:rotate(20deg)}.deco-hero .face{position:absolute;inset:28px 0 0;text-align:center;font-size:24px;font-weight:900;color:#5e425e;z-index:1}.auth-card{padding:clamp(22px,3vw,39px);border:1px solid #89b5e73a;background:linear-gradient(145deg,#182d55f0,#0d1c39f8);border-radius:25px;box-shadow:0 30px 110px #00000033}.auth-card h2{margin:29px 0 8px}.auth-card .muted{font-size:13px;margin-bottom:23px}.form-switch{display:flex;align-items:center;border:1px solid #ffffff21;background:#050e22a8;border-radius:13px;padding:5px}.form-switch button{flex:1;border:0;color:var(--muted);padding:12px;background:transparent;border-radius:10px;font-size:13px;font-weight:800}.form-switch button.active{background:linear-gradient(120deg,#75e8d9,#93b9ff);color:#11203f}.field{margin-bottom:15px}.field label{display:block;margin-bottom:8px;color:#eaf4ff;font-size:12px;font-weight:740}.field input,.field select,.users-controls input{display:block;width:100%;border:1px solid #879cba50;background:#07132ca8;color:#fff;border-radius:11px;padding:13px 14px;min-height:47px;outline:none;font-size:14px}.field input::placeholder,.users-controls input::placeholder{color:#8196b8}.field input:focus,.field select:focus,.users-controls input:focus{border-color:#88edd8;box-shadow:0 0 0 3px #65e0b922}.form-message{font-size:12px;color:#ffb7c1;margin:14px 0 0;min-height:20px}.auth-note{margin-top:18px;text-align:center;font-size:11px;color:#b4c8e0}.menu-hero{border:1px solid #9ccaff32;border-radius:30px;min-height:360px;background:radial-gradient(circle at 80% 60%,#32659970,transparent 43%),linear-gradient(140deg,#1c3562 0%,#111e41 72%);padding:clamp(28px,4vw,53px);display:grid;grid-template-columns:1.25fr .75fr;align-items:center;overflow:hidden;position:relative}.menu-hero h1{font-size:clamp(2.2rem,4.5vw,4.2rem);margin-bottom:15px}.menu-hero .muted{font-size:14px}.menu-cta{display:flex;flex-wrap:wrap;gap:13px;margin-top:30px}.hero-character{height:280px;position:relative;display:grid;place-items:center}.hero-body{z-index:2;position:relative;width:160px;height:181px;border-radius:40% 42% 38% 38%;background:linear-gradient(#ffe7a4,#ffb379);box-shadow:inset -17px -9px #e88e722b,0 30px 70px #00000050;transform:rotate(-9deg);animation:hop 3.5s ease-in-out infinite}.hero-body:before,.hero-body:after{content:'';position:absolute;top:-40px;width:43px;height:71px;background:#ffc07a;border-radius:28px}.hero-body:before{left:27px;transform:rotate(-18deg)}.hero-body:after{right:27px;transform:rotate(23deg)}.hero-body span{position:absolute;top:62px;left:0;width:100%;color:#59405b;text-align:center;font-weight:900;font-size:47px;letter-spacing:-4px}.orbit{position:absolute;width:290px;height:290px;border:1px dashed #a1fce355;border-radius:50%;animation:spin 21s linear infinite}.orbit.orb2{width:235px;height:235px;animation-direction:reverse;border-color:#b7b2ff82}.spark{position:absolute;color:#ffd97c;font-size:45px;font-style:normal;animation:float 3s ease-in-out infinite}.spark.s1{top:0;left:8%}.spark.s2{top:20%;right:5%;animation-delay:.7s}.spark.s3{bottom:0;left:18%;animation-delay:1.5s}.progress-metrics{margin:24px 0 50px;display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metric{border:1px solid #98bdeb2b;border-radius:17px;background:#162845c2;padding:20px 23px;min-width:0}.metric span{display:block;font-size:10px;color:#aabdd8;letter-spacing:.14em;font-weight:800;margin-bottom:9px}.metric strong{font-size:clamp(19px,2vw,28px);letter-spacing:-.025em}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin:0 0 24px}.section-head h2,.section-head h1{margin:0}.section-head .muted{font-size:13px;max-width:410px}.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:15px}.level-card{position:relative;min-height:196px;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:17px;background:linear-gradient(140deg,var(--card-a),var(--card-b));border:1px solid #ffffff52;border-radius:19px;color:#fff;transition:transform .2s,box-shadow .2s,border-color .2s}.level-card:not(:disabled):hover{transform:translateY(-6px);box-shadow:0 20px 35px #00000039;border-color:#cbfff7}.level-card.current{outline:2px solid #8cf8db;outline-offset:2px}.level-card.locked{filter:saturate(.35);opacity:.53}.level-no{font-size:10px;letter-spacing:.11em;font-weight:800;color:#f0f9ffdf}.level-icon{margin:auto auto 8px;font-size:47px;filter:drop-shadow(0 6px 8px #17203e55)}.level-card strong{font-size:14px;line-height:1.25;margin-bottom:6px}.level-status{color:#eaf5ffe0;font-size:11px}.biome-meadow{--card-a:#54bfa5;--card-b:#266ca5}.biome-forest{--card-a:#3aa377;--card-b:#1a655f}.biome-cave{--card-a:#8572c7;--card-b:#454678}.biome-rainbow{--card-a:#dc81a5;--card-b:#8c6dd0}.biome-sky{--card-a:#6cafe3;--card-b:#5766b0}.biome-desert{--card-a:#d8a45c;--card-b:#b66c60}.biome-city{--card-a:#7e95db;--card-b:#366b90}.biome-water{--card-a:#5ec8ce;--card-b:#386eae}.biome-night{--card-a:#725599;--card-b:#292d64}.biome-final{--card-a:#b77fb7;--card-b:#6868bd}.keyboard-tip{margin-top:25px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#b7c9e3;font-size:12px}.keycap{background:#25385c;border:1px solid #a6c4ee54;border-bottom-width:3px;border-radius:7px;padding:7px 10px;color:#fff;font-weight:860;font-size:11px}.game-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.game-top .kicker{margin-bottom:8px}.game-top h1{font-size:clamp(24px,3vw,38px);margin:0}.hud{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.hud-pill{min-width:107px;background:#1b3156;border:1px solid var(--stroke);border-radius:11px;padding:9px 13px}.hud-pill small{display:block;font-size:9px;letter-spacing:.1em;color:#b1c0e2;font-weight:800}.hud-pill strong{display:block;font-size:14px;color:#ffdea4;margin-top:2px}.canvas-wrap{width:100%;position:relative;overflow:hidden;border:4px solid #90b9ff55;border-radius:22px;box-shadow:0 30px 75px #0000004a;aspect-ratio:16/9;background:#7ad9cb;outline:none}.canvas-wrap canvas{display:block;width:100%;height:100%;object-fit:contain}.canvas-wrap:focus-visible{border-color:#8bfadc}.canvas-label{position:absolute;left:17px;bottom:18px;max-width:65%;background:#102244c9;color:#fff;padding:10px 15px;border:1px solid #ffffff3a;border-radius:10px;font-size:11px;font-weight:770;pointer-events:none}.game-explain{text-align:center;margin-top:20px;font-size:12px;color:#a5bbd5}.touch-controls{display:none}.admin-screen h1{font-size:clamp(30px,4vw,48px)}.admin-panels{display:grid;grid-template-columns:1fr 1.2fr;gap:18px;margin:26px 0}.panel{background:#122542e8;border:1px solid var(--stroke);border-radius:19px;padding:26px}.panel-head{display:flex;gap:14px;align-items:center;margin-bottom:18px}.panel-head h2{font-size:19px;margin:0 0 4px}.panel-head .muted{font-size:12px;margin:0}.panel-icon{height:48px;width:48px;display:grid;place-items:center;background:#61f6cb20;border-radius:14px;font-size:24px;flex-shrink:0}.fields-two{display:grid;grid-template-columns:1fr 1fr;gap:13px}.users-toolbar,.users-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}.users-toolbar{margin-bottom:22px}.users-controls input{min-width:260px}.users-panel h2{margin:0 0 5px;font-size:22px}.users-panel .muted{font-size:12px;margin:0}.users-list{display:flex;flex-direction:column;gap:9px}.user-row{background:#09172c94;border:1px solid #aecbfc20;border-radius:12px;display:flex;align-items:center;gap:16px;padding:13px}.user-avatar{width:46px;height:46px;display:grid;place-items:center;flex-shrink:0;border-radius:12px;color:#092b43;background:#80dddf;font-size:21px;font-weight:860}.user-info{min-width:180px;display:flex;flex-direction:column;gap:4px}.user-info strong{font-size:13px}.user-info small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.user-stats{margin-left:auto;display:flex;gap:25px}.user-stats>span{font-size:10px;color:#abc3df;font-weight:740}.user-stats b{color:#f1f8ff;font-size:13px;display:block;margin-top:4px}.dialog-backdrop{position:fixed;inset:0;z-index:30;background:#020a1edb;backdrop-filter:blur(10px);display:grid;place-items:center;padding:16px;overflow-y:auto}.dialog{background:radial-gradient(circle at 100% 0,#34588b75,transparent 52%),linear-gradient(150deg,#1d3560,#0e1b38);border:1px solid #abd8f66e;border-radius:25px;padding:clamp(25px,4vw,43px);max-width:590px;width:100%;max-height:92vh;overflow:auto;box-shadow:0 30px 90px #00000070}.dialog-sparks{color:#ffda80;letter-spacing:10px;font-size:25px;text-align:center;margin-bottom:12px}.dialog .kicker{text-align:center}.dialog h2{text-align:center;font-size:clamp(25px,3.3vw,36px)}.dialog-text{color:#ccdbed;font-size:14px;line-height:1.79}.dialog-text p{margin-bottom:12px}.dialog-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;margin-top:27px}.editor-form .muted{font-size:11px}.editor-form label.check-line{display:flex;align-items:center;gap:10px;padding:8px 0 16px;color:#e5f1fe;font-size:13px}.check-line input{height:18px;width:18px;accent-color:#5bf1c5}.toast{z-index:40;position:fixed;right:22px;bottom:22px;border-radius:12px;padding:15px 18px;max-width:min(420px,calc(100% - 44px));background:#1e6c5c;color:#fff;border:1px solid #8cf8d5;box-shadow:0 12px 30px #0006;font-size:13px;font-weight:740}.toast.error{background:#773344;border-color:#ffacb6}@keyframes hop{0%,100%{translate:0 0}50%{translate:0 -15px}}@keyframes float{0%,100%{transform:translateY(0) rotate(-8deg)}50%{transform:translateY(-10px) rotate(8deg)}}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1060px){.level-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.auth-screen{gap:28px}.auth-card{padding:24px}.user-stats{gap:13px}}
@media(max-width:850px){.topbar{padding:15px 20px}.page-shell{width:min(100% - 28px,650px);margin:22px auto 60px}.auth-screen{grid-template-columns:1fr;gap:30px}.showcase{padding:14px 0}.showcase h1{font-size:clamp(38px,7vw,60px)}.decor-scene{height:145px}.auth-card{max-width:620px;width:100%;margin:auto}.menu-hero{grid-template-columns:1fr;min-height:300px}.hero-character{display:none}.progress-metrics{grid-template-columns:1fr 1fr;gap:9px;margin-bottom:33px}.metric{padding:14px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-top{align-items:flex-start;flex-direction:column}.hud{width:100%}.touch-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 2px 0;touch-action:none;user-select:none;-webkit-user-select:none}.touch-left,.touch-right{display:flex;align-items:center;gap:7px}.touch-key{width:54px;height:59px;border:1px solid #a7dfff88;border-radius:14px;background:#24507c;color:#fff;font-size:23px;font-weight:900;touch-action:none;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}.touch-key small{font-size:9px;margin-top:5px;letter-spacing:.04em}.touch-key.jump{width:75px;height:70px;background:linear-gradient(135deg,#8ef5cd,#70b8e2);color:#10354f}.touch-key.action{background:#4d6ab2;width:67px;height:67px}.touch-key.pressed{transform:translateY(3px);filter:brightness(1.25)}.game-explain{font-size:11px;line-height:1.6}.admin-panels{grid-template-columns:1fr}.users-toolbar{align-items:stretch;flex-direction:column}.users-controls{width:100%}.users-controls input{min-width:0}.user-row{flex-wrap:wrap}.user-info{flex:1}.user-stats{order:3;width:100%;justify-content:space-between;margin:0}.section-head{align-items:flex-start;flex-direction:column}.footer{flex-direction:column;padding:20px;text-align:center}}
@media(max-width:480px){.topbar{gap:10px}.brand-mark{width:38px;height:38px;font-size:24px}.brand-copy{font-size:14px}.brand-copy small{font-size:7px}.account-label{display:none}.top-actions{gap:5px}.top-actions .btn{padding:9px;font-size:11px;min-height:38px}.showcase h1{font-size:clamp(34px,11vw,50px)}.showcase>p{font-size:13px}.feature-strip span{font-size:10px}.auth-card{padding:20px}.menu-hero{padding:25px 20px}.menu-hero h1{font-size:34px}.menu-cta{width:100%}.menu-cta .btn{width:100%}.level-grid{gap:10px}.level-card{min-height:165px;padding:12px}.level-icon{font-size:38px}.level-card strong{font-size:12px}.level-status{font-size:10px}.level-no{font-size:9px}.metric span{font-size:9px}.metric strong{font-size:20px}.canvas-wrap{border-width:2px;border-radius:10px}.canvas-label{font-size:9px;padding:5px 7px;left:6px;bottom:6px;max-width:85%}.hud{gap:6px}.hud-pill{min-width:89px;padding:7px 9px}.hud-pill strong{font-size:12px}.hud .btn{padding:9px 10px;font-size:11px}.touch-key{width:47px;height:54px}.touch-key.action{width:55px;height:61px}.touch-key.jump{width:67px;height:64px}.touch-left,.touch-right{gap:5px}.panel{padding:18px}.fields-two{grid-template-columns:1fr}.user-stats{gap:7px}.user-stats>span{font-size:9px}.dialog{padding:24px 19px}.dialog-actions .btn{flex:1}.users-controls{flex-wrap:wrap}.users-controls input{min-width:100%}}
@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.users-pager{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:18px}

/* 1.1.0 — controles de visualização, acessibilidade e dois temas. */
.view-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:12px 15px;border:1px solid var(--stroke);background:#142a4b;border-radius:15px}
.view-toolbar-label{font-size:10px;font-weight:850;letter-spacing:.15em;color:var(--muted)}
.view-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.zoom-control{display:flex;align-items:center;border:1px solid #99b5e966;border-radius:11px;background:#0b1b36;overflow:hidden;min-height:43px}
.zoom-step{border:0;background:transparent;color:#f0f6ff;min-width:41px;height:42px;font-size:24px;font-weight:700;line-height:1;touch-action:manipulation}
.zoom-step:not(:disabled):hover{background:#5476a84d}
.zoom-step:focus-visible{outline:2px solid var(--mint);outline-offset:-2px}
.zoom-control output{min-width:55px;text-align:center;font-size:12px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.view-action{min-height:43px;padding:9px 13px;font-size:12px}
.theme-toggle{white-space:nowrap}
/* Fases e controles continuam dentro do modo expandido, também no celular. */
#gameScreen:fullscreen,#gameScreen:-webkit-full-screen,#gameScreen.is-immersive{box-sizing:border-box;width:100%;height:100%;margin:0;padding:12px clamp(10px,2vw,28px);overflow:auto;background:var(--bg);color:var(--text);display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:8px;overscroll-behavior:contain}
#gameScreen.is-immersive{position:fixed;inset:0;z-index:60;width:100vw;height:100dvh}
body.game-immersive{overflow:hidden}
#gameScreen:fullscreen .game-top,#gameScreen.is-immersive .game-top{margin:0;flex:0 0 auto}
#gameScreen:fullscreen .game-top h1,#gameScreen.is-immersive .game-top h1{font-size:clamp(17px,2vw,27px)}
#gameScreen:fullscreen .view-toolbar,#gameScreen.is-immersive .view-toolbar{margin:0;padding:7px 10px;flex:0 0 auto}
#gameScreen:fullscreen .canvas-wrap,#gameScreen.is-immersive .canvas-wrap{width:min(100%,calc((100dvh - 220px)*1.777778));height:auto;max-height:calc(100dvh - 220px);aspect-ratio:16/9;flex:0 0 auto;margin:0 auto}
#gameScreen:fullscreen .touch-controls,#gameScreen.is-immersive .touch-controls{flex:0 0 auto;margin:0}
#gameScreen:fullscreen .game-explain,#gameScreen.is-immersive .game-explain{margin:0;font-size:11px}
/* Tema claro integral: navegação, autenticação, menu, jogo, painel e modais. */
html[data-theme="light"]{color-scheme:light;--bg:#f7f9fe;--panel:#fff;--panel2:#eef3fc;--stroke:#cad7ea;--text:#152746;--muted:#526783;--mint:#046c65;--indigo:#304da2;--gold:#8b5600}
html[data-theme="light"] body{background:#f7f9fe;color:var(--text)}
html[data-theme="light"] .sky-noise{opacity:.1;background-image:radial-gradient(#475d8470 .7px,transparent .7px)}
html[data-theme="light"] .topbar{border-color:#cbd7e9}
html[data-theme="light"] .brand-mark{color:#fff;background:linear-gradient(120deg,#174477,#2668a7)}
html[data-theme="light"] .brand-copy strong{color:#085a77}
html[data-theme="light"] .account-label{color:#284766}
html[data-theme="light"] .footer{border-color:#cbd7e9}
html[data-theme="light"] .kicker{color:#075c80}
html[data-theme="light"] .btn.primary{color:#fff;background:linear-gradient(120deg,#13568b,#087b92);box-shadow:0 7px 20px #1f648a20}
html[data-theme="light"] .btn.subtle{color:#183957;background:#edf3fa;border-color:#b9ccdf}
html[data-theme="light"] .btn.subtle:hover{background:#dfeaf6;border-color:#7595b6}
html[data-theme="light"] .btn.outline{color:#164b75;border-color:#7e9fbd;background:#fff}
html[data-theme="light"] .btn.outline:hover{background:#e9f3fb}
html[data-theme="light"] .showcase>p{color:#526782}
html[data-theme="light"] .feature-strip span{background:#fff;color:#244765;border-color:#c8d9e9}
html[data-theme="light"] .auth-card{background:#fff;border-color:#d4dfed;box-shadow:0 25px 70px #1d3b6015}
html[data-theme="light"] .auth-note{color:#556d85}
html[data-theme="light"] .form-switch{background:#e9f0fa;border-color:#cfdaeb}
html[data-theme="light"] .form-switch button.active{color:#fff;background:linear-gradient(110deg,#164a82,#09889d)}
html[data-theme="light"] .field label{color:#213f5f}
html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] .users-controls input{background:#fff;color:#152b47;border-color:#afc1d5}
html[data-theme="light"] .field input::placeholder,html[data-theme="light"] .users-controls input::placeholder{color:#6b8096}
html[data-theme="light"] .form-message{color:#9d2447}
html[data-theme="light"] .menu-hero{border-color:#c3d8e9;background:radial-gradient(circle at 88% 66%,#cce9f3 0,transparent 48%),linear-gradient(115deg,#fff,#e7f2fc)}
html[data-theme="light"] .menu-hero .muted{color:#4a6885}
html[data-theme="light"] .metric{background:#fff;border-color:#d4dfec}
html[data-theme="light"] .metric span{color:#59718c}
html[data-theme="light"] .metric strong{color:#143656}
html[data-theme="light"] .keyboard-tip{color:#415d7b}
html[data-theme="light"] .keycap{background:#fff;color:#23486a;border-color:#a8bfd9}
html[data-theme="light"] .hud-pill{background:#fff;border-color:#becddd}
html[data-theme="light"] .hud-pill small{color:#526784}
html[data-theme="light"] .hud-pill strong{color:#935000}
html[data-theme="light"] .canvas-wrap{border-color:#90acc8;box-shadow:0 18px 45px #254a6a25}
html[data-theme="light"] .game-explain{color:#435d78}
html[data-theme="light"] .view-toolbar{background:#fff;border-color:#cad7e8}
html[data-theme="light"] .zoom-control{background:#edf3fb;border-color:#a6bbd2}
html[data-theme="light"] .zoom-step,html[data-theme="light"] .zoom-control output{color:#1b4467}
html[data-theme="light"] .zoom-step:not(:disabled):hover{background:#d8e6f4}
html[data-theme="light"] .touch-key{background:#215c88;border-color:#94cce4}
html[data-theme="light"] .touch-key.action{background:#415aa2}
html[data-theme="light"] .touch-key.jump{color:#123855;background:linear-gradient(120deg,#8deec5,#7ac9f4)}
html[data-theme="light"] .panel{background:#fff;border-color:#d1ddec}
html[data-theme="light"] .panel-icon{background:#e2f1f6}
html[data-theme="light"] .user-row{background:#f4f8fc;border-color:#d1ddea}
html[data-theme="light"] .user-stats>span{color:#526780}
html[data-theme="light"] .user-stats b{color:#1b3854}
html[data-theme="light"] .user-avatar{background:#bee6e4;color:#1b495f}
html[data-theme="light"] .dialog-backdrop{background:#0c1939b8}
html[data-theme="light"] .dialog{background:#fff;border-color:#d6e1ed;box-shadow:0 30px 80px #14294e55}
html[data-theme="light"] .dialog-text{color:#3e5771}
html[data-theme="light"] .editor-form label.check-line{color:#27415c}
html[data-theme="light"] .toast{color:#fff}
html[data-theme="light"] .level-card{color:#fff} /* mantém a identidade dos dez biomas */
html[data-theme="light"] .level-no,html[data-theme="light"] .level-status{color:#f8fdff}
html[data-theme="light"] #gameScreen:fullscreen,html[data-theme="light"] #gameScreen.is-immersive{background:#f7f9fe}
@media(max-width:850px){.view-toolbar{align-items:flex-start}.view-toolbar-actions{justify-content:flex-start;width:100%}}
@media(max-width:600px){.view-toolbar{padding:9px;gap:7px}.view-toolbar-label{font-size:9px}.view-toolbar-actions{gap:6px}.view-action{font-size:11px;min-height:38px;padding:8px}.zoom-control{min-height:38px}.zoom-step{height:38px;min-width:37px}.zoom-control output{min-width:46px}.top-actions .theme-toggle{padding:8px;font-size:10px;min-height:36px}.view-toolbar #gameThemeToggle{display:none}}
@media(max-height:520px) and (orientation:landscape){#gameScreen:fullscreen,#gameScreen.is-immersive{padding:4px 10px;gap:3px;justify-content:space-between}#gameScreen:fullscreen .game-top .kicker,#gameScreen.is-immersive .game-top .kicker{display:none}#gameScreen:fullscreen .game-top h1,#gameScreen.is-immersive .game-top h1{font-size:15px}#gameScreen:fullscreen .hud-pill,#gameScreen.is-immersive .hud-pill{padding:4px 8px;min-width:68px}#gameScreen:fullscreen .hud .btn,#gameScreen.is-immersive .hud .btn{min-height:30px;padding:4px 8px;font-size:10px}#gameScreen:fullscreen .view-toolbar,#gameScreen.is-immersive .view-toolbar{padding:2px 8px}#gameScreen:fullscreen .view-toolbar-label,#gameScreen.is-immersive .view-toolbar-label{display:none}#gameScreen:fullscreen .view-toolbar-actions,#gameScreen.is-immersive .view-toolbar-actions{gap:5px}#gameScreen:fullscreen .view-action,#gameScreen.is-immersive .view-action{min-height:30px;padding:4px 8px;font-size:10px}#gameScreen:fullscreen .zoom-control,#gameScreen.is-immersive .zoom-control{min-height:30px}#gameScreen:fullscreen .zoom-step,#gameScreen.is-immersive .zoom-step{height:29px;min-width:32px}#gameScreen:fullscreen .canvas-wrap,#gameScreen.is-immersive .canvas-wrap{width:min(100%,calc((100dvh - 146px)*1.777778));max-height:calc(100dvh - 146px)}#gameScreen:fullscreen .touch-controls,#gameScreen.is-immersive .touch-controls{gap:4px}#gameScreen:fullscreen .touch-key,#gameScreen.is-immersive .touch-key{height:40px;min-height:40px;width:46px;font-size:17px}#gameScreen:fullscreen .touch-key.jump,#gameScreen.is-immersive .touch-key.jump{width:55px}#gameScreen:fullscreen .touch-key.action,#gameScreen.is-immersive .touch-key.action{width:51px}#gameScreen:fullscreen .touch-key small,#gameScreen.is-immersive .touch-key small{font-size:8px;margin-top:2px}#gameScreen:fullscreen .game-explain,#gameScreen.is-immersive .game-explain{display:none}}
@media(max-width:850px){#gameScreen:fullscreen .canvas-wrap,#gameScreen.is-immersive .canvas-wrap{max-width:100%}}

/* 1.2 — música original e campos de senha acessíveis. */
.password-box{position:relative;width:100%}
.password-box>input{padding-right:52px!important}
.password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:39px;height:38px;border:1px solid transparent;border-radius:9px;color:#c8dbf5;background:transparent;display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
.password-toggle:hover{background:#648bb12e;color:#fff}
.password-toggle:focus-visible,.audio-close:focus-visible,.audio-panel input:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
html[data-theme="light"] .password-toggle{color:#416581}
html[data-theme="light"] .password-toggle:hover{color:#17496d;background:#e4ecf6}
.top-actions,.view-toolbar-actions{position:relative}
.audio-button{white-space:nowrap}
.audio-panel{position:absolute;z-index:110;top:calc(100% + 10px);right:0;width:min(308px,calc(100vw - 28px));padding:17px;border-radius:17px;background:#102445;border:1px solid #8bb8ef85;color:#edf7ff;box-shadow:0 20px 65px #0008;font-size:13px}
.audio-panel[hidden]{display:none!important}
.audio-panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px;font-weight:850;padding:0 0 8px;border-bottom:1px solid #b2d0f32e}
.audio-close{border:0;background:transparent;color:inherit;font-size:25px;line-height:1;padding:2px 8px;cursor:pointer}
.audio-option{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:48px;font-weight:650}
.audio-option input{appearance:auto;width:20px;height:20px;accent-color:#62e6c4;cursor:pointer}
.audio-volume-label{display:flex;align-items:center;justify-content:space-between;margin:10px 0 9px;font-weight:800}
.audio-panel input[type=range]{display:block;width:100%;accent-color:#65e8c6;cursor:pointer;min-height:24px}
.audio-panel p{font-size:10px;line-height:1.5;color:#b1cae7;margin:11px 0 0}
html[data-theme="light"] .audio-panel{background:#fff;color:#1d3854;border-color:#aac2da;box-shadow:0 18px 42px #12345535}
html[data-theme="light"] .audio-panel-title{border-bottom-color:#d4dfed}
html[data-theme="light"] .audio-panel p{color:#556c87}
@media(max-width:600px){.top-actions .audio-button{font-size:10px;padding:8px 9px}.audio-panel{right:0;max-width:calc(100vw - 26px)}.view-toolbar-actions .audio-panel{right:0}}
/* Menus suspensos acima do conteúdo principal e do Canvas. */
.topbar{position:relative;z-index:20}
.view-toolbar{position:relative;z-index:15}

/* 1.3 — reforço visual: acesso administrativo exclusivo de sessão autenticada. */
body[data-account-state="public"] #accountLabel,
body[data-account-state="public"] #adminButton,
body[data-account-state="public"] #logoutButton,
body[data-account-state="player"] #adminButton{display:none!important}


/* 1.4 — transição automática, troféu, moedas animadas e fogos de artifício. */
.stage-celebration{position:fixed;inset:0;z-index:60;isolation:isolate;display:grid;place-items:center;overflow:hidden;padding:18px;background:radial-gradient(circle at 50% 42%,#325e93e9 0%,#0c1f47f5 62%,#07122ff9 100%);color:#fff}
.stage-celebration[hidden]{display:none!important}
.celebration-fireworks{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.celebration-card{position:relative;z-index:1;width:min(520px,100%);padding:clamp(22px,4.2vw,43px);text-align:center;border-radius:30px;background:linear-gradient(150deg,#172f5fe9,#122548ed);border:1px solid #c8e2ff83;box-shadow:0 28px 95px #000a, inset 0 1px #ffffff2e;animation:celebrationRise .65s cubic-bezier(.2,.8,.2,1) both}
.celebration-eyebrow{font-size:12px;font-weight:900;letter-spacing:.22em;color:#82ffe1;margin:0 0 10px}
.celebration-trophy{display:block;font-size:clamp(68px,12vw,104px);line-height:1.22;filter:drop-shadow(0 13px 17px #ffc75655);animation:celebrationTrophy 1.8s ease-in-out infinite}
.celebration-card h2{font-size:clamp(25px,5vw,39px);margin:8px 0 7px;color:#fff;letter-spacing:-.04em}
.celebration-subtitle{color:#c9dcfa;font-size:clamp(12px,2.8vw,15px);line-height:1.5;margin:0 0 22px}
.celebration-stats{display:flex;gap:13px;justify-content:center;align-items:center;padding:15px 18px;margin:0 auto 23px;background:#ffffff12;border:1px solid #ffffff2b;border-radius:18px;width:max-content;max-width:100%}
.celebration-coin-icon{font-size:37px;filter:drop-shadow(0 0 14px #ffc451a1)}
.celebration-stats>div{display:flex;flex-direction:column;align-items:flex-start;min-width:85px}
.celebration-stat-label{font-size:9px;letter-spacing:.08em;font-weight:900;color:#bbd1ef;white-space:nowrap}
.celebration-stats strong{font-size:32px;line-height:1.2;font-weight:900;color:#ffde82;font-variant-numeric:tabular-nums}
.celebration-score{border-left:1px solid #ffffff30;padding-left:16px}
.celebration-next{font-size:13px;font-weight:800;color:#aef9e6;line-height:1.5;margin-bottom:14px}
.celebration-progress{width:100%;height:7px;border-radius:20px;overflow:hidden;background:#ffffff27}
.celebration-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#6cefd0,#ffe08b);animation:celebrationLoad 3.8s linear forwards}
@keyframes celebrationRise{from{transform:translateY(38px) scale(.92);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@keyframes celebrationTrophy{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-8px) rotate(4deg)}}
@keyframes celebrationLoad{to{width:100%}}
@media(max-width:480px){.celebration-card{padding:23px 17px;border-radius:23px}.celebration-stats{gap:8px;padding:12px}.celebration-coin-icon{font-size:30px}.celebration-stat-label{font-size:8px}.celebration-stats strong{font-size:27px}.celebration-score{padding-left:10px}.celebration-next{font-size:12px}}
@media(prefers-reduced-motion:reduce){.celebration-card,.celebration-trophy{animation:none}.celebration-progress span{animation:celebrationLoad 1.8s linear forwards}}

/* Transição cabe inteira também em celulares na horizontal. */
@media(max-height:520px){
 .stage-celebration{padding:6px 12px;overflow-y:auto;align-items:start}
 .celebration-card{margin:auto;padding:12px 20px;border-radius:19px}
 .celebration-eyebrow{font-size:10px;margin-bottom:0}
 .celebration-trophy{font-size:49px;line-height:1.05}
 .celebration-card h2{font-size:24px;margin:4px 0 2px}
 .celebration-subtitle{font-size:11px;margin-bottom:10px}
 .celebration-stats{padding:7px 13px;margin-bottom:10px}
 .celebration-coin-icon{font-size:26px}
 .celebration-stats strong{font-size:23px}
 .celebration-next{font-size:11px;margin-bottom:8px}
 .celebration-progress{height:5px}
}
