/* Responsive workspace shell. Advanced tools are optional; the model remains central. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:16px;max-width:100%}
body{max-width:100%;overflow-x:hidden;overflow-x:clip}main,.site-header,#project-workspace,.project-heading,.workspace-frame,.viewer-toolbar,.viewer-actions,.scan-picker,.layer-picker,.canvas-tools,.primary-actions,.project-bottom{min-width:0}
button,a,summary{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}input,textarea,select{font-size:16px!important;max-width:100%}input[type=range]{min-height:44px;padding:0}
button,summary{overflow-wrap:anywhere}button{min-width:44px}p,dd,small{overflow-wrap:anywhere}
.site-header{padding-top:max(10px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));gap:12px}.brand{flex-shrink:0}.header-actions{min-width:0;gap:8px}.header-actions button{white-space:nowrap}
main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:max(24px,env(safe-area-inset-bottom))}
.project-heading{padding:14px 2px 12px;gap:12px}.project-heading>div{min-width:0}.project-heading h1{font-size:clamp(19px,2.4vw,26px);overflow-wrap:anywhere}.project-heading p{font-size:12px}.project-heading .eyebrow{font-size:9px}
.workspace-frame{position:relative;isolation:isolate;max-width:100%;background:#081d28}.viewer-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:12px;padding:8px 12px;position:relative;z-index:5}
.scan-picker{width:100%;max-width:560px}.scan-picker>select{min-width:0!important;max-width:none;flex:1;font-size:16px!important;text-overflow:ellipsis}.scan-picker>label{font-size:12px}.viewer-actions{margin:0;display:flex;gap:6px;align-items:stretch}.viewer-actions button{font-size:12px;line-height:1.2;padding:8px 10px;white-space:normal;min-height:44px}
.viewer-shell{height:clamp(320px,calc(100vh - 255px),760px);height:clamp(320px,calc(100svh - 255px),760px);min-height:220px}.viewer-empty{padding:24px;gap:8px}.viewer-empty h2{margin:0;font-size:clamp(18px,2.4vw,24px)}.viewer-empty p{margin:0;font-size:14px}.empty-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;pointer-events:auto}.empty-actions button{min-height:44px}.viewer-empty small{font-size:11px}
.canvas-caption{max-width:calc(100% - 28px);font-size:10px;background:#06141dba;border-radius:4px;padding:3px 6px;left:8px;bottom:8px}.layer-warning{font-size:10px;max-width:55%;pointer-events:none}
.viewer-options{margin:0;padding:0 12px;border-top:1px solid #284756}.viewer-options>summary{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:8px 0;min-height:44px;line-height:1.3}.viewer-options>summary:before{content:'+';font-size:20px;line-height:1;margin-right:2px}.viewer-options[open]>summary:before{content:'−'}.viewer-options>summary .small{margin-left:auto;font-size:11px}.viewer-options-content{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:4px 0 12px}.viewer-options .layer-picker{flex:1;min-width:180px}.viewer-options .layer-picker select{min-width:0;width:auto;flex:1}.viewer-options .layer-picker label{display:block}.viewer-options .view-preset-buttons{width:auto;margin-left:auto}.canvas-tools{padding:7px 12px;gap:8px;flex-wrap:nowrap}.primary-actions{flex:1;gap:8px}.primary-actions button{min-height:44px;font-size:13px}.primary-actions #sources-open{background:#11384a}.viewer-status{padding:8px 12px;gap:12px}.viewer-status .review-warning{font-size:10px;max-width:260px}
.project-bottom{gap:8px;flex-wrap:wrap}.project-bottom>p{flex:1;min-width:150px}.project-bottom .text-button{font-size:12px;min-height:44px}.drawings-drawer{max-width:100%}.drawing-sheet{max-width:100%;overflow:auto}.drawing-sheet svg{max-width:100%;height:auto}.drawing-tabs{flex-wrap:wrap}.drawing-foot{flex-wrap:wrap;gap:8px}
.workspace-frame.workspace-expanded,.workspace-frame:fullscreen{position:fixed;inset:0;z-index:90;width:100%;height:100vh;height:var(--workspace-height,100dvh);max-height:var(--workspace-height,100dvh);border:0;border-radius:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);overflow:hidden}
.workspace-expanded .viewer-toolbar,.workspace-frame:fullscreen .viewer-toolbar{flex:none}.workspace-expanded .viewer-shell,.workspace-frame:fullscreen .viewer-shell{flex:1;min-height:80px;height:auto}.workspace-expanded .viewer-options,.workspace-frame:fullscreen .viewer-options{flex:none;max-height:28%;overflow:auto}.workspace-expanded .canvas-tools,.workspace-frame:fullscreen .canvas-tools,.workspace-expanded .viewer-status,.workspace-frame:fullscreen .viewer-status{flex:none}.workspace-is-expanded{overflow:hidden}
/* Keep the expanded fallback valid even in engines without the :fullscreen selector. */
.workspace-frame.workspace-expanded{position:fixed;inset:0;z-index:90;width:100%;height:100vh;height:var(--workspace-height,100dvh);max-height:var(--workspace-height,100dvh);border:0;border-radius:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);overflow:hidden}.workspace-expanded .viewer-toolbar{flex:none}.workspace-expanded .viewer-shell{flex:1;min-height:80px;height:auto}.workspace-expanded .viewer-options{flex:none;max-height:28%;overflow:auto}.workspace-expanded .canvas-tools,.workspace-expanded .viewer-status{flex:none}
.clean-view .scan-picker,.clean-view .viewer-options,.clean-view .canvas-tools,.clean-view .viewer-status{display:none}.clean-view .viewer-toolbar{grid-template-columns:1fr}.clean-view .viewer-actions{justify-content:flex-end}.clean-view .viewer-shell{height:70vh;height:70svh}.clean-view.workspace-expanded .viewer-shell,.clean-view:fullscreen .viewer-shell{height:auto}.clean-view #clean-toggle{background:#164657;border-color:#66b3ca}
dialog{max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(var(--app-viewport-height,100dvh) - 24px);overscroll-behavior:contain}.dialog-panel{max-height:calc(100vh - 26px);max-height:calc(var(--app-viewport-height,100dvh) - 26px);min-width:0}.dialog-content{min-height:0;-webkit-overflow-scrolling:touch;overflow-x:hidden}.dialog-header,.dialog-footer{min-width:0}.dialog-header>div{min-width:0}.dialog-header button{flex-shrink:0}.dialog-fallback[open]{display:block;position:fixed;inset:12px;margin:auto;z-index:200;box-shadow:0 0 0 100vmax #020b13cc}.dialog-fallback:not([open]){display:none}.dialog-fallback .dialog-panel{height:100%}
.guided-tour{position:absolute;z-index:18;right:16px;bottom:110px;width:min(360px,calc(100% - 32px));padding:16px;background:#0d2938f5;border:1px solid #55879e;border-radius:12px;box-shadow:0 12px 40px #0008}.guided-tour h2{font-size:17px;margin:5px 0 8px}.guided-tour p{font-size:13px;line-height:1.45;margin:0 0 12px}.guided-tour .tour-step{font-size:11px;color:#8fd7f0}.tour-actions{display:flex;justify-content:space-between;gap:6px}.tour-actions button{font-size:12px;min-height:44px}.tour-highlight{outline:2px solid #9ae5f7!important;outline-offset:-2px}.guided-tour button[data-tour=skip]{background:transparent}.clean-view .guided-tour{bottom:18px}.workspace-expanded .guided-tour,.workspace-frame:fullscreen .guided-tour{bottom:max(90px,env(safe-area-inset-bottom))}
.noscript-message{margin:16px;padding:16px;border:1px solid var(--line);background:var(--panel)}
.clean-view .inspection-details{display:none}.workspace-expanded .inspection-details{flex:none;max-height:30%;overflow:auto}.workspace-expanded .inspection-content{max-height:22vh}.cad-workflow{margin:14px 0;border:1px solid var(--line);border-radius:10px;padding:0 14px}.cad-workflow>summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.cad-workflow .cad-package{margin:0 0 14px;max-width:100%}.cad-package summary{min-height:44px}.inspection-details{min-width:0}.inspection-content{overflow-x:hidden}.centerline-warning{max-width:65%;overflow-wrap:anywhere}
@media print{#project-workspace>.cad-workflow{display:block!important;border:0;padding:0;margin:0}.cad-workflow>summary{display:none!important}.cad-workflow .cad-package{margin:0}}
@media(hover:hover) and (pointer:fine){[data-tip]:hover:after{max-width:min(260px,75vw);white-space:normal;z-index:60}}@media(hover:none){[data-tip]:hover:after{display:none!important}}[data-tip]:focus-visible:after{max-width:min(260px,75vw);white-space:normal;z-index:60}
@media(max-width:900px){.viewer-toolbar{grid-template-columns:1fr;gap:6px}.scan-picker{max-width:none}.viewer-actions{width:100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}.viewer-actions button{min-width:0}.viewer-shell{height:clamp(280px,calc(100svh - 290px),650px)}.viewer-status{display:block}.viewer-status .review-warning{display:block;text-align:left;max-width:none;margin-top:3px}.viewer-status #scan-explanation{display:none}.viewer-actions .help-button{font-size:12px;justify-content:center}.viewer-actions .help-button span{font-size:18px}.revision-label{max-width:110px}.clean-view .viewer-toolbar{grid-template-columns:1fr}.clean-view .viewer-actions{display:grid}.viewer-options-content{gap:8px}}
@media(max-width:600px){.site-header{gap:8px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.brand{gap:6px}.brand img{width:30px;height:30px}.brand strong{font-size:14px;letter-spacing:.08em}.brand small{font-size:6px;letter-spacing:.08em}.header-actions{gap:4px}.header-actions button{min-width:44px;font-size:11px;padding:7px}.header-actions .help-button{gap:4px}.header-actions .help-button span{display:none}main{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.project-heading{padding:11px 2px 10px;align-items:flex-start}.project-heading .eyebrow{font-size:8px;letter-spacing:.09em}.project-heading p{display:none}.project-heading h1{font-size:19px}.revision-label{font-size:9px;max-width:65px}.workspace-frame{border-radius:10px}.viewer-toolbar{padding:7px}.scan-picker{gap:5px}.scan-picker>label{font-size:11px}.viewer-actions{gap:4px}.viewer-actions button{font-size:11px;padding:6px 4px;line-height:1.2}.viewer-actions .help-button{font-size:0;gap:0}.viewer-actions .help-button span{font-size:19px}.viewer-shell{height:clamp(260px,calc(100vh - 265px),650px);height:clamp(260px,calc(100svh - 265px),650px)}.viewer-empty{padding:16px}.viewer-empty h2{font-size:18px}.viewer-empty p{font-size:13px}.canvas-caption{font-size:9px}.layer-warning{font-size:9px;padding:5px;max-width:62%}.canvas-tools{padding:7px;gap:5px}.canvas-tools>button{font-size:11px;padding:6px}.primary-actions{gap:5px}.primary-actions button{font-size:12px;flex:1;padding:6px}.primary-actions button.primary{flex:1}.viewer-options{padding:0 8px}.viewer-options .view-preset-buttons{width:100%}.viewer-options .view-preset-buttons .info-button{margin-left:auto}.viewer-options>summary{font-size:12px}.viewer-options>summary .small{font-size:10px}.viewer-status{padding:6px 9px}#preview-status{font-size:10px}.viewer-status .review-warning{font-size:9px}.project-bottom p{font-size:10px}.project-bottom .text-button{font-size:11px}.guided-tour{right:8px;bottom:106px;width:calc(100% - 16px);padding:12px}.guided-tour p{font-size:12px}.dialog-header,.dialog-footer{padding:12px}.dialog-content{padding:10px 12px}.dialog-header h2{font-size:18px}.access-panel{margin-top:28px;padding:20px}.access-panel h1{font-size:28px}.voice-line>span{min-width:100%;order:3}.region-row input{padding:8px}.source-fields{grid-template-columns:1fr;gap:3px}.source-fields dd{margin-bottom:9px}}
@media(max-height:500px) and (orientation:landscape){.project-heading{padding:8px 2px}.viewer-shell{height:65vh;height:65svh;min-height:210px}.workspace-expanded .viewer-toolbar,.workspace-frame:fullscreen .viewer-toolbar{display:flex;padding:4px 8px;gap:8px}.workspace-expanded .scan-picker,.workspace-frame:fullscreen .scan-picker{flex:1;max-width:45%}.workspace-expanded .viewer-actions,.workspace-frame:fullscreen .viewer-actions{display:flex;width:auto;flex-shrink:0}.workspace-expanded .viewer-actions button,.workspace-frame:fullscreen .viewer-actions button{min-width:44px;padding:4px 7px}.workspace-expanded .viewer-status,.workspace-frame:fullscreen .viewer-status{display:none}.workspace-expanded .viewer-options,.workspace-frame:fullscreen .viewer-options{display:none}.guided-tour{bottom:56px;max-height:calc(100% - 110px);overflow:auto}.guided-tour p{font-size:12px}.viewer-toolbar .info-button{min-width:44px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
