/* Breadbit — realism layer: component depth, smoke, touch feedback */
.part .body{filter:drop-shadow(0 1.5px 1.5px rgba(0,0,0,.4))}
.part .leg{stroke:url(#aMetal);stroke-width:2.8;filter:drop-shadow(0 1px 0 rgba(0,0,0,.35))}
.part .leg.dead{stroke:#444}
.wireBody{stroke-width:6}.wireShadow{stroke-width:9}
.smoke{pointer-events:none}.smk{fill:#6a6f78;opacity:0;animation:bbSmoke 1.8s ease-out infinite;transform-box:fill-box}
@keyframes bbSmoke{0%{opacity:0;transform:translate(0,0) scale(.5)}20%{opacity:.7}100%{opacity:0;transform:translate(3px,-24px) scale(2.2)}}
.part.dead .smk,.part .dead~.smoke .smk{filter:none}
.tool-select .part:hover .body{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--accent2) 80%,transparent)) drop-shadow(0 1.5px 1.5px rgba(0,0,0,.4))}
.tool-select .p_pot,.tool-select .p_pot .bodyHit{cursor:ew-resize}
.tool-select .p_sw .bodyHit,.tool-select .p_pbtn .bodyHit,.tool-select .p_dsw .bodyHit{cursor:pointer}
.part{animation:bbPlace .28s cubic-bezier(.3,1.6,.5,1) both;transform-box:fill-box;transform-origin:center}
@keyframes bbPlace{from{opacity:0;transform:scale(.7)}}
.selRing{fill:none;stroke:var(--accent2);stroke-width:2;stroke-dasharray:4 3;animation:bbRing 1.2s linear infinite}
@keyframes bbRing{to{stroke-dashoffset:-14}}
.hole{transition:fill .12s}
.holeRing{stroke-width:1.4}
@media(prefers-reduced-motion:reduce){.part{animation:none}.smk,.selRing{animation:none}}

.termRing{fill:none;stroke:var(--accent2);stroke-width:1.3;opacity:.95}
.termDot{fill:url(#aMetal);stroke:#2a3340;stroke-width:.6}
.termTag{font:800 7px/1 system-ui,sans-serif;fill:#9fb3d6;paint-order:stroke;stroke:#0009;stroke-width:2px}.termTag.pos{fill:#ff8f85}
.part.dead .termRing{stroke:var(--bad)}

/* HUD status chips */
#hud{flex-wrap:wrap;row-gap:4px;max-width:calc(100% - 20px);white-space:normal;border-radius:16px}
#hud .hudRow.chip{display:flex!important;gap:5px;padding:1px 7px;border-radius:999px;background:color-mix(in srgb,var(--panel2) 80%,transparent);border:1px solid var(--line);font-size:11px;align-items:center}
#hud .hudRow.chip b{color:var(--text);font-weight:700}
#hud .hudRow.chip.good b{color:var(--good)}#hud .hudRow.chip.warn b{color:var(--accent)}#hud .hudRow.chip.bad{border-color:var(--bad)}#hud .hudRow.chip.bad b{color:var(--bad)}#hud .hudRow.chip.idle b{color:var(--sub)}
#hud .hudRow.chip#hErr{pointer-events:auto;cursor:pointer}
.hudRow.stat.stopped .dot{background:#ff6b63!important}
.hudRow.stat.running .dot{background:var(--good)!important;box-shadow:0 0 8px var(--good)}
@media(max-width:560px){#hud .hudRow.chip>span{display:none}#hud{padding:6px 9px;gap:5px}#hud .hudRow.chip{font-size:10.5px;padding:1px 6px}}
.alert .rd{color:var(--sub)}
.tile.danger,.pri.danger{--tc:var(--bad)}.tile.danger .ic{color:var(--bad)}.pri.danger{background:var(--bad);color:#fff}
/* LED burst */
.burst{pointer-events:none}.burst .flash{fill:#fff;opacity:0;transform-box:fill-box;transform-origin:center}
.burst.go .flash{animation:bbFlash .55s ease-out}
.burst .spark{stroke:#ffd24a;stroke-width:1.6;stroke-linecap:round;opacity:0}
.burst.go .spark{animation:bbSpark .6s ease-out}
@keyframes bbFlash{0%{opacity:1;transform:scale(.4)}60%{opacity:.8;transform:scale(2.6)}100%{opacity:0;transform:scale(3.2)}}
@keyframes bbSpark{0%{opacity:1;transform:scale(.3)}100%{opacity:0;transform:scale(2.6)}}

/* schematic viewer */
.schemBar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:12px;color:var(--sub)}
.schemWrap{overflow:auto;border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--panel2);max-height:calc(100% - 44px)}
.schemWrap svg{display:block;min-width:560px;height:auto;margin:0 auto}
