body{background:#f6f8fb}nav .wrap{height:56px}.bench-layout{display:grid;grid-template-columns:255px minmax(0,1fr);gap:18px;max-width:1800px;margin:auto;padding:14px 20px}.bench-controls{max-height:calc(100dvh - 85px);overflow:auto}.panel{background:#fff;padding:14px}.panel h2{font-size:13px;color:#64748b;margin:0 0 10px}.panel-heading{display:flex;justify-content:space-between;gap:8px}.palette{display:grid;grid-template-columns:1fr 1fr;gap:7px}.palette button{text-align:left;padding:9px;font:inherit;font-size:13px;border:1px solid #dce4ef;background:white;border-radius:8px;cursor:pointer}.palette button:hover{border-color:#0062ff;background:#f0f5ff}.bench-main{min-width:0}.bench-toolbar,.toolbar-right,.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.bench-toolbar{justify-content:space-between;min-height:38px;margin-bottom:10px}.toolbar-right label{font-size:13px;color:#64748b}.btn{font-size:12px;min-height:34px}.btn.active{background:#eaf2ff;border-color:#0062ff;color:#0062ff}.actions{margin-top:12px}.hint{font-size:12px;color:#7b899b;line-height:1.7;margin:7px 0}.stage{border:1px solid #dce4ef;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 2px 10px #15355408}.connect-guide{padding:11px 14px;background:#edf4ff;border-bottom:1px solid #d8e7ff;color:#17427e;display:flex;gap:6px 20px;flex-wrap:wrap;font-size:13px}.connect-guide span{font-size:12px;color:#637a95}.selection-status{min-height:32px;padding:6px 14px;background:#f9fbff;color:#47688f;font-size:12px}.selection-status.selected{background:#fff3d9;color:#995405;font-weight:700}.canvas-scroll{overflow:auto;background:#fcfdff}.canvas-scroll svg{width:100%;height:calc(100dvh - 265px);min-height:340px;max-height:800px;display:block;touch-action:none;user-select:none}.canvas-scroll.zoomed svg{width:145%;height:auto;min-height:500px}.device{cursor:grab}.device:active{cursor:grabbing}.device:focus-visible .selection-box{stroke:#7c3aed}.terminal{cursor:crosshair}.terminal text{pointer-events:none}.wire-group{cursor:pointer}.wire{stroke:#168b8b;stroke-width:4;fill:none}.wire-group:hover .wire,.wire-group:focus .wire{stroke:#e8593c;stroke-width:6}.terminal:focus .terminal-ring{stroke:#7c3aed;stroke-width:5}.readout{display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 2px;color:#475569;font-size:14px}.readout b{color:#0062ff}.readout .warning{color:#b45309}#preset{width:100%;border:1px solid #d7e0ed;border-radius:7px;padding:8px;color:#334155;background:white;font:inherit;font-size:13px}.param{display:block;margin:12px 0;font-size:13px;color:#52657b}.param output{float:right;color:#0062ff}.param input{display:block;width:100%;margin-top:8px}#properties>strong{font-size:15px;color:#334155}#wireList{padding-top:8px}#wireList button{width:100%;text-align:left;margin:3px 0;white-space:normal;font-size:11px;padding:6px}.mobile-only{display:none}.device-readout{font-size:16px;fill:#17427e}.terminal-ring{fill:white;stroke:#0062ff;stroke-width:3}.device-label{font-size:18px;fill:#334155;paint-order:stroke;stroke:#fcfdff;stroke-width:5}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}svg text{font-family:'Microsoft YaHei',sans-serif}
@media(max-width:850px){.bench-layout{display:block;padding:10px}.bench-controls{display:none}.bench-main{width:100%}.show-controls .bench-controls{display:block;position:fixed;top:62px;left:10px;right:10px;bottom:16px;max-height:none;overflow:auto;z-index:100;background:#f6f8fb;border:1px solid #cbd5e1;border-radius:12px;padding:12px;box-shadow:0 12px 50px #16345140}.mobile-only{display:block}.canvas-scroll svg{height:53dvh;min-height:300px;max-height:600px}.toolbar-right{gap:5px}.toolbar-right .btn{padding:5px 8px;font-size:11px}.connect-guide{font-size:12px;padding:9px 11px;gap:3px 12px}.selection-status{font-size:11px}.bench-toolbar{gap:8px}.readout{font-size:12px;padding:10px 0}nav .wrap{padding:0 12px}.logo{font-size:15px}.nav-back{font-size:12px}}
.teaching-notice{font-size:12px;color:#64748b;line-height:1.8;margin:2px 0 7px;padding:9px 12px;border-left:3px solid #a8bdd8;background:#f0f4f9}.model-notes{font-size:12px;color:#7b899b;margin:6px 0;line-height:1.8}.model-notes summary{cursor:pointer}.model-notes p{padding:6px 0}
.teaching-badge{display:inline-block;font-size:11px;font-weight:400;letter-spacing:0;color:#637a95;background:#edf2f8;border:1px solid #dce4ef;border-radius:5px;padding:3px 7px;margin-left:12px;vertical-align:middle}@media(max-width:500px){.teaching-badge{font-size:10px;padding:2px 5px;margin-left:6px}.nav-back{font-size:11px}}

/* One mobile drawer, two desktop sidebars: no cloned IDs or controls. */
.bench-layout.layout-three{grid-template-columns:210px minmax(0,1fr);gap:16px;max-width:1800px;padding:14px 20px;align-items:start}.bench-controls-shell{display:contents}
.layout-three .bench-left{grid-column:1;grid-row:1}.layout-three .bench-main{grid-column:2;grid-row:1 / span 2;position:sticky;top:70px;min-width:0}.layout-three .bench-right{grid-column:1;grid-row:2}.layout-three .bench-controls{display:block;max-height:calc(100dvh - 88px);overflow:auto;position:sticky;top:70px;min-width:0}
.layout-three .bench-right .readout{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:0;line-height:1.8;font-size:13px}.layout-three .bench-right .panel{margin-bottom:12px}.layout-three .bench-right>label{display:block;padding:6px 14px;font-size:13px}.layout-three .palette button{font-size:12px;padding:8px}.layout-three .bench-toolbar{gap:8px}.layout-three .toolbar-right{gap:5px}
@media(min-width:1280px){.bench-layout.layout-three{grid-template-columns:200px minmax(0,1fr) 240px}.layout-three .bench-main{grid-column:2;grid-row:1}.layout-three .bench-right{grid-column:3;grid-row:1}}
@media(max-width:850px){.bench-layout.layout-three{display:block;padding:10px}.layout-three .bench-main{position:static;width:100%}.bench-controls-shell{display:none}.show-controls .bench-controls-shell{display:block;position:fixed;inset:62px 10px 16px;max-height:none;overflow:auto;z-index:100;background:#f6f8fb;border:1px solid #cbd5e1;border-radius:12px;padding:12px;box-shadow:0 12px 50px #16345140}.show-controls .bench-controls-shell>.bench-controls{display:block;position:static;inset:auto;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.layout-three .bench-right .readout{font-size:13px}}

@media(min-width:851px){#openControls{display:none}.layout-three .palette{grid-template-columns:1fr}.layout-three .palette button{white-space:nowrap}}
