:root{color-scheme:light;--ink:#232b36;--muted:#647181;--line:#cbd2dc;--paper:#f2f4f7;--blue:#2777c7;--split:50%;font-family:"Segoe UI","Malgun Gothic",sans-serif;font-size:12px;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{display:flex;flex-direction:column}button,input,select,output{font:inherit}button,select,input[type=number]{height:26px;border:1px solid #bfc8d4;border-radius:3px;background:#fff;color:var(--ink)}button{padding:3px 8px;white-space:nowrap;cursor:pointer;background:linear-gradient(#fff,#edf0f5);line-height:18px}button:hover{background:#e3effc;border-color:#75a6d8}button:active{background:#d2e5fb}button:disabled{opacity:.45;cursor:default}button.primary,.accent{background:#2777c7;border-color:#2066ae;color:white}button.primary:hover,.accent:hover{background:#1a64af}.stop{color:#a32828;border-color:#cf8e8e}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,canvas:focus-visible{outline:2px solid #257acb;outline-offset:1px}input[type=number]{padding:2px 4px;min-width:0;font-variant-numeric:tabular-nums}select{padding:2px 5px;min-width:0}input[type=range]{accent-color:#267aca;min-width:20px;height:18px;margin:0;cursor:pointer}input[type=checkbox],input[type=radio]{accent-color:#267aca;margin:0}label{font-size:11px;color:#38475a}a{color:#276caa;text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.topbar{height:38px;min-height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;border-bottom:1px solid #c6ced9;background:#e9edf2;gap:12px}.topbar h1{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:500;margin:0;white-space:nowrap}.topbar h1 strong{font-size:14px;letter-spacing:.8px;color:#245d92}.topbar h1 span{padding-left:10px;border-left:1px solid #b9c5d3}.window-actions{display:flex;gap:6px;align-items:center;font-size:11px}.window-actions button{height:24px;font-size:11px;padding:1px 7px}.window-actions a{margin-left:6px}
.workspace{display:grid;grid-template-columns:minmax(330px,var(--split)) 6px minmax(330px,1fr);min-height:0;min-width:0;flex:1;padding:6px;gap:0}.left-pane,.right-pane{min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column}.left-pane{padding-right:4px}.right-pane{padding-left:4px}.splitter{position:relative;cursor:col-resize;outline-offset:-1px;touch-action:none}.splitter::after{content:"";position:absolute;left:2px;top:calc(50% - 22px);height:44px;border-left:2px dotted #a7b4c3}.splitter:hover{background:#c7dcef}.control-stack{flex:none;display:flex;flex-direction:column;gap:4px;padding:0 1px 5px}.toolbar{display:flex;gap:5px;align-items:center;min-width:0;min-height:26px}.toolbar label{display:flex;align-items:center;gap:4px;white-space:nowrap;min-width:0}.toolbar label input[type=number]{width:60px}.toolbar button{font-size:11px;flex:none}.model-tools>label{flex:1}.model-tools label input{width:100%;flex:1}.wavelet-controls>label{flex:1}.wavelet-controls label input{width:100%;flex:1}.wavelet-controls .wavelet-choice{flex:1.2;min-width:102px}.wavelet-choice select{width:100%}.action-row{gap:5px}.action-row>.controls{flex:1}.action-row>.controls button{flex:1}.action-row .project-actions{flex:none}.action-row .project-actions button{flex:1;padding-left:5px;padding-right:5px}.engine-row{height:27px;min-height:27px;font-size:10px;color:#697789;border-bottom:1px solid #d6dce5;padding:0 2px 3px;gap:12px}.engine-row>span{white-space:nowrap}.engine-row strong{margin-left:3px;font-weight:500;color:#263b50}.engine-row .tool-select{flex:1;max-width:200px}.engine-row select{width:100%;height:23px;font-size:10px}.engine-row #placement-count{margin-left:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slider-row{gap:8px}.slider-row>label:not(.toggle){flex:1;gap:3px}.slider-row input[type=range]{width:100%;flex:1}.slider-row output{font-size:10px;min-width:27px;text-align:right;font-variant-numeric:tabular-nums}.toggle{font-size:10px!important;gap:3px!important;flex:none!important}.toggle input{width:12px;height:12px}.cmap-row{gap:7px}.cmap-row>label{flex:1}.cmap-row select{flex:1;width:100%}.cmap-row>button{margin-left:auto}.display-options,.time-options{position:relative;flex:none}.display-options>summary,.time-options>summary{font-size:10px;cursor:pointer;list-style:none;border:1px solid #bfc8d4;background:linear-gradient(#fff,#edf0f5);border-radius:3px;line-height:24px;height:26px;padding:0 7px;white-space:nowrap}.display-options>summary::after,.time-options>summary::after{content:" ▾";color:#687c91}.popover{position:absolute;top:30px;right:0;z-index:5;background:white;border:1px solid #bfc8d4;border-radius:4px;padding:12px;box-shadow:0 6px 18px #243e5a28;width:230px;display:flex;flex-direction:column;gap:10px}.popover label{display:flex;justify-content:space-between;gap:10px}.popover label input[type=number]{width:100px}.popover label.check{justify-content:flex-start}.popover p{font-size:10px;color:var(--muted);line-height:1.5;margin:0}.time-controls{gap:4px}.time-controls button{padding:2px 6px;min-width:22px}.time-controls #time{flex:1;width:40px}.time-controls #time-label{font-size:11px;min-width:60px;white-space:nowrap;font-variant-numeric:tabular-nums;text-align:right}.time-controls>label{padding-right:2px}.time-options .popover{width:215px;flex-direction:row;align-items:center;right:0}.time-options .popover label{gap:5px}.time-options .popover input{width:95px}.frame-badge{font-size:9px;color:#697789;border:1px solid #ccd5df;background:#f6f8fa;padding:3px 4px;white-space:nowrap;border-radius:2px;max-width:94px;overflow:hidden;text-overflow:ellipsis}.frame-badge.exact{color:#276547;background:#edf6ee;border-color:#bedbc5}.frame-badge.preview{color:#94622d;background:#fff6e7;border-color:#e8d3ad}
.plot-readout{flex:none;height:20px;line-height:20px;padding:0 5px;color:#5d6c7b;font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.canvas-wrap{position:relative;min-width:0;min-height:0;background:#fff;border:1px solid #d6dce5;overflow:hidden}.canvas-wrap canvas{display:block;width:100%;height:100%;background:#fff;outline-offset:-2px}.model-canvas-wrap{flex:1}.model-canvas-wrap canvas,.gather-canvas-wrap canvas{cursor:crosshair;touch-action:none}.wavelet-canvas-wrap{flex:0 0 25%;min-height:105px}.gather-toolbar{flex:none;margin:5px 1px;display:flex;flex-direction:column;gap:4px}.gather-main{gap:6px}.gather-main>label:not(.toggle){flex:1}.gather-main select{flex:1;width:100%}.gather-extra{gap:8px}.gather-extra .gather-gain-label{flex:1}.gather-extra input[type=range]{width:65px;flex:1}.gather-extra #agc-window{width:58px}.interaction-hint{font-size:9px;color:#738094;white-space:nowrap}.gather-canvas-wrap{flex:1}
.statusbar{position:relative;min-height:44px;flex:none;border-top:1px solid #bcc8d6;background:#e9edf2;padding:3px 10px 4px;display:flex;flex-direction:column;justify-content:center;gap:3px}.status{font-size:10px;min-height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#43566b}.status.error{color:#a83529}.runtime-stats{display:flex;align-items:center;gap:16px;font-size:10px;color:#657387;font-variant-numeric:tabular-nums;min-width:0}.runtime-stats strong{color:#3a4e64;font-weight:500;margin-left:3px}.runtime-stats>span{white-space:nowrap}.runtime-stats #seek-info{flex:1;overflow:hidden;text-overflow:ellipsis}.memory-details{position:relative;margin-left:auto}.memory-details>summary{list-style:none;cursor:pointer;white-space:nowrap}.memory-details>summary:after{content:" ▴"}.memory-details .memory-card{position:absolute;right:0;bottom:22px;z-index:5;background:#fff;width:310px;border:1px solid #bcc8d6;box-shadow:0 4px 18px #253f5d25;border-radius:4px;padding:12px;font-size:11px;line-height:1.5}.memory-card p{margin:0 0 8px}.memory-details.error summary{color:#a83529}progress{position:absolute;left:0;top:-3px;width:100%;height:3px;border:0;border-radius:0;accent-color:#267aca;margin:0}
dialog{border:1px solid #b7c3d3;border-radius:5px;max-width:610px;width:calc(100% - 30px);max-height:calc(100% - 40px);padding:18px 20px;background:#f7f9fb;color:var(--ink);box-shadow:0 15px 70px #1b304e36}dialog::backdrop{background:#13253f66}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.dialog-heading h2{font-size:15px;font-weight:600;margin:0}.dialog-heading button{font-size:20px;width:28px;padding:0;background:transparent;border:0}.dialog-body{font-size:12px;line-height:1.6}.dialog-body fieldset{margin:12px 0;padding:12px;border:1px solid #cbd4df;border-radius:3px}.dialog-body legend{font-size:11px;font-weight:600;padding:0 6px;color:#536b86}.dialog-body label{display:flex;flex-direction:column;gap:5px}.dialog-body input[type=number],.dialog-body select{width:100%;height:29px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.row{display:flex;gap:8px;align-items:flex-end;margin-top:12px}.row>label,.row>select{flex:1}.row button{height:29px}.dialog-actions{display:flex;justify-content:flex-end;margin-top:16px}.dialog-actions button{min-width:90px}.hint{font-size:11px;line-height:1.6;color:#68798d}.wide{width:100%;margin-top:8px}#info-content{font-size:12px;line-height:1.8}#info-content ul{padding-left:20px}.save-choice{display:flex;align-items:flex-start;gap:9px;background:#fff;border:1px solid #cbd4df;border-radius:3px;padding:13px;margin:12px 0}.save-choice input{margin-top:3px}.save-choice strong{display:block;font-size:12px}.save-choice small{display:block;margin-top:5px;color:#65778b;line-height:1.6}body:fullscreen{background:var(--paper)}
@media(min-width:1500px){:root{font-size:13px}.toolbar button,.toolbar label{font-size:12px}.control-stack{gap:5px}.toolbar{min-height:28px}button,select,input[type=number]{height:28px}.time-controls #time-label{min-width:70px}.wavelet-controls .wavelet-choice{flex:1.15}.engine-row{font-size:11px}.plot-readout{font-size:11px}.interaction-hint{font-size:10px}}
@media(max-width:1150px) and (min-width:761px){.toolbar{gap:4px}.toolbar button{padding-left:5px;padding-right:5px;font-size:10px}.toolbar label{font-size:10px}.slider-row{gap:5px}.slider-row>.toggle span{font-size:0}.slider-row .toggle[title="소스와 수신기 표시"] span::after{content:"M";font-size:10px}.slider-row .toggle[title="색상 범례 표시"] span::after{content:"C";font-size:10px}.slider-row output{min-width:22px;font-size:9px}.wavelet-controls .wavelet-choice{min-width:83px}.engine-row{gap:6px}.engine-row #placement-count{font-size:9px}.gather-extra .interaction-hint{display:none}.time-controls .frame-badge{max-width:65px;font-size:8px}.action-row{flex-wrap:wrap}.action-row>.controls{flex-basis:100%}.action-row>.project-actions{flex:1}.model-tools{flex-wrap:wrap}.model-tools>label{min-width:calc(25% - 4px)}.model-tools>button{flex:1}}
@media(max-width:760px){html,body{height:auto;min-height:100%;overflow:auto}.topbar{position:sticky;top:0;z-index:10;height:40px;min-height:40px;padding:0 8px}.topbar h1{gap:6px;font-size:10px}.topbar h1 strong{font-size:12px}.topbar h1 span{padding-left:6px}.window-actions{gap:4px}.window-actions button{font-size:10px;padding:1px 5px}.window-actions a{display:none}.workspace{display:flex;flex-direction:column;min-height:1100px;padding:6px}.left-pane,.right-pane{padding:0;overflow:visible}.left-pane{height:650px;min-height:650px}.right-pane{height:660px;min-height:660px;margin-top:10px}.splitter{display:none}.control-stack{gap:4px}.toolbar{gap:4px}.toolbar button{font-size:10px;padding-left:5px;padding-right:5px}.toolbar label{font-size:10px}.model-tools{flex-wrap:wrap}.model-tools>label{min-width:calc(25% - 4px)}.model-tools>button{flex:1}.action-row{flex-wrap:wrap}.action-row>.controls{flex-basis:100%}.action-row>.project-actions{flex:1}.engine-row{gap:7px}.engine-row #placement-count{font-size:9px}.tool-select select{font-size:10px}.wavelet-controls .wavelet-choice{min-width:85px}.slider-row{gap:5px}.slider-row output{font-size:9px;min-width:23px}.slider-row>.toggle span{font-size:0}.slider-row .toggle[title="소스와 수신기 표시"] span::after{content:"M";font-size:10px}.slider-row .toggle[title="색상 범례 표시"] span::after{content:"C";font-size:10px}.interaction-hint{display:none}.statusbar{min-height:50px;padding:5px 9px}.runtime-stats{gap:10px;font-size:9px}.frame-badge{font-size:8px;max-width:66px}.time-controls #time-label{font-size:10px;min-width:54px}.time-options>summary{font-size:9px;padding:0 4px}.dialog-body .row{flex-wrap:wrap}dialog{padding:16px}.memory-details .memory-card{max-width:calc(100vw - 28px)}}

/* The desktop uses a colored placement mode and returns to normal on completion. */
.left-pane[data-placement="sources"] .control-stack{background:#ffe3ec}
.left-pane[data-placement="receivers"] .control-stack{background:#dbeefb}
.toolbar button[aria-pressed="true"]{background:#cce3fa;border-color:#2777c7;color:#174f87}
#cancel-placement{font-size:10px;padding:1px 5px;height:23px;color:#934227}
#receiver-dialog{max-width:390px}
#receiver-dialog .receiver-number{display:flex;flex-direction:row;align-items:center;gap:12px;margin-bottom:18px}
#receiver-dialog .receiver-number input{width:90px}
#receiver-dialog .receiver-choice{display:flex;flex-direction:row;align-items:center;gap:8px;margin:12px 0}
#receiver-dialog .dialog-actions{gap:8px}
.zoom-reset{position:absolute;z-index:2;right:7px;top:5px;font-size:10px;height:23px;padding:1px 6px;background:#fffffff0;color:#536b86}.zoom-reset span{font-variant-numeric:tabular-nums}
#model-dialog{width:calc(100% - 40px);max-width:1200px;height:min(850px,94dvh);max-height:94dvh;padding:14px 18px;overflow:auto}
#model-dialog[open]{display:flex;flex-direction:column;gap:7px}
#model-dialog .dialog-heading{margin:0;flex:none}.editor-meta{display:flex;justify-content:space-between;gap:12px;color:#68798d;font-size:10px;flex:none}
.editor-preview{flex:1;min-height:220px}.editor-preview canvas{touch-action:none;cursor:crosshair}.editor-controls{flex:none}.layer-count{display:flex;gap:16px;align-items:center;padding:7px 0}.layer-count label{display:flex;align-items:center;gap:5px}.layer-count .hint{margin-left:auto}
.layer-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.layer-row{border:1px solid #cbd4df;border-radius:3px;padding:9px 10px;display:grid;grid-template-columns:1fr 1fr;gap:7px 10px;background:#fff}.layer-row strong{grid-column:1/-1;font-size:11px;font-weight:600;color:#536b86}.layer-row label{display:flex;flex-direction:column;gap:4px;font-size:10px}.layer-row input{width:100%;height:27px}.remaining-depth{height:27px;display:flex;align-items:center;color:#738094;font-size:10px}
.editor-buttons{display:flex;gap:7px;align-items:center;margin-top:10px}.editor-presets{margin-left:auto;position:relative}.editor-presets summary{cursor:pointer;color:#536b86;font-size:11px}.preset-options{position:absolute;bottom:25px;right:0;z-index:3;padding:12px;background:#fff;border:1px solid #bcc8d6;box-shadow:0 5px 20px #253f5d25;display:flex;gap:8px;white-space:nowrap}.editor-status{font-size:11px;color:#58718a;line-height:1.5;min-height:17px}.editor-status.error{color:#a83529}#model-dialog .dialog-actions{margin-top:0;gap:8px;flex:none}#anomaly-dialog{max-width:440px}#anomaly-dialog .dialog-actions{gap:8px}#editor-draw[aria-pressed="true"]{background:#dcecfb;border-color:#2777c7}
@media(max-width:850px){.layer-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.layer-row{padding:6px}.layer-count .hint{display:none}.editor-meta{font-size:9px}.editor-preview{min-height:220px}.preset-options{flex-wrap:wrap;width:260px}.preset-options select{width:100%}#model-dialog{padding:10px;width:calc(100% - 20px)}}

/* GeoBhysics experiment cards */
:root{--paper:#f5f8f6;--ink:#192a2c;--muted:#596c69;--line:#cbded9;--blue:#007d80;font-family:Arial,"Malgun Gothic",sans-serif}
.topbar,.statusbar{background:white;border-color:var(--line)}
.topbar{min-height:44px;padding-inline:14px;border-top:3px solid var(--blue)}
.topbar h1 strong,.window-actions a{color:var(--blue)}
.workspace{padding:8px;background:var(--paper)}
.left-pane,.right-pane{background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px}
.canvas-wrap,dialog,.popover{border-color:var(--line);border-radius:8px}
button,select,input[type=number]{border-color:#bbcfca;border-radius:5px;background:white}
button:hover{background:#eaf4f1;border-color:#7eb4ad}
button.primary,button.accent{background:#00787b;color:white;border-color:#006a6d}
button.primary:hover,button.accent:hover{background:#005f62}
input[type=range],input[type=checkbox],input[type=radio]{accent-color:var(--blue)}
@media(pointer:coarse),(max-width:760px){
 .model-canvas-wrap canvas,.gather-canvas-wrap canvas,.editor-preview canvas{touch-action:pan-y pinch-zoom}
 body:has(#tool option:checked:not([value=inspect])) #model,#model-dialog:has(#editor-draw[aria-pressed=true]) #editor-model{touch-action:none}
 .topbar{height:auto;flex-wrap:wrap;gap:4px;padding:5px 8px}
 .toolbar{flex-wrap:wrap}.engine-row{height:auto}.left-pane,.right-pane{min-width:0}
 .action-row>.controls{flex-wrap:wrap}.window-actions{flex-wrap:wrap}
}

/* Workbench: primary actions above each plot, transport below the model. */
.workspace{padding:10px;gap:0}
.workspace-heading{display:flex;align-items:center;justify-content:space-between;padding:6px 4px 9px;color:#193d3c}
.workspace-heading h2{font-size:15px;font-weight:650;margin:0}
.workspace-heading>span,.survey-summary{color:#607872;font-size:11px}
.workflow{display:flex;flex-wrap:wrap;gap:6px}
.workflow button,.direct-tools button,.direct-tools select,.direct-tools input{min-height:31px;font-size:12px}
.workflow .primary{margin-left:auto;padding-inline:16px}
.survey-summary{display:flex;align-items:center;gap:8px;padding:3px}
.settings-group{border-top:1px solid #dbe6e2;padding:2px 3px}
.settings-group>summary{cursor:pointer;padding:5px 0;font-weight:600;color:#395753}
.settings-group .toolbar{margin:3px 0;flex-wrap:wrap;height:auto}
.time-controls{padding:7px 3px 2px}.time-controls #time{min-width:40px}
.window-actions .project-actions{border-right:1px solid var(--line);padding-right:7px}
.gather-toolbar{padding:1px 4px}
#model-dialog .editor-preview{min-height:195px}
.direct-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:7px 0}
.direct-tools label{display:flex;align-items:center;gap:6px;font-size:12px}.direct-tools input{width:85px}
#boundary-handles{position:absolute;inset:0;pointer-events:none}
.contact-handle{position:absolute;pointer-events:auto;touch-action:none;transform:translate(-50%,-50%);height:22px;width:22px;border-radius:50%;border:2px solid white;background:#155f60;color:white;box-shadow:0 0 0 1px #1e504e;cursor:ns-resize;padding:0;line-height:1}
.contact-handle.middle{border-radius:6px;width:28px}.contact-handle:hover,.contact-handle:focus-visible{background:#123f40}
#editor-model[data-drawing=true]{touch-action:none}
#editor-status{min-height:22px;color:#294f48;font-size:12px}
@media(max-width:760px){
 .workspace{padding:6px}.left-pane{height:auto;min-height:0}.model-canvas-wrap{flex:auto;height:clamp(300px,50dvh,520px)}
 .window-actions .project-actions{gap:3px}.window-actions{gap:3px}.control-stack .workflow{gap:4px}
 .direct-tools{gap:6px}.editor-meta{flex-wrap:wrap}.editor-presets{margin-left:0}
}

.velocity-badge{position:absolute;transform:translate(7px,-110%);background:#153f40;color:white;padding:4px 7px;border-radius:4px;pointer-events:none;font-weight:600;box-shadow:0 1px 5px #1336}

/* Keep the plot rectangle stable when a hint wraps or a handle gets focus. */
#model-dialog{scrollbar-gutter:stable;overflow-anchor:none}
#editor-status{height:2.8em;min-height:2.8em;line-height:1.35;overflow:auto}
.editor-preview{contain:layout paint;overflow-anchor:none}
.stage-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:0 0 5px}
.stage-tabs button{font-weight:600;height:32px;min-width:0;padding:2px 4px}
.stage-tabs button[aria-pressed=true]{background:#006e70;color:#fff;border-color:#006366}
[data-stage-panel]{padding:4px 2px;min-width:0}
[data-stage-panel] .toolbar,.marker-colors{flex-wrap:wrap}
.marker-colors{display:flex;gap:5px 12px;margin:8px 0}
.marker-colors label{display:flex;align-items:center;gap:4px}
.marker-colors input{width:29px;height:23px;padding:0;border:1px solid var(--line)}
#model-studio{display:flex;flex:1;flex-direction:column;min-height:0;padding:3px}
#model-studio .editor-meta{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:10px;min-height:27px}
#model-studio .editor-preview{flex:1;min-height:140px}
#model-studio .editor-controls{flex:none}
#model-studio .preset-options{right:0;bottom:28px;max-width:92vw;flex-wrap:wrap}
@media(max-width:760px){#model-studio .editor-preview{flex:auto;height:clamp(290px,48dvh,500px)}.stage-tabs button{font-size:11px}}



#setup-fold>summary,#numeric-model>summary{cursor:pointer;color:#355a55;font-weight:600;padding:6px 3px}
#setup-fold[open]>summary{margin-bottom:3px}
.check-card{border-left:4px solid;padding:5px 8px;margin:3px 0;font-size:11px;line-height:1.45}
.check-card.green{border-color:#29815c;background:#eef8f2}.check-card.orange{border-color:#bf7414;background:#fff4df}.check-card.red{border-color:#b23d3a;background:#fff0ec}
.check-card strong:before{content:"● ";color:#27835c}.orange strong:before{color:#af6c12}.red strong:before{color:#ac3434}
.numeric-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:3px}.numeric-row input{width:74px}
#numeric-model{flex:none}.stage-tabs button{height:auto;min-height:32px;white-space:normal}

/* Shrink the timeline, keeping transport controls anchored as playback state changes. */
.time-controls{display:grid;grid-template-columns:auto 26px 32px minmax(0,1fr) 26px 8ch auto 76px;align-items:center}
.time-controls #time{width:100%;min-width:0}
.time-controls #time-label{min-width:0}
.time-controls .frame-badge{width:100%;max-width:none;height:20px;line-height:18px;padding:0 3px;text-align:center}
@media(max-width:760px){.time-controls{grid-template-columns:auto 22px 26px minmax(0,1fr) 22px 8ch auto 64px}}

/* Shared display controls and local recovery keep editing predictable. */
#recovery-banner{padding:10px 16px;background:#e9f4f0;border-bottom:1px solid #b9d3ca;display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:12px}
#recovery-banner[hidden]{display:none}
.context-note{font-size:11px;line-height:1.5;min-height:18px;color:#48645f;padding:3px 6px;overflow-wrap:anywhere}
.draft-status{font-size:10px;color:#48645f}
#boundary-handles input.velocity-badge{pointer-events:auto;width:92px;height:28px;padding:3px 5px;background:white;border:1px solid #00787b;border-radius:5px;color:#183e39;box-shadow:0 2px 5px #0002;transform:translate(-50%,-130%)}
#run-review{max-width:min(540px,94vw);max-height:90dvh;overflow:auto}
.run-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px}.run-facts dd{margin:0;font-variant-numeric:tabular-nums}
.run-option{border:1px solid #cfddd7;border-radius:8px;padding:12px;margin:10px 0}.run-option p{font-size:12px;line-height:1.55}
.run-warning{background:#fff2d9;border-left:3px solid #b37623;padding:10px;font-size:12px;line-height:1.5}

.release-version{font-size:10px;color:#5f7771;font-variant-numeric:tabular-nums}

.processing-settings{padding:0 5px;font-size:11px;line-height:1.45}.processing-settings p{margin:4px 0;color:#48645f}.processing-fields,.import-fields{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.processing-fields label,.import-fields label{display:flex;gap:5px;align-items:center;font-size:12px}.processing-fields input{width:76px}.import-fields input[type=number]{width:86px}.processing-settings [hidden]{display:none!important}
#import-model-dialog{width:min(820px,94vw);max-height:94dvh;overflow:auto}#import-model-dialog p{font-size:12px;line-height:1.5}#import-binary{border:1px solid #cbdcd4;border-radius:6px;margin:8px 0;padding:10px}#import-binary[hidden]{display:none}#import-preview{display:block;width:100%;height:350px;border:1px solid #cbdcd4;border-radius:6px}#import-preview[hidden]{display:none}#import-summary{white-space:pre-line;font-variant-numeric:tabular-nums}#import-name{overflow-wrap:anywhere}#import-error{color:#a63131}
@media(max-width:760px){#import-preview{height:280px}.import-fields{gap:7px}.processing-fields input{width:67px}}

/* Give the model a stable, readable surface. Extra controls scroll, not shrink. */
.left-pane{overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;overflow-anchor:none}
.model-canvas-wrap,#model-studio .editor-preview{flex:0 0 var(--model-height,480px);height:var(--model-height,480px);min-height:var(--model-height,480px)}
#model-studio{flex:0 0 auto;padding:0;overflow-anchor:none}
#model-studio .editor-meta{align-items:center}
#expand-model{font-size:11px;min-height:27px;flex:none}
.workspace.model-focus{grid-template-columns:minmax(0,1fr);min-height:0}
.workspace.model-focus>.right-pane,.workspace.model-focus>.splitter{display:none}
.workspace.model-focus .control-stack>:not(.workspace-heading){display:none}
.workspace.model-focus .left-pane{width:100%;margin:0}
@media(max-width:760px){.left-pane{overflow:visible;scrollbar-gutter:auto}.workspace.model-focus .left-pane{min-height:calc(100dvh - 150px)}}

.workspace.model-focus #model-studio .editor-meta,.workspace.model-focus #editor-status:not(.error){display:none}
body:has(.workspace.model-focus) .statusbar{min-height:24px}
body:has(.workspace.model-focus) .statusbar>.status:not(.error),body:has(.workspace.model-focus) .statusbar>.draft-status,body:has(.workspace.model-focus) .statusbar>.release-version{display:none}

/* The source preview belongs to its setup stage; the right pane is all gather. */
[data-stage-panel="2"] .wavelet-canvas-wrap{flex:none;height:clamp(180px,24dvh,240px);min-height:180px;margin-top:8px}

/* Processing explanations/options overlay the plot instead of reflowing it. */
.gather-toolbar{position:relative}
.processing-options{flex:none}
.processing-options>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;width:90px;height:26px;border:1px solid #bbcfca;border-radius:5px;background:white;font-size:10px;white-space:nowrap;color:var(--ink)}
.processing-options>summary::-webkit-details-marker{display:none}
.processing-options[open]>summary{background:#eaf4f1;border-color:#7eb4ad}
#processing-settings{position:absolute;z-index:8;top:calc(100% + 4px);right:0;width:340px;max-width:100%;max-height:min(340px,45dvh);overflow:auto;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 6px 18px #243e5a28}
#processing-settings .processing-fields{gap:9px;align-items:flex-start}
#processing-settings .processing-fields label{flex-direction:column;align-items:flex-start;white-space:normal}
#processing-settings p{margin:8px 0;line-height:1.6;white-space:normal}
