/* noteframe — Studio editor. Calm dark pro-tool: mono micro-labels, numbered sections, one accent. */
:root {
  --st-top: 52px;
  --st-panel-w: clamp(344px, 26vw, 420px);
  --st-row-h: 30px;
  --st-lab-w: 104px;
  --accent-a08: rgba(127,208,220, .08);
  --accent-a14: rgba(127,208,220, .14);
  --accent-a35: rgba(127,208,220, .35);
}
html, body.st-body { height: 100%; overflow: hidden; }
body.st-body { font-size: var(--fs-md); }
.st-app { height: 100vh; height: 100dvh; display: grid; grid-template-rows: var(--st-top) minmax(0, 1fr); }
.grow { flex: 1 1 auto; }
.dim { color: var(--dim); }
kbd { font: 500 10.5px/1 var(--font-mono); color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
::selection { background: rgba(127,208,220, .3); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--line-2); }

/* ───────── top bar ───────── */
.st-top { display: flex; align-items: center; gap: 14px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 30; }
.st-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; flex: none; }
.st-brand .mark { width: 14px; height: 20px; border: 2px solid var(--accent); border-radius: 3px; position: relative; }
.st-brand .mark::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 3px; height: 2px; background: var(--accent); border-radius: 1px; box-shadow: 0 -4px 0 rgba(127,208,220,.55), 0 -8px 0 rgba(127,208,220,.25); }
.st-brand .wm { font: 700 16px/1 var(--font-display); letter-spacing: -.01em; }
.st-brand .wm b { font-weight: 700; color: var(--accent); }
.st-top-sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.st-proj { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 380px; }
.st-proj .label { flex: none; }
.st-proj-title { min-width: 60px; width: 100%; max-width: 260px; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 5px 8px; font: 500 14px/1.2 var(--font-ui); color: var(--text); text-overflow: ellipsis; transition: border-color var(--t-fast), background var(--t-fast); }
.st-proj-title:hover { border-color: var(--line); }
.st-proj-title:focus { border-color: var(--line-2); background: var(--panel); outline: none; }
.st-save { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; flex: none; }
.st-save .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); opacity: .8; transition: background var(--t-med); }
.st-save[data-s=saving] .dot { background: var(--accent); animation: st-blink 1s infinite; }
.st-save[data-s=error] .dot { background: var(--bad); }
.st-save[data-s=error] { color: var(--bad); }
@keyframes st-blink { 50% { opacity: .25; } }
.st-cmdk-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 6px 0 11px; min-width: 250px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); color: var(--dim); font-size: var(--fs-md); transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.st-cmdk-btn span { flex: 1; text-align: left; }
.st-cmdk-btn:hover { border-color: var(--line-2); color: var(--muted); background: var(--panel); }
.st-top-right { display: flex; align-items: center; gap: 10px; }
.st-iconpair { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.st-iconpair .st-icon-btn { border-radius: 0; width: 32px; height: 30px; }
.st-iconpair .st-icon-btn + .st-icon-btn { border-left: 1px solid var(--line); }
.st-credits { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--text); font-size: var(--fs-md); transition: border-color var(--t-fast), background var(--t-fast); }
.st-credits i { color: var(--accent); font-size: 15px; }
.st-credits .u { color: var(--dim); font-size: var(--fs-sm); }
.st-credits:hover { border-color: var(--accent-a35); background: var(--accent-a08); }
.st-credits.owner .u::after { content: ' · owner'; }
.st-user { display: flex; align-items: center; min-width: 32px; }
.st-user .coin-pill { display: none !important; }

