body {
    overflow: auto;
}

/* --------------------------------------------------
   Page layout
-------------------------------------------------- */
.header {
    padding: 16px 18px 4px;
}

.pageMain {
    padding: 8px;
}

.pageMain--nextTunes {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.panel {
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .03));
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    overflow: visible;
}

.panelHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.panelHead h2 {
    margin: 0;
    font-size: 18px;
}

.panelSub {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.panelBody {
    padding: 5px 5px;
}

.panelBody--recommendations {
    padding-top: 0px;
}

.topGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.searchPanel,
.recommendationsPanel {
    min-width: 0;
}

/* --------------------------------------------------
   Member search
-------------------------------------------------- */

.memberAddRow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.searchField {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
}

.searchField--wide {
    min-width: 320px;
    flex: 1 1 320px;
}

.searchWrap--field {
    width: 100%;
}

.searchActions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#resetBtn {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid var(--stroke);
    cursor: pointer;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

#resetBtn:hover {
    background: rgba(255, 255, 255, .12);
}

#memberSearchInput {
    width: 100%;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

#memberSearchInput::placeholder {
    color: var(--muted);
}

#memberSearchInput:hover {
    background: rgba(255, 255, 255, .06);
}

#memberSearchInput:focus {
    outline: none;
    border-color: rgba(96, 165, 250, .75);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

/* --------------------------------------------------
   Selected members
-------------------------------------------------- */

.selectedMembers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.memberChip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.memberChipName {
    font-weight: 700;
    color: var(--text);
}

.memberChipMeta {
    color: var(--muted);
    font-size: 12px;
}

.memberChipRemove {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.memberChipRemove:hover {
    color: #fca5a5;
}

/* --------------------------------------------------
   Summary cards
-------------------------------------------------- */

.summaryCards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.summaryCard {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    border-radius: 14px;
    padding: 6px 8px;
}

.summaryCardLabel {
    font-size: 12px;
    color: var(--muted);
}

.summaryCardValue {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.05;
}

/* --------------------------------------------------
   Filters
-------------------------------------------------- */

.filterBar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: end;
    margin-top: 4px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    padding: 4px
}

.filterField {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
    min-width: 0;
}

.filterField--wide {
    flex: 0 1 120px;
    min-width: 220px;
}

.filterField label {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.filterField select,
.filterField input,
#clearFiltersBtn {
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(152, 63, 63, 0.05);
    color: var(--text);
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
}

.filterField input {
    padding: 0 8px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.filterField input::placeholder {
    color: var(--muted);
}

.filterField input:hover {
    background: rgba(255, 255, 255, .06);
}

.filterField input:focus,
.filterField select:focus,
#clearFiltersBtn:focus {
    outline: none;
    border-color: rgba(96, 165, 250, .75);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

.filterField select {
    width: auto;
    min-width: 120px;
    max-width: 320px;
    padding: 0 8px 0 8px;
}

.filterField select option {
    background: #0f172a;
    color: var(--text);
}

.filterActions {
    display: flex;
    align-items: end;
    flex: 0 0 auto;
}

#clearFiltersBtn {
    padding: 0 14px;
    font-weight: 600;
    cursor: pointer;
}

#clearFiltersBtn:hover {
    background: rgba(255, 255, 255, .09);
}

.filterSummary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, .20);
    background: rgba(34, 197, 94, .08);
    color: #dcfce7;
    font-size: 13px;
    line-height: 1.45;
}

.filterLabelText {
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted rgba(255, 255, 255, .15);
}

.filterLabelText:hover {
    border-bottom-color: rgba(255, 255, 255, .35);
}

.filterInfoIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    cursor: help;
    user-select: none;
    opacity: .82;
}

.filterInfoIcon:hover,
.filterInfoIcon:focus {
    opacity: 1;
    background: rgba(96, 165, 250, .16);
    border-color: rgba(96, 165, 250, .28);
    color: #dbeafe;
    outline: none;
}

