/* ============================================================================
   sfx-apple.css — Apple-style Sound Effects search view
   Loaded LAST (after app/ui/sounds/theme) so it owns the browse experience.
   Scope: body[data-page="sounds"] #sfxBrowse. Everything here is the "search"
   state — category pills, live results header, results table (Sound · Waveform
   · Duration · Category · Key), and the glass Refine rail. Light + dark.
   ============================================================================ */
body[data-page="sounds"]{
  --sfx-accent:#2f6bff;
  --sfx-accent-2:#1f5bef;
  --sfx-accent-soft:rgba(47,107,255,.10);
  --sfx-accent-line:rgba(47,107,255,.30);
  --sfx-page:#f4f6fa;
  --sfx-card:#ffffff;
  --sfx-card-2:#fbfcfe;
  --sfx-line:#e9edf4;
  --sfx-line-2:#eef1f6;
  --sfx-ink:#0e1526;
  --sfx-ink-2:#5a6478;
  --sfx-ink-3:#8b93a5;
  --sfx-hover:#f5f7fb;
  --sfx-sel:#eef3ff;
  --sfx-shadow:0 1px 2px rgba(16,24,40,.04), 0 12px 32px -20px rgba(16,24,40,.22);
  --sfx-glass:rgba(255,255,255,.72);
  --sfx-spring:cubic-bezier(.32,1.28,.5,1);
  --sfx-ease:cubic-bezier(.22,1,.36,1);
}
html[data-theme="dark"] body[data-page="sounds"]{
  --sfx-page:#0b0e14;
  --sfx-card:#141922;
  --sfx-card-2:#111620;
  --sfx-line:rgba(255,255,255,.08);
  --sfx-line-2:rgba(255,255,255,.06);
  --sfx-ink:#eef2f8;
  --sfx-ink-2:#9aa4b6;
  --sfx-ink-3:#6d7688;
  --sfx-hover:rgba(255,255,255,.04);
  --sfx-sel:rgba(47,107,255,.14);
  --sfx-shadow:0 1px 2px rgba(0,0,0,.4), 0 18px 44px -26px rgba(0,0,0,.7);
  --sfx-glass:rgba(20,25,34,.66);
  --sfx-accent:#4f8bff;
  --sfx-accent-soft:rgba(79,139,255,.14);
}

/* keep the whole SFX workspace on the soft page bg */
body[data-page="sounds"] .main.sfx-lib{background:var(--sfx-page)}
/* .main is a flex container; make the inner column fill it and shrink cleanly so
   the 300px Refine rail never overflows off the right edge. */
body[data-page="sounds"] .main.sfx-lib>.main-inner{flex:1 1 auto;width:100%;min-width:0;max-width:1320px}

