/* Loopbase. © 2026 bxzex */
@font-face { font-family: "Inter"; font-weight: 400; src: url(assets/fonts/inter-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url(assets/fonts/inter-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url(assets/fonts/inter-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 700; src: url(assets/fonts/inter-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; src: url(assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; src: url(assets/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --base: #0c0d0f; --bg: #131417; --panel: #1b1d21; --panel2: #212429; --raised: #2a2e34; --raised2: #33373e; --line: #2a2e34; --line2: #3b4048;
  --ink: #ece8e0; --sub: #a0a5ad; --dim: #6c727b; --accent: #ff8a3d; --accent2: #ffb27a; --good: #7bd88f; --warn: #f2c14e; --bad: #ff5f56;
  --ui: "Inter", system-ui, -apple-system, sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --left: 252px; --bottom: 300px; --r: 10px;
  /* clay depth: a lit top edge and a soft shadow underneath, or pressed in */
  --lift: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.5), 0 4px 10px rgba(0,0,0,.25);
  --lift-sm: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -1px 0 rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.45);
  --press: inset 0 2px 4px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.35);
  --well: inset 0 2px 6px rgba(0,0,0,.65), inset 0 0 0 1px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--base); color: var(--ink); font: 12px/1.35 var(--ui); -webkit-font-smoothing: antialiased; overflow: hidden; user-select: none; }
button { font: inherit; color: inherit; }
input, select { font: inherit; color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #363a41; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-corner { background: transparent; }

/* ---------------------------------------------------------------- layout: panels float on a darker base */
#app { height: 100vh; display: grid; grid-template-columns: var(--left) 1fr; grid-template-rows: 48px 6px 1fr 6px var(--bottom) 6px 24px; column-gap: 6px; padding: 0 6px; }
#top { grid-column: 1 / 3; grid-row: 1; margin: 0 -6px; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; padding: 0 12px; background: linear-gradient(#202328, #1a1c20); box-shadow: 0 1px 0 #000, 0 6px 16px rgba(0,0,0,.35); position: relative; z-index: 3; }
#browser { grid-column: 1; grid-row: 3 / 6; background: var(--panel); border-radius: var(--r); box-shadow: var(--lift); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#main { grid-column: 2; grid-row: 3; min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; }
#split { grid-column: 2; grid-row: 4; cursor: ns-resize; position: relative; }
#split::after { content: ""; position: absolute; left: 50%; top: 2px; width: 44px; height: 2px; margin-left: -22px; border-radius: 2px; background: #2c3036; }
#split:hover::after { background: var(--accent); }
#editor { grid-column: 2; grid-row: 5; min-height: 0; min-width: 0; background: var(--panel); display: flex; flex-direction: column; border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; }
#status { grid-column: 1 / 3; grid-row: 7; display: flex; align-items: center; gap: 16px; padding: 0 8px; color: var(--dim); font-size: 11px; }
#status .grow { flex: 1; }
.no-browser #app { grid-template-columns: 0 1fr; column-gap: 0; } .no-browser #browser { display: none; }
.no-panel #app { grid-template-rows: 48px 6px 1fr 0 0 6px 24px; } .no-panel #editor, .no-panel #split { display: none; }
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#layer > * { pointer-events: auto; }

/* ---------------------------------------------------------------- top bar */
.logo { width: 112px; height: 24px; background: var(--ink); -webkit-mask: url(assets/logo.png) left center / contain no-repeat; mask: url(assets/logo.png) left center / contain no-repeat; flex: none; margin-right: 2px; }
.menubar { display: flex; align-items: center; gap: 0; }
.mb-i { background: none; border: 0; height: 28px; padding: 0 7px; border-radius: 6px; color: var(--sub); font-weight: 500; cursor: pointer; }
.mb-i:hover, .mb-i.on { background: var(--raised); color: var(--ink); box-shadow: var(--lift-sm); }
.tb-group { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; background: #15171a; box-shadow: var(--well); }
.sep { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; min-width: 28px; padding: 0 11px; border: 0; border-radius: 7px;
  background: linear-gradient(#33373e, #2a2d33); box-shadow: var(--lift-sm); cursor: pointer; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background .12s, box-shadow .12s, transform .05s; }
.btn:hover { background: linear-gradient(#3a3e45, #30343a); }
.btn:active { transform: translateY(1px); box-shadow: var(--press); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.on { background: linear-gradient(#ffa060, #f07a2c); color: #1d0f05; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.5), 0 3px 10px rgba(255,120,40,.18); }
.btn.rec.on { background: linear-gradient(#ff736a, #e0443a); color: #fff; }
.btn.icon { padding: 0; width: 30px; }
.btn.icon.small { width: 24px; padding: 0; }
.btn.ghost { background: none; box-shadow: none; }
.btn.ghost:hover { background: var(--raised); box-shadow: var(--lift-sm); }
.tb-group .btn { background: none; box-shadow: none; } .tb-group .btn:hover { background: var(--raised); box-shadow: var(--lift-sm); } .tb-group .btn.on { background: linear-gradient(#ffa060, #f07a2c); box-shadow: var(--lift-sm); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }
.btn.small { height: 23px; min-width: 23px; padding: 0 8px; font-size: 11px; border-radius: 6px; }
.seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: #121316; box-shadow: var(--well); }
.seg .btn { background: none; box-shadow: none; color: var(--sub); } .seg .btn:hover { color: var(--ink); background: var(--raised); }
.seg .btn.on { background: linear-gradient(#ffa060, #f07a2c); color: #1d0f05; box-shadow: var(--lift-sm); }
.lcd { display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; background: linear-gradient(#0c0d0f, #111215); border-radius: 9px; box-shadow: var(--well); font: 500 14px var(--mono); color: var(--accent2); }
.lcd small { font: 600 9px var(--ui); color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.lcd input { width: 52px; background: none; border: 0; outline: none; font: 500 14px var(--mono); color: var(--accent2); text-align: right; padding: 0; cursor: ns-resize; }
.tabs { display: flex; background: #121316; border-radius: 9px; padding: 3px; gap: 2px; box-shadow: var(--well); }
.tabs button { background: none; border: 0; height: 26px; padding: 0 11px; border-radius: 6px; color: var(--sub); font-weight: 600; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: linear-gradient(#3a3e45, #30343a); color: var(--ink); box-shadow: var(--lift-sm); }
.mmeter { width: 56px; height: 26px; border-radius: 5px; flex: none; }
@media (max-width: 1600px) { .lcd small { display: none; } .mb-i { padding: 0 6px; } .tabs button { padding: 0 9px; } }
@media (max-width: 1420px) { .lcd .tim { display: none; } }
@media (max-width: 1500px) { .mac-native .lcd .tim { display: none; } }
@media (max-width: 1300px) { .mb-i { padding: 0 4px; font-size: 11.5px; } }
.grow { flex: 1; }

/* ---------------------------------------------------------------- browser */
.br-search { margin: 10px 10px 6px; height: 32px; border-radius: 8px; border: 0; background: #111215; box-shadow: var(--well); padding: 0 12px; outline: none; }
.br-search:focus { box-shadow: var(--well), 0 0 0 1.5px var(--accent); }
.br-tree { flex: 1; overflow: auto; padding: 0 6px 12px; }
.br-sec { margin-top: 2px; }
.br-h { display: flex; align-items: center; gap: 6px; padding: 7px 8px; color: var(--sub); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border-radius: 6px; }
.br-h:hover { color: var(--ink); background: #202328; }
.br-h i { font-style: normal; width: 10px; display: inline-block; transition: transform .12s; color: var(--dim); }
.br-h.open i { transform: rotate(90deg); }
.br-f { padding: 4px 6px 4px 16px; color: var(--sub); cursor: pointer; display: flex; gap: 6px; align-items: center; border-radius: 6px; }
.br-f:hover { color: var(--ink); background: #202328; }
.br-i { padding: 4px 6px 4px 28px; border-radius: 6px; cursor: grab; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-i:hover { background: #24272c; }
.br-i.sel { background: linear-gradient(#3d2718, #33200f); color: var(--accent2); box-shadow: var(--lift-sm); }
.br-i b { width: 8px; height: 8px; border-radius: 3px; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.br-i small { margin-left: auto; color: var(--dim); font-size: 10px; }
.br-foot { padding: 8px 10px; border-top: 1px solid #111; display: flex; gap: 6px; }

/* ---------------------------------------------------------------- main toolbar */
.mt { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; background: linear-gradient(#23262b, #1e2024); box-shadow: 0 1px 0 #0a0b0c; flex: none; position: relative; z-index: 1; }
.mt select, .ed-bar select, .dev select, .aside select, .xdlg select { height: 25px; background: #111215; border: 0; box-shadow: var(--well); border-radius: 6px; padding: 0 8px; outline: none; }
select.hot { box-shadow: var(--well), 0 0 0 1.5px var(--accent); }
.mt .lbl, .ed-bar .lbl { color: var(--dim); font-size: 11px; }

/* ---------------------------------------------------------------- arrangement */
.arr { flex: 1; display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 30px 1fr; min-height: 0; position: relative; }
.arr .corner { background: #1c1e22; border-bottom: 1px solid #0a0b0c; border-right: 1px solid #0a0b0c; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.arr .ruler { position: relative; border-bottom: 1px solid #0a0b0c; background: #1c1e22; overflow: hidden; }
.arr .heads { overflow: hidden; border-right: 1px solid #0a0b0c; background: var(--panel); position: relative; }
.arr .lanes { position: relative; overflow: hidden; }
.arr .ruler > canvas, .arr .lanes > canvas { position: absolute; left: 0; top: 0; display: block; }
.th { position: absolute; left: 0; right: 0; border-bottom: 1px solid #0d0e10; display: flex; background: linear-gradient(90deg, #1d2024, #1a1c20); }
.th.sel { background: linear-gradient(90deg, #262a30, #212428); }
.th .strip { width: 5px; flex: none; margin: 4px 0 4px 4px; border-radius: 3px; }
.th .body { flex: 1; min-width: 0; padding: 7px 8px; display: flex; flex-direction: column; gap: 6px; }
.th .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.th .row { display: flex; gap: 3px; align-items: center; }
.th .row .btn.small { min-width: 22px; padding: 0 5px; }
.th .inst { color: var(--dim); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn.m.on { background: linear-gradient(#4a4f57, #3b4048); color: var(--warn); }
.tbtn.s.on { background: linear-gradient(#6aa9ff, #3f84e6); color: #06101f; }
.tbtn.a.on { background: linear-gradient(#ff736a, #e0443a); color: #fff; }
.tbtn.x.on { background: linear-gradient(#c3a9ff, #9a78f0); color: #120a26; }
.mini-vol { flex: 1; height: 5px; -webkit-appearance: none; appearance: none; background: #0d0e10; border-radius: 3px; outline: none; box-shadow: var(--well); }
.mini-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #bdb8ae); box-shadow: 0 1px 3px rgba(0,0,0,.6); cursor: pointer; }
.th .mtr { width: 5px; flex: none; background: #0b0c0d; position: relative; margin: 6px 6px 6px 0; border-radius: 3px; overflow: hidden; box-shadow: var(--well); }
.th .mtr i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, #6fd08b, #d9e36b 75%, #ff6a4d); }
.th .auto-h { position: absolute; left: 5px; right: 0; bottom: 0; height: 40px; border-top: 1px dashed var(--line2); padding: 4px 8px; display: flex; align-items: center; gap: 6px; }
.th .auto-h select { flex: 1; height: 22px; background: #111215; border: 0; box-shadow: var(--well); border-radius: 5px; font-size: 11px; }
.add-row { position: absolute; left: 0; right: 0; padding: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.drop-hint { position: absolute; pointer-events: none; border: 2px dashed var(--accent); border-radius: 8px; background: rgba(255,138,61,.08); }
.empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); pointer-events: none; font-size: 13px; }

/* ---------------------------------------------------------------- session */
.ses { flex: 1; overflow: auto; display: flex; padding: 12px; gap: 8px; }
.ses .col { width: 136px; flex: none; display: flex; flex-direction: column; gap: 5px; }
.ses .col.scenes { width: 100px; }
.ses .hd { height: 36px; border-radius: 8px; display: flex; align-items: center; padding: 0 10px; font-weight: 600; background: linear-gradient(#2a2d33, #23262b); box-shadow: var(--lift-sm); border-top: 3px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ses .hd.sel { background: linear-gradient(#33373e, #2a2d33); }
.slot { height: 36px; border-radius: 7px; background: #15171a; box-shadow: var(--well); display: flex; align-items: center; gap: 7px; padding: 0 9px; cursor: pointer; position: relative; overflow: hidden; }
.slot:hover { background: #1b1d21; }
.slot.full { color: #111; font-weight: 600; box-shadow: var(--lift-sm); }
.slot .tri { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; flex: none; opacity: .75; }
.slot.playing .tri { border: 0; width: 9px; height: 9px; background: #fff; border-radius: 2px; animation: pulse .5s infinite alternate; }
.slot.queued .tri { animation: blink .25s infinite alternate; }
.slot .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.85); }
.slot.sel { outline: 2px solid var(--ink); outline-offset: -2px; }
.slot .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.empty-sq .sq { width: 8px; height: 8px; border: 1px solid var(--dim); border-radius: 2px; }
.scene { height: 36px; border-radius: 7px; background: linear-gradient(#2a2d33, #23262b); box-shadow: var(--lift-sm); display: flex; align-items: center; gap: 7px; padding: 0 9px; cursor: pointer; color: var(--sub); font-weight: 600; }
.scene:hover { color: var(--ink); }
.stopc { height: 28px; border-radius: 7px; background: #15171a; box-shadow: var(--well); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.stopc i { width: 9px; height: 9px; background: var(--dim); border-radius: 2px; }
.stopc:hover i { background: var(--ink); }
@keyframes pulse { from { opacity: .6 } to { opacity: 1 } }
@keyframes blink { from { opacity: .2 } to { opacity: 1 } }

/* ---------------------------------------------------------------- mixer */
.mix { flex: 1; overflow: auto; display: flex; gap: 6px; padding: 12px; align-items: flex-start; }
.strip { width: 94px; flex: none; background: linear-gradient(#23262b, #1c1e22); border-radius: 10px; box-shadow: var(--lift); display: flex; flex-direction: column; align-items: center; padding: 0 0 10px; gap: 7px; overflow: hidden; }
.strip.sel { background: linear-gradient(#2c3036, #23262b); box-shadow: var(--lift), 0 0 0 1.5px var(--line2); }
.strip .cap { width: 100%; height: 5px; }
.strip .nm { width: 100%; text-align: center; font-weight: 600; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.strip .ins { width: 84px; display: flex; flex-direction: column; gap: 3px; min-height: 66px; }
.strip .ins div { height: 21px; border-radius: 5px; background: #121316; box-shadow: var(--well); display: flex; align-items: center; padding: 0 7px; font-size: 10.5px; color: var(--sub); cursor: pointer; white-space: nowrap; overflow: hidden; }
.strip .ins div.off { opacity: .45; text-decoration: line-through; }
.strip .ins div:hover { color: var(--ink); }
.strip .ins .add { color: var(--dim); justify-content: center; background: none; box-shadow: none; border: 1px dashed #30343a; }
.strip .fz { display: flex; gap: 6px; padding: 6px; border-radius: 8px; background: #141518; box-shadow: var(--well); }
.strip .db { font: 10.5px var(--mono); color: var(--sub); }
.strip .row { display: flex; gap: 3px; }
.strip.master { width: 112px; }

/* ---------------------------------------------------------------- widgets */
.knob { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 56px; touch-action: none; cursor: ns-resize; outline: none; }
.knob canvas { display: block; }
.knob label { font-size: 10px; color: var(--sub); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 64px; }
.knob .v { font: 9.5px var(--mono); color: var(--dim); white-space: nowrap; }
.knob:focus-visible canvas { outline: 1px solid var(--accent); border-radius: 50%; }
.fader { position: relative; width: 26px; touch-action: none; cursor: ns-resize; }
.fader .track { position: absolute; left: 11px; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: #07080a; box-shadow: inset 0 1px 2px #000; }
.fader .capf { position: absolute; left: 0; width: 26px; height: 16px; margin-top: -8px; border-radius: 5px; background: linear-gradient(#686c73, #45484e 45%, #363940 55%, #4d5057); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 6px rgba(0,0,0,.6); }
.fader .capf::after { content: ""; position: absolute; left: 5px; right: 5px; top: 7px; height: 2px; background: var(--ink); border-radius: 1px; }
.vmeter { width: 8px; background: #07080a; border-radius: 3px; }

/* ---------------------------------------------------------------- bottom editor */
.ed-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; background: linear-gradient(#23262b, #1e2024); box-shadow: 0 1px 0 #0a0b0c; flex: none; overflow-x: auto; position: relative; z-index: 1; }
.ed-bar::-webkit-scrollbar { height: 0; }
.ed-bar .ttl { font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ed-bar .ttl i { width: 10px; height: 10px; border-radius: 3px; }
.ed-body { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.ed-body > canvas { position: absolute; left: 0; top: 0; }
.ed-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 13px; text-align: center; padding: 20px; line-height: 1.6; }
#editor > .tabs { margin: 8px 10px 0 !important; }
.aside { width: 300px; flex: none; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #1a1c20; box-shadow: inset 1px 0 0 #0a0b0c; overflow: auto; }
.aside .grp { display: flex; flex-direction: column; gap: 5px; } .aside .grp label { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.aside .row { display: flex; gap: 6px; align-items: center; }
.aside .kn { display: flex; flex-wrap: wrap; gap: 8px 2px; }
.hint { color: var(--dim); font-size: 11px; line-height: 1.5; margin: 0; }
.txt { height: 25px; background: #111215; border: 0; box-shadow: var(--well); border-radius: 6px; padding: 0 8px; outline: none; }
.txt:focus { box-shadow: var(--well), 0 0 0 1.5px var(--accent); }

/* devices */
.devs { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; display: flex; gap: 10px; padding: 12px; }
.dev { flex: none; background: linear-gradient(#26292e, #1f2226); border-radius: 12px; box-shadow: var(--lift); display: flex; flex-direction: column; min-width: 160px; max-height: 100%; overflow: hidden; }
.dev.off { opacity: .55; }
.dev .dh { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; background: linear-gradient(#2e3238, #272a2f); box-shadow: 0 1px 0 #0d0e10; }
.dev .dh b { flex: 1; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.dev .dh .dot { width: 9px; height: 9px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 1px #000; }
.dev .dh .x { cursor: pointer; color: var(--dim); padding: 0 3px; font-size: 14px; }
.dev .dh .x:hover { color: var(--ink); }
.dev .dh .pop { width: 22px; min-width: 22px; font-size: 12px; }
.dev .tag { font: 600 9px var(--ui); letter-spacing: .08em; color: #cfc4ff; background: #2f2a45; padding: 2px 6px; border-radius: 4px; }
.dev .db { padding: 12px; display: flex; flex-wrap: wrap; gap: 8px 4px; align-content: flex-start; overflow: auto; }
.dev .db.col { flex-direction: column; flex-wrap: nowrap; gap: 10px; width: 230px; }
.dev .blurb { color: var(--dim); font-size: 11px; padding: 0 12px 10px; line-height: 1.5; }
.dev .db .blurb { padding: 0; }
.dev .grp { display: flex; flex-direction: column; gap: 6px; }
.dev .grp.sel { align-items: center; width: 84px; gap: 3px; } .dev .grp.sel select { width: 84px; } .dev .grp.sel label { font-size: 10px; color: var(--sub); }
.dev .gr { font: 10px var(--mono); color: var(--warn); }
.dev.plug { background: linear-gradient(#2a2733, #211f28); }
.pads { display: grid; grid-template-columns: repeat(4, 52px); gap: 5px; padding: 6px; border-radius: 10px; background: #141518; box-shadow: var(--well); }
.pad { height: 42px; border-radius: 7px; background: linear-gradient(#3a3e45, #2e3137); box-shadow: var(--lift-sm); font-size: 9.5px; padding: 5px; color: var(--sub); cursor: pointer; overflow: hidden; line-height: 1.2; }
.pad.sel { background: linear-gradient(#5a3822, #4a2e1b); color: var(--accent2); box-shadow: var(--lift-sm), 0 0 0 1.5px var(--accent); }
.pad.hit { background: var(--accent); color: #1a0f06; box-shadow: var(--press); }
.addfx { justify-content: center; align-items: center; min-width: 130px; color: var(--sub); cursor: pointer; border: 1.5px dashed var(--line2); background: none; box-shadow: none; }
.addfx:hover { color: var(--ink); border-color: var(--accent); }

/* floating plugin windows */
.fwin { position: fixed; background: linear-gradient(#26292e, #1d1f23); border-radius: 12px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.07), 0 24px 60px rgba(0,0,0,.6), 0 6px 16px rgba(0,0,0,.4); max-width: 96vw; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.fw-h { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 12px; background: linear-gradient(#31353b, #292c31); box-shadow: 0 1px 0 #0d0e10; cursor: grab; font-weight: 600; flex: none; }
.fw-h:active { cursor: grabbing; }
.fw-h i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.fw-h span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-x { background: none; border: 0; color: var(--sub); font-size: 18px; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; line-height: 1; }
.fw-x:hover { background: var(--raised); color: var(--ink); }
.fw-b { overflow: auto; padding: 12px; }
.fw-b > .db { display: flex; flex-wrap: wrap; gap: 8px 4px; max-width: 560px; }
.fw-b > .dev { box-shadow: none; background: none; } .fw-b > .dev .dh { display: none; }
.wam-gui { background: #000; border-radius: 8px; overflow: hidden; }

/* menus, dialogs, toasts */
.menu { position: fixed; min-width: 210px; background: linear-gradient(#2a2d33, #24272c); border-radius: 10px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.07), 0 16px 40px rgba(0,0,0,.55); padding: 5px; z-index: 900; max-height: 76vh; overflow: auto; }
.menu div { padding: 6px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 22px; white-space: nowrap; }
.menu div:hover { background: linear-gradient(#ffa060, #f07a2c); color: #1a0f06; }
.menu div small { color: var(--dim); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.menu div:hover small { color: #4a2810; }
.menu hr { border: 0; border-top: 1px solid #1a1c20; box-shadow: 0 1px 0 rgba(255,255,255,.04); margin: 4px 2px; }
.menu .hd { color: var(--dim); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; cursor: default; padding-top: 7px; }
.menu .hd:hover { background: none; color: var(--dim); }
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,7,.62); display: flex; align-items: center; justify-content: center; z-index: 700; }
.modal { background: linear-gradient(#23262b, #1c1e22); border-radius: 14px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.07), 0 30px 70px rgba(0,0,0,.6); max-width: min(1100px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 12px 16px; box-shadow: 0 1px 0 #0d0e10; font-weight: 700; font-size: 14px; }
.modal .mb { padding: 18px; overflow: auto; }
.modal .mb p { color: var(--sub); line-height: 1.6; margin: 0 0 10px; font-size: 13px; }
.dim { color: var(--dim) !important; }
.toast { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); background: linear-gradient(#2e3238, #26292e); border-radius: 10px; padding: 10px 16px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.5); font-weight: 500; z-index: 950; transition: opacity .3s; }
.vsec { display: flex; flex-wrap: wrap; gap: 12px; }
.vsec > div { background: linear-gradient(#26292e, #1f2226); border-radius: 10px; padding: 10px 12px 12px; box-shadow: var(--lift); }
.vsec h4 { margin: 0 0 8px; font-size: 10.5px; color: var(--sub); letter-spacing: .08em; text-transform: uppercase; }
.vsec .kn { display: flex; flex-wrap: wrap; gap: 6px 2px; max-width: 360px; }
.welcome { width: 560px; }
.welcome .big { width: 220px; height: 48px; background: var(--ink); -webkit-mask: url(assets/logo.png) left center / contain no-repeat; mask: url(assets/logo.png) left center / contain no-repeat; margin-bottom: 14px; }
.welcome .row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
kbd { font: 11px var(--mono); background: #111215; box-shadow: var(--lift-sm); border-radius: 5px; padding: 1px 6px; color: var(--ink); }
.keys-list { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 12.5px; color: var(--sub); }

/* export dialog */
.xdlg { width: 420px; display: flex; flex-direction: column; gap: 10px; }
.xrow { display: flex; align-items: center; gap: 12px; } .xrow > span:first-child { width: 110px; color: var(--sub); } .xrow select { flex: 1; }
.chk { display: flex; align-items: center; gap: 6px; color: var(--sub); } .chk input { accent-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; }

/* genre picker */
.genre-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.genre { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border: 0; border-radius: 10px; background: linear-gradient(#2e3137, #25282d); box-shadow: var(--lift-sm); cursor: pointer; text-align: left; }
.genre:hover { background: linear-gradient(#3a2a1f, #2f2218); box-shadow: var(--lift-sm), 0 0 0 1.5px var(--accent); }
.genre b { font-size: 13px; } .genre small { color: var(--dim); font-size: 10.5px; }

/* plugin manager */
.pm { margin-top: 12px; min-height: 360px; }
.pm .row { margin-bottom: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pm { min-width: 0; } .pcard { min-width: 0; } .pinfo { min-width: 0; }
.pcard { display: grid; grid-template-columns: 88px 1fr; grid-template-rows: 1fr auto; gap: 6px 12px; padding: 10px; border-radius: 12px; background: linear-gradient(#272a30, #212428); box-shadow: var(--lift-sm); }
.pcard img, .pthumb { grid-row: 1 / 3; width: 88px; height: 70px; object-fit: cover; border-radius: 8px; background: #111215; box-shadow: var(--well); }
.pthumb { display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #b8a9ff; }
.pinfo b { font-size: 13px; } .pinfo small { display: block; color: var(--dim); font-size: 10.5px; margin-top: 2px; }
.pinfo p { margin: 5px 0 0 !important; font-size: 11.5px !important; line-height: 1.45 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pact { display: flex; gap: 6px; justify-content: flex-end; }

/* desktop app on macOS: room for the traffic lights and a draggable title bar */
.mac-native #top { padding-left: 86px; -webkit-app-region: drag; }
.mac-native.fullscreen #top { padding-left: 12px; }
.mac-native #top button, .mac-native #top input, .mac-native #top select, .mac-native #top canvas, .mac-native #top .lcd { -webkit-app-region: no-drag; }
