/* Scoped to the circuit workspace; the rest of the panel uses style.css. */
.sc-page { --sc-e: #e2c35e; --sc-f: #62b6e8; --sc-i: #e69558; --sc-s: #74c99b; }
.sc-page .sc-toolbar { gap: 5px; padding: 8px 10px; }
.sc-page .sc-toolbar .raid-btn { min-height: 32px; border-radius: 5px; }
.sc-page .sc-toolbar input[type="text"] { flex-basis: 170px; max-width: 300px; }
.sc-tools-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: #171a1e; }
.sc-tools-row .raid-btn { width: 30px; height: 30px; padding: 5px; border-radius: 4px; }
.sc-tools-row .raid-btn:disabled { opacity: .3; cursor: default; }
.sc-tools-row .raid-seg button { min-width: 30px; height: 30px; padding: 5px; }
.sc-tools-row .raid-seg button.on { background: #e6955826; color: #efb47e; }
.sc-tool-check { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; color: #a9adb5; font-size: 12px; white-space: nowrap; }
.sc-tool-check input { width: 14px; height: 14px; accent-color: #e69558; }
.sc-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.sc-swatch { width: 22px; height: 22px; padding: 0; border: 3px solid #171a1e; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.sc-swatch:hover, .sc-swatch.on { outline: 1px solid #d5d9df; }
.sc-zoom-readout { margin-left: auto; min-width: 48px; color: #a9adb5; font: 12px ui-monospace, monospace; text-align: right; }
.sc-page .sc-work { grid-template-columns: 230px minmax(0, 1fr) 260px; }
.sc-page .sc-palette, .sc-page .sc-inspector { background: #171a1e; }
.sc-panel-title { padding: 7px 4px 12px; color: #e8ebef; font-size: 13px; font-weight: 600; }
.sc-palette-tabs { display: flex; margin-bottom: 10px; }
.sc-palette-tabs button { flex: 1; min-width: 0; padding: 7px; }
.sc-page .sc-pal-group summary { letter-spacing: 0; text-transform: none; font-size: 12px; }
.sc-page .sc-pal-item { min-height: 46px; padding: 5px; border-radius: 4px; line-height: 1.3; }
.sc-page .sc-pal-item img { width: 38px; height: 38px; }
.sc-page .sc-pal-item small { flex-shrink: 0; }
.sc-page .sc-canvas-wrap { background: #101215; }
.sc-page .sc-canvas { cursor: crosshair; }
.sc-page .sc-canvas.pan-mode { cursor: grab; }
.sc-page .sc-canvas.pan-mode:active { cursor: grabbing; }
.sc-grid-point { fill: #454a52; }
.sc-bg.grid-hidden { fill: #101215; }
.sc-page .sc-node-box, .sc-page .sc-adp > rect { fill: transparent; stroke: transparent; stroke-width: 1; }
.sc-page .sc-node:hover .sc-node-box, .sc-page .sc-adp:hover > rect { fill: #22262c40; stroke: #606875; }
.sc-page .sc-node.sel .sc-node-box, .sc-page .sc-adp.sel > rect { fill: #efb47e0a; stroke: #efb47e; stroke-width: 2; }
.sc-page .sc-node.note .sc-node-box { fill: #1a1d2180; stroke: #353a4240; }
.sc-page .sc-node.connected-node .sc-node-box { stroke: #efb47e; }
.sc-page .sc-node.grouped .sc-node-box { stroke-dasharray: 5 3; }
.sc-page .sc-node.ok .sc-node-box { stroke: #74c99b; }
.sc-page .sc-node.bad .sc-node-box { stroke: #d27773; }
.sc-page .sc-node.sel.ok .sc-node-box, .sc-page .sc-node.sel.bad .sc-node-box { stroke: #efb47e; }
.sc-object-image { pointer-events: none; }
.sc-page .sc-adp > .sc-adp-badge { fill: #101215d9; stroke: #747e89; stroke-width: 1; cursor: move; }
.sc-page .sc-adp.sel > .sc-adp-badge { stroke: #efb47e; stroke-width: 2; }
.sc-page .sc-port-label { fill: #a8afb9; font-size: 10.5px; }
.sc-page .sc-port { stroke: #101215; stroke-width: 2; }
.sc-page .sc-port:not(.used) { fill-opacity: .7; }
.sc-page .sc-port:hover, .sc-page .sc-port.compatible { stroke: #fff; stroke-width: 2.5; fill-opacity: 1; }
.sc-page .sc-port.compatible { filter: drop-shadow(0 0 3px #fff6); }
.sc-page .sc-port.incompatible { opacity: .22; }
.sc-port-target { fill: transparent; stroke: none; pointer-events: all; cursor: crosshair; }
.sc-wire-shadow { stroke: #101215; stroke-width: 7; fill: none; pointer-events: none; stroke-linejoin: round; }
.sc-page .sc-wire { stroke-linejoin: round; stroke-linecap: round; }
.sc-page .sc-wire.sel, .sc-page .sc-wire.traced { opacity: 1; filter: drop-shadow(0 0 2px #fff5); }
.sc-page .sc-wire.sel { stroke-width: 4; }
.sc-wire-handle { fill: #101215; stroke: #fff; stroke-width: 1.5; cursor: move; }
.sc-wire-handle:hover { fill: #efb47e; }
.sc-marquee { fill: #efb47e16; stroke: #efb47e; stroke-width: 1; stroke-dasharray: 5 3; pointer-events: none; }
.sc-canvas-status { position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 8px; color: #a9adb5; background: #101215dd; border: 1px solid #2c3037; border-radius: 4px; font-size: 11px; pointer-events: none; overflow-wrap: anywhere; }
.sc-page .sc-legend { background: #101215dd; border-radius: 4px; }
.sc-page .sc-hint { border: 0; background: transparent; font-size: 20px; color: #646b76; }
.sc-page .sc-inspector h3 { font-size: 13px; }
.sc-page .sc-inspector .sc-insp-head img { width: 56px; height: 56px; }
.sc-page .sc-sum { gap: 0; border-block: 1px solid #30353d; padding-block: 12px; }
.sc-page .sc-sum-item { background: transparent; border: 0; padding: 4px 7px; border-radius: 0; }
.sc-page .sc-sum-item b { font-size: 19px; }
.sc-page .sc-sum-item span { font-size: 10px; line-height: 1.4; }
.sc-diagnostic { width: 100%; display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid #30353d; text-align: left; color: #d7b48a; font: 12px/1.4 system-ui, sans-serif; cursor: pointer; }
.sc-diagnostic .ic { flex-shrink: 0; }
.sc-example-list { display: grid; gap: 10px; }
.sc-example { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; background: #171a1e; border: 1px solid #363c45; border-radius: 6px; color: var(--text); text-align: left; cursor: pointer; }
.sc-example:hover { border-color: #efb47e; }
.sc-example img { width: 64px; height: 64px; object-fit: contain; }
.sc-example div { display: grid; gap: 5px; min-width: 0; }
.sc-example small { color: #efb47e; font-size: 11px; }
.sc-example strong { font-size: 14px; }
.sc-example span { font-size: 12px; line-height: 1.4; color: #a9adb5; }
.sc-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sc-selection-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.sc-range-field { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; }
.sc-range-field input { width: 100%; min-width: 0; }
.sc-range-field input[type="range"] { accent-color: #efb47e; padding: 0; border: 0; }
.sc-page .sc-itembar { max-height: 110px; overflow-y: auto; bottom: 40px; width: calc(100% - 24px); border-radius: 6px; box-shadow: none; }
.sc-page .items-on .sc-canvas-status { bottom: 10px; }
@media (max-width: 1200px) and (min-width: 901px) {
    .sc-page .sc-work { grid-template-columns: 200px minmax(0, 1fr) 220px; }
    .sc-page .sc-toolbar input[type="text"] { max-width: 210px; }
}
@media (max-width: 900px) {
    .sc-page .sc-work { grid-template-columns: minmax(0, 1fr); }
    .sc-page .sc-toolbar input[type="text"] { max-width: none; }
    .sc-page .sc-palette, .sc-page .sc-inspector { width: min(280px, 86vw); }
    .sc-tools-row { gap: 4px; padding: 5px 8px; }
    .sc-tools-row .sc-swatches { gap: 5px; }
    .sc-tool-check { margin-left: 4px; }
    .sc-page .sc-toolbar .raid-btn { padding: 6px 8px; }
}
@media (max-width: 560px) {
    .sc-page #ed-meta, .sc-page #ed-share, .sc-page #ed-import, .sc-page #ed-examples, .sc-page #ed-new, .sc-page #ed-sim { font-size: 0; width: 32px; padding: 6px; }
    .sc-page #ed-meta .ic, .sc-page #ed-share .ic, .sc-page #ed-import .ic, .sc-page #ed-examples .ic, .sc-page #ed-new .ic, .sc-page #ed-sim .ic { width: 18px; height: 18px; margin: 0; }
    .sc-tools-row .sc-swatches { flex-basis: 100%; order: 2; padding: 4px 0 1px; }
    .sc-tools-row .sc-swatch { width: 24px; height: 24px; }
    .sc-tool-check { font-size: 11px; }
    .sc-canvas-status { font-size: 10px; }
}