/* --------------------------------------------------
   Table
-------------------------------------------------- */

.recommendationsWrap {
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
}

.recommendationsTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: rgba(255, 255, 255, 0.02);
}

.recommendationsTable th,
.recommendationsTable td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    vertical-align: middle;
    line-height: 1.2;
}

.recommendationsTable th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(11, 15, 20, .96);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.recommendationsTable th.tuneCol,
.recommendationsTable td.tuneColCell {
    text-align: left;
    min-width: 280px;
}

.recommendationsTable th.centerCol,
.recommendationsTable td.centerColCell {
    text-align: center;
    white-space: nowrap;
}

.recommendationsTable td.detailsColCell {
    width: 54px;
    text-align: center;
}

.tuneRowMain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.recommendationTuneName {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.recommendationTuneName:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.sourceBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 22px;
    padding: 0 8px;
    margin-left: 4px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

.sourceBadge--recordings {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.metricBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .12);
}

.metricBadge--unlocks {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .28);
    color: #bbf7d0;
}

.metricBadge--helps {
    background: rgba(96, 165, 250, .14);
    border-color: rgba(96, 165, 250, .24);
    color: #bfdbfe;
}

.metricBadge--score {
    background: rgba(167, 139, 250, .14);
    border-color: rgba(167, 139, 250, .28);
    color: #ddd6fe;
}

.knownByPill,
.typePill,
.modePill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.knownByPill {
    background: rgba(96, 165, 250, .14);
    border-color: rgba(96, 165, 250, .28);
    color: #bfdbfe;
}

.typePill {
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .28);
    color: #fde68a;
}

.modePill {
    background: rgba(167, 139, 250, .14);
    border-color: rgba(167, 139, 250, .28);
    color: #ddd6fe;
}

.tableMuted {
    color: var(--muted);
    font-size: 12px;
}

.tableSortBtn {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.tableSortBtn:hover {
    color: #93c5fd;
}

.expandBtn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    width: 30px;
    height: 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.expandBtn:hover {
    background: rgba(255, 255, 255, .10);
}

.detailRow {
    display: none;
}

.detailRow.is-open {
    display: table-row;
}

.detailCell {
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.015);
}

.detailPanel {
    padding: 14px;
}

.detailTop {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.detailTitle {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.detailMeta {
    font-size: 13px;
    color: var(--muted);
}

.detailGroups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detailGroup {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    border-radius: 14px;
    padding: 12px;
}

.detailGroup h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.detailSetList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detailSetItem {
    border: 1px solid rgba(255, 255, 255, .05);
    background: rgba(255, 255, 255, .025);
    border-radius: 10px;
    padding: 10px 12px;
}

.detailSetMeta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.detailTuneLine {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detailTunePill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

.detailTunePill:hover,
.detailTunePill:focus,
.detailTunePill:active {
    transform: translateY(-1px);
    text-decoration: none;
}

.detailTunePill--known {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .28);
    color: #bbf7d0;
}

.detailTunePill--missing {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .24);
    color: #fecaca;
}

.detailTunePill--target {
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .30);
    color: #fde68a;
}

.emptyMini {
    color: var(--muted);
    font-size: 13px;
}

.detailMemberLink {
    color: #7dd3fc;
    font-weight: 700;
    text-decoration: none;
}

.detailMemberLink:hover {
    color: #bae6fd;
    text-decoration: none;
}

.detailSetId,
.detailSetDate,
.detailSetRepeat {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
}

.detailSetId {
    color: #cbd5e1;
}

.detailSetDate {
    color: #94a3b8;
}

.detailSetRepeat {
    color: #94a3b8;
}

.detailSetLink {
    color: #93c5fd;
    text-decoration: none;
    margin-left: 6px;
}

.detailSetLink:hover {
    text-decoration: none;
    color: #bfdbfe;
}

.detailTunePillWrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
}

