/* Keep the model and run controls in view at ordinary desktop window sizes. */
.motor-portable-main .header-actions{min-width:0;max-width:100%;flex-wrap:wrap}
.motor-portable-main .header-actions>.languages,.motor-portable-main .header-actions>.account-access{flex-shrink:0}
@media(max-width:600px){.portable-bar{flex-wrap:wrap}.portable-tools{flex:1;justify-content:flex-end;flex-wrap:wrap}.portable-system-grid{grid-template-columns:minmax(90px,1fr) minmax(0,1.5fr)}.portable-dialog{padding:18px}.portable-dialog-heading h2{font-size:18px}}
.three-d-relocated{margin-top:18px;border-top:1px solid #35515e;padding-top:18px}
.three-d-relocated[hidden]{display:none!important}
.three-d-relocated input,.three-d-relocated select{background:#091822;border:1px solid #395465;color:#edf6fa;border-radius:6px;padding:8px 10px;font:inherit;min-height:40px;width:100%}
.three-d-relocated input:focus-visible,.three-d-relocated select:focus-visible{outline:2px solid #61dabe;outline-offset:2px}
.three-d-relocated input:disabled,.three-d-relocated select:disabled{opacity:.6}
@media(min-width:1000px){
  .motor-portable-main .app-header{min-height:64px;padding:8px 20px;gap:20px}
  .motor-portable-main .brand img{width:36px;height:36px}
  .motor-portable-main .app-title h1{font-size:18px}
  .motor-portable-main .header-actions{gap:8px}
  .motor-portable-main .portable-bar{padding:5px 20px}
  .motor-portable-main .portable-bar button,.motor-portable-main .portable-bar select{min-height:34px}
  .motor-portable-main .privacy-strip{padding:5px 20px;font-size:12px}
  .motor-portable-main .workspace{max-width:none;padding:14px 20px 40px;gap:20px;grid-template-columns:340px minmax(0,1fr)}
  .motor-portable-main .parameters{height:calc(100vh - 165px);min-height:500px;display:flex;flex-direction:column;top:12px}
  .motor-portable-main .parameters #design-form{display:flex;flex-direction:column;flex:1;min-height:0}
  .motor-portable-main .parameter-scroll{flex:1;min-height:120px;max-height:none;padding:16px}
  .motor-portable-main .three-d-controls>details{max-height:220px;overflow:auto}
  .motor-portable-main .panel-title{padding:12px 16px 5px}
  .motor-portable-main .parameter-tabs button{min-height:39px}
  .motor-portable-main .run-controls{padding:10px 16px}
  .motor-portable-main .run-status{padding:0 0 10px;gap:12px}
  .motor-portable-main .run-status .eyebrow{display:none}
  .motor-portable-main .run-status h2{font-size:17px}
  .motor-portable-main .run-status p:not(.eyebrow){margin-top:2px;font-size:12px}
  .motor-portable-main .visual-toolbar{padding:8px 16px;gap:10px}
  .motor-portable-main .visual-toolbar h2{font-size:14px}
  .motor-portable-main .viewer-controls,.motor-portable-main .angle-controls{padding:7px 16px;gap:8px;font-size:12px}
  .motor-portable-main .viewer-controls button,.motor-portable-main .viewer-controls select,.motor-portable-main .viewer-controls input{min-height:34px;padding:5px 8px;font-size:12px}
  .motor-portable-main .three-d-slice{padding:7px 16px;gap:8px;font-size:12px}
  .motor-portable-main .three-d-slice input,.motor-portable-main .three-d-slice select,.motor-portable-main .three-d-slice button{min-height:34px;font-size:12px}
  .motor-portable-main .three-d-slice input[type=checkbox]{min-height:0}
  .motor-portable-main .canvas-wrap{height:clamp(300px,calc(100vh - 390px),800px);aspect-ratio:auto}
  .motor-portable-main .canvas-wrap:has(#motor-canvas-3d:not([hidden])){height:clamp(300px,calc(100vh - 505px),740px)}
}
.portable-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 24px;background:#0c2430;border-bottom:1px solid #28434e;font:12px/1.5 "Segoe UI",Meiryo,sans-serif;color:#adc3cc}.portable-identity,.portable-tools{display:flex;align-items:center;gap:12px}.portable-identity strong{font-size:13px;color:#e7f0f0}.portable-tag{padding:3px 7px;border:1px solid #478d7d;border-radius:5px;font-size:9px;letter-spacing:.14em;color:#92e3cd}.portable-tools select{width:auto;min-width:110px;font-size:12px;background:#102d39;padding:6px 8px;border:1px solid #34515e;border-radius:6px;color:#d7e8ed}.portable-device{display:flex;align-items:center;gap:8px;padding:6px 11px;background:#13332e;border:1px solid #2c5b50;border-radius:7px;color:#c1eddf;font-size:12px;cursor:pointer}.portable-led{width:7px;height:7px;border-radius:50%;background:#e6bd73;flex:none}.portable-led[data-state=ready]{background:#74dfb0;box-shadow:0 0 9px #74dfb044}.portable-led[data-state=fallback]{background:#e6bd73}.portable-metrics{font-variant-numeric:tabular-nums;color:#93b7c7}.portable-dialog{width:min(680px,90vw);max-height:85vh;padding:28px;border:1px solid #3b5965;border-radius:16px;background:#0a202b;color:#d8e8ec;box-shadow:0 24px 80px #0009}.portable-dialog::backdrop{background:#031118b8;backdrop-filter:blur(4px)}.portable-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.portable-dialog-heading h2{margin:0;font-size:22px}.portable-close{font-size:26px;line-height:1;border:0;background:none;color:#bcd5dd;cursor:pointer}.portable-summary{margin:20px 0;color:#99d8c7;line-height:1.8}.portable-system-grid{display:grid;grid-template-columns:160px 1fr;gap:1px;background:#28424d;border:1px solid #28424d;border-radius:8px;overflow:hidden}.portable-system-grid dt,.portable-system-grid dd{margin:0;padding:9px 12px;background:#102833;font-size:13px;overflow-wrap:anywhere}.portable-system-grid dt{color:#90adb9}.portable-system-grid dd{color:#e0edef;font-variant-numeric:tabular-nums}.portable-notes{font-size:12px;line-height:1.9;color:#9bb3bf}.portable-actions{display:flex;gap:10px;margin-top:20px}.portable-trace{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 Consolas,monospace;background:#351f21;color:#e8b4a8;padding:12px;border-radius:6px;max-height:140px;overflow:auto}.portable-bar+main{padding-top:18px}html:not([data-app-loading]) body{animation:none!important}@media(max-width:1100px){.portable-bar{padding:8px 14px}.portable-local,.portable-metrics{display:none}.portable-identity,.portable-tools{gap:7px}}

.progress-line.is-running>#progress-mesh{white-space:nowrap;min-height:2rem;margin:0;line-height:2rem}.solver-progress-mesh{grid-template-columns:repeat(4,max-content);min-width:max-content}.solver-progress-cell[data-progress-key=mesh-stage]{grid-template-columns:max-content max-content;min-width:max-content}.solver-progress-cell[data-progress-key=mesh-stage] strong,.solver-progress-cell[data-progress-key=mesh-stage] .solver-progress-measure{grid-column:2;grid-row:1}.solver-progress-cell[data-progress-key=mesh-angle]{--progress-value-width:9ch}.solver-progress-cell[data-progress-key=mesh-progress]{--progress-value-width:6ch}.solver-progress-cell[data-progress-key=mesh-count]{--progress-value-width:22ch}#live-mesh-note{margin:.5rem 0;color:#a7d9cc}
#progress-text.solver-progress-detail .solver-progress-cell[data-progress-key=stage]{grid-template-columns:max-content max-content}#progress-text.solver-progress-detail .solver-progress-cell[data-progress-key=stage]>.solver-progress-label{display:inline}#progress-text.solver-progress-detail .solver-progress-cell[data-progress-key=stage] strong,#progress-text.solver-progress-detail .solver-progress-cell[data-progress-key=stage] .solver-progress-measure{grid-area:1/2}

/* Fixed tracks keep changing stages/counters aligned without horizontal
   scrolling. Stage text owns a full row; metrics retain stable columns. */
.progress-line.is-running{container-type:inline-size;overflow-x:hidden}
.progress-line.is-running .solver-progress-row{min-width:0;width:100%;row-gap:6px}
#progress-text.solver-progress-detail{grid-template-columns:repeat(6,minmax(0,1fr))}
#progress-text.solver-progress-detail>.solver-progress-cell{grid-template-columns:minmax(0,1fr);gap:0;line-height:1.5;padding-inline:10px}
#progress-text.solver-progress-detail>.solver-progress-cell strong{text-align:left}
#progress-text.solver-progress-detail>.solver-progress-cell[data-progress-key=stage]{grid-column:1/-1;grid-template-columns:max-content minmax(0,1fr);gap:12px;padding-inline:0;border:0;min-height:2.2rem}
#progress-text.solver-progress-detail>.solver-progress-cell[data-progress-key=stage] strong{white-space:normal;overflow-wrap:anywhere}
.progress-line.is-running .solver-progress-measure{position:absolute;width:1px;height:1px;overflow:hidden}
.progress-line.is-running .solver-progress-mesh{grid-template-columns:minmax(0,3fr) repeat(3,minmax(0,1fr))}
.progress-line.is-running .solver-progress-mesh>.solver-progress-cell{min-width:0;grid-template-columns:minmax(0,1fr);gap:0;line-height:1.5}
.progress-line.is-running .solver-progress-mesh>.solver-progress-cell strong{text-align:left;grid-area:auto}
.progress-line.is-running .solver-progress-mesh>.solver-progress-cell[data-progress-key=mesh-stage] strong{white-space:normal}
.progress-line.is-running .solver-progress-totals{grid-template-columns:repeat(8,minmax(0,1fr))}
.progress-line.is-running .solver-progress-totals .solver-progress-label{white-space:normal;min-height:0;line-height:1.3}
@container(max-width:1000px){
 #progress-text.solver-progress-detail{grid-template-columns:repeat(3,minmax(0,1fr))}
 .progress-line.is-running .solver-progress-totals{grid-template-columns:repeat(4,minmax(0,1fr))}
 .progress-line.is-running .solver-progress-mesh{grid-template-columns:repeat(3,minmax(0,1fr))}
 .progress-line.is-running .solver-progress-mesh>.solver-progress-cell[data-progress-key=mesh-stage]{grid-column:1/-1;min-height:3rem}
}

/* One readable status, one overall bar, and three essential values. */
.compact-progress[hidden],.compact-progress-details[hidden]{display:none!important}
.compact-progress{padding-top:7px}
.compact-progress-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px;line-height:1.6}
.compact-progress-phase{font-size:14px;font-weight:600;color:#e4edf1}
.compact-progress-context{font-size:12px;color:#9bb0bd;font-variant-numeric:tabular-nums}
.run-status .compact-progress progress{display:block;width:100%;height:5px;margin:9px 0 12px}
.compact-progress-metrics{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:12px}
.compact-progress-metric{display:grid;gap:3px;min-width:0}
.compact-progress-metric>span{font-size:11px;color:#9bb0bd}
.compact-progress-metric>strong{font-size:14px;font-weight:600;color:#d7e8ed;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.compact-progress-details{margin-top:9px;font-size:12px;color:#9bb0bd}
.compact-progress-details>summary{cursor:pointer;width:fit-content;padding:3px 0}
.compact-progress-details>summary:focus-visible{outline:2px solid #61dabe;outline-offset:3px}
.compact-progress-detail-body{padding:10px 0 4px;border-top:1px solid #293c49;margin-top:6px}
.run-status-heading{display:flex;align-items:center;justify-content:space-between;gap:8px 18px;width:100%;min-width:0}
.run-status-heading>h2{flex:0 0 auto;max-width:50%;margin:0;overflow-wrap:anywhere}
.run-status-heading>.run-status-tools{flex:0 1 auto;min-width:0;margin-left:auto;padding-top:0;align-self:center;align-items:flex-end;justify-content:flex-end}
.run-status-heading .compute-badge{min-width:0;max-width:100%;white-space:normal;line-height:1.6}
.run-status-heading #backend-label{min-width:0;overflow-wrap:anywhere}
.run-status-heading .local-dot{flex:none}
.run-status:has(.has-compact-progress)>#progress{display:none}
.progress-line.has-compact-progress{display:block;min-height:0!important}
@container(max-width:430px){.compact-progress-metrics{grid-template-columns:1fr 1fr}.compact-progress-metric:first-child{grid-column:1/-1}}
.partial-loss-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-block:12px}
.partial-loss-controls select{width:auto;min-width:130px;padding:7px 10px;border:1px solid #395465;border-radius:6px;background:#102733;color:#e4edf1;font:inherit}
.partial-loss-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}
.partial-loss-bars .loss-bar{margin-block:10px;grid-template-columns:1fr}
.partial-loss-bars .loss-bar>span{font-variant-numeric:tabular-nums;color:#d7e8ed}
.partial-loss-bars .loss-bar[data-status=pending]>span{color:#9bb0bd}
.partial-loss-total{font-size:15px;font-weight:600;margin:15px 0}
.partial-loss-meta{font-size:12px;color:#9bb0bd;margin-top:6px}
.partial-losses details{margin-top:8px;font-size:12px}.partial-losses summary{cursor:pointer}
@media(max-width:650px){.partial-loss-bars{grid-template-columns:1fr}}
.results:has(> #partial-losses:not([hidden])) > #empty-results,
.results:has(> #partial-losses:not([hidden])):has(> #computed-results[hidden]) > .key-results{display:none;}

/* Overview owns elapsed/remaining time; the single disclosure owns work
   descriptions and execution totals. Concurrent mesh work remains visible. */
.has-compact-progress #progress-estimate{display:none!important}
.compact-progress-group-title{font-size:11px;font-weight:600;letter-spacing:.04em;color:#9bb0bd;margin:0 0 9px}
.compact-progress-work{padding:2px 0 13px}
.compact-progress-execution{border-top:1px solid #293c49;padding:13px 0 0}
.has-compact-progress #progress-text.solver-progress-detail{grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 12px;background:#102a35;border:1px solid #2c4551;border-radius:7px;margin:0 0 10px}
.has-compact-progress #progress-text.solver-progress-detail>.solver-progress-cell[data-progress-key=stage]{min-height:0;margin:0 0 4px}
.has-compact-progress #progress-mesh.solver-progress-mesh{margin:0;padding:8px 12px;border-left:2px solid #4b756d;background:#10252f}
.progress-line.has-compact-progress #progress-activity.solver-progress-totals{grid-template-columns:repeat(12,minmax(0,1fr));row-gap:12px}
.has-compact-progress #progress-activity>.solver-progress-cell{grid-column:span 6;padding-inline:10px;border-inline-end:1px solid #597480}
.has-compact-progress #progress-activity:has([data-progress-key=gpu-completed])>.solver-progress-cell{grid-column:span 3}
.has-compact-progress #progress-activity>.solver-progress-cell:is([data-progress-key=active],[data-progress-key=cpu],[data-progress-key=gpu]){grid-column:span 4}
.has-compact-progress #progress-activity>.solver-progress-cell:is(:first-child,[data-progress-key=active]){padding-inline-start:0}
.has-compact-progress #progress-activity>.solver-progress-cell:is([data-progress-key=linear-total],[data-progress-key=gpu]){border-inline-end:0;padding-inline-end:0}
@container(max-width:650px){
 .has-compact-progress #progress-text.solver-progress-detail{grid-template-columns:repeat(2,minmax(0,1fr))}
 .has-compact-progress #progress-activity:has([data-progress-key=gpu-completed])>.solver-progress-cell{grid-column:span 6}
 .has-compact-progress #progress-activity:has([data-progress-key=gpu-completed])>.solver-progress-cell:is([data-progress-key=active],[data-progress-key=cpu],[data-progress-key=gpu]){grid-column:span 4}
 .has-compact-progress #progress-activity>.solver-progress-cell[data-progress-key=nonlinear-total]{padding-inline-start:0}
 .has-compact-progress #progress-activity>.solver-progress-cell[data-progress-key=gpu-seconds]{border-inline-end:0;padding-inline-end:0}
}

.partial-performance-plots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:12px 0}
.partial-performance-plots article{min-width:0;padding:12px;background:#10232f;border:1px solid #34515f;border-radius:8px}
.partial-performance-plots h4{font-size:13px;margin:0 0 10px;color:#d4e9ee}
.partial-performance-plots canvas{display:block;width:100%;height:300px}
.partial-performance-wave{grid-column:1/-1}.partial-performance-wave canvas{height:230px}
.partial-performance-note{color:#9db7c4;font-size:11px;line-height:1.6;margin:6px 0}
.partial-loss-disclosure{border-top:1px solid #34515f;padding-top:10px}
.partial-loss-disclosure>summary{font-size:12px;color:#bcdedb;margin-bottom:10px}
@media(max-width:850px){.partial-performance-plots{grid-template-columns:1fr}.partial-performance-plots canvas{height:270px}}