/* ───────── generic buttons ───────── */
.st-icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--muted); font-size: 16px; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.st-icon-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.st-icon-btn:active:not(:disabled) { transform: scale(.94); }
.st-icon-btn:disabled { opacity: .35; }
.st-icon-btn[aria-pressed=true] { color: var(--accent); background: var(--accent-a08); }
.st-icon-btn.sm { width: 26px; height: 26px; font-size: 14px; }
.st-icon-btn.off { color: var(--dim); }
.st-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 500 var(--fs-sm)/1 var(--font-ui); text-decoration: none; white-space: nowrap; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.st-btn i { font-size: 14px; color: var(--muted); }
.st-btn:hover { background: var(--panel-3); }
.st-btn:active { transform: translateY(1px); }
.st-btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 0 8px; }
.st-btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.st-btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.st-btn.accent:hover { background: var(--accent-2); }
.st-btn:disabled { opacity: .5; }
.st-link { font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 4px 2px; transition: color var(--t-fast); }
.st-link:hover { color: var(--text); }
.st-link.danger:hover { color: var(--bad); }
.st-tog { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); transition: all var(--t-fast); }
.st-tog i { font-size: 13px; }
.st-tog:hover { color: var(--text); border-color: var(--line-2); }
.st-tog[aria-pressed=true] { color: var(--accent-2); border-color: var(--accent-a35); background: var(--accent-a08); }

/* ───────── workspace ───────── */
.st-work { display: grid; grid-template-columns: minmax(0, 1fr) var(--st-panel-w); min-height: 0; }
.st-stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--bg); }
.st-viewer { position: relative; display: grid; grid-template-rows: 40px minmax(0, 1fr) 26px; min-height: 0;
  background: radial-gradient(circle at 50% 45%, rgba(142,162,255,.035), transparent 60%), radial-gradient(circle, rgba(255,255,255,.045) 1px, transparent 1.3px) 0 0 / 18px 18px, var(--bg); }
