/* Studio (/create, /studio; assets/wkx-studio.js). Scoped to body.studio-active
   and .st-* so no other page changes. Tokens: --pt-*. Accents: violet = actions,
   cyan = AI state, lane hues from the track families; purple→blue gradient only
   on primary actions (Generate). */

/* ── the page takes the whole workspace ─────────────────────────────────── */
body.studio-active:not(#_) .app-shell > .main > .workspace {
  padding: 0 !important; gap: 0 !important; min-height: 0 !important; background: #05070d !important;
}
body.studio-active:not(#_) .content-panel { padding: 0 !important; overflow: visible !important; }
body.studio-active:not(#_) #results { display: block !important; }

.st-root {
  --rail-w: 236px; --ai-w: 384px; --line: rgba(148, 163, 255, .1); --line-2: rgba(148, 163, 255, .16);
  --panel: rgba(12, 16, 28, .82); --panel-2: rgba(16, 21, 36, .9); --txt: #f3f4fb; --mut: rgba(170, 180, 206, .72);
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - var(--titlebar-h, 0px) - var(--player-height, 80px));
  min-height: 560px; color: var(--txt); font-size: 13px;
  background: radial-gradient(1100px 500px at 30% -20%, rgba(91, 58, 255, .1), transparent 60%), #05070d;
}
body:not(.has-titlebar) .st-root { height: calc(100vh - var(--player-height, 80px)); }
.st-root[data-rail="closed"] { --rail-w: 52px; }
.st-root[data-ai="closed"] { --ai-w: 44px; }
@media (max-width: 1599px) { .st-root { --ai-w: 348px; } }
@media (max-width: 1439px) { .st-root { --ai-w: 320px; --rail-w: 220px; } }
.st-ico { width: 16px; height: 16px; flex: none; }
.st-muted { color: var(--mut); font-size: 12px; margin: 0; }
.st-link { color: #b8a4ff; text-decoration: none; }
.st-link:hover { text-decoration: underline; }

/* ── top nav (Studio tabs + the shared top bar) ─────────────────────────── */
.st-topnav {
  display: flex; align-items: center; gap: 16px; min-width: 0; padding: 8px 16px;
  border-bottom: 1px solid var(--line); background: rgba(6, 8, 15, .85);
}
.st-navs { display: flex; gap: 2px; flex: none; }
.st-nav {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--mut); font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.st-nav:hover:not(:disabled) { color: var(--txt); background: rgba(148, 163, 255, .06); }
.st-nav.is-active { color: #fff; border-color: rgba(167, 139, 250, .55); background: rgba(124, 92, 255, .14); box-shadow: 0 0 14px rgba(124, 92, 255, .22); }
.st-nav:disabled { opacity: .45; cursor: default; }
.st-nav small { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 4px; }
.st-topbar { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.st-topbar #createTopbar { width: 100%; min-width: 0; margin: 0 !important; padding: 0 !important; }
.st-topbar .pt-topbar { margin: 0 !important; padding: 0 !important; min-height: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 1599px) { .st-nav { padding: 0 9px; } .st-nav small { display: none; } }
@media (max-width: 1439px) { .st-nav[data-st-nav="models"], .st-nav[data-st-nav="datasets"], .st-nav[data-st-nav="train"] { display: none; } }

/* ── three columns ──────────────────────────────────────────────────────── */
.st-body { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--ai-w); min-height: 0; transition: grid-template-columns .2s ease; }
.st-rail, .st-ai { position: relative; min-height: 0; background: rgba(8, 11, 20, .72); }
.st-rail { border-right: 1px solid var(--line); overflow: hidden; }
.st-ai { border-left: 1px solid var(--line); overflow: hidden; }
.st-rail-inner { height: 100%; overflow-y: auto; padding: 14px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.st-root[data-rail="closed"] .st-rail-inner { display: none; }
.st-rail-toggle, .st-ai-toggle {
  position: absolute; top: 10px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--mut);
}
.st-rail-toggle:hover, .st-ai-toggle:hover { color: var(--txt); border-color: rgba(167, 139, 250, .5); }
.st-rail-toggle { right: 10px; }
.st-root[data-rail="open"] .st-rail-inner { padding-top: 50px; }
.st-ai-toggle { left: 7px; }
.st-root[data-ai="open"] .st-ai-toggle { left: auto; right: 10px; }
.st-root[data-ai="closed"] .st-ai-inner { display: none; }

/* rail */
.st-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 11px; cursor: pointer;
  border: 1px solid rgba(196, 181, 253, .35); color: #fff; font-weight: 600; font-size: 13.5px; font-family: inherit;
  background: linear-gradient(100deg, #7c5cff, #4f6bff); box-shadow: 0 6px 20px rgba(92, 80, 255, .3);
}
.st-new:hover { filter: brightness(1.08); }
.st-rail-label { display: flex; justify-content: space-between; margin: 8px 2px 0; color: var(--mut); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.st-active { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid rgba(167, 139, 250, .35); background: rgba(124, 92, 255, .1); min-width: 0; }
.st-active.is-empty { color: var(--mut); border-style: dashed; justify-content: center; }
.st-active-art, .st-recent-art, .st-head-art {
  flex: none; position: relative; overflow: hidden; border-radius: 9px;
  background: linear-gradient(135deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 60) 70% 25%));
}
.st-active-art { width: 44px; height: 44px; }
.st-recent-art { width: 34px; height: 34px; border-radius: 7px; }
.st-head-art { width: 56px; height: 56px; border-radius: 11px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.st-active-art img, .st-recent-art img, .st-head-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-active-text, .st-recent-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.st-active-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-active-text span, .st-recent-meta { font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-recents { display: flex; flex-direction: column; gap: 2px; min-height: 0; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.st-recent {
  display: flex; gap: 9px; align-items: center; padding: 6px; border-radius: 9px; cursor: pointer; text-align: left; min-width: 0;
  border: 1px solid transparent; background: none; color: var(--txt); font: inherit; transition: background .15s, border-color .15s;
}
.st-recent:hover { background: rgba(148, 163, 255, .06); }
.st-recent.is-active { background: rgba(124, 92, 255, .12); border-color: rgba(167, 139, 250, .3); }
.st-recent-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.st-dot.is-live { background: #22d3ee; box-shadow: 0 0 8px #22d3ee; animation: st-pulse 1.4s ease-in-out infinite; }
.st-dot.is-failed { background: #ff5d72; }
.st-storage { margin-top: auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.st-storage-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); gap: 8px; }
.st-storage-head strong { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }
.st-storage-bar { height: 4px; margin-top: 9px; border-radius: 99px; background: rgba(148, 163, 255, .12); overflow: hidden; }
.st-storage-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c5cff, #4f8dff); }
.st-storage-bar.is-full i { background: linear-gradient(90deg, #f59e0b, #ff5d72); }

/* ── center ─────────────────────────────────────────────────────────────── */
.st-center { min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.st-center > * { flex-shrink: 0; }   /* the column scrolls; its panels never squash into each other */
.st-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st-head-text { min-width: 0; flex: 1; }
.st-head h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(20, 26, 41, .7); color: #cfd3ea; font-size: 11.5px; }
.st-chip.is-num { font-variant-numeric: tabular-nums; }
.st-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.st-save { display: inline-flex; align-items: center; gap: 5px; color: #6ee7b7; font-size: 12px; margin-right: 4px; }
.st-save .st-ico { width: 14px; height: 14px; }
.st-save.is-live { color: #67e8f9; }
.st-save.is-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: st-pulse 1.4s infinite; }
.st-save.is-failed { color: #ff8a98; }
.st-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--txt); font-weight: 600; font-size: 12.5px; font-family: inherit; white-space: nowrap;
  transition: border-color .15s, background .15s, transform .08s;
}
.st-btn:hover:not(:disabled) { border-color: rgba(167, 139, 250, .5); background: rgba(124, 92, 255, .12); }
.st-btn:active:not(:disabled) { transform: translateY(1px); }
.st-btn:disabled { opacity: .45; cursor: default; }
.st-btn.is-icon { width: 34px; padding: 0; justify-content: center; }
.st-btn.is-small { height: 28px; padding: 0 10px; font-size: 12px; }
.st-btn.is-primary { background: linear-gradient(100deg, #7c5cff, #4f6bff); border-color: rgba(196, 181, 253, .35); }
.st-ico.is-down { transform: rotate(90deg); width: 12px; height: 12px; }
.st-menu-wrap { position: relative; }
.st-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; padding: 6px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #111829; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.st-menu a, .st-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: none; color: var(--txt); font-weight: 500; font-size: 12.5px; font-family: inherit; text-decoration: none; cursor: pointer; }
.st-menu a:hover, .st-menu button:hover { background: rgba(124, 92, 255, .14); }

/* progress (the run's own stages) */
.st-progress { border-radius: 12px; border: 1px solid rgba(34, 211, 238, .3); background: linear-gradient(90deg, rgba(34, 211, 238, .07), rgba(12, 16, 28, .8) 60%); padding: 10px 12px; }
.st-progress.is-failed { border-color: rgba(255, 93, 114, .35); background: linear-gradient(90deg, rgba(255, 93, 114, .08), rgba(12, 16, 28, .8) 60%); }
.st-progress-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-progress-head strong { font-size: 13px; }
.st-progress-head span { color: var(--mut); font-size: 12px; flex: 1; min-width: 0; }
.st-stages { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.st-stages li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); min-width: 0; }
.st-stages li.is-completed { color: #d1fae5; }
.st-stages li.is-running { color: #fff; }
.st-stages li.is-failed { color: #ff8a98; }
.st-stage-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-stage-detail { font-size: 11px; color: var(--mut); white-space: nowrap; }
.st-stages li.is-running .st-stage-detail { color: #67e8f9; }
.st-stage-mark { display: grid; place-items: center; }
.st-stage-mark .st-ico { width: 14px; height: 14px; }
.is-completed .st-stage-mark { color: #34d399; }
.st-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .25); border-top-color: #22d3ee; animation: st-spin .8s linear infinite; }
.st-wait { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(148, 163, 255, .35); }
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-pulse { 50% { opacity: .35; } }

/* song structure */
.st-structure { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.st-structure.is-empty { padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 11px; }
.st-sec {
  flex: 1 0 104px; max-width: 170px; display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 6px; border-radius: 10px; cursor: pointer; text-align: left;
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, rgba(12, 16, 28, .9)), rgba(12, 16, 28, .9));
  color: var(--txt); font: inherit; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.st-sec:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.st-sec.is-selected { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 16px color-mix(in srgb, var(--c) 35%, transparent); }
.st-sec-name { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sec-time { font-size: 10.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.st-sec-wave { width: 100%; height: 20px; margin-top: 2px; opacity: .85; }
.st-sec.is-add { flex: 0 0 92px; align-items: center; justify-content: center; border: 1px dashed var(--line-2); background: none; color: var(--mut); font-size: 11.5px; }
.st-sec.is-add:disabled { cursor: default; opacity: .55; }

/* DAW */
.st-daw { border-radius: 14px; border: 1px solid var(--line); background: var(--panel); outline: none; display: flex; flex-direction: column; min-height: 0; }
.st-daw:focus-visible { border-color: rgba(167, 139, 250, .45); }
.st-toolbar { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; row-gap: 6px; }
.st-tools, .st-transport, .st-zoom, .st-views, .st-facts { display: flex; align-items: center; gap: 4px; }
.st-tool, .st-tbtn {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--mut); transition: color .12s, background .12s, border-color .12s;
}
.st-tool:hover, .st-tbtn:hover:not(:disabled) { color: var(--txt); background: rgba(148, 163, 255, .08); }
.st-tool.is-active, .st-tool[aria-pressed="true"], .st-tbtn[aria-pressed="true"] { color: #c4b5fd; border-color: rgba(167, 139, 250, .4); background: rgba(124, 92, 255, .12); }
.st-tbtn:disabled { opacity: .35; cursor: default; }
.st-tbtn.is-play { width: 34px; height: 34px; border-radius: 50%; color: #fff; border: 1px solid rgba(196, 181, 253, .5); background: rgba(124, 92, 255, .25); }
.st-tbtn.is-play.is-big { width: 44px; height: 44px; background: linear-gradient(135deg, #8b5cf6, #5b5cf6); box-shadow: 0 0 18px rgba(124, 92, 255, .45); }
.st-tbtn .i-pause, .st-tbtn.is-playing .i-play { display: none; }
.st-tbtn.is-playing .i-pause { display: block; }
.st-select { height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: #0b1020; color: var(--txt); font-size: 12px; font-family: inherit; padding: 0 6px; }
.st-clock { display: flex; flex-direction: column; align-items: center; min-width: 96px; padding: 3px 10px; border-radius: 9px; background: #070a14; border: 1px solid var(--line); }
.st-clock strong { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.st-clock span { font-size: 9.5px; color: var(--mut); letter-spacing: .08em; }
.st-facts span { display: flex; flex-direction: column; align-items: center; padding: 0 8px; font-size: 9.5px; color: var(--mut); letter-spacing: .08em; }
.st-facts strong { font-size: 13px; color: var(--txt); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.st-views { margin-left: auto; padding: 3px; border-radius: 10px; background: #070a14; border: 1px solid var(--line); }
.st-view { height: 26px; padding: 0 10px; border-radius: 7px; border: 0; background: none; color: var(--mut); font-weight: 600; font-size: 12px; font-family: inherit; cursor: pointer; }
.st-view.is-active { color: #fff; background: rgba(124, 92, 255, .22); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45); }
.st-viewbox { min-height: 0; }

/* timeline */
.st-tl { display: grid; grid-template-columns: 184px minmax(0, 1fr); max-height: 440px; overflow-y: auto; }
.st-tl-heads { border-right: 1px solid var(--line); background: rgba(8, 11, 20, .6); position: relative; z-index: 2; }
.st-tl-corner { height: 44px; display: flex; align-items: flex-end; padding: 0 12px 6px; font-size: 10.5px; color: var(--mut); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.st-lane-head { height: 38px; display: grid; grid-template-columns: 26px minmax(0, 1fr) 24px 24px; align-items: center; gap: 6px; padding: 0 8px 0 10px; border-bottom: 1px solid rgba(148, 163, 255, .06); }
.st-lane-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.st-lane-icon .st-ico { width: 14px; height: 14px; }
.st-lane-name { display: flex; flex-direction: column; min-width: 0; }
.st-lane-name strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-lane-name small { font-size: 10px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-lane-head.is-empty { opacity: .45; }
.st-lane-head.is-silent .st-lane-icon, .st-lane-head.is-silent strong { opacity: .45; }
.st-ms {
  width: 24px; height: 22px; padding: 0; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 10.5px; line-height: 1; font-family: inherit;
  border: 1px solid var(--line-2); background: #0b1020; color: var(--mut); transition: background .12s, color .12s, border-color .12s;
}
.st-ms:hover { color: var(--txt); }
.st-ms[data-st-mute][aria-pressed="true"] { background: rgba(251, 191, 36, .22); border-color: rgba(251, 191, 36, .7); color: #fde68a; }
.st-ms[data-st-solo][aria-pressed="true"] { background: rgba(34, 211, 238, .2); border-color: rgba(34, 211, 238, .7); color: #a5f3fc; }
.st-ms-slot { grid-column: span 2; }
.st-tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; }
.st-tl-canvas {
  position: relative; min-width: 100%;
  background-image: linear-gradient(90deg, rgba(148, 163, 255, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 255, .04) 1px, transparent 1px);
  background-size: var(--bar) 100%, var(--minor) 100%;
}
.st-ruler { position: relative; height: 24px; border-bottom: 1px solid var(--line); cursor: pointer; background: rgba(7, 10, 20, .85); }
.st-ruler span { position: absolute; top: 5px; padding-left: 4px; border-left: 1px solid rgba(148, 163, 255, .35); font-size: 10.5px; color: var(--mut); font-variant-numeric: tabular-nums; line-height: 14px; }
.st-bands { position: relative; height: 20px; border-bottom: 1px solid var(--line); }
.st-band {
  position: absolute; top: 2px; bottom: 2px; padding: 0 6px; border-radius: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  font-size: 10.5px; font-weight: 600; line-height: 16px; color: #fff; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
}
.st-band.is-selected { background: color-mix(in srgb, var(--c) 55%, transparent); border-color: var(--c); }
.st-lane { position: relative; height: 38px; border-bottom: 1px solid rgba(148, 163, 255, .06); cursor: text; }
.st-lane canvas { position: absolute; left: 0; top: 0; }
.st-lane.is-empty { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(148, 163, 255, .025) 8px 16px); cursor: default; }
.st-lane.is-silent canvas { opacity: .3; filter: saturate(.3); }
.st-lane.is-picked { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 5%, transparent); }
.st-sel { position: absolute; top: 44px; bottom: 0; background: rgba(167, 139, 250, .07); border-left: 1px solid rgba(196, 181, 253, .6); border-right: 1px solid rgba(196, 181, 253, .6); pointer-events: none; }
.st-loopzone { position: absolute; top: 0; height: 24px; background: rgba(124, 92, 255, .35); pointer-events: none; }
.st-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #c084fc; box-shadow: 0 0 8px rgba(192, 132, 252, .8); pointer-events: none; z-index: 4; will-change: transform; }
.st-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #c084fc; }

.st-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; color: var(--mut); text-align: center; padding: 20px; }
.st-empty .st-ico { width: 30px; height: 30px; color: #a78bfa; }
.st-empty strong { color: var(--txt); font-size: 14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.st-table th { text-align: left; color: var(--mut); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.st-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.st-table tr[data-st-section] { cursor: pointer; }
.st-table tr[data-st-section]:hover td { background: rgba(124, 92, 255, .06); }
.st-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.st-strips { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.st-strip { width: 92px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; border-radius: 11px; border: 1px solid var(--line); background: #0a0e1a; border-top: 2px solid var(--c); }
.st-strip strong { font-size: 11.5px; text-align: center; }
.st-strip input.is-vertical { writing-mode: vertical-lr; direction: rtl; height: 150px; width: 26px; accent-color: var(--c); }
.st-strip-meter { width: 6px; height: 40px; border-radius: 3px; background: rgba(148, 163, 255, .1); position: relative; overflow: hidden; }
.st-strip-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--lvl, 0%); background: linear-gradient(0deg, #34d399, #fbbf24 70%, #ff5d72); transition: height .06s linear; }
.st-strip-ms { display: flex; gap: 4px; }

/* lower row: stems · preview · AI tools */
.st-lower { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .82fr); gap: 10px; }
.st-card { border-radius: 14px; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; min-width: 0; }
.st-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.st-card h2 { margin: 0; font-size: 13px; font-weight: 700; }
.st-stemrow { display: grid; grid-template-columns: 8px minmax(60px, 90px) minmax(40px, 1fr) 52px 26px 24px 24px; align-items: center; gap: 7px; height: 28px; }
.st-stemrow-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.st-stemrow-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-stemrow input[type=range] { width: 100%; accent-color: var(--c); height: 4px; }
.st-db { font-size: 11px; color: var(--mut); text-align: right; font-variant-numeric: tabular-nums; }
.st-meter { height: 6px; border-radius: 3px; background: rgba(148, 163, 255, .1); overflow: hidden; }
.st-meter i { display: block; height: 100%; width: var(--lvl, 0%); background: linear-gradient(90deg, #34d399, #fbbf24 75%, #ff5d72); transition: width .06s linear; }
.st-seg { display: flex; padding: 2px; border-radius: 8px; background: #070a14; border: 1px solid var(--line); }
.st-seg button { height: 22px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--mut); font-weight: 600; font-size: 11px; font-family: inherit; cursor: pointer; }
.st-seg button.is-active { background: rgba(124, 92, 255, .25); color: #fff; }
.st-seg button:disabled { opacity: .4; cursor: default; }
.st-preview-wave { width: 100%; height: 76px; display: block; cursor: pointer; border-radius: 9px; background: #070a14; }
.st-preview-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.st-time { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; min-width: 78px; }
.st-vol { display: flex; align-items: center; gap: 6px; color: var(--mut); margin-left: auto; }
.st-vol input { width: 80px; accent-color: #8b5cf6; }
.st-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.st-action {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start; padding: 7px 9px; border-radius: 9px; cursor: pointer; text-align: left; min-width: 0;
  border: 1px solid rgba(167, 139, 250, .3); background: rgba(124, 92, 255, .08); color: var(--txt); font: inherit;
  transition: border-color .15s, background .15s;
}
.st-action:hover:not(:disabled) { border-color: rgba(167, 139, 250, .7); background: rgba(124, 92, 255, .16); }
.st-action strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-action small { font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-action.is-off { border-color: var(--line); background: rgba(12, 16, 28, .6); cursor: not-allowed; }
.st-action.is-off strong { color: var(--mut); }
@media (max-width: 1599px) {
  .st-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-actions { grid-column: 1 / -1; }
  .st-action-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 1439px) {
  .st-lane-name small { display: none; }
  .st-facts { display: none; }
  .st-head-actions .st-btn span { display: none; }
}

/* ── AI panel ───────────────────────────────────────────────────────────── */
.st-ai-inner { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.st-ai-tabs { display: flex; gap: 4px; padding: 10px 50px 10px 12px; border-bottom: 1px solid var(--line); }
.st-ai-tab { flex: 1; height: 32px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--mut); font-weight: 600; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.st-ai-tab:hover { color: var(--txt); }
.st-ai-tab.is-active { color: #fff; border-color: rgba(167, 139, 250, .5); background: rgba(124, 92, 255, .15); box-shadow: 0 0 12px rgba(124, 92, 255, .2); }
.st-ai-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; scrollbar-width: thin; }
.st-ai-pane[hidden] { display: none; }
.st-ai-intro { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-ai-intro > div, .st-ai-intro { min-width: 0; }
.st-ai-intro strong { display: block; font-size: 14px; }
.st-ai-intro span { display: block; color: var(--mut); font-size: 12px; }
.st-orb { width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c4b5fd, #7c3aed 45%, #1e1b4b 75%); box-shadow: 0 0 18px rgba(124, 92, 255, .5); animation: st-breathe 4s ease-in-out infinite; }
@keyframes st-breathe { 50% { box-shadow: 0 0 26px rgba(124, 92, 255, .75); } }
.st-edit-free textarea { width: 100%; min-height: 64px; resize: none; box-sizing: border-box; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); background: #070a14; color: var(--mut); font-size: 12.5px; font-family: inherit; }
.st-edits { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.st-edits li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(12, 16, 28, .6); font-size: 12.5px; }
.st-edits li.is-on { border-color: rgba(167, 139, 250, .35); }
.st-edits li.is-off span { color: var(--mut); }
.st-edits em { font-style: normal; font-size: 10.5px; color: var(--mut); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.st-voice-apply { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 11px; border: 1px solid rgba(167, 139, 250, .3); background: rgba(124, 92, 255, .06); }
.st-voice-apply.is-off { opacity: .6; border-color: var(--line); }
.st-voice-row { display: flex; gap: 6px; }
.st-voice-row select { flex: 1; min-width: 0; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: #0b1020; color: var(--txt); font-size: 12.5px; font-family: inherit; }
.st-note { font-size: 12px; color: #c4b5fd; min-height: 0; }

/* the Create workspace inside the AI panel: same page, compact */
.st-create-host .create-shell { padding: 0 !important; margin: 0 !important; max-width: none !important; }
.st-create-host .create-hero, .st-create-host .create-topbar-slot { display: none !important; }
.st-create-host .create-tabs.create-modes {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 4px !important; width: 100% !important;
  padding: 4px !important; margin: 0 0 10px !important;
}
.st-create-host .create-tabs.create-modes .create-tab { min-height: 32px !important; height: auto !important; padding: 6px 8px !important; font-size: 12px !important; justify-content: flex-start !important; }
.st-create-host .create-tabs.create-modes .create-tab[data-tab="sample-song"] { grid-column: 1 / -1; }
.st-create-host .create-tabs.create-modes .create-tab.is-minor[title="Not available yet"] { opacity: .5; }
.st-create-host .create-step { padding: 12px !important; }
.st-create-host .create-step-header .create-step-sub { display: none; }
.st-create-host .create-gens { margin-top: 12px !important; }
.st-create-host .create-gens-head, .st-create-host #createHistory { display: none !important; }
.st-create-host .create-cta button, .st-create-host #sampleCreateButton, .st-create-host #createButton { background: linear-gradient(100deg, #7c5cff, #4f6bff) !important; }

/* narrower windows: the rail becomes icons-only, the AI panel can close */
@media (max-width: 1279px) {
  .st-root { --ai-w: 300px; }
  .st-root[data-rail="open"] { --rail-w: 200px; }
  .st-lower { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .st-orb, .st-dot.is-live, .st-save.is-live i, .st-spin { animation: none; }
  .st-body { transition: none; }
}

/* ── the shared top bar in the Studio nav row: one row at every width ────── */
.st-topbar .pt-topbar-inner { flex-wrap: nowrap !important; gap: 10px !important; }
.st-topbar .pt-topbar-search { flex: 1 1 auto !important; min-width: 150px !important; width: auto !important; max-width: 520px !important; }
.st-topbar .pt-topbar-right { flex: none !important; flex-wrap: nowrap !important; gap: 8px !important; }
@media (max-width: 1799px) { .st-topbar .pt-topbar-stats, .st-topbar .pt-topbar-embed { display: none !important; } }
@media (max-width: 1439px) { .st-topbar .pt-topbar-search kbd, .st-topbar .pt-topbar-search .pt-topbar-kbd { display: none !important; } }

/* card titles never wrap under their notes */
.st-card > header h2 { white-space: nowrap; flex: none; }
.st-card > header .st-muted { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }

/* narrow: lane names stay readable (the icon and M/S shrink first) */
@media (max-width: 1439px) {
  .st-tl { grid-template-columns: 170px minmax(0, 1fr); }
  .st-lane-head { grid-template-columns: 20px minmax(0, 1fr) 22px 22px; gap: 5px; padding: 0 6px 0 8px; }
  .st-lane-icon { width: 20px; height: 20px; }
  .st-lane-head .st-ms { width: 22px; height: 20px; font-size: 10px; }
  .st-lane-name strong { font-size: 12px; }
}

/* The Studio fills the window and scrolls inside its own columns: the document
   never scrolls (a scrollIntoView in the AI panel would otherwise lift the
   whole app, nav included, under the title bar). */
html:has(> body.studio-active), body.studio-active { overflow: hidden !important; }
