.charts-table-scroll {
    overflow: auto;
    min-height: 26rem;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-strong) transparent;
    overscroll-behavior: contain;
}

.charts-table-scroll::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

.charts-table-scroll::-webkit-scrollbar-button {
    display: none;
}

.charts-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    border: 0.16rem solid transparent;
    background-clip: padding-box;
}

.charts-table {
    width: auto;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
    table-layout: fixed;
}

.charts-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 0;
    background: linear-gradient(
        180deg,
        var(--surface-float) 0%,
        var(--surface-float) calc(100% - 1px),
        var(--surface-08) calc(100% - 1px),
        var(--surface-08) 100%
    );
    box-shadow: none;
}

.sort-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.42rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 1.4rem 0.7rem 0.55rem;
    border: 0;
    border-radius: var(--radius-panel-md);
    background: transparent;
    color: var(--soft);
    font: inherit;
    font-weight: 400;
    text-align: left;
}

.sort-button:hover {
    color: var(--muted);
}

.sort-button.is-active {
    color: var(--copy);
}

.sort-button.is-static {
    cursor: default;
    padding-right: 1.4rem;
    color: var(--soft);
    font-weight: 400;
}

.sort-split {
    display: inline-grid;
    grid-template-columns: max-content max-content max-content;
    justify-content: start;
    column-gap: 0.2rem;
    align-items: stretch;
    width: 100%;
    min-height: 2.75rem;
    padding-right: 1.4rem;
}

.sort-split-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.38rem;
    min-width: 0;
    padding: 0.7rem 0.78rem 0.7rem 0.55rem;
    border: 0;
    background: transparent;
    color: var(--soft);
    font: inherit;
    text-align: left;
}

.sort-split-button:hover {
    color: var(--muted);
}

.sort-split-button.is-active {
    color: var(--copy);
}

.sort-split-label {
    min-width: 0;
}

.sort-split-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--surface-16);
    font-size: 0.92rem;
    line-height: 1;
}

.sort-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.92rem;
    min-width: 0.92rem;
    color: var(--copy);
}

.sort-indicator svg {
    width: 0.92rem;
    height: 0.68rem;
    fill: currentColor;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.sort-indicator.direction-asc svg {
    transform: rotate(180deg);
}

.column-resizer {
    position: absolute;
    top: 0.45rem;
    right: 0;
    bottom: 0.45rem;
    z-index: 3;
    width: 0.95rem;
    cursor: col-resize;
}

.column-resizer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    border-radius: 999px;
    background: var(--surface-08);
    transform: translateX(-50%);
    transition: background 140ms ease;
}

.column-resizer:hover::before {
    background: var(--surface-12);
}

.sort-button,
.sort-split-button {
    position: relative;
    z-index: 1;
}

.charts-table thead th:last-child .column-resizer {
    display: none;
}

.charts-table td {
    padding: 0.82rem 0.8rem;
    vertical-align: middle;
    background: transparent;
}

.charts-table tbody tr:hover td {
    background: var(--surface-03);
}

.charts-row {
    opacity: 0;
    transform: translateY(0.5rem);
    transition:
        opacity 280ms ease,
        transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.charts-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .charts-row {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.charts-table tbody tr:hover td:first-child {
    border-top-left-radius: var(--radius-panel-lg);
    border-bottom-left-radius: var(--radius-panel-lg);
}

.charts-table tbody tr:hover td:last-child {
    border-top-right-radius: var(--radius-panel-lg);
    border-bottom-right-radius: var(--radius-panel-lg);
}

.charts-index-cell {
    width: 2.4rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.charts-play-trigger {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--soft);
    font: inherit;
}

.charts-index-number,
.charts-index-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.charts-index-play {
    display: none;
}

.charts-index-play svg {
    width: 1.12rem;
    height: 1.12rem;
    fill: currentColor;
}

.charts-table tbody tr.is-playable:hover .charts-index-number,
.charts-play-trigger:focus-visible .charts-index-number {
    display: none;
}

.charts-table tbody tr.is-playable:hover .charts-index-play,
.charts-play-trigger:focus-visible .charts-index-play {
    display: inline-flex;
}

.charts-table tbody tr.is-playable:hover .charts-play-trigger,
.charts-play-trigger:focus-visible {
    color: var(--copy);
    outline: none;
}

.charts-image-cell {
    width: 4.1rem;
}

.chart-title-cell {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.chart-cover-art,
.chart-cover-fallback {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: var(--radius-panel-sm);
}

.chart-cover-art {
    display: block;
    object-fit: cover;
    background: var(--surface-05);
}

.chart-cover-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--surface-12), var(--surface-03) 58%, rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.chart-title-copy {
    min-width: 0;
}

.charts-actions-header,
.charts-actions-cell {
    width: 2.25rem;
    padding: 0;
    text-align: right;
}

.charts-row-options {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--soft);
    font: inherit;
}

.charts-row-options:hover,
.charts-row-options:focus-visible {
    color: var(--copy);
    outline: none;
}

.chart-song-title {
    display: block;
    color: var(--copy);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.chart-song-artist {
    display: block;
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.chart-type-cell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.72rem;
    min-width: 0;
}

.chart-type-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 1rem;
}

.chart-type-icon {
    display: block;
    width: auto;
    height: 1rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.chart-type-icon-youtube {
    height: 0.92rem;
}

.chart-type-icon-phase-shift {
    height: 0.9rem;
}

.chart-type-label {
    display: block;
    min-width: 0;
    color: var(--soft);
    font-size: 0.9rem;
    line-height: 1.2;
}

.chart-album-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.38rem;
    min-width: 0;
    flex-wrap: wrap;
}

.chart-album-name {
    color: var(--muted);
    font-size: 0.92rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.2;
}

.chart-album-year {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.2;
}

.charts-empty-state {
    padding: 1.4rem 0.8rem;
    color: var(--muted);
    text-align: center;
    overflow: hidden;
}