.st-vbar { display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.st-vfmt { font-size: 11px; color: var(--dim); }
.st-canvas-wrap { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.st-canvas-wrap.zoomed { overflow: auto; place-items: start center; padding: 12px; }
.st-frame { position: relative; background: #000; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 30px 80px -20px rgba(0,0,0,.8), 0 10px 30px rgba(0,0,0,.4); overflow: hidden; transition: width var(--t-med) var(--ease), height var(--t-med) var(--ease); }
.st-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-vstats { display: flex; justify-content: center; gap: 16px; font-size: 10.5px; color: var(--dim); align-items: center; letter-spacing: .02em; }
.st-app.is-playing #statFps { color: var(--good); }

/* safe area overlay */
.st-safe { position: absolute; inset: 0; pointer-events: none; }
.st-safe::before { content: ''; position: absolute; left: var(--sx); top: var(--sy); width: var(--sw); height: var(--sh); border: 1px dashed rgba(255,255,255,.55); border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.st-safe > span[class^=ui-] { position: absolute; background: repeating-linear-gradient(135deg, rgba(255,90,90,.16) 0 1px, transparent 1px 7px); }
.st-safe .ui-top { left: 0; right: 0; top: 0; height: var(--sy); }
.st-safe .ui-bottom { left: 0; right: 0; bottom: 0; top: calc(var(--sy) + var(--sh)); }
.st-safe .ui-right { right: 0; top: var(--sy); height: var(--sh); left: calc(var(--sx) + var(--sw)); }
.st-safe .lbl { position: absolute; left: var(--sx); top: calc(var(--sy) - 18px); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; }

.st-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(11,12,15,.72); color: var(--muted); font: 500 var(--fs-sm) var(--font-mono); letter-spacing: .04em; backdrop-filter: blur(2px); z-index: 2; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: st-spin .8s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-veil { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: rgba(11,12,15,.76); backdrop-filter: blur(3px); z-index: 3; }
.st-veil .ring { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.st-veil svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.st-veil circle { fill: none; stroke: var(--line-2); stroke-width: 3; }
.st-veil circle#veilArc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.st-veil .mono { font-size: 15px; color: var(--text); }

/* ───────── dock: transport + timeline ───────── */
.st-dock { padding: 0 14px 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); background: var(--bg-2); }
.st-transport { display: flex; align-items: center; gap: 6px; height: 50px; }
.st-play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 15px; margin-right: 4px; box-shadow: 0 0 0 0 var(--accent-a35); transition: transform var(--t-fast), box-shadow var(--t-med), background var(--t-fast); }
.st-play:hover { background: var(--accent-2); box-shadow: 0 0 0 5px var(--accent-a14); }
.st-play:active { transform: scale(.93); }
.st-time { display: flex; align-items: baseline; gap: 10px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); height: 26px; align-items: center; }
.st-time .tc { font-size: 17px; color: var(--text); letter-spacing: .01em; min-width: 94px; }
.st-time .bb { font-size: 11px; color: var(--muted); padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; min-width: 44px; text-align: center; }
.st-time .bb::before { content: 'bar '; color: var(--dim); }
.st-range-read { display: flex; gap: 16px; font-size: 11.5px; color: var(--text); }
.st-range-read span { display: inline-flex; align-items: baseline; gap: 6px; }
.st-range-read em { font-style: normal; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); opacity: .85; }
.st-range-read b { font-weight: 400; }
.st-vol { display: flex; align-items: center; gap: 8px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); }
.st-vol .st-range { width: 78px; }
.st-tl { position: relative; height: 112px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.st-tl canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.st-tl-tip { position: absolute; top: 2px; transform: translateX(-50%); font-size: 10px; color: var(--text); background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; pointer-events: none; white-space: nowrap; z-index: 1; }
.st-tl-legend { display: flex; align-items: center; gap: 14px; font-size: 10.5px; color: var(--muted); min-height: 14px; padding: 0 2px; }
.st-tl-legend .it { display: inline-flex; align-items: center; gap: 6px; }
.st-tl-legend .it i { width: 8px; height: 8px; border-radius: 2px; }
.st-tl-legend .it i.wave { background: linear-gradient(90deg, rgba(180,186,200,.5) 0 2px, transparent 2px 4px) 0 0 / 4px 100%; }
.st-tl-legend .hint { color: var(--dim); }

/* ───────── right panel ───────── */
.st-panel { display: grid; grid-template-rows: 40px minmax(0, 1fr) auto; min-height: 0; border-left: 1px solid var(--line); background: var(--bg-2); }
.st-panel-head { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.st-panel-head .wm { font: 700 13px/1 var(--font-display); color: var(--text); }
.st-panel-head .wm em { font-style: normal; font-weight: 500; color: var(--dim); margin-left: 3px; }
.st-panel-scroll { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: smooth; }
.st-sec { border-bottom: 1px solid var(--line); }
.st-sec-head { width: 100%; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; color: var(--text); text-align: left; position: sticky; top: 0; z-index: 2; background: var(--bg-2); transition: background var(--t-fast); }
.st-sec-head:hover { background: #121419; }
.st-sec-head .n { font-size: 11px; font-weight: 600; color: var(--accent); width: 14px; }
.st-sec-head .t { font: 600 11.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.st-sec-head .sum { flex: 1; min-width: 0; text-align: right; font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.st-sec-head .chev { color: var(--dim); font-size: 12px; transition: transform var(--t-med) var(--ease); }
.st-sec.closed .st-sec-head .chev { transform: rotate(-90deg); }
.st-sec-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s var(--ease); }
.st-sec.closed .st-sec-body { grid-template-rows: 0fr; }
.st-sec-inner { min-height: 0; overflow: hidden; overflow: clip; display: flex; flex-direction: column; gap: 6px; padding: 0 16px; transition: opacity .2s var(--ease); }
.st-sec-inner::after { content: ''; display: block; height: 12px; flex: none; }
.st-sec.closed .st-sec-inner { opacity: 0; }
.st-sub { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 18px; }
.st-sub.foot { margin-top: 2px; }
.st-sub .mono { font-size: 10.5px; }
.st-hint { grid-column: 2; font-size: 11px; line-height: 1.4; color: var(--dim); margin-top: -2px; }
.st-note { display: flex; gap: 7px; align-items: flex-start; font-size: 11.5px; color: var(--muted); line-height: 1.4; padding: 4px 2px; }
.st-note i { color: var(--blue); margin-top: 2px; }
.st-empty { font-size: var(--fs-sm); color: var(--dim); padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; line-height: 1.45; }
.st-empty.sm { padding: 8px 10px; font-size: 11.5px; }

/* rows & controls */
.st-row { display: grid; grid-template-columns: var(--st-lab-w) minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 4px; min-height: 32px; border-radius: 7px; transition: background .6s; }
.st-lab { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; }
.st-ctl { min-width: 0; display: flex; align-items: center; }
.st-ctl > * { flex: 1 1 auto; min-width: 0; }
.st-ctl > .st-switch, .st-ctl > .st-pill { flex: none; }
.st-row.flash, .st-swatch.flash, .st-actions.flash { animation: st-flash 1.5s var(--ease); }
@keyframes st-flash { 0%, 35% { background: var(--accent-a14); box-shadow: 0 0 0 6px var(--accent-a14); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.st-input { width: 100%; height: var(--st-row-h); padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: var(--fs-md); transition: border-color var(--t-fast), background var(--t-fast); }
.st-input::placeholder { color: var(--dim); }
.st-input:hover { border-color: var(--line-2); }
.st-input:focus { outline: none; border-color: var(--accent-a35); background: var(--panel-2); box-shadow: 0 0 0 3px var(--accent-a08); }
.st-input-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.st-input-wrap > i { position: absolute; left: 9px; color: var(--dim); font-size: 14px; pointer-events: none; }
.st-input-wrap .st-input { padding-left: 30px; }
input[type=search].st-input::-webkit-search-cancel-button { filter: invert(.6); }

.st-slider { display: flex; align-items: center; gap: 10px; width: 100%; }
.st-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 18px; background: transparent; margin: 0; cursor: pointer; --p: 50%; }
.st-range:focus { outline: none; }
.st-range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) 0 var(--p), var(--panel-3) var(--p) 100%); }
.st-range::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) 0 var(--p), var(--panel-3) var(--p) 100%); }
.st-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #f4f2ec; border: 0; box-shadow: 0 0 0 3px var(--bg-2), 0 1px 3px rgba(0,0,0,.5); transition: transform var(--t-fast); }
.st-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #f4f2ec; border: 0; box-shadow: 0 0 0 3px var(--bg-2); }
.st-range:hover::-webkit-slider-thumb { transform: scale(1.18); }
.st-range:active::-webkit-slider-thumb { transform: scale(1.3); background: var(--accent-2); }
.st-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--blue); }
.st-range.mini::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--muted) 0 var(--p), var(--panel-3) var(--p) 100%); }
.st-val { width: 58px; flex: none; height: 24px; padding: 0 6px; text-align: right; font-size: 11.5px; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 6px; transition: border-color var(--t-fast), background var(--t-fast); }
.st-val:hover { border-color: var(--line); }
.st-val:focus { outline: none; border-color: var(--accent-a35); background: var(--panel); }

