:root{--st-bg:#080e18;--st-panel:#101b2a;--st-line:#6bb6ff29;--st-blue:#459bff;--st-text:#edf6ff;--st-muted:#a2b7d1}
html,body{background:var(--st-bg)!important;color:var(--st-text)!important}
#toolbar{display:none!important}
#studioRibbon,#studioInspector,#studioPlacement,#studioStatus{display:none}
body.playing.building #studioRibbon{display:flex}
body.playing.building #studioPlacement{display:flex}
body.playing.building #studioStatus{display:block}
body.playing.building.studioInspectorOpen #studioInspector{display:block}
#studioRibbon{position:fixed;top:max(10px,env(safe-area-inset-top));left:12px;right:12px;z-index:35;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--st-line);border-radius:16px;background:#0b1524ed;box-shadow:0 12px 30px #0004;backdrop-filter:blur(12px);overflow-x:auto;scrollbar-width:none}
.studioBrand{flex:none;text-decoration:none;color:var(--st-text);padding-right:12px;border-right:1px solid var(--st-line)}
.studioBrand b{display:block;font-size:16px;letter-spacing:-.5px}.studioBrand small{display:block;font-size:7px;letter-spacing:1.4px;color:var(--st-blue);margin-top:4px}
.studioToolset{display:flex;gap:4px;padding-right:8px;border-right:1px solid var(--st-line)}
#studioRibbon button{flex:none;min-width:56px;min-height:49px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:1px solid transparent;border-radius:10px;background:transparent;color:#dcecff;font:700 20px/1 system-ui;touch-action:manipulation;cursor:pointer}
#studioRibbon button span{font-size:9px;letter-spacing:.1px}#studioRibbon button:hover{background:#69b4ff12}#studioRibbon button.active{background:#287eea28;border-color:#459bff77;color:#96d1ff}#studioRibbon button.danger{color:#ff929d}#studioRibbon button:disabled{opacity:.35;cursor:default}
#studioPlacement{position:fixed;left:50%;bottom:116px;transform:translateX(-50%);z-index:34;align-items:center;gap:16px;max-width:90vw;padding:8px 9px 8px 16px;border:1px solid var(--st-line);border-radius:14px;background:#0b1524e8;backdrop-filter:blur(10px)}
#studioPlacement>span{font:600 8px/1.5 system-ui;color:var(--st-muted);letter-spacing:1px}#studioPlacement b{display:block;max-width:130px;font-size:12px;color:var(--st-text);letter-spacing:.1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#studioPlace{white-space:nowrap;min-height:42px;padding:0 18px;border:1px solid #91cfff66;border-radius:10px;background:linear-gradient(115deg,#195bb8,#287eea);color:#fff;font:800 10px system-ui;letter-spacing:.4px;cursor:pointer}#studioPlace:disabled{background:#152438;color:#6f87a4;border-color:#48678540;cursor:default}
#studioInspector{position:fixed;right:14px;top:91px;bottom:230px;z-index:34;width:270px;padding:14px;border:1px solid var(--st-line);border-radius:15px;background:#0b1524ed;box-shadow:0 18px 45px #0005;overflow-y:auto;backdrop-filter:blur(12px);font-family:system-ui;scrollbar-color:#315c8a #0c1524}
.studioPanelHead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0 11px;font-size:10px;letter-spacing:1px}.studioPanelHead span{font-size:8px;color:var(--st-muted);letter-spacing:.4px;text-align:right;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#studioObjectSearch,.studioName input{width:100%;border:1px solid var(--st-line);border-radius:8px;background:#080f1b;color:var(--st-text);min-height:34px;padding:0 10px;font-size:11px;outline:0}#studioObjectSearch:focus,.studioName input:focus{border-color:#459bff}
#studioObjectList{min-height:36px;max-height:150px;overflow-y:auto;margin:9px 0 16px;scrollbar-color:#315c8a #0c1524}
.studioObject{display:block;width:100%;border:0;border-radius:7px;margin-bottom:3px;min-height:32px;text-align:left;background:transparent;color:#c7d9ef;font:600 10px system-ui;padding:6px 8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studioObject.active{background:#287eea30;color:#9bd3ff}
#studioEmptySelection{font-size:11px;line-height:1.55;color:var(--st-muted);margin:0 0 15px}
#studioProperties[hidden],#studioEmptySelection[hidden]{display:none!important}
.studioName{display:block;font-size:10px;color:var(--st-muted);margin-bottom:13px}.studioName input{display:block;margin-top:6px}.studioName input[type=color]{padding:4px;width:100%;cursor:pointer}
#studioInspector fieldset{border:0;padding:0;margin:0 0 13px}#studioInspector legend{font-size:10px;color:var(--st-muted);margin-bottom:7px}
.studioFieldRow{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.studioFieldRow label{font:800 8px system-ui}.axis-x{color:#ef7784}.axis-y{color:#7dddb1}.axis-z{color:#82b6ff}.studioFieldRow input{width:100%;min-width:0;min-height:34px;padding:0 5px;background:#080f1b;border:1px solid var(--st-line);border-radius:7px;color:var(--st-text);font:600 11px system-ui;margin-top:4px;outline:0}.studioFieldRow input:focus{border-color:#69b4ff}.studioFieldRow input:disabled{opacity:.4}
.studioWide{width:100%;min-height:34px;border:1px solid var(--st-line);border-radius:8px;background:#15273e;color:#afd8ff;font:700 9px system-ui;margin-bottom:16px;cursor:pointer}
.studioSnap{display:grid;grid-template-columns:1fr 1fr;gap:8px}.studioSnap label{font-size:9px;color:var(--st-muted)}.studioSnap select{width:100%;min-height:34px;margin-top:5px;border:1px solid var(--st-line);border-radius:7px;background:#080f1b;color:var(--st-text);font:600 10px system-ui}
#studioStatus{position:fixed;bottom:174px;left:50%;transform:translateX(-50%);z-index:33;max-width:86vw;padding:6px 11px;border-radius:9px;background:#0b1524c9;color:#d3e7ff;font:600 10px/1.35 system-ui;text-align:center;pointer-events:none}
body.building .hud .top,body.building #cross,body.building #toolHint{display:none!important}
#modeRow2{top:88px!important;right:auto!important;left:14px!important;z-index:34}
.ov{background:#080e18e8!important}.ov .card{background:linear-gradient(150deg,#15253b,#0b1320)!important;border-color:#459bff45!important;box-shadow:0 35px 90px #0008!important}.ov h1 span{color:#69b4ff!important}.ov .sub{color:#b5c9e1!important;line-height:1.55!important}.ov .eyebrow{color:#7dc1ff!important}.ghost,.pillbtn{background:#0d1c30!important;color:#dcecff!important;border-color:#459bff40!important}.ghost.sel,.pillbtn.on{background:#287eea!important;color:#fff!important}.big{background:linear-gradient(115deg,#195bb8,#287eea)!important;color:#fff!important}.wslot{background:#0c192b!important;border-color:#459bff36!important}.wslot b{color:#e5f2ff!important}.wslot small{color:#98b7db!important}#toast{background:#123361!important;border-color:#459bff70!important;color:#e5f3ff!important}
#trayStrip{background:#0b1524ed!important;border-color:#459bff38!important}.propBtn{background:#11223a!important;border-color:#459bff30!important}.propBtn.sel{background:#287eea30!important;border-color:#69b4ff!important}.trayGroupLabel{color:#78bcff!important}.propBtn small{color:#c6ddf8!important}.btn,#movePad{background:#0d213ad9!important;border-color:#459bff60!important}
@media(max-width:900px){.studioBrand{display:none}#studioRibbon{gap:4px;padding:7px}#studioRibbon button{min-width:49px;min-height:45px}#studioRibbon button span{font-size:8px}#studioInspector{width:255px;top:80px;bottom:240px}#modeRow2{top:79px!important}#studioStatus{font-size:9px}}
@media(max-width:600px){#studioInspector{right:8px;top:132px;bottom:230px;width:min(270px,calc(100vw - 16px))}#studioPlacement{bottom:106px;gap:8px;padding-left:10px}#studioPlace{padding:0 11px;font-size:9px}#studioStatus{bottom:160px;font-size:8px}#studioObjectList{max-height:100px}#studioRibbon{left:6px;right:6px}.studioToolset{padding-right:4px}#studioRibbon button{min-width:47px}#movePad{width:106px!important;height:106px!important;left:12px!important;bottom:205px!important}.acts{bottom:205px!important}.btn{min-width:48px!important;height:48px!important}.btn.big{width:56px!important;height:56px!important}}
@media(max-height:500px){#studioInspector{top:75px;bottom:100px}#studioPlacement{bottom:83px}#studioStatus{display:none!important}#modeRow2{top:78px!important}.studioName{margin-bottom:7px}}

body.playing:not(.building) #crouchBtn{display:none}

/* Complete workspace: purposeful panels, clear actions and touch-safe targets. */
body.playing.building #studioPlacement{display:none}
body.playing.building.studioPlacing #studioPlacement{display:flex}
#studioToolbox,#studioViews,#studioProjectBar{display:none}
body.playing.building #studioProjectBar{display:flex}
body.playing.building.studioToolboxOpen #studioToolbox,body.playing.building.studioViewsOpen #studioViews{display:block}
#studioToolbox,#studioViews{position:fixed;z-index:34;padding:14px;background:#0b1524f2;border:1px solid var(--st-line);border-radius:15px;box-shadow:0 18px 45px #0005;backdrop-filter:blur(12px);overflow:auto;scrollbar-color:#315c8a #0c1524;font-family:system-ui}
#studioToolbox{left:14px;top:140px;bottom:104px;width:220px}
#studioViews{left:246px;top:140px;width:256px;max-height:calc(100vh - 260px)}
#studioToolbox .studioPanelHead button,#studioViews .studioPanelHead button{width:32px;height:32px;border:0;border-radius:7px;background:#18304d;color:#d9eeff;font-size:20px;cursor:pointer}
#studioToolbox input,#studioToolbox select,#studioViews select,.studioName select{width:100%;min-height:38px;padding:6px 9px;border:1px solid var(--st-line);border-radius:8px;background:#080f1b;color:var(--st-text);font:500 11px system-ui;outline:0}
#studioToolbox select{margin:8px 0 10px}.studioName select{display:block;margin-top:6px}
#studioAssetGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:370px;overflow:auto;scrollbar-color:#315c8a #0c1524}
.studioAsset{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:68px;padding:8px 4px;border:1px solid #6bb6ff20;border-radius:10px;background:#122239;color:#e1efff;cursor:pointer}
.studioAsset span{font-size:24px;line-height:1}.studioAsset small{font:600 9px/1.2 system-ui;letter-spacing:.2px;text-align:center}.studioAsset:hover{background:#1b3a60;border-color:#459bff88}
.studioAsset.active{background:#20528d;border-color:#8dcbff}
.studioPanelHint{font:400 10px/1.5 system-ui;color:var(--st-muted);margin:10px 0 14px}
.studioTemplates{display:flex;flex-wrap:wrap;gap:5px}.studioTemplates button,.studioViewButtons button{min-height:36px;border:1px solid var(--st-line);border-radius:8px;background:#13253d;color:#dbeeff;font:600 10px system-ui;padding:6px 10px;cursor:pointer}
.studioViewButtons{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:14px}.studioViewButtons button.active{background:#225791;border-color:#69b4ff88}
#studioViews>label{display:block;font:500 10px system-ui;color:var(--st-muted);margin:10px 0}#studioViews select{margin-top:6px}
.studioCheck{display:flex!important;align-items:center;gap:6px;font:500 10px/1.4 system-ui;color:#c0d4ec;white-space:nowrap;margin:6px 0 13px}.studioCheck input[type=checkbox]{width:16px!important;height:16px;min-height:16px!important;margin:0;accent-color:#459bff}
#studioPlacement .studioCheck{margin:0;white-space:normal;max-width:84px;font-size:9px}
#studioPlaceRotate,#studioCancelPlace{flex:none;width:36px;min-height:42px;padding:0;border:1px solid var(--st-line);border-radius:9px;background:#152a45;color:#d7eaff;font:700 21px system-ui;cursor:pointer}
#studioPlacement{gap:10px}#studioPlace{min-height:44px;font-size:11px}#studioPlacement>span{max-width:100px}
#studioInspector{top:140px;bottom:104px}
#studioProjectBar{position:fixed;left:250px;right:310px;top:90px;z-index:34;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:3px 8px;border:1px solid var(--st-line);border-radius:10px;background:#0b1524dd}
#studioProjectName{width:155px;min-width:60px;max-width:45%;height:30px;background:transparent;border:0;border-bottom:1px solid #6bb6ff36;color:#e4f1ff;font:600 11px system-ui;outline:0}#studioProjectName:focus{border-color:#69b4ff}
#studioSaveState{font:500 9px system-ui;color:#95c5af;white-space:nowrap}#studioSaveState.failed{color:#ff929d}
#studioRename{height:30px;background:transparent;color:#94b9e0;border:0;font:600 9px system-ui;cursor:pointer}
body.building #pauseBtn{top:88px;z-index:35;background:#0d213a;border-color:#459bff60}
#studioInspector input,#studioInspector select,#studioToolbox input,#studioToolbox select,#studioViews select,#studioProjectName{touch-action:auto;user-select:text;-webkit-user-select:text}
#studioRibbon button:focus-visible,#studioToolbox button:focus-visible,#studioViews button:focus-visible,#studioPlace:focus-visible{outline:2px solid #97d0ff;outline-offset:2px}
body.touch .studioObject{min-height:40px}body.touch .studioFieldRow input,body.touch .studioName input,body.touch .studioName select{min-height:40px}
body.touch #studioPlaceRotate,body.touch #studioCancelPlace{width:44px;min-height:44px}
#studioInspectorToggle.active,#studioToolboxToggle.active{background:#287eea28!important}
body.touch #studioToolbox,body.touch #studioInspector{bottom:252px}
body.building .btn.big{background:linear-gradient(135deg,#225a98,#14385f)!important;color:#cce9ff!important;border-color:#459bff60!important}
#movePad .stick{background:radial-gradient(circle at 35% 30%,#e2f3ff,#69b4ff 60%,#215d9b)!important}
#loading{color:#89c9ff!important;background:#080e18!important}
#limitPill{background:#10243b!important;border-color:#459bff40!important}
#help ul{color:#b5c9e1!important}
body.studioToolboxOpen #studioToolboxToggle,body.studioInspectorOpen #studioInspectorToggle,body.studioViewsOpen #studioViewsToggle{background:#287eea28!important;border-color:#459bff55!important}
@media(max-width:1100px){#studioProjectBar{left:245px;right:76px}#studioToolbox{width:210px}#studioViews{left:14px;top:140px}#studioInspector{top:140px}#studioProjectName{width:150px}#studioProjectBar #studioRename{display:none}}
@media(max-width:600px){#studioProjectBar{top:80px;left:8px;right:60px;justify-content:flex-start}#studioProjectName{font-size:10px}#modeRow2{top:125px!important;left:8px!important}body.building #pauseBtn{top:77px;width:40px;height:40px}#studioToolbox,#studioViews,#studioInspector{top:172px;bottom:180px;width:min(270px,calc(100vw - 16px));left:8px;right:auto}#studioInspector{left:auto;right:8px}#studioAssetGrid{max-height:210px}#studioPlacement{bottom:100px;gap:5px;max-width:97vw;padding:7px}#studioPlacement>span{max-width:65px}#studioPlacement b{font-size:10px}#studioPlace{padding:0 8px;font-size:9px}#studioPlacement .studioCheck{font-size:8px;max-width:64px}#studioStatus{bottom:165px;max-width:85vw}#studioRibbon button{min-width:49px;min-height:47px}}
@media(max-height:500px){#studioProjectBar{top:80px}#studioToolbox,#studioInspector,#studioViews{top:126px;bottom:88px}#studioToolbox{width:190px}#studioAssetGrid{max-height:160px}#studioPlacement{bottom:80px}body.building #pauseBtn{top:78px}#studioProjectBar{min-height:28px}#studioProjectName{height:25px}}
@media(max-width:600px){body.touch #studioToolbox,body.touch #studioInspector{bottom:340px}}
@media(max-height:500px){body.touch #studioToolbox,body.touch #studioInspector{bottom:88px}body.touch.building #movePad,body.touch.building .acts{display:none!important}}