/* ───────────────────────── category pill strip ───────────────────────── */
body[data-page="sounds"] .sfx-catbar{
  position:relative;display:flex;align-items:center;gap:0;margin:2px 0 16px;
}
body[data-page="sounds"] .sfx-catbar-track{
  display:flex;align-items:center;gap:8px;overflow-x:auto;overflow-y:hidden;
  scroll-behavior:smooth;scrollbar-width:none;padding:2px 44px 2px 0;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent);
}
body[data-page="sounds"] .sfx-catbar-track::-webkit-scrollbar{display:none}
body[data-page="sounds"] .sfx-pill{
  flex:0 0 auto;height:33px;padding:0 14px;border-radius:999px;border:1px solid var(--sfx-line);
  background:var(--sfx-card);color:var(--sfx-ink-2);font:600 12.5px/1 'Inter',system-ui,sans-serif;letter-spacing:-.01em;
  cursor:pointer;transition:transform .18s var(--sfx-spring),background .16s,color .16s,border-color .16s,box-shadow .16s;
  box-shadow:0 1px 1px rgba(16,24,40,.03);white-space:nowrap;
}
body[data-page="sounds"] .sfx-pill:hover{color:var(--sfx-ink);border-color:#d6deeb;transform:translateY(-1px)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-pill:hover{border-color:rgba(255,255,255,.18)}
body[data-page="sounds"] .sfx-pill:active{transform:translateY(0) scale(.97)}
body[data-page="sounds"] .sfx-pill.active{
  background:var(--sfx-accent-soft);color:var(--sfx-accent);border-color:var(--sfx-accent-line);font-weight:700;
  box-shadow:0 0 0 3px var(--sfx-accent-soft);
}
body[data-page="sounds"] .sfx-catbar-more{
  position:absolute;right:0;top:50%;transform:translateY(-50%);width:36px;height:36px;flex:none;
  display:grid;place-items:center;border-radius:50%;border:1px solid var(--sfx-line);background:var(--sfx-card);
  color:var(--sfx-ink-2);cursor:pointer;box-shadow:var(--sfx-shadow);transition:opacity .2s,transform .18s var(--sfx-spring);
}
body[data-page="sounds"] .sfx-catbar-more svg{width:16px;height:16px}
body[data-page="sounds"] .sfx-catbar-more:hover{color:var(--sfx-accent);transform:translateY(-50%) scale(1.06)}
body[data-page="sounds"] .sfx-catbar-more.at-end{opacity:0;pointer-events:none}

/* ───────────────────────── results layout ───────────────────────── */
body[data-page="sounds"] .sfx-results{
  display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start;
  transition:grid-template-columns .4s var(--sfx-ease),gap .4s var(--sfx-ease);
}
body[data-page="sounds"] .sfx-results.refine-collapsed{grid-template-columns:minmax(0,1fr) 0;gap:0}
body[data-page="sounds"] .sfx-results.refine-collapsed .sfx-refine{opacity:0;transform:translateX(14px);pointer-events:none}

body[data-page="sounds"] .sfx-results-main{
  background:var(--sfx-card);border:1px solid var(--sfx-line);border-radius:16px;overflow:hidden;
  box-shadow:var(--sfx-shadow);
}

/* header */
body[data-page="sounds"] .sfx-results-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  padding:11px 18px;border-bottom:1px solid var(--sfx-line-2);
}
body[data-page="sounds"] .sfx-count-wrap{display:flex;align-items:baseline;gap:6px}
body[data-page="sounds"] .sfx-count-n{font:800 17px/1 'Inter',sans-serif;letter-spacing:-.03em;color:var(--sfx-ink);font-variant-numeric:tabular-nums}
body[data-page="sounds"] .sfx-count-lbl{font-size:13px;color:var(--sfx-ink-2);font-weight:500}
body[data-page="sounds"] .sfx-live{
  display:inline-flex;align-items:center;gap:6px;margin-left:6px;font-size:12px;font-weight:600;color:#12a150;
  padding:3px 9px 3px 8px;border-radius:999px;background:rgba(18,161,80,.10);
}
body[data-page="sounds"] .sfx-live i{width:7px;height:7px;border-radius:50%;background:#12c95c;box-shadow:0 0 0 0 rgba(18,201,92,.6);animation:sfxPulse 2s infinite}
@keyframes sfxPulse{0%{box-shadow:0 0 0 0 rgba(18,201,92,.55)}70%{box-shadow:0 0 0 6px rgba(18,201,92,0)}100%{box-shadow:0 0 0 0 rgba(18,201,92,0)}}

body[data-page="sounds"] .sfx-head-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body[data-page="sounds"] .sfx-tool,
body[data-page="sounds"] .sfx-sort{
  display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px;border-radius:10px;
  border:1px solid var(--sfx-line);background:var(--sfx-card-2);color:var(--sfx-ink);font:600 12.5px/1 'Inter',sans-serif;
  cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s;position:relative;
}
body[data-page="sounds"] .sfx-tool:hover,
body[data-page="sounds"] .sfx-sort:hover{border-color:#d3dbe8;background:var(--sfx-hover)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-tool:hover,
html[data-theme="dark"] body[data-page="sounds"] .sfx-sort:hover{border-color:rgba(255,255,255,.16)}
body[data-page="sounds"] .sfx-tool svg{width:16px;height:16px;color:var(--sfx-ink-2)}
body[data-page="sounds"] .sfx-tool-caret{width:12px!important;height:12px!important;opacity:.6}
body[data-page="sounds"] .sfx-sort{padding-right:30px}
body[data-page="sounds"] .sfx-sort-lbl{color:var(--sfx-ink-2);font-weight:500}
body[data-page="sounds"] .sfx-sort select{
  -webkit-appearance:none;appearance:none;border:0;background:transparent;color:var(--sfx-ink);
  font:600 13px/1 'Inter',sans-serif;cursor:pointer;padding:0;margin:0;outline:none;
}
body[data-page="sounds"] .sfx-sort-caret{position:absolute;right:11px;top:50%;transform:translateY(-50%);width:12px;height:12px;opacity:.6;pointer-events:none}

body[data-page="sounds"] .sfx-viewtoggle{display:inline-flex;padding:3px;border-radius:11px;border:1px solid var(--sfx-line);background:var(--sfx-card-2);gap:2px}
body[data-page="sounds"] .sfx-viewtoggle button{
  width:32px;height:30px;display:grid;place-items:center;border:0;background:transparent;border-radius:8px;
  color:var(--sfx-ink-3);cursor:pointer;transition:background .15s,color .15s;
}
body[data-page="sounds"] .sfx-viewtoggle button svg{width:17px;height:17px}
body[data-page="sounds"] .sfx-viewtoggle button:hover{color:var(--sfx-ink)}
body[data-page="sounds"] .sfx-viewtoggle button.active{background:var(--sfx-card);color:var(--sfx-accent);box-shadow:0 1px 3px rgba(16,24,40,.14)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-viewtoggle button.active{background:rgba(255,255,255,.10)}

/* ───────────────────────── results table ───────────────────────── */
body[data-page="sounds"] .sfx-lib .sfx-table{--cols:44px minmax(200px,1fr) minmax(120px,210px) 74px 132px 118px}
body[data-page="sounds"] .sfx-lib .sfx-table .tl-head,
body[data-page="sounds"] .sfx-lib .sfx-table .track{
  display:grid;grid-template-columns:var(--cols);align-items:center;gap:14px;padding:0 18px;
}
body[data-page="sounds"] .sfx-lib .tl-head{
  height:40px;border:0;border-bottom:1px solid var(--sfx-line-2);
}
body[data-page="sounds"] .sfx-lib .tl-head .th,
body[data-page="sounds"] .sfx-lib .tl-head .th-acts{
  font:700 10.5px/1 'Inter',sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--sfx-ink-3);
}
body[data-page="sounds"] .sfx-lib .tl-head .th-sound{cursor:pointer}
body[data-page="sounds"] .sfx-lib .tl-head .th-dur,
body[data-page="sounds"] .sfx-lib .tl-head .th-key{text-align:center}

body[data-page="sounds"] .sfx-lib .sfx-table .track{
  height:66px;border:0;border-bottom:1px solid var(--sfx-line-2);cursor:pointer;position:relative;background:transparent;
  transition:background .16s var(--sfx-ease);
}
body[data-page="sounds"] .sfx-lib .sfx-table #list .track:last-child{border-bottom:0}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover{background:var(--sfx-hover)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.selected,
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing{background:var(--sfx-sel)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing::before{
  content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--sfx-accent);
}

/* play button */
body[data-page="sounds"] .sfx-lib .sfx-table .ti-cell{display:flex;align-items:center;justify-content:center}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay{
  width:34px;height:34px;border-radius:10px;border:1px solid var(--sfx-line);background:var(--sfx-card);
  display:grid;place-items:center;color:var(--sfx-ink);cursor:pointer;box-shadow:0 1px 2px rgba(16,24,40,.06);
  transition:transform .18s var(--sfx-spring),background .16s,color .16s,box-shadow .16s;
}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay svg{fill:var(--sfx-ink);color:var(--sfx-ink);margin:0}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay .ip{width:11px;height:12px;margin-left:1px;display:block}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay .ipa{width:10px;height:12px;display:none}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .tplay svg{fill:var(--sfx-accent);color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .tplay svg{fill:#fff;color:#fff}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .tplay{color:var(--sfx-accent);border-color:var(--sfx-accent-line);transform:scale(1.06)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .tplay{background:var(--sfx-accent);border-color:var(--sfx-accent);color:#fff;box-shadow:0 6px 16px -6px var(--sfx-accent-line)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .tplay .ip{display:none}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .tplay .ipa{display:block}

/* sound cell */
body[data-page="sounds"] .sfx-lib .sfx-table .t-info{display:flex;align-items:center;gap:13px;min-width:0;padding:0}
body[data-page="sounds"] .sfx-lib .sfx-table .t-art{
  width:44px;height:44px;flex:none;border-radius:11px;overflow:hidden;position:relative;display:grid;place-items:center;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.05),0 2px 6px -3px rgba(16,24,40,.3);
}
body[data-page="sounds"] .sfx-lib .sfx-table .t-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body[data-page="sounds"] .sfx-lib .sfx-table .t-art-ico{width:20px;height:20px;position:relative;opacity:.9}
body[data-page="sounds"] .sfx-lib .sfx-table .t-body{min-width:0}
body[data-page="sounds"] .sfx-lib .sfx-table .t-name{font:600 14.5px/1.2 'Inter',sans-serif;letter-spacing:-.01em;margin-bottom:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-page="sounds"] .sfx-lib .sfx-table .t-name a{color:var(--sfx-ink);text-decoration:none}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-name a{color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-tags{display:flex;gap:6px;overflow:hidden}
body[data-page="sounds"] .sfx-lib .sfx-table .ttag{
  font:600 11px/1 'Inter',sans-serif;color:var(--sfx-ink-2);background:var(--sfx-hover);border:1px solid var(--sfx-line);
  padding:3px 8px;border-radius:6px;white-space:nowrap;
}
body[data-page="sounds"] .sfx-lib .sfx-table .ttag-ghost{opacity:.75}

/* waveform */
body[data-page="sounds"] .sfx-lib .sfx-table .t-wave{height:30px;display:flex;align-items:center;gap:2px;overflow:hidden;position:relative;color:var(--sfx-ink-3)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-wave .wb{width:2px;border-radius:2px;background:currentColor;opacity:.5;transition:opacity .2s}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-wave{color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-wave .wb{opacity:.7}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-wave{color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-wave .wb{opacity:.85}
body[data-page="sounds"] .sfx-lib .sfx-table .t-playhead{display:none}

/* duration · category · key */
body[data-page="sounds"] .sfx-lib .sfx-table .t-dur{font:600 12.5px/1 'Inter',sans-serif;color:var(--sfx-ink-2);text-align:center;font-variant-numeric:tabular-nums}
body[data-page="sounds"] .sfx-lib .sfx-table .t-catcell{min-width:0}
body[data-page="sounds"] .sfx-lib .sfx-table .t-catchip{
  display:inline-block;max-width:100%;font:600 12px/1 'Inter',sans-serif;color:var(--sfx-ink-2);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body[data-page="sounds"] .sfx-lib .sfx-table .t-key{
  text-align:center;font:700 12.5px/1 'Inter',sans-serif;color:var(--sfx-ink);font-variant-numeric:tabular-nums;
}

/* row actions */
body[data-page="sounds"] .sfx-lib .sfx-table .t-acts{display:flex;align-items:center;justify-content:flex-end;gap:6px;opacity:1;transform:none;transition:opacity .16s,transform .16s var(--sfx-ease)}
body[data-page="sounds"] .sfx-lib .tl-head .th-acts{text-align:right}
/* Desktop (2-col) shows the Refine rail permanently, so the Filters toggle is
   only needed once the rail collapses/overlays (≤1180px). */
@media (min-width:1181px){ body[data-page="sounds"] #sfxFiltersBtn{display:none} }
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-acts,
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-acts,
body[data-page="sounds"] .sfx-lib .sfx-table .track.selected .t-acts{opacity:1;transform:none}
body[data-page="sounds"] .sfx-lib .sfx-table .ta{
  width:32px;height:32px;border-radius:9px;border:0;background:transparent;color:var(--sfx-ink-2);
  display:grid;place-items:center;cursor:pointer;transition:background .14s,color .14s,transform .14s var(--sfx-spring);
}
body[data-page="sounds"] .sfx-lib .sfx-table .ta svg{width:18px;height:18px}
body[data-page="sounds"] .sfx-lib .sfx-table .ta:hover{background:var(--sfx-hover);color:var(--sfx-ink);transform:scale(1.08)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta.faved{color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta.faved svg{fill:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta-dl:hover{color:var(--sfx-accent)}

/* pager */
body[data-page="sounds"] .sfx-lib .sfx-table .pager{display:flex;align-items:center;justify-content:center;gap:6px;padding:16px}
body[data-page="sounds"] .sfx-lib .sfx-table .pgb{
  min-width:34px;height:34px;padding:0 8px;border-radius:9px;border:1px solid var(--sfx-line);background:var(--sfx-card);
  display:grid;place-items:center;font:600 13px/1 'Inter',sans-serif;color:var(--sfx-ink-2);cursor:pointer;transition:all .14s}
body[data-page="sounds"] .sfx-lib .sfx-table .pgb:hover{border-color:var(--sfx-accent-line);color:var(--sfx-accent)}
body[data-page="sounds"] .sfx-lib .sfx-table .pgb.active{background:var(--sfx-accent);border-color:var(--sfx-accent);color:#fff}
body[data-page="sounds"] .sfx-lib .sfx-table .pgdots{color:var(--sfx-ink-3);padding:0 2px}

/* empty / loading state */
body[data-page="sounds"] .sfx-lib .sfx-table .state-msg{padding:64px 20px;text-align:center;color:var(--sfx-ink-2)}

/* ─────────────── grid (gallery) view ─────────────── */
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .tl-head{display:none}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid #list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;padding:16px}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track{
  display:flex;flex-direction:column;align-items:flex-start;gap:10px;height:auto;padding:14px;border:1px solid var(--sfx-line);
  border-radius:16px;background:var(--sfx-card-2);
}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track.playing::before{display:none}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .ti-cell{position:absolute;top:20px;left:20px;z-index:2}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-info{width:100%;flex-direction:column;align-items:flex-start;gap:10px}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-art{width:100%;height:104px;border-radius:12px}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-wave{width:100%}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-catcell,
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-key{display:none}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-dur{position:absolute;top:22px;right:22px;background:rgba(0,0,0,.55);color:#fff;padding:3px 7px;border-radius:6px;font-size:11px}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-acts{width:100%;opacity:1;transform:none;justify-content:space-between}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track{position:relative}

/* ───────────────────────── Refine rail ───────────────────────── */
body[data-page="sounds"] .sfx-refine{
  position:static;align-self:start;background:var(--sfx-glass);backdrop-filter:saturate(160%) blur(18px);
  -webkit-backdrop-filter:saturate(160%) blur(18px);border:1px solid var(--sfx-line);border-radius:20px;
  padding:18px 18px 20px;box-shadow:var(--sfx-shadow);transition:opacity .35s var(--sfx-ease),transform .35s var(--sfx-ease);
}
body[data-page="sounds"] .rf-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:4px}
body[data-page="sounds"] .rf-head h2{font:700 15.5px/1 'Inter',sans-serif;letter-spacing:-.02em;color:var(--sfx-ink);margin:0}
body[data-page="sounds"] .rf-reset{border:0;background:transparent;color:var(--sfx-accent);font:600 12.5px/1 'Inter',sans-serif;cursor:pointer;padding:2px;opacity:.55;transition:opacity .15s}
body[data-page="sounds"] .rf-reset.on{opacity:1}
body[data-page="sounds"] .rf-reset:hover{opacity:1;text-decoration:underline}

body[data-page="sounds"] .rf-group{padding:16px 0;border-bottom:1px solid var(--sfx-line-2)}
body[data-page="sounds"] .rf-group:last-of-type{border-bottom:0}
body[data-page="sounds"] .rf-label,body[data-page="sounds"] .rf-label-row .rf-label{font:600 12px/1 'Inter',sans-serif;letter-spacing:.02em;color:var(--sfx-ink-2);text-transform:uppercase;margin-bottom:12px;display:block}
body[data-page="sounds"] .rf-label-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
body[data-page="sounds"] .rf-label-row .rf-label{margin-bottom:0}
body[data-page="sounds"] .rf-val{font:600 11.5px/1 'Inter',sans-serif;color:var(--sfx-accent)}

/* category chips */
body[data-page="sounds"] .rf-cats{display:flex;flex-wrap:wrap;gap:7px;min-height:30px}
body[data-page="sounds"] .rf-cats-empty{font:500 13px/1.6 'Inter',sans-serif;color:var(--sfx-ink-3)}
body[data-page="sounds"] .rf-catchip{
  display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 8px 0 12px;border-radius:999px;
  background:var(--sfx-accent-soft);border:1px solid var(--sfx-accent-line);color:var(--sfx-accent);
  font:600 12.5px/1 'Inter',sans-serif;cursor:pointer;transition:transform .16s var(--sfx-spring)}
body[data-page="sounds"] .rf-catchip svg{width:12px;height:12px}
body[data-page="sounds"] .rf-catchip:hover{transform:scale(1.04)}

/* range sliders */
body[data-page="sounds"] .rf-range{position:relative;height:22px}
body[data-page="sounds"] .rf-range-rail{position:absolute;top:50%;left:2px;right:2px;height:5px;transform:translateY(-50%);background:var(--sfx-line);border-radius:3px;overflow:hidden}
html[data-theme="dark"] body[data-page="sounds"] .rf-range-rail{background:rgba(255,255,255,.12)}
body[data-page="sounds"] .rf-range-fill{position:absolute;top:0;bottom:0;background:linear-gradient(90deg,var(--sfx-accent),var(--sfx-accent-2));border-radius:3px}
body[data-page="sounds"] .rf-range input[type=range]{position:absolute;top:0;left:0;width:100%;height:22px;margin:0;background:transparent;-webkit-appearance:none;appearance:none;pointer-events:none}
body[data-page="sounds"] .rf-range input[type=range]:focus{outline:none}
body[data-page="sounds"] .rf-range input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;width:18px;height:18px;border-radius:50%;background:#fff;border:1px solid rgba(16,24,40,.12);box-shadow:0 1px 3px rgba(16,24,40,.28),0 2px 8px -2px var(--sfx-accent-line);cursor:grab;transition:transform .12s}
body[data-page="sounds"] .rf-range input[type=range]::-webkit-slider-thumb:active{cursor:grabbing;transform:scale(1.12)}
body[data-page="sounds"] .rf-range input[type=range]::-moz-range-thumb{pointer-events:auto;width:18px;height:18px;border-radius:50%;background:#fff;border:1px solid rgba(16,24,40,.12);box-shadow:0 1px 3px rgba(16,24,40,.28);cursor:grab}
body[data-page="sounds"] .rf-scale{display:flex;justify-content:space-between;margin-top:9px;font:600 11px/1 'Inter',sans-serif;color:var(--sfx-ink-3)}

/* selects */
body[data-page="sounds"] .rf-selwrap{position:relative}
body[data-page="sounds"] .rf-select{
  width:100%;height:40px;padding:0 34px 0 13px;border-radius:11px;border:1px solid var(--sfx-line);background:var(--sfx-card-2);
  color:var(--sfx-ink);font:600 13px/1 'Inter',sans-serif;cursor:pointer;-webkit-appearance:none;appearance:none;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
body[data-page="sounds"] .rf-select:hover{border-color:#d3dbe8}
body[data-page="sounds"] .rf-select:focus{border-color:var(--sfx-accent-line);box-shadow:0 0 0 3px var(--sfx-accent-soft)}
body[data-page="sounds"] .rf-selwrap svg{position:absolute;right:13px;top:50%;transform:translateY(-50%);width:12px;height:12px;color:var(--sfx-ink-3);pointer-events:none}

/* tone toggles */
body[data-page="sounds"] .rf-toggles{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body[data-page="sounds"] .rf-toggle{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;height:40px;border-radius:11px;
  border:1px solid var(--sfx-line);background:var(--sfx-card-2);color:var(--sfx-ink-2);font:600 12.5px/1 'Inter',sans-serif;
  cursor:pointer;transition:all .16s var(--sfx-ease);
}
body[data-page="sounds"] .rf-toggle svg{width:16px;height:16px;opacity:.85}
body[data-page="sounds"] .rf-toggle:hover{border-color:#d3dbe8;color:var(--sfx-ink)}
body[data-page="sounds"] .rf-toggle.active{background:var(--sfx-accent-soft);border-color:var(--sfx-accent-line);color:var(--sfx-accent);box-shadow:0 0 0 3px var(--sfx-accent-soft)}

/* CTA */
body[data-page="sounds"] .rf-cta{
  width:100%;height:46px;margin-top:18px;border:0;border-radius:13px;background:linear-gradient(180deg,var(--sfx-accent),var(--sfx-accent-2));
  color:#fff;font:700 14px/1 'Inter',sans-serif;letter-spacing:-.01em;cursor:pointer;
  box-shadow:0 8px 20px -8px var(--sfx-accent-line),inset 0 1px 0 rgba(255,255,255,.25);
  transition:transform .18s var(--sfx-spring),box-shadow .18s;
}
body[data-page="sounds"] .rf-cta:hover{transform:translateY(-1px);box-shadow:0 12px 26px -8px var(--sfx-accent-line)}
body[data-page="sounds"] .rf-cta:active{transform:translateY(0) scale(.99)}

/* ─────────────── "···" popover ─────────────── */
.sfx-more-menu{
  position:absolute;z-index:9000;min-width:210px;padding:6px;border-radius:14px;background:var(--sfx-glass,#fff);
  backdrop-filter:saturate(160%) blur(18px);-webkit-backdrop-filter:saturate(160%) blur(18px);
  border:1px solid rgba(16,24,40,.1);box-shadow:0 18px 48px -18px rgba(16,24,40,.5);
  opacity:0;transform:translateY(-6px) scale(.97);transform-origin:top right;transition:opacity .16s,transform .18s cubic-bezier(.32,1.28,.5,1);
}
html[data-theme="dark"] .sfx-more-menu{border-color:rgba(255,255,255,.1)}
.sfx-more-menu.open{opacity:1;transform:none}
.sfx-more-menu button{
  display:flex;align-items:center;gap:11px;width:100%;height:40px;padding:0 12px;border:0;border-radius:9px;background:transparent;
  color:var(--sfx-ink,#0e1526);font:600 13.5px/1 'Inter',sans-serif;cursor:pointer;transition:background .12s;
}
.sfx-more-menu button:hover{background:var(--sfx-hover,#f5f7fb)}
.sfx-more-menu button svg{width:18px;height:18px;color:var(--sfx-ink-2,#5a6478)}

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width:1180px){
  body[data-page="sounds"] .sfx-results{grid-template-columns:minmax(0,1fr)}
  body[data-page="sounds"] .sfx-refine{position:relative;top:0;order:-1}
}
@media (max-width:820px){
  body[data-page="sounds"] .sfx-lib .sfx-table{--cols:40px minmax(140px,1fr) 66px 96px}
  body[data-page="sounds"] .sfx-lib .sfx-table .th-wave,
  body[data-page="sounds"] .sfx-lib .sfx-table .t-wave,
  body[data-page="sounds"] .sfx-lib .sfx-table .th-cat,
  body[data-page="sounds"] .sfx-lib .sfx-table .t-catcell{display:none}
  body[data-page="sounds"] .sfx-refine{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--sfx-card)}
}
@media (max-width:560px){
  body[data-page="sounds"] .sfx-lib .sfx-table{--cols:38px minmax(0,1fr) 44px 88px}
  body[data-page="sounds"] .sfx-lib .sfx-table .th-key,
  body[data-page="sounds"] .sfx-lib .sfx-table .t-key{display:none}
  body[data-page="sounds"] .rf-toggles{grid-template-columns:1fr 1fr}
}
@media (prefers-reduced-motion:reduce){
  body[data-page="sounds"] *{transition:none!important;animation:none!important}
}

/* ========================================================================== 
   Search workbench v2
   ========================================================================== */
body[data-page="sounds"] .cpk-fab{display:none!important}
body[data-page="sounds"] .main.sfx-lib{
  padding:24px 30px 116px;
  background:transparent;
}
body[data-page="sounds"] .main.sfx-lib>.main-inner{
  width:100%;
  max-width:1510px;
  min-width:0;
  animation:none!important;
  transform:none!important;
}
body[data-page="sounds"] .workspace>.main.sfx-lib{animation:none!important;transform:none!important}
body[data-page="sounds"] #sfxLanding{display:none!important}
body[data-page="sounds"] #sfxBrowse{display:block!important}
body[data-page="sounds"] .sfx-results{
  grid-template-columns:minmax(0,1fr) 310px;
  gap:24px;
  align-items:start;
}
body[data-page="sounds"] .sfx-results-main,
body[data-page="sounds"] .sfx-refine{
  border:1px solid var(--chrome-edge);
  background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(248,250,255,.61));
  box-shadow:0 24px 58px -38px rgba(42,65,114,.32),inset 0 1px 0 rgba(255,255,255,.84);
  -webkit-backdrop-filter:saturate(155%) blur(14px);
  backdrop-filter:saturate(155%) blur(14px);
}
body[data-page="sounds"] .sfx-results-main{
  min-width:0;
  overflow:hidden;
  border-radius:24px;
  animation:sfxWorkbenchIn .54s var(--ease-spring) both;
}

/* Search */
body[data-page="sounds"] .sfx-search-workbench.search{
  position:relative;
  display:grid;
  grid-template-columns:minmax(240px,1fr) 168px 106px;
  gap:12px;
  align-items:center;
  width:100%;
  height:auto;
  min-height:60px;
  padding:9px 18px;
  border:0;
  border-bottom:1px solid rgba(115,137,174,.11);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body[data-page="sounds"] .sfx-search-workbench.search:focus-within{
  border-color:rgba(115,137,174,.11);
  background:transparent;
  box-shadow:none;
}
body[data-page="sounds"] .sfx-search-field{
  position:relative;
  display:flex;
  align-items:center;
  min-width:0;
  height:46px;
  padding:0 84px 0 18px;
  border:1px solid rgba(130,149,181,.20);
  border-radius:999px;
  color:var(--text-2);
  background:rgba(255,255,255,.74);
  box-shadow:0 10px 28px -23px rgba(35,60,105,.34),inset 0 1px 0 rgba(255,255,255,.92);
  transition:border-color .2s var(--ease),box-shadow .28s var(--ease),background .2s var(--ease),transform .3s var(--ease-spring);
}
body[data-page="sounds"] .sfx-search-field:focus-within{
  border-color:rgba(47,107,238,.42);
  background:rgba(255,255,255,.90);
  box-shadow:0 0 0 4px rgba(47,107,238,.09),0 18px 36px -27px rgba(38,83,181,.45),inset 0 1px 0 #fff;
  transform:translateY(-1px);
}
body[data-page="sounds"] .sfx-search-workbench .sfx-search-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  margin-right:17px;
  color:var(--text-2);
}
body[data-page="sounds"] .sfx-search-workbench input{
  width:100%;
  min-width:0;
  height:56px;
  padding:0;
  border:0!important;
  outline:0!important;
  color:var(--text);
  background:transparent!important;
  box-shadow:none!important;
  -webkit-appearance:none;
  appearance:none;
  border-radius:0;
  font:650 16px/1 var(--font-sys);
  -webkit-tap-highlight-color:transparent;
  caret-color:var(--primary);
}
body[data-page="sounds"] .sfx-search-workbench input:focus,
body[data-page="sounds"] .sfx-search-workbench input:focus-visible{
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}
body[data-page="sounds"] .sfx-search-workbench input::placeholder{color:var(--text-4)}
body[data-page="sounds"] .sfx-search-workbench input::-webkit-search-decoration,
body[data-page="sounds"] .sfx-search-workbench input::-webkit-search-cancel-button,
body[data-page="sounds"] .sfx-search-workbench input::-webkit-search-results-button,
body[data-page="sounds"] .sfx-search-workbench input::-webkit-search-results-decoration{
  display:none;
  -webkit-appearance:none;
}
body[data-page="sounds"] .sfx-search-clear,
body[data-page="sounds"] .sfx-search-voice{
  position:absolute;
  top:50%;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  min-height:36px;
  border-radius:50%;
  color:var(--text-3);
  transform:translateY(-50%);
  transition:background .18s,color .18s,scale .22s var(--ease-spring),opacity .18s;
}
body[data-page="sounds"] .sfx-search-clear{right:48px}
body[data-page="sounds"] .sfx-search-voice{right:10px}
body[data-page="sounds"] .sfx-search-clear[hidden]{display:none}
body[data-page="sounds"] .sfx-search-clear:hover,
body[data-page="sounds"] .sfx-search-voice:hover{color:var(--text);background:var(--hover);scale:1.04}
body[data-page="sounds"] .sfx-search-clear:active,
body[data-page="sounds"] .sfx-search-voice:active{scale:.91}
body[data-page="sounds"] .sfx-search-clear svg,
body[data-page="sounds"] .sfx-search-voice svg{width:18px;height:18px;margin:0;color:currentColor}
body[data-page="sounds"] .sfx-more-search,
body[data-page="sounds"] .sfx-search-submit{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  height:44px;
  min-height:44px;
  overflow:hidden;
  border-radius:999px;
  font-size:13px;
  font-weight:670;
  isolation:isolate;
  transition:transform .26s var(--ease-spring),box-shadow .24s var(--ease),background .2s;
}
body[data-page="sounds"] .sfx-more-search{
  gap:11px;
  padding:0 18px;
  color:var(--text);
  border:1px solid rgba(122,142,174,.19);
  background:rgba(255,255,255,.66);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 10px 24px -22px rgba(30,48,83,.45);
}
body[data-page="sounds"] .sfx-more-search svg:first-child{width:20px;height:20px;color:var(--primary)}
body[data-page="sounds"] .sfx-more-search .sfx-more-caret{width:15px;height:15px;margin-left:auto;color:var(--text-3)}
body[data-page="sounds"] .sfx-more-search:hover{background:rgba(255,255,255,.88);box-shadow:0 15px 30px -24px rgba(32,66,134,.5),inset 0 1px 0 #fff;transform:translateY(-1px)}
body[data-page="sounds"] .sfx-search-mode{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  height:44px;
  padding:4px;
  border:1px solid rgba(122,142,174,.19);
  border-radius:999px;
  background:rgba(255,255,255,.58);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 10px 24px -22px rgba(30,48,83,.45);
}
body[data-page="sounds"] .sfx-search-mode button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:0;
  height:36px;
  min-height:36px;
  padding:0 10px;
  border-radius:999px;
  color:var(--text-3);
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
  transition:color .18s,background .22s,box-shadow .24s,transform .24s var(--ease-spring);
}
body[data-page="sounds"] .sfx-search-mode button svg{width:16px;height:16px;flex:none}
body[data-page="sounds"] .sfx-search-mode button:hover{color:var(--text);background:rgba(255,255,255,.52)}
body[data-page="sounds"] .sfx-search-mode button.active{
  color:var(--primary);
  background:rgba(255,255,255,.94);
  box-shadow:0 7px 18px -12px rgba(42,74,135,.48),inset 0 0 0 1px rgba(114,143,194,.12),inset 0 1px 0 #fff;
}
body[data-page="sounds"] .sfx-search-mode button:active{transform:scale(.96)}
body[data-page="sounds"] .sfx-search-submit{
  color:#fff;
  background:var(--accent-grad);
  box-shadow:0 14px 28px -16px rgba(34,99,226,.76),inset 0 1px 0 rgba(255,255,255,.35);
}
body[data-page="sounds"] .sfx-search-submit::before{ display:none; }
body[data-page="sounds"] .sfx-search-submit:hover{filter:brightness(1.05);box-shadow:0 5px 14px -7px rgba(34,99,226,.65);transform:none}
body[data-page="sounds"] .sfx-search-submit:active,
body[data-page="sounds"] .sfx-more-search:active{transform:translateY(1px) scale(.97)}
body[data-page="sounds"] .sfx-search-signal{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
body[data-page="sounds"] .sfx-search-workbench.is-searching .sfx-search-submit{filter:saturate(.84);cursor:progress}
body[data-page="sounds"] .sfx-search-workbench.is-searching .sfx-search-icon{animation:sfxSearchBreathe .8s ease-in-out infinite alternate}

body[data-page="sounds"] .sfx-search-workbench .search-sugg{
  top:86px;
  left:18px;
  right:350px;
  z-index:95;
  padding:8px;
  border:1px solid var(--chrome-edge);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:0 24px 56px -28px rgba(30,51,91,.48),inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  backdrop-filter:saturate(160%) blur(14px);
}

/* Parsed search intent */
body[data-page="sounds"] .sfx-smart-hints{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  padding:7px 18px 0;
  overflow-x:auto;
  scrollbar-width:none;
}
body[data-page="sounds"] .sfx-smart-hints[hidden]{display:none}
body[data-page="sounds"] .sfx-smart-hints::-webkit-scrollbar{display:none}
body[data-page="sounds"] .sfx-intent-label{flex:0 0 auto;color:var(--text-3);font-size:11px;font-weight:630}
body[data-page="sounds"] .sfx-intent-chip{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  height:29px;
  padding:0 10px;
  border:1px solid rgba(47,107,238,.13);
  border-radius:999px;
  color:var(--primary);
  background:rgba(237,244,255,.67);
  font-size:10.5px;
  font-weight:640;
  animation:sfxChipIn .34s var(--ease-spring) both;
}
body[data-page="sounds"] .sfx-intent-chip.is-negative{color:#d64b58;border-color:rgba(214,75,88,.14);background:rgba(255,239,241,.72)}

/* Facets and toolbar */
body[data-page="sounds"] .sfx-catbar{
  display:flex;
  align-items:center;
  gap:0;
  margin:0;
  padding:14px 18px 16px;
}
body[data-page="sounds"] .sfx-catbar-track{gap:10px;padding:2px 46px 2px 0}
body[data-page="sounds"] .sfx-pill{
  min-width:64px;
  height:34px;
  padding:0 15px;
  border-color:rgba(120,142,178,.16);
  color:var(--text-2);
  background:rgba(255,255,255,.57);
  box-shadow:0 7px 18px -17px rgba(30,55,99,.4),inset 0 1px 0 rgba(255,255,255,.88);
  font-size:12.5px;
  font-weight:610;
  transition:color .2s,background .2s,border-color .2s,transform .28s var(--ease-spring),box-shadow .24s;
}
body[data-page="sounds"] .sfx-pill:hover{color:var(--text);border-color:rgba(120,142,178,.24);background:rgba(255,255,255,.86);transform:translateY(-1px)}
body[data-page="sounds"] .sfx-pill.active{color:var(--primary);border-color:rgba(47,107,238,.32);background:rgba(238,244,255,.82);box-shadow:0 10px 24px -18px rgba(47,107,238,.55),inset 0 1px 0 #fff}
body[data-page="sounds"] .sfx-pill:active{transform:translateY(1px) scale(.95)}
body[data-page="sounds"] .sfx-catbar-more{right:18px;width:43px;height:43px;border-color:rgba(120,142,178,.16);background:rgba(255,255,255,.78);box-shadow:0 9px 22px -18px rgba(30,55,99,.5),inset 0 1px 0 rgba(255,255,255,.9)}
body[data-page="sounds"] .sfx-results-head{
  min-height:76px;
  padding:12px 18px;
  border-top:1px solid rgba(115,137,174,.11);
  border-bottom:1px solid rgba(115,137,174,.15);
}
body[data-page="sounds"] .sfx-count-wrap{gap:7px}
body[data-page="sounds"] .sfx-count-n{color:var(--text);font-size:19px;font-weight:760}
body[data-page="sounds"] .sfx-count-lbl{color:var(--text);font-size:19px;font-weight:760}
body[data-page="sounds"] .sfx-live{margin-left:11px;padding:0;color:var(--text-2);background:transparent;font-size:12.5px;font-weight:570}
body[data-page="sounds"] .sfx-live i{width:9px;height:9px}
body[data-page="sounds"] .sfx-tool,
body[data-page="sounds"] .sfx-sort{
  height:44px;
  border-color:rgba(119,140,175,.17);
  border-radius:999px;
  color:var(--text-2);
  background:rgba(255,255,255,.55);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.83);
  font-size:12.5px;
  font-weight:620;
}
body[data-page="sounds"] .sfx-tool{padding:0 14px}
body[data-page="sounds"] .sfx-sort{padding-left:15px}
body[data-page="sounds"] .sfx-tool:hover,
body[data-page="sounds"] .sfx-sort:hover{color:var(--text);border-color:rgba(119,140,175,.24);background:rgba(255,255,255,.85)}
body[data-page="sounds"] .sfx-sort select{height:42px;color:var(--text-2);font-size:12.5px;font-weight:620}
body[data-page="sounds"] .sfx-viewtoggle{gap:3px;padding:3px;border:0;border-radius:14px;background:rgba(116,137,173,.08)}
body[data-page="sounds"] .sfx-viewtoggle button{width:32px;height:32px;border-radius:9px}
body[data-page="sounds"] .sfx-viewtoggle button.active{color:var(--primary);background:rgba(255,255,255,.84);box-shadow:0 4px 12px -8px rgba(32,57,106,.4),inset 0 1px 0 #fff}

/* Results — waveform (the 1fr col) absorbs slack and can shrink so the Actions
   column never clips on narrower windows; it stays generous at ≥1512. */
body[data-page="sounds"] .sfx-lib .sfx-table{--cols:44px 216px minmax(96px,1fr) 58px 86px 100px}
body[data-page="sounds"] .sfx-lib .sfx-table .tl-head,
body[data-page="sounds"] .sfx-lib .sfx-table .track{gap:10px;padding-left:18px;padding-right:18px}
body[data-page="sounds"] .sfx-lib .tl-head{height:34px;border-bottom:0}
body[data-page="sounds"] .sfx-lib .tl-head .th,
body[data-page="sounds"] .sfx-lib .tl-head .th-acts{color:var(--text-3);font-size:10.5px;font-weight:650;text-transform:none}
body[data-page="sounds"] .sfx-lib .sfx-table #list{padding:0 10px 1px}
body[data-page="sounds"] .sfx-lib .sfx-table .track{
  min-height:56px;
  height:56px;
  padding:5px 8px;
  overflow:hidden;
  border-top:1px solid rgba(123,143,175,.12);
  border-bottom:0;
  border-radius:12px;
  isolation:isolate;
  transition:background .26s var(--ease),box-shadow .3s var(--ease),transform .34s var(--ease-spring),border-color .22s;
  animation:none;
}
body[data-page="sounds"] .sfx-lib .sfx-table .track::after{ display:none; }
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover{background:var(--sfx-hover);box-shadow:none;transform:none}
body[data-page="sounds"] .sfx-lib .sfx-table .track.selected{border-color:rgba(47,107,238,.22);background:linear-gradient(105deg,rgba(242,247,255,.88),rgba(233,241,255,.62));box-shadow:0 13px 30px -25px rgba(47,107,238,.58),inset 0 0 0 1px rgba(47,107,238,.09),inset 0 1px 0 rgba(255,255,255,.9)}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing{border-color:rgba(47,107,238,.36);background:linear-gradient(105deg,rgba(237,244,255,.95),rgba(226,237,255,.75));box-shadow:0 18px 36px -25px rgba(47,107,238,.72),inset 0 0 0 1px rgba(47,107,238,.12),inset 0 1px 0 #fff}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing::before{display:none}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay{
  width:34px;
  height:34px;
  border-color:rgba(120,141,174,.22);
  color:var(--text-2);
  background:rgba(255,255,255,.62);
  box-shadow:0 1px 2px rgba(16,24,40,.05);
  transition:color .16s,background .18s,border-color .16s,box-shadow .2s,transform .18s var(--ease-spring);
}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay .ip{width:12px;height:13px}
body[data-page="sounds"] .sfx-lib .sfx-table .tplay .ipa{width:11px;height:13px}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .tplay{color:#fff;border-color:var(--primary);background:var(--primary);box-shadow:0 3px 10px -4px rgba(47,107,238,.5);transform:none}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .tplay svg{fill:#fff;color:#fff}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .tplay{color:#fff;border-color:var(--primary);background:var(--primary);box-shadow:0 3px 10px -4px rgba(47,107,238,.5)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-info{gap:10px}
body[data-page="sounds"] .sfx-lib .sfx-table .t-art{width:38px;height:38px;border-radius:9px;box-shadow:0 7px 16px -13px rgba(17,34,66,.6),inset 0 0 0 1px rgba(255,255,255,.3);transition:transform .34s var(--ease-spring),box-shadow .28s}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-art{transform:scale(1.035);box-shadow:0 14px 26px -15px rgba(17,34,66,.68)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-art img{filter:saturate(.88) contrast(1.03)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-name{margin-bottom:3px;color:var(--text);font-size:13px;font-weight:700;line-height:1.25}
body[data-page="sounds"] .sfx-lib .sfx-table .t-name a{color:var(--text);filter:none!important}
body[data-page="sounds"] .sfx-lib .sfx-table .ttag{max-width:100px;padding:2px 7px;border:0;border-radius:999px;color:var(--text-3);background:rgba(116,137,173,.09);font-size:9.5px;font-weight:590;overflow:hidden;text-overflow:ellipsis}
body[data-page="sounds"] .sfx-lib .sfx-table .t-wave{height:30px;padding:4px 0;gap:1px;cursor:crosshair}
body[data-page="sounds"] .sfx-lib .sfx-table .t-wave .wb{flex:1 1 2px;width:auto;min-width:1px;max-width:3px;border-radius:2px;background:rgba(91,118,161,.35);opacity:1;transition:height .32s var(--ease-spring),background .1s linear,opacity .1s}
body[data-page="sounds"] .sfx-lib .sfx-table .track:hover .t-wave .wb{opacity:1}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-wave .wb{background:rgba(47,107,238,.23);opacity:1}
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-wave .wb.played,
body[data-page="sounds"] .sfx-lib .sfx-table .track.playing .t-wave .wb.is-played{background:var(--primary)}
body[data-page="sounds"] .sfx-lib .sfx-table .t-dur,
body[data-page="sounds"] .sfx-lib .sfx-table .t-catchip{color:var(--text-2);font-size:11.5px;font-weight:560}
body[data-page="sounds"] .sfx-lib .sfx-table .t-key{color:var(--text-2);font-size:11.5px;font-weight:620}
body[data-page="sounds"] .sfx-lib .sfx-table .t-acts{gap:2px;opacity:1;transform:none}
body[data-page="sounds"] .sfx-lib .sfx-table .ta{width:30px;height:30px;border-radius:50%;color:var(--text-3)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta:hover{color:var(--text);background:rgba(255,255,255,.74);transform:translateY(-1px)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta:active{transform:scale(.88)}
body[data-page="sounds"] .sfx-lib .sfx-table .ta.faved{color:#ff3b5c}
body[data-page="sounds"] .sfx-lib .sfx-table .ta.faved svg{fill:currentColor}
body[data-page="sounds"] .sfx-lib .sfx-table .state-msg{padding:62px 20px;color:var(--text-3)}

/* Refine rail */
body[data-page="sounds"] .sfx-refine{
  position:sticky;
  top:0;
  align-self:start;
  max-height:calc(100dvh - 128px);
  padding:18px;
  overflow-y:auto;
  border-radius:24px;
  scrollbar-width:thin;
  animation:sfxRailIn .58s .06s var(--ease-spring) both;
}
body[data-page="sounds"] .rf-head{align-items:center;gap:12px;padding:2px 2px 14px;margin:0}
body[data-page="sounds"] .rf-head h2{color:var(--text);font-size:16px;font-weight:740}
body[data-page="sounds"] .rf-head-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
body[data-page="sounds"] .rf-reset{color:var(--primary);font-size:11.5px;font-weight:650;opacity:.7}
body[data-page="sounds"] .rf-close{display:none;place-items:center;width:32px;height:32px;min-height:32px;border-radius:50%;color:var(--text-2);background:var(--hover)}
body[data-page="sounds"] .rf-close svg{width:16px;height:16px}
body[data-page="sounds"] .rf-group{padding:11px 2px;border-bottom:0;border-top:1px solid rgba(115,137,174,.12)}
body[data-page="sounds"] .rf-label,
body[data-page="sounds"] .rf-label-row .rf-label{margin-bottom:12px;color:var(--text);font-size:12px;font-weight:650;text-transform:none}
body[data-page="sounds"] .rf-select{height:38px;border-color:rgba(120,141,175,.15);border-radius:11px;color:var(--text-2);background:rgba(255,255,255,.55);font-size:12px;font-weight:580}
body[data-page="sounds"] .rf-toggle{height:36px;border-color:rgba(120,141,175,.15);border-radius:11px;color:var(--text-2);background:rgba(255,255,255,.50);font-size:11.5px;font-weight:580}
body[data-page="sounds"] .rf-toggle:hover{color:var(--text);border-color:rgba(120,141,175,.22);background:rgba(255,255,255,.78);transform:translateY(-1px)}
body[data-page="sounds"] .rf-toggle.active{color:var(--primary);border-color:rgba(47,107,238,.28);background:var(--primary-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.82)}
body[data-page="sounds"] .rf-toggle[data-warmth="warm"].active{color:#f04d2f;border-color:rgba(240,77,47,.22);background:rgba(255,94,64,.08)}
body[data-page="sounds"] .rf-cta{height:44px;margin-top:6px;border-radius:12px;background:var(--accent-grad);box-shadow:0 14px 28px -18px rgba(34,99,226,.82),inset 0 1px 0 rgba(255,255,255,.34);font-size:12.5px;font-weight:680}
body[data-page="sounds"] .sfx-refine-scrim{display:none}

/* Grid mode remains a full interaction mode, not a static preview. */
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid #list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 14px 16px}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track{min-height:176px;padding:14px;border:1px solid rgba(123,143,175,.14);border-radius:16px;background:rgba(255,255,255,.42)}
body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-art{height:104px}

/* Dark glass */
html[data-theme="dark"] body[data-page="sounds"] .sfx-results-main,
html[data-theme="dark"] body[data-page="sounds"] .sfx-refine{background:linear-gradient(145deg,rgba(38,42,52,.82),rgba(20,23,31,.68));border-color:rgba(255,255,255,.12);box-shadow:0 28px 68px -34px rgba(0,0,0,.72),inset 0 1px 0 rgba(255,255,255,.08)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-field,
html[data-theme="dark"] body[data-page="sounds"] .sfx-more-search,
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-mode,
html[data-theme="dark"] body[data-page="sounds"] .sfx-pill,
html[data-theme="dark"] body[data-page="sounds"] .sfx-catbar-more,
html[data-theme="dark"] body[data-page="sounds"] .sfx-tool,
html[data-theme="dark"] body[data-page="sounds"] .sfx-sort,
html[data-theme="dark"] body[data-page="sounds"] .rf-select,
html[data-theme="dark"] body[data-page="sounds"] .rf-toggle{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-field:focus-within{background:rgba(255,255,255,.075);border-color:rgba(86,146,255,.42);box-shadow:0 0 0 4px rgba(64,130,255,.11),inset 0 1px 0 rgba(255,255,255,.09)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-mode button:hover{background:rgba(255,255,255,.05)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-mode button.active{background:rgba(255,255,255,.11);box-shadow:inset 0 0 0 1px rgba(118,158,232,.15),inset 0 1px 0 rgba(255,255,255,.08)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-search-workbench .search-sugg{background:rgba(28,32,41,.91);border-color:rgba(255,255,255,.12);box-shadow:0 26px 60px -30px rgba(0,0,0,.86),inset 0 1px 0 rgba(255,255,255,.07)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-pill.active,
html[data-theme="dark"] body[data-page="sounds"] .rf-toggle.active,
html[data-theme="dark"] body[data-page="sounds"] .sfx-intent-chip{background:rgba(47,107,238,.16);border-color:rgba(89,145,255,.26)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-viewtoggle button.active{background:rgba(255,255,255,.09);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .track:hover{background:rgba(255,255,255,.04)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .track::after{background:linear-gradient(105deg,rgba(255,255,255,.01),rgba(75,113,182,.12),rgba(255,255,255,.025))}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .track.selected,
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .track.playing{background:linear-gradient(105deg,rgba(45,96,190,.18),rgba(55,86,146,.09));border-color:rgba(88,145,255,.25);box-shadow:0 20px 40px -30px rgba(0,0,0,.9),inset 0 0 0 1px rgba(84,143,255,.08),inset 0 1px 0 rgba(255,255,255,.05)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .tplay{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.11);box-shadow:0 8px 18px -13px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.08)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table .ta:hover{background:rgba(255,255,255,.07)}
html[data-theme="dark"] body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track{background:rgba(255,255,255,.025);border-color:rgba(255,255,255,.08)}

@keyframes sfxWorkbenchIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes sfxRailIn{from{opacity:0;transform:translateX(14px) scale(.985)}to{opacity:1;transform:none}}
@keyframes sfxRowIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes sfxChipIn{from{opacity:0;transform:translateY(4px) scale(.94)}to{opacity:1;transform:none}}
@keyframes sfxSearchBreathe{from{color:var(--text-3);transform:scale(.94)}to{color:var(--primary);transform:scale(1.06)}}

@media (max-width:1320px){
  body[data-page="sounds"] .main.sfx-lib{padding-left:22px;padding-right:22px}
  body[data-page="sounds"] .sfx-results{grid-template-columns:minmax(0,1fr) 286px;gap:18px}
  body[data-page="sounds"] .sfx-search-workbench.search{grid-template-columns:minmax(220px,1fr) 170px 104px;gap:10px}
  body[data-page="sounds"] .sfx-more-search{padding:0 14px}
  body[data-page="sounds"] .sfx-search-mode button{gap:5px;padding:0 7px;font-size:11.5px}
  body[data-page="sounds"] .sfx-search-workbench .search-sugg{right:310px}
  body[data-page="sounds"] .sfx-lib .sfx-table{--cols:52px minmax(205px,1.15fr) minmax(140px,.9fr) 58px 78px 104px}
  body[data-page="sounds"] .sfx-lib .sfx-table .tplay{width:46px;height:46px}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-art{width:50px;height:50px}
}
@media (max-width:1120px){
  body[data-page="sounds"] .main.sfx-lib{padding-left:24px;padding-right:24px}
  body[data-page="sounds"] .sfx-results{grid-template-columns:minmax(0,1fr)}
  body[data-page="sounds"] .sfx-results.refine-collapsed{grid-template-columns:minmax(0,1fr);gap:0}
  body[data-page="sounds"] .sfx-results.refine-collapsed .sfx-refine{opacity:0;transform:translateX(calc(100% + 28px));pointer-events:none}
  body[data-page="sounds"] .sfx-refine{
    position:fixed;
    top:12px;
    right:12px;
    bottom:12px;
    z-index:1250;
    width:min(360px,calc(100vw - 24px));
    height:calc(100dvh - 24px);
    max-height:none;
    opacity:0;
    pointer-events:none;
    transform:translateX(calc(100% + 28px));
    transition:opacity .22s,transform .38s var(--ease);
    animation:none;
  }
  body[data-page="sounds"] .sfx-refine.open{opacity:1;pointer-events:auto;transform:none}
  body[data-page="sounds"] .rf-close{display:grid}
  body[data-page="sounds"] .sfx-refine-scrim{
    position:fixed;
    inset:0;
    z-index:1240;
    display:block;
    opacity:0;
    visibility:hidden;
    background:rgba(19,28,45,.20);
    -webkit-backdrop-filter:blur(6px);
    backdrop-filter:blur(6px);
    transition:opacity .22s,visibility .22s;
  }
  body[data-page="sounds"] .sfx-refine-scrim.show{opacity:1;visibility:visible}
  body[data-page="sounds"] .rf-cta{position:sticky;bottom:0;z-index:2}
}
@media (max-width:820px){
  body[data-page="sounds"] .main.sfx-lib{padding:14px 12px 118px}
  body[data-page="sounds"] .sfx-results-main{border-radius:20px}
  body[data-page="sounds"] .sfx-search-workbench.search{grid-template-columns:minmax(0,1fr) 92px;gap:8px;min-height:0;padding:12px}
  body[data-page="sounds"] .sfx-search-field{grid-column:1/-1}
  body[data-page="sounds"] .sfx-search-field{height:50px;padding:0 82px 0 17px}
  body[data-page="sounds"] .sfx-search-workbench .sfx-search-icon{width:19px;height:19px;margin-right:11px}
  body[data-page="sounds"] .sfx-search-workbench input{height:48px;font-size:14px}
  body[data-page="sounds"] .sfx-search-clear{right:42px;width:34px;height:34px}
  body[data-page="sounds"] .sfx-search-voice{right:5px;width:34px;height:34px}
  body[data-page="sounds"] .sfx-more-search{width:48px;height:48px;min-height:48px;padding:0}
  body[data-page="sounds"] .sfx-more-search span,
  body[data-page="sounds"] .sfx-more-search .sfx-more-caret{display:none}
  body[data-page="sounds"] .sfx-more-search svg:first-child{width:19px}
  body[data-page="sounds"] .sfx-search-mode{grid-column:1;height:48px}
  body[data-page="sounds"] .sfx-search-mode button{height:38px;min-height:38px}
  body[data-page="sounds"] .sfx-search-submit{grid-column:2}
  body[data-page="sounds"] .sfx-search-submit{height:48px;min-height:48px;font-size:13px}
  body[data-page="sounds"] .sfx-search-workbench .search-sugg{top:128px;left:12px;right:12px}
  body[data-page="sounds"] .sfx-smart-hints{padding:7px 12px 0}
  body[data-page="sounds"] .sfx-catbar{padding:10px 12px 12px}
  body[data-page="sounds"] .sfx-catbar-track{gap:7px}
  body[data-page="sounds"] .sfx-pill{height:38px;min-width:68px;padding:0 15px;font-size:11.5px}
  body[data-page="sounds"] .sfx-catbar-more{right:12px;width:38px;height:38px}
  body[data-page="sounds"] .sfx-results-head{align-items:flex-start;flex-direction:column;min-height:0;padding:14px 12px;gap:12px}
  body[data-page="sounds"] .sfx-head-tools{width:100%;justify-content:space-between}
  body[data-page="sounds"] .sfx-sort{margin-left:auto}
  body[data-page="sounds"] .sfx-sort-lbl{display:none}
  body[data-page="sounds"] .sfx-sort select{max-width:118px;padding-left:12px}
  body[data-page="sounds"] .sfx-lib .sfx-table .tl-head{display:none}
  body[data-page="sounds"] .sfx-lib .sfx-table #list{padding:7px}
  body[data-page="sounds"] .sfx-lib .sfx-table .track,
  body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .track{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:8px 9px;
    min-height:145px;
    height:auto;
    padding:11px 8px;
    border-top:1px solid rgba(123,143,175,.12);
    border-right:0;
    border-bottom:0;
    border-left:0;
    border-radius:14px;
    background:transparent;
  }
  body[data-page="sounds"] .sfx-lib .sfx-table.view-grid #list{display:block;padding:7px}
  body[data-page="sounds"] .sfx-lib .sfx-table .ti-cell{grid-column:1;grid-row:1;position:static}
  body[data-page="sounds"] .sfx-lib .sfx-table .tplay{width:44px;height:44px}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-info{grid-column:2;grid-row:1;flex-direction:row;width:auto}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-art,
  body[data-page="sounds"] .sfx-lib .sfx-table.view-grid .t-art{width:48px;height:48px;border-radius:11px}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-dur{grid-column:3;grid-row:1;position:static;align-self:center;padding:0;background:transparent;color:var(--text-2)}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-wave{display:flex;grid-column:2/4;grid-row:2;width:100%;height:34px;padding:5px 0}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-catcell{display:block;grid-column:2;grid-row:3}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-key{display:none}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-acts{grid-column:3;grid-row:3;width:auto;justify-content:flex-end}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-name{font-size:13px}
  body[data-page="sounds"] .sfx-lib .sfx-table .t-tags{margin-top:5px}
}
@media (max-width:520px){
  body[data-page="sounds"] .sfx-search-workbench.search{grid-template-columns:minmax(0,1fr) 98px}
  body[data-page="sounds"] .sfx-search-submit{grid-column:2;width:100%}
  body[data-page="sounds"] .sfx-search-mode{grid-column:1}
  body[data-page="sounds"] .sfx-more-search{width:44px}
  body[data-page="sounds"] .sfx-search-workbench .search-sugg{right:12px;top:70px}
  body[data-page="sounds"] .sfx-count-n,
  body[data-page="sounds"] .sfx-count-lbl{font-size:17px}
  body[data-page="sounds"] .sfx-head-tools{gap:6px}
  body[data-page="sounds"] .sfx-tool{width:42px;padding:0;justify-content:center}
  body[data-page="sounds"] .sfx-tool span,
  body[data-page="sounds"] .sfx-tool .sfx-tool-caret{display:none}
  body[data-page="sounds"] .sfx-sort{margin-left:0}
  body[data-page="sounds"] .sfx-viewtoggle{margin-left:auto}
}
@media (prefers-reduced-motion:reduce){
  body[data-page="sounds"] .sfx-results-main,
  body[data-page="sounds"] .sfx-refine,
  body[data-page="sounds"] .sfx-lib .sfx-table .track{animation:none}
  body[data-page="sounds"] .sfx-search-field,
  body[data-page="sounds"] .sfx-lib .sfx-table .track,
  body[data-page="sounds"] .sfx-lib .sfx-table .tplay,
  body[data-page="sounds"] .sfx-pill,
  body[data-page="sounds"] .sfx-search-submit,
  body[data-page="sounds"] .sfx-more-search,
  body[data-page="sounds"] .sfx-search-mode button,
  body[data-page="sounds"] .sfx-refine{transition-duration:.01ms!important}
}
