:root {
    --sat: env(safe-area-inset-top);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
    --sar: env(safe-area-inset-right);
}

body {
    background: #000;
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.safe-wrap {
    padding-left: max(16px, var(--sal));
    padding-right: max(16px, var(--sar));
    padding-bottom: calc(24px + var(--sab));
}

.hero {
    min-height: 100svh;
}

.hero-spacer {
    padding-top: clamp(140px, 22svh, 240px);
}

@media (min-width: 640px) {
    .hero-spacer {
        padding-top: clamp(280px, 42vh, 420px);
    }
}

.hero-bg {
    animation: zoomHero 22s ease-in-out infinite alternate;
}

@keyframes zoomHero {
    from {
        transform: scale(1)
    }

    to {
        transform: scale(1.08)
    }
}

.sub-label {
    margin-top: .55rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .75);
    letter-spacing: .02em;
}

.card-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cover {
    width: 112px;
    height: 112px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .12);
    transition: transform .18s ease, opacity .18s ease;
    background: rgba(0, 0, 0, .25);
}

.cover:hover {
    transform: translateY(-3px);
    opacity: .95;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------------------------------
   Covers row: make mobile consistent
---------------------------------- */
@media (max-width: 640px) {
    .covers-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px !important;
        justify-items: center;
        align-items: start;
    }

    .covers-row .card-wrap {
        width: min(170px, 44vw);
    }

    .covers-row .sub-label {
        text-align: center;
        min-height: 2.4em;
    }
}

@media (max-width: 380px) {
    .covers-row {
        gap: 14px !important;
    }

    .covers-row .card-wrap {
        width: min(160px, 46vw);
    }
}

@media (min-width: 768px) {
    .cover {
        width: 124px;
        height: 124px;
    }
}

@media (max-width: 380px) {
    .cover {
        width: 104px;
        height: 104px;
    }

    .sub-label {
        font-size: .78rem;
    }
}

.icon-btn {
    opacity: .9;
    transition: transform .15s ease, opacity .15s ease;
    background: transparent;
    border: 0;
    padding: 0;
}

.info-btn {
    position: relative;
    z-index: 50;
    pointer-events: auto;
}

.icon-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* ✅ Footer dock: ALWAYS centered + horizontal (mobile + desktop) */
.footer-dock-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    padding-bottom: calc(8px + var(--sab));
}

.footer-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.footer-dock .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    line-height: 0;
    transform: none;
    /* hover still works via opacity/translate on the button */
}

.footer-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.footer-icon-svg {
    width: 28px;
    height: 28px;
    display: block;
}

@media (max-width: 640px) {
    .footer-dock {
        gap: 16px;
        flex-wrap: wrap;
        /* allows wrap if needed */
        max-width: 92vw;
        /* keeps it centered on small screens */
    }
}

/* Stream sheet */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 60;
}

.sheet {
    width: min(520px, 92vw);
    margin: 0 0 18px;
    border-radius: 22px;
    background: rgba(20, 20, 20, .92);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    overflow: hidden;
}

.sheet-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sheet-title {
    font-weight: 700;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .95);
}

.sheet-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, opacity .15s ease;
}

.sheet-close:hover {
    transform: translateY(-1px);
    opacity: .9;
}

.sheet-list {
    padding: 6px 10px 14px;
    display: grid;
    gap: 10px;
}

.platform {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    text-decoration: none;
    color: rgba(255, 255, 255, .95);
    transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.platform:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .09);
}

.platform-name {
    font-weight: 700;
    font-size: .95rem;
}

.platform-cta {
    font-weight: 700;
    font-size: .85rem;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
}

/* --- Player + Tour layout --- */
.player-row {
    width: min(1180px, 92vw);
    margin: 18px auto 0;
}

@media (min-width: 1024px) {
    .player-row {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 14px;
        align-items: stretch;
    }

    .player-row>* {
        min-height: 0;
    }
}

.player {
    margin: 0;
    width: 100%;
}

.player-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(10, 10, 10, .55);
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
}

@media (max-width:760px) {
    .player-inner {
        grid-template-columns: 1fr;
    }
}

/* --- Tour card --- */
.tour-card {
    border-radius: 18px;
    background: rgba(10, 10, 10, .55);
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    padding: 16px;
    text-align: left;

    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tour-title {
    font-weight: 800;
    letter-spacing: .01em;
}

.tour-sub {
    font-size: .85rem;
    color: rgba(255, 255, 255, .65);
    margin-top: 4px;
}

.tour-list {
    margin-top: 12px;
    display: grid;
    gap: 10px;

    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.tour-list::-webkit-scrollbar {
    width: 8px;
}

.tour-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
}

.tour-list::-webkit-scrollbar-track {
    background: transparent;
}

.tour-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
}

.tour-item .meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tour-item .line1 {
    font-weight: 700;
    color: rgba(255, 255, 255, .95);
    font-size: .95rem;
    line-height: 1.15;
}

.tour-item .line2 {
    font-size: .8rem;
    color: rgba(255, 255, 255, .60);
    line-height: 1.2;
}

.tour-price {
    color: rgba(255, 255, 255, .78);
    font-weight: 800;
    margin-left: 6px;
    white-space: nowrap;
}

.tour-btn {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: .85rem;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #000;
    border: 1px solid rgba(255, 255, 255, .22);
    text-decoration: none;
    transition: transform .12s ease, opacity .12s ease;
}

.tour-btn:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.tour-btn--disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.tour-empty {
    margin-top: 10px;
    font-size: .9rem;
    color: rgba(255, 255, 255, .60);
}

/* --- Playlist --- */
.playlist-title {
    font-weight: 700;
    font-size: .9rem;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 10px;
}

.playlist-items {
    display: grid;
    gap: 8px;
}

.track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, opacity .12s ease;
}

.track:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .09);
}

.track.active {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .18);
}

.track-name {
    font-weight: 700;
    font-size: .92rem;
    color: rgba(255, 255, 255, .95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
}

.track-meta {
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
    flex: 0 0 auto;
}

/* Now playing */
.deck {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.deck .np-label {
    font-size: .8rem;
    color: rgba(255, 255, 255, .6);
}

.deck .np-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-top: 2px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .95);
}

.seek {
    width: 100%;
    accent-color: #fff;
}

.time-row {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 10px;
}

.time {
    font-size: .78rem;
    color: rgba(255, 255, 255, .55);
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ctrl {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s ease, background .12s ease, opacity .12s ease;
}

.ctrl:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .09);
}

.ctrl svg {
    width: 20px;
    height: 20px;
}

.ctrl.play {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, .92);
    color: #000;
    border-color: rgba(255, 255, 255, .22);
}

.ctrl.play:hover {
    background: rgba(255, 255, 255, .85);
}

.hidden {
    display: none;
}

/* Watch panel */
.watch-panel {
    display: none;
}

@media (min-width: 1024px) {
    .watch-panel {
        display: block;
        margin-top: auto;
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, .10);
        background: rgba(255, 255, 255, .03);
        box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
    }

    .watch-panel img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        display: block;
    }
}