/* Workbench (#/p/<id>): header, drawer, desk, inspector. */

.workbench { height: 100%; display: flex; flex-direction: column; }
.workbench-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr) 272px; }

/* ---------- header extras ---------- */
.bench-title {
  min-width: 0; width: 320px; max-width: 34vw; height: 34px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; font-weight: var(--weight-strong); font-size: var(--text-md);
  text-overflow: ellipsis;
}
.bench-title:hover { border-color: var(--border); }
.bench-title:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.save-state { font-size: var(--text-xs); color: var(--text-3); white-space: nowrap; }
.save-state.error { color: var(--bad); font-weight: var(--weight-medium); }
.toolbar { display: flex; gap: 2px; }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }

/* ---------- side panels ---------- */
.panel {
  overflow-y: auto; padding: 16px 14px 24px;
  background: var(--surface); color: var(--text);
}
.drawer { border-right: 1px solid var(--border); }
.inspector { border-left: 1px solid var(--border); }
.panel-title { margin: 0 0 2px; font: var(--weight-strong) var(--text-md) / 1.3 var(--font-display); }
.panel-sub { margin: 0 0 14px; color: var(--text-3); font-size: var(--text-sm); }
.panel-subtitle {
  margin: 18px 0 8px; font-size: var(--text-xs); font-weight: var(--weight-strong);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3);
}
.panel-note { margin: 12px 0 0; color: var(--text-3); font-size: var(--text-xs); line-height: 1.5; }
.panel-text { margin: 0 0 10px; font-size: var(--text-sm); }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.panel-actions .btn:last-child { grid-column: span 2; }
.btn-block { width: 100%; }
.btn-danger-ghost { color: var(--bad); }
.btn-danger-ghost:hover { background: var(--bad-soft); }

.drawer-search { height: 34px; margin-bottom: 4px; }
.drawer-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel .panel-subtitle:first-of-type { margin-top: 12px; }
.drawer-item {
  display: grid; gap: 2px; padding: 10px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.drawer-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.drawer-item:active { cursor: grabbing; }
.drawer-art { width: 100%; height: auto; margin-bottom: 6px; pointer-events: none; }
.drawer-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 6px; border-radius: calc(var(--radius) - 4px); background: var(--surface-sunk); pointer-events: none; }
.drawer-item { min-width: 0; padding: 7px; }
.drawer-item-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.drawer-item-title { font-weight: var(--weight-strong); font-size: var(--text-sm); }
.drawer-item-text { color: var(--text-3); font-size: var(--text-xs); }
body.is-placing, body.is-placing * { cursor: grabbing !important; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: var(--text-sm); }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: var(--text-sm); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: var(--text-sm); align-items: center; }
.keys dd { margin: 0; color: var(--text-2); }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; text-align: center;
  font: var(--weight-medium) 11px/1.5 var(--font-mono);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
}

.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: var(--text-sm); cursor: pointer; }
.switch {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 36px; height: 20px; margin: 0; border-radius: var(--radius-pill);
  background: var(--border-strong); cursor: pointer; transition: background var(--speed) var(--ease);
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform var(--speed) var(--ease);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }

/* ---------- desk ---------- */
.canvas {
  position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background-color: var(--desk);
  background-image: radial-gradient(var(--desk-dot) 1px, transparent 1.3px);
  cursor: default;
}
.canvas-svg { display: block; position: absolute; inset: 0; }
.canvas .bb { cursor: grab; }
.canvas.is-dragging, .canvas.is-dragging .bb { cursor: grabbing; }
.bad-tint { fill: var(--bad); opacity: 0.18; pointer-events: none; }

.bb-label text { font: 500 0.6px var(--font-mono); text-anchor: middle; pointer-events: none; }
.bb-sign { font: 700 1px var(--font-ui); text-anchor: middle; pointer-events: none; }

