/* Persistent studio frames keep their own canvas and tools. */
body.studio-workspace #shell>main{display:flex;flex-direction:column;box-sizing:border-box;height:100dvh;min-height:0;overflow:hidden;padding:20px 24px 16px}
body.studio-workspace #shell>main>header{flex:none;min-height:60px;padding:0 0 16px;margin:0;border:0;background:transparent;box-shadow:none}
body.studio-workspace #shell>main>header .eyebrow{font-size:10px;letter-spacing:.14em;margin:0 0 5px}
body.studio-workspace #pageTitle{font-size:24px;margin:0;line-height:1.3}
body.studio-workspace #shell>main>footer{display:none}
body.studio-workspace #toast:empty{display:none}
#studioWorkspace{flex:1;min-width:0;min-height:0;border:1px solid var(--ws-border);border-radius:16px;overflow:hidden;background:var(--ws-surface);box-shadow:0 6px 30px #15211b09}
#studioWorkspace[hidden],.studioFramePanel[hidden]{display:none}
.studioFramePanel{position:relative;width:100%;height:100%;min-width:0;min-height:0}
.studioFramePanel>iframe{display:block;width:100%;height:100%;border:0;background:var(--ws-surface)}
.studioFramePanel>iframe[hidden]{display:none}
.studioFrameStatus{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;height:100%;padding:24px;box-sizing:border-box;color:var(--ws-muted);text-align:center}
.studioFrameStatus[hidden]{display:none}

