:root{color-scheme:dark;--bg:#080e18;--panel:#111b2a;--line:#27354b;--text:#e4f5f6;--muted:#82949d;--cyan:#4bebd6;--violet:#ad99ff}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 80% 0%,#12233b 0%,var(--bg) 43%);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text)}
.shell{max-width:1190px;padding:24px 18px 65px;margin:auto}
.masthead{display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:29px}
.kicker,.label,h2,.hint,.detail,button,.filebutton,.axis,.metric small{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.05em}
.kicker{color:var(--cyan);font-size:12px;letter-spacing:.2em}
h1{font-size:clamp(52px,9vw,96px);font-weight:200;letter-spacing:-.075em;line-height:1;margin:13px 0 8px}
h1 span{color:var(--cyan)}
.masthead p{margin:0;color:#9db5bf}
.label{border:1px solid #35645f;color:var(--cyan);border-radius:2px;padding:8px 10px;white-space:nowrap;font-size:11px}
.panel{padding:24px 26px;margin:18px 0;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,#121f30,#0f1826);box-shadow:0 15px 40px #0002}
.sectionhead{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
h2{font-size:15px;letter-spacing:.1em;margin:0;font-weight:600}
.hint{color:var(--muted);font-size:11px}
.source-row,.controls,.actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.source-row{margin-bottom:20px}
.filebutton,button{cursor:pointer;background:#213e49;border:1px solid #406a70;color:#eafffd;border-radius:6px;padding:11px 14px;font-size:12px;font-weight:650}
button:hover:not(:disabled),.filebutton:hover{border-color:var(--cyan);background:#225b5e}
button:disabled{opacity:.35;cursor:not-allowed}
button.secondary{background:#182436;border-color:#374a60;color:#a4c0cd}
.filebutton input{display:none}
.detail{color:#91adba;font-size:12px}
.controls{align-items:end}
.controls label{display:flex;flex-direction:column;gap:7px;font:11px ui-monospace,monospace;color:#a6b9c5}
select{min-width:114px;border:1px solid #354d60;background:#0b1624;color:var(--text);padding:9px;border-radius:5px;font:14px ui-monospace,monospace}
#analyze{margin-left:auto;background:#166a68;border-color:#269a96}
canvas{width:100%;height:auto;display:block;background:#08121e;border:1px solid #26394a;border-radius:5px}
.axis,.legend{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:8px}
.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.metric{display:flex;flex-direction:column;border:1px solid #233e4c;background:#0d1926;border-radius:6px;padding:15px;gap:5px}
.metric small{font-size:11px;color:#8baeba}
.metric strong{font-size:clamp(18px,2.8vw,30px);font-family:ui-monospace,monospace;color:var(--cyan);font-weight:500}
.metric span{color:var(--muted);font-size:12px}
.legend{justify-content:start;align-items:center;gap:8px;font-size:12px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--cyan)}
.legend i.violet{background:var(--violet);margin-left:12px}
.export{margin-top:12px}
.export button{font-size:11px;background:#1e2d42;border-color:#46536c}
.status{margin-top:18px;background:#0b1b25;border-left:3px solid var(--cyan);padding:12px 15px;color:#aad3d9;font-family:ui-monospace,monospace}
footer{max-width:950px;margin:25px auto;text-align:center;color:#708894;font-size:12px}
.roll-controls{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px;align-items:end}
.roll-controls label{display:flex;flex-direction:column;gap:7px;color:#a6b9c5;font:11px ui-monospace,monospace}
.roll-controls input,.roll-controls select{min-width:106px;max-width:165px;background:#0b1624;color:var(--text);border:1px solid #354d60;padding:9px;border-radius:5px;font:13px ui-monospace,monospace}
.roll-mix{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:13px 0 17px;color:#a6b9c5;font:11px ui-monospace,monospace}
.roll-mix label{min-width:145px}.roll-mix input{width:190px;accent-color:var(--cyan)}
.roll-mix output{color:var(--cyan)}
.roll-transport{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.roll-scroll{width:100%;max-height:540px;overflow:auto;scrollbar-color:#3f7781 #0c1827;border:1px solid #26394a;border-radius:6px;background:#0b1523}
#pianoRoll{display:block;width:1338px;max-width:none;height:auto;border:0;border-radius:0;touch-action:none;cursor:crosshair}
#pianoRoll:focus{outline:1px solid var(--cyan);outline-offset:-1px}
.fineprint{color:#8aa3ae;font-size:12px;line-height:1.6;margin:13px 0 0}
@media(max-width:750px){.shell{padding:16px 11px 45px}.masthead{display:block}.label{display:inline-block;margin-top:15px}.panel{padding:15px 12px}.sectionhead{align-items:start;flex-direction:column;gap:5px}.metric-grid{grid-template-columns:1fr}#analyze{margin-left:0}.source-row,.controls,.actions{gap:8px}}

/* HFC-00 v0.0.4 — compact performance workspace */
.studio-shell{max-width:1390px;padding-top:13px}
.studio-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:11px}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{display:grid;place-items:center;width:56px;height:46px;border:2px solid var(--cyan);border-radius:9px;font:800 22px ui-monospace,monospace;letter-spacing:-.12em;box-shadow:0 0 20px #4bebd61a}
.brand strong{display:block;font-size:15px;letter-spacing:.12em;line-height:1.4}
.brand small{display:block;color:var(--muted);font:10px ui-monospace,monospace;letter-spacing:.1em}
.local-label{border:1px solid #245c57;padding:7px 10px;border-radius:5px;color:var(--cyan);font:10px ui-monospace,monospace}
.instrument-panel{padding:16px 19px;margin:0;background:#0f1a29;box-shadow:0 16px 42px #0005}
.sample-bar,.transport-bar,.sound-bar,.roll-header,.keyboard-header,.keyboard-actions,.roll-header-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.sample-bar{padding-bottom:12px;border-bottom:1px solid var(--line)}
.sample-bar .detail{flex:1;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filebutton.primary{background:#156e67;border-color:#27b8a7;color:white}
.sample-bar .sample-record{background:#812838;border-color:#c34f62;color:#ffe0e5}
.sample-bar .sample-record.is-recording{background:#d12e4d;color:white;animation:record-pulse 1s ease-in-out infinite alternate}
.guide-source-palette{flex:1 0 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:5px;border-top:1px solid var(--line);padding-top:8px}
.guide-source-palette span{font:700 10px ui-monospace,monospace;color:var(--ap-accent,#70cad0);margin-right:5px}
.guide-source-palette button{font-size:10px;min-height:31px;padding:6px 10px}
.guide-kit-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border:1px solid var(--ap-stroke,#3b6471);padding:10px;margin:8px 0 12px;background:var(--ap-panel,#0d2331)}
.guide-kit-panel strong{font:700 11px ui-monospace,monospace;color:var(--ap-accent,#70cad0)}
.guide-kit-panel p{font-size:11px;margin:5px 0;color:var(--ap-muted,#a5bfc9);max-width:600px}
.guide-kit-panel button{flex:none;font-size:10px}
.pad-scale-source{font:10px ui-monospace,monospace;color:var(--ap-accent,#70cad0);max-width:140px;white-space:normal}
.guide-pattern-action{font-size:10px;}
.transport-bar{padding:12px 0;border-bottom:1px solid var(--line)}
.transport-bar button{min-height:43px}
.transport-bar .record{background:#6e2635;border-color:#b54f5d;color:#ffdbdc}
.transport-bar .record.is-recording{background:#c9314a;color:white;box-shadow:0 0 18px #ef405a44;animation:record-pulse 1s ease-in-out infinite alternate}
@keyframes record-pulse{to{box-shadow:0 0 2px #ef405a33}}
.transport-bar label,.sound-bar>label{display:flex;flex-direction:column;gap:4px;color:#8eacb8;font:10px ui-monospace,monospace;letter-spacing:.06em}
.transport-bar input,.sound-bar select,.sound-bar input[type=number]{border:1px solid #354d60;background:#0b1624;color:var(--text);border-radius:5px;height:36px;padding:6px;font:13px ui-monospace,monospace}
#rollBpm{width:75px}.transport-spacer{flex:1}
.transport-bar .click-option{display:flex;flex-direction:row;align-items:center;gap:5px;white-space:nowrap}
.transport-bar .click-option input{width:16px;height:16px;accent-color:var(--cyan)}
.sound-bar{padding:12px 0;align-items:end}
.sound-bar select{min-width:108px}.sound-bar #trimStart{width:115px}
.sound-bar .roll-mix{margin:0;flex-direction:column;align-items:flex-start;gap:4px}
.sound-bar .roll-mix[hidden]{display:none}
.sound-bar .roll-mix label{font:10px ui-monospace,monospace;color:#8eacb8}
.sound-bar .roll-mix input{width:145px;height:25px;margin:0}
.roll-header,.keyboard-header{justify-content:space-between;margin:8px 0 11px;gap:11px}
.roll-header h2,.keyboard-header h2{color:var(--cyan);font-size:15px;letter-spacing:.14em}
.roll-header-actions button,.keyboard-actions button{padding:8px 10px;font-size:11px}
.roll-scroll{max-height:min(49vh,560px);overscroll-behavior:contain;touch-action:pan-x pan-y}
.instrument-panel.keys-focus .roll-scroll,.instrument-panel.keys-focus .roll-under,.instrument-panel.keys-focus .edit-toolbar{display:none}
.roll-stage{position:relative;min-width:max-content}
.roll-stage #pianoRoll{width:100%;height:100%;max-width:none}
.roll-playhead{position:absolute;z-index:3;top:0;bottom:0;width:2px;pointer-events:none;background:#ffce75;box-shadow:0 0 6px #ffce75a0}
.roll-playhead[hidden]{display:none}
.edit-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:4px 0 10px}
.edit-toolbar button{padding:7px 9px;font-size:11px}
.edit-toolbar button.active{border-color:#ad99ff;color:#e4dfff;background:#433967}
.edit-toolbar .detail{font-size:10px}
.roll-scroll.scroll-mode #pianoRoll{touch-action:auto;cursor:grab}
.roll-scroll.edit-mode #pianoRoll{touch-action:none;cursor:crosshair}
.roll-scroll{position:relative}
.roll-under,.record-info{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 14px;font:11px ui-monospace,monospace;color:#92aeb7}
.keyboard-panel{border:1px solid #2c465a;border-radius:9px;padding:13px;margin-top:13px;background:#0b1523}
.keyboard-header{margin:0 0 12px}
.keyboard-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-color:#3f7781 #0c1827;touch-action:pan-x;overscroll-behavior:contain;padding-bottom:4px}
.keyboard-surface{position:relative;display:flex;width:max(100%, 700px);height:138px;isolation:isolate}
.piano-key{border:1px solid #718a96;min-width:0;border-radius:0 0 6px 6px;padding:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.white-key{position:relative;flex:1;background:linear-gradient(180deg,#d9e6e9 0%,#fbffff 78%,#a5bac3 100%);color:#405968;display:flex;align-items:end;justify-content:center;padding-bottom:8px;font:11px ui-monospace,monospace}
.black-key{position:absolute;top:0;z-index:2;width:4.1%;height:57%;transform:translateX(-50%);background:linear-gradient(160deg,#242f40,#07121f 75%);border-color:#445466;border-radius:0 0 4px 4px;box-shadow:0 3px 5px #0008}
.piano-key.pressed.white-key{background:linear-gradient(#4bebd6,#25a397);color:#042a32}
.piano-key.pressed.black-key{background:#996ef2;border-color:#cab6ff}
.keyboard-actions{gap:7px}.keyboard-actions #octaveLabel{min-width:58px;text-align:center}
.record-info{margin:9px 0 0;color:#b8cad3}
#recordInfo{color:#f0c08b}
.status{font-size:12px;margin-top:12px;border-radius:5px}
.lab-details{margin-top:14px}
.lab-details summary{cursor:pointer;list-style:none;padding:14px 18px;border:1px solid var(--line);border-radius:7px;background:#101b2a;color:#c7e3e6;font:12px ui-monospace,monospace;letter-spacing:.08em}
.lab-details summary:hover{border-color:#4bebd6}
.lab-details summary::-webkit-details-marker{display:none}
.lab-panel{margin:10px 0 0;box-shadow:none}
.lab-subhead{margin-top:25px}
.lab-panel .controls{margin-bottom:14px}
.lab-panel .controls label{display:flex;flex-direction:column;gap:6px;color:#9cbdc8;font:11px ui-monospace,monospace}
@media(max-width:800px){
  .studio-shell{padding:9px 8px 30px}
  .instrument-panel{padding:11px 9px}
  .sample-bar{gap:6px}
  .transport-bar{gap:7px}
  .transport-bar button{min-height:45px}
  .transport-spacer{display:none}
  .sound-bar{gap:7px}
  .sound-bar>label{flex:1;min-width:95px}
  .sound-bar select,.sound-bar input[type=number]{width:100%;min-width:0}
  .roll-header,.keyboard-header{align-items:flex-start}
  .roll-scroll{max-height:40vh;min-height:220px}
  .keyboard-surface{width:560px;height:128px}
  .roll-under{font-size:10px}
  .keyboard-panel{padding:9px}
  .brand strong{font-size:13px}
  .local-label{display:none}
  .lab-panel{padding:13px}
}
@media(max-width:410px){
  .sample-bar .detail{flex-basis:100%;order:4}
  .transport-bar button{padding:10px 11px}
  .roll-header-actions{gap:5px}
  .roll-header-actions button{padding:7px 8px}
  .keyboard-surface{width:490px;height:116px}
}

/* ────────────────────────────────────────────────────────────
 * hfcNAV_01 · separated workspaces, retained HFC-00 DSP
 * ──────────────────────────────────────────────────────────── */
[hidden]{display:none!important}
.nav-shell{max-width:1660px;padding:16px clamp(10px,2.1vw,32px) 30px}
.nav-brand-head{margin:0 0 16px;min-height:55px}
.nav-brand-head .brand-mark{width:48px;height:43px;font-size:18px}
.brand-trailing{display:flex;align-items:center;gap:9px}
.mobile-menu-trigger,.nav-close{display:none}
.workspace-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;align-items:start}
.workspace-nav{position:sticky;top:12px;background:#0e1827;border:1px solid #2a3c50;border-radius:12px;padding:15px 10px;min-height:calc(100vh - 110px);display:flex;flex-direction:column;gap:3px;box-shadow:0 14px 30px #0003}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:1px 9px 15px;border-bottom:1px solid #283a4e}
.tiny-kicker,.sidebar-group-label,.transport-heading,.view-kicker,.workspace-pill,.transport-note,.settings-title,.pad-preview-bar,.sidebar-sound{font:10px/1.5 ui-monospace,Consolas,monospace;letter-spacing:.1em}
.tiny-kicker{color:#76a19f}
.sidebar-group-label{color:#6e8a9b;margin:16px 9px 5px;font-weight:650}
.workspace-link{width:100%;padding:10px 9px;display:flex;align-items:center;gap:10px;min-height:50px;text-align:left;border:1px solid transparent;background:transparent;color:#b8cdd7;border-radius:8px;letter-spacing:0;box-shadow:none}
.workspace-link:hover:not(:disabled){background:#192b3d;border-color:#31546a}
.workspace-link.is-active,.workspace-link.is-active:hover{background:#153b45;border-color:#2a9d94;color:#eafffd;box-shadow:inset 3px 0 0 #4bebd6}
.nav-icon{font:24px/1.1 ui-monospace,monospace;width:26px;min-width:26px;text-align:center;color:#83c8c3}
.nav-item-text{display:flex;flex-direction:column;gap:2px}
.nav-item-text strong{font-size:11px;letter-spacing:.08em;line-height:1.2}
.nav-item-text small{font-size:9px;font-weight:500;color:#85a5b2;letter-spacing:.025em}
.sidebar-bottom{margin-top:auto;display:flex;flex-direction:column;gap:8px;border-top:1px solid #273b4e;padding:15px 9px 4px;overflow-wrap:anywhere}
.sidebar-sound{color:#d4e9e9;letter-spacing:.04em}
.workspace-main{min-width:0}
.workspace-heading{min-height:84px;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:2px 4px 13px}
.workspace-heading h1{font-size:clamp(25px,3vw,34px);font-weight:600;letter-spacing:-.045em;line-height:1.1;margin:4px 0 6px}
.workspace-heading p{color:#90aeba;font-size:12px;margin:0}
.workspace-pill{white-space:nowrap;border:1px solid #356861;color:#8ee3d6;border-radius:5px;padding:6px 9px}
.workspace-transport{margin:0 0 15px;padding:11px 16px 10px;background:#101d2b;box-shadow:none}
.transport-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#79b5bc;margin:0 0 5px}
#transportSoundName{color:#accfd1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58%}
.workspace-transport .transport-bar{padding:5px 0 6px;border:none;gap:8px}
.workspace-transport .transport-bar button{min-height:37px;padding:9px 13px}
.workspace-transport .transport-bar label{flex-direction:row;align-items:center;gap:7px}
.transport-note{color:#627f91;font-size:9px;letter-spacing:.02em}
.workspace-view{background:#101a29;border:1px solid #2b3c51;border-radius:12px;padding:clamp(12px,2vw,22px);min-height:400px;box-shadow:0 15px 36px #0003}
.workspace-card-title{padding:0 0 19px;border-bottom:1px solid #23384a;margin-bottom:17px}
.workspace-card-title h2{font-size:19px;margin:3px 0 6px;color:#e3f5f5;letter-spacing:.085em}
.workspace-card-title p{color:#97afbb;font-size:12px;margin:0}
.view-kicker{color:#58b9ae}
.workspace-view .panel{margin:0;box-shadow:none}
.capture-hero{border:1px solid #2c4d58;background:linear-gradient(130deg,#153445,#102334);border-radius:10px;padding:22px;display:flex;align-items:center;gap:20px;margin-bottom:18px;min-height:140px}
.capture-hero-icon{border:1px solid #298e8c;border-radius:50%;width:76px;height:76px;flex:0 0 76px;display:grid;place-items:center;color:#55ebd1;background:#0a2431;font-size:43px;box-shadow:0 0 25px #21b6a22a}
.capture-hero strong{font:700 14px ui-monospace,monospace;color:#d8f9ef;letter-spacing:.06em}
.capture-hero p{max-width:620px;color:#acc5d0;font-size:12px;margin:9px 0 0}
.workspace-view .sample-bar{display:flex;align-items:center;gap:9px;padding:11px 0 14px;border:0}
.workspace-view .sample-bar .detail{flex-basis:100%;font-size:12px;white-space:normal}
.workspace-hint{padding:12px 14px;border-left:3px solid #377e89;background:#12273a;border-radius:0 6px 6px 0;font-size:12px;color:#9db7c6;margin:15px 0}
.workspace-hint strong{color:#d3eef0}
.workspace-quick-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0 3px}
.workspace-quick-actions button{padding:10px 12px}
.nav-spectral-panel{background:transparent;border:0;padding:0}
.nav-spectral-panel .controls{margin-bottom:20px}
.nav-spectral-panel canvas{max-width:100%}
.live-keys-panel{background:transparent;border:0;padding:0}
.settings-title{display:flex;justify-content:space-between;gap:12px;color:#7ce2d8;margin-bottom:8px;flex-wrap:wrap}
.settings-title span{color:#7b9aa5}
.live-keys-panel .sound-bar{padding:10px 12px 14px;border:1px solid #2c4255;border-radius:8px;background:#0d1a2a;gap:12px}
.live-keys-panel .keyboard-panel{margin-top:18px;padding:15px}
.live-keys-panel .keyboard-surface{height:190px}
.roll-only-panel{background:transparent;border:0;padding:0}
.roll-only-panel .roll-header{margin:0 0 14px}
.roll-only-panel .edit-toolbar{padding-bottom:8px;border-bottom:1px solid #2d4052}
.roll-only-panel .roll-scroll{max-height:min(62vh,720px)}
.roll-only-panel .roll-under{margin-top:13px}
.library-current{display:flex;align-items:start;gap:20px;min-height:177px;padding:25px;background:linear-gradient(110deg,#16333c,#111f31)}
.library-current-icon{display:grid;place-items:center;flex:0 0 78px;width:78px;height:78px;background:#123a40;border:1px solid #2fa89c;border-radius:14px;font-size:40px;color:#68e0d4}
.library-current-text{min-width:0}
.library-current-text h3{margin:8px 0;font-size:23px;overflow-wrap:anywhere}
.library-current-text p{font-size:12px;color:#91b0bd;margin:0 0 12px}
.library-chips{display:flex;flex-wrap:wrap;gap:7px}
.library-chips span{font:10px ui-monospace,monospace;color:#c3eeee;border:1px solid #355b5e;border-radius:4px;padding:6px 8px;background:#103038}
.pad-preview{padding:18px 22px;background:#0b1623}
.pad-preview-bar{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#d7eeee;margin-bottom:14px}
.pad-preview-bar span{color:#91a6b4}
.pad-preview-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;max-width:560px;margin:0 auto 18px}
.pad-preview-grid div{aspect-ratio:1;display:grid;place-items:center;background:linear-gradient(135deg,#294c61,#182d44);border:1px solid #467088;border-radius:9px;color:#a3c5d5;font:600 clamp(12px,2vw,18px) ui-monospace,monospace;user-select:none}
.pad-preview-grid div:nth-child(5n + 1){background:linear-gradient(135deg,#226156,#173c44);border-color:#347f74}
.pad-preview-description{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:10px 0}
.pad-preview-description>div{background:#102535;border:1px solid #2b4356;border-radius:7px;padding:11px 13px}
.pad-preview-description strong{font:700 11px ui-monospace,monospace;color:#65d6ca}
.pad-preview-description p{font-size:12px;color:#9bb6c2;margin:6px 0 0}
.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.export-card{display:flex;flex-direction:column;gap:9px;min-height:245px;background:#0d1d2b}
.export-card-icon{font-size:35px;color:#5fded1}
.export-card h3,.export-research h3{margin:0;font:700 14px ui-monospace,monospace;letter-spacing:.08em}
.export-card p{font-size:12px;color:#9bb8c5;margin:0 0 auto;line-height:1.6}
.export-card button{align-self:flex-start}
.export-research{margin-top:16px!important;background:#0d1d2b}
.export-research .actions{margin-top:17px}
#slotStatus{}.workspace-main .status{margin:16px 0 0}
.nav-backdrop{display:none}
@media(max-width:960px){
 .workspace-layout{grid-template-columns:174px minmax(0,1fr);gap:10px}
 .nav-shell{padding:10px 9px 24px}
 .workspace-nav{padding:10px 6px}
 .workspace-link{padding:10px 6px;gap:6px}
 .nav-item-text strong{font-size:10px}
 .workspace-view{padding:13px}
 .workspace-transport{padding:9px 11px}
}
@media(max-width:680px){
 .nav-shell{padding:9px 8px 30px}
 .nav-brand-head{margin-bottom:11px}
 .brand-mark{width:42px!important;height:38px!important}
 .brand small{font-size:8px;max-width:170px}
 .mobile-menu-trigger{display:block;padding:10px 12px;min-height:42px}
 .nav-close{display:block;font-size:24px;min-height:35px;padding:0 10px}
 .workspace-layout{display:block}
 .workspace-nav{position:fixed;z-index:52;left:0;top:0;bottom:0;min-height:0;width:min(290px,83vw);border-radius:0 12px 12px 0;transform:translateX(-103%);transition:transform .16s ease;overflow-y:auto;box-shadow:15px 0 40px #0007;padding:17px 12px}
 .workspace-nav.is-open{transform:translateX(0)}
 .nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:51;background:#000a}
 .workspace-link{min-height:54px;padding:9px 12px;gap:10px}
 .nav-item-text strong{font-size:12px}
 .nav-item-text small{font-size:10px}
 .workspace-heading{min-height:75px}
 .workspace-heading h1{font-size:27px}
 .workspace-heading p{font-size:11px}
 .workspace-view{padding:12px 10px;min-height:60vh}
 .workspace-transport .transport-bar{gap:6px}
 .workspace-transport .transport-bar button{padding:9px 9px;font-size:11px}
 .transport-note{display:none}
 .capture-hero{padding:14px;gap:13px;min-height:115px}
 .capture-hero-icon{flex-basis:47px;width:47px;height:47px;font-size:27px}
 .capture-hero strong{font-size:11px}
 .capture-hero p{font-size:11px}
 .live-keys-panel .sound-bar{gap:9px}
 .live-keys-panel .sound-bar>label{flex:1 1 130px}
 .live-keys-panel .keyboard-surface{height:142px}
 .roll-only-panel .roll-scroll{max-height:58vh}
 .library-current{gap:12px;padding:15px}
 .library-current-icon{flex:0 0 50px;width:50px;height:50px;font-size:27px}
 .library-current-text h3{font-size:18px}
 .export-grid{grid-template-columns:1fr}
 .export-card{min-height:190px}
 .pad-preview{padding:12px}
 .pad-preview-grid{gap:5px}
 .pad-preview-grid div{border-radius:6px}
 .pad-preview-description{grid-template-columns:1fr}
 .workspace-view .sample-bar .detail{min-width:0}
}
@media(max-width:390px){
 .nav-brand-head .brand strong{font-size:11px}
 .brand small{max-width:140px}
 .workspace-transport .transport-bar label{font-size:9px}
 .workspace-transport .transport-bar #rollBpm{width:62px}
 .workspace-pill{display:none}
}
@media(prefers-reduced-motion:reduce){.workspace-nav{transition:none}}

/* PAD_01 · native 5x5 multitouch surface, no external UI framework. */
.pad-workbench{padding:19px 24px!important;background:linear-gradient(130deg,#0c1b2b,#101d31)!important}
.pad-topline,.pad-editor-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;font:12px ui-monospace,monospace;letter-spacing:.065em;color:#b2e9e7}
.pad-controls,.pad-performance-tools{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:14px 0}
.pad-controls>label,.pad-performance-tools>label:not(.pad-repeat-toggle){display:flex;flex-direction:column;gap:6px;font:10px ui-monospace,monospace;color:#91b5c0}
.pad-controls select,.pad-performance-tools select{font-size:12px;min-width:125px;max-width:225px}
.pad-performance-tools{padding:11px 10px;border:1px solid #294454;border-radius:7px;background:#0c1a29;align-items:center}
.pad-repeat-toggle{color:#7edbd0;display:flex;align-items:center;gap:7px;font:12px ui-monospace,monospace}
.pad-repeat-toggle input{accent-color:var(--cyan);width:18px;height:18px}
.performance-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(5px,1.2vw,11px);max-width:680px;margin:22px auto 15px;touch-action:pan-y}
.performance-pad{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;width:100%;aspect-ratio:1/1;padding:8px 3px;border:1px solid #4a7786;border-bottom:4px solid #183a4a;border-radius:10px;background:linear-gradient(160deg,#32657c,#173b55 78%);color:#e6ffff;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:0 7px 16px #0004;overflow:hidden}
.performance-pad:nth-child(5n+1){background:linear-gradient(160deg,#27746a,#153f50 85%);border-color:#448c80;border-bottom-color:#1b4f4a}
.performance-pad.is-selected{outline:2px solid #76e9c6;outline-offset:1px}
.performance-pad.is-held{transform:translateY(2px);border-bottom-width:2px;background:linear-gradient(160deg,#62d6b8,#1c918f 86%)!important;box-shadow:0 0 24px #53dbb644}
.performance-pad.is-empty{opacity:.62}
.performance-pad .pad-number{position:absolute;top:8px;left:9px;font:10px ui-monospace,monospace;color:#bdd2df;opacity:.8}
.performance-pad .pad-name{font:700 clamp(10px,1.4vw,15px) ui-monospace,monospace;text-align:center;letter-spacing:-.02em;line-height:1.15;overflow-wrap:anywhere;max-width:95%}
.performance-pad .pad-indicator{position:absolute;right:7px;top:7px;width:5px;height:5px;border-radius:50%;background:#a9f3c6;opacity:.5}
.performance-pad.is-empty .pad-indicator{background:#7b96a6}
.pad-edit-section{border:1px solid #2c4659;border-radius:10px;background:#0a1724;padding:16px;margin-top:16px}
.pad-edit-section[hidden],.pad-scale-control[hidden],.pad-kit-control[hidden]{display:none!important}
.pad-edit-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 0}
.pad-edit-actions .filebutton{font-size:11px;display:inline-flex;align-items:center}
.pad-edit-section .fineprint{line-height:1.55}
.workspace-main footer{display:flex;flex-direction:column;align-items:center;gap:4px}
.workspace-main footer strong{color:#9ed9d2;font-size:12px;font-weight:650;letter-spacing:.06em}
.workspace-main footer span{color:#6c8794;font-size:10px}
@media(max-width:650px){
 .pad-workbench{padding:12px 9px!important}
 .pad-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .pad-controls>label{min-width:0}
 .pad-controls select{width:100%;min-width:0;font-size:10px;padding:9px 4px}
 .performance-grid{gap:5px;margin:15px 0 12px;max-width:100%}
 .performance-pad{border-radius:6px;border-bottom-width:3px;padding:3px 2px;gap:5px;min-height:53px}
 .performance-pad .pad-name{font-size:clamp(9px,2.7vw,13px);letter-spacing:-.04em}
 .performance-pad .pad-number{font-size:8px;left:4px;top:4px}
 .performance-pad .pad-indicator{right:4px;top:4px;width:4px;height:4px}
 .pad-performance-tools{gap:8px;padding:9px 7px}
 .pad-performance-tools .detail{font-size:10px}
 .pad-edit-section{padding:11px}
 .pad-edit-actions button,.pad-edit-actions .filebutton{padding:10px 7px;font-size:10px}
}

/* PAD_02 layout and direct record-to-pad */
.performance-grid{grid-template-columns:repeat(var(--pad-columns,4),minmax(0,1fr));max-width:620px}
.performance-grid.is-classic{max-width:600px}
.performance-grid.is-classic .performance-pad{border-radius:12px}
.performance-grid .performance-pad[hidden]{display:none!important}
.performance-grid.is-classic .performance-pad:nth-child(5n+1){background:linear-gradient(160deg,#32657c,#173b55 78%);border-color:#4a7786;border-bottom-color:#183a4a}
.performance-grid.is-classic .performance-pad:nth-child(4n+1){background:linear-gradient(160deg,#27746a,#153f50 85%);border-color:#448c80;border-bottom-color:#1b4f4a}
.pad-capture-indicator{font:11px/1.6 ui-monospace,Consolas,monospace;color:#9dcbcd;background:#102a32;border-left:3px solid #53c6bb;border-radius:4px;padding:10px 13px;margin-top:12px}
.pad-capture-indicator.is-recording{border-color:#ff636e;background:#3a1c27;color:#ffcdce}
.pad-capture-indicator.is-working{border-color:#deb25b;background:#38301d;color:#ffe4aa}
#padRecord.is-recording{background:#ec4556;box-shadow:0 0 0 2px #ff7b7b}
@media(max-width:650px){.performance-grid.is-classic{gap:7px}.performance-grid.is-classic .performance-pad{min-height:68px;border-radius:8px}.performance-grid.is-classic .performance-pad .pad-name{font-size:clamp(11px,3.1vw,15px)}}

/* PAD_03 · Sound Library, direct naming, independent per-pad playback tuning */
.pad-name-editor{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0;padding:12px;background:#112a35;border:1px solid #2b5260;border-radius:8px}
.pad-name-editor label{font:700 10px ui-monospace,monospace;color:#82d9d2;letter-spacing:.08em}
.pad-name-editor input{background:#091826;color:#eefafa;border:1px solid #456476;border-radius:5px;padding:10px 12px;min-width:150px;flex:1;font-size:14px}
.pad-name-editor button{min-height:38px}
.pad-sound-controls{margin:14px 0;border:1px solid #31515e;border-radius:8px;padding:15px;background:#0b2030}
.pad-sound-head,.library-browser-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;color:#85e1d4;font:700 11px ui-monospace,monospace;letter-spacing:.07em}
.pad-tune-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:15px;margin:16px 0}
.pad-tune-grid label{display:flex;flex-direction:column;gap:9px;color:#a9c6d2;font:10px ui-monospace,monospace;letter-spacing:.06em}
.pad-tune-grid label output{color:#b9f6eb;font-size:13px}
.pad-tune-grid input[type=range]{width:100%;accent-color:#48dfcf;cursor:pointer}
.pad-tune-grid .pad-sample-gain input[type=range]{accent-color:#ffd96c}
.pad-tune-grid .pad-sample-gain output{color:#ffd96c}
.pad-tune-grid label.pad-reverse-control{flex-direction:row;align-items:center;white-space:nowrap;font-size:12px}
.library-browser{margin-top:16px;padding:17px;background:#0e2031}
.library-entries{display:grid;gap:10px;margin-top:16px}
.library-item{border:1px solid #2c445a;padding:12px;border-radius:8px;background:#122a3b;display:flex;justify-content:space-between;align-items:center;gap:15px}
.library-item.is-active{border-color:#43c9bb}
.library-item-main{min-width:0;display:flex;flex-direction:column;gap:6px}
.library-item-main strong{font-size:14px;overflow-wrap:anywhere;color:#e7faf7}
.library-item-main small{font:10px ui-monospace,monospace;color:#8db6c1}
.library-item-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.library-item-actions button,.library-item-actions select{font-size:10px;min-height:34px;padding:7px 9px}
.library-item-actions select{max-width:125px}
@media(max-width:800px){.pad-tune-grid{grid-template-columns:1fr 1fr;gap:12px}.pad-reverse-control{grid-column:1/-1}.library-item{flex-direction:column;align-items:stretch}.library-item-actions{justify-content:flex-start}.pad-name-editor input{min-width:110px}}

/* Prefer two-line named pads over abbreviating the sample's identity. */
.performance-pad .pad-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;max-width:92%;overflow-wrap:anywhere}

/* PAD_04 · per-pad draggable start/end waveform editor */
.pad-waveform-editor{margin:14px 0;border:1px solid #31515e;border-radius:8px;padding:15px;background:#0b2030;min-width:0}
.pad-waveform-viewport{margin:12px 0 10px;max-width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid #335264;border-radius:7px;background:#081725;scrollbar-color:#4f9f9e #112637;scrollbar-width:thin}
#padWaveformCanvas{height:126px;max-width:none;display:block;touch-action:none;cursor:ew-resize;user-select:none}
.pad-waveform-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap;color:#a9c6d2;font:700 10px ui-monospace,monospace}
.pad-waveform-controls label{display:flex;flex-direction:column;gap:5px;min-width:105px;flex:0 1 120px}
.pad-waveform-controls input,.pad-waveform-controls select{background:#091826;border:1px solid #456476;border-radius:5px;min-height:35px;padding:6px 8px;color:#e5f9f7;width:100%;font:12px ui-monospace,monospace}
.pad-waveform-controls output{color:#8fe5da;margin-left:auto;align-self:center;font-size:11px}
.pad-waveform-controls button{min-height:35px}
.pad-waveform-viewport canvas{touch-action:none}
.pad-automation-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px;padding:10px 0;border-top:1px solid #31515e;color:#89cbcb;font:700 10px ui-monospace,monospace;letter-spacing:.04em}
.pad-automation-toolbar select{min-height:36px;max-width:270px;min-width:180px;background:#091826;border:1px solid #456476;border-radius:5px;padding:7px;color:#ecf7ef;font:12px ui-monospace,monospace}
.pad-automation-toolbar output{font-weight:400;letter-spacing:0;color:#9fbecc;flex:1 1 220px}
.pad-automation-toolbar button{min-height:35px}
@media(max-width:650px){.pad-waveform-editor{padding:10px}.pad-waveform-controls{gap:8px}.pad-waveform-controls label{flex:1 1 85px;min-width:85px}.pad-waveform-controls output{margin-left:0;width:100%;text-align:left}}
/* ONB_01 – onboarding is modal; tutorial uses four blocking regions and a real target-sized hole. */
.hfc-first-run[hidden],.hfc-tour[hidden]{display:none!important}
.hfc-first-run{position:fixed;inset:0;z-index:12000;background:rgba(3,9,17,.93);display:grid;place-items:center;padding:20px;overflow:auto}
.hfc-first-card{width:min(620px,100%);background:linear-gradient(145deg,#11263a,#0b192a);color:#d9f3f3;border:1px solid #426e78;border-radius:16px;padding:clamp(20px,4vw,38px);box-shadow:0 18px 80px #000a;display:flex;flex-direction:column;align-items:stretch;gap:15px}
.hfc-first-card h1{font-size:clamp(23px,4vw,34px);line-height:1.2;margin:0;color:#effffd}
.hfc-first-card p{font-size:14px;line-height:1.7;margin:0;color:#bad2da}
.hfc-first-card a{color:#75f2e4;text-decoration:underline;text-underline-offset:3px}
.hfc-first-card .tiny-kicker{color:#6bd9d0;letter-spacing:.11em}
.hfc-first-card button{min-height:45px;width:100%;text-align:left}
.hfc-folder-list{border:1px solid #33546b;border-radius:8px;padding:12px;color:#b0eadc;background:#0a1b2b;font:12px/1.8 ui-monospace,monospace;overflow-wrap:anywhere}
.hfc-setup-options{display:grid;gap:10px}
.hfc-setup-option{border:1px solid #334e5e;padding:12px;background:#0c2132;border-radius:9px}
.hfc-setup-option p{font-size:12px;margin-top:6px}
.hfc-setup-error{color:#ffc19f!important;font-weight:600}
.hfc-tour-block{position:fixed;z-index:12001;background:rgba(2,7,13,.81);pointer-events:auto;touch-action:none}
.hfc-tour-focus{position:fixed;z-index:12002;pointer-events:none;border:2px solid #55edd7;border-radius:8px;box-shadow:0 0 0 3px rgba(66,227,215,.14),0 0 22px rgba(54,219,200,.75);transition:left .16s,top .16s,width .16s,height .16s}
.hfc-tour-card{position:fixed;z-index:12004;width:min(420px,calc(100vw - 20px));max-height:min(55vh,360px);overflow-y:auto;color:#e7f8f6;background:#0d2636;border:1px solid #52b8b2;border-radius:12px;padding:17px;box-shadow:0 12px 65px #000b}
.hfc-tour-card h2{font-size:19px;color:#eafffc;margin:7px 0}
.hfc-tour-card p{font-size:13px;line-height:1.55;color:#bdd6da;margin:8px 0 12px}
.hfc-tour-card .hfc-tour-wait{color:#8debdc;font-size:11px}
.hfc-tour-actions{display:flex;gap:7px;flex-wrap:wrap}
.hfc-tour-actions button{min-height:36px;padding:8px 10px;font-size:10px;letter-spacing:0;white-space:normal}
.hfc-chapter-help{float:right;margin-left:auto;min-height:32px;font-size:10px;letter-spacing:.04em}
#hfcGuide{font-size:10px;min-height:32px;padding:7px 10px}
@media(max-width:650px){.hfc-first-run{padding:8px}.hfc-first-card{padding:18px;gap:12px}.hfc-tour-card{padding:12px}.hfc-tour-actions button{font-size:9px}}

/* auroLIB_01 · session-only ZIP-first library / AP-UI01 shared geometry. */
.library-session-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;margin:12px 0;background:var(--ap-panel,#132632);border:1px solid var(--ap-accent,#7dbbd1);border-left:5px solid var(--ap-accent,#7dbbd1);color:var(--ap-text,#eff7f8)}
.library-session-banner>div{display:grid;gap:5px;min-width:0}
.library-session-banner strong{font-size:12px;letter-spacing:.075em}
.library-session-banner small{font-size:11px;opacity:.78}
.library-session-banner button{flex:none;white-space:nowrap}
.library-session-banner.is-unsaved{border-left-color:#efb26a}
.library-session-banner.is-saved{border-left-color:#68bfb7}
.library-zip-actions{display:grid;gap:13px;padding:18px;background:var(--ap-panel,#12232c);border-left:4px solid #d6b46c;margin-top:12px}
.library-zip-message strong{font-size:15px;letter-spacing:.055em}
.library-zip-message p{font-size:12px;line-height:1.6;max-width:850px}
.library-zip-buttons{display:flex;gap:12px;flex-wrap:wrap}
.library-zip-buttons button{min-height:42px}
.library-zip-actions .detail{margin:0;color:var(--ap-text,#b0cad0);opacity:.8}
@media(max-width:650px){.library-session-banner{padding:10px 12px;align-items:stretch;flex-direction:column}.library-session-banner button{width:100%}.library-zip-buttons{flex-direction:column}.library-zip-buttons button{width:100%}}

/* LIB_02 · separate bundled, always available sample catalog */
.bundled-capture-source{flex:1 0 100%;display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-top:1px solid var(--line);padding-top:9px}
.bundled-capture-source label{color:var(--ap-accent,#70cad0);font:700 11px ui-monospace,monospace}
.bundled-capture-source select{flex:1 1 230px;max-width:min(500px,100%);min-width:180px}
.bundled-capture-source small{flex:1 0 100%;color:var(--muted);font:10px ui-monospace,monospace}
.bundled-browser{border-color:#327067}
.bundled-filters{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}
.bundled-filters input{flex:1 1 210px;min-width:140px;background:#0b1624;color:var(--text);border:1px solid #354d60;padding:11px;border-radius:5px}
.bundled-filters select{flex:0 1 190px;max-width:100%}
.bundled-entries{display:grid;gap:7px;max-height:450px;overflow:auto;scrollbar-color:#3f7781 #0c1827;padding-right:4px}
.bundled-entries .library-item{padding:8px 10px}
.bundled-entries .library-item-main strong{font-size:12px}
@media(max-width:700px){.bundled-capture-source select{max-width:100%}.bundled-entries{max-height:370px}}

/* TERMS_01: first-use rights agreement & release education. */
.hfc-terms-card{max-height:min(92vh,850px);overflow-y:auto;scrollbar-gutter:stable;gap:12px}
.hfc-terms-card .hfc-terms-subtitle{font-size:13px;letter-spacing:.12em;color:#9af4e6;margin:4px 0 0}
.hfc-release-checklist{display:grid;gap:10px;margin:0;padding-left:25px;color:#bcd8db}
.hfc-release-checklist li{padding-left:6px;font-size:12px;line-height:1.55}
.hfc-release-checklist li::marker{color:#84e3d6;font-weight:800}
.hfc-release-checklist strong{display:block;color:#f1faf8;font-size:12px;letter-spacing:.03em}
.hfc-release-checklist span{display:block;margin-top:3px}
.hfc-first-card .hfc-terms-responsibility{font-size:12px;color:#d9c5aa}
.hfc-first-card .hfc-terms-link{font-size:12px}
.hfc-terms-agreement{display:flex;align-items:flex-start;gap:12px;padding:13px;border:1px solid #557b86;border-radius:8px;background:#102d3a;color:#f2f8f5;cursor:pointer;font-size:13px;line-height:1.55}
.hfc-terms-agreement input{accent-color:#4edccc;width:19px;height:19px;flex:0 0 19px;margin:1px 0 0}
.hfc-first-card button:disabled{cursor:not-allowed;opacity:.5}
.hfc-first-card .hfc-terms-footnote{font-size:11px;line-height:1.4;color:#98b7bd}
.ap-release-checklist{background:rgba(50,103,105,.10);border:1px solid var(--ap-stroke-subtle,#48606d);padding:12px 16px;margin:14px 0}
.ap-release-checklist h4{margin:0 0 8px;color:var(--ap-accent,#9adccc);font-size:13px;letter-spacing:.04em}
.ap-release-checklist ol{padding-left:20px;margin:4px 0 8px}.ap-release-checklist li{margin:7px 0}
@media(max-width:650px){.hfc-terms-card{max-height:calc(100dvh - 16px);padding:15px;gap:9px}.hfc-release-checklist{gap:7px}.hfc-terms-agreement{padding:10px}}