.st-switch { position: relative; width: 32px; height: 18px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--line-2); transition: background var(--t-med) var(--ease), border-color var(--t-med); flex: none; }
.st-switch .knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform var(--t-med) var(--ease), background var(--t-med); }
.st-switch[aria-checked=true] { background: var(--accent); border-color: var(--accent); }
.st-switch[aria-checked=true] .knob { transform: translateX(14px); background: var(--accent-ink); }
.st-inline-toggle { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast); }
.st-inline-toggle:hover { border-color: var(--line-2); color: var(--text); }
.st-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.st-seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); width: 100%; }
.st-seg button { flex: 1 1 0; min-width: 0; height: 26px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: background var(--t-fast), color var(--t-fast); }
.st-seg button:hover { color: var(--text); }
.st-seg button[aria-checked=true] { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.3); }
.st-seg button small { font-size: 9.5px; color: var(--dim); letter-spacing: .04em; margin-top: 2px; }
.st-seg button[aria-checked=true] small { color: var(--accent); }
.st-seg.two button, .st-seg.three button { height: 38px; }
.st-seg.sm { width: auto; padding: 2px; }
.st-seg.sm button { height: 22px; font-size: 11.5px; padding: 0 10px; flex: none; }

.st-select { position: relative; display: flex; align-items: center; width: 100%; }
.st-select select { -webkit-appearance: none; appearance: none; width: 100%; height: var(--st-row-h); padding: 0 26px 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: var(--fs-md); cursor: pointer; transition: border-color var(--t-fast); text-transform: capitalize; }
.st-select select:hover { border-color: var(--line-2); }
.st-select select:focus { outline: none; border-color: var(--accent-a35); }
.st-select select option { background: var(--panel); text-transform: capitalize; }
.st-select > i { position: absolute; right: 8px; font-size: 12px; color: var(--dim); pointer-events: none; }

