/* Shared final layout layer: content width, available height, and input modality. */
:root{--space-page:clamp(16px,2.5vw,48px);--space-section:clamp(48px,7vw,112px);--screen-height:100vh;--screen-height:100dvh;--safe-bottom:env(safe-area-inset-bottom,0px)}
*,*::before,*::after{box-sizing:border-box}img,video{max-width:100%;height:auto}canvas{display:block;max-width:100%}html{scroll-padding-top:100px}body{min-width:0}h1,h2,h3,p,dd{overflow-wrap:break-word}input,select,textarea{min-width:0}button,a,input,select,textarea{scroll-margin-block:90px}button{touch-action:manipulation}
.marketing-hero,.marketing-intro,.capability,.industries,.marketing-cta,.manifesto-strip,.public-pricing{width:100%;max-width:1440px;margin-inline:auto}.marketing-nav{padding-inline:max(var(--space-page),calc((100vw - 1440px)/2 + var(--space-page)))}.marketing-hero{min-height:0;padding:var(--space-section) var(--space-page);grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.marketing .hero-copy{min-width:0}.hero-copy h1{font-size:clamp(2.5rem,6.2vw,6rem)}.hero-stage{height:clamp(320px,48vw,600px)}.marketing-intro,.capability,.industries,.marketing-cta{padding-inline:var(--space-page)}.site-footer{padding-inline:max(var(--space-page),calc((100vw - 1440px)/2 + var(--space-page)))}.legal-article{max-width:850px;min-width:0}.legal-layout{max-width:1280px;margin-inline:auto}.legal-article a{overflow-wrap:anywhere}
.main,.content,.panel,.builder-settings,.builder-preview,.security-stack{min-width:0}.content{max-width:1800px;margin-inline:auto;padding:clamp(20px,2.5vw,40px) var(--space-page)}.workspace-page-heading h1,.page-heading h1{font-size:clamp(24px,2.2vw,36px)}.workspace-page-heading,.page-heading,.section-head{flex-wrap:wrap;gap:14px}.workspace-page-heading>div,.page-heading>div{min-width:0}.workspace-page-heading p,.page-heading p{font-size:clamp(12px,1vw,14px);line-height:1.7}.asset-grid,.tools-grid,.project-grid:not(.list){grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:clamp(12px,1.5vw,24px)}.project-grid:not(.list),.asset-grid{align-items:start}.project-card,.asset-card,.tool-card{min-width:0}.settings-grid,.builder-layout,.job-layout{grid-template-columns:repeat(2,minmax(0,1fr))}.table-scroll{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}.table-scroll[data-overflow=true]{border-bottom:2px solid #ff6b00}.table-scroll[data-overflow=true]::before{content:'Scroll horizontally to see all columns →';display:block;position:sticky;left:0;width:fit-content;padding:8px 4px;font-size:12px;color:var(--text-secondary,var(--text-secondary))}.table-scroll:focus-visible{outline:2px solid #ff6b00;outline-offset:3px}.table{width:100%}.table th,.table td{font-size:12px}.table td .btn{min-height:40px}.filters,.project-tabs,.workflow-steps,.editor-assets{max-width:100%;overscroll-behavior-inline:contain}.filters>*{flex-shrink:0}.library-toolbar{flex-wrap:wrap}.library-toolbar .local-search{flex:1 1 190px;min-width:0}.library-toolbar>select{flex:0 1 150px}.form-actions,.preview-footer,.billing-summary,.section-tools{flex-wrap:wrap}.secret-token,.code-example{max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap}.footer{flex-wrap:wrap;gap:12px}#toast{max-width:calc(100% - 24px);bottom:max(16px,var(--safe-bottom));overflow-wrap:anywhere}
/* Modal content remains scrollable even in landscape and above a software keyboard. */
dialog{max-width:calc(100% - 24px);max-height:calc(var(--screen-height) - 24px);overflow:auto;overscroll-behavior:contain;margin:auto;padding:clamp(16px,3vw,28px)}dialog .dialog-head{position:sticky;top:-1px;z-index:6;background:inherit;padding-block:8px;margin-top:-8px}dialog .dialog-head h2{min-width:0;overflow-wrap:anywhere}dialog .close{flex-shrink:0;min-width:44px;min-height:44px}dialog form>.form-actions{position:sticky;bottom:-1px;z-index:3;background:inherit;padding-block:10px}dialog form{background:inherit}.command-dialog{max-height:calc(var(--screen-height) - 24px)}.command-results{max-height:calc(var(--screen-height) - 190px)}.quick-viewport{height:clamp(180px,55dvh,600px)}.image-lightbox-stage{height:clamp(150px,55dvh,720px)}.image-lightbox{max-height:calc(var(--screen-height) - 24px)}.privacy-banner{max-height:calc(var(--screen-height) - 24px);overflow:auto;bottom:max(12px,var(--safe-bottom))}.privacy-dialog{max-height:calc(var(--screen-height) - 24px)}
/* Desktop editing reserves the available height for the canvas. */
.editor-content{max-width:none;padding:clamp(12px,1.5vw,28px)!important}.editor-content .viewer-layout{grid-template-columns:clamp(140px,12vw,190px) minmax(0,1fr) clamp(220px,19vw,300px);height:clamp(300px,calc(var(--screen-height) - 250px),1300px);min-height:0}.editor-content .viewer-layout>.viewport{min-height:0;height:100%}.editor-content .scene-panel,.editor-content .properties{display:block;max-height:100%;min-height:0;overflow:auto;padding:16px}.editor-content .viewport-tools{right:12px;left:12px;width:fit-content;max-width:calc(100% - 24px);margin-inline:auto}.editor-content .viewport-tools button{min-height:36px;font-size:11px}.editor-assets{max-height:90px}.editor-panel-actions{display:none}.editor-sheet{width:min(640px,calc(100% - 24px));padding:16px;background:var(--surface);color:var(--text-primary);border:1px solid var(--border)}.editor-sheet .properties,.editor-sheet .scene-panel{display:block;max-height:none;background:inherit;padding:8px}.editor-sheet .properties input{font-size:16px!important}.editor-sheet .properties summary{min-height:44px;padding-block:12px}.editor-sheet .axis-field input{height:44px}.editor-sheet .dialog-head{display:flex;align-items:center;justify-content:space-between}.editor-sheet .dialog-head button{min-width:44px;min-height:44px}.viewport:fullscreen{height:var(--screen-height);width:100%;padding-bottom:var(--safe-bottom)}
.public-view{width:100%;max-width:1200px;padding:24px max(16px,env(safe-area-inset-right)) max(24px,var(--safe-bottom)) max(16px,env(safe-area-inset-left))}.public-canvas{height:clamp(230px,60dvh,900px);min-height:0}.public-view h1{font-size:clamp(24px,3vw,42px)}.public-view #ar-button{min-height:48px;margin-block:10px}.public-view>p{max-width:720px;margin-inline:auto;line-height:1.7}
@media(min-width:1920px){.auth-layout{max-width:1800px;margin-inline:auto}.auth-content{max-width:480px}.dashboard-insights{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
@media(max-width:1023px){.marketing-hero{grid-template-columns:1fr;gap:24px;padding-block:40px}.marketing .hero-copy h1{font-size:clamp(44px,8.5vw,82px)}.hero-stage{height:clamp(300px,55vw,540px)}.hero-description{max-width:620px}.marketing-nav{gap:16px}.marketing-nav .mobile-menu{display:block;margin-left:auto;min-width:44px;min-height:44px}.marketing-nav nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--bg);padding:20px var(--space-page) max(24px,var(--safe-bottom));flex-direction:column;align-items:stretch;max-height:calc(var(--screen-height) - 80px);overflow:auto;border-bottom:1px solid var(--border)}.marketing-nav nav.open{display:flex}.marketing-nav nav>a,.product-menu>button{min-height:44px;display:flex;align-items:center}.nav-account{margin-left:0}.nav-account>a:first-child{display:none}#product-dropdown,.marketing-nav.scrolled #product-dropdown{position:static;grid-template-columns:repeat(2,minmax(0,1fr));box-shadow:none;padding:12px 0;gap:18px}.editor-content .viewer-layout{grid-template-columns:minmax(0,1fr);height:clamp(260px,calc(var(--screen-height) - 260px),900px)}.editor-content .viewer-layout>.scene-panel,.editor-content .viewer-layout>.properties{display:none}.editor-panel-actions{display:flex;gap:10px;margin:12px 0}.editor-panel-actions button{flex:1;min-height:44px}.editor-content .viewport-tools{position:static;width:100%;max-width:100%;margin:0;border-radius:0;border-width:0 0 1px}.editor-content .viewport{display:flex;flex-direction:column}.editor-content .viewport>canvas{position:relative;flex:1;min-height:0;width:100%;height:0}.editor-content .viewer-hint{bottom:10px}.builder-layout,.job-layout,.settings-grid{grid-template-columns:1fr}.builder-preview{position:static}.auth-layout{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}}
@media(max-width:767px){.content{padding:24px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left))}.workspace-sidebar,.sidebar-collapsed .workspace-sidebar{width:min(290px,calc(100vw - 54px));padding:20px 14px max(16px,var(--safe-bottom));transform:translateX(-100%);box-shadow:none}.workspace-sidebar.open,.sidebar-collapsed .workspace-sidebar.open{transform:translateX(0)}.main,.sidebar-collapsed .main{margin-left:0}.mobile-toggle{display:flex;min-width:44px;min-height:44px;align-items:center;justify-content:center;margin-right:0}.topbar{height:68px;padding-inline:max(10px,env(safe-area-inset-left));gap:8px}.topbar-page{gap:2px;min-width:0}.topbar-page>div:not(.mobile-workspace-brand){display:none}.mobile-workspace-brand{display:block;font:800 20px Manrope;letter-spacing:-1px}.mobile-workspace-brand span{color:#ff6b00}.top-actions{gap:2px;flex-shrink:0}.top-actions .command-trigger{border:0;background:none;padding:8px}.command-trigger span,.command-trigger kbd,.top-create span,.desktop-help,.top-actions>.user-avatar{display:none}.top-create{padding:10px}.drawer-open .drawer-scrim{display:block;position:fixed;inset:0;z-index:19;background:#0009}.drawer-open{overflow:hidden}.collapse-sidebar{display:none!important}.workspace-sidebar .sidebar-scroll{overflow:auto;flex:1!important}.sidebar-collapsed .nav-link>span,.sidebar-collapsed .nav-section,.sidebar-collapsed .sidebar-profile>span:nth-child(2),.sidebar-collapsed .storage{display:revert}.sidebar-collapsed .nav-link{justify-content:flex-start}.workspace-sidebar .nav-link{min-height:44px;font-size:13px}.workspace-sidebar .sidebar-brand-row .brand{display:flex}.summary-metrics,.analytics-metrics,.qr-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-insights{grid-template-columns:1fr}.field-pair{grid-template-columns:1fr}.panel{padding:20px 16px}.btn,.icon-button,.small-btn,.filter,.project-tabs button,.view-toggle button{min-height:44px}.icon-button,.view-toggle button{min-width:44px}.btn{font-size:12px}.panel p,.tool-card-copy p,.workspace-empty p,.quiet-empty{font-size:13px;line-height:1.7}.panel h2{font-size:16px}.filters{gap:20px}.filter{padding-block:12px}.workflow-steps>button{flex:0 0 auto;min-width:110px;font-size:12px}.workflow-steps{overflow:auto}.auth-layout{display:block;min-height:var(--screen-height)}.auth-visual{display:none}.auth-panel{min-height:var(--screen-height);padding:24px max(20px,env(safe-area-inset-left)) max(20px,var(--safe-bottom))}.mobile-brand{display:block}.auth-content{padding:clamp(24px,8dvh,65px) 0;max-width:440px}.form-topbar{gap:12px;justify-content:space-between}.top-link>span{display:none}.form-bottom{flex-wrap:wrap}.auth-page input,.content input,.content select,.content textarea,dialog input,dialog select,dialog textarea{font-size:16px!important}.auth-page .form-label,.content label{font-size:12px}.editor-content .page-heading{margin-bottom:12px}.editor-content .page-heading p{display:none}.editor-content .page-heading .btn{margin:0}.editor-content .viewer-layout{height:clamp(260px,calc(var(--screen-height) - 240px),700px)}.editor-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:100%;max-height:calc(var(--screen-height) - 12px);border-radius:16px 16px 0 0;padding-bottom:max(16px,var(--safe-bottom))}.image-nav{min-width:44px;min-height:44px}.preview-footer{align-items:stretch}.preview-footer .btn{flex:1}.legal-hero h1{font-size:clamp(42px,12vw,80px)}.public-plan{padding:24px}.security-row .btn{min-height:44px}.privacy-banner .privacy-actions{flex-wrap:wrap}}
@media(max-width:479px){.marketing-nav .nav-account{display:none}.hero-actions{flex-direction:column;align-items:stretch}.hero-actions .btn{width:100%}.hero-stage{height:320px}.stage-top,.stage-bottom{left:16px;right:16px;gap:10px}.stage-caption{display:none}.industries>div{grid-template-columns:1fr}.marketing .hero-copy h1{font-size:clamp(40px,12vw,58px)}.public-pricing h1{font-size:clamp(38px,12vw,56px)}.marketing h2{font-size:clamp(30px,9vw,44px)}.marketing-nav{height:68px}.project-summary-grid,.quick-create-grid{grid-template-columns:1fr}.security-checklist{grid-template-columns:1fr}.section-head .section-tools{width:100%}.editor-content .viewport-tools button{font-size:11px;flex:1 0 auto;padding:8px}.form-actions>.btn{flex:1}.footer-baseline nav,.minimal-legal nav{flex-wrap:wrap}.library-toolbar>select{flex:1 1 120px}.connection-visual{max-width:100%;overflow:hidden}}
@media(max-height:750px) and (min-width:768px){.marketing-hero{padding-block:32px}.hero-stage{height:clamp(280px,65dvh,480px)}.auth-visual,.auth-panel{padding-block:20px}.auth-content{padding-block:24px}.visual-stage{min-height:180px;max-height:35dvh}.visual-copy h2{font-size:clamp(36px,4vw,56px)}.auth-layout{min-height:var(--screen-height)}.editor-content{padding:12px!important}.editor-content .page-heading{margin-bottom:10px}.editor-content .page-heading p{display:none}.editor-content .viewer-layout{height:max(260px,calc(var(--screen-height) - 205px))}.editor-assets{padding:8px;max-height:58px}.workspace-sidebar{padding-top:16px}.sidebar-brand-row{margin-bottom:12px}.sidebar-bottom{padding-top:8px}.storage{margin-bottom:8px}}
@media(max-height:500px){.topbar,.marketing-nav,.marketing-nav.scrolled{position:relative;height:58px}.auth-content,.page-register .auth-content,.page-forgot-password .auth-content{padding-block:24px}.auth-visual{display:none}.auth-layout{display:block}.auth-panel{max-width:640px;margin:auto}.mobile-brand{display:block}.editor-content .viewer-layout{height:300px}.public-canvas{height:260px}.privacy-banner{max-height:calc(var(--screen-height) - 16px)}.editor-sheet{max-height:calc(var(--screen-height) - 12px)}}
@media(pointer:coarse){button,.btn,.icon-button,.password-toggle{min-height:44px}.icon-button,.password-toggle{min-width:44px}.properties input[type=range]{min-height:44px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.main,.workspace-sidebar{transition:none}}
@media(max-width:767px){.sidebar-collapsed .brand>div,.sidebar-collapsed .sidebar-create span,.sidebar-collapsed .sidebar-create kbd,.sidebar-collapsed .sidebar-profile>.icon{display:revert}.sidebar-collapsed .sidebar-brand-row{display:flex}.sidebar-collapsed .sidebar-create{justify-content:flex-start}.workspace-sidebar .brand{width:auto}.sidebar-collapsed .sidebar-profile{justify-content:flex-start}}
.main{transition:none}
@media(max-width:767px){.editor-content .viewport-tools button{min-height:44px}.viewer-hint{font-size:11px}}
.mobile-nav-account{display:none}
@media(max-width:1023px){.mobile-nav-account{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--border);padding-top:20px}.mobile-nav-account>a{min-height:44px;display:flex;align-items:center}.marketing-menu-open{overflow:hidden}}
@media(max-width:767px){.auth-page .form-input{font-size:16px}}