/* R272: one theme-aware sidebar, with projects nested under their entry. */
body.workspace-modern:not(.visitor) #shell>#workspaceSidebar{
 --sidebar-button:color-mix(in srgb,var(--ws-soft) 68%,var(--ws-surface));
 --sidebar-line:color-mix(in srgb,var(--ws-border) 70%,var(--ws-surface));
 background:var(--ws-surface);padding:14px 16px 12px!important;
}
body.workspace-modern:not(.sidebar-compact) #shell>#workspaceSidebar .sidebarBrandRow{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--sidebar-line)}
body.workspace-modern #shell #workspaceSidebar>nav.sidebarPrimaryNav{display:grid;flex:none;gap:6px;margin:0}
body.workspace-modern:not(.visitor) #shell #workspaceSidebar :is(#assetsNav,#object360Nav,#ai360Nav,#model3dNav,#projectNav,#worldBuilderNav,#railSettings){
 display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;height:auto;min-height:34px;
 margin:0!important;padding:6px 12px;border:1px solid var(--sidebar-line)!important;border-radius:9px;
 background:var(--sidebar-button)!important;color:var(--ws-text)!important;text-align:left;text-decoration:none;
 font:650 14px/1.35 system-ui,sans-serif;letter-spacing:0;
 box-shadow:0 2px 3px color-mix(in srgb,var(--ws-dark) 5%,transparent),inset 0 1px color-mix(in srgb,var(--ws-surface) 85%,transparent)!important;
 transition:background-color .16s,border-color .16s,box-shadow .16s;
}
body.workspace-modern:not(.visitor) #shell #workspaceSidebar :is(#assetsNav,#object360Nav,#ai360Nav,#model3dNav,#projectNav,#worldBuilderNav,#railSettings):hover{
 background:var(--ws-selected)!important;border-color:var(--ws-action)!important;
 box-shadow:0 2px 7px color-mix(in srgb,var(--ws-dark) 10%,transparent)!important;
}
body.workspace-modern:not(.visitor) #shell #workspaceSidebar :is(#assetsNav,#object360Nav,#ai360Nav,#model3dNav,#projectNav,#worldBuilderNav,#railSettings).active{
 background:var(--ws-selected)!important;border-color:var(--ws-action)!important;color:var(--ws-action)!important;
 box-shadow:inset 4px 0 var(--ws-action),0 2px 6px color-mix(in srgb,var(--ws-dark) 8%,transparent)!important;
}
body.workspace-modern #shell #workspaceSidebar .sidebarDestination:focus-visible,body.workspace-modern #shell #projectQuickToggle:focus-visible{outline:3px solid var(--ws-action);outline-offset:3px}
body.workspace-modern:not(.sidebar-compact) #shell #workspaceSidebar .sidebarDestination>.compactRailIcon,
body.workspace-modern #shell #workspaceSidebar .sidebarDestination>.compactRailIcon{display:inline-flex!important;align-items:center;justify-content:center;flex:none;width:20px;height:20px;margin:0!important;color:var(--ws-action)}
#workspaceSidebar .sidebarDestination svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#workspaceSidebar .sidebarDestination>.railLabel{min-width:0;white-space:normal}
#workspaceSidebar #projectNav>.railLabel{display:grid;gap:0}
#workspaceSidebar .sidebarNavEyebrow{font-size:10px;font-weight:550;line-height:1.3;color:var(--ws-muted)}
body.workspace-modern #shell #workspaceSidebar .tourNavSection{display:flex;flex-direction:column;flex:1 1 0;min-height:72px;margin-top:12px;padding-top:12px;border-top:1px solid var(--sidebar-line);overflow:hidden}
body.workspace-modern #shell #workspaceSidebar .tourNavSection.isCollapsed{flex:0 0 auto;min-height:0}
body.workspace-modern #shell #workspaceSidebar .projectNavGroup{display:grid;grid-template-columns:minmax(0,1fr) 34px;flex:none;gap:6px;margin:0}
body.workspace-modern:not(.sidebar-compact) #shell #workspaceSidebar #projectNav{height:38px;min-height:38px;padding:2px 10px;gap:8px;font-size:14px;line-height:1.25}
body.workspace-modern:not(.visitor) #shell #workspaceSidebar #projectQuickToggle{align-self:stretch;width:34px;height:auto;min-height:38px;margin:0;padding:0;border-radius:9px;border:1px solid var(--sidebar-line);background:var(--sidebar-button)!important;color:var(--ws-action)!important;font-size:22px;line-height:1}
body.workspace-modern #shell #workspaceSidebar .projectListChevron{display:inline-flex;margin-left:auto;flex:none;width:16px;height:16px;transform:none}
body.workspace-modern #shell #workspaceSidebar .projectListChevron svg{width:16px;height:16px;stroke-width:2}
body.workspace-modern #shell #workspaceSidebar #projectNav[aria-expanded="false"] .projectListChevron{transform:rotate(-90deg)}
body.workspace-modern #shell #workspaceSidebar .tourNavSection>.projectNavigation{display:flex;flex-direction:column;flex:1 1 0;min-height:0;max-height:none!important;margin:6px 0 0;padding:0;overflow:hidden}
body.workspace-modern #shell #workspaceSidebar .tourNavSection>.projectNavigation.hidden{display:none!important}
body.workspace-modern #shell #workspaceSidebar #sidebarProjects{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;margin:0 2px 0 12px;padding:0 2px 0 10px;border-left:2px solid var(--sidebar-line)}
body.workspace-modern #shell #workspaceSidebar #sidebarProjects button{display:flex;align-items:center;gap:8px;width:100%;height:28px;min-height:28px;margin:0 0 3px;padding:4px 8px;font-size:12px;line-height:1.4;border-radius:9px;background:transparent;border:1px solid transparent;color:var(--ws-text)}
body.workspace-modern #shell #workspaceSidebar #sidebarProjects button:hover{background:var(--ws-soft);border-color:var(--sidebar-line)}
body.workspace-modern #shell #workspaceSidebar #sidebarProjects button[aria-current="page"]{background:var(--ws-selected);border-color:var(--ws-action);color:var(--ws-action);font-weight:650}
body.workspace-modern #shell #workspaceSidebar #sidebarProjects button small{padding:2px 6px;border-radius:6px;background:var(--ws-soft);color:var(--ws-muted);font-size:11px}
body.workspace-modern #shell #workspaceSidebar .projectEmpty{padding:8px 10px;color:var(--ws-muted);font-size:13px}
body.workspace-modern #shell #workspaceSidebar>nav.sidebarUtilities{display:grid;flex:none;gap:6px;margin:10px 0 0;padding-top:10px;border-top:1px solid var(--sidebar-line)}
body.workspace-modern #shell #workspaceSidebar:has(.tourNavSection.isCollapsed)>nav.sidebarUtilities{margin-top:auto;padding-top:14px}
body.workspace-modern:not(.sidebar-compact) #shell #workspaceSidebar .sidebarUtilities .sidebarDestination{min-height:32px;padding:4px 12px;font-size:13px}
body.sidebar-compact.workspace-modern:not(.visitor) #shell>#workspaceSidebar{padding:12px 10px!important}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar .sidebarBrandRow{flex:none;margin-bottom:16px}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar>nav.sidebarPrimaryNav{gap:8px}
body.sidebar-compact.workspace-modern:not(.visitor) #shell #workspaceSidebar :is(#assetsNav,#object360Nav,#ai360Nav,#model3dNav,#projectNav,#worldBuilderNav,#railSettings){justify-content:center;flex:none;width:44px;height:44px;min-height:44px;margin:0 auto!important;padding:0;border-radius:11px}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar .tourNavSection{flex:0 0 auto;min-height:0;margin-top:14px;padding-top:14px;overflow:visible}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar .projectNavGroup{grid-template-columns:1fr}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar .tourNavSection>.projectNavigation,
body.sidebar-compact.workspace-modern #shell #workspaceSidebar #projectQuickToggle,
body.sidebar-compact.workspace-modern #shell #workspaceSidebar .projectListChevron{display:none!important}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar>nav.sidebarUtilities{gap:8px;margin-top:auto;padding-top:14px}
@media(max-width:760px){
 body.studio-workspace #shell>main{padding:10px;height:100dvh}
 body.studio-workspace #shell>main>header{min-height:62px;padding-bottom:10px}
 body.studio-workspace #pageTitle{font-size:19px}
 #studioWorkspace{border-radius:12px}
 body.studio-workspace:not(.sidebar-compact) #shell>main{padding-left:10px;height:calc(100dvh - 78px)}
 body.studio-workspace #shell>main>header .headerMeta{display:none}
}
@media(max-height:620px){
 body.workspace-modern:not(.visitor) #shell>#workspaceSidebar{overflow-y:auto}
 body.workspace-modern #shell #workspaceSidebar .tourNavSection{flex:none;min-height:0;overflow:visible}
 body.workspace-modern #shell #workspaceSidebar .tourNavSection>.projectNavigation{flex:none;height:160px;overflow:hidden}
 body.workspace-modern #shell #workspaceSidebar>nav.sidebarUtilities{margin-top:auto;padding-top:14px}
}
@media(max-height:500px){
 body.sidebar-compact.workspace-modern #shell #workspaceSidebar .sidebarBrandRow{margin-bottom:8px}
 body.sidebar-compact.workspace-modern #shell #workspaceSidebar>nav.sidebarPrimaryNav{gap:4px}
 body.sidebar-compact.workspace-modern #shell #workspaceSidebar .tourNavSection{margin-top:8px;padding-top:8px}
 body.sidebar-compact.workspace-modern #shell #workspaceSidebar>nav.sidebarUtilities{gap:4px;padding-top:8px}
}
@media(prefers-reduced-motion:reduce){body.workspace-modern #shell #workspaceSidebar .sidebarDestination{transition:none}}

/* Shared compact project groups for Object360, AI, 3D and Virtual Tour. */
body.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups{display:flex;flex-direction:column;gap:6px;flex:1 1 0;min-height:0;margin-top:6px;overflow-y:auto;overscroll-behavior:contain}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectSection{display:flex;flex-direction:column;flex:0 0 auto;min-height:0;margin:0;padding:0;border:0;overflow:hidden}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectSection.isCollapsed{flex:none;min-height:0;overflow:visible}
body.workspace-modern #shell #workspaceProjectGroups .projectNavGroup{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;flex:none}
body.workspace-modern:not(.sidebar-compact) #shell #workspaceProjectGroups .sidebarDestination{height:38px;min-height:38px;padding:5px 10px;gap:9px;font-size:13px;line-height:1.25}
body.workspace-modern:not(.visitor) #shell #workspaceProjectGroups .sidebarProjectAdd{display:grid;place-items:center;align-self:stretch;width:34px;min-height:38px;margin:0;padding:0;border:1px solid var(--sidebar-line);border-radius:9px;background:var(--sidebar-button)!important;color:var(--ws-action)!important;font:500 23px/1 system-ui;box-shadow:0 2px 3px color-mix(in srgb,var(--ws-dark) 5%,transparent)}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectAdd:hover{background:var(--ws-soft)!important;border-color:var(--ws-action)}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectAdd:focus-visible{outline:3px solid var(--ws-action);outline-offset:2px}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectList{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:clamp(90px,calc(100dvh - 430px),300px)!important;margin:5px 0 1px;padding:0;overflow:hidden}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectList[hidden]{display:none!important}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectList::before{content:none}
body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectEntries{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;margin:0 2px 0 12px;padding:0 2px 0 9px;border-left:2px solid var(--sidebar-line)}
body.workspace-modern:not(.visitor) #shell #workspaceProjectGroups .sidebarProjectEntries button{display:flex;align-items:center;gap:7px;width:100%;height:30px;min-height:30px;margin:0 0 3px;padding:4px 7px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--ws-text);text-align:left;font-size:12px;font-weight:450;box-shadow:none}
body.workspace-modern:not(.visitor) #shell #workspaceProjectGroups .sidebarProjectEntries button:hover{background:var(--ws-soft);border-color:var(--sidebar-line)}
body.workspace-modern:not(.visitor) #shell #workspaceProjectGroups .sidebarProjectEntries button[aria-current=page]{background:var(--ws-selected);color:var(--ws-action);border-color:var(--ws-action);font-weight:650;box-shadow:none}
#workspaceProjectGroups .sidebarProjectEntries button>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#workspaceProjectGroups .sidebarProjectEntries small{flex:none;margin-left:auto;padding:1px 5px;border-radius:5px;background:var(--ws-soft);color:var(--ws-muted);font-size:10px}
body.workspace-modern #shell #workspaceProjectGroups .sidebarDestination[aria-expanded=false] .projectListChevron{transform:rotate(-90deg)}
body.sidebar-compact.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups{flex:none;gap:8px;overflow:visible;margin-top:8px}
body.sidebar-compact.workspace-modern #shell #workspaceProjectGroups .sidebarProjectSection{flex:none;min-height:0;overflow:visible}
body.sidebar-compact.workspace-modern #shell #workspaceProjectGroups .projectNavGroup{grid-template-columns:1fr}
body.sidebar-compact.workspace-modern #shell #workspaceProjectGroups :is(.sidebarProjectList,.sidebarProjectAdd){display:none!important}
@media(max-height:500px){body.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups{flex:none;overflow:visible}body.workspace-modern #shell #workspaceProjectGroups .sidebarProjectList{max-height:160px!important}}
/* Intrinsic list height prevents a short flex list collapsing to zero. */
body.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups .sidebarProjectList{flex:0 0 auto}
body.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups .sidebarProjectEntries{flex:0 1 auto;max-height:clamp(90px,calc(100dvh - 430px),300px)}

body.workspace-modern #shell #workspaceSidebar #workspaceProjectGroups :is(.sidebarProjectList,.sidebarProjectEntries){max-height:clamp(90px,calc(100dvh - 430px),300px)!important}
