/* Port and wire overlay uses Studio theme variables and its continuous world coordinates. */
#board-studio .bc-wires {position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none;z-index:-1}
#board-studio .bc-wire, #board-studio .bc-preview {fill:none;stroke:var(--bs-muted);stroke-width:1.7;opacity:.65;pointer-events:none}
#board-studio .bc-wire[data-usage="brief_provenance"] {stroke-dasharray:2 5;opacity:.5}
#board-studio .bc-wire[data-usage="prepared_prompt"] {stroke:var(--bs-accent);stroke-width:2.3;opacity:.9}
#board-studio .bc-wire[data-selected="true"] {stroke:var(--bs-accent);stroke-width:2.5;opacity:1}
#board-studio .bc-wire[data-state="stale"] {stroke:var(--bs-amber,#a97735);stroke-dasharray:6 4;opacity:.8}
#board-studio .bc-wire[data-state="missing"] {stroke:var(--bs-danger,#b65b70);stroke-dasharray:3 4;opacity:.8}
#board-studio .bc-wire-hit {fill:none;stroke:transparent;stroke-width:14;pointer-events:stroke;cursor:pointer}
#board-studio .bc-wire-hit:hover, #board-studio .bc-wire-hit:focus-visible {stroke:var(--bs-accent);stroke-opacity:.16;outline:none}
#board-studio .bc-wire[data-rewiring="true"] {opacity:.12}
#board-studio .bc-wire-hit[data-rewiring="true"] {pointer-events:none}
#board-studio .bc-preview {stroke:var(--bs-accent);stroke-width:2;stroke-dasharray:5 4;opacity:.95}
#board-studio .bc-ports {position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;z-index:5}
#board-studio .bc-port {position:absolute;width:24px;height:24px;padding:0;gap:0;border:0;border-radius:50%;background:transparent;pointer-events:auto;touch-action:none;transform-origin:center;cursor:crosshair;overflow:visible}
#board-studio .bc-port-dot {display:block;width:10px;height:10px;flex:none;border:2px solid var(--bs-muted);border-radius:50%;background:var(--bs-panel);box-shadow:0 0 0 2px var(--bs-panel)}
#board-studio .bc-port-out .bc-port-dot {width:12px;height:12px;background:var(--bs-muted)}
#board-studio .bc-port:hover .bc-port-dot, #board-studio .bc-port:focus-visible .bc-port-dot, #board-studio .bc-port[aria-pressed="true"] .bc-port-dot {border-color:var(--bs-accent);background:var(--bs-accent)}
#board-studio .bc-port[data-compatible="yes"] .bc-port-dot {border-color:var(--bs-accent);background:var(--bs-tint);box-shadow:0 0 0 3px var(--bs-tint)}
#board-studio .bc-port[data-compatible="no"] .bc-port-dot {opacity:.35}
#board-studio .bc-port[data-compatible="pending"] .bc-port-dot {border-style:dashed}
#board-studio .bc-port[data-connected="true"] .bc-port-dot {background:var(--bs-muted)}
#board-studio .bc-port-in[data-connected="true"] {cursor:grab}
#board-studio .bc-port-in[data-connected="true"]:active {cursor:grabbing}
#board-studio .bc-port[data-target="true"] .bc-port-dot, #board-studio .bc-port[data-selected="true"] .bc-port-dot {border-color:var(--bs-accent);background:var(--bs-accent);box-shadow:0 0 0 5px var(--bs-tint)}
#board-studio .bc-port[data-target="true"], #board-studio .bc-port[data-selected="true"], #board-studio .bc-port:hover {z-index:2}
#board-studio .bc-port-label {display:none;position:absolute;top:50%;transform:translateY(-50%);font-size:10px;line-height:1.2;padding:4px 6px;border:1px solid var(--bs-line);border-radius:5px;background:var(--bs-panel);color:var(--bs-ink);pointer-events:none;white-space:nowrap}
#board-studio .bc-port-out .bc-port-label {left:25px}
#board-studio .bc-port-in .bc-port-label {right:25px}
#board-studio .bc-port:hover .bc-port-label, #board-studio .bc-port:focus-visible .bc-port-label, #board-studio .bc-port[data-target="true"] .bc-port-label, #board-studio .bc-port[data-selected="true"] .bc-port-label, #board-studio .bc-port[data-compatible="yes"] .bc-port-label {display:block}
#board-studio .bc-panel {position:absolute;z-index:8;width:280px;max-width:calc(100% - 16px);max-height:calc(100% - 16px);overflow:auto;padding:10px 12px;border:1px solid var(--bs-line);border-radius:10px;background:var(--bs-panel);color:var(--bs-ink);box-shadow:0 8px 24px #0002;pointer-events:auto;font-size:12px;line-height:1.5}
#board-studio .bc-panel p {margin:0 0 4px;overflow-wrap:anywhere}
#board-studio .bc-panel .bc-relation {padding-right:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}
#board-studio .bc-panel .bc-wire-state {color:var(--bs-muted)}
#board-studio .bc-panel button {padding:6px 9px;border:1px solid var(--bs-line);margin:4px 0 0}
#board-studio .bc-panel .bc-panel-close {position:absolute;right:6px;top:2px;border:0;padding:2px 6px;font-size:18px}
#board-studio .bc-panel .bc-disconnect {width:100%;justify-content:center}
#board-studio .bc-panel .bc-reattach {width:100%;justify-content:center}
#board-studio .bc-panel .bc-disconnect::after {content:'Canc';margin-left:auto;font-size:10px;color:var(--bs-muted)}
#board-studio .bc-panel .bc-wire-choice {display:block;width:100%;text-align:left;overflow-wrap:anywhere}

#board-studio .bc-ports[data-details=true] .bc-port[data-semantic=true] .bc-port-label {display:block;border:0;background:transparent;font-size:10px;padding:0}
#board-studio .bc-ports[data-details=true] .bc-port-in[data-semantic=true] .bc-port-label {left:24px;right:auto}
#board-studio .bc-ports[data-details=true] .bc-port-out[data-semantic=true] .bc-port-label {right:24px;left:auto}
#board-studio .bc-port[data-legacy=true] .bc-port-dot {border-style:dashed;border-color:var(--bs-amber,#a97735)}
