/* Studio 1.8 overhaul: visual-first shell and pages on top of Graphite (theme-graphite.css).
   Markup: index.html, home.mjs, device-browser.mjs, native-studio.mjs, app.mjs. */
:root { --hot: #ff8a4c; --cool: #5fd0ff; --ok: #7ee2a8; --vio: #b49cff; --pink: #ff7ad9; --warn: #ffb547; --ease: cubic-bezier(.2,.8,.2,1); }

/* ── shell ─────────────────────────────────────────────────────────────── */
/* Logo: a drawn 5-pin DIN (MIDI) connector; two pins light with incoming and outgoing MIDI. */
html[data-design="graphite"] .brand-mark { display: grid; place-items: center; padding: 3px; background: #f0f0f2; }
.midi-din { width: 100%; height: 100%; }
.din-ring { fill: none; stroke: #111113; stroke-width: 2.6; }
.din-key, .din-pin { fill: #111113; }
.din-pin { transition: fill .12s; }
.din-pin.lit[data-meter="in"] { fill: #0b8fc0; } .din-pin.lit[data-meter="out"] { fill: #e8630a; }
html[data-design="graphite"] .nav-index { min-width: 22px; height: 18px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font: 600 10.5px var(--mono); }
html[data-design="graphite"] .nav-index:empty { display: none; }
.nav-live { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-4); justify-self: end; }
.nav-live.on { background: var(--cool); box-shadow: 0 0 8px var(--cool); animation: live-pulse 1.4s infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }
.sidebar-scope { display: block; width: 100%; height: 34px; margin: 2px 0 10px; }
html[data-design="graphite"] .local-label { gap: 8px; font: 500 11.5px var(--sans); letter-spacing: 0; color: var(--ink-faint); }
.local-label svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
html[data-design="graphite"] .sidebar-bottom .version { display: block; margin-top: 8px; font: 500 10px var(--mono); letter-spacing: .1em; color: var(--ink-faint); }
.app-shell.nav-collapsed :is(.sidebar-scope, .local-label span, .version) { display: none; }
html[data-design="graphite"] .workspace-header h1 { font-size: 21px; letter-spacing: -.02em; }
.topbar .connection-heading { margin-left: auto; }
.transfer-ports { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px !important; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.transfer-ports svg { width: 18px; height: 18px; fill: none; stroke: var(--cool); stroke-width: 1.8; }
.transfer-ports span { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.transfer-ports .button { min-height: 32px; }
html[data-design="graphite"] .header-description { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); }
html[data-design="graphite"] .view { animation: view-rise .38s var(--ease) both; }
@keyframes view-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html[data-design="graphite"] .section-heading { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 99px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-2); font: 500 12px var(--sans); white-space: nowrap; }
button.chip { cursor: pointer; } button.chip:hover { background: var(--surface-3); }
.chip.on { background: var(--ink); color: #0c0c0e; box-shadow: none; }
.chip b { font: 600 11px var(--mono); opacity: .65; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.viz-barcode { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.viz-barcode i { flex: 1; min-width: 1px; border-radius: 1px; background: var(--surface-4); }
.viz-barcode i.hot { background: var(--hot); } .viz-barcode i.cool { background: var(--cool); }
.viz-glyph { display: block; width: 100%; height: 100%; overflow: visible; }
.glyph-body { fill: #232327; stroke: #3d3d44; } .glyph-ear { fill: #26262a; }
.glyph-screen { fill: #07090b; stroke: #000; } .glyph-line { fill: var(--cool); opacity: .9; } .glyph-line.dim { fill: #3a5f6b; }
.glyph-knob circle { fill: #3a3a40; stroke: #0c0c0e; } .glyph-knob line { stroke: #f0f0f2; stroke-width: 1.4; stroke-linecap: round; }
.glyph-led { fill: #2c2c31; } .glyph-led.on { fill: var(--hot); } .glyph-jack { fill: #0c0c0e; stroke: #55555c; }
.viz-knobs { width: 80%; height: 100%; }
.viz-knobs circle { fill: none; stroke-width: 4; stroke-linecap: round; } .viz-knobs .track { stroke: var(--surface-4); } .viz-knobs .arc { stroke: var(--ink-2); } .viz-knobs .arc.hot { stroke: var(--hot); }

/* ── Studio: patchbay ─────────────────────────────────────────────────── */
.studio { display: grid; gap: 14px; --s-thru: var(--cool); --s-app: var(--vio); --s-ctrl: var(--hot); --s-clock: var(--ok); --s-bad: #ff6b5c; }
.studio-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.studio-title { flex: 1 1 260px; min-width: 0; }
.studio-title h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.studio-summary { margin: 2px 0 0; color: var(--ink-faint); font-size: 12.5px; }
.studio-health { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 99px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); font: 600 11.5px var(--mono); color: var(--ink-2); cursor: pointer; }
.studio-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.studio-chip.s-warn i { background: var(--warn); } .studio-chip.s-bad i { background: var(--s-bad); } .studio-chip.s-paused i { background: var(--ink-faint); }
.button.studio-ghost { background: transparent; }
.button.studio-danger { color: #ffb3a8; border-color: rgba(255,90,72,.4); background: rgba(255,90,72,.09); }
.button.studio-danger:hover:not(:disabled) { background: rgba(255,90,72,.16); border-color: rgba(255,90,72,.6); }
.button.studio-mini { min-height: 28px; padding: 0 10px; font-size: 12px; }
.studio-switch { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px 0 8px; border: 0; border-radius: 99px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-3); color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; }
.studio-switch i { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--surface-4); }
.studio-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #cfcfd6; transition: transform .15s var(--ease); }
.studio-switch.on i { background: var(--cool); } .studio-switch.on i::after { transform: translateX(14px); background: #02202b; }
.studio-switch.small { height: 26px; padding: 0 10px 0 4px; font-size: 11.5px; gap: 7px; } .studio-switch.small i { width: 28px; height: 16px; } .studio-switch.small i::after { width: 10px; height: 10px; } .studio-switch.small.on i::after { transform: translateX(12px); }

.studio-bay { position: relative; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(290px, 370px) minmax(240px, 1fr); gap: 64px; padding: 16px 18px 20px !important; user-select: none; }
.studio-bay.paused .studio-lane .eyebrow::after { content: " · paused"; color: var(--warn); }
.studio-cables { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.studio-col { position: relative; z-index: 2; display: grid; align-content: start; gap: 8px; min-width: 0; }
.studio-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.studio-hint { font: 11px var(--mono); color: var(--ink-faint); }
.studio-ports { display: grid; gap: 7px; }
.studio-port { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 54px; padding: 8px 12px; border-radius: 11px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; outline: none; transition: opacity .2s, box-shadow .15s; }
.studio-port:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.studio-port.sel { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 5px rgba(255,255,255,.06); }
.studio-port.unused { opacity: .5; } .studio-port.unused:hover, .studio-port.unused:focus-visible { opacity: .9; }
.studio-port.missing { background: transparent; box-shadow: inset 0 0 0 1px var(--line-3); opacity: .7; }
.studio-port.err { box-shadow: 0 0 0 1px rgba(255,107,92,.45); }
.studio-port-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-dim); }
.studio-port-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.studio-col-in .studio-port.live .studio-port-icon { color: var(--cool); background: rgba(95,208,255,.12); } .studio-col-out .studio-port.live .studio-port-icon { color: var(--hot); background: var(--accent-soft); }
.studio-port-copy { min-width: 0; }
.studio-port-copy b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-port-copy small { display: block; font: 10.5px var(--mono); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); font: 600 10px var(--sans); color: var(--ink-dim); vertical-align: 1px; }
.studio-tag.tone-bad { background: rgba(255,107,92,.13); color: var(--s-bad); }
.studio-meter { display: grid; justify-items: end; gap: 3px; }
.studio-rate b { font: 600 12px var(--mono); } .studio-rate em { margin-left: 2px; font: 9.5px var(--mono); font-style: normal; color: var(--ink-faint); }
.studio-chans { display: grid; grid-template-columns: repeat(16, 4px); gap: 1.5px; } .studio-chans i { height: 4px; border-radius: 1px; background: var(--surface-4); }
.studio-col-in .studio-chans i.hit { background: var(--cool); } .studio-col-out .studio-chans i.hit { background: var(--hot); }
.studio-jack { position: absolute; top: 50%; z-index: 3; width: 16px; height: 16px; margin-top: -8px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px var(--line-3); cursor: crosshair; transition: box-shadow .12s, transform .12s, opacity .12s; touch-action: none; }
.studio-jack::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface-4); }
.studio-jack:hover, .studio-jack:focus-visible { transform: scale(1.25); outline: none; }
.studio-col-in .studio-jack, .studio-block .jack-src { right: -8px; } .studio-col-out .studio-jack, .studio-block .jack-dst { left: -8px; }
.studio-jack.used::after { background: var(--ink-2); }
.studio-col-in .studio-jack.used { box-shadow: 0 0 0 2px var(--cool); } .studio-col-out .studio-jack.used { box-shadow: 0 0 0 2px var(--hot); } .studio-block .studio-jack.used { box-shadow: 0 0 0 2px var(--vio); }
.studio-bay.wiring .studio-jack { opacity: .25; }
.studio-bay.wiring .studio-jack.can { opacity: 1; box-shadow: 0 0 0 2px var(--ok), 0 0 14px var(--ok); transform: scale(1.3); }
.studio-bay.wiring .studio-jack.origin, .studio-jack.pending { opacity: 1; box-shadow: 0 0 0 2px var(--ink), 0 0 14px rgba(255,255,255,.4); transform: scale(1.3); }
.studio-lane { display: flex; align-items: flex-start; justify-content: center; min-height: 30px; }
.studio-lane .eyebrow { position: relative; z-index: 2; padding: 0 8px; background: var(--surface-1); }
.studio-hub { display: grid; gap: 8px; padding: 12px; border-radius: 15px; background: var(--surface-0); box-shadow: 0 0 0 1px var(--line-3), 0 20px 40px -20px rgba(0,0,0,.9); }
.studio-hub-title { display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px; }
.studio-hub-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f0f0f2; color: #111113; }
.studio-hub-logo svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.studio-hub-title strong { display: block; font-size: 13.5px; } .studio-hub-title small { display: block; font: 600 9.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.studio-blocks { display: grid; gap: 7px; }
.studio-block { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 54px; padding: 9px 14px; border-radius: 11px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; outline: none; }
.studio-block:focus-visible { box-shadow: 0 0 0 2px var(--ink); } .studio-block.sel { box-shadow: 0 0 0 1.5px var(--ink); }
.studio-block-copy { min-width: 0; } .studio-block-copy b { display: block; font-size: 12.5px; }
.studio-block-copy small { display: block; overflow: hidden; font-size: 11px; color: var(--ink-faint); text-overflow: ellipsis; white-space: nowrap; } .studio-block-copy small.tone-warn { color: var(--warn); }
.studio-block-side { display: flex; align-items: center; gap: 8px; }
.studio-bpm { font: 600 17px var(--mono); letter-spacing: -.03em; }
.studio-beat { display: flex; gap: 3px; } .studio-beat i { width: 8px; height: 8px; border-radius: 2px; background: var(--surface-4); } .studio-beat i.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.studio-connect { display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: 12px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); }
.studio-connect span { color: var(--ink-dim); font-size: 12.5px; }
.studio-cable { fill: none; stroke-width: 2.4; stroke-linecap: round; opacity: .62; transition: stroke .2s, opacity .2s; }
.studio-cable.k-thru { stroke: var(--s-thru); } .studio-cable.k-listen, .studio-cable.k-capin, .studio-cable.k-capout { stroke: var(--s-app); } .studio-cable.k-ctrl { stroke: var(--s-ctrl); } .studio-cable.k-clock { stroke: var(--s-clock); }
.studio-cable.s-ok, .studio-cable.flow { opacity: 1; }
.studio-cable.s-paused { stroke: var(--ink-faint); stroke-dasharray: 3 6; }
.studio-cable.s-warn { stroke: var(--warn); opacity: .95; }
.studio-cable.s-bad { stroke: var(--s-bad); stroke-dasharray: 6 5; opacity: .95; }
.studio-cable.sel { stroke-width: 4; opacity: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,.25)); }
.studio-pulse { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: .1 16; opacity: 0; pointer-events: none; }
.studio-pulse.on { opacity: .9; animation: studio-flow .9s linear infinite; }
.studio-pulse.k-thru { stroke: #d6f4ff; } .studio-pulse.k-ctrl { stroke: #ffe1d1; } .studio-pulse.k-listen, .studio-pulse.k-capin, .studio-pulse.k-capout { stroke: #ebe4ff; } .studio-pulse.k-clock { stroke: #dcf8e7; }
@keyframes studio-flow { to { stroke-dashoffset: -16.1; } }
.studio-cable-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.studio-temp { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-dasharray: 4 5; opacity: .9; }
.studio-temp.latched { stroke-width: 3; stroke-dasharray: none; opacity: 1; } .studio-temp.latched.k-thru { stroke: var(--s-thru); } .studio-temp.latched.k-ctrl { stroke: var(--s-ctrl); } .studio-temp.latched.k-clock { stroke: var(--s-clock); } .studio-temp.latched:is(.k-listen, .k-capin, .k-capout) { stroke: var(--s-app); }
/* Layout containers let the pointer through to the cables beneath; only the cards themselves catch it. */
.studio-col, .studio-col-head, .studio-ports, .studio-lane { pointer-events: none; }
.studio-port, .studio-hub, .studio-col .studio-help, .studio-connect { pointer-events: auto; }
.studio-wire:hover .studio-cable, .studio-wire.sel .studio-cable { stroke-width: 3.6; opacity: 1; }
.studio-plug, .studio-unplug { visibility: hidden; pointer-events: all; }
.studio-wire:hover :is(.studio-plug, .studio-unplug), .studio-wire.sel :is(.studio-plug, .studio-unplug) { visibility: visible; }
.studio-bay.wiring :is(.studio-plug, .studio-unplug) { visibility: hidden; }
.studio-plug { cursor: grab; } .studio-plug:active { cursor: grabbing; }
.studio-plug circle { fill: var(--surface-1); stroke-width: 3; transition: r .12s; } .studio-plug:hover circle { r: 9; }
.studio-plug.k-thru circle { stroke: var(--s-thru); } .studio-plug.k-ctrl circle { stroke: var(--s-ctrl); } .studio-plug.k-clock circle { stroke: var(--s-clock); } .studio-plug:is(.k-listen, .k-capin, .k-capout) circle { stroke: var(--s-app); }
.studio-unplug { cursor: pointer; } .studio-unplug circle { fill: var(--ink); stroke: var(--surface-1); stroke-width: 2; transition: fill .12s; }
.studio-unplug text { font: 700 15px var(--sans); text-anchor: middle; dominant-baseline: central; fill: #0c0c0e; pointer-events: none; }
.studio-unplug:hover circle { fill: var(--s-bad); } .studio-unplug:hover text { fill: #fff; }
.studio-bay.wiring .studio-jack.latched { opacity: 1; transform: scale(1.6); box-shadow: 0 0 0 3px var(--ok), 0 0 22px var(--ok); }
.studio-bay.wiring :is(.studio-port, .studio-block).drop-target { box-shadow: 0 0 0 1.5px var(--ok), 0 0 0 6px rgba(126,226,168,.14); opacity: 1; }
.studio-jack:not(.studio-bay.wiring .studio-jack):hover { box-shadow: 0 0 0 2px var(--ink), 0 0 12px rgba(255,255,255,.35); }
.studio-drag-label { position: absolute; z-index: 7; padding: 5px 10px; border-radius: 99px; background: var(--ok); color: #0b2316; font: 600 12px var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(16px, -150%); transition: opacity .12s; }
.studio-drag-label.free { background: var(--surface-3); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-3); }
.studio-drag-label.show { opacity: 1; }
.studio-badge { pointer-events: all; cursor: pointer; }
.studio-badge circle { stroke: var(--surface-1); stroke-width: 2; } .studio-badge text { font: 700 11px var(--sans); text-anchor: middle; dominant-baseline: central; fill: #111; }
.studio-badge.s-warn circle { fill: var(--warn); } .studio-badge.s-bad circle { fill: var(--s-bad); }
.studio-toast { position: absolute; left: 50%; top: 10px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 99px; background: var(--ink); color: #0c0c0e; font-weight: 600; font-size: 12.5px; opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity .2s, transform .2s; }
.studio-toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.studio-undo { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

.studio-lower { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, 1fr); gap: 14px; align-items: start; }
.studio-list { padding: 0 !important; overflow: hidden; }
.studio-list header { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.studio-list h3 { margin: 0; font-size: 15px; }
.studio-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); cursor: pointer; outline: none; }
.studio-row:last-child { border-bottom: 0; } .studio-row:hover, .studio-row:focus-visible { background: var(--surface-2); } .studio-row.sel { background: rgba(255,255,255,.05); }
.studio-row b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.studio-row small { display: block; overflow: hidden; color: var(--ink-faint); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.studio-kind { font: 600 10.5px var(--mono); color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.studio-st { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 700 11px var(--sans); }
.studio-st.s-ok { background: rgba(126,226,168,.13); color: var(--ok); } .studio-st.s-ready { background: var(--surface-3); color: var(--ink-dim); } .studio-st.s-warn { background: rgba(255,181,71,.13); color: var(--warn); } .studio-st.s-bad { background: rgba(255,107,92,.13); color: var(--s-bad); } .studio-st.s-paused { background: var(--surface-3); color: var(--ink-faint); }
.studio-inspector { position: sticky; top: 84px; display: grid; gap: 12px; padding: 16px !important; min-width: 0; }
.studio-inspector h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.studio-verdict { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.studio-verdict b { display: block; } .studio-verdict span:not(.studio-st) { color: var(--ink-dim); }
.studio-verdict.s-ok { box-shadow: inset 0 0 0 1px rgba(126,226,168,.3); } .studio-verdict.s-warn { box-shadow: inset 0 0 0 1px rgba(255,181,71,.35); } .studio-verdict.s-bad { box-shadow: inset 0 0 0 1px rgba(255,107,92,.4); }
.studio-field { display: grid; gap: 6px; min-width: 0; } .studio-field > span { font-size: 11.5px; font-weight: 600; color: var(--ink-dim); }
.studio-field .select, .studio-field .input { width: 100%; min-width: 0; }
.studio-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.studio-chgrid { display: grid; grid-template-columns: 1.6fr repeat(16, minmax(0, 1fr)); gap: 3px; }
.studio-chgrid button, .studio-types button { border: 0; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-dim); cursor: pointer; }
.studio-chgrid button { position: relative; height: 26px; padding: 0; border-radius: 6px; font: 600 10px var(--mono); }
.studio-chgrid button.on { background: var(--cool); color: #02202b; box-shadow: none; }
.studio-chgrid button.seen::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--hot); }
.studio-types { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-types button { height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; } .studio-types button.on { background: var(--ink); color: #0c0c0e; box-shadow: none; }
.studio-keys { position: relative; display: flex; height: 40px; border-radius: 8px; overflow: hidden; background: #e9e9ee; cursor: pointer; }
.studio-keys i { flex: 1; border-right: 1px solid #b9b9c2; } .studio-keys i.black { position: absolute; top: 0; z-index: 2; height: 60%; background: #1c1c1f; border: 0; border-radius: 0 0 2px 2px; }
.studio-keys-range { position: absolute; top: 0; bottom: 0; z-index: 3; pointer-events: none; background: rgba(95,208,255,.3); box-shadow: inset 0 0 0 2px var(--cool); }
.studio-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 12.5px; } .studio-facts dt { color: var(--ink-faint); } .studio-facts dd { margin: 0; font: 12px var(--mono); overflow-wrap: anywhere; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .studio-actions .grow { flex: 1; }
.studio-help { margin: 0; color: var(--ink-dim); font-size: 12.5px; } .studio-pad { padding: 16px; }
.studio-link { justify-self: start; max-width: 100%; padding: 2px 0; border: 0; background: none; color: var(--cool); font: 600 12.5px var(--sans); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-legend { display: grid; gap: 7px; font-size: 12.5px; color: var(--ink-dim); } .studio-legend div { display: flex; align-items: center; gap: 10px; }
.studio-legend i { width: 26px; height: 0; border-top: 2.5px solid; } .lg-thru { border-color: var(--cool); } .lg-app { border-color: var(--vio); } .lg-ctrl { border-color: var(--hot); } .lg-clock { border-color: var(--ok); } .lg-warn { border-color: var(--warn); } .lg-bad { border-color: #ff6b5c; border-top-style: dashed !important; }
.studio-fold { padding: 0 !important; } .studio-fold summary { padding: 14px 16px; font-weight: 600; cursor: pointer; }
.studio-trow { display: grid; grid-template-columns: minmax(0, 1.4fr) 44px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.studio-trow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .studio-trow .mono { font: 11.5px var(--mono); color: var(--ink-dim); }
.studio-caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; padding: 0 16px 16px; font-size: 12.5px; } .studio-caps b { display: block; } .studio-caps span { color: var(--ink-dim); }
@media (max-width: 1250px) { .studio-lower { grid-template-columns: minmax(0, 1fr); } .studio-inspector { position: static; } .studio-caps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .studio-bay { grid-template-columns: minmax(0, 1fr); gap: 18px; } .studio-cables, .studio-lane, .studio-jack, .studio-hint { display: none; }
  .studio-col-mid { order: 2; } .studio-col-out { order: 3; }
  .studio-trow { grid-template-columns: minmax(0, 1fr) 44px; } .studio-trow > :nth-child(n+3) { display: none; }
  .studio-row2 { grid-template-columns: minmax(0, 1fr); } .studio-chgrid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .studio-pulse.on { animation: none; } }

/* ── Instruments ───────────────────────────────────────────────────────── */
html[data-design="graphite"] .instrument-heading { padding: 0; margin: 0 0 12px; background: none; box-shadow: none; }
html[data-design="graphite"] .instrument-heading::before, html[data-design="graphite"] .instrument-heading::after { display: none; }
html[data-design="graphite"] .instrument-heading h2 { margin: 0; font-size: 22px; }
.instrument-makers { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.chip-ready.on { background: var(--ok); color: #062014; }
html[data-design="graphite"] .instrument-catalog { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
html[data-design="graphite"] .instrument-card { gap: 8px; padding-bottom: 14px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
html[data-design="graphite"] .instrument-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-3), 0 18px 34px -18px rgba(0,0,0,.95); }
.instrument-card > .instrument-glyph { height: 132px; padding: 14px 18px; background: radial-gradient(90% 90% at 50% 10%, rgba(255,255,255,.06), transparent 70%), var(--surface-0); border-bottom: 1px solid var(--line); }
.instrument-card .viz-glyph { filter: drop-shadow(0 12px 14px rgba(0,0,0,.6)); transition: transform .35s var(--ease); }
.instrument-card:hover .viz-glyph { transform: scale(1.05) translateY(-2px); }
html[data-design="graphite"] .instrument-card h3 { font-size: 16px; }
html[data-design="graphite"] .instrument-chips span:first-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.instrument-chips .instrument-ready { color: var(--ok) !important; background: rgba(126,226,168,.12) !important; box-shadow: none !important; }
.instrument-meter { display: flex; align-items: center; gap: 8px; font: 10.5px var(--mono); color: var(--ink-faint); }
.instrument-meter-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.instrument-meter-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--hot), #ffb38a); transform-origin: left; animation: bar-grow .9s var(--ease) both; }
@keyframes bar-grow { from { transform: scaleX(0); } }
html[data-design="graphite"] .instrument-card .button { margin-top: 4px; }
html[data-design="graphite"] .instrument-footnote { font-size: 11.5px; color: var(--ink-faint); }

/* ── Library ───────────────────────────────────────────────────────────── */
html[data-design="graphite"] .library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
html[data-design="graphite"] .library-list .empty-state { grid-column: 1 / -1; }
html[data-design="graphite"] .library-row { grid-template-columns: 1fr; align-items: stretch; gap: 12px; padding: 14px; border-radius: 14px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
html[data-design="graphite"] .library-row:hover { transform: translateY(-3px); }
html[data-design="graphite"] .library-row.selected { box-shadow: 0 0 0 1.5px var(--hot), 0 0 0 5px var(--accent-soft); background: var(--surface-2); }
.item-copy { display: grid; gap: 9px; min-width: 0; }
.item-copy .viz-barcode { height: 52px; }
html[data-design="graphite"] .item-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.item-size { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.item-size i { display: block; height: 100%; background: var(--cool); transform-origin: left; animation: bar-grow .9s var(--ease) both; }
.item-foot { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--ink-faint); }
html[data-design="graphite"] .library-row .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-design="graphite"] .library-row .row-actions > * { flex: 1; justify-content: center; min-height: 30px; font-size: 12px; }

/* ── Transfer ──────────────────────────────────────────────────────────── */
.transfer-flow { padding: 14px 18px !important; margin-bottom: 16px; }
.transfer-flow svg { display: block; width: 100%; height: 150px; }
.transfer-flow .dev { fill: var(--surface-2); stroke: var(--line-3); } .transfer-flow .screen { fill: #07090b; } .transfer-flow .pulse { fill: none; stroke: var(--cool); stroke-width: 2; }
.transfer-flow .knob { fill: #3a3a40; } .transfer-flow text { fill: var(--ink-dim); stroke: none; font: 12px var(--sans); text-shadow: none; letter-spacing: 0; }
.transfer-flow .track { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 2 8; }
.transfer-flow .stack { stroke: var(--line-3); } .transfer-flow .s1 { fill: #1c1c1f; } .transfer-flow .s2 { fill: #202024; } .transfer-flow .s3 { fill: #26262a; }
.transfer-flow .title { fill: var(--ink); font: 600 14px var(--sans); } .transfer-flow .sub { fill: var(--ink-faint); font: 11px var(--mono); }
.transfer-flow .packets circle { fill: var(--cool); opacity: 0; offset-path: path("M232 75 C400 75 500 75 668 75"); filter: drop-shadow(0 0 6px var(--cool)); }
#view-transfer.is-capturing .transfer-flow .packets circle { opacity: 1; animation: packet 2s linear infinite; }
#view-transfer.is-sending .transfer-flow .packets circle { opacity: 1; fill: var(--hot); filter: drop-shadow(0 0 6px var(--hot)); animation: packet 1.6s linear infinite reverse; }
.transfer-flow .packets circle:nth-child(2) { animation-delay: -.5s !important; } .transfer-flow .packets circle:nth-child(3) { animation-delay: -1s !important; } .transfer-flow .packets circle:nth-child(4) { animation-delay: -1.5s !important; }
@keyframes packet { from { offset-distance: 0%; } to { offset-distance: 100%; } }
#view-transfer.is-capturing .transfer-flow .track { stroke: rgba(95,208,255,.4); } #view-transfer.is-sending .transfer-flow .track { stroke: rgba(255,138,76,.4); }
html[data-design="graphite"] .selected-file { grid-template-columns: 76px minmax(0, 1fr) auto; }
.send-barcode .viz-barcode { width: 76px; height: 36px; }
.send-barcode:empty::before { content: ""; display: block; width: 76px; height: 36px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 3px, transparent 3px 6px); opacity: .6; }
.send-ring { position: relative; width: 56px; height: 56px; }
.send-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.send-ring .track { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.send-ring .bar { fill: none; stroke: var(--hot); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset .25s linear; }
.send-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 11px var(--mono); }
html[data-design="graphite"] .capture-meter .signal-bars i { animation: none; }
#view-transfer.is-capturing .capture-meter .signal-bars i { animation: bars .6s ease-in-out infinite alternate; }

/* ── Monitor ───────────────────────────────────────────────────────────── */
.monitor-viz { display: grid; gap: 14px; padding: 16px 18px !important; margin-bottom: 14px; }
.monitor-viz-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.monitor-rate canvas { display: block; width: 100%; height: 64px; margin-top: 6px; }
.monitor-counters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.monitor-counter { display: grid; gap: 2px; min-width: 84px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); }
.monitor-counter b { font: 600 17px var(--mono); }
.monitor-counter small { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-dim); }
.monitor-counter small i { width: 7px; height: 7px; border-radius: 50%; }
.monitor-lanes canvas { display: block; width: 100%; height: 230px; margin-top: 8px; }
html[data-design="graphite"] .monitor-head, html[data-design="graphite"] .monitor-row { grid-template-columns: 96px 54px 170px 60px minmax(0, 1fr) minmax(0, 180px); gap: 10px; }
.monitor-row { animation: row-in .3s var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); background: rgba(255,255,255,.04); } }
.monitor-type { display: flex; align-items: center; gap: 8px; }
.type-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--ink-faint); flex: none; }
.monitor-row[data-type="cc"] .type-dot { background: #ff8a4c; } .monitor-row[data-type="note"] .type-dot { background: #5fd0ff; } .monitor-row[data-type="sysex"] .type-dot { background: #b49cff; }
.monitor-row[data-type="pitch"] .type-dot { background: #7ee2a8; } .monitor-row[data-type="program"] .type-dot { background: #ffb547; } .monitor-row[data-type="pressure"] .type-dot { background: #ff7ad9; }
.monitor-row .badge.dir-in { color: var(--cool); background: rgba(95,208,255,.12); } .monitor-row .badge.dir-out { color: var(--hot); background: var(--accent-soft); }
.monitor-ch, .monitor-source { font: 11px var(--mono); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-row .hex { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Sounds & banks ────────────────────────────────────────────────────── */
.native-slot-map { display: grid; gap: 10px; padding: 14px; margin: 4px 0 12px; border-radius: 14px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--line); }
.native-slot-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.native-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 4px; }
.native-slot { aspect-ratio: 1; padding: 0; border: 0; border-radius: 5px; background: var(--c); opacity: .78; cursor: pointer; transition: transform .15s var(--ease), opacity .15s; animation: slot-pop .45s var(--ease) both; }
.native-slot:hover { transform: scale(1.18); opacity: 1; position: relative; z-index: 2; }
.native-slot.preserved { opacity: .35; }
.native-slot.selected { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); position: relative; z-index: 3; }
@keyframes slot-pop { from { transform: scale(.4); opacity: 0; } }

/* ── responsive & motion ──────────────────────────────────────────────── */
@media (max-width: 1100px) { html[data-design="graphite"] .port-field select { width: 130px; } }
@media (max-width: 760px) {
  .monitor-viz-top { grid-template-columns: minmax(0, 1fr); } .monitor-counters { justify-content: flex-start; }
  html[data-design="graphite"] .monitor-head { display: none; } html[data-design="graphite"] .monitor-row { grid-template-columns: 70px 40px minmax(0, 1fr); } .monitor-row :is(.monitor-ch, .monitor-source, .hex) { display: none; }
  .transfer-flow svg { height: 90px; }
  html[data-design="graphite"] .selected-file { grid-template-columns: minmax(0, 1fr) auto; } .send-barcode { display: none; }
}
@media (prefers-reduced-motion: reduce) { .studio-switch.is-on, .transfer-flow .packets circle, .native-slot, .monitor-row, .instrument-meter-bar i, .item-size i { animation: none !important; } }

/* ── Patches & Guide ──────────────────────────────────────────────────── */
html[data-design="graphite"] .patch-heading { display: flex; justify-content: flex-end; padding: 0; margin: 0 0 10px; background: none; box-shadow: none; }
html[data-design="graphite"] .patch-heading::before, html[data-design="graphite"] .patch-heading::after { display: none; }
html[data-design="graphite"] .patch-explainer { font-size: 12px; color: var(--ink-faint); }
.patch-card .viz-barcode { height: 40px; margin-bottom: 4px; }
.guide-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.guide-step { position: relative; display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 14px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--line), var(--raise); overflow: hidden; }
.guide-step::after { content: ""; position: absolute; top: 38px; right: -14px; width: 28px; height: 2px; background: linear-gradient(90deg, var(--line-3), transparent); }
.guide-step:last-child::after { display: none; }
.guide-step-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--hot); }
.guide-step:nth-child(2) .guide-step-icon { background: rgba(95,208,255,.12); color: var(--cool); } .guide-step:nth-child(3) .guide-step-icon { background: rgba(126,226,168,.12); color: var(--ok); } .guide-step:nth-child(4) .guide-step-icon { background: rgba(180,156,255,.12); color: var(--vio); }
.guide-step-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.guide-step b { font: 600 11px var(--mono); color: var(--ink-faint); } .guide-step h3 { margin: 0; font-size: 17px; } .guide-step p { margin: 0; font-size: 12.5px; color: var(--ink-dim); }
.guide-more { margin-bottom: 16px; } .guide-more > summary { cursor: pointer; padding: 12px 16px; border-radius: 12px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--line); font-weight: 600; list-style: none; }
.guide-more > summary::-webkit-details-marker { display: none; } .guide-more > summary::after { content: " ▾"; color: var(--ink-faint); } .guide-more[open] > summary { margin-bottom: 14px; }
.instrument-card.generic-card::before { content: ""; display: block; height: 132px; margin: 0 -18px 4px; background: radial-gradient(70% 80% at 50% 20%, rgba(255,138,76,.12), transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 60'%3E%3Cg fill='none' stroke-width='4' stroke-linecap='round'%3E%3Ccircle cx='22' cy='30' r='13' stroke='%23303035'/%3E%3Ccircle cx='61' cy='30' r='13' stroke='%23303035'/%3E%3Ccircle cx='100' cy='30' r='13' stroke='%23303035'/%3E%3Ccircle cx='139' cy='30' r='13' stroke='%23303035'/%3E%3Cpath d='M13 39a13 13 0 0 1 18-18' stroke='%23d2d2d8'/%3E%3Cpath d='M52 39a13 13 0 1 1 18 0' stroke='%23ff8a4c'/%3E%3Cpath d='M91 39a13 13 0 0 1 9-22' stroke='%23d2d2d8'/%3E%3Cpath d='M130 39a13 13 0 0 1 2-21' stroke='%23d2d2d8'/%3E%3C/g%3E%3C/svg%3E") center / 62% auto no-repeat, var(--surface-0); border-bottom: 1px solid var(--line); }
@media (max-width: 1100px) { .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .guide-steps { grid-template-columns: minmax(0, 1fr); } .guide-step::after { display: none; } }

/* ── Sounds & banks overhaul ──────────────────────────────────────────── */
html[data-design="graphite"] .native-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; }
html[data-design="graphite"] .native-toolbar .native-tabs { margin-right: auto; }
html[data-design="graphite"] .native-status { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 14px; padding: 6px 12px; border-radius: 99px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--line); font: 500 12px var(--sans); color: var(--ink-dim); }
html[data-design="graphite"] .native-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
html[data-design="graphite"] .native-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
html[data-design="graphite"] .native-bank-list { position: sticky; top: calc(var(--topbar-h) + 14px); display: grid; gap: 8px; padding: 14px; border-radius: 14px; }
html[data-design="graphite"] .native-bank-list h3 { margin: 0; font: 600 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
html[data-design="graphite"] .native-bank-list > div { display: grid; gap: 8px; }
html[data-design="graphite"] .native-bank { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%; padding: 10px; border-radius: 11px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
html[data-design="graphite"] .native-bank:hover { transform: translateY(-2px); background: var(--surface-3); }
html[data-design="graphite"] .native-bank.selected { box-shadow: 0 0 0 1.5px var(--hot), 0 0 0 5px var(--accent-soft); background: var(--surface-3); }
.native-bank .viz-barcode { grid-row: 1 / 3; width: 58px; height: 38px; gap: 1px; overflow: hidden; }
html[data-design="graphite"] .native-bank strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-design="graphite"] .native-bank small { font-size: 11px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-design="graphite"] .native-receive { border-radius: 14px; margin-bottom: 14px; }
html[data-design="graphite"] .native-receive > summary { display: flex; align-items: center; gap: 10px; font-weight: 600; }
html[data-design="graphite"] .native-receive > summary::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: rgba(95,208,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fd0ff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 4v11m-5-5 5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / 15px no-repeat; }
.native-empty { display: grid; justify-items: center; gap: 14px; padding: 36px 24px 40px; border-radius: 16px; background: radial-gradient(90% 70% at 50% 0%, rgba(255,138,76,.08), transparent 70%), var(--surface-1); box-shadow: 0 0 0 1px var(--line); text-align: center; }
.native-empty h2 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.02em; } .native-empty p { margin: 0; color: var(--ink-dim); max-width: 520px; }
.native-empty-grid { display: grid; grid-template-columns: repeat(16, 22px); gap: 4px; }
.native-empty-grid i { width: 22px; height: 22px; border-radius: 5px; background: var(--surface-3); animation: ghost 2.4s var(--ease) 2; }
.native-empty-grid i:nth-child(7n) { background: rgba(255,138,76,.35); } .native-empty-grid i:nth-child(5n) { background: rgba(95,208,255,.3); } .native-empty-grid i:nth-child(11n) { background: rgba(180,156,255,.32); }
@keyframes ghost { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.native-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
html[data-design="graphite"] .native-bank-head { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; align-items: end; }
html[data-design="graphite"] .native-bank-head .native-field:first-child { font-size: 0; }
html[data-design="graphite"] .native-bank-head .native-field:first-child input { height: 46px; padding: 0 4px; border: 0; background: transparent; box-shadow: none; font: 700 26px var(--sans); letter-spacing: -.02em; color: var(--ink); }
html[data-design="graphite"] .native-bank-head .native-field:first-child input:focus { box-shadow: inset 0 -2px 0 var(--hot); }
.native-bank-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 10px; }
.native-intact { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(126,226,168,.12); color: var(--ok); font-size: 12px; font-weight: 600; }
.native-intact::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; }
.native-intact.dirty { background: var(--accent-soft); color: var(--hot); }
.native-bank-stats { margin: 0; font: 11.5px var(--mono); color: var(--ink-faint); }
html[data-design="graphite"] .native-main > .native-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
html[data-design="graphite"] .native-main > .native-actions .button { min-height: 32px; font-size: 12px; }
.native-notes { margin-bottom: 12px; } .native-notes > summary { cursor: pointer; font-size: 12px; color: var(--ink-faint); list-style: none; } .native-notes > summary::-webkit-details-marker { display: none; } .native-notes > summary::before { content: "＋ "; } .native-notes[open] > summary::before { content: "− "; }
html[data-design="graphite"] .native-slot-grid { grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 4px; }
html[data-design="graphite"] .native-slot { border-radius: 6px; }
.native-slot-caption { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; }
.native-slot-caption i { width: 10px; height: 10px; border-radius: 3px; } .native-slot-caption b { font: 600 12px var(--mono); color: var(--ink-faint); } .native-slot-caption span { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); }
html[data-design="graphite"] .native-sound-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 14px; }
html[data-design="graphite"] .native-sounds { border-radius: 14px; }
html[data-design="graphite"] .native-sound { display: grid; grid-template-columns: 8px 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 7px 10px; border-radius: 9px; }
html[data-design="graphite"] .native-sound .native-cat { grid-row: 1 / 3; width: 8px; height: 26px; border-radius: 3px; }
html[data-design="graphite"] .native-sound .native-index { grid-row: 1 / 3; font: 11px var(--mono); color: var(--ink-faint); }
html[data-design="graphite"] .native-sound small { grid-column: 3; font-size: 10.5px; color: var(--ink-faint); }
html[data-design="graphite"] .native-sound.selected { background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--hot); }
.native-sound-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(220px, 1fr); gap: 14px; align-items: stretch; margin-bottom: 12px; }
.native-sound-hero > .native-oled { margin: 0; }
.viz-fingerprint { display: grid; align-content: center; gap: 4px; padding: 10px 14px; border-radius: 14px; background: var(--surface-1); box-shadow: 0 0 0 1px var(--line); }
.viz-radar { width: 100%; height: 170px; }
.viz-radar .ring { fill: none; stroke: var(--line-2); } .viz-radar .shape { fill: rgba(255,138,76,.2); stroke: var(--hot); stroke-width: 1.8; stroke-linejoin: round; animation: radar-in .5s var(--ease) both; transform-origin: 150px 92px; }
.viz-radar text { fill: var(--ink-faint); font: 10px var(--mono); }
@keyframes radar-in { from { transform: scale(.2); opacity: 0; } }
.viz-env-label { font: 600 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.viz-env { width: 100%; height: 62px; } .viz-env path { fill: rgba(95,208,255,.12); stroke: var(--cool); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html[data-design="graphite"] .native-factory-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
html[data-design="graphite"] .native-factory-card { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; transition: transform .25s var(--ease), box-shadow .25s; }
html[data-design="graphite"] .native-factory-card:hover { transform: translateY(-3px); }
.native-factory-card .viz-barcode { height: 46px; }
.native-factory-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.native-factory-more { display: grid; gap: 4px; } .native-factory-more .native-help { margin: 0; font-size: 11px; line-height: 1.4; color: var(--ink-faint); } .native-factory-more a { font-size: 12px; }
@media (max-width: 1300px) { html[data-design="graphite"] .native-slot-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); } .native-sound-hero { grid-template-columns: minmax(0, 1fr); } html[data-design="graphite"] .native-sound-layout { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 1100px) { html[data-design="graphite"] .native-layout { grid-template-columns: minmax(0, 1fr); } html[data-design="graphite"] .native-bank-list { position: static; } html[data-design="graphite"] .native-slot-grid { grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); } }
@media (max-width: 760px) { html[data-design="graphite"] .native-sound-layout, html[data-design="graphite"] .native-bank-head { grid-template-columns: minmax(0, 1fr); } .native-empty-grid { grid-template-columns: repeat(8, 22px); } .native-empty-grid i:nth-child(n+33) { display: none; } }
@media (prefers-reduced-motion: reduce) { .native-empty-grid i, .viz-radar .shape { animation: none !important; } }
html[data-design="graphite"] .native-editor > .native-warning, html[data-design="graphite"] .native-main > .native-warning { margin: 0 0 6px; padding: 7px 12px; border: 0; border-left: 3px solid var(--warn); border-radius: 6px; background: rgba(255,181,71,.06); box-shadow: none; color: #e9c58a; font-size: 12px; }
.viz-radar text { font-weight: 500; letter-spacing: 0; }
