:root {
  --ink:#0b0d11; --bg0:#101217; --bg1:#171a21; --bg2:#1e222b; --bg3:#272c37; --bg4:#333a47;
  --line:#2c313c; --line2:#3b4250; --hi:rgba(255,255,255,.07);
  --text:#e9ecf2; --dim:#8d96a8; --faint:#5b6474;
  --hot:#ff8a2a; --hot2:#ff5a1f; --ai:#b58bff; --ai2:#5aa8ff; --led:#3dff9e; --lcd:#79f7c6; --bad:#ff5a5f;
  --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme:dark;
}
* { box-sizing:border-box; }
html,body { height:100%; margin:0; }
body { background:var(--ink); color:var(--text); font:12px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; display:flex; flex-direction:column; overflow:hidden; -webkit-font-smoothing:antialiased; user-select:none; }
input,select,textarea { user-select:text; }
svg { fill:currentColor; display:block; }
button,input,select { font:inherit; color:inherit; }
button { cursor:pointer; border:0; background:none; padding:0; }
:focus-visible { outline:2px solid var(--hot); outline-offset:1px; }
small { font-size:9px; letter-spacing:.09em; color:var(--faint); font-weight:600; }
.grow { flex:1; }
.dim { color:var(--dim); margin:0; }
select,input:not([type=checkbox]) { background:var(--ink); border:1px solid var(--line); border-radius:4px; padding:3px 6px; box-shadow:inset 0 1px 2px rgba(0,0,0,.5); min-width:0; }
select:hover,input:hover { border-color:var(--line2); }
::-webkit-scrollbar { width:10px; height:10px; } ::-webkit-scrollbar-thumb { background:var(--bg4); border-radius:5px; border:2px solid transparent; background-clip:padding-box; } ::-webkit-scrollbar-corner { background:transparent; }