.st-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; transition: all var(--t-fast); }
.st-chip:hover { color: var(--text); border-color: var(--line-2); }
.st-chip .n { font-size: 9.5px; color: var(--dim); }
.st-chip[aria-pressed=true] { color: var(--accent-2); border-color: var(--accent-a35); background: var(--accent-a08); }
.st-chip[aria-pressed=true] .n { color: var(--accent); }
.st-chip .sw { display: inline-flex; }
.st-chip .sw i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--bg-2); margin-left: -3px; }
.st-chip .sw i:first-child { margin-left: -4px; }
.st-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; color: var(--muted); }

.st-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; }
.st-swatch { position: relative; display: grid; justify-items: center; gap: 5px; padding: 6px 2px 4px; border-radius: 8px; cursor: pointer; transition: background var(--t-fast); }
.st-swatch:hover { background: var(--panel); }
.st-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.st-swatch .chip { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 1px rgba(0,0,0,.4); transition: transform var(--t-fast) var(--ease); }
.st-swatch:hover .chip { transform: scale(1.08); }
.st-swatch:focus-within .chip { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 2px var(--bg-2), 0 0 0 4px var(--blue); }
.st-swatch .nm { font-size: 11px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ctl > .st-swatch { flex: none; display: flex; flex-direction: row; gap: 8px; padding: 2px 6px 2px 2px; }
.st-ctl > .st-swatch .chip { width: 22px; height: 22px; }

.st-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; border-radius: 8px; }
.st-actions .mono { font-size: 10.5px; }
.st-preset-form { display: flex; gap: 6px; animation: st-in .2s var(--ease); }
.st-preset-form .st-input { flex: 1; }
@keyframes st-in { from { opacity: 0; transform: translateY(-4px); } }
.st-presets { display: grid; gap: 4px; }
.st-preset { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: border-color var(--t-fast); }
.st-preset:hover { border-color: var(--line-2); }
.st-preset.here { border-color: rgba(127,208,220,.22); }
.st-preset .ld { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; text-align: left; }
.st-preset .ld .nm { font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-preset .ld .lk { margin-left: auto; font-size: 10.5px; color: var(--dim); }
.st-preset .ld:hover { background: var(--panel); }
.st-preset .x { width: 32px; height: 32px; display: grid; place-items: center; color: var(--dim); border-left: 1px solid var(--line); }
.st-preset .x:hover { color: var(--bad); background: rgba(255,107,107,.06); }
.st-preset.missing { opacity: .5; }

/* section 1 */
.st-drop { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.012), transparent); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); margin-top: 2px; }
.st-drop > i { grid-row: span 2; font-size: 26px; color: var(--accent); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-a08); }
.st-drop .tx { display: grid; gap: 1px; }
.st-drop .tx b { font-weight: 600; font-size: var(--fs-md); }
.st-drop .tx span { font-size: var(--fs-sm); color: var(--muted); }
.st-drop .tx u { text-decoration-color: var(--line-2); text-underline-offset: 3px; color: var(--text); }
.st-drop .fmts { grid-column: 2; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.st-drop:hover { border-color: var(--accent-a35); background: var(--accent-a08); }
.st-drop.compact { padding: 7px 10px; grid-template-columns: auto 1fr; }
.st-drop.compact > i { grid-row: auto; width: 28px; height: 28px; font-size: 17px; }
.st-drop.compact .tx span, .st-drop.compact .fmts { display: none; }
.st-drop.compact .tx b { font-weight: 500; font-size: var(--fs-sm); }
.st-drop.compact .tx b::after { content: '  ·  replace or add files'; font-weight: 400; color: var(--dim); }
.st-demos { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.st-demos .list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.st-demo { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font-size: var(--fs-sm); color: var(--text); text-transform: capitalize; transition: all var(--t-fast); }
.st-demo .mono { font-size: 10px; color: var(--dim); text-transform: none; }
.st-demo:hover { border-color: var(--line-2); background: var(--panel); }
.st-demo[aria-pressed=true] { border-color: var(--accent-a35); background: var(--accent-a08); }
.st-demo[aria-pressed=true] .mono { color: var(--accent); }
.st-files { display: grid; gap: 4px; }
.st-files:empty { display: none; }
.st-file { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); animation: st-in .25s var(--ease); }
.st-file > i:first-child { color: var(--muted); font-size: 15px; }
.st-file.beat > i:first-child { color: var(--accent); }
.st-file.demo > i:first-child { color: var(--blue); }
.st-file .nm { flex: 1; min-width: 0; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-file .meta { font-size: 10.5px; color: var(--dim); }
.st-file .x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--dim); }
.st-file .x:hover { color: var(--text); background: var(--panel-3); }
.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 2px; }
.st-stats:empty { display: none; }
.st-stats .cell { display: grid; gap: 5px; padding: 9px 10px 8px; }
.st-stats .cell + .cell { border-left: 1px solid var(--line); }
.st-stats .cell .label { font-size: 9.5px; }
.st-stats .cell b { font-size: 15px; font-weight: 500; color: var(--text); }
.st-tracks { display: grid; gap: 2px; }
.st-track { display: grid; grid-template-columns: 10px minmax(0, 1fr) 96px 30px 26px; align-items: center; gap: 8px; height: 34px; padding: 0 2px 0 6px; border-radius: 7px; transition: background var(--t-fast), opacity var(--t-fast); }
.st-track:hover { background: var(--panel); }
.st-track .dot { width: 8px; height: 8px; border-radius: 2px; }
.st-track .nm { font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-track .nm em { font: 500 9px/1 var(--font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }
.st-track .cnt { font-size: 11px; color: var(--dim); text-align: right; }
.st-track .st-select select { height: 26px; font-size: var(--fs-sm); }
.st-track.muted .nm, .st-track.muted .cnt, .st-track.muted .dot { opacity: .4; }
.st-voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-voices .v { display: grid; gap: 5px; }
.st-voices .label { display: flex; align-items: center; gap: 6px; font-size: 9.5px; }
.st-voices .dot { width: 7px; height: 7px; border-radius: 2px; }
.st-voices .st-select select { height: 28px; font-size: var(--fs-sm); }

/* section 2: looks */
.st-look-tools { display: flex; gap: 6px; margin-top: 2px; }
.st-look-tools .search { flex: 1; }
.st-look-tools .st-tog { height: var(--st-row-h); }
.st-looks { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; max-height: 486px; overflow-y: auto; padding: 4px 2px 6px; margin: 2px -2px 0; }
.st-looks.empty::after { content: 'No looks match'; grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--dim); padding: 18px 0; text-align: center; }
.st-look { position: relative; min-width: 0; }
.st-look .pick { display: grid; gap: 6px; width: 100%; text-align: center; border-radius: 8px; }
.st-look .th { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 7px; overflow: hidden; background: var(--panel-2); box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--t-fast), transform var(--t-med) var(--ease); }
.st-look .th canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .35s var(--ease); }
.st-look.ready .th canvas, .st-look.live .th canvas { opacity: 1; }
.st-look .shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.045) 50%, transparent 70%) 0 0 / 250% 100%; animation: st-shim 1.4s linear infinite; }
.st-look.ready .shimmer { display: none; }
@keyframes st-shim { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.st-look .nm { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--t-fast); }
.st-look .pick:hover .th { box-shadow: 0 0 0 1px var(--line-2), 0 8px 20px rgba(0,0,0,.45); transform: translateY(-2px); }
.st-look .pick:hover .nm { color: var(--text); }
.st-look.active .th { box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(127,208,220,.12); }
.st-look.active .nm { color: var(--accent-2); }
.st-look .pick:focus-visible { box-shadow: none; }
.st-look .pick:focus-visible .th { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--blue); }
.st-look .fav { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(11,12,15,.66); color: rgba(255,255,255,.7); font-size: 11px; opacity: 0; transform: scale(.85); transition: opacity var(--t-fast), transform var(--t-fast), color var(--t-fast); backdrop-filter: blur(4px); }
.st-look:hover .fav, .st-look .fav:focus-visible { opacity: 1; transform: none; }
.st-look.is-fav .fav { opacity: 1; transform: none; color: var(--accent); }
.st-look .fav:hover { color: var(--accent-2); transform: scale(1.1); }
.st-look.live .th::after { content: ''; position: absolute; left: 6px; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: #ff5d5d; box-shadow: 0 0 0 3px rgba(255,93,93,.25); }

/* section 3: style */
.st-lookhead { display: grid; gap: 4px; padding: 10px 12px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); margin-top: 2px; }
.st-lookhead .t { display: flex; align-items: baseline; gap: 10px; }
.st-lookhead b { font: 700 17px/1.2 var(--font-display); letter-spacing: -.005em; }
.st-lookhead .fam { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.st-lookhead p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }

