:root {
    --panelH: clamp(520px, calc(100vh - 360px), 640px);
}

.player-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 22px;
    align-items: stretch;
}

.player {
    min-width: 0;
}

.tour-card {
    min-width: 0;
}

#playerCard,
#tourCard {
    height: var(--panelH);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(10, 10, 12, 0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

#playerCard {
    overflow: hidden;
    display: flex;
    gap: 16px;
    align-items: stretch;
}

#playerCard .playlist {
    display: flex;
    flex-direction: column;
    flex: 0 0 340px;
    min-width: 280px;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#playlistItems {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

#playerCard .deck {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 280px;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
}

#playerBannerWrap {
    margin-top: auto;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
}

#playerBannerWrap img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

#tourCard {
    padding: 24px;
}

@media (max-width: 980px) {
    .player-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #playerCard,
    #tourCard {
        height: auto;
    }

    #playerCard {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #playerCard .playlist {
        flex: 0 0 auto;
        min-width: 0;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    #playlistItems {
        max-height: 280px;
    }

    #playerCard .deck {
        min-width: 0;
        width: 100%;
    }

    #playerBannerWrap {
        margin-top: 18px;
    }

    #playerBannerWrap img {
        height: 180px;
    }
}

@media (max-width: 640px) {
    #playlistItems {
        max-height: 240px;
    }

    #playerBannerWrap img {
        height: 160px;
    }

    #tourCard {
        padding: 18px;
    }
}