.detailTuneSessionLink img {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

.detailTuneSessionLink:hover img {
    opacity: 1;
}

/* --------------------------------------------------
   Links / icons
-------------------------------------------------- */

.sessionIconLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.15s ease;
    flex: 0 0 auto;
    opacity: 0.85;
}

.sessionIconLink:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
    opacity: 1;
}

.sessionIconLink img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.trackOverviewLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    flex: 0 0 auto;
}

.trackOverviewDot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.5),
        0 0 6px rgba(245, 158, 11, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.trackOverviewLink:hover .trackOverviewDot {
    transform: scale(1.2);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.7),
        0 0 10px rgba(245, 158, 11, 0.9);
}

/* --------------------------------------------------
   Stars
-------------------------------------------------- */

.popCol {
    width: 90px;
    text-align: center;
}

.popColCell {
    text-align: center;
    font-size: 28px;
}

.starRating {
    display: inline-block;
    color: #f5c518;
}

.star {
    letter-spacing: 1px;
}

.star--filled {
    color: #f5c518;
}

.star--empty {
    color: rgba(255, 255, 255, 0.2);
}

.starRating--unknown {
    color: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------
   States
-------------------------------------------------- */

.emptyState,
.errorState,
.loadingState {
    padding: 10px 0;
}

/* --------------------------------------------------
   Misc / tooltips
-------------------------------------------------- */

.recommendationsWrap,
.recommendationsTable,
.recommendationsTable td,
.recommendationsTable th {
    overflow: visible;
}

.tuneColCell,
.tuneRowMain {
    overflow: visible;
}

.tteIncipitTooltip,
.incipitTooltip,
.abcTooltip {
    max-width: min(420px, calc(100vw - 24px));
    box-sizing: border-box;
}

.infoIcon {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.6;
    cursor: help;
}

.infoIcon:hover {
    opacity: 1;
}

.simpleTooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #cbd5e1;
    max-width: 260px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
}

.simpleTooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------
   Card view
-------------------------------------------------- */

.recommendationsCards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.recommendationCard {
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .03));
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.recommendationCardHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.recommendationCardTitleWrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.recommendationCardTitle {
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
    font-size: 16px;
}

.recommendationCardTitle:hover {
    color: #93c5fd;
    text-decoration: none;
}

.recommendationCardMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.recommendationMiniChart {
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .025);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
}

.recommendationMiniChart svg {
    display: block;
    width: 100%;
    height: 120px;
}

.recommendationCardActions {
    display: flex;
    justify-content: flex-end;
}

.cardExpandBtn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.cardExpandBtn:hover {
    background: rgba(255, 255, 255, .10);
}

.recommendationCardDetail {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.recommendationCardDetail.is-open {
    display: block;
}

.miniMetricLabel {
    fill: #cbd5e1;
    font-size: 12px;
}

.miniMetricValue {
    fill: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

/* --------------------------------------------------
   Graph
-------------------------------------------------- */

.recommendationsWrap--graph {
    padding: 0;
    overflow: hidden;
}

.graphToolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
}

.graphToolbarMeta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.graphToolbarActions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.graphToolbarField {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 130px;
}

.graphToolbarField span {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.graphToolbarField select,
.graphToolbarActions select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(15, 23, 42, 0.85);
    background-image: none;
    color: var(--text);
    padding: 0 32px 0 12px;
    font-size: 13px;
    outline: none;
    box-shadow: none;
}

.graphToolbarField select option,
.graphToolbarActions select option {
    background: #0f172a;
    color: var(--text);
}

.nextTunesGraphLayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(420px, 30vw, 800px);
    align-items: stretch;
    min-width: 0;
}

.graphStageWrap {
    position: relative;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, .08);
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.08), transparent 30%);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 72vh;
}

.nextTunesGraph {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 720px;
}

.graphSidePanel {
    min-width: 0;
    width: 100%;
    padding: 14px;
    overflow: auto;
    background: rgba(255, 255, 255, .02);
}

