:root{font-family:"Segoe UI","Microsoft JhengHei",sans-serif;color:#273b34;background:#eef0eb;font-synthesis:none;--ink:#273b34;--muted:#748079;--line:#d9ded7;--green:#31644f;--amber:#a96d29;--teal:#3d7886}*{box-sizing:border-box}body{margin:0;min-width:320px;height:100dvh;display:flex;flex-direction:column;font-size:13px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #cdd5cd;border-radius:5px;background:#fff;color:var(--ink);padding:9px 11px;white-space:nowrap;transition:background .12s}button:hover{background:#edf2ec;border-color:#91a597}button:active{background:#e1e9df}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #3d7886;outline-offset:2px}button:disabled{opacity:.5;cursor:default}h1,h2,h3,p{margin:0}.topbar{height:70px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#f8f9f5;border-bottom:1px solid var(--line);gap:16px}.identity{display:flex;gap:12px;align-items:center}.machine-icon{font-size:28px;color:#4c6958;border:1px solid #aab9ab;border-radius:6px;width:38px;height:38px;text-align:center;line-height:32px}h1{font-size:18px;font-weight:650;letter-spacing:.5px}h1 span{font-size:12px;color:#7f8981;margin-left:9px;font-weight:500}.identity p{font-size:11px;color:var(--muted);margin-top:4px;letter-spacing:1px}.separator{padding:0 5px}.simulation{display:flex;align-items:center;gap:10px}.sim-label{font-size:11px;color:var(--muted)}#clock{font-size:20px;font-family:Consolas,monospace;min-width:94px}.simulation button{font-size:12px}.speed-label{color:#68786d;font-size:11px}select{border:1px solid #cdd5cd;background:#fff;padding:7px;border-radius:5px;margin-left:4px}.quiet{background:transparent}.program{height:43px;display:flex;align-items:center;gap:18px;padding:0 20px;flex-shrink:0;border-bottom:1px solid var(--line);background:#f3f5f0}.program-label{color:var(--muted);font-size:11px;letter-spacing:2px}.program ol{list-style:none;display:flex;padding:0;margin:0;gap:32px;flex:1}.program li{font-size:12px;color:#899289}.program li.current{color:#244e39;font-weight:700}.program li.current::before{content:'●';font-size:7px;vertical-align:middle;margin-right:7px}.phase-badge{font-size:12px;border:1px solid #b9c9bb;padding:3px 14px;border-radius:4px;background:#e8eee6;min-width:72px;text-align:center}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:248px minmax(330px,1fr) 250px;grid-template-rows:minmax(0,1fr) 216px;gap:12px;padding:12px}.panel{border:1px solid #d3dbd2;border-radius:7px;background:#fbfcf9;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #e3e7df;gap:6px;flex-shrink:0;min-height:43px}h2{font-size:13px;font-weight:650;white-space:nowrap}h2>span{color:#93a08f;font:11px Consolas,monospace;margin-right:8px;letter-spacing:1px}.tiny{color:#939d93;font-size:9px;letter-spacing:1.2px}.tag{font-size:10px;color:#74816f;background:#eff2e9;padding:3px 5px;border-radius:3px;white-space:nowrap;font-weight:400}.controls{grid-row:1/3}.control-body{display:flex;flex-direction:column;padding:13px;gap:10px;flex:1;min-height:0}.instrument{display:block;width:100%;padding:12px;background:#f0f3ed;border-color:#d4ddcf;text-align:left}.eyebrow{display:flex;justify-content:space-between;align-items:center;font-size:12px}.readout{display:flex;align-items:baseline;margin:3px 0;gap:9px}.readout strong{font:500 44px/1.25 Consolas,monospace;letter-spacing:-2px}.readout small{font-size:18px;color:#7b877b}.instrument-note{font-size:10px;color:#788574;display:flex;justify-content:space-between;gap:3px}.instrument-note>span{font-size:9px}.field{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.field label{font-size:12px}.field>div{display:flex;align-items:center;gap:7px}.field input{width:76px;border:1px solid #bfcbbc;border-radius:4px;padding:6px 5px 6px 10px;background:#fff;font:16px Consolas,monospace;color:#2c4334}.field div>span{width:19px;color:#798675;font-size:11px}.recipe-foot{display:flex;align-items:center;justify-content:space-between;gap:5px;color:#778570;font-size:10px}.small-button{font-size:11px;padding:6px 8px}.button-row{display:flex;gap:7px}.button-row>button{flex:1;min-width:0;padding-left:6px;padding-right:6px;font-size:12px}.primary{background:#345e48;color:#fff;border-color:#345e48;font-weight:600;padding:11px}.primary:hover{background:#254c37;border-color:#254c37}.stop{color:#8b5733}.feedback{min-height:45px;padding:7px 8px;border-left:2px solid #97ad94;background:#f1f4ec;font-size:11px;line-height:1.6;overflow:auto;max-height:56px}.feedback.rejected{border-left-color:#b87c46;background:#fcf3e9;color:#80552c}.scenario{margin-top:auto;padding-top:10px;border-top:1px solid var(--line)}.scenario-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.scenario h3{font-size:12px}.scenario-state{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:11px}.scenario .button-row button{font-size:10px;padding:7px 3px}.machine-stats{display:flex;justify-content:space-between;padding:12px 16px 4px;gap:10px}.machine-stats>div{display:flex;flex-direction:column;gap:4px}.machine-stats span{font-size:11px;color:#7a8779}.machine-stats em{font-size:9px;font-style:normal;color:#9aa393}.machine-stats b{font:23px Consolas,monospace;color:#334b3b}.machine-stats small{font-size:12px;color:#85917e}.diagram-wrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:0 4px}.diagram-wrap svg{max-width:100%;width:100%;height:100%;overflow:visible}.component{fill:#f1f4ef;stroke:#a7b4a4;stroke-width:1.5}.svg-label{font-size:15px;fill:#455a48}.svg-caption{font-size:13px;fill:#7f8b79}.svg-value{font-size:17px;fill:#324b39;font-family:Consolas,monospace}.diagram-footer{display:flex;align-items:center;gap:12px;padding:4px 15px 8px;font-size:10px;color:#81907b;flex-shrink:0}.diagram-footer>span{white-space:nowrap}.line{display:inline-block;width:18px;margin-right:4px;vertical-align:middle;border-top:2px solid #626b68}.thermal{border-color:#ac6625}.signal{border-color:#4f7c86;border-top-style:dashed}.diagram-footer .legend-note{margin-left:auto;font-size:9px}.causal-strip{border-top:1px solid #e1e6db;background:#f4f6ef;padding:9px 14px;font-size:11px;min-height:36px;color:#63775c;flex-shrink:0}.wafer-body{display:flex;flex-direction:column;padding:10px 14px;gap:7px;min-height:0;flex:1}.wafer-visual{position:relative;min-height:70px;height:30%;display:flex;justify-content:center}.wafer-visual svg{height:100%;max-width:100%;width:180px}.wafer-id{position:absolute;bottom:0;right:0;font:9px Consolas,monospace;color:#899580}.wafer-reading{text-align:center;line-height:1.1}.wafer-reading strong{font:34px Consolas,monospace;letter-spacing:-1px}.wafer-reading>span{font-size:13px;color:#8a947f;margin-left:7px}.wafer-note{font-size:10px;text-align:center;color:#8a957e}.wafer-facts{padding:7px 0;border-top:1px solid #e4e8dc;border-bottom:1px solid #e4e8dc;margin-top:3px}.wafer-facts>div{display:flex;justify-content:space-between;gap:5px;font-size:11px;line-height:1.9;color:#6c7c60}.wafer-facts b{font-family:Consolas,monospace;color:#3c5133;font-weight:500}.wafer-facts small{font-size:9px}.progress-label{display:flex;flex-wrap:wrap;justify-content:space-between;font-size:10px;gap:3px;margin-top:2px}.progress-label small{font-size:9px;color:#8a947e}.progress-label b{font-family:Consolas,monospace;font-weight:400}progress{appearance:none;width:100%;height:5px;border:0;border-radius:3px;overflow:hidden}progress::-webkit-progress-bar{background:#e6eadf}progress::-webkit-progress-value{background:#77956a}.work-state{font-size:11px;color:#3f5c31;min-height:16px}.boundary{font-size:10px;line-height:1.5;color:#919a85;margin-top:auto}.trends{grid-column:2/4;grid-row:2}.chart-key{display:flex;gap:13px;font-size:10px;color:#8c9686}.pv-key{color:#3d7886}.wafer-key{color:#a87133}.power-key{color:#9aa48f}.chart-wrap{flex:1;min-height:0;padding:2px 10px 0}.chart-wrap svg{height:100%;width:100%;overflow:visible}.trend-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:10px;color:#829078;padding:3px 13px 6px;min-height:27px;flex-shrink:0}.trend-footer #event-latest{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text-button{border:0;background:transparent;color:#55764a;padding:3px 0;font-size:10px}.alarm-dock{height:73px;flex-shrink:0;border-top:1px solid #cfd8c9;background:#f6f8f1;display:flex;align-items:center;justify-content:space-between;padding:9px 20px;gap:15px}.alarm-status{display:flex;align-items:center;gap:13px;min-width:0}.alarm-status>span{font-size:23px;color:#8a9b80}.alarm-status b{font-size:12px}.alarm-status p{font-size:11px;margin-top:5px;color:#7b8971;line-height:1.5}.alarm-actions{display:flex;gap:8px;flex-shrink:0}.alarm-actions button{font-size:11px}.alarm-dock.active{background:#fcf1e6;border-top-color:#d8ac7e}.alarm-dock.active .alarm-status>span,.alarm-dock.active b{color:#9d5e2a}.alarm-dock.active p{color:#8b6744}.selected #sensor{filter:drop-shadow(0 0 4px #58a6b5)}.selected #pv-focus{outline:2px solid #4b8190}.details{position:fixed;left:12px;top:113px;bottom:85px;width:248px;background:#fafbf7;border:1px solid #aabca3;border-radius:7px;padding:15px;z-index:2;overflow:auto;box-shadow:3px 3px 14px #4055351a}.details-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.details-head h2{font-size:13px}.details-head button{padding:0 6px;font-size:22px;border:0;background:transparent}.details p{font-size:11px;line-height:1.8;color:#75846a;margin-bottom:10px}.details a{display:block;font-size:11px;color:#3c7655;margin:10px 0}.details ol{padding-left:17px;font-size:10px;color:#6b7c5e;line-height:1.8}.details li{margin:9px 0}.small-screen{display:none}.paused #clock{color:#a27539}
@media(min-width:1600px){.workspace{grid-template-columns:280px minmax(500px,1fr) 300px;grid-template-rows:minmax(0,1fr) 28vh;gap:16px;padding:16px}.control-body{padding:18px;gap:16px}.panel-head{padding:16px 18px}.readout strong{font-size:54px}.wafer-reading strong{font-size:46px}.wafer-body{padding:18px;gap:14px}.machine-stats{padding:20px 24px 8px}.machine-stats b{font-size:30px}.diagram-wrap{padding:0 35px}.details{left:16px;width:280px;top:129px}.feedback{font-size:12px}.scenario .button-row button{font-size:12px}.diagram-footer{font-size:12px}.causal-strip{font-size:13px}.chart-key{font-size:12px}}
@media(max-width:1100px){.topbar{padding:0 12px;height:62px}.simulation{gap:6px}.sim-label{display:none}.identity{gap:7px}h1{font-size:15px}h1 span{font-size:10px;margin-left:3px}.simulation button{padding:8px;font-size:11px}#clock{font-size:18px;min-width:80px}.program{padding:0 12px}.program ol{gap:15px}.workspace{grid-template-columns:220px minmax(330px,1fr) 220px;gap:8px;padding:8px;grid-template-rows:minmax(0,1fr) 212px}.panel-head{padding:10px 10px}h2{font-size:12px}h2>span{margin-right:4px}.machine .panel-head>.tag{font-size:9px}.control-body{padding:10px;gap:10px}.machine-stats{padding:11px 10px 1px;gap:7px}.machine-stats span{font-size:10px}.machine-stats em{display:none}.machine-stats b{font-size:21px}.diagram-footer{padding:4px 10px 7px;gap:10px}.legend-note{display:none}.wafer-body{padding:9px 11px;gap:7px}.wafer-visual{height:28%}.wafer-reading strong{font-size:30px}.chart-key{gap:9px;font-size:9px}.alarm-dock{padding:8px 12px;height:77px}.details{left:8px;top:113px;width:220px}.causal-strip{padding:8px 10px;font-size:10px}.feedback{font-size:10px}.instrument-note{font-size:9px}.instrument-note>span{display:none}.readout strong{font-size:40px}.tiny{font-size:8px}}
@media(max-width:999px),(max-height:699px){body{height:auto;min-height:100dvh}.small-screen{display:block;background:#fff3d9;color:#785e32;font-size:12px;padding:10px}.topbar{flex-wrap:wrap;height:auto;padding:12px;gap:12px}.workspace{min-height:650px;grid-template-columns:220px minmax(330px,1fr) 220px;overflow-x:auto}.program{overflow:auto}.program ol{min-width:570px}.alarm-dock{min-height:80px;height:auto}.details{top:160px;bottom:90px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Compact-height layout keeps scenario controls and all four views visible. */
@media(min-height:700px) and (max-height:850px){
 .workspace{grid-template-rows:minmax(0,1fr) 184px}
 .control-body{gap:7px;padding:11px}
 .instrument{padding:10px}
 .readout strong{font-size:36px;line-height:1.1}
 .field{margin-bottom:6px}
 .field input{padding:4px 5px 4px 9px}
 .button-row>button{padding-top:8px;padding-bottom:8px}
 .primary{padding:9px}
 .feedback{min-height:42px}
 .scenario{padding-top:7px}
 .scenario-state{margin-bottom:6px}
 .scenario-head{margin-bottom:5px}
 .wafer-body{gap:6px}
 .wafer-visual{height:25%;min-height:60px}
 .wafer-note{font-size:11px}
 .machine-stats{padding-top:9px;padding-bottom:0}
 .machine-stats span{font-size:12px}
 .machine-stats b{font-size:22px}
 .diagram-wrap svg .svg-caption{font-size:17px;fill:#65765d}
 .diagram-wrap svg .svg-label{font-size:18px}
 .diagram-wrap svg .svg-value{font-size:18px}
}
