.chip-model{display:inline-block;position:relative;width:52px;height:34px;vertical-align:middle;flex:none;perspective:180px}.chip-model img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.turning .face-old{animation:chip-old var(--turn-time,.45s) both}.turning .face-edge{animation:chip-edge var(--turn-time,.45s) both}.turning .face-new{animation:chip-new var(--turn-time,.45s) both}@keyframes chip-old{0%,15%{opacity:1;transform:rotateX(0)}42%,100%{opacity:0;transform:rotateX(78deg)}}@keyframes chip-edge{0%,24%,75%,100%{opacity:0}40%,57%{opacity:1}}@keyframes chip-new{0%,55%{opacity:0;transform:rotateX(-78deg)}88%,100%{opacity:1;transform:rotateX(0)}}
.data-cell .chip-model{width:35px;height:27px;margin:0 auto 4px}.pixel .chip-model{width:29px;height:23px}.pixel{padding:0}.data-row{gap:2px}.glyph canvas{width:72px;height:144px}.machine-scene{margin:22px 0 20px;border:1px solid #ccd7de;border-radius:16px;padding:22px 26px;background:linear-gradient(135deg,#f9fbfc,#eef2f5);box-shadow:0 5px 0 #d6dfe4,0 12px 28px #243a4a0e;position:relative;overflow:hidden}.machine-scene:before,.machine-scene:after{content:'⊖';color:#91a0aa;font-size:18px;position:absolute;top:12px}.machine-scene:before{left:9px}.machine-scene:after{right:9px}.machine-name{display:flex;align-items:center;gap:16px;justify-content:space-between;flex-wrap:wrap;margin:0 0 16px}.machine-name h2{font-size:25px;margin:0;font-weight:500}.machine-name .eyebrow{margin:0 0 4px}.machine-badge{border:1px solid #bbc8d2;border-radius:4px;padding:6px 9px;font:11px 'Courier New',monospace;letter-spacing:.08em;color:#5c6d79;background:#fff8}.rail-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:12px;margin:10px 0 4px;flex-wrap:wrap}.rail-heading strong{color:var(--blue);letter-spacing:.08em}.rail-heading.data strong{color:#b94166}.rail-caption{color:#61717d;font-size:12px}.mechanism-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:#b5c3ce transparent;max-width:100%;border-radius:8px;background:#dfe7eb;border:1px solid #c7d3db;box-shadow:inset 0 2px 5px #29394812;padding-bottom:4px;position:relative}.mechanism-gantry{height:84px;min-width:100%;position:relative;pointer-events:none;background:linear-gradient(transparent 28px,#c1ccd4 29px,#f6f9fa 33px,#889da9 35px,transparent 38px)}.mechanism-gantry.data{height:70px;background:linear-gradient(transparent 24px,#c1ccd4 25px,#f6f9fa 29px,#889da9 31px,transparent 34px)}.machine-head{position:absolute;top:24px;left:0;height:48px;border-radius:7px 7px 10px 10px;background:linear-gradient(#536572,#293d4b);border:1px solid #243947;box-shadow:0 3px 1px #12253266,0 7px 10px #31475625;z-index:2;color:white;display:flex;align-items:center;justify-content:center;will-change:transform}.reader-head{width:92px;gap:7px;padding:7px}.reader-eye{height:16px;width:16px;border:3px solid #99b6ce;border-radius:50%;background:#0e202e;box-shadow:inset 0 0 0 2px #203c53}.reader-head:after{content:'';position:absolute;top:47px;left:6px;right:6px;height:19px;background:linear-gradient(#5f9ff144,transparent);clip-path:polygon(8% 0,92% 0,100% 100%,0 100%)}.head-label{position:absolute;top:-22px;left:0;width:100%;text-align:center;font:10px 'Courier New',monospace;color:#425b6d}.working-head{width:50px;top:15px;height:34px;border-radius:7px;background:linear-gradient(#56636d,#34424e)}.working-head:after{content:'';position:absolute;left:20px;top:32px;width:8px;height:23px;background:linear-gradient(90deg,#6e808b,#f2f7f9,#7a8b95);border:1px solid #798a96;border-radius:0 0 4px 4px}.tool-jaw{position:absolute;left:10px;top:49px;width:30px;height:13px;border:3px solid #8597a2;border-top:0;border-radius:0 0 7px 7px;transition:transform .15s}.working-head.flipping .tool-jaw{transform:translateY(9px) rotate(12deg)}.working-head.flipping:after{height:32px}.head-light{height:8px;width:8px;background:#e5b0bc;border-radius:50%;border:1px solid #e6c2c9;box-shadow:0 0 8px #fa8dae55}.mechanism-program{display:flex;position:relative;min-width:100%;background:linear-gradient(#edf2f5,#f7f9fa);padding-top:0}.mechanism-command{width:108px;flex:0 0 108px;margin:0 4px 8px;border:1px solid #c4cfd7;border-radius:5px;background:#f9fbfc;padding:5px 3px;position:relative;text-align:center;min-height:84px;box-shadow:0 2px 0 #cad4db}.mechanism-command.current{outline:2px solid var(--blue);outline-offset:-1px;background:#edf4ff}.command-address{font:10px 'Courier New',monospace;color:#617485;display:block}.physical-triple{display:flex;justify-content:center;margin:4px 0 0}.physical-program-bit{border:0;border-radius:2px;padding:0;min-height:29px;background:transparent}.physical-program-bit .chip-model{width:33px;height:27px}.command-caption{font:9px 'Courier New',monospace;display:block;line-height:1.5}.mechanism-command.gate{border-left:3px solid #25857d;border-right:3px solid #25857d}.mechanism-command.paired{background:#e8f4ef;box-shadow:0 2px 0 #71a69b}.end-card{display:flex;align-items:center;justify-content:center;color:#6c7e8c;font:12px 'Courier New',monospace;background:#e5ecef;box-shadow:none;border-style:dashed}.loop-arc{position:absolute;left:0;top:0;height:60px;overflow:visible;pointer-events:none}.loop-arc path{stroke:#268c82;stroke-width:1.6;fill:none;stroke-dasharray:4 4;opacity:.85}.mechanism-data{display:flex;min-width:100%;background:linear-gradient(#f8fafb,#edf2f5);padding-top:2px;padding-bottom:5px}.mechanism-data-cell{border:1px solid transparent;background:none;flex:0 0 58px;padding:0 1px 6px;border-radius:4px;min-height:74px;position:relative;color:#334d5f}.mechanism-data-cell .chip-model{width:54px;height:37px}.mechanism-data-cell.current{border-color:#c86b82;background:#f8edf0}.mechanism-data-cell.draft{border-color:#bc9652}.mechanism-data-cell small{display:block;font:10px 'Courier New',monospace;color:#73838e}.data-value{display:block;font:12px 'Courier New',monospace;margin:0 0 4px}.controller{position:relative;display:grid;grid-template-columns:180px minmax(0,1fr) 160px;gap:20px;padding:18px 22px;background:linear-gradient(#fdfefe,#eef2f5);border:1px solid #bfcdd6;border-radius:10px;margin:22px 0;box-shadow:0 3px 0 #c9d4dc}.controller:before,.controller:after{content:'';position:absolute;width:4px;height:22px;background:linear-gradient(90deg,#95a8b6,#e6edf2,#95a8b6);left:50%}.controller:before{top:-23px}.controller:after{bottom:-23px}.controller .eyebrow{font-size:9px;color:#677f91;letter-spacing:.1em;margin-bottom:6px}.sensor-triple{display:flex;gap:0;min-height:27px}.sensor-triple .chip-model{width:38px;height:28px}.decoded{font:12px 'Courier New',monospace;color:#2458d8;margin-top:6px}.controller-action{font-size:15px;font-weight:bold;color:#274456;margin-bottom:5px}.controller-rule{font:12px/1.45 'Courier New',monospace;color:#506a7c;min-height:34px}.sensor-data{display:flex;align-items:center;gap:10px}.sensor-data .chip-model{width:50px;height:34px}.data-sensor-value{font:20px 'Courier New',monospace;color:#b94166}.phase-strip{display:flex;gap:5px;margin:10px 0 4px}.phase-strip span{height:5px;border-radius:2px;background:#d4dfe7;flex:1}.phase-strip span.active{background:var(--blue);box-shadow:0 0 8px #2458d833}.mechanism-phase{font-size:12px;color:#38546b;min-height:19px}.mechanism-sentence{font-size:13px;color:#465f70;border-left:3px solid #91a8bd;padding-left:12px;min-height:38px;margin:17px 0 5px}.machine-scene[data-phase=read] .reader-eye{background:#9ac8fa;box-shadow:0 0 9px #8bc3ff}.machine-scene[data-phase=rule] .controller{border-color:#719bbc}.machine-scene[data-phase=act] .head-light{background:#ef6a91;box-shadow:0 0 12px #e7698f}.machine-scene[data-phase=blocked]{border-color:#b73f5b}.scene-edit-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}.scene-edit-bar button{font-size:12px;min-height:34px}.scene-help{font-size:11px;color:#677b8a}.inspector-shell{padding-top:10px}.inspector-shell>summary{padding:10px 0}.inspector-shell:not(.chip-mode){border:0;padding:0}.inspector-shell:not(.chip-mode)>summary{display:none}.execution-busy .physical-program-bit,.execution-busy .mechanism-data-cell{cursor:wait}.scene-example-link{font-size:12px;color:#526f88;text-decoration:underline}.scene-disclosure summary{font-size:12px}.scene-disclosure p{font-size:13px;color:#546c7e}.scene-disclosure{border-color:#cad7e0;padding:9px 0 0}.scene-samples{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.scene-samples label{font-size:11px}.scene-samples select{font-size:12px;padding:5px}.scene-samples button{font-size:12px;min-height:30px;padding:6px 9px}
@media(max-width:760px){.machine-scene{padding:16px 12px;border-radius:12px}.machine-name h2{font-size:23px}.controller{grid-template-columns:100px minmax(0,1fr);gap:14px;padding:14px 12px}.controller>div:last-child{grid-column:1/-1;display:flex;align-items:center;gap:12px;border-top:1px solid #d3dce3;padding-top:10px}.controller>div:last-child .eyebrow{margin:0}.sensor-triple .chip-model{width:31px;height:24px}.controller-action{font-size:13px}.controller-rule{font-size:11px}.machine-badge{font-size:9px}.mechanism-sentence{font-size:12px}.data-cell .chip-model{width:34px}.glyph canvas{width:64px;height:128px}}
@media(prefers-reduced-motion:reduce){.turning .face-old,.turning .face-edge{display:none}.turning .face-new{animation:none}.machine-head,.tool-jaw{transition:none!important}}

.physical-program-bit:disabled,.mechanism-data-cell:disabled{opacity:1}
.working-head .head-label{top:-14px;font-size:9px}

.machine-name{padding-inline:14px}
