/* One location and one control, independent of each workspace's layout. */
html {--home-navigation-height:0px}
html.home-navigation-visible {--home-navigation-height:56px}
html body.unified-home-navigation #pageHomeNavigation {
  position:fixed;inset:0 0 auto;height:56px;z-index:9;box-sizing:border-box;
  display:flex;align-items:center;padding:0 20px;margin:0;border:0;
  background:var(--studio-bg,var(--bg,#171717));
}
html body.unified-home-navigation #pageHomeNavigation[hidden] {display:none!important}
/* Keep direct studio navigation above its sticky controls, below dialogs. */
html body#studioRoot.unified-home-navigation #pageHomeNavigation {z-index:50}
html.has-home-navigation body.studio-admin :is(#adminRoot,#adminView) {min-height:calc(100dvh - var(--home-navigation-height))}
html body.unified-home-navigation #pageHomeReturn {
  display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
  box-sizing:border-box;width:108px;min-width:108px;height:36px;min-height:36px;
  margin:0;padding:0 12px;border:1px solid var(--studio-line-strong,#888)!important;
  border-radius:8px!important;background:var(--studio-control,#262626)!important;
  color:var(--studio-text,#f0f0f0)!important;font:600 13px/1.4 "Segoe UI","Microsoft YaHei",sans-serif;
  text-decoration:none;white-space:nowrap;cursor:pointer;
}
html body.unified-home-navigation #pageHomeReturn:hover {background:var(--studio-hover,#333)!important}
html body.unified-home-navigation #pageHomeReturn:focus-visible {outline:2px solid var(--studio-text,#888);outline-offset:3px}
html body.unified-home-navigation :is(.page-home-link,.studio-home-return,.workflow-nav>a[aria-label="返回首页"],#openFrontendBtn) {display:none!important}
html body.unified-home-navigation header.page-home-header {grid-template-columns:minmax(0,1fr) auto}
html body.unified-home-navigation .workflow-layout:has(#projectNavigation[hidden]) {grid-template-columns:minmax(0,1fr)!important}
html body.unified-home-navigation .workflow-nav:has(#projectNavigation[hidden]) {display:none!important}
/* Host coordinates start directly below Electron's native titlebar. */
html.has-home-navigation body[data-workspace-host] :is(.workspace-view,#workspaceLoading,#workspaceError) {top:calc(var(--desktop-caption-height,0px) + var(--demo-bar-height,0px) + var(--home-navigation-height))!important}
html.has-home-navigation body[data-workspace-host] .workspace-view {height:calc(100% - var(--desktop-caption-height,0px) - var(--demo-bar-height,0px) - var(--home-navigation-height))!important}
html.has-home-navigation body[data-workspace-host] #pageHomeNavigation {top:calc(var(--desktop-caption-height,0px) + var(--demo-bar-height,0px))}
/* Direct page visits use the same control and leave its row clear. */
html.has-home-navigation body.unified-home-navigation:not([data-workspace-host]) {padding-top:var(--home-navigation-height)!important}
html.has-home-navigation .script-app .workbench-layout {height:calc(100dvh - 62px - var(--home-navigation-height))}
html.has-home-navigation #notificationPanel {top:calc(70px + var(--home-navigation-height))}
@media(max-width:620px) {
  html.has-home-navigation .script-app .workbench-layout {height:calc(100dvh - 54px - var(--home-navigation-height))}
}
@media(min-width:900px) {
  html.has-home-navigation body.unified-home-navigation:not([data-workspace-host]) :is(.workflow-app,.script-app,.image-app),
  html.has-home-navigation body#studioRoot.unified-home-navigation:not(.auth-locked) .app-shell {height:calc(100dvh - var(--home-navigation-height))!important}
}