.graphSideEmpty {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.graphSideTitle {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.graphSideMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.graphNodePill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.graphNodePill--good {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .28);
    color: #bbf7d0;
}

.graphNodePill--info {
    background: rgba(96, 165, 250, .14);
    border-color: rgba(96, 165, 250, .28);
    color: #bfdbfe;
}

.graphNodePill--warn {
    background: rgba(245, 158, 11, .14);
    border-color: rgba(245, 158, 11, .28);
    color: #fde68a;
}

.graphNodeList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.graphNodeSection {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    border-radius: 14px;
    padding: 12px;
}

.graphNodeSection h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.graphColumnLabel {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    fill: rgba(255, 255, 255, .55);
}

.graphNodeLabel {
    fill: #e5e7eb;
    font-size: 12px;
    dominant-baseline: middle;
}

.graphNodeLabel--muted {
    fill: #94a3b8;
}

.graphTuneNode rect,
.graphSetNode rect {
    transition: opacity .15s ease, transform .15s ease, stroke .15s ease;
}

.graphLink {
    fill: none;
    stroke: rgba(148, 163, 184, .24);
    stroke-width: 1.5;
    transition: stroke .15s ease, opacity .15s ease, stroke-width .15s ease;
}

.graphLink.is-dimmed {
    opacity: .10;
}

.graphLink.is-active {
    stroke: rgba(96, 165, 250, .88);
    stroke-width: 2.8;
    opacity: 1;
}

.graphLink.is-active-set {
    stroke: rgba(167, 139, 250, .88);
    stroke-width: 2.8;
    opacity: 1;
}

.graphTuneNode.is-dimmed,
.graphSetNode.is-dimmed {
    opacity: .22;
}

.graphTuneNode.is-active rect {
    stroke: rgba(96, 165, 250, .85);
    stroke-width: 2;
    fill: rgba(96, 165, 250, .16);
}

.graphSetNode.is-active rect {
    stroke: rgba(167, 139, 250, .85);
    stroke-width: 2;
    fill: rgba(167, 139, 250, .14);
}

.graphTuneNode rect {
    fill: rgba(255, 255, 255, .05);
    stroke: rgba(255, 255, 255, .10);
    rx: 10;
    ry: 10;
}

.graphSetNode rect {
    fill: rgba(255, 255, 255, .04);
    stroke: rgba(255, 255, 255, .08);
    rx: 10;
    ry: 10;
}

.graphTuneMetric {
    fill: #bbf7d0;
    font-size: 11px;
    font-weight: 800;
    dominant-baseline: middle;
}

.graphSetMeta {
    fill: #94a3b8;
    font-size: 11px;
    dominant-baseline: middle;
}

/* --------------------------------------------------
   Mobile / responsive
-------------------------------------------------- */

@media (max-width: 1400px) {
    .nextTunesGraphLayout {
        grid-template-columns: minmax(0, 1fr) clamp(360px, 25vw, 500px);
    }
}

@media (max-width: 1100px) {
    .topGrid {
        grid-template-columns: 1fr;
    }

    .nextTunesGraphLayout {
        grid-template-columns: 1fr;
    }

    .graphStageWrap {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        overflow-x: auto;
        overflow-y: auto;
    }

    .nextTunesGraph {
        min-height: 640px;
    }
}

@media (max-width: 980px),
(max-height: 520px) {
    .summaryPanel {
        display: none;
    }

    .recommendationsTable th.popCol,
    .recommendationsTable td.popColCell,
    .recommendationsTable th.typeCol,
    .recommendationsTable td.typeColCell,
    .recommendationsTable th.modeCol,
    .recommendationsTable td.modeColCell,
    .recommendationsTable th.scoreCol,
    .recommendationsTable td.scoreColCell,
    .recommendationsTable th.appearancesCol,
    .recommendationsTable td.appearancesColCell {
        display: none;
    }

    .recommendationsTable th.tuneCol,
    .recommendationsTable td.tuneColCell {
        min-width: 220px;
    }

    .detailGroups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .summaryCards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .memberAddRow {
        align-items: stretch;
    }

    .searchActions {
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .searchField--wide {
        min-width: 100%;
        flex: 1 1 100%;
    }

    .searchActions {
        flex: 1 1 100%;
    }

    .summaryCards {
        grid-template-columns: 1fr;
    }

    .filterBar {
        flex-direction: column;
        align-items: stretch;
    }

    .filterField,
    .filterField--wide,
    .filterActions {
        flex: 1 1 100%;
    }

    .filterField select,
    #clearFiltersBtn {
        width: 100%;
        max-width: none;
    }

    .panelHead {
        padding-left: 14px;
        padding-right: 14px;
    }

    .panelBody {
        padding-left: 14px;
        padding-right: 14px;
    }

    .recommendationsCards {
        grid-template-columns: 1fr;
    }

    .graphToolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .graphToolbarActions {
        width: 100%;
    }

    .graphToolbarField {
        flex: 1 1 100%;
    }

    .graphToolbarField select {
        width: 100%;
    }

    .nextTunesGraph {
        min-height: 560px;
        height: 560px;
    }
}

html,
body {
    height: auto;
    overflow-y: auto;
}

.graphIncipitTooltip {
    position: fixed;
    z-index: 10000;
    max-width: min(560px, calc(100vw - 24px));
    max-height: min(78vh, 760px);
    overflow: auto;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .42);
    color: #e5e7eb;
    pointer-events: none;
}