/* section 6: export */
.st-summary { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.st-summary .r { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 6px 10px; font-size: 11px; }
.st-summary .r + .r { border-top: 1px solid rgba(38,42,49,.6); }
.st-summary .r span { color: var(--dim); letter-spacing: .06em; text-transform: uppercase; font-size: 9.5px; align-self: center; }
.st-summary .r b { font-weight: 400; color: var(--text); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-summary .r.warn b { color: var(--warn); }
.st-summary .r.cost b { color: var(--accent-2); }
.st-last { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; background: rgba(111,211,154,.06); border: 1px solid rgba(111,211,154,.2); animation: st-in .3s var(--ease); }
.st-last .info { flex: 1; min-width: 0; display: flex; gap: 9px; align-items: flex-start; }
.st-last .info > i { color: var(--good); font-size: 16px; margin-top: 1px; }
.st-last .info div { display: grid; gap: 2px; min-width: 0; }
.st-last .info b { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-last .info span { font-size: 10px; color: var(--muted); }

/* sticky footer: export */
.st-panel-foot { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--bg-2); display: grid; gap: 10px; }
.st-export { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 16px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font: 700 14.5px/1 var(--font-ui); letter-spacing: .005em; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 10px 30px -10px rgba(127,208,220,.45); transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-med); }
.st-export i { font-size: 17px; }
.st-export .main { flex: none; }
.st-export .meta { margin-left: auto; font-size: 11px; font-weight: 500; opacity: .66; white-space: nowrap; }
.st-export::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); transition: none; }
.st-export:hover:not(:disabled) { background: var(--accent-2); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 14px 36px -10px rgba(127,208,220,.6); }
.st-export:hover:not(:disabled)::after { left: calc(100% + 30px); transition: left .7s var(--ease); }
.st-export:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.st-export:disabled { opacity: .55; cursor: default; box-shadow: none; }
.st-export.short { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-app.is-exporting .st-export { background: var(--panel-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-progress { display: grid; gap: 8px; animation: st-in .25s var(--ease); }
.st-progress .bar { height: 5px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.st-progress .bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); position: relative; transition: width .15s linear; }
.st-progress .bar i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(120deg, rgba(255,255,255,.28) 0 6px, transparent 6px 14px); animation: st-stripes .9s linear infinite; }
@keyframes st-stripes { to { background-position: 28px 0; } }
.st-progress .row { display: flex; align-items: center; gap: 14px; font-size: 10.5px; color: var(--muted); }
.st-progress .row span:first-child { color: var(--text); }
.st-progress .row .st-link { margin-left: auto; }

/* ───────── command palette ───────── */
.st-cmdk { position: fixed; inset: 0; z-index: 60; background: rgba(5,6,8,.55); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: flex-start; padding-top: 13vh; opacity: 0; transition: opacity .16s var(--ease); }
.st-cmdk.on { opacity: 1; }
.st-cmdk-box { width: min(620px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; transform: translateY(-6px) scale(.985); transition: transform .2s var(--ease); }
.st-cmdk.on .st-cmdk-box { transform: none; }
.st-cmdk .in { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); }
.st-cmdk .in > i { font-size: 18px; color: var(--muted); }
.st-cmdk .in input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; color: var(--text); }
.st-cmdk .in input::placeholder { color: var(--dim); }
.st-cmdk .list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 460px); overflow-y: auto; }
.st-cmdk li { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: var(--fs-md); cursor: pointer; }
.st-cmdk li i { font-size: 15px; color: var(--dim); width: 16px; }
.st-cmdk li .lb { color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-cmdk li .sec { font-size: 10px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.st-cmdk li[aria-selected=true] { background: var(--panel-2); }
.st-cmdk li[aria-selected=true]::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); }
.st-cmdk li[aria-selected=true] i { color: var(--accent); }
.st-cmdk li.none { color: var(--dim); cursor: default; justify-content: center; }
.st-cmdk .foot { display: flex; align-items: center; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }
.st-cmdk .foot kbd { margin-right: 3px; padding: 2px 4px; font-size: 10px; }
.st-cmdk .foot .mono { font-size: 10.5px; }

