body.space-viewer .library,body.space-viewer .inspector,body.space-viewer .top-actions,body.space-viewer .space-head-controls,body.space-viewer #floorLaunch,body.space-viewer .stage-tools,body.space-viewer #spaceStart,body.space-viewer .viewbar,body.space-viewer [data-mode=split],body.space-viewer #drag3d,body.space-viewer #mobileSunDock,body.space-viewer #sunSceneHandle,body.space-viewer #lampLiftControl,body.space-viewer #lampMoveControl,body.space-viewer .studio-drawer-scrim{display:none!important}
body.space-viewer .workspace{grid-template-columns:minmax(0,1fr)!important;height:calc(100dvh - 64px)!important}
@layer shadcn{
 body.space-viewer #view3d .orbit-controls #drag3d{display:none!important}
 @media(max-width:820px){
  body.space-viewer .viewer-fit{display:none!important}
  body.space-viewer #mobileFit{display:inline-flex!important}
  body.space-viewer.mobile-layout .stage-bottom{min-height:44px!important;padding:0 12px!important}
  body.space-viewer.mobile-layout .space-view-home-footer{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;font-size:12px}
 }
}
body.space-viewer .topbar{height:64px;gap:16px;padding:0 20px;display:flex;flex-wrap:nowrap;align-items:center}
body.space-viewer .brand{min-width:0;flex:none}
body.space-viewer .brand strong{font-size:18px}
body.space-viewer .mode-tabs{margin-left:auto;flex:none}
.space-view-name{font-size:13px;min-width:0;max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.space-view-badge{font-size:12px;color:var(--muted);white-space:nowrap}
.space-view-home{font-size:12px;text-decoration:none;white-space:nowrap}
.viewer-fit{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;color:var(--muted);border-radius:4px}.viewer-fit .ui-icon{width:18px;height:18px}.viewer-fit:hover{background:var(--ui-hover)}
body.space-viewer #mobileFit{display:none!important}
body.space-viewer.mobile-layout .viewer-fit{min-width:44px;min-height:44px}
body.space-viewer .stage-bottom{justify-content:center;font-size:12px;min-height:28px}
body.space-viewer #plan [data-item],body.space-viewer #plan [data-fixture]{cursor:grab!important}
.space-view-notice{position:fixed;inset:0;z-index:10000;background:var(--paper);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center}
.space-view-notice h1{font-size:20px;font-weight:600}.space-view-notice p{font-size:14px;color:var(--muted);line-height:1.7}.space-view-notice a{color:var(--accent-ink);margin-top:16px;font-size:13px}
body.space-view-failed .topbar,body.space-view-failed .workspace{display:none!important}
body.space-viewer.mobile-layout .topbar.compact-header{height:104px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;grid-template-rows:44px 44px;padding:8px 12px 0;gap:0 8px}
body.space-viewer.mobile-layout .brand{grid-column:1;grid-row:1}
body.space-viewer.mobile-layout .brand strong{display:none}
body.space-viewer.mobile-layout .brand-symbol{width:24px;height:24px}
body.space-viewer.mobile-layout .space-view-name{grid-column:2;grid-row:1;max-width:none}
body.space-viewer.mobile-layout .space-view-badge{grid-column:3;grid-row:1}
body.space-viewer.mobile-layout .space-view-home{display:none}
body.space-viewer.mobile-layout .mode-tabs{position:static;grid-column:1/-1;grid-row:2;width:100%;margin:0;align-self:end}
.space-view-home-footer{display:none}
body.space-viewer.mobile-layout .space-view-home-footer{display:inline;color:var(--accent-ink);text-decoration:none}
body.space-viewer.mobile-layout .stage-bottom>span{display:none}
body.space-viewer.mobile-layout .workspace{height:calc(var(--mobile-height,100dvh) - 104px)!important}
body.space-viewer.mobile-layout .stage-bottom{font-size:11px;line-height:16px;padding:6px 12px}
@media(max-width:380px){.space-view-home{display:none}}

:root:fullscreen body.space-viewer .workspace{height:var(--mobile-height,100dvh)!important}
/* Read-only views retain the studio frame and clear non-editing affordances. */
.space-view-name{font-size:14px;font-weight:500;color:var(--ink)}
.space-view-badge{padding:4px 8px;border:1px solid var(--line);border-radius:7px;background:var(--paper);font-size:11px;line-height:18px}
.space-view-home{padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--panel)}
.space-view-home:hover{background:var(--ui-hover)}.space-view-home:focus-visible,.viewer-fit:focus-visible{outline:2px solid var(--accent-ink);outline-offset:3px}
.viewer-fit{border:1px solid var(--line);border-radius:8px;min-width:36px;min-height:36px;background:var(--panel)}
.space-view-notice{background:var(--paper);gap:8px}.space-view-notice h1{font-size:24px;line-height:34px;margin:0;max-width:560px}.space-view-notice p{font-size:14px;line-height:24px;max-width:440px;margin:8px 0}.space-view-notice a{padding:10px 16px;border:1px solid var(--line);border-radius:9px;background:var(--panel);text-decoration:none}
@media(max-width:680px){.space-view-name{font-size:13px}.space-view-badge{font-size:10px;padding:3px 6px}.space-view-notice h1{font-size:21px;line-height:30px}.space-view-notice a{min-height:44px}}

/* Keep fit and zoom targets aligned inside the same toolbar. */
body.space-viewer .zoom-control button{height:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:680px){body.space-viewer .zoom-control button{height:44px;min-height:44px}}

/* Public viewing shares the neutral studio composition, without editor controls. */
.space-view-badge{background:var(--ui-secondary);color:var(--ui-muted);border:0;border-radius:8px;padding:5px 10px}
.space-view-home{border:0;border-radius:12px;background:var(--ui-secondary);min-height:40px;box-sizing:border-box}
.space-view-notice{background:var(--ui-surface);text-align:left;align-items:flex-start;gap:16px;padding:48px max(24px,calc((100vw - 480px)/2))}
.space-view-notice h1{font-size:28px;line-height:39px;letter-spacing:-.6px;font-weight:600}
.space-view-notice p{font-size:16px;line-height:26px}
.space-view-notice a{border:0;border-radius:14px;padding:14px 20px;background:var(--ui-secondary);font-size:16px;min-height:52px;box-sizing:border-box}

.space-viewer :is(.space-view-home,.space-view-home-footer){background:#267b61;color:#fff;border-color:#267b61;font-weight:600}.space-viewer :is(.space-view-home,.space-view-home-footer):hover{background:#206a53}.view-copy-dialog{max-width:460px}.view-copy-dialog .home-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px}.view-copy-dialog .home-body{padding:18px 20px}.view-copy-dialog [hidden]{display:none}

@layer shadcn{@media(max-width:820px){body.space-viewer.mobile-layout .stage-bottom{flex:0 0 auto!important;height:calc(60px + env(safe-area-inset-bottom,0px))!important;min-height:60px!important;box-sizing:border-box!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))!important}body.space-viewer.mobile-layout .space-view-home-footer{color:#fff!important;padding:0 18px!important;border-radius:11px!important;min-height:44px!important;font-weight:600!important;white-space:nowrap!important}}}
