/* Give the existing drawing space; configuration layout and controls stay intact. */
@media(min-width:1081px){
  body .layout.editor .stage.technical-stage{height:auto;max-height:none}
  body .layout.editor .technical-stage .canvas-wrap{flex:0 0 auto}
  body .layout.editor .technical-stage .canvas{height:clamp(460px,60dvh,700px);min-height:460px;flex:none}
  body .layout.editor .technical-stage .spec-wrap{max-height:160px}
}
@media(max-width:1080px){
  body .layout.editor .stage.technical-stage{position:relative;top:auto;height:auto;max-height:none}
  body .layout.editor .technical-stage .canvas-wrap{flex:0 0 auto}
  body .layout.editor .technical-stage .canvas{height:clamp(340px,48dvh,520px);min-height:340px;flex:none}
  body .layout.editor .technical-stage .spec-wrap{max-height:130px}
}
.stage-bar .preview-enlarge{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;flex-shrink:0}
.preview-enlarge svg{width:18px;height:18px;flex:none}
.preview-large{position:fixed;inset:0;width:min(1500px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid var(--line-2);background:var(--surface);color:var(--ink)}
.preview-large[open]{display:flex;flex-direction:column}
.preview-large::backdrop{background:#0b1f35b3}
.preview-large-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);flex:none}
.preview-large-head h2{margin:0;font-size:18px}
.preview-large-zoom{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 12px;flex:none;border-bottom:1px solid var(--line)}
.preview-large-zoom .btn{min-width:44px;min-height:40px;padding:7px 12px}
.preview-large-zoom output{min-width:50px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
.preview-large-viewport{min-height:0;flex:1;overflow:auto;background:#fff;overscroll-behavior:contain}
.preview-large-sheet{width:100%;height:100%;min-width:100%;min-height:100%;padding:12px}
.preview-large-sheet>svg{display:block;width:100%;height:100%;max-width:none;max-height:none}
.preview-large-sheet,.preview-large-sheet>svg{transition:none!important;animation:none!important}
.preview-large .preview-part,.preview-large .preview-dimension{cursor:default}
.preview-large .preview-hit{pointer-events:none}
.preview-large .preview-part:hover .preview-hit{fill:transparent;stroke:transparent}
.preview-large .grips{display:none}
.preview-large-hint{margin:0;padding:8px 16px;font-size:12px;color:var(--ink-2);border-top:1px solid var(--line);flex:none}
@media(max-width:640px){
  .stage-bar .preview-enlarge{padding:7px 10px;font-size:12px}
  .preview-large{width:calc(100vw - 12px);height:calc(100dvh - 12px)}
  .preview-large-head{padding:10px;gap:8px}
  .preview-large-head h2{font-size:16px}
  .preview-large-head .btn{padding:8px;font-size:12px}
  .preview-large-sheet{padding:4px}
  .preview-large-hint{padding:8px 10px}
}