.rail-btn { cursor: pointer; }
.rail-btn circle { fill: var(--surface); stroke: var(--bad); stroke-width: 0.12; }
.rail-btn path { stroke: var(--bad); stroke-width: 0.16; stroke-linecap: round; fill: none; }
.rail-btn.add circle { stroke: var(--accent); }
.rail-btn.add path { stroke: var(--accent); }
.rail-btn:hover circle, .rail-btn:focus-visible circle { fill: var(--bad); }
.rail-btn:hover path, .rail-btn:focus-visible path { stroke: #fff; }
.rail-btn.add:hover circle, .rail-btn.add:focus-visible circle { fill: var(--accent); }
.rail-btn:focus { outline: none; }
.rail-ghost { fill: none; stroke: var(--accent); stroke-width: 0.1; stroke-dasharray: 0.4 0.3; opacity: 0.7; pointer-events: none; }

.overlay { pointer-events: none; }
.sel-outline, .group-outline { fill: none; stroke: var(--accent); vector-effect: non-scaling-stroke; }
.sel-outline { stroke-width: 2px; }
.group-outline { stroke-width: 1.5px; stroke-dasharray: 5 4; opacity: 0.7; }
.contact { stroke: var(--accent); stroke-width: 4px; vector-effect: non-scaling-stroke; stroke-linecap: round; }

.hover-label {
  position: absolute; z-index: 5; display: grid; gap: 1px; max-width: 260px;
  padding: 6px 9px; pointer-events: none;
  background: var(--text); color: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-2);
  font-size: var(--text-xs); line-height: 1.35;
}
.hover-label strong { font: var(--weight-strong) var(--text-sm) var(--font-mono); }

