/* Full operator layout for the two sliding-head machines only. */
.paged .cnc.has-remote .cnc-stage{grid-template-columns:minmax(0,.9fr) minmax(0,2fr);gap:24px}
.cnc.has-remote .telemetry-panel{display:none}
.cnc:not(.has-remote) .remote-terminal{display:none}
.cnc.has-remote .machine-visual img{transform:none}
.cnc.has-remote .fleet-machine-story>p{font-size:13px}
.remote-terminal{--rm-key-height:44px;--rm-glyph:23px;--rm-key-label:9px;--rm-font:14px;min-width:0;border:1px solid #64747b;border-radius:12px;padding:14px;background:linear-gradient(135deg,#343e47,#242e36);box-shadow:0 15px 50px #0003;font:var(--rm-font)/1.4 Consolas,'Courier New',monospace;color:#e9ece8}
.remote-terminal [hidden]{display:none!important}
.rm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;font:12px/1.4 Manrope,sans-serif;color:#d9e5e1}
.rm-toolbar>div{display:flex;align-items:center;gap:9px}.rm-toolbar b{font-weight:650}.rm-connected-dot{width:6px;height:6px;border-radius:50%;background:#c5e99a;box-shadow:0 0 8px #cbf79b70}
.rm-toolbar button{background:#ffffff09;border:1px solid #aabbb53d;color:#e0e9e1;padding:7px 10px;border-radius:4px;min-height:34px;font:11px/1.3 Manrope,sans-serif;display:flex;gap:7px;align-items:center}
.rm-toolbar button:hover{background:#c6e6a51c;border-color:#cadfa48c}
.rm-body{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:14px}
.rm-screen{border:1px solid #91a2a455;border-radius:6px;background:#1f2b33;padding:7px;display:flex;flex-direction:column;min-width:0;box-shadow:inset 0 1px 4px #0004}
.rm-yellow{display:flex;align-items:center;justify-content:space-between;background:#e1cc59;color:#202d30;min-height:30px;padding:5px 9px;font-weight:bold;letter-spacing:.01em;gap:10px;font-size:14px}.rm-yellow>span{font-size:11px;font-weight:normal}
.rm-paths{display:flex;justify-content:space-between;background:#d2d4c7;color:#36444a;margin-top:5px;padding:6px 9px;font-size:11px}.rm-paths b{margin-left:8px;color:#304a2b}
.rm-pages{flex:1;min-height:335px;background:#35424a;margin-top:1px;display:grid;min-width:0}
.rm-pages>[role=tabpanel]{padding:16px 14px;min-width:0}
.rm-pages h4{font:700 17px/1.4 Consolas,monospace;margin:0 0 15px;padding:0 0 11px;border-bottom:1px solid #acbdb94a;color:#f1f1dd;display:flex;align-items:center;justify-content:space-between;gap:8px}
.rm-pages h4 small{font:11px/1.4 Manrope,sans-serif;color:#d9decc}
.rm-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0;padding:8px 0;border-bottom:1px solid #b3bfbe20;font-size:13px;color:#d0dcd9}.rm-row b{color:#f0f0dc;font-weight:normal;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.rm-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0 16px}.rm-counts>div{padding-left:9px;border-left:1px solid #bac5bc36}.rm-counts>div:first-child{padding:0;border:0}.rm-counts span{display:block;font-size:11px;color:#cdd6d1}.rm-counts strong{display:block;font-size:42px;line-height:1.4;font-weight:500;font-variant-numeric:tabular-nums;color:#f2f0df}.rm-counts>div:nth-child(2) strong{color:#d0ed9d}.rm-counts>div:nth-child(3) strong{color:#f3d798}.rm-counts small{font:12px/1.5 Manrope,sans-serif;color:#c7d5cf}
.rm-progress{height:5px;background:#18262e;margin-bottom:15px;border-radius:4px;overflow:hidden}.rm-progress i{display:block;height:100%;background:#c8e994;transition:width .5s}
.rm-counter-times{display:grid;gap:1px}.rm-order{display:flex;justify-content:space-between;gap:10px;color:#c3d1cd;font-size:11px;margin-top:15px;padding-top:9px;border-top:1px solid #c2c9b833;flex-wrap:wrap}.rm-order>span:last-child{font-size:10px}
.rm-statusbar{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#d4d7c7;padding:6px 8px;color:#30404a;font-size:11px;min-height:28px}.rm-statusbar time{font-variant-numeric:tabular-nums;white-space:nowrap}
.rm-tabs{padding-top:6px}.rm-tabs>div{display:grid;grid-template-columns:1fr 1.4fr 1.2fr 1.1fr 1fr .6fr 1.5fr;gap:4px}.rm-tabs button{min-width:0;min-height:42px;padding:6px 2px;border-radius:2px;border:1px solid #bec5b5;background:linear-gradient(#e3e4d9,#c9cdbd);box-shadow:0 1px 2px #0009;color:#26373d;font:700 11px/1.25 Manrope,sans-serif;white-space:normal}.rm-tabs button[aria-selected=true]{background:#e8d36a;border-color:#f6e794;color:#26302b;box-shadow:inset 0 0 0 1px #f9ec9c}.rm-tabs button:hover{background:#f0e6a6}.rm-tabs button:focus-visible,.rm-commands button:focus-visible,.rm-head-select button:focus-visible{outline:2px solid #d8fa95;outline-offset:3px}
.rm-physical{min-width:0}.rm-upper{display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:8px}.rm-group{margin-bottom:6px}.rm-group h4{font:650 10px/1.3 Manrope,sans-serif;color:#e0e7e3;font-weight:650;display:flex;align-items:center;gap:4px;white-space:normal;margin:0 0 4px}.rm-group h4:after{content:'';height:1px;flex:1;background:#b1c1bc33}.rm-group>div{display:grid;grid-template-columns:repeat(var(--keys),minmax(0,1fr));gap:4px}
.rm-key{position:relative;min-height:var(--rm-key-height);border:1px solid #adb5ad;border-radius:3px;background:linear-gradient(125deg,#e2e3d8,#ced0c0);box-shadow:inset 0 0 0 1px #eef1dd45,0 1px 2px #0007;color:#35424a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:6px 2px 4px;min-width:0;user-select:none}.rm-key>i{position:absolute;top:3px;left:3px;width:4px;height:4px;border-radius:50%;background:#707d70;box-shadow:inset 0 1px 2px #0006}.rm-key[data-on=true]>i{background:#c1ff6e;box-shadow:0 0 5px #90e74a}.rm-key svg,.rm-commands svg{width:var(--rm-glyph);height:var(--rm-glyph);stroke:currentColor;stroke-width:1.6;fill:none;flex-shrink:0}.rm-key>strong{font:23px/1 Consolas,monospace}.rm-key>span{font:700 var(--rm-key-label)/1.2 Arial,sans-serif;text-align:center;max-width:100%}
.rm-power{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding-top:4px}.rm-power-lamp{width:8px;height:8px;background:#f4ba5b;border-radius:50%;align-self:center;box-shadow:0 0 9px #f2bd5d99}.rm-power>b{text-align:center;font:700 9px/1.3 Arial,sans-serif}.rm-power .rm-key{flex:1}.rm-switch{display:flex;flex-direction:column;align-items:center;color:#c7d0d1;gap:4px;font:9px/1.3 Arial,sans-serif;text-align:center}.rm-switch>span{font-weight:bold;white-space:normal}.rm-switch>small{font-size:8px}.rm-switch>i{width:22px;height:22px;border:2px solid #819098;background:linear-gradient(130deg,#4b5961,#1c2a32);border-radius:50%;position:relative;box-shadow:0 2px 3px #0008}.rm-switch>i:after{content:'';position:absolute;width:2px;height:10px;left:8px;top:1px;background:#bdc9c8;transform:rotate(35deg)}.rm-switch>b{font-size:9px;font-weight:normal;color:#d6e5b9}.rm-power .rm-switch{padding-top:5px}
.rm-lower{display:grid;grid-template-columns:58px minmax(0,1fr) 66px;gap:10px;border:1px solid #9caca650;border-radius:7px;padding:10px;margin-top:4px}.rm-lower-actions{display:grid;gap:3px}.rm-lower-actions .rm-key{min-height:35px;gap:1px;padding:5px 1px 3px}.rm-lower-actions .rm-key svg{width:20px;height:20px}.rm-lower-actions .rm-key strong{font-size:19px}.rm-lower-actions .rm-key span{font-size:9px}.rm-lower-actions .rm-key i{height:3px;width:3px;left:2px;top:2px}
.rm-dials{display:grid;grid-template-columns:1fr 1fr;align-items:center;justify-items:center;gap:6px 10px}.rm-stop{display:flex;flex-direction:column;align-items:center;gap:4px}.rm-emergency-icon{position:relative;display:block;flex:0 0 auto;width:43px;height:43px;aspect-ratio:1;border:1px solid #a98a35;border-radius:50%;background:linear-gradient(145deg,#f9df78,#d8b444);box-shadow:inset 0 1px 1px #fff7,0 2px 3px #0005}.rm-emergency-icon::before{content:"";position:absolute;inset:17%;border:1px solid #9d2924;border-radius:50%;background:radial-gradient(ellipse at 35% 23%,#f5786b 0,#df493e 38%,#bc2d28 78%,#a62321 100%);box-shadow:inset 0 1px 1px #ffa496,0 2px 0 #8f241f,0 3px 4px #641f2470;transition:transform .12s ease,box-shadow .12s ease}.rm-stop>span:not(.rm-emergency-icon){font:8px Arial,sans-serif;color:#dce0d2;white-space:normal;text-align:center}.rm-handwheel{height:46px;width:46px;border:5px solid #708087;border-radius:50%;box-shadow:inset 0 1px 3px #0008,0 2px 3px #0006;background:linear-gradient(120deg,#1e2c34,#34414a);position:relative}.rm-handwheel>i{position:absolute;right:-2px;bottom:1px;width:7px;height:7px;background:#8c999d;border:2px solid #334047;border-radius:50%}
.rm-dial{display:flex;flex-direction:column;align-items:center}.rm-dial>span{font:700 9px Arial,sans-serif;color:#d9dfdb;white-space:normal;text-align:center}.rm-dial>div{height:84px;width:84px;position:relative}.rm-dial svg{width:100%;height:100%;fill:#d6dfdf;font:bold 13px Consolas;stroke-width:1.2}.rm-dial path{stroke:#d3dddd}.rm-dial i{position:absolute;inset:35%;border:2px solid #859297;border-radius:50%;background:linear-gradient(130deg,#55646c,#17242d);transform:rotate(var(--angle));box-shadow:0 2px 4px #0006}.rm-dial i:after{content:'';position:absolute;left:calc(50% - 1px);top:1px;height:8px;width:2px;background:#cadba5}.rm-dial>b{font:12px/1.2 Consolas;color:#d5e7ba;margin-top:-8px}.rm-switches{display:flex;flex-direction:column;justify-content:space-around}
.rm-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;font:11px/1.5 Manrope,sans-serif;color:#ccd8d4}.rm-caption>span:last-child{font-size:8px;letter-spacing:.12em;white-space:nowrap}
.rm-check-heads,.rm-program-heads{display:grid;grid-template-columns:1fr 1fr;gap:16px}.rm-check-heads article,.rm-program-heads article{min-width:0}.rm-check-heads header,.rm-program-heads header{display:flex;justify-content:space-between;font-size:13px;padding-bottom:10px;color:#e8e7cc;flex-wrap:wrap;gap:5px}.rm-check-heads pre{font:12px/1.8 Consolas;margin:0 0 10px;white-space:pre-wrap;color:#bdd4c2;overflow-wrap:anywhere}.rm-positions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.rm-positions>div>b{font-size:9px;white-space:normal;color:#d5dcc5}.rm-positions .rm-row{font-size:11px;padding:5px 0;gap:3px}.rm-positions .rm-row b{font-size:11px}.rm-check-heads article>.rm-row{font-size:11px;padding:6px 0}.rm-check-heads article>.rm-row b{font-size:12px;white-space:normal}
.rm-program-heads pre{margin:0;font:12px/2 Consolas;white-space:pre-wrap;overflow-wrap:anywhere;color:#d2dcd6}.rm-program-heads pre>span{display:block;padding:1px 4px;border-left:2px solid transparent}.rm-program-heads pre>span.is-active{background:#d7e7b322;border-color:#d2e79f;color:#e9f6d7}.rm-program-footer{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:14px}.rm-program-footer .rm-row{font-size:11px;flex-wrap:wrap}.rm-program-footer .rm-row b{font-size:13px}
.rm-loads{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rm-loads article{background:#14272b40;border:1px solid #adbdac25;border-radius:3px;padding:12px}.rm-loads header{display:flex;align-items:center;gap:5px;font-size:15px}.rm-loads header small{font-size:10px;color:#b4c5c1}.rm-loads header b{margin-left:auto;color:#d9efac}.rm-loads svg{width:100%;height:55px;stroke:#b9d998;fill:none;stroke-width:1.2;margin-top:7px}.rm-loads article>div{height:3px;background:#1e3038}.rm-loads i{display:block;height:100%;background:#bedc91;transition:width .5s}
.rm-alarm{display:flex;align-items:center;gap:14px;padding:16px 0 21px;border-bottom:1px solid #aebfbf33}.rm-alarm strong{font-size:48px;line-height:1;color:#d9eba6;font-weight:normal}.rm-alarm span{font-size:14px}.rm-alarm i{width:6px;height:6px;border-radius:50%;background:#c2e99c;margin-left:auto}.rm-small-label{font:11px/1.5 Consolas!important;color:#c7d0c6!important;margin:12px 0 6px!important}.rm-event-list>div{display:flex;gap:9px;align-items:center;padding:12px 0;border-bottom:1px solid #c0c9c420;font-size:13px}.rm-event-list time{color:#acbfbb;font-size:11px}.rm-event-list b{margin-left:auto;color:#cbe6a4;font-size:11px}
.rm-valves{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:20px 0}.rm-valves article{border:1px solid #b3c3bc44;border-radius:3px;background:#1c303740;padding:15px 5px;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:11px}.rm-valves b{font-size:15px;color:#c4d4cf}.rm-valves i{height:6px;width:6px;border-radius:50%;background:#70817b}.rm-valves [data-on=true] i{background:#cff394;box-shadow:0 0 8px #d0f4a466}.rm-valves [data-on=true] b{color:#d3f199}
.rm-feedback{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:10px;background:#d8ddca;padding:10px 8px;color:#35474a;font-size:11px;box-shadow:inset 0 1px 3px #0007}.rm-feedback span{display:flex;justify-content:space-between;gap:5px;flex-wrap:wrap}.rm-feedback b{font-size:12px;color:#3d522b}.rm-head-select{display:flex;align-items:center;gap:6px;margin:16px 0;font-size:11px;flex-wrap:wrap}.rm-head-select>span{margin-right:4px}.rm-head-select button{font:12px Consolas;color:#2a3c3c;background:#cbd0c3;border:1px solid #b8c7b7;border-radius:2px;min-height:36px;padding:7px 10px}.rm-head-select button[aria-pressed=true]{border-top:3px solid #cde795;background:#dce4ca}
.rm-commands{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.rm-commands button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:78px;background:linear-gradient(125deg,#e4e5d9,#d0d3c3);color:#304148;border:1px solid #a8b7ad;border-radius:4px;box-shadow:0 2px 3px #0005;font:700 10px Consolas;padding:9px 4px}.rm-commands button>i{position:absolute;top:5px;left:5px;width:5px;height:5px;background:#798674;border-radius:50%}.rm-commands button>i[data-on=true]{background:#c3f77a;box-shadow:0 0 5px #b0ef67}.rm-commands button>strong{font:24px/1 Consolas}.rm-commands svg{width:27px;height:27px}.rm-commands button>span{font-size:12px;line-height:1.3}.rm-commands button:hover{background:#eaf0d6;border-color:#e3f5b9}.rm-commands .rm-command-stop{background:#3b454b;border-color:#758387;color:#e3e7e0}.rm-command-stop>.rm-emergency-icon{width:34px;height:34px}.rm-commands .rm-command-stop:hover{background:#465057;border-color:#b5a35f}.rm-command-stop:active>.rm-emergency-icon::before{transform:translateY(1px);box-shadow:inset 0 1px 2px #9d292466,0 1px 0 #8f241f}.rm-command-message{background:#d4dbc6;color:#354749!important;font:12px/1.5 Consolas!important;padding:10px;margin:12px 0 0!important;min-height:38px}

/* Compact spacing, without reducing the readable type or scaling the panel. */
.remote-terminal{--rm-glyph:20px}
.rm-key{padding:3px 2px;gap:2px}
.rm-key>span{overflow-wrap:anywhere}
.rm-key>strong{font-size:20px}
.rm-group{margin-bottom:5px}
.rm-group h4{margin-bottom:3px}
.rm-lower{padding:8px}
.rm-switch{gap:2px;font-size:8px}
.rm-switch>b{font-size:8px}
.rm-switch>i{width:20px;height:20px}
.rm-lower-actions .rm-key{padding:3px 1px}
.rm-lower-actions .rm-key>strong{font-size:18px}
.rm-lower-actions .rm-key>span{font-size:8px}
.rm-power .rm-switch{padding-top:3px}
.rm-switches .rm-switch{display:grid;grid-template-columns:1fr 1fr;column-gap:3px;justify-items:center}
.rm-switches .rm-switch>span,.rm-switches .rm-switch>small{grid-column:1/-1}
.rm-switches .rm-switch>i{grid-column:1}
.rm-switches .rm-switch>b{grid-column:2}

/* Give the inline experience real space; short screens scroll rather than shrink text. */
.paged .cnc.has-remote>.wrap{width:calc(100% - clamp(40px,5vw,96px));max-width:1840px;scrollbar-gutter:stable}
.paged .cnc.has-remote .cnc-machine{grid-template-rows:auto minmax(280px,1fr) auto auto;gap:12px}
.cnc.has-remote .fleet-machine-heading h3{font-size:26px}
.cnc.has-remote .fleet-machine-heading>div>span{font-size:12px}
.cnc.has-remote .fleet-machine-story>div{font-size:11px;line-height:1.6}
.cnc.has-remote .technical-foot{font-size:11px}
.paged .cnc.has-remote .section-heading{margin-bottom:16px}
.paged .cnc.has-remote .section-heading>p{font-size:13px;max-width:430px}
.paged .cnc.has-remote .fleet-selector{margin-bottom:18px}
.paged .cnc.has-remote .fleet-selector button>span{font-size:14px}
.paged .cnc.has-remote .fleet-selector button>small{font-size:11px}
.paged .cnc.has-remote .cnc-coverage{margin-top:16px}
.cnc.has-remote .cnc-simulation-note{font-size:11px}

/* All LCD pages share one grid cell: tab changes keep the machine and panel steady. */
.rm-pages>[role=tabpanel]{grid-area:1/1;opacity:1;visibility:visible;transition:opacity .22s ease}
.remote-terminal .rm-pages>[hidden]{display:block!important;visibility:hidden;opacity:0;pointer-events:none}

.cnc-screen-dialog{padding:20px;width:calc(100vw - 32px);max-width:2000px;max-height:calc(100svh - 24px);margin:auto;border:1px solid #78908a;border-radius:14px;background:#111e27;color:#ecf3e9;overflow:auto;overscroll-behavior:contain}
.cnc-screen-dialog::backdrop{background:#03090ce8;backdrop-filter:blur(10px)}
.cnc-screen-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;font-size:15px}
.cnc-screen-dialog>header button{border:1px solid #839d8966;border-radius:5px;padding:10px 16px;background:#bdddab0e;color:#e0edda;font-size:13px}
.cnc-screen-dialog .rm-toolbar [data-remote-expand]{display:none}

/* Reflow whole groups at narrow widths instead of scaling the operator panel down. */
@media(min-width:1101px) and (max-width:1450px){
 .paged .cnc.has-remote .cnc-stage{grid-template-columns:minmax(0,.85fr) minmax(0,2fr);gap:20px}
 .remote-terminal{padding:11px;--rm-key-label:8px}
 .rm-body{gap:10px}
 .rm-upper{grid-template-columns:minmax(0,1fr) 54px;gap:6px}
 .rm-group h4{font-size:9px}.rm-group>div{gap:3px}
 .rm-lower{grid-template-columns:46px minmax(0,1fr) 52px;gap:7px;padding:8px}
 .rm-lower-actions .rm-key span,.rm-switch,.rm-switch>b,.rm-dial>span{font-size:8px}
 .rm-switch>small{font-size:7px}
 .rm-dial>div{width:74px;height:74px}
 .rm-check-heads,.rm-program-heads{gap:12px}
 .rm-check-heads pre,.rm-program-heads pre{font-size:11px}
 .rm-positions{gap:8px}
 .rm-counts span{font-size:10px}.rm-counts strong{font-size:38px}
 .rm-tabs>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .rm-tabs button:last-child{grid-column:span 2}
 .rm-caption>span:last-child{display:none}
}
@media(max-width:1100px){
 .paged .cnc.has-remote .cnc-stage{grid-template-columns:1fr;gap:24px}
 .paged .cnc.has-remote .cnc-machine{grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr auto;column-gap:28px;min-height:300px}
 .cnc.has-remote .machine-visual{grid-column:1;grid-row:1/4;min-height:300px}
 .cnc.has-remote .fleet-machine-heading{grid-column:2;grid-row:1;align-self:end}
 .cnc.has-remote .fleet-machine-story{grid-column:2;grid-row:2;align-self:center}
 .cnc.has-remote .technical-foot{grid-column:2;grid-row:3}
 .rm-upper{grid-template-columns:minmax(0,1fr) 56px}
 .rm-group h4{font-size:9px}.remote-terminal{--rm-key-label:8px}
 .rm-lower{grid-template-columns:50px minmax(0,1fr) 56px;gap:8px;padding:8px}
 .rm-lower-actions .rm-key span,.rm-switch,.rm-switch>b{font-size:8px}
 .rm-dial>div{height:76px;width:76px}
 .rm-tabs>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .rm-tabs button:last-child{grid-column:span 2}
 .rm-positions{grid-template-columns:1fr}
 .rm-caption>span:last-child{display:none}
}
@media(max-width:760px){
 .paged .cnc.has-remote>.wrap{width:calc(100% - 32px);scrollbar-gutter:auto}
 .paged .cnc.has-remote .cnc-stage{display:block}
 .paged .cnc.has-remote .cnc-machine{display:grid;grid-template-columns:1fr;grid-template-rows:auto 300px auto auto;gap:14px;margin-bottom:24px}
 .cnc.has-remote .fleet-machine-heading,.cnc.has-remote .machine-visual,.cnc.has-remote .fleet-machine-story,.cnc.has-remote .technical-foot{grid-column:auto;grid-row:auto}
 .cnc.has-remote .machine-visual{min-height:0}
 .remote-terminal{padding:12px;--rm-key-height:52px;--rm-glyph:24px}
 .rm-toolbar{flex-wrap:wrap;gap:12px}
 .rm-toolbar>div:last-child{width:100%;justify-content:space-between}
 .rm-toolbar button{font-size:12px;min-height:38px}
 .rm-body{grid-template-columns:1fr;gap:20px}
 .rm-screen{padding:6px}.rm-pages{min-height:350px}
 .rm-pages>[role=tabpanel]{padding:16px 12px}
 .rm-tabs button{font-size:12px;min-height:44px}
 .rm-counts{gap:8px}.rm-counts strong{font-size:38px}.rm-counts span{font-size:10px}
 .rm-order{font-size:10px}.rm-order>span:last-child{font-size:10px}
 .rm-check-heads,.rm-program-heads{gap:12px}
 .rm-check-heads pre,.rm-program-heads pre{font-size:11px}
 .rm-upper{grid-template-columns:minmax(0,1fr) 54px;gap:6px}
 .rm-group>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .rm-group>div>span:empty{display:none}
 .rm-group{margin-bottom:12px}
 .rm-key>span{font-size:9px}
 .rm-power .rm-key{flex:0 0 85px}
 .rm-power .rm-switch{margin-top:auto}
 .rm-group h4{font-size:10px;margin-bottom:6px}
 .rm-lower-actions .rm-key{min-height:40px}
 .rm-lower-actions .rm-key span{font-size:9px}
 .rm-feedback{gap:8px}.rm-feedback span{flex-direction:column;gap:4px}
 .rm-caption{font-size:11px}.rm-commands button>span{font-size:11px}
 .cnc-screen-dialog{padding:12px;width:calc(100vw - 16px);max-height:calc(100svh - 16px)}
 .cnc-screen-dialog>header{font-size:13px;gap:10px}.cnc-screen-dialog>header button{font-size:12px;white-space:nowrap}
}
@media(max-width:380px){
 .remote-terminal{padding:8px}.rm-screen{padding:4px}.rm-pages>[role=tabpanel]{padding:12px 9px}
 .rm-tabs>div{grid-template-columns:repeat(3,minmax(0,1fr))}
 .rm-tabs button:last-child{grid-column:1/-1}
 .rm-counts strong{font-size:32px}.rm-counts small{font-size:11px}.rm-counts>div{padding-left:6px}
 .rm-check-heads,.rm-program-heads{grid-template-columns:1fr;gap:18px}
 .rm-positions{grid-template-columns:1fr 1fr}
 .rm-check-heads pre,.rm-program-heads pre{font-size:12px}
 .rm-lower{grid-template-columns:46px minmax(0,1fr) 48px;gap:5px;padding:6px}
 .rm-dials{gap:9px 4px}.rm-dial>div{width:58px;height:58px}
 .rm-dial>b{margin-top:0}.rm-switch>span{font-size:8px}
 .rm-group>div{grid-template-columns:repeat(3,minmax(0,1fr))}
 .rm-feedback{font-size:10px;gap:5px;padding:9px 6px}
 .rm-head-select{gap:5px}.rm-head-select button{padding:7px 8px}
 .rm-loads header{flex-wrap:wrap}.rm-loads header small{font-size:9px}
 .rm-valves{gap:5px}.rm-valves article{font-size:10px;padding:13px 3px}
 .rm-event-list>div{flex-wrap:wrap}.rm-event-list>div>span{flex:1}
}
@media(prefers-reduced-motion:reduce){.rm-progress i,.rm-loads i,.rm-pages>[role=tabpanel]{transition:none}}

/* Wide, short desktop: spend height on readable data, not key padding. */
@media(min-width:1500px) and (min-height:800px) and (max-height:1020px){
 .paged #cnc{padding-top:calc(var(--deck-header) + 6px)}
 .paged #cnc .section-heading{margin-bottom:6px}
 .paged #cnc .section-heading>p{max-width:570px}
 .paged #cnc .fleet-selector{margin-bottom:8px}
 .cnc.has-remote .remote-terminal{--rm-key-height:32px;--rm-glyph:14px;padding:10px}
 .cnc.has-remote .rm-toolbar{margin-bottom:8px}
 .cnc.has-remote .rm-toolbar button{min-height:28px;padding:5px 9px}
 .cnc.has-remote .rm-screen{padding:5px}
 .cnc.has-remote .rm-yellow{min-height:26px;padding:3px 8px}
 .cnc.has-remote .rm-paths{padding:4px 8px;margin-top:4px}
 .cnc.has-remote .rm-pages{min-height:320px}
 .cnc.has-remote .rm-pages>[role=tabpanel]{padding:11px 12px}
 .cnc.has-remote .rm-pages h4{padding-bottom:7px;margin-bottom:10px}
 .cnc.has-remote .rm-counts{margin:12px 0}
 .cnc.has-remote .rm-counts strong{font-size:42px;line-height:1.2}
 .cnc.has-remote .rm-progress{margin-bottom:10px}
 .cnc.has-remote .rm-counter-times .rm-row{padding:5px 0}
 .cnc.has-remote .rm-order{margin-top:9px;padding-top:6px}
 .cnc.has-remote .rm-statusbar{min-height:24px;padding:4px 8px}
 .cnc.has-remote .rm-tabs button{min-height:36px}
 .cnc.has-remote .rm-group{margin-bottom:3px}
 .cnc.has-remote .rm-group h4{font-size:9px;margin-bottom:2px}
 .cnc.has-remote .rm-key{padding:2px 1px;gap:1px}
 .cnc.has-remote .rm-key>strong{font-size:14px}
 .cnc.has-remote .rm-lower{padding:6px 8px;gap:9px}
 .cnc.has-remote .rm-lower-actions .rm-key{display:grid;grid-template-columns:16px minmax(0,1fr);align-items:center;justify-items:center;min-height:29px;padding:3px;gap:3px}
 .cnc.has-remote .rm-lower-actions .rm-key svg{width:16px;height:16px}
 .cnc.has-remote .rm-stop>.rm-emergency-icon{height:33px;width:33px}
 .cnc.has-remote .rm-handwheel{width:36px;height:36px}
 .cnc.has-remote .rm-dial>div{width:64px;height:64px}
 .cnc.has-remote .rm-dials{gap:4px 10px}
 .cnc.has-remote .rm-caption{padding-top:7px}
 .cnc.has-remote .rm-feedback{padding:7px 8px}
 .cnc.has-remote .rm-head-select{margin:9px 0}
 .cnc.has-remote .rm-head-select button{min-height:30px;padding:5px 9px}
 .cnc.has-remote .rm-small-label{margin:7px 0 5px!important}
 .cnc.has-remote .rm-commands button{min-height:56px;gap:3px;padding:5px}
 .cnc.has-remote .rm-commands svg{width:21px;height:21px}
 .cnc.has-remote .rm-commands button>strong{font-size:21px}
 .cnc.has-remote .rm-command-stop>.rm-emergency-icon{height:29px;width:29px}
 .cnc.has-remote .rm-command-message{padding:6px 9px;min-height:30px;margin-top:8px!important}
 .cnc.has-remote .rm-check-heads header{padding-bottom:6px}
 .cnc.has-remote .rm-check-heads pre{line-height:1.5;margin-bottom:6px}
 .cnc.has-remote .rm-positions{margin-bottom:8px}
 .cnc.has-remote .rm-positions .rm-row{padding:4px 0}
 .cnc.has-remote .rm-check-heads article>.rm-row{padding:4px 0}
 .cnc.has-remote .rm-loads{gap:10px}
 .cnc.has-remote .rm-loads article{padding:10px}
 .cnc.has-remote .rm-loads svg{height:42px}
 .paged #cnc.has-remote .cnc-coverage{margin-top:6px;padding:4px 0}
 .cnc.has-remote .cnc-simulation-note{font-size:10px}
}