.graphIncipitTooltip[hidden] {
    display: none;
}

.graphIncipitTooltipTitle {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.graphIncipitTooltipList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.graphIncipitTooltipItem {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.graphIncipitTooltipItem:first-child {
    padding-top: 0;
    border-top: 0;
}

.graphIncipitTooltipLabel {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.graphIncipitTooltipEmpty {
    font-size: 12px;
    color: #94a3b8;
}

/* Make rendered ABC inside tooltip compact */
.graphIncipitTooltip .abcjs-container,
.graphIncipitTooltip svg {
    max-width: 100%;
}

.graphIncipitTooltip .abcjs-inline-audio {
    display: none;
}

/* ---------------------------------------
   Header layout
--------------------------------------- */

.header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 16px 0px;
}

.leftHead {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
}

.leftHeadContent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.headerTitleBlock,
.leftHeadContent>div:last-child {
    min-width: 0;
}

.headerSearch {
    margin-left: auto;
    flex: 0 0 520px;
    width: 520px;
    max-width: 520px;
    min-width: 420px;
}

.headerSearch .memberAddRow {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.headerSearch .searchField {
    flex: 1 1 auto;
    min-width: 0;
}

.headerSearch .searchField--wide {
    flex: 1 1 auto;
    min-width: 0;
}

.headerSearch .searchWrap--field {
    width: 100%;
}

.headerSearch .searchActions {
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
}

.headerSearch #memberSearchInput {
    height: 34px;
}

.headerSearch #resetBtn {
    height: 34px;
}

.selectedMembers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.filterSummary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, .20);
    background: rgba(34, 197, 94, .08);
    color: #dcfce7;
}

.filterSummaryRow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.filterSummaryLead {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-right: 6px;
}

.filterSummaryUser {
    font-size: 13px;
    font-weight: 800;
    color: #f0fdf4;
}

.filterSummaryContext {
    font-size: 12px;
    color: #bbf7d0;
}

.filterSummaryStats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filterStat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
}

.filterStatValue {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.filterStatLabel {
    font-size: 12px;
    color: #dcfce7;
}

.filterStat--threshold {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .24);
}

@media (max-width: 700px) {
    .filterSummaryRow {
        align-items: flex-start;
    }

    .filterSummaryLead,
    .filterSummaryStats {
        width: 100%;
    }
}