/* Final scoped studio rules. No page scaling or browser-zoom manipulation. */
html body #signinDialog{width:min(880px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;color:#243e4a!important;background:#f7fafb!important;border:1px solid #cddde4!important}
html body #signinDialog .dialog-card.class-login-card{width:100%!important;max-width:100%!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:clamp(16px,2.2vw,26px)!important;background:#f7fafb!important;color:#243e4a!important;box-shadow:none!important;border:0!important}
html body #signinDialog :is(h2,h3,label,strong,b){color:#243e4a!important}html body #signinDialog :is(.muted-text,.class-login-head p,.saved-empty,.saved-user span){color:#536e7b!important}
html body #signinDialog :is(.student-login-panel,.saved-user,.class-student-card){background:#fff!important;color:#243e4a!important;border-color:#cbdde5!important;box-shadow:none!important}
html body #signinDialog :is(input#studentNameInput,input#classCodeInput){width:100%!important;min-width:0!important;background:#fff!important;color:#243e4a!important;-webkit-text-fill-color:#243e4a!important;caret-color:#147f75!important;border:1px solid #8faebd!important;opacity:1!important}
html body #signinDialog input::placeholder{color:#5d7683!important;-webkit-text-fill-color:#5d7683!important;opacity:1!important}
html body #signinDialog :is(.primary,.secondary){background:#147f75!important;color:#fff!important;border-color:#147f75!important}
html body #signinDialog :is(.class-login-status,.local-status){background:#e5f1f4!important;color:#365d70!important;border-color:#c3d9e1!important}
html body #signinDialog .class-login-message{background:transparent!important;color:#536e7b!important}html body #signinDialog .class-login-message.bad{color:#a6293a!important}html body #signinDialog .class-login-message.good{color:#166b4b!important}
html[data-mabni-theme=dark] body #signinDialog,html[data-mabni-theme=dark] body #signinDialog .dialog-card.class-login-card{background:#192c38!important;color:#e6eef4!important;border-color:#496370!important;color-scheme:dark}
html[data-mabni-theme=dark] body #signinDialog :is(h2,h3,label,strong,b){color:#eef5f9!important}
html[data-mabni-theme=dark] body #signinDialog :is(.muted-text,.class-login-head p,.saved-empty,.saved-user span,.class-login-message){color:#bbcfda!important}
html[data-mabni-theme=dark] body #signinDialog :is(.student-login-panel,.saved-user,.class-student-card){background:#243d4b!important;color:#e6eef4!important;border-color:#4b6674!important}
html[data-mabni-theme=dark] body #signinDialog :is(input#studentNameInput,input#classCodeInput){background:#10242f!important;color:#f1f7fb!important;-webkit-text-fill-color:#f1f7fb!important;caret-color:#a1e6cc!important;border-color:#82a3b4!important}
html[data-mabni-theme=dark] body #signinDialog input::placeholder{color:#b4cbd6!important;-webkit-text-fill-color:#b4cbd6!important}
html[data-mabni-theme=dark] body #signinDialog :is(.class-login-status,.local-status){background:#345463!important;color:#e8f4fa!important;border-color:#617e8b!important}
html[data-mabni-theme=dark] body #signinDialog .class-login-message.bad{color:#ffa7b1!important}html[data-mabni-theme=dark] body #signinDialog .class-login-message.good{color:#93e9ba!important}
html[data-mabni-theme=dark] body #completeDialog,html[data-mabni-theme=dark] body #completeDialog .complete-card{background:#203542!important;color:#eef5f9!important}
html[data-mabni-theme=dark] body #completeDialog :is(h2,h3,strong,p,span){color:#e8f2f7!important}html[data-mabni-theme=dark] body #completeDialog .dialog-actions button{background:#304e5c!important;color:#eef5f9!important;border-color:#658491!important}
.studio-panel-switch{display:none}
html body #app[data-studio=focused] .studio-panel-switch button[aria-pressed=true]{background:var(--studio-accent)!important;color:#fff!important;border-color:var(--studio-accent)!important}
@media(max-width:940px){
 html body{overflow:hidden!important}html body #app[data-studio=focused]{height:100dvh!important;min-height:0!important;overflow:hidden!important}
 html body #app[data-studio=focused] .topbar{flex:0 0 auto!important;height:auto!important;min-height:60px!important;max-height:none!important;padding:8px 12px!important}
 html body #app[data-studio=focused] .level-row{height:32px!important;min-height:32px!important}
 html body #app[data-studio=focused] .studio-panel-switch{display:flex;gap:8px;align-items:center;padding:7px 12px;background:var(--studio-bg);flex:0 0 auto}
 .studio-panel-switch button{min-height:36px;padding:7px 16px;border-radius:8px;border:1px solid var(--studio-border);background:var(--studio-surface);color:var(--studio-ink);font:600 12px system-ui;cursor:pointer}
 .studio-panel-switch button[aria-pressed=true]{background:var(--studio-accent);color:#fff}.studio-panel-switch [data-pane-run]{margin-left:auto}
 html body #app[data-studio=focused] #gameShell{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;flex:1 1 0!important;min-height:0!important;height:0!important;padding:0 10px 10px!important;overflow:hidden!important}
 html body #app[data-studio=focused] :is(.left-panel,.right-panel){grid-area:1/1!important;height:100%!important;min-height:0!important;max-height:none!important;flex:initial!important}
 html body #app[data-studio=focused][data-pane=scene] .right-panel,html body #app[data-studio=focused][data-pane=code] .left-panel{display:none!important}
 html body #app[data-studio=focused] #layoutSplitter{display:none!important}
 html body #app[data-studio=focused] #blocklyArea{min-height:0!important;flex:1 1 0!important}
 html body #app[data-studio=focused] .instruction-strip{min-height:0!important;padding:10px 14px!important;flex-shrink:0!important}
 html body #app[data-studio=focused] .workspace-head{flex-shrink:0!important}
 html body #app[data-studio=focused] #visualization{min-height:0!important}
 html body #app[data-studio=focused] .play-controls{min-height:54px!important;padding:8px!important;flex-shrink:0!important}
}
@media(max-width:530px){html body #app[data-studio=focused] .user-area{gap:4px!important}html body #app[data-studio=focused] .user-area>button{padding:0 7px!important}html body #app[data-studio=focused] #conceptChooserBtn{flex-basis:100px!important;min-width:70px!important}html body #app[data-studio=focused] #themeBtn{display:flex!important}html body #signinDialog .student-login-grid{display:block!important}html body #signinDialog .student-login-panel{margin-bottom:12px!important}html body #signinDialog .local-name-row{grid-template-columns:minmax(0,1fr)!important}html body #app[data-studio=focused] .level-row{gap:2px!important}}
@media(max-height:500px){html body #app[data-studio=focused] .topbar{min-height:42px!important;padding-top:4px!important;padding-bottom:4px!important}.studio-panel-switch{padding-top:4px!important;padding-bottom:4px!important}.studio-panel-switch button{min-height:32px!important}.class-login-head h2{font-size:22px!important}}
