.sound-view-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--border);border-radius:10px;background:var(--panel);flex-shrink:0}
.sound-view-switch button{padding:7px 10px;min-height:34px;border-color:transparent;background:transparent;font-size:13px;white-space:nowrap}
.sound-view-switch button[aria-pressed=true],:root[data-theme=dark] .sound-view-switch button[aria-pressed=true],:root[data-custom-theme=true] .sound-view-switch button[aria-pressed=true]{background:var(--surface);color:var(--accent);border-color:var(--border);font-weight:700;box-shadow:0 1px 3px #0001}
.sound-table-heading{display:none}
:is(#comparison-cells,.tile-drag-ghost).list,:is(#comparison-cells,.tile-drag-ghost).table{display:block;overflow-x:auto;padding:3px 3px 8px;--sound-columns:112px minmax(180px,1fr) 210px 190px;scrollbar-width:thin}
:is(#comparison-cells,.tile-drag-ghost).list .cell,:is(#comparison-cells,.tile-drag-ghost).table .cell{display:grid;grid-template-columns:var(--sound-columns);align-items:center;column-gap:12px;row-gap:0;min-width:750px;min-height:66px;padding:8px 12px;margin:0 0 7px;border-radius:10px;border-width:1px;box-shadow:none}
:is(#comparison-cells,.tile-drag-ghost).list .cell.active,:is(#comparison-cells,.tile-drag-ghost).table .cell.active{outline:2px solid var(--accent);outline-offset:-2px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-top{gap:5px;justify-content:flex-start;margin:0;min-width:0}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-top button{width:28px;min-width:28px;min-height:30px;padding:3px;font-size:13px!important}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-top .check{font-size:12px;gap:4px;white-space:nowrap}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-top input{margin:0;width:14px;height:14px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-play{grid-column:2;grid-row:1;margin:0;padding:4px 0;font-size:14px;gap:9px;min-width:0;min-height:34px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-play .sound-name{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;line-height:1.3}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .sample-tag{display:grid;place-items:center;flex:0 0 27px;width:27px;height:28px;padding:0;font-size:17px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-thumbnail{width:28px;height:28px;flex-shrink:0;margin:0}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .audio-quickfacts,:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell>.cell-note-preview{display:none}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .rating{grid-column:3;grid-row:1;display:flex;flex-wrap:nowrap;min-height:0;gap:3px;overflow-x:auto;max-width:100%;padding:2px 0}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .rating button{padding:4px 6px;min-width:32px;min-height:32px;font-size:12px;flex-shrink:0}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .rating small{font-size:11px;line-height:1.3}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-foot{grid-column:4;grid-row:1;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:5px;border:0;margin:0;padding:0;font-size:12px;min-width:0}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-status{order:-1;white-space:nowrap;font:11px ui-monospace,monospace;margin-right:auto}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-foot button{display:inline-flex;align-items:center;justify-content:center;min-height:30px;min-width:28px;padding:3px 6px;white-space:nowrap;flex-shrink:0;font-size:12px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-foot .delete-control{width:28px;padding:4px}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-foot [data-reveal-token]{font-size:11px}
:is(#comparison-cells,.tile-drag-ghost).table{--sound-columns:112px minmax(180px,1fr) 116px 130px;border:1px solid var(--border);border-radius:10px;padding:0 0 3px}
:is(#comparison-cells,.tile-drag-ghost).table .cell{min-width:600px;min-height:42px;padding:4px 10px;margin:0;border:0;border-bottom:1px solid var(--border);border-radius:0;background:var(--surface)}
:is(#comparison-cells,.tile-drag-ghost).table .cell:nth-of-type(even){background:var(--panel)}
:is(#comparison-cells,.tile-drag-ghost).table .cell.selected{background:var(--accent-bg)}
:is(#comparison-cells,.tile-drag-ghost).table .cell-play{font-size:13px;min-height:30px;padding:0}
:is(#comparison-cells,.tile-drag-ghost).table .cell-thumbnail,:is(#comparison-cells,.tile-drag-ghost).table .note-label{display:none}
:is(#comparison-cells,.tile-drag-ghost).table .rating select{width:112px;max-width:100%;padding:4px 7px;min-height:30px;font-size:12px}
:is(#comparison-cells,.tile-drag-ghost).table .compact-rank{font-weight:700;font-size:13px}
:is(#comparison-cells,.tile-drag-ghost).table .sound-table-heading{display:grid;grid-template-columns:var(--sound-columns);gap:12px;min-width:600px;padding:10px;background:var(--panel);color:var(--muted);font-size:11px;font-weight:700;border-bottom:1px solid var(--border)}
:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .tile-placeholder{min-height:42px}
.tile-drag-ghost.table>.cell{transform:none}
.folder-sounds.list,.folder-sounds.table{display:block;overflow-x:auto}
.folder-sounds:is(.list,.table)>.cell{display:grid;grid-template-columns:145px minmax(180px,1fr) minmax(150px,220px) max-content;gap:14px;align-items:center;min-width:700px;min-height:64px;padding:8px 14px;margin-bottom:7px}
.folder-sounds .folder-sound-name{margin:18px 0 10px}
.folder-sounds:is(.list,.table) .folder-sound-name{margin:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.folder-sounds:is(.list,.table) .badge{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.folder-sounds:is(.list,.table) .folder-sound-meta{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}
.folder-sounds:is(.list,.table) .audio-quickfacts{display:none}
.folder-sounds:is(.list,.table) .row{flex-wrap:nowrap;gap:5px}
.folder-sounds:is(.list,.table) .row button{padding:5px 8px;min-height:32px;white-space:nowrap;font-size:12px}
.folder-sounds:is(.list,.table) .error{grid-column:1/-1;margin:0;white-space:normal}
.folder-sounds.table>.cell{min-height:42px;padding:4px 10px;margin:0;border-radius:0;border-width:0 0 1px}
.folder-sounds.table{border:1px solid var(--border);border-radius:10px}
.folder-sounds.table>.cell:nth-child(even){background:var(--panel)}
.guest-audio-grid.is-table{gap:0;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.guest-audio-grid.is-table .guest-audio-card{min-height:42px;padding:8px 16px;border:0;border-bottom:1px solid var(--border);border-radius:0;gap:16px}
.guest-audio-grid.is-table .guest-audio-card:nth-child(even){background:var(--panel)}
.guest-audio-grid.is-table .guest-audio-name{font-size:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guest-audio-grid.is-table .guest-audio-card>span{font-size:11px}
@media(max-width:700px){.sound-view-switch{max-width:100%;overflow-x:auto}.sound-view-switch button{min-height:40px;padding:7px 10px}.toolbar>.row{flex-wrap:wrap}:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell{min-height:48px}:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-top button,:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .cell-foot button,:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .rating select{min-height:38px}.folder-sounds:is(.list,.table)>.cell{min-height:48px}.folder-sounds:is(.list,.table) .row button{min-height:38px}}

:is(#comparison-cells,.tile-drag-ghost):is(.list,.table) .note-label{display:none}

.sound-scroll-hint{display:none}@media(max-width:700px){.sound-scroll-hint:not([hidden]){display:block;font-size:12px;color:var(--muted);margin:6px 0 12px}}

/* Flat, readable list rows; the table remains the densest layout. */
:is(#comparison-cells,.tile-drag-ghost).list .cell{min-height:52px;padding:4px 10px;margin-bottom:8px}
.folder-sounds.list>.cell{min-height:52px;padding:5px 10px;margin-bottom:8px}
@media(max-width:700px){:is(#comparison-cells,.tile-drag-ghost).list .cell{min-height:48px}}

/* Separate project titles, audio lists and saved-test sections. */
#main>.breadcrumb+.project-head{margin-top:24px}
.project-head{margin-bottom:36px}
.project-head h1{margin-bottom:18px}
#work-area>.breadcrumb{margin-bottom:22px}
#work-area>.toolbar{margin-bottom:24px}
#work-area>.player-studio{margin-top:16px;margin-bottom:34px}
#work-area>.sort-hint{margin:16px 0 24px}
#work-area>.load-status{margin-bottom:20px}
#work-area>#folder-sounds{margin-top:24px;margin-bottom:42px}
#work-area>.section-heading{margin-top:40px;margin-bottom:24px}
#work-area>.section-heading h2{margin-bottom:0}
#work-area>#saved-groups:not(:empty){margin-top:16px;margin-bottom:24px}
.saved-comparisons>.section-heading{margin-bottom:32px}
.saved-comparisons>.project-filters{margin-top:22px;margin-bottom:28px}
@media(max-width:700px){.project-head{margin-bottom:28px}#work-area>.player-studio{margin-bottom:28px}#work-area>.section-heading{margin-top:32px}}
/* Smaller sound labels keep the title visually subordinate to the player. */
#comparison-cells:not(.list):not(.table) .cell-play,.folder-sounds:not(.list):not(.table) .folder-sound-name{font-size:14px;line-height:1.45}
:is(#comparison-cells,.tile-drag-ghost).list .cell-play,.folder-sounds.list .folder-sound-name{font-size:13px}
.guest-audio-grid:not(.is-table) .guest-audio-name{font-size:clamp(13px,1.1vw,16px)!important;line-height:1.45}
.guest-audio-grid.is-list:not(.is-table) .guest-audio-name{font-size:13px!important}
.sound-view-switch button[aria-pressed=true],:root[data-theme=dark] .sound-view-switch button[aria-pressed=true],:root[data-custom-theme=true] .sound-view-switch button[aria-pressed=true]{background:var(--brand-color,var(--accent));color:var(--accent-contrast,var(--surface));border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-bg)}

/* Ready sounds need no status badge or reserved badge column. */
.folder-sounds:not(.list):not(.table) .folder-sound-name{margin-top:0}.folder-sounds:is(.list,.table)>.cell{grid-template-columns:minmax(180px,1fr) minmax(150px,240px) max-content;min-width:620px}
.folder-sounds .sound-processing-state{grid-column:1/-1;justify-self:start;margin:0 0 8px}.folder-sounds .row>button{font-size:12px;line-height:1.25;min-height:38px;padding:8px 11px;border-radius:8px}.folder-sounds:is(.list,.table) .row>button{font-size:12px;min-height:32px;padding:5px 8px}.folder-heading h2{font-size:25px;margin:4px 0 0;overflow-wrap:anywhere}.folder-heading>small{font-size:11px;color:var(--muted)}
@media(max-width:700px){.folder-sounds .row>button,.folder-sounds:is(.list,.table) .row>button{min-height:40px}}

/* Spreadsheet view: multiple adjacent sounds per row, with shared grid lines. */
:is(#comparison-cells,#folder-sounds).sheet,.guest-audio-grid.is-sheet {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr));
  gap:1px;padding:1px;background:var(--border);border-radius:4px;
}
:is(#comparison-cells,#folder-sounds,.tile-drag-ghost).sheet>.cell,.guest-audio-grid.is-sheet>.guest-audio-card {
  min-width:0;min-height:0;margin:0;padding:4px 6px;border:0;border-radius:0;
  background:var(--surface);box-shadow:none;
}
#comparison-cells.sheet>.cell.selected{background:var(--accent-bg)}
#comparison-cells.sheet>.cell.active{outline:2px solid var(--accent);outline-offset:-2px}
:is(#comparison-cells,.tile-drag-ghost).sheet .cell-top,
:is(#comparison-cells,.tile-drag-ghost).sheet .cell-foot{margin:0;padding:0;border:0;gap:4px;min-width:0}
:is(#comparison-cells,.tile-drag-ghost).sheet .cell-play{
  margin:0;padding:2px 0;gap:5px;min-width:0;min-height:26px;font-size:12px
}
:is(#comparison-cells,.tile-drag-ghost).sheet .sound-name,
#folder-sounds.sheet .folder-sound-name,.guest-audio-grid.is-sheet .guest-audio-name{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal;
  margin:0;padding:0;font-size:12px!important;line-height:1.4
}
:is(#comparison-cells,.tile-drag-ghost).sheet .sample-tag{min-width:18px;width:18px;height:20px;font-size:12px;flex:none}
:is(#comparison-cells,.tile-drag-ghost).sheet :is(.cell-top,.cell-foot) button,
#folder-sounds.sheet .row>button{min-height:24px;min-width:24px;padding:2px 4px;font-size:11px;border-radius:3px}
:is(#comparison-cells,.tile-drag-ghost).sheet .rating{min-height:0;margin:2px 0;padding:0}
:is(#comparison-cells,.tile-drag-ghost).sheet .rating select{width:100%;min-height:24px;padding:2px 4px;font-size:11px}
:is(#comparison-cells,.tile-drag-ghost).sheet .check{font-size:11px;gap:3px}
:is(#comparison-cells,.tile-drag-ghost).sheet :is(.audio-quickfacts,.cell-thumbnail,.cell-note-preview,.note-label),
#folder-sounds.sheet :is(.folder-sound-meta,.audio-quickfacts){display:none}
#folder-sounds.sheet .row{gap:3px;margin-top:3px}
.guest-audio-card{justify-content:center}
.guest-audio-name{margin-bottom:0}
.guest-audio-grid.is-sheet>.guest-audio-card{min-height:32px;align-items:center;flex-direction:row;gap:5px;text-align:left}
.guest-audio-grid.is-sheet>.guest-audio-card::before{content:"▷";flex:none;color:var(--accent)}
.guest-audio-grid.is-table .guest-audio-card:last-child{border-bottom:0}
@media(pointer:coarse){
  :is(#comparison-cells,#folder-sounds).sheet button,.guest-audio-grid.is-sheet>.guest-audio-card,
  #comparison-cells.sheet .rating select{min-height:32px}
}
