:root{--accent:#377fff;--glass:rgba(8,17,31,.94)}
header{background:#07111f!important;border-bottom:1px solid #234574!important;padding:8px 14px!important}
.tb{border-radius:2px!important;border-color:#314766!important;background:#0b1728!important;font-weight:600}.tb:hover{background:#13243c!important;border-color:#377fff!important}.tb.primary{background:#377fff!important;border-color:#377fff!important}
aside{background:linear-gradient(180deg,#0a1122,#070b16)!important}aside h2{color:#8fb0ee!important;font-size:10px!important;letter-spacing:.16em!important}
.part-item{border-radius:10px!important;background:#0c1428!important}.part-item:hover{box-shadow:0 6px 18px #2f80ff33}
.part-item-locked{position:relative;opacity:.62}.part-item-locked:hover{opacity:.9}.part-lock-badge{align-self:flex-start;margin-left:auto;padding:3px 4px;border:1px solid #53688f;border-radius:4px;color:#c4d2ec;font-size:8px;letter-spacing:.04em}
#component-access-note{margin:0 0 10px;padding:8px;border:1px solid #23417a;border-radius:7px;background:#070d1d}
#viewport{background:#e7eaee!important}
#hud{background:#0b1728!important;border-radius:0!important;border-color:#377fff!important}
.field input,.field select{border-radius:8px!important}
#ftree{position:absolute;left:12px;top:12px;width:272px;max-height:calc(100% - 90px);display:flex;flex-direction:column;background:var(--glass);border:1px solid #2a4f9a;border-radius:12px;backdrop-filter:blur(10px);box-shadow:0 14px 40px #0008;z-index:5;font-size:12px;overflow:hidden}
#ftree.collapsed #ft-body{display:none}
.ft-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #1c2d50;background:#0b1630}.ft-head b{flex:1;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#cfe0ff}#ft-count{font-size:10px;color:#8fb0ee}
#ftree.collapsed .ft-head{border-bottom:0}
#ft-body{overflow:auto;padding:4px 0}
.ft-row{display:flex;align-items:center;gap:5px;min-height:24px;padding-right:8px;cursor:pointer;color:#e6eeff;white-space:nowrap}.ft-row:hover{background:#13264a}.ft-row.sel{background:#1c5fe0}.ft-row.dim{opacity:.55}
.ft-lb{flex:1;overflow:hidden;text-overflow:ellipsis}.ft-row small{color:#9fb8ea;font-size:10px}.ft-row.sel small{color:#fff}
.ft-pm{width:16px;height:16px;flex:none;padding:0;border:1px solid #4a6fbf;border-radius:3px;background:#0b1425;color:#fff;font-size:12px;line-height:1;display:grid;place-items:center}.ft-pm:hover{background:#2f80ff}
.ft-sp{width:16px;flex:none}.ft-eye{border:0;background:none;color:#7fb0ff;font-size:11px;padding:0 2px}.ft-eye.off{color:#566}
table.ds td:last-child{text-align:right}#x-data h2{margin-top:6px}
@media(max-width:780px){#ftree{width:200px}}
body{grid-template-rows:auto minmax(0,1fr) auto auto!important}
#programming-panel{bottom:calc(var(--term-h,34px) + 44px)!important}
#terminal{display:flex;flex-direction:column;height:var(--term-h,190px);background:#050a15;border-top:1px solid #2a4f9a;transition:height .2s}
#terminal.collapsed #tm-body{display:none}
.tm-head{display:flex;align-items:center;gap:8px;padding:5px 12px;background:#0b1630;border-bottom:1px solid #1c2d50;min-height:34px}.tm-head b{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#cfe0ff;margin-right:8px}.tm-head .tb{padding:3px 9px;font-size:11px}
.tm-tab{border:0;background:none;color:#9fb8ea;font-size:12px;padding:4px 10px;border-radius:7px}.tm-tab.on{background:#1c3a78;color:#fff}.tm-tab span{background:#ff647b;color:#fff;border-radius:9px;padding:0 6px;font-size:10px;margin-left:3px}
#tm-body{flex:1;overflow:auto;padding:8px 12px;font:12px/1.55 Consolas,monospace;color:#cfe0ff}
#tm-body i{color:#6f86b8;font-style:normal;margin-right:6px}#tm-body u{text-decoration:none;font-weight:700;margin-right:6px}
.tm-error{color:#ff8da1}.tm-warn{color:#ffd479}.tm-ok{color:#7be0a4}.tm-info{color:#9fc2ff}
.part-entry{display:flex;align-items:stretch;gap:4px;min-width:0}.part-entry>.part-item{flex:1;min-width:0}.part-item-name{overflow:hidden;text-overflow:ellipsis}
.info-button{width:24px;height:24px;flex:none;border:1px solid #45638c;border-radius:50%;background:#102039;color:#a8c9ff;font:700 13px/1 Georgia,serif;cursor:pointer}
.info-button:hover,.info-button:focus-visible{background:#377fff;border-color:#377fff;color:#fff}.palette-info-button{align-self:center}
.inspector-component-header{gap:7px}.inspector-component-header h3{flex:1}
.ft-info-button{width:18px;height:18px;font-size:11px;margin-left:auto}
#component-info-dialog{width:min(840px,calc(100vw - 28px));max-height:min(86dvh,900px);padding:0;border:1px solid #3c5b83;border-radius:8px;background:#f8fafc;color:#172235;box-shadow:0 24px 80px #06101f99}
#component-info-dialog::backdrop{background:#07111fb3;backdrop-filter:blur(3px)}
.component-info-dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#0b1728;color:#fff;border-bottom:2px solid #377fff}
#component-info-content{padding:18px 20px 24px;overflow:auto}
.component-info-heading{display:flex;align-items:center;gap:12px}.component-info-heading h2{margin:2px 0;color:#14243a}.component-info-family{margin:0;color:#536981;font-size:11px;text-transform:uppercase;letter-spacing:.12em}.component-tier{margin-left:auto;padding:5px 10px;border-radius:3px;font-size:11px;font-weight:800;letter-spacing:.08em}.component-tier-free{background:#d9f3e5;color:#17643e}.component-tier-pro{background:#e4edff;color:#174eae}
.component-info-summary{padding:12px 14px;border-left:3px solid #377fff;background:#edf3fb;color:#33465e;line-height:1.55}
#component-info-content h3{margin:18px 0 8px;color:#152842;font-size:13px;text-transform:uppercase;letter-spacing:.08em}
.component-info-table{width:100%;border-collapse:collapse;font-size:12px}.component-info-table th,.component-info-table td{padding:8px;border-bottom:1px solid #d6dee8;text-align:left;color:#25364c}.component-info-table th{color:#50627a;font-weight:700}.component-info-table td small{display:block;color:#73849a;font-size:10px}
.component-info-guidance{display:grid;grid-template-columns:1fr 1fr;gap:14px}.component-info-guidance section{padding:0 12px 10px;border:1px solid #d6dee8;border-radius:5px;background:#fff}.component-info-guidance ul{margin:0;padding-left:18px;color:#40536a;font-size:12px;line-height:1.6}
.component-info-pin-table{overflow:auto;max-height:300px}.info-pin-row{outline:none}.info-pin-row:hover,.info-pin-row:focus{background:#e2edff}
.pin-type{display:inline-block;padding:3px 6px;border-radius:3px;font-size:10px;font-weight:700;white-space:nowrap}.pin-type-power{background:#fde1e1;color:#a52828}.pin-type-ground{background:#e3e7ec;color:#4b5563}.pin-type-input{background:#dcecff;color:#1b58a8}.pin-type-output{background:#d9f3e5;color:#17643e}.pin-type-analog{background:#ffead2;color:#995400}.pin-type-comm{background:#eee1ff;color:#6536a0}.pin-type-passive{background:#e8edf2;color:#475569}
@media(max-width:600px){.component-info-guidance{grid-template-columns:1fr}#component-info-content{padding:14px}.component-info-table{font-size:10px}.component-info-table th,.component-info-table td{padding:6px}}
#pro-dock{position:absolute;right:12px;top:12px;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;z-index:6;max-width:calc(100% - 24px)}
.pro-panel{position:absolute;right:12px;top:58px;width:min(320px,calc(100% - 24px));max-height:calc(100% - 72px);overflow:auto;background:var(--glass);border:1px solid #2a4f9a;border-radius:10px;backdrop-filter:blur(10px);z-index:6;box-shadow:0 14px 40px #0008;font-size:12px}
.pp-head{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:#0b1630;border-bottom:1px solid #1c2d50}.pp-head b{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#cfe0ff}.pp-body{padding:10px;display:grid;gap:8px}
.mm-lcd{background:#a7c4a0;color:#1a2a1a;font:700 30px/1.3 "Courier New",monospace;text-align:right;padding:8px 12px;border-radius:8px;border:3px solid #333;box-shadow:inset 0 2px 8px #0006;min-height:50px}.mm-sub{color:#9fb8ea;font-size:11px;min-height:14px}
.mm-modes{display:flex;gap:5px}.mm-modes button{flex:1;padding:6px;border:1px solid #2b4f9c;background:#0d1730;color:#cfe0ff;border-radius:7px}.mm-modes button.on{background:#2f6fe0;color:#fff}
.mm-probe{display:grid;gap:3px;color:#cfe0ff}.mm-probe.red{color:#ff8da1}.mm-probe select{background:#0d1730;color:#fff;border:1px solid #2b4f9c;border-radius:7px;padding:5px}
.pj-row{display:flex;gap:5px;flex-wrap:wrap}.pj-row input{flex:1;min-width:0;background:#0d1730;color:#fff;border:1px solid #2b4f9c;border-radius:7px;padding:5px 8px}
.pj-card{border:1px solid #1c2d50;border-radius:8px;padding:8px;display:grid;gap:6px;background:#0a1226}.pj-h{display:flex;justify-content:space-between;align-items:center;color:#9fb8ea;font-size:11px;border-top:1px dashed #1c2d50;padding-top:4px}
.pro-panel .tb{padding:5px 9px;font-size:11px}.pro-panel small{color:#9fb2d3}
@media(max-width:600px){#pro-dock{top:8px;right:8px}#pro-dock .tb{padding:5px 7px;font-size:10px}.pro-panel{top:50px;right:8px;width:calc(100% - 16px);max-height:calc(100% - 60px)}}