.zoom-controls {
  position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.zoom-controls .icon-btn { width: 30px; height: 30px; }
.zoom-pct { min-width: 50px; height: 30px; border: 0; background: transparent; color: var(--text-2); font: var(--weight-medium) var(--text-xs) var(--font-mono); border-radius: var(--radius-sm); }
.zoom-pct:hover { background: var(--surface-hover); color: var(--text); }

@media (max-width: 1100px) {
  .workbench-body { grid-template-columns: 200px minmax(0, 1fr) 236px; }
}

/* ---------- parts and wires on the desk ---------- */
.pcb-label text { font: 500 0.36px var(--font-mono); fill: #e7e7e3; text-anchor: middle; pointer-events: none; }
.pcb-chip { font: 700 0.85px var(--font-ui); fill: #6c6f73; text-anchor: middle; pointer-events: none; }
.pcb-tiny { font: 500 0.4px var(--font-ui); fill: #d9d9d4; text-anchor: middle; pointer-events: none; }
.part { cursor: grab; }
.is-dragging .part { cursor: grabbing; }
.part.moving { opacity: 0.92; }
.part.bad, .wire.bad { opacity: 0.45; }
.part.placing { opacity: 0.8; pointer-events: none; }
.pin-target { fill: transparent; cursor: crosshair; }
.pin-target:hover { fill: var(--accent); fill-opacity: 0.35; }

.wire-hit { fill: none; stroke: transparent; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; }
.wire-edge { fill: none; stroke: rgba(0, 0, 0, 0.5); stroke-width: 0.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.wire-core { fill: none; stroke-width: 0.32; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.wire.selected .wire-edge { stroke: var(--accent); stroke-width: 0.72; }
.wire-end { cursor: grab; }

.handles .handle { fill: #fff; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: grab; }
.handles .handle.leg { fill: var(--accent); fill-opacity: 0.25; }
.net-hole { fill: var(--accent); }
.net-hole.here { fill: #fff; stroke: var(--accent); stroke-width: 0.12; }
.net-pin { fill: none; stroke: var(--accent); stroke-width: 0.14; }
.net-pin.here { stroke-width: 0.24; }
.drop-target { fill: none; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.drop-target.bad { stroke: var(--bad); }

/* ---------- inspector extras ---------- */
.field.compact { margin-top: 12px; gap: 4px; }
select.input { height: 36px; padding-right: 28px; }
.input.mono { font-family: var(--font-mono); }
.input.invalid, .input.invalid:focus { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.field-error { color: var(--bad); font-size: var(--text-xs); }
.pin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--text-sm); }
.pin-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
.pin-where { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-2); }
.pin-where.none { color: var(--text-3); font-family: var(--font-ui); }
.pin-joined { grid-column: span 2; color: var(--text-3); font-size: var(--text-xs); }
.pin-details summary { cursor: pointer; }
.panel-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--text-sm); text-decoration: none; }
.panel-link svg { width: 14px; height: 14px; }
.panel-note.watch { padding-left: 9px; border-left: 3px solid var(--warn); color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--accent); }
.tips.steps { padding-left: 20px; }
.tips.steps li::marker { font-weight: var(--weight-strong); color: var(--accent); }

/* ---------- desk and dock column ---------- */
.bench-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.bench-main > .canvas { flex: 1; min-height: 0; }
.dock {
  position: relative; flex: none; display: flex; flex-direction: column;
  background: var(--surface); border-top: 1px solid var(--border);
}
.dock.closed { height: auto; }
.dock-resize { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 2; }
.dock-bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.dock.closed .dock-bar { border-bottom: 0; }
.dock-tab {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
}
.dock-tab:hover { background: var(--surface-hover); color: var(--text); }
.dock-tab[aria-selected="true"] { background: var(--surface-sunk); color: var(--text); }
.count {
  min-width: 20px; padding: 0 6px; border-radius: var(--radius-pill); text-align: center;
  font: var(--weight-strong) 11px/18px var(--font-mono); background: var(--surface-sunk); color: var(--text-2);
}
.count.error { background: var(--bad); color: #fff; }
.count.warning { background: var(--warn); color: #fff; }
.count.ok { background: var(--good-soft); color: var(--good); }
.dock-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px 12px; }
.dock-empty { display: flex; align-items: center; gap: 8px; padding: 10px 4px; color: var(--text-2); font-size: var(--text-sm); }
.dock-empty svg { width: 18px; height: 18px; color: var(--good); }

.issues, .part-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.part-issues { margin-bottom: 4px; }
.issue {
  display: flex; gap: 10px; width: 100%; padding: 8px 10px; text-align: left;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text);
}
.issue:hover, .issue.focused { background: var(--surface-hover); border-color: var(--border); }
.issue svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.issue.error svg { color: var(--bad); }
.issue.warning svg { color: var(--warn); }
.issue.tip svg { color: var(--accent); }
.issue-text { display: grid; gap: 1px; font-size: var(--text-sm); line-height: 1.4; }
.issue-text span { color: var(--text-2); }
.part-issues .issue { background: var(--surface-2); border-color: var(--border); }
.part-issues .issue.error { background: var(--bad-soft); border-color: transparent; }

.pins-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.pins-table th { text-align: left; font-size: var(--text-xs); font-weight: var(--weight-strong); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.pins-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.pins-table tbody tr { cursor: pointer; }
.pins-table tbody tr:hover { background: var(--surface-hover); }
.pins-table .mono { font-family: var(--font-mono); font-size: var(--text-xs); }

/* ---------- check highlights on the desk ---------- */
.issue-outline { fill: none; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.issue-outline.error, .issue-node.error { stroke: var(--bad); }
.issue-outline.warning, .issue-node.warning { stroke: var(--warn); }
.issue-outline.tip, .issue-node.tip { stroke: var(--accent); }
.issue-node { fill: none; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.badge circle { stroke: #fff; stroke-width: 0.14; }
.badge.error circle { fill: var(--bad); }
.badge.warning circle { fill: var(--warn); }
.badge text { font: 700 1.1px var(--font-ui); fill: #fff; text-anchor: middle; pointer-events: none; }
.badge { pointer-events: none; }
.flash-ring {
  fill: none; stroke: var(--warn); stroke-width: 3px; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center; animation: flash-ring 0.7s ease-out 3;
}
@keyframes flash-ring { from { opacity: 1; transform: scale(0.6); } to { opacity: 0; transform: scale(2.6); } }

/* ---------- code ---------- */
.dock-body.code { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.code-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.code-toolbar { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.code-toolbar .btn { height: 28px; padding: 0 10px; }
.code-hint { color: var(--text-3); font-size: var(--text-xs); }
.code-editor { flex: 1; min-height: 0; }
.code-editor .cm-editor { height: 100%; }
.cm-pin-line { background: var(--code-pin-block); }
.cm-pin-first { position: relative; }
.cm-pin-first::after {
  content: 'Written by Breadboard from your wiring'; position: absolute; right: 10px; top: 0;
  font: 500 11px/1.9 var(--font-ui); color: var(--text-3); pointer-events: none;
}
.code-empty { display: grid; gap: 12px; justify-items: start; padding: 18px; max-width: 560px; font-size: var(--text-sm); color: var(--text-2); }
.code-empty p { margin: 0; }
.code-empty strong { color: var(--text); }
.code-banner { margin: 8px; }
.code-banner pre, .code-preview {
  margin: 8px 0; padding: 10px; overflow: auto; max-height: 220px;
  font: var(--text-xs) / 1.5 var(--font-mono); background: var(--surface-sunk); border-radius: var(--radius-sm); color: var(--text);
}
dialog .code-preview { max-height: 46vh; }
.snippets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.snippet { height: 30px; padding: 0 10px; }
.panel-text code { font: var(--weight-medium) var(--text-sm) var(--font-mono); background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; }

/* ---------- cloud ---------- */
.cloud-btn { gap: 6px; }
.cloud-btn .cloud-code { font-family: var(--font-mono); font-size: var(--text-xs); }
.cloud-btn .cloud-state { color: var(--text-3); font-size: var(--text-xs); font-weight: var(--weight-normal); }
.cloud-btn.error { border-color: var(--bad); }
.cloud-btn.error .cloud-state { color: var(--bad); font-weight: var(--weight-medium); }
.mono { font-family: var(--font-mono); }
.cloud-facts { display: grid; gap: 14px; }
.cloud-value { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.cloud-value .big { font-size: 18px; font-weight: var(--weight-medium); letter-spacing: 0.02em; margin-right: 6px; user-select: all; }
.cloud-value .btn { height: 30px; padding: 0 8px; }
.cloud-facts .panel-note { margin-top: 4px; }
.cloud-tip { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text) !important; font-size: var(--text-sm); }
.cloud-expiry { font-size: var(--text-sm); }

/* ---------- running code ---------- */
.run-controls { display: flex; align-items: center; gap: 6px; margin-right: 6px; }
.run-btn { min-width: 92px; }
.stop-btn svg { color: var(--bad); }
.stop-btn:disabled svg { color: inherit; }
.run-state {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--text-3); white-space: nowrap;
}
.run-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.run-state.running, .run-state.starting { color: var(--good); }
.run-state.running::before { animation: run-pulse 1.4s ease-in-out infinite; }
.run-state.error { color: var(--bad); font-weight: var(--weight-medium); }
@keyframes run-pulse { 50% { opacity: 0.3; } }
.run-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.run-dot.error { background: var(--bad); }

.console-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.console {
  flex: 1; min-height: 0; overflow: auto; padding: 8px 12px 16px;
  background: var(--code-bg); font: var(--code-size) / 1.55 var(--font-mono); color: var(--text);
}
.console-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.console-line.sys { color: var(--text-3); font-style: italic; }
.console-line.err { color: var(--bad); }
.console-link {
  padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: pre-wrap;
}
.console-empty { margin: 4px 0; font-family: var(--font-ui); font-size: var(--text-sm); color: var(--text-3); }

.cm-error-line { background: var(--bad-soft) !important; }
.cm-error-note {
  margin-left: 14px; padding: 0 8px; border-radius: var(--radius-pill);
  background: var(--bad); color: #fff; font: 500 11px/1.7 var(--font-ui);
}

.canvas { position: relative; }
.stale-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px;
  background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius);
  box-shadow: var(--shadow-2); font-size: var(--text-sm); white-space: nowrap;
}
.stale-banner .btn { height: 28px; }

.canvas.is-live [data-input] { cursor: pointer; }
.desk-chip {
  position: absolute; z-index: 2; transform: translateX(-50%);
  display: grid; gap: 2px; padding: 5px 9px 6px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2); font-size: var(--text-xs); color: var(--text-2);
}
.desk-chip span { font-family: var(--font-mono); white-space: nowrap; }

.try-it { display: grid; gap: 10px; }
.try-value { float: right; font-family: var(--font-mono); color: var(--text-2); text-transform: none; letter-spacing: 0; }
.range { width: 100%; margin: 4px 0 0; accent-color: var(--accent); }
.range-ends { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-3); }
.segmented { display: flex; padding: 2px; gap: 2px; border-radius: var(--radius-sm); background: var(--surface-sunk); }
.segmented button {
  flex: 1; height: 28px; border: 0; border-radius: calc(var(--radius-sm) - 2px); background: transparent;
  font-size: var(--text-sm); color: var(--text-2);
}
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); font-weight: var(--weight-medium); }
.hold-btn { touch-action: none; user-select: none; -webkit-user-select: none; }
.hold-btn.down { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.drawer-photo.art { object-fit: contain; }

/* ---------- parts round one (M8) ---------- */
.spin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.spin-row .btn { height: 30px; padding: 0 8px; font-size: var(--text-xs); }
.canvas.is-live [data-input="stick"], .canvas.is-live [data-input="slide"] { cursor: grab; }
.buzz { animation: buzz 0.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes buzz { from { opacity: 0.9; transform: scale(0.85); } to { opacity: 0; transform: scale(1.25); } }
.buzz-hz { fill: #b26a00; font-size: 0.9px; font-weight: 600; }

.usb-empty { display: block; max-width: 560px; }
.usb-empty p { margin: 0 0 6px; }
.usb-pane { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(220px, 300px) 1fr; }
.computer { display: grid; grid-template-rows: 1fr auto; gap: 8px; padding: 10px; border-right: 1px solid var(--border); min-height: 0; }
.usb-screen {
  position: relative; min-height: 110px; overflow: hidden; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #263a5c, #1a2238); color: #e6ecff; padding: 8px 10px;
  font: var(--text-xs) / 1.4 var(--font-mono);
}
.usb-screen-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60px; overflow: hidden; }
.caret { display: inline-block; width: 6px; height: 12px; margin-left: 1px; vertical-align: -2px; background: #e6ecff; animation: run-pulse 1s step-end infinite; }
.usb-screen-last { position: absolute; left: 10px; bottom: 6px; color: #9fb3ff; font-family: var(--font-ui); }
.pointer {
  position: absolute; width: 0; height: 0; transform: translate(-1px, -1px);
  border-left: 6px solid #fff; border-top: 6px solid #fff; border-right: 6px solid transparent; border-bottom: 6px solid transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); transition: left 80ms linear, top 80ms linear;
}
.computer-bar { display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--text-2); white-space: nowrap; }
.meter { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--surface-sunk); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.usb-log { list-style: none; margin: 0; padding: 8px 12px; overflow: auto; font-size: var(--text-sm); }
.usb-log li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.usb-kind { width: 18px; text-align: center; color: var(--text-3); }
.usb-log q { font-family: var(--font-mono); quotes: '“' '”'; }

/* ---------- sensors and switching (M8b) ---------- */
.shake { animation: shake 0.09s linear infinite; }
@keyframes shake { 0% { transform: translate(0.12px, 0); } 50% { transform: translate(-0.12px, 0.08px); } 100% { transform: translate(0.12px, 0); } }
.desk-chip .btn { height: 28px; font-size: var(--text-xs); }
.canvas.is-live [data-input="wave"] { cursor: pointer; }

/* ---------- beta feedback ---------- */
.feedback-btn { gap: 6px; }
.beta {
  padding: 0 6px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent);
  font: var(--weight-strong) 10px/16px var(--font-ui); text-transform: uppercase; letter-spacing: 0.04em;
}
.feedback-kinds { margin: 12px 0; }
.feedback-kinds button { height: auto; min-height: 32px; padding: 4px 6px; font-size: var(--text-xs); }
.dialog textarea.input { width: 100%; min-height: 110px; resize: vertical; padding: 8px 10px; font: var(--text-sm) / 1.5 var(--font-ui); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback-wrap { max-width: 860px; }
.feedback-key { display: flex; gap: 8px; max-width: 420px; }
.feedback-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.feedback-note { padding: 12px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.feedback-note.problem { border-left-color: var(--bad); }
.feedback-note.idea { border-left-color: var(--accent); }
.feedback-note.liked { border-left-color: var(--good); }
.feedback-note p { margin: 6px 0 10px; white-space: pre-wrap; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--text-xs); color: var(--text-3); }
.feedback-meta b { color: var(--text); }
.feedback-actions { display: flex; gap: 6px; }

.oled-pixels { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Power: the USB cable and strips joined to 3V3, 5V or GND. */
.usb-cable [data-power] { cursor: pointer; }
.usb-cable.is-out { opacity: 0.55; }
.usb-cable [data-power]:hover rect { filter: brightness(1.3); }
.strip-tint rect { opacity: 0.22; }
.strip-tint .tint-v3 { fill: var(--bb-red); }
.strip-tint .tint-v5 { fill: #ef8a1c; }
.strip-tint .tint-gnd { fill: var(--bb-blue); }
