/* Keep the complete preview cards in the viewport. Only the editor body scrolls. */
.wb-workspace-grid { height:var(--wb-grid-height,calc(100dvh - 200px)); grid-template-rows:minmax(0,1fr) auto; min-height:0; }
.wb-workspace-grid > [style*="grid-area: body"],.wb-workspace-grid > [style*="grid-area:body"] { min-height:0; height:100%; overflow:auto; overscroll-behavior:contain; }
.wb-construction-rail { height:auto; min-height:0; align-items:stretch; padding-bottom:env(safe-area-inset-bottom,0px) !important; }
.wb-construction-cards { height:auto; align-items:stretch; padding-bottom:12px !important; scrollbar-width:thin; }
.wb-construction-card { flex-shrink:0; height:auto; min-height:138px; }
.wb-preview-toggle { flex:0 0 28px; align-self:stretch; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border:1px solid var(--wb-line); border-radius:7px; background:#f3f7fc; color:#245d9e; cursor:pointer; padding:3px; font:600 11px system-ui; }
.wb-construction-rail[data-collapsed="true"] { height:28px; }
.wb-construction-rail[data-collapsed="true"] .wb-construction-cards { display:none !important; }
.wb-construction-rail[data-collapsed="true"] .wb-preview-toggle { flex-direction:row; flex-basis:60px; }
.wb-workspace-grid [data-wb-controller="live"] .drawing-stage { height:var(--wb-live-height,380px); min-height:180px; }
.wb-workspace-grid [data-wb-controller="live"] .cad { min-height:0; height:100%; }
.wb-workspace-grid > [style*="grid-area: body"],.wb-workspace-grid > [style*="grid-area:body"] { position:relative; isolation:isolate; }
.wb-construction-rail { position:relative; z-index:3; background:#f6f9fc; }
.wb-workspace-grid .wb-build { --bp-canvas:max(160px,calc(var(--wb-live-height,420px) - 42px)); }
.wb-workspace-grid .wb-build #editor .drawing-stage { height:auto; min-height:0; }