/* ───────── drop veil ───────── */
.st-dropveil { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(11,12,15,.78); backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s var(--ease); pointer-events: none; }
.st-dropveil.on { opacity: 1; }
.st-dropveil .box { display: grid; justify-items: center; gap: 10px; padding: 48px 64px; border: 2px dashed var(--accent-a35); border-radius: 22px; background: var(--accent-a08); transform: scale(.97); transition: transform .25s var(--ease); }
.st-dropveil.on .box { transform: none; }
.st-dropveil i { font-size: 40px; color: var(--accent); }
.st-dropveil b { font: 700 22px/1.2 var(--font-display); }
.st-dropveil span { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

/* ───────── states & responsive ───────── */
.st-app[data-state=boot] .st-panel-scroll { opacity: .6; pointer-events: none; }
.st-app.is-exporting .st-panel-scroll { pointer-events: none; opacity: .72; transition: opacity var(--t-med); }
@media (max-width: 1280px) {
  .st-range-read span:nth-child(3), .st-vol .st-range { display: none; }
  .st-cmdk-btn { min-width: 0; }
  .st-cmdk-btn span { display: none; }
}
@media (max-width: 1040px) { :root { --st-lab-w: 92px; } .st-proj .label, .st-save span { display: none; } .st-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  html, body.st-body { overflow: auto; height: auto; }
  .st-app { height: auto; grid-template-rows: var(--st-top) auto; }
  .st-work { grid-template-columns: 1fr; }
  .st-stage { grid-template-rows: 70vh auto; }
  .st-panel { border-left: 0; border-top: 1px solid var(--line); }
  .st-panel-scroll { overflow: visible; }
  .st-panel-foot { position: sticky; bottom: 0; }
  .st-range-read, .st-vol, .st-tl-legend .hint { display: none; }
  .st-brand .wm, .st-top-sep { display: none; }
}
.st-cmdk .in input:focus-visible { box-shadow: none; }

/* My styles: user-saved looks in the grid */
.st-look.is-style .th { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.st-look.is-style .nm { color: var(--text, #e8e8ea); }
.st-look.is-style .nm::before { content: "●"; color: var(--accent); font-size: 8px; margin-right: 5px; vertical-align: 2px; }

/* looks list: while it scrolls, tiles ignore the pointer (no hover effects, no hit-testing, no live thumbnails) and
   */
.st-looks.is-scrolling .st-look { pointer-events: none; }
.st-looks.is-scrolling .st-look .th { transition: none; box-shadow: 0 0 0 1px var(--line); transform: none; }
.st-ai-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: transparent; color: var(--text); font-size: var(--fs-md); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.st-ai-btn[hidden] { display: none; }
.st-ai-btn:hover { border-color: var(--dim); background: var(--bg-2); }
.st-ai-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.st-ai-btn:not([hidden]) + .st-cmdk-btn { margin-left: 8px; }
/* the label stays at every width (on phones too); the highlighted look is in ai.css */
