/* Train Your Producer AI (/producer-ai, assets/wkx-producerai.js). Tokens
   only (--pt-*); cyan = AI state, violet = actions, no gold (no rewards here).
   body.producer-ai-active (updateNavActive) scopes the layout rules below:
   one wide content column, the old profile card hidden, and the app's session
   panel (Now Playing / Queue / Similar Sounds / BPM & Key) as the right rail. */

/* ── Page layout on this route ─────────────────────────────────────────── */
body.producer-ai-active:not(#_) .workspace > .profile-panel,
body.producer-ai-active:not(#_) .panel-header,
body.producer-ai-active:not(#_) #status,
body.producer-ai-active:not(#_) #mode,
body.producer-ai-active:not(#_) #note,
body.producer-ai-active:not(#_) .embedding-status-panel { display: none !important; }
body.producer-ai-active:not(#_) .app-shell > .main > .workspace {
  grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important;
  padding: 22px 32px calc(var(--player-height, 84px) + 32px) !important;
}
body.producer-ai-active:not(#_) .content-panel {
  padding: 0 !important; background: none !important; border: 0 !important;
  box-shadow: none !important; backdrop-filter: none !important; border-radius: 0 !important; overflow: visible !important;
}
body.producer-ai-active:not(#_) .content-panel::before { display: none; }
body.producer-ai-active:not(#_) #results { display: block !important; }

.pai-page { max-width: 1240px; margin: 0 auto; color: var(--pt-text-primary); }
.pai-ico { width: 18px; height: 18px; flex: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
.pai-hero { position: relative; padding: 6px 0 4px; }
.pai-hero-text { position: relative; z-index: 1; }
.pai-hero h1 { font-size: clamp(34px, 2.9vw, 44px); line-height: 1.08; font-weight: 750; letter-spacing: -.025em; margin: 0 0 12px; }
.pai-grad {
  background: linear-gradient(95deg, #b794ff 0%, #9b6cff 45%, #7c8dff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pai-hero p { margin: 0 0 22px; max-width: 620px; color: var(--pt-text-secondary); font-size: 15px; line-height: 1.6; }
.pai-hero-wave {
  position: absolute; z-index: 0; top: 0; right: 0; width: min(38%, 420px); height: 130px;
  display: flex; align-items: center; gap: 3px; pointer-events: none; opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 70%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 25%, #000 70%, transparent);
}
.pai-hero-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: linear-gradient(180deg, #a78bfa, rgba(124, 92, 255, .25)); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.pai-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.pai-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 40px; padding: 0 18px; cursor: pointer;
  border-radius: var(--pt-radius-control); border: 1px solid var(--pt-border-strong);
  background: var(--pt-bg-elevated); color: var(--pt-text-primary); font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1; text-decoration: none;
  white-space: nowrap; user-select: none;
  transition: border-color var(--pt-dur) var(--pt-ease), background var(--pt-dur) var(--pt-ease),
              box-shadow var(--pt-dur) var(--pt-ease), opacity var(--pt-dur) var(--pt-ease);
}
.pai-btn .pai-ico { width: 17px; height: 17px; color: var(--pt-text-secondary); transition: color var(--pt-dur) var(--pt-ease); }
.pai-btn:hover { border-color: var(--pt-border-hover); background: rgba(124, 92, 255, .12); }
.pai-btn:hover .pai-ico { color: var(--pt-text-primary); }
.pai-btn:active { transform: translateY(1px); }
.pai-btn:disabled, .pai-btn.is-loading { opacity: .55; cursor: progress; }
.pai-btn.is-lg { height: 50px; padding: 0 26px; font-size: 14.5px; border-radius: 12px; min-width: 196px; }
.pai-btn.is-primary { background: var(--pt-cta-gradient); border-color: rgba(196, 181, 253, .35); box-shadow: 0 6px 22px rgba(124, 92, 255, .32); }
.pai-btn.is-primary .pai-ico { color: #fff; }
.pai-btn.is-primary:hover { box-shadow: 0 8px 28px rgba(124, 92, 255, .46); filter: brightness(1.06); }
.pai-btn.is-danger { color: #ff6b7d; border-color: rgba(255, 77, 98, .45); background: rgba(255, 77, 98, .04); }
.pai-btn.is-danger .pai-ico { color: #ff6b7d; }
.pai-btn.is-danger:hover { border-color: rgba(255, 77, 98, .75); background: rgba(255, 77, 98, .1); }
.pai-btn:focus-visible, .pai-chip:focus-visible, .pai-link:focus-visible, .pai-play:focus-visible,
.pai-deck-btn:focus-visible, .pai-deck-bar:focus-visible { outline: none; box-shadow: var(--pt-focus-ring); }

.pai-upload-note { color: var(--pt-text-muted); font-size: var(--pt-fs-meta); min-height: 0; margin: 10px 0 0; }
.pai-upload-note:empty { display: none; }
.pai-upload-note.is-error { color: #ff8a98; }
.pai-folder-form { display: flex; gap: 10px; margin-top: 14px; max-width: 760px; }
.pai-folder-form[hidden] { display: none; }
.pai-folder-form .pai-search-field { height: 42px; }
.pai-folder-form .pai-btn { height: 42px; }
label.pai-btn.is-loading { pointer-events: none; }

/* ── Status banner / analysis progress ──────────────────────────────── */
#paiProgress { margin-top: 18px; }
.pai-banner, .pai-progress {
  display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(124, 92, 255, .1), rgba(13, 18, 32, .7) 55%);
  border: 1px solid rgba(139, 120, 255, .24);
}
.pai-banner-ico { width: 24px; height: 24px; color: var(--pt-accent-bright); flex: none; }
.pai-banner-text { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.pai-banner-text strong { font-size: 15px; font-weight: 600; }
.pai-banner-text span { color: var(--pt-text-muted); font-size: 13.5px; }
.pai-progress-body { flex: 1; min-width: 0; }
.pai-progress-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--pt-fs-body); }
.pai-progress-head span { color: var(--pt-text-muted); font-size: var(--pt-fs-meta); }
.pai-bar { height: 6px; margin-top: 10px; border-radius: 999px; background: var(--pt-bg-inset); overflow: hidden; }
.pai-bar i { display: block; height: 100%; background: var(--pt-cyan); border-radius: inherit; transition: width .4s var(--pt-ease); }
.pai-progress.is-busy .pai-bar i { box-shadow: 0 0 12px var(--pt-cyan); }

/* ── Sections ───────────────────────────────────────────────────────── */
.pai-section { margin-top: 30px; }
.pai-section h2 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 14px; }
.pai-note { margin: 12px 0 0; color: var(--pt-text-muted); font-size: 13px; }

/* chips: dark pills; the active one gets a violet hairline, not a fill */
.pai-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pai-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--pt-border-strong); background: rgba(20, 26, 41, .6);
  color: var(--pt-text-primary); font-family: inherit; font-weight: 500; font-size: 13px; line-height: 1;
  transition: border-color var(--pt-dur) var(--pt-ease), background var(--pt-dur) var(--pt-ease), box-shadow var(--pt-dur) var(--pt-ease);
}
.pai-chip .pai-ico { width: 19px; height: 19px; color: var(--pt-accent-bright); }
.pai-chip:hover { border-color: rgba(167, 139, 250, .45); background: rgba(124, 92, 255, .1); }
.pai-chip.is-active { border-color: rgba(167, 139, 250, .75); background: rgba(124, 92, 255, .16); box-shadow: 0 0 0 3px rgba(124, 92, 255, .1), 0 0 16px rgba(124, 92, 255, .16); }
.pai-chips.is-plain { margin-top: 14px; gap: 8px; }
.pai-chips.is-plain .pai-chip { height: 34px; padding: 0 15px; border-radius: 999px; font-size: 12.5px; }

/* ── Profile (once beats are analyzed) ──────────────────────────────── */
#paiProfile:not(:empty) .pai-grid { margin-top: 16px; }
.pai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pai-card { padding: 16px 18px; border-radius: var(--pt-radius-card); background: var(--pt-bg-card); border: 1px solid var(--pt-border-card); min-width: 0; }
.pai-card.pai-wide { grid-column: 1 / -1; }
.pai-card h3 { margin: 0 0 10px; font-size: var(--pt-fs-card); font-weight: 650; }
.pai-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.pai-big small { font-size: 13px; font-weight: 500; color: var(--pt-text-muted); }
.pai-meta { color: var(--pt-text-muted); font-size: var(--pt-fs-meta); margin: 6px 0; }
.pai-foot { margin-top: 10px; }
.pai-hist { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 10px; }
.pai-hist i { flex: 1; background: var(--pt-accent-bright); opacity: .8; border-radius: 3px 3px 0 0; }
.pai-hist-axis { display: flex; justify-content: space-between; color: var(--pt-text-muted); font-size: 11px; margin-top: 4px; }
.pai-curve { width: 100%; height: 64px; margin-top: 6px; }
.pai-curve polyline { fill: none; stroke: var(--pt-cyan); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.pai-keys, .pai-list, .pai-eras, .pai-results { list-style: none; margin: 0; padding: 0; }
.pai-keys li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--pt-border-subtle); font-size: var(--pt-fs-body); }
.pai-keys b { color: var(--pt-text-secondary); font-weight: 600; }
.pai-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; font-size: var(--pt-fs-body); flex-wrap: wrap; }
.pai-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: var(--pt-fs-body); }
.pai-dl dt { color: var(--pt-text-secondary); }
.pai-dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.pai-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.pai-tag { padding: 4px 10px; border-radius: var(--pt-radius-pill); background: var(--pt-accent-soft); color: var(--pt-text-accent); font-size: 12px; }
.pai-eras li { display: grid; grid-template-columns: 90px 180px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pt-border-subtle); font-size: var(--pt-fs-body); }
.pai-eras strong { text-transform: capitalize; }
.pai-eras span { color: var(--pt-text-secondary); }

/* ── Search ─────────────────────────────────────────────────────────── */
.pai-search { display: flex; gap: 12px; }
.pai-search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 18px; cursor: text;
  border-radius: 12px; border: 1px solid var(--pt-border-strong); background: var(--pt-bg-inset);
  transition: border-color var(--pt-dur) var(--pt-ease), box-shadow var(--pt-dur) var(--pt-ease);
}
.pai-search-field .pai-ico { width: 20px; height: 20px; color: var(--pt-text-muted); }
.pai-search-field:focus-within { border-color: var(--pt-border-active); box-shadow: 0 0 0 3px rgba(124, 92, 255, .14); }
.pai-search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--pt-text-primary); font-family: inherit; font-size: 15px; outline: none; }
.pai-search-field input::placeholder { color: var(--pt-text-muted); }
.pai-btn.is-search { height: 50px; min-width: 168px; font-size: 15px; border-radius: 12px; }

#paiResults:not(:empty) { margin-top: 16px; }
.pai-results { border-radius: 14px; border: 1px solid var(--pt-border-card); background: var(--pt-bg-card); overflow: hidden; }
.pai-results li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center;
  padding: 9px 16px; border-bottom: 1px solid var(--pt-border-subtle); transition: background var(--pt-dur) var(--pt-ease);
}
.pai-results li:last-child { border-bottom: 0; }
.pai-results li:hover { background: rgba(124, 92, 255, .06); }
.pai-results .pai-meta { margin: 0; font-variant-numeric: tabular-nums; }
.pai-match { color: var(--pt-accent-bright); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pai-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--pt-fs-body); }
.pai-name em { font-style: normal; color: var(--pt-text-muted); font-size: 11.5px; margin-left: 6px; }
.pai-play {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--pt-border-strong); background: var(--pt-bg-elevated); color: var(--pt-text-primary);
  transition: border-color var(--pt-dur) var(--pt-ease), color var(--pt-dur) var(--pt-ease), box-shadow var(--pt-dur) var(--pt-ease);
}
.pai-play .pai-ico { width: 13px; height: 13px; }
.pai-play .pai-ico-pause, .pai-play.is-playing .pai-ico-play { display: none; }
.pai-play.is-playing .pai-ico-pause { display: block; }
.pai-play:hover, .pai-play.is-playing { border-color: var(--pt-accent-bright); color: var(--pt-accent-bright); }
.pai-play.is-playing { box-shadow: 0 0 12px rgba(124, 92, 255, .35); }
.pai-link { background: none; border: 0; padding: 4px 6px; border-radius: 6px; color: var(--pt-accent-bright); cursor: pointer; font: inherit; font-size: 12.5px; text-align: left; }
.pai-link:hover { background: rgba(124, 92, 255, .1); }
.pai-link.is-danger { color: #ff6b7d; }
.pai-link.is-danger:hover { background: rgba(255, 77, 98, .1); }

.pai-loading { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--pt-text-muted); font-size: 13px; }
.pai-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(167, 139, 250, .25); border-top-color: var(--pt-accent-bright); animation: pai-spin .8s linear infinite; }
@keyframes pai-spin { to { transform: rotate(360deg); } }