/* ---- top bar ---- */
#bar { flex:none; display:flex; align-items:stretch; gap:6px; padding:6px 8px; min-height:58px; background:linear-gradient(#262b35,#191c23); border-bottom:1px solid #000; box-shadow:inset 0 1px 0 var(--hi),0 2px 10px rgba(0,0,0,.5); position:relative; z-index:5; }
.brand { display:flex; align-items:center; gap:8px; width:206px; flex:none; }
.brand .mark { cursor:default; } .mark { width:32px; height:32px; flex:none; filter:drop-shadow(0 0 7px rgba(255,120,30,.45)); }
.brandText { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
#name { background:none; border:0; box-shadow:none; padding:0; font-weight:600; font-size:13px; width:100%; }
#name:hover { color:#fff; } 
#hint { color:var(--hot); font-size:10.500px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; height:14px; }
.group { display:flex; align-items:center; gap:7px; padding:0 8px; background:rgba(0,0,0,.22); border-radius:7px; box-shadow:inset 0 1px 2px rgba(0,0,0,.55),0 1px 0 var(--hi); flex:none; }
.tbtn.play { width:40px; height:38px; border-radius:7px; display:grid; place-items:center; color:#0c2317; background:linear-gradient(#3a4150,#262b35); color:var(--led); box-shadow:inset 0 1px 0 var(--hi),0 1px 2px rgba(0,0,0,.6); }
.tbtn.play svg { width:18px; height:18px; }
.tbtn.play:hover { background:linear-gradient(#454d5e,#2c323e); }
.tbtn.play.on { background:linear-gradient(#49ffae,#17c877); color:#04180e; box-shadow:0 0 16px rgba(61,255,158,.5),inset 0 1px 0 rgba(255,255,255,.5); }
.modes { display:flex; flex-direction:column; gap:2px; }
.modes button { display:flex; align-items:center; gap:5px; font-size:10px; font-weight:700; letter-spacing:.06em; color:var(--faint); padding:1px 4px; }
.modes button i { width:7px; height:7px; border-radius:50%; background:#30363f; box-shadow:inset 0 1px 1px rgba(0,0,0,.7); }
.modes button.on { color:var(--text); } .modes button.on i { background:var(--hot); box-shadow:0 0 7px var(--hot); }
.lcd { display:flex; flex-direction:column; justify-content:center; background:linear-gradient(#071110,#0b1716); border-radius:5px; padding:2px 8px 3px; height:40px; box-shadow:inset 0 1px 4px #000,0 1px 0 var(--hi); color:var(--lcd); }
.lcd small { color:#3f7f69; font-size:8px; }
.lcd span,.lcd input { font:600 18px/1.1 var(--mono); color:var(--lcd); text-shadow:0 0 8px rgba(121,247,198,.5); font-variant-numeric:tabular-nums; }
.lcd input { background:none; border:0; box-shadow:none; padding:0; width:46px; -moz-appearance:textfield; } .lcd input::-webkit-inner-spin-button { display:none; }
.knobcell { display:flex; flex-direction:column; align-items:center; gap:2px; }
.knobcell > span { display:block; }
#scope { width:120px; height:40px; border-radius:5px; background:#071110; box-shadow:inset 0 1px 4px #000,0 1px 0 var(--hi); }
.field { display:flex; flex-direction:column; gap:2px; }
.field .row1 { display:flex; gap:3px; }
.sel select { height:24px; padding:1px 3px; max-width:110px; }
.mini { width:22px; height:24px; background:var(--bg3); border-radius:4px; font-size:14px; line-height:1; box-shadow:inset 0 1px 0 var(--hi); } .mini:hover { background:var(--bg4); }
.views { gap:2px; padding:0 5px; }
.views button { width:30px; height:30px; border-radius:6px; display:grid; place-items:center; color:var(--faint); }
.views button svg { width:17px; height:17px; }
.views button:hover { color:var(--text); background:var(--bg3); }
.views button.on { color:var(--hot); background:rgba(255,138,42,.13); box-shadow:inset 0 -2px 0 var(--hot); }
.views button.ai.on { color:var(--ai); background:rgba(181,139,255,.14); box-shadow:inset 0 -2px 0 var(--ai); }
.files { gap:4px; }
.txt { height:28px; padding:0 10px; border-radius:5px; background:linear-gradient(#333a47,#262b35); font-weight:600; box-shadow:inset 0 1px 0 var(--hi),0 1px 2px rgba(0,0,0,.5); }
.txt:hover { background:linear-gradient(#3e4656,#2c323e); }
.txt.hot { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 0 12px rgba(255,110,30,.3); }
.txt.hot:hover { background:linear-gradient(#ffb165,#ff7d35); }
#saveState { color:var(--dim); font-size:10.500px; white-space:nowrap; padding:0 4px; }

/* ---- knobs and faders ---- */
.knob { --c:var(--hot); --s:22px; width:var(--s); height:var(--s); border-radius:50%; position:relative; cursor:ns-resize; touch-action:none; flex:none;
  background:conic-gradient(from var(--from),var(--c) 0 var(--sw),transparent var(--sw)),conic-gradient(from -135deg,#0a0c10 0 270deg,transparent 270deg); }
.knob::after { content:""; position:absolute; inset:15%; border-radius:50%; background:radial-gradient(circle at 35% 28%,#4b5364,#23272f 62%,#1a1d24); box-shadow:0 1px 3px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.14); }
.knob i { position:absolute; z-index:1; left:50%; top:15%; width:2px; height:28%; margin-left:-1px; background:#fff; border-radius:1px; transform-origin:50% calc(var(--s) * .35); transform:rotate(var(--r)); box-shadow:0 0 3px rgba(255,255,255,.6); }
.fader { --p:.8; width:26px; position:relative; cursor:ns-resize; touch-action:none; flex:none; }
.fader::before { content:""; position:absolute; left:50%; top:0; bottom:0; width:4px; margin-left:-2px; background:#07090c; border-radius:2px; box-shadow:0 1px 0 var(--hi); }
.fader i { position:absolute; left:1px; right:1px; height:30px; bottom:calc(var(--p) * (100% - 30px)); border-radius:3px; background:linear-gradient(#5a6375,#3a4150 45%,#ffffff 45%,#ffffff 55%,#3a4150 55%,#2a2f3a); box-shadow:0 2px 5px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.2); }

/* ---- main layout ---- */
main { flex:1; display:grid; grid-template-columns:230px minmax(0,1fr) 272px; min-height:0; }
main.noBrowser { grid-template-columns:0 minmax(0,1fr) 272px; } main.noAi { grid-template-columns:230px minmax(0,1fr) 0; } main.noBrowser.noAi { grid-template-columns:0 minmax(0,1fr) 0; }
main.noBrowser #browser,main.noAi #assistant { display:none; }
aside { background:var(--bg1); min-height:0; display:flex; flex-direction:column; overflow:hidden; }
#workspace { position:relative; overflow:hidden; background:radial-gradient(1200px 700px at 50% -10%,#1b2029,#0d0f13 70%); }

/* ---- browser ---- */
#browser { border-right:1px solid #000; box-shadow:inset -1px 0 0 var(--hi); }
.tabs { display:flex; background:var(--bg0); border-bottom:1px solid #000; }
.tabs button { flex:1; padding:7px 0; color:var(--dim); font-weight:600; border-bottom:2px solid transparent; } .tabs button:hover { color:var(--text); } .tabs button.on { color:var(--text); border-bottom-color:var(--hot); background:var(--bg1); }
#browser section { display:flex; flex-direction:column; gap:6px; flex:1; min-height:0; padding:6px; }
#browser section[hidden] { display:none; }
.searchRow { display:flex; gap:4px; } #search { flex:1; }
.tree { list-style:none; padding:0; margin:0; overflow-y:auto; flex:1; min-height:0; }
.tree li { display:flex; align-items:center; gap:5px; height:22px; padding-right:4px; border-radius:3px; white-space:nowrap; cursor:pointer; color:#c6ccd8; }
.tree li.two { height:34px; }
.tree li:hover { background:var(--bg3); color:#fff; }
.tree li.dir { font-weight:600; color:var(--text); } .tree li.dir.kits { color:#ffc48f; } .tree li.dir.kits .ico { color:var(--hot); } .tree li .arrow { width:9px; color:var(--faint); font-size:8px; text-align:center; flex:none; }
.tree li .ico { width:13px; height:13px; flex:none; color:#d9a441; } .tree li.file .ico { color:var(--role,#7c869a); }
.tree li .t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.tree li .t small { display:block; font-weight:400; letter-spacing:0; font-size:10px; color:var(--faint); overflow:hidden; text-overflow:ellipsis; }
.tree li .n { color:var(--faint); font-size:10px; font-weight:400; }
.tree li button { display:none; width:20px; height:18px; border-radius:3px; background:var(--bg4); color:var(--text); flex:none; } .tree li:hover button { display:block; } .tree li button:hover { background:var(--hot); color:#1d0d02; }
#waveBox { flex:none; } #waveName { margin:0 0 3px; color:var(--dim); font-size:10.500px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } #wave { display:block; width:100%; height:52px; background:#090b0f; border-radius:4px; box-shadow:inset 0 1px 3px #000; } #libCount { margin:4px 0 0; color:var(--faint); font-size:10px; }
.fileBtn { background:linear-gradient(#ffa04a,#ff6d1f); color:#1d0d02; border-radius:5px; padding:6px; text-align:center; font-weight:700; cursor:pointer; }

/* ---- windows ---- */
.win { position:absolute; display:flex; flex-direction:column; background:var(--bg1); border:1px solid #000; border-radius:8px; overflow:hidden; box-shadow:0 12px 34px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.035); }
.win[hidden] { display:none; }
.win.active { box-shadow:0 16px 44px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,138,42,.28); }
.win-title { flex:none; height:27px; display:flex; align-items:center; gap:8px; padding:0 4px 0 10px; background:linear-gradient(#2c323d,#20242c); border-bottom:1px solid #000; box-shadow:inset 0 1px 0 var(--hi); cursor:grab; touch-action:none; }
.win.active .win-title b { color:var(--hot); }
.win-title b { font-size:11.500px; font-weight:700; letter-spacing:.02em; }
.win-title .sub { color:var(--dim); font-size:10.500px; }
.win-close { width:22px; height:20px; border-radius:4px; color:var(--dim); font-size:15px; line-height:1; } .win-close:hover { background:var(--bad); color:#fff; }
.win-body { flex:1; min-height:0; position:relative; overflow:auto; }
.win-body > canvas { display:block; width:100%; height:100%; }
.win-grip { position:absolute; right:0; bottom:0; width:14px; height:14px; cursor:nwse-resize; touch-action:none; z-index:2; background:linear-gradient(135deg,transparent 50%,var(--line2) 50%,var(--line2) 58%,transparent 58%,transparent 70%,var(--line2) 70%,var(--line2) 78%,transparent 78%); }
.ghost { height:20px; padding:0 8px; border-radius:4px; color:var(--dim); font-weight:600; } .ghost:hover { background:var(--bg3); color:var(--text); }
.spark { display:flex; align-items:center; gap:5px; height:21px; padding:0 9px; border-radius:5px; font-weight:700; color:#120b22; background:linear-gradient(95deg,#c9a4ff,#6fb2ff); box-shadow:0 0 12px rgba(150,130,255,.35); } .spark svg { width:11px; height:11px; } .spark:hover { filter:brightness(1.12); }

/* ---- channel rack ---- */
#rack { min-width:max-content; padding:5px 8px 8px; }
.ledrow { display:flex; align-items:center; height:12px; margin-bottom:3px; }
.ledrow .pad0 { width:188px; flex:none; }
.leds { display:flex; gap:2px; } .leds i { width:20px; height:5px; border-radius:2px; background:#14171d; box-shadow:inset 0 1px 1px #000; } .leds i.bar { margin-left:7px; } .leds i.cur { background:var(--led); box-shadow:0 0 7px var(--led); }
.ch { --c:var(--hot); display:flex; align-items:center; gap:5px; height:30px; }
.ch.drop { background:rgba(255,138,42,.14); border-radius:5px; }
.led { width:13px; height:13px; border-radius:50%; flex:none; background:var(--led); box-shadow:0 0 6px var(--led),inset 0 1px 1px rgba(255,255,255,.6); }
.led.off { background:#2a2f38; box-shadow:inset 0 1px 2px #000; }
.solo { width:15px; height:15px; border-radius:3px; font-size:9px; font-weight:800; color:var(--faint); background:var(--bg3); flex:none; } .solo:hover { color:var(--text); } .solo.on { background:var(--hot); color:#1d0d02; box-shadow:0 0 7px var(--hot); }
.cname { width:104px; height:25px; flex:none; display:flex; align-items:center; gap:5px; padding:0 6px 0 0; border-radius:4px; overflow:hidden; font-weight:600; text-align:left; background:linear-gradient(#3a4150,#2a2f3a); box-shadow:inset 0 1px 0 var(--hi),0 1px 2px rgba(0,0,0,.5); } 
.cname::before { content:""; width:4px; align-self:stretch; background:var(--c); flex:none; box-shadow:0 0 8px var(--c); }
.cname span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; } .cname em { font-style:normal; color:var(--c); font-size:9px; }
.cname:hover { background:linear-gradient(#475064,#333a47); }
.ch.sel .cname { box-shadow:inset 0 0 0 1px var(--c),0 0 10px -2px var(--c); }
.pads { display:flex; gap:2px; }
.pad { width:20px; height:25px; border-radius:3px; background:linear-gradient(#2e3440,#262b35); box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 1px 1px rgba(0,0,0,.5); touch-action:none; }
.pad.alt { background:linear-gradient(#3b3238,#322a2f); }
.pad.bar { margin-left:7px; }
.pad:hover { filter:brightness(1.35); }
.pad.on { background:linear-gradient(color-mix(in srgb,var(--c) 78%,#fff),var(--c)); box-shadow:0 0 8px color-mix(in srgb,var(--c) 55%,transparent),inset 0 1px 0 rgba(255,255,255,.45); }
.roll-mini { display:block; height:25px; border-radius:3px; background:#12151b; box-shadow:inset 0 1px 2px #000; cursor:pointer; }

/* ---- mixer ---- */
#mixer { display:flex; gap:3px; padding:7px; min-width:max-content; height:100%; }
.strip { --c:#8d96a8; width:66px; flex:none; display:flex; flex-direction:column; align-items:center; gap:6px; padding:6px 4px; border-radius:5px; background:linear-gradient(#242932,#1b1e25); box-shadow:inset 0 1px 0 var(--hi); border-top:2px solid var(--c); cursor:pointer; }
.strip.master { width:82px; --c:var(--hot); background:linear-gradient(#2d2620,#1e1b18); margin-right:6px; }
.strip.sel { background:linear-gradient(#303642,#22262e); }
.strip .nm { font-size:10.500px; font-weight:600; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.strip .btns { display:flex; gap:5px; align-items:center; height:16px; }
.strip .body { flex:1; min-height:60px; display:flex; gap:5px; justify-content:center; }
.strip canvas { width:10px; height:100%; display:block; border-radius:2px; background:#07090c; }
.strip .fader { height:100% !important; }

/* ---- assistant ---- */
#assistant { border-left:1px solid #000; padding:8px; gap:7px; background:linear-gradient(#1b1a26,#15171e 240px); }
.aiHead { display:flex; align-items:center; gap:8px; } .aiHead svg { width:24px; height:24px; color:var(--ai); filter:drop-shadow(0 0 7px rgba(181,139,255,.7)); flex:none; } .aiHead b { font-size:13px; } .aiHead p { margin:0; color:var(--dim); font-size:10.500px; }
.feel { display:flex; flex-direction:column; gap:2px; }
.big { padding:8px; border-radius:6px; font-weight:700; color:#120b22; background:linear-gradient(95deg,#c9a4ff,#6fb2ff); box-shadow:0 0 16px rgba(150,130,255,.3),inset 0 1px 0 rgba(255,255,255,.4); } .big:hover { filter:brightness(1.1); }
#suggestions { display:flex; flex-direction:column; gap:6px; overflow-y:auto; max-height:52%; flex:none; }
.card { --c:var(--hot); background:var(--bg2); border-radius:6px; padding:7px 8px; display:flex; flex-direction:column; gap:5px; box-shadow:inset 3px 0 0 var(--c),inset 0 1px 0 var(--hi); }
.card b { text-transform:capitalize; } .card p { margin:0; color:var(--dim); line-height:1.3; }
.card canvas { width:100%; height:18px; display:block; border-radius:3px; background:#0c0e13; }
.card select { width:100%; }
.acts { display:flex; gap:4px; } .acts button { flex:1; height:24px; border-radius:4px; font-weight:600; background:var(--bg4); } .acts button:hover { background:#454d5e; }
.acts button.add { background:var(--c); color:#100c06; } .acts button.add:hover { filter:brightness(1.12); background:var(--c); }
#chat { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:5px; min-height:30px; }
.msg { padding:5px 8px; border-radius:8px; background:var(--bg2); max-width:92%; user-select:text; } .msg.me { background:linear-gradient(95deg,#3b2f63,#2c3f6e); align-self:flex-end; }
#ask { display:flex; gap:4px; } #prompt { flex:1; padding:6px 8px; border-radius:6px; }
#ask button { width:30px; border-radius:6px; display:grid; place-items:center; color:#120b22; background:linear-gradient(95deg,#c9a4ff,#6fb2ff); } #ask svg { width:13px; height:13px; }

/* ---- dialogs ---- */
dialog { background:linear-gradient(#232731,#191c23); color:var(--text); border:1px solid #000; border-radius:12px; padding:18px; width:min(450px,92vw); box-shadow:0 30px 80px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05); }
dialog::backdrop { background:rgba(4,5,8,.62); backdrop-filter:blur(3px); }
dialog h3 { margin:0 0 3px; font-size:17px; }
dialog .opts { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:12px 0; }
dialog .opts button { text-align:left; padding:9px 10px; border-radius:6px; background:var(--bg3); font-weight:600; box-shadow:inset 0 1px 0 var(--hi); } dialog .opts button:hover { background:var(--bg4); }
dialog .opts button.on { background:rgba(255,138,42,.16); box-shadow:inset 0 0 0 1px var(--hot); color:#ffc48f; }
dialog .fields { display:grid; grid-template-columns:1fr 190px; gap:7px 12px; align-items:center; margin:10px 0; } dialog .fields select { padding:4px; }
dialog .foot { display:flex; justify-content:flex-end; gap:6px; margin-top:14px; }
dialog .foot button { height:30px; padding:0 14px; border-radius:6px; font-weight:700; background:var(--bg4); } dialog .foot button.primary { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); }
.preview { display:flex; height:26px; border-radius:5px; overflow:hidden; margin:10px 0 6px; gap:2px; }
.preview span { background:var(--bg4); font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; overflow:hidden; min-width:0; }
.preview .hook { background:linear-gradient(#ffa04a,#ff6d1f); color:#1d0d02; } .preview .verse { background:linear-gradient(#6f9cff,#3f6fd8); } .preview .bridge { background:linear-gradient(#b58bff,#7d58cf); }
#toast { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); z-index:50; background:#000c; backdrop-filter:blur(8px); border:1px solid var(--line2); padding:7px 13px; border-radius:7px; opacity:0; transition:opacity .2s; pointer-events:none; }
#toast.show { opacity:1; }

/* ---- login ---- */
body.login { align-items:center; justify-content:center; background:radial-gradient(900px 600px at 50% 30%,#2a1c12,#0b0d11 70%); user-select:auto; }
body.login form { display:grid; gap:9px; width:min(320px,90vw); background:linear-gradient(#232731,#191c23); padding:26px; border-radius:14px; box-shadow:0 30px 80px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.06); }
body.login .mark { width:46px; height:46px; }
body.login h1 { margin:4px 0 0; font-size:22px; } body.login p { margin:0; color:var(--dim); }
body.login label { color:var(--dim); margin-top:6px; } body.login input { padding:9px; border-radius:6px; }
body.login button { padding:10px; border-radius:6px; font-weight:700; color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); }
#err { color:var(--bad); min-height:18px; }

@media (max-width:1440px) { .brand { width:150px; } #scope { width:64px; } #saveState { display:none; } .txt { padding:0 7px; } .sel select { max-width:84px; } .group { padding:0 6px; gap:5px; } #bar { gap:4px; } .lcd span,.lcd input { font-size:16px; } .lcd input { width:40px; } }
@media (max-width:1340px) { #scope { display:none; } .brand { width:128px; } }
@media (max-width:1200px) { #bar { flex-wrap:wrap; } .grow { flex:1 0 0; } }
@media (max-width:900px) { body { overflow:auto; } main,main.noBrowser,main.noAi,main.noBrowser.noAi { display:flex; flex-direction:column; flex:none; } #browser,#assistant { height:340px; } #workspace { height:80vh; } }

/* ---- tempo drag, metronome, channel settings, rolls ---- */
.lcd.bpm { cursor:ns-resize; touch-action:none; } .lcd.bpm input { pointer-events:none; cursor:ns-resize; } .lcd.bpm.typing input { pointer-events:auto; cursor:text; }
.metro { position:relative; display:flex; align-items:center; gap:1px; }
.tbtn.small { width:28px; height:28px; border-radius:5px; display:grid; place-items:center; color:var(--faint); background:linear-gradient(#333a47,#262b35); box-shadow:inset 0 1px 0 var(--hi); }
.tbtn.small svg { width:15px; height:15px; } .tbtn.small:hover { color:var(--text); }
.tbtn.small.caret { width:16px; font-size:10px; }
#metro.on { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); box-shadow:0 0 10px rgba(255,120,30,.45); }
.pop[hidden] { display:none; }
.pop { position:absolute; top:34px; left:0; z-index:40; background:linear-gradient(#2a2f3a,#1f232b); border:1px solid #000; border-radius:8px; padding:10px; width:190px; box-shadow:0 14px 34px rgba(0,0,0,.6); display:grid; gap:7px; }
.pop small { display:block; margin-bottom:2px; } .pop select { width:100%; } .pop .row { display:flex; align-items:center; gap:8px; }
.gear { width:20px; height:22px; border-radius:4px; display:grid; place-items:center; color:var(--faint); flex:none; } .gear svg { width:13px; height:13px; } .gear:hover { color:var(--text); background:var(--bg3); }
.ledrow .pad0 { width:214px; }
.pad { position:relative; }
.pad[data-roll]::after { content:attr(data-roll); position:absolute; inset:0; display:grid; place-items:center; font:800 8.500px/1 var(--mono); color:#120d05; }
.roll-mini.loop { background:#151820; }
#chanSettings { padding:12px 14px; display:flex; flex-direction:column; gap:12px; min-width:max-content; }
.cs-head { display:flex; align-items:center; gap:10px; } .cs-head b { font-size:14px; } .cs-head .src { color:var(--dim); font-size:11px; max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cs-knobs { display:flex; gap:14px; flex-wrap:wrap; }
.cs-k { display:flex; flex-direction:column; align-items:center; gap:3px; width:54px; } .cs-k span { font:600 10.500px var(--mono); color:var(--lcd); }
.cs-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cs-row label { display:flex; align-items:center; gap:6px; color:var(--dim); }
.cs-section { border-top:1px solid var(--line); padding-top:10px; display:flex; flex-direction:column; gap:8px; } .cs-section h4 { margin:0; font-size:11px; letter-spacing:.06em; color:var(--faint); }
.cs-btn { height:26px; padding:0 10px; border-radius:5px; font-weight:600; background:linear-gradient(#3a4150,#2a2f3a); box-shadow:inset 0 1px 0 var(--hi); } .cs-btn:hover { background:linear-gradient(#475064,#333a47); } .cs-btn.hot { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); }
.progress { height:8px; border-radius:4px; background:#0a0c10; overflow:hidden; margin:14px 0 6px; box-shadow:inset 0 1px 2px #000; } .progress i { display:block; height:100%; width:0; background:linear-gradient(90deg,#c9a4ff,#6fb2ff); transition:width .2s; }

/* ---- browser chips, rows ---- */
.cats { display:flex; flex-wrap:wrap; gap:3px; margin:6px 0 4px; }
.cats button { padding:2px 7px; border-radius:10px; font-size:10.5px; font-weight:600; color:var(--dim); background:var(--bg3); box-shadow:inset 0 1px 0 var(--hi); }
.cats button:hover { color:var(--text); } .cats button.on { background:var(--hot); color:#1d0d02; }
.tree li.cur { background:rgba(255,138,42,.16); color:#fff; box-shadow:inset 2px 0 0 var(--hot); }
.tree li .tagl { font-style:normal; font-size:8.5px; font-weight:800; color:var(--ai); letter-spacing:.04em; }
.tree li button.add { background:var(--hot); color:#1d0d02; font-weight:800; }
body.dragging #rack { outline:1px dashed rgba(255,138,42,.5); outline-offset:-3px; border-radius:6px; }
#rack.drop { background:rgba(255,138,42,.07); }

/* ---- rack ---- */
.ch.add { height:32px; opacity:.85; } .ch.add .dim { color:var(--faint); font-size:10.5px; }
.addch { width:104px; margin-left:69px; height:24px; border-radius:4px; font-size:16px; font-weight:700; color:var(--hot); background:var(--bg3); box-shadow:inset 0 0 0 1px var(--line),inset 0 1px 0 var(--hi); }
.addch:hover { background:var(--bg4); color:#fff; }

/* ---- menus ---- */
.menu { position:fixed; z-index:50; min-width:190px; max-width:340px; padding:4px; background:#232831; border:1px solid #000; border-radius:7px; box-shadow:0 14px 36px rgba(0,0,0,.6),inset 0 1px 0 var(--hi); display:flex; flex-direction:column; }
.menu.tall { max-height:min(560px,80vh); overflow:auto; } .menu.wide { min-width:280px; }
.menu button { display:flex; align-items:center; gap:7px; text-align:left; padding:4px 8px; border-radius:4px; color:var(--text); flex-wrap:wrap; }
.menu button small { flex-basis:100%; color:var(--faint); font-size:10px; padding-left:15px; margin-top:-1px; }
.menu button:hover { background:var(--hot); color:#1d0d02; } .menu button:hover small { color:#3a1d05; }
.menu button.hot { color:var(--bad); } .menu button i { width:8px; height:8px; border-radius:50%; flex:none; }
.menu .mh { padding:6px 8px 2px; font-size:9.5px; font-weight:800; letter-spacing:.06em; color:var(--faint); text-transform:uppercase; }
.menu hr { border:0; border-top:1px solid var(--line); margin:3px 4px; width:auto; }

/* ---- transport extras ---- */
.tbtn.rec { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:var(--bg3); box-shadow:inset 0 1px 0 var(--hi),0 1px 2px rgba(0,0,0,.6); }
.tbtn.rec i { width:10px; height:10px; border-radius:50%; background:#5a2a2c; }
.tbtn.rec.on i { background:#ff3b45; box-shadow:0 0 9px #ff3b45; }
.tbtn.kbd { display:flex; align-items:center; gap:3px; padding:0 6px; height:26px; border-radius:5px; color:var(--faint); background:var(--bg3); box-shadow:inset 0 1px 0 var(--hi); }
.tbtn.kbd svg { width:15px; height:15px; } .tbtn.kbd small { font-size:9.5px; font-weight:700; }
.tbtn.kbd.on { color:var(--lcd); } .tbtn.kbd.hit { color:#fff; box-shadow:0 0 10px var(--lcd); }

/* ---- assistant style check ---- */
.aiBtns { display:flex; gap:5px; } .aiBtns .big { flex:1; } .big.alt { background:linear-gradient(95deg,#ffb347,#ff7a2f); flex:0 0 auto !important; }
.card.style b { text-transform:none; } .card.style h5 { margin:4px 0 0; font-size:9.5px; letter-spacing:.06em; color:var(--faint); }
.checks { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:3px; }
.checks li { --c:var(--hot); display:flex; align-items:center; gap:6px; padding:3px 5px; border-radius:4px; background:var(--bg1); }
.checks li > i { font-style:normal; width:14px; text-align:center; color:var(--faint); flex:none; } .checks li.ok > i { color:var(--led); }
.checks li span { flex:1; min-width:0; } .checks li small { display:block; color:var(--faint); font-size:10px; line-height:1.25; }
.checks li.miss { box-shadow:inset 2px 0 0 var(--c); }
.checks li button, .card.style .acts button { padding:3px 8px; border-radius:4px; background:var(--bg4); font-weight:700; flex:none; } .checks li button.add, .card.style .acts button.add { background:var(--hot); color:#1d0d02; }
.card.style details summary { cursor:pointer; color:var(--dim); font-weight:600; } .card.style .tips { margin:4px 0; padding-left:16px; color:var(--dim); line-height:1.35; } .card.style a { color:var(--ai2); }
dialog h4 { margin:10px 0 4px; font-size:10px; letter-spacing:.06em; color:var(--faint); }
.wordmark { font-weight:800; letter-spacing:-.5px; } .wordmark b { font-weight:900; background:linear-gradient(90deg,#ffb347,#ff5a1f); -webkit-background-clip:text; background-clip:text; color:transparent; }
.tbtn.stop { width:30px; height:30px; border-radius:6px; display:grid; place-items:center; color:var(--dim); background:linear-gradient(#3a4150,#262b35); box-shadow:inset 0 1px 0 var(--hi),0 1px 2px rgba(0,0,0,.6); }
.tbtn.stop svg { width:13px; height:13px; fill:currentColor; } .tbtn.stop:hover { color:#fff; background:linear-gradient(#454d5e,#2c323e); }
.txt:disabled { opacity:.4; cursor:default; }
#menubar { flex:none; display:flex; align-items:center; gap:1px; height:24px; padding:0 6px; background:#14171d; border-bottom:1px solid #000; }
#menubar button { height:20px; padding:0 9px; border-radius:4px; color:var(--dim); font-weight:600; } #menubar button:hover,#menubar button.on { background:var(--bg3); color:var(--text); }
.menu kbd { margin-left:auto; padding-left:14px; font:10.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--faint); } .menu button:hover kbd { color:#3a1d05; }
.menu button:disabled { opacity:.38; pointer-events:none; }
dialog.shortcuts table { border-collapse:collapse; margin:4px 0 10px; } dialog.shortcuts td { padding:4px 10px 4px 0; vertical-align:top; } dialog.shortcuts td:first-child { white-space:nowrap; }
dialog.shortcuts kbd { font:11px/1 ui-monospace,SFMono-Regular,Menlo,monospace; padding:3px 6px; border-radius:4px; background:var(--bg3); box-shadow:inset 0 -1px 0 #000; }
.menu button.cur { background:var(--bg4); box-shadow:inset 2px 0 0 var(--hot); } .menu button:focus { outline:none; background:var(--hot); color:#1d0d02; } .menu button:focus small,.menu button:focus kbd { color:#3a1d05; }
/* Sample Lab */
#lab { display:flex; flex-direction:column; gap:8px; padding:10px; min-height:100%; }
.labRow { display:flex; flex-wrap:wrap; align-items:center; gap:6px; } .labRow .grow { flex:1; }
.labRow input[type=number] { width:62px; padding:3px 5px; border-radius:4px; } .labRow select { max-width:250px; }
.labRow .cs-btn.primary { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); font-weight:700; } .labRow .cs-btn.hot { box-shadow:inset 0 0 0 1px var(--hot); color:var(--hot); }
.labRow .cs-btn.rec { color:#fff; background:#c3283a; }
.labEmpty { padding:30px 10px; text-align:center; display:grid; gap:6px; justify-items:center; } .labEmpty p { max-width:520px; margin:0; }
.labChips { display:flex; gap:6px; flex-wrap:wrap; } .chip { padding:3px 8px; border-radius:10px; background:var(--bg3); font-weight:600; } .chip.busy { color:var(--hot); }
#labWave { width:100%; height:150px; border-radius:6px; cursor:crosshair; touch-action:none; flex:none; }
#lab .pads { display:grid; grid-template-columns:repeat(16,1fr); gap:4px; }
#lab .pads button { height:34px; border-radius:5px; background:linear-gradient(#323846,#262b35); font-weight:700; color:var(--dim); box-shadow:inset 0 1px 0 var(--hi),0 1px 2px #000; }
#lab .pads button:active,#lab .pads button.hit { background:linear-gradient(#5ff0d8,#2bc4a8); color:#04201c; }
.labGrid { display:grid; grid-template-columns:70px 1fr; gap:6px 10px; align-items:center; } .labGrid > label { color:var(--faint); font-weight:700; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; }
.labCheck { display:inline-flex; align-items:center; gap:4px; color:var(--dim); }
#lab .foot { border-top:1px solid var(--line); padding-top:8px; margin-top:auto; }
.labRow .cs-btn.suggest { color:#1d0d02; background:linear-gradient(#ffd27a,#ffb347); font-weight:700; }
.tree li .tagl.fits { color:#3fe0c5; } .tree li .tagl { white-space:nowrap; }
.loopBar { display:flex; align-items:center; gap:8px; padding:0 8px 6px; color:var(--dim); font-size:11px; } .loopBar select { min-width:128px; max-width:150px; } .loopBar label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
#menubar .grow { flex:1; } #menubar .who { color:var(--faint); font-weight:600; }
dialog.account { width:min(460px,92vw); } dialog.account h4 { margin:14px 0 4px; } dialog.account p { margin:2px 0 6px; }
.acctField { display:grid; grid-template-columns:80px 1fr; align-items:center; gap:8px; margin:4px 0; } .acctField span { color:var(--dim); } .acctField input { padding:6px; border-radius:5px; }
.acctActs { display:flex; justify-content:flex-end; margin:4px 0; } .acctActs button { height:28px; padding:0 12px; border-radius:6px; font-weight:700; background:var(--bg4); } .acctActs button.primary { color:#1d0d02; background:linear-gradient(#ffa04a,#ff6d1f); }
.acctList { list-style:none; margin:4px 0 8px; padding:0; display:grid; gap:4px; } .acctList li { display:flex; align-items:center; gap:6px; padding:5px 8px; border-radius:5px; background:var(--bg2); } .acctList .grow { flex:1; } .acctList button { padding:2px 8px; border-radius:4px; background:var(--bg4); }