/* ── Your beats ─────────────────────────────────────────────────────── */
.pai-table-wrap { border-radius: 14px; border: 1px solid var(--pt-border-card); background: var(--pt-bg-card); overflow-x: auto; }
.pai-table { width: 100%; border-collapse: collapse; font-size: var(--pt-fs-body); }
.pai-table th { text-align: left; color: var(--pt-text-muted); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 11px 12px; border-bottom: 1px solid var(--pt-border-strong); }
.pai-table td { padding: 8px 12px; border-bottom: 1px solid var(--pt-border-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pai-table tbody tr:last-child td { border-bottom: 0; }
.pai-table tbody tr { transition: background var(--pt-dur) var(--pt-ease); }
.pai-table tbody tr:hover { background: rgba(124, 92, 255, .05); }
/* the name takes what the other columns leave and ellipsizes (max-width: 0 lets a table cell shrink) */
.pai-table td.pai-name { width: 40%; max-width: 0; }
.pai-name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pai-table td.pai-status-cell { white-space: normal; min-width: 90px; }
.pai-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pai-play-slot { width: 30px; flex: none; }
.pai-table tr.is-excluded td { opacity: .55; }
.pai-actions { text-align: right; }
.pai-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(148, 163, 255, .08); color: var(--pt-text-secondary); }
.pai-status.is-ready { background: rgba(45, 212, 191, .1); color: var(--pt-success); }
.pai-status.is-processing, .pai-status.is-queued { background: var(--pt-cyan-soft); color: var(--pt-cyan); }
.pai-status.is-failed { background: rgba(255, 77, 98, .1); color: #ff6b7d; }

.pai-empty {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 14px;
  border: 1px dashed rgba(148, 163, 255, .2); background: rgba(13, 18, 32, .45); color: var(--pt-text-muted); font-size: 13.5px;
}
.pai-empty > div { display: flex; flex-direction: column; gap: 3px; }
.pai-empty strong { color: var(--pt-text-primary); font-weight: 600; font-size: 14.5px; }
.pai-empty-ico { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--pt-accent-soft); color: var(--pt-accent-bright); box-sizing: border-box; }
.pai-empty.is-inline { padding: 14px 18px; border-style: solid; border-color: var(--pt-border-subtle); }
.pai-empty.is-error { color: #ff8a98; border-color: rgba(255, 77, 98, .3); }

/* ── Your data ──────────────────────────────────────────────────────── */
.pai-data {
  display: flex; gap: 24px; align-items: flex-start; padding: 24px 26px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 21, 34, .92), rgba(12, 17, 29, .92)); border: 1px solid var(--pt-border-card);
}
.pai-data-ico {
  width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(124, 92, 255, .28), rgba(124, 92, 255, .08) 70%);
  border: 1px solid rgba(139, 120, 255, .22); color: var(--pt-accent-bright);
}
.pai-data-ico .pai-ico { width: 34px; height: 34px; }
.pai-data-body { flex: 1; min-width: 0; }
.pai-data p { margin: 0 0 18px; color: var(--pt-text-secondary); line-height: 1.6; font-size: var(--pt-fs-body); max-width: 760px; }

/* ── Right rail: the session panel on this route ─────────────────────── */
body.producer-ai-active { --session-w: 320px; }
@media (min-width: 1500px) { body.producer-ai-active { --session-w: 352px; } }
/* below the title bar and above the player; docked (≥ 1280 px) it needs no
   header, narrower it is the app's slide-over drawer and keeps its × */
body.producer-ai-active:not(#_) .session-panel {
  top: var(--titlebar-h, 0px); bottom: var(--player-height, 80px); height: auto;
  background: #070910; border-left: 1px solid rgba(148, 163, 255, .08);
}
body.producer-ai-active:not(.has-titlebar):not(#_) .session-panel { top: 0; }
@media (min-width: 1280px) {
  body.producer-ai-active:not(#_) .session-header { display: none; }
}
body.producer-ai-active:not(#_) .session-body { padding: 14px 14px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
body.producer-ai-active:not(#_) .session-section {
  margin: 0; padding: 14px 12px 12px; border-radius: 14px; border: 1px solid rgba(148, 163, 255, .1);
  background: rgba(13, 18, 32, .78);
}
body.producer-ai-active:not(#_) .session-section-title {
  font-size: 15px; font-weight: 650; letter-spacing: -.005em; text-transform: none; color: var(--pt-text-primary); margin: 0 0 10px 2px;
}
body.producer-ai-active:not(#_) #clearQueueBtn { font-size: 12px !important; color: var(--pt-text-secondary); }
body.producer-ai-active:not(#_) #clearQueueBtn:hover { color: var(--pt-text-primary); }
body.producer-ai-active:not(#_) .queue-item.now-playing-card {
  border: 1px solid rgba(167, 139, 250, .55); background: rgba(124, 92, 255, .12); box-shadow: 0 0 14px rgba(124, 92, 255, .14);
}
body.producer-ai-active:not(#_) .queue-empty { font-size: 12.5px; color: var(--pt-text-muted); padding: 2px 2px 4px; }

/* Similar Sounds / BPM & Key rows: art with the play button over it, the name
   and BPM · key · length across the row, + always, download / create on hover */
body.producer-ai-active:not(#_) .session-panel .session-sample-row {
  position: relative; grid-template-columns: 44px minmax(0, 1fr) auto auto auto !important; gap: 10px !important;
  align-items: center; padding: 6px 4px !important; border-radius: 10px; transition: background var(--pt-dur) var(--pt-ease);
}
body.producer-ai-active:not(#_) .session-panel .session-sample-row:hover { background: rgba(124, 92, 255, .07); }
body.producer-ai-active:not(#_) .session-panel .session-sample-row > .sample-art-thumb { width: 44px !important; height: 44px !important; border-radius: 8px !important; }
body.producer-ai-active:not(#_) .session-panel .session-play-btn {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 28px !important; height: 28px !important;
  border-radius: 50%; background: rgba(5, 7, 13, .55) !important; border: 1.5px solid rgba(255, 255, 255, .75) !important; color: #fff !important;
}
body.producer-ai-active:not(#_) .session-panel .session-sample-name { font-size: 13px !important; font-weight: 600; }
body.producer-ai-active:not(#_) .session-panel .session-sample-meta { font-size: 11.5px !important; margin-top: 2px; color: var(--pt-text-muted) !important; }
body.producer-ai-active:not(#_) .session-panel .session-sample-meta.is-producer { color: var(--pt-text-secondary) !important; }
body.producer-ai-active:not(#_) .session-panel .session-sample-row > .session-queue-add[data-public-id],
body.producer-ai-active:not(#_) .session-panel .session-sample-row > .session-create,
body.producer-ai-active:not(#_) .session-panel .session-find-similar { opacity: 0; transition: opacity var(--pt-dur) var(--pt-ease); }
body.producer-ai-active:not(#_) .session-panel .session-sample-row:hover > *,
body.producer-ai-active:not(#_) .session-panel .session-sample-row:focus-within > *,
body.producer-ai-active:not(#_) .session-panel .session-sample-row:hover .session-find-similar { opacity: 1; }
body.producer-ai-active:not(#_) .session-panel .session-queue-add[data-queue-id] {
  width: 26px !important; height: 26px !important; border-radius: 50% !important; border: 1.5px solid rgba(196, 204, 226, .5) !important;
  background: none !important; color: var(--pt-text-primary) !important; font-size: 15px !important; line-height: 1;
}
body.producer-ai-active:not(#_) .session-panel .session-queue-add[data-queue-id]:hover { border-color: var(--pt-accent-bright) !important; color: var(--pt-accent-bright) !important; }
body.producer-ai-active:not(#_) #sessionSimilar > .session-sample-row:nth-child(n+6),
body.producer-ai-active:not(#_) #sessionMatches > .session-sample-row:nth-child(n+5) { display: none; }

/* the Now Playing transport (mountDeck): shown while a track is loaded */
.pai-deck { display: none; }
body.producer-ai-active .session-panel.pai-has-track .pai-deck { display: block; }
body.producer-ai-active .session-panel.pai-has-track #sessionNowPlaying { display: none; }
.pai-deck-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pai-deck-cover {
  width: 76px; height: 76px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: var(--pt-accent-soft); color: var(--pt-text-accent); font-weight: 700; border: 1px solid rgba(148, 163, 255, .12);
}
.pai-deck-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pai-deck-meta { min-width: 0; }
.pai-deck-title { font-size: 15.5px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pai-deck-sub { margin-top: 4px; color: var(--pt-text-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pai-deck-seek { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pai-deck-bar { position: relative; flex: 1; height: 16px; cursor: pointer; border-radius: 4px; }
.pai-deck-bar::before, .pai-deck-bar i { content: ""; position: absolute; left: 0; top: 6px; height: 4px; border-radius: 999px; }
.pai-deck-bar::before { right: 0; background: rgba(148, 163, 255, .16); }
.pai-deck-bar i { width: 0; background: linear-gradient(90deg, #7c5cff, #a78bfa); box-shadow: 0 0 8px rgba(124, 92, 255, .5); }
.pai-deck-time { color: var(--pt-text-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pai-deck-ctl { display: flex; align-items: center; justify-content: space-between; margin: 12px 4px 4px; }
.pai-deck-btn {
  width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  border: 0; background: none; color: var(--pt-text-primary); transition: color var(--pt-dur) var(--pt-ease), background var(--pt-dur) var(--pt-ease);
}
.pai-deck-btn:hover:not(:disabled) { background: rgba(148, 163, 255, .08); }
.pai-deck-btn:disabled { opacity: .35; cursor: default; }
.pai-deck-btn.is-sm { color: var(--pt-text-muted); }
.pai-deck-btn.is-sm .pai-ico { width: 17px; height: 17px; }
.pai-deck-btn[aria-pressed="true"] { color: var(--pt-accent-bright); }
.pai-deck-btn.is-main {
  width: 50px; height: 50px; border: 1.5px solid rgba(167, 139, 250, .7); background: rgba(124, 92, 255, .1);
  box-shadow: 0 0 18px rgba(124, 92, 255, .28);
}
.pai-deck-btn.is-main:hover:not(:disabled) { background: rgba(124, 92, 255, .2); }
.pai-deck-btn.is-main .pai-ico { width: 20px; height: 20px; }
.pai-deck .pai-ico-pause, .pai-deck.is-playing .pai-ico-play { display: none; }
.pai-deck.is-playing .pai-ico-pause { display: block; }
.pai-deck-vol { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--pt-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pai-deck-vol input { flex: 1; min-width: 0; accent-color: #8b5cf6; height: 4px; }
.pai-deck-vol span { width: 26px; text-align: right; }

/* ── Narrower windows ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  body.producer-ai-active:not(#_) .app-shell > .main > .workspace { padding-left: 20px !important; padding-right: 20px !important; }
  .pai-hero-wave { display: none; }
  .pai-table th:nth-child(6), .pai-table td:nth-child(6) { display: none; }
}
@media (max-width: 720px) {
  .pai-eras li { grid-template-columns: 1fr; gap: 2px; }
  .pai-table th:nth-child(5), .pai-table td:nth-child(5) { display: none; }
  .pai-search { flex-direction: column; }
  .pai-btn.is-lg, .pai-btn.is-search { min-width: 0; }
  .pai-data { flex-direction: column; }
  .pai-results li { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
  .pai-results li > :nth-child(4) { display: none; }
}
