* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Localhost desktop shell. Hidden everywhere except the explicit desktop prototype. */
.desktop-topbar,
.desktop-left-rail,
.desktop-library-tools,
.desktop-for-you-view {
    display: none;
}

.song-desktop-index,
.song-desktop-artist,
.song-desktop-duration {
    display: none;
}

@media (min-width: 1200px) {
    body.desktop-side-prototype {
        --desktop-top: 74px;
        --desktop-player: 106px;
        --desktop-left: clamp(248px, 20vw, 304px);
        --desktop-right: clamp(302px, 23vw, 354px);
        background:
            radial-gradient(circle at 76% -8%, rgba(70, 123, 216, 0.13), transparent 34%),
            linear-gradient(180deg, #080d17 0%, #0b1220 100%);
        overflow: hidden;
    }

    body.desktop-side-prototype .desktop-topbar {
        position: fixed;
        z-index: 360;
        inset: 0 0 auto 0;
        height: var(--desktop-top);
        padding: 12px 18px;
        display: grid;
        grid-template-columns: var(--desktop-left) minmax(280px, 480px) minmax(330px, 1fr) 52px;
        align-items: center;
        gap: 14px;
        background: rgba(8, 13, 23, 0.91);
        border-bottom: 1px solid rgba(124, 159, 213, 0.1);
        backdrop-filter: blur(24px) saturate(130%);
    }

    .desktop-brand {
        min-width: 0;
        border: 0;
        background: transparent;
        color: #f4f7fc;
        display: inline-flex;
        align-items: center;
        gap: 13px;
        cursor: pointer;
        text-align: left;
    }

    .desktop-brand-mark {
        width: 50px;
        height: 42px;
        flex: 0 0 50px;
        border-radius: 0;
        object-fit: contain;
        box-shadow: none;
    }
    .desktop-brand-mark.desktop-brand-mark-light {
        display: none;
    }
    body.theme-dark .desktop-brand-mark.desktop-brand-mark-dark { display: block; }
    body.theme-dark .desktop-brand-mark.desktop-brand-mark-light { display: none; }
    body.theme-light .desktop-brand-mark.desktop-brand-mark-dark { display: none; }
    body.theme-light .desktop-brand-mark.desktop-brand-mark-light { display: block; }

    .desktop-brand-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 21px;
        font-weight: 720;
        letter-spacing: -0.02em;
    }

    .desktop-global-search {
        height: 46px;
        min-width: 0;
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        padding: 0 11px 0 14px;
        border: 1px solid rgba(122, 158, 214, 0.14);
        border-radius: 12px;
        background: rgba(20, 31, 49, 0.8);
        color: #788aa6;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    .desktop-global-search .ui-icon { width: 18px; height: 18px; }
    .desktop-global-search input {
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: #eaf1fb;
        font: inherit;
        font-size: 13px;
    }
    .desktop-global-search input::placeholder { color: #71809a; }
    .desktop-search-shortcut {
        padding: 4px 6px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.045);
        color: #7f8da3;
        font-size: 10px;
    }

    .desktop-primary-nav {
        justify-self: center;
        display: inline-flex;
        gap: 3px;
        padding: 4px;
        border: 1px solid rgba(122, 158, 214, 0.1);
        border-radius: 12px;
        background: rgba(18, 28, 45, 0.76);
    }

    .desktop-nav-button {
        min-width: 86px;
        border: 0;
        border-radius: 9px;
        padding: 10px 14px;
        background: transparent;
        color: #8795ab;
        cursor: pointer;
        font-size: 12px;
        font-weight: 650;
        transition: color .16s ease, background .16s ease, box-shadow .16s ease;
    }

    .desktop-nav-button:hover { color: #d8e5f7; }
    .desktop-nav-button.active {
        background: rgba(74, 107, 164, 0.22);
        color: #edf5ff;
        box-shadow: inset 0 0 0 1px rgba(119, 163, 228, 0.13);
    }

    .desktop-account { position: relative; justify-self: end; }
    .desktop-avatar-button {
        width: 43px;
        height: 43px;
        border: 1px solid rgba(151, 187, 240, 0.2);
        border-radius: 50%;
        overflow: hidden;
        display: grid;
        place-items: center;
        background: linear-gradient(145deg, #344b72, #16243a);
        color: #fff;
        cursor: pointer;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    }
    .desktop-avatar-button img { display: none; width: 100%; height: 100%; object-fit: cover; }
    .desktop-avatar-button.has-image img { display: block; }
    .desktop-avatar-button.has-image span { display: none; }
    #desktop-avatar-fallback { font-size: 16px; font-weight: 750; }

    .desktop-account-menu {
        position: absolute;
        top: 53px;
        right: 0;
        width: 190px;
        padding: 8px;
        border: 1px solid rgba(124, 163, 222, 0.18);
        border-radius: 14px;
        background: rgba(17, 27, 43, 0.98);
        box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
        backdrop-filter: blur(20px);
    }
    .desktop-account-name {
        padding: 8px 9px 10px;
        color: #9bb0cd;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .desktop-account-menu button {
        width: 100%;
        border: 0;
        border-radius: 9px;
        padding: 9px 10px;
        display: flex;
        justify-content: space-between;
        background: transparent;
        color: #e7effb;
        text-align: left;
        cursor: pointer;
        font-size: 12px;
    }
    .desktop-account-menu button:hover { background: rgba(104, 151, 219, 0.12); }
    .desktop-nav-unread {
        color: #77b4ff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
    }
    .desktop-nav-unread.hidden { display: none; }

    body.desktop-side-prototype .desktop-left-rail {
        position: fixed;
        z-index: 210;
        top: calc(var(--desktop-top) + 12px);
        left: 12px;
        bottom: calc(var(--desktop-player) + 12px);
        width: var(--desktop-left);
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
        scrollbar-width: none;
    }
    body.desktop-side-prototype .desktop-left-rail::-webkit-scrollbar { display: none; }

    .desktop-release-card,
    .desktop-left-card {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(133, 170, 224, 0.12);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(24, 37, 57, 0.98), rgba(15, 24, 38, 0.98));
        box-shadow: 0 16px 38px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .025);
    }

    .desktop-release-card {
        min-height: 255px;
        padding: 17px;
        isolation: isolate;
    }
    .desktop-release-card::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        background: radial-gradient(circle at 90% 80%, rgba(82, 112, 230, .36), transparent 48%);
    }
    .desktop-left-card-head {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #aebdd2;
        font-size: 11px;
        font-weight: 650;
    }
    .desktop-left-card-head button {
        border: 0;
        background: transparent;
        color: #7789a4;
        cursor: pointer;
        font-size: 10px;
    }
    .desktop-card-more { color: #8292aa; letter-spacing: 2px; }
    .desktop-release-copy { position: relative; z-index: 2; max-width: 62%; margin-top: 28px; }
    .desktop-release-kicker {
        color: #f2f6fd;
        font-size: 22px;
        line-height: 1.08;
        font-weight: 760;
        letter-spacing: -0.035em;
    }
    .desktop-release-description {
        height: 34px;
        margin-top: 10px;
        overflow: hidden;
        color: #8798b2;
        font-size: 10px;
        line-height: 1.4;
    }
    .desktop-release-play {
        margin-top: 16px;
        border: 1px solid rgba(101, 159, 236, 0.23);
        border-radius: 999px;
        padding: 8px 13px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        background: rgba(45, 91, 160, .23);
        color: #dcecff;
        cursor: pointer;
        font-size: 10px;
        font-weight: 700;
    }
    .desktop-release-play:disabled { opacity: .45; cursor: default; }
    .desktop-release-play span { color: #77b3ff; }
    .desktop-release-art {
        position: absolute;
        right: -35px;
        bottom: -34px;
        width: 180px;
        height: 180px;
        border-radius: 48% 52% 44% 56%;
        display: grid;
        place-items: center;
        background:
            radial-gradient(circle at 36% 30%, #a8d4ff 0 7%, transparent 8%),
            radial-gradient(circle at 42% 42%, #536be4 0 18%, #252d7e 45%, #11172b 72%);
        background-size: cover;
        background-position: center;
        color: rgba(255,255,255,.8);
        font-size: 40px;
        transform: rotate(-12deg);
        box-shadow: -20px -10px 50px rgba(56, 89, 220, .24);
    }

    .desktop-recent-card { padding: 15px 10px 10px; flex: 1 0 auto; }
    .desktop-recent-card .desktop-left-card-head { padding: 0 7px 10px; }
    .desktop-recent-list { display: flex; flex-direction: column; gap: 3px; }
    .desktop-recent-row {
        width: 100%;
        min-width: 0;
        border: 0;
        border-radius: 11px;
        padding: 7px;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 24px;
        align-items: center;
        gap: 9px;
        background: transparent;
        color: #edf4ff;
        text-align: left;
        cursor: pointer;
    }
    .desktop-recent-row:hover { background: rgba(102, 148, 216, .1); }
    .desktop-recent-cover {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        object-fit: cover;
        display: grid;
        place-items: center;
        background: #1e2b40;
    }
    .desktop-recent-copy { min-width: 0; }
    .desktop-recent-title,
    .desktop-recent-artist { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .desktop-recent-title { font-size: 11px; font-weight: 670; }
    .desktop-recent-artist { margin-top: 4px; color: #7e8fa9; font-size: 9px; }
    .desktop-recent-eq { color: #72aeff; font-size: 8px; letter-spacing: 1px; opacity: .72; }
    .desktop-left-empty { padding: 28px 12px; color: #71829d; font-size: 10px; text-align: center; }

    body.desktop-side-prototype #app,
    body.desktop-side-prototype.main-app-mode #app {
        position: fixed;
        z-index: 100;
        top: calc(var(--desktop-top) + 12px);
        right: calc(var(--desktop-right) + 24px);
        bottom: calc(var(--desktop-player) + 12px);
        left: calc(var(--desktop-left) + 24px);
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0 12px 38px;
        overflow-y: auto;
        overflow-x: hidden;
        border: 1px solid rgba(133, 170, 224, 0.11);
        border-radius: 16px;
        background: linear-gradient(150deg, rgba(22, 34, 53, .96), rgba(14, 23, 37, .98));
        box-shadow: 0 18px 44px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .025);
        scrollbar-width: thin;
    }

    body.desktop-side-prototype #library-header {
        min-height: 70px;
        padding: 20px 14px 8px;
    }
    body.desktop-side-prototype #library-header h2 { font-size: 20px; letter-spacing: -.025em; }
    body.desktop-side-prototype #library-header .header-settings-btn,
    body.desktop-side-prototype #library-search,
    body.desktop-side-prototype .app-version { display: none !important; }

    body.desktop-side-prototype .desktop-library-tools {
        display: block;
        padding: 4px 12px 0;
    }
    body.desktop-side-prototype .desktop-library-tools.hidden { display: none !important; }
    .desktop-shuffle-all {
        border: 1px solid rgba(112, 163, 233, .18);
        border-radius: 999px;
        padding: 8px 12px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        background: rgba(73, 111, 171, .12);
        color: #d8e8fc;
        cursor: pointer;
        font-size: 10px;
        font-weight: 650;
    }
    .desktop-shuffle-all span { color: #78b5ff; }
    .desktop-library-columns {
        margin-top: 17px;
        padding: 0 9px 8px;
        display: grid;
        grid-template-columns: 27px minmax(150px, 1.8fr) minmax(100px, 1fr) 52px 30px;
        gap: 10px;
        border-bottom: 1px solid rgba(128, 160, 208, .09);
        color: #73849e;
        font-size: 9px;
    }

    body.desktop-side-prototype .song-list { padding: 4px 4px 0; }
    body.desktop-side-prototype .song-item {
        min-width: 0;
        border-radius: 10px;
        padding: 7px 8px;
        display: grid;
        grid-template-columns: 27px 42px minmax(98px, 1.8fr) minmax(85px, 1fr) 52px 30px;
        gap: 10px;
        border-bottom: 1px solid rgba(128, 160, 208, .045);
    }
    body.desktop-side-prototype .song-item:hover { background: rgba(102, 148, 216, .08); }
    body.desktop-side-prototype .song-item.active { background: rgba(76, 117, 182, .14); }
    body.desktop-side-prototype .song-desktop-index,
    body.desktop-side-prototype .song-desktop-artist,
    body.desktop-side-prototype .song-desktop-duration { display: block; }
    body.desktop-side-prototype .song-desktop-index,
    body.desktop-side-prototype .song-desktop-artist,
    body.desktop-side-prototype .song-desktop-duration {
        min-width: 0;
        color: #8494ab;
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.desktop-side-prototype .song-desktop-duration { text-align: right; font-variant-numeric: tabular-nums; }
    body.desktop-side-prototype .song-icon { width: 42px; height: 42px; border-radius: 8px; }
    body.desktop-side-prototype .song-title { font-size: 11px; font-weight: 650; }
    body.desktop-side-prototype .song-meta { display: none; }
    body.desktop-side-prototype .song-delete,
    body.desktop-side-prototype .song-actions-trigger { padding: 5px; opacity: .4; }
    body.desktop-side-prototype .song-delete:hover { opacity: .9; color: #ff6670; }
    body.desktop-side-prototype .song-actions-trigger:hover { opacity: 1; color: #dbeaff; }

    body.desktop-side-prototype .profiles-view,
    body.desktop-side-prototype .desktop-for-you-view {
        padding: 18px 18px 30px;
    }
    body.desktop-side-prototype #search-view .music-search-box { display: none; }
    body.desktop-side-prototype #search-view .music-search-head { background: transparent; padding: 0 0 14px; }
    body.desktop-side-prototype .music-search-row { border-radius: 11px; }
    body.desktop-side-prototype .desktop-for-you-view { display: block; }
    body.desktop-side-prototype .desktop-for-you-view.hidden { display: none !important; }
    .desktop-view-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 20px;
        padding: 12px 0 22px;
        border-bottom: 1px solid rgba(128, 160, 208, .09);
    }
    .desktop-view-eyebrow { color: #6ea8f5; font-size: 10px; font-weight: 720; text-transform: uppercase; letter-spacing: .08em; }
    .desktop-view-heading h2 { margin-top: 5px; font-size: 27px; letter-spacing: -.04em; }
    .desktop-view-heading p { margin-top: 5px; color: #8293ac; font-size: 11px; }
    .desktop-view-play {
        border: 0;
        border-radius: 999px;
        padding: 10px 15px;
        background: #5b96e5;
        color: #fff;
        cursor: pointer;
        font-size: 11px;
        font-weight: 700;
    }
    .desktop-for-you-status { padding: 50px 10px; color: #7e90aa; text-align: center; font-size: 11px; }
    .desktop-for-you-list {
        padding-top: 18px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: 16px 12px;
    }
    .desktop-for-you-card {
        min-width: 0;
        border: 0;
        border-radius: 12px;
        padding: 8px;
        position: relative;
        display: block;
        background: transparent;
        color: #eef5ff;
        text-align: left;
        cursor: pointer;
        transition: transform .16s ease, background .16s ease;
    }
    .desktop-for-you-card:hover { transform: translateY(-3px); background: rgba(104, 151, 219, .08); }
    .desktop-for-you-cover {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 10px;
        overflow: hidden;
        position: relative;
        display: grid;
        place-items: center;
        background: linear-gradient(145deg, #263d61, #17243a);
    }
    .desktop-for-you-cover img { width: 100%; height: 100%; object-fit: cover; }
    .desktop-for-you-cover-fallback { font-size: 30px; color: #8dbfff; }
    .desktop-for-you-play {
        position: absolute;
        right: 8px;
        bottom: 8px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: rgba(80, 145, 232, .92);
        color: #fff;
        font-size: 10px;
        opacity: 0;
        transform: translateY(4px);
        transition: opacity .16s ease, transform .16s ease;
    }
    .desktop-for-you-card:hover .desktop-for-you-play { opacity: 1; transform: translateY(0); }
    .desktop-for-you-index { display: block; margin-top: 8px; color: #6583aa; font-size: 8px; }
    .desktop-for-you-title,
    .desktop-for-you-artist { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .desktop-for-you-title { margin-top: 3px; font-size: 11px; font-weight: 680; }
    .desktop-for-you-artist { margin-top: 4px; color: #8192aa; font-size: 9px; }

    body.desktop-side-prototype .desktop-right-rail {
        top: calc(var(--desktop-top) + 12px);
        right: 12px;
        bottom: calc(var(--desktop-player) + 12px);
        width: var(--desktop-right);
        gap: 10px;
        padding: 0;
        scrollbar-width: none;
    }
    body.desktop-side-prototype .desktop-right-rail::-webkit-scrollbar { display: none; }
    body.desktop-side-prototype .desktop-rail-card { border-radius: 16px; box-shadow: 0 16px 38px rgba(0,0,0,.22); }
    body.desktop-side-prototype .desktop-now-card { padding: 13px; }
    body.desktop-side-prototype .desktop-now-art { height: 142px; margin-top: 10px; border-radius: 13px; }
    body.desktop-side-prototype .desktop-now-title { margin-top: 11px; font-size: 14px; }
    body.desktop-side-prototype .desktop-now-artist { font-size: 10px; }
    body.desktop-side-prototype .desktop-now-progress { margin-top: 11px; }
    body.desktop-side-prototype .desktop-rail-section { padding: 11px 8px 7px; }
    body.desktop-side-prototype .desktop-rail-section-head { padding-bottom: 6px; }
    body.desktop-side-prototype .desktop-track-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 5px 6px; }
    body.desktop-side-prototype .desktop-track-cover { width: 34px; height: 34px; border-radius: 7px; }
    body.desktop-side-prototype .desktop-track-title { font-size: 10px; }
    body.desktop-side-prototype .desktop-track-meta,
    body.desktop-side-prototype .desktop-track-tail { font-size: 9px; }
    body.desktop-side-prototype .desktop-rail-caption { display: none; }

    body.desktop-side-prototype .bottom-tabs { display: none !important; }
    body.desktop-side-prototype .now-playing {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: var(--desktop-player);
        padding: 12px 18px 14px;
        transform: none;
        border: 0;
        border-top: 1px solid rgba(128, 163, 216, .12);
        border-radius: 0;
        display: grid;
        grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
        align-items: center;
        background: rgba(10, 17, 29, .96);
        box-shadow: 0 -18px 45px rgba(0, 0, 0, .24);
        backdrop-filter: blur(22px);
    }
    body.desktop-side-prototype .now-playing-info { grid-column: 1; width: min(320px, 100%); margin: 0; gap: 11px; }
    body.desktop-side-prototype .album-art { width: 58px; height: 58px; border-radius: 9px; }
    body.desktop-side-prototype .track-title { font-size: 13px; }
    body.desktop-side-prototype .track-artist { font-size: 10px; }
    body.desktop-side-prototype .edit-track-btn { display: none; }
    body.desktop-side-prototype .controls { grid-column: 2; gap: 7px; }
    body.desktop-side-prototype .ctrl-btn { width: 38px; height: 38px; }
    body.desktop-side-prototype .play-btn { width: 50px; height: 50px; }
    body.desktop-side-prototype .progress-wrapper {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
    }
    body.desktop-side-prototype .progress-bar { height: 2px; border: 0; border-radius: 0; }
    body.desktop-side-prototype .progress-thumb,
    body.desktop-side-prototype .time-display { display: none; }

    body.theme-light.desktop-side-prototype {
        background:
            radial-gradient(circle at 76% -8%, rgba(90, 151, 231, .15), transparent 34%),
            linear-gradient(180deg, #edf3f9 0%, #f5f8fb 100%);
    }
    body.theme-light.desktop-side-prototype .desktop-topbar {
        background: rgba(247, 250, 253, .92);
        border-bottom-color: rgba(48, 91, 145, .1);
    }
    body.theme-light .desktop-brand { color: #1d2d42; }
    body.theme-light .desktop-global-search,
    body.theme-light .desktop-primary-nav {
        border-color: rgba(47, 93, 150, .12);
        background: rgba(255, 255, 255, .82);
    }
    body.theme-light .desktop-global-search input { color: #1d2d42; }
    body.theme-light .desktop-global-search input::placeholder,
    body.theme-light .desktop-search-shortcut,
    body.theme-light .desktop-nav-button { color: #667a94; }
    body.theme-light .desktop-nav-button.active { color: #1e5f9f; background: rgba(66, 138, 218, .12); }
    body.theme-light .desktop-account-menu {
        border-color: rgba(47, 93, 150, .14);
        background: rgba(255,255,255,.98);
        box-shadow: 0 18px 46px rgba(43, 74, 112, .18);
    }
    body.theme-light .desktop-account-menu button { color: #253a54; }
    body.theme-light .desktop-account-menu button:hover { background: rgba(66, 138, 218, .09); }
    body.theme-light .desktop-release-card,
    body.theme-light .desktop-left-card,
    body.theme-light.desktop-side-prototype #app,
    body.theme-light .desktop-rail-card {
        border-color: rgba(47, 93, 150, .11);
        background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(245,249,253,.98));
        box-shadow: 0 16px 38px rgba(42, 75, 118, .1), inset 0 1px 0 #fff;
    }
    body.theme-light .desktop-release-kicker,
    body.theme-light .desktop-recent-row,
    body.theme-light .desktop-for-you-card { color: #21364f; }
    body.theme-light .desktop-release-description,
    body.theme-light .desktop-recent-artist,
    body.theme-light .desktop-view-heading p,
    body.theme-light .desktop-for-you-artist { color: #687d97; }
    body.theme-light .desktop-recent-row:hover,
    body.theme-light .desktop-for-you-card:hover,
    body.theme-light.desktop-side-prototype .song-item:hover { background: rgba(58, 132, 216, .07); }
    body.theme-light.desktop-side-prototype .now-playing {
        background: rgba(251, 253, 255, .97);
        border-top-color: rgba(47, 93, 150, .12);
        box-shadow: 0 -18px 45px rgba(42, 75, 118, .1);
    }
}

html, body {
    height: 100%;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #10151f;
    --text: #f7fbff;
    --hint: #97a4b8;
    --link: #5b9bd5;
    --btn: #5b9bd5;
    --btn-text: #ffffff;
    --secondary-bg: #141d2a;
    --surface-1: rgba(255,255,255,0.04);
    --surface-2: rgba(255,255,255,0.06);
    --border-1: rgba(255,255,255,0.1);
    --border-2: rgba(255,255,255,0.14);
    --tabs-bar-height: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

body.theme-dark {
    --bg: #10151f;
    --text: #f7fbff;
    --hint: #97a4b8;
    --link: #5b9bd5;
    --btn: #5b9bd5;
    --btn-text: #ffffff;
    --secondary-bg: #141d2a;
    --surface-1: rgba(255,255,255,0.04);
    --surface-2: rgba(255,255,255,0.06);
    --border-1: rgba(255,255,255,0.1);
    --border-2: rgba(255,255,255,0.14);
    color-scheme: dark;
}

body.theme-light {
    --bg: #f6f9fc;
    --text: #1b2738;
    --hint: #60748f;
    --link: #3a84d8;
    --btn: #4f95e7;
    --btn-text: #ffffff;
    --secondary-bg: #ffffff;
    --surface-1: rgba(58,132,216,0.08);
    --surface-2: rgba(58,132,216,0.12);
    --border-1: rgba(58,132,216,0.22);
    --border-2: rgba(58,132,216,0.35);
    color-scheme: light;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.ui-icon {
    display: block;
    width: 1em;
    height: 1em;
    pointer-events: none;
}

.header-inline-icon {
    margin-right: 4px;
}

.browser-auth {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 18, 0.84);
    backdrop-filter: blur(6px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.browser-auth.hidden {
    display: none !important;
}

.browser-auth-card {
    width: min(420px, 100%);
    background: #111a29;
    border: 1px solid rgba(143, 181, 236, 0.26);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.45);
}

.browser-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #e9f2ff;
}

.browser-auth-subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: #a7bddc;
    line-height: 1.35;
}

.browser-auth-intro {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(22, 35, 56, 0.9);
    border: 1px solid rgba(143, 181, 236, 0.2);
    font-size: 13px;
    color: #d4e4fb;
    line-height: 1.45;
}

.browser-auth-intro p {
    margin: 0 0 8px;
}

.browser-auth-intro p:last-child {
    margin-bottom: 0;
}

.browser-auth-input {
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(143, 181, 236, 0.26);
    background: #0e1725;
    color: #ecf4ff;
    font-size: 16px;
    outline: none;
}

.browser-auth-input:focus {
    border-color: var(--accent);
}

.browser-auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.browser-auth-actions .edit-btn {
    width: 100%;
}

.browser-auth-guest-actions {
    margin-top: 8px;
}

.browser-auth-guest-actions .edit-btn {
    width: 100%;
}

.browser-auth-status {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    color: #a7bddc;
}

.browser-auth a {
    color: #8ec5ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(4, 10, 25, 0.72);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.privacy-consent-modal.hidden {
    display: none;
}

.privacy-consent-card {
    width: min(620px, 100%);
    border: 1px solid rgba(78, 130, 212, 0.38);
    background: linear-gradient(180deg, rgba(17, 32, 66, 0.96), rgba(11, 24, 53, 0.98));
    border-radius: 16px;
    padding: 18px;
    color: #d7e7ff;
}

.privacy-consent-title {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 8px;
}

.privacy-consent-text {
    font-size: 15px;
    color: #adc4ee;
    margin-bottom: 8px;
}

.privacy-consent-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.privacy-consent-actions .edit-btn {
    width: 100%;
    min-height: 44px;
    font-weight: 600;
}

body.theme-light .privacy-consent-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.98));
    border-color: rgba(77, 110, 162, 0.24);
    color: #20344f;
}

body.theme-light .privacy-consent-title {
    color: #1d3556;
}

body.theme-light .privacy-consent-text {
    color: #4a6387;
}

body.theme-light .edit-btn.primary {
    background: var(--btn);
    color: var(--btn-text);
    border-color: rgba(58,132,216,0.55);
}

body.theme-light .privacy-consent-actions .edit-btn.primary {
    background: #356fbf;
    color: #ffffff;
    border-color: rgba(35, 71, 120, 0.45);
}

#policy-screen {
    z-index: 11050;
}

.policy-screen-body {
    padding-top: 12px;
    gap: 12px;
}

.policy-frame {
    width: 100%;
    height: min(62dvh, 760px);
    min-height: 320px;
    border: 1px solid rgba(78, 130, 212, 0.26);
    border-radius: 14px;
    background: #0b1530;
    display: block;
}

.hidden {
    display: none !important;
}

#app {
    padding: 0 0 calc(232px + var(--safe-bottom)) 0;
}

@media (min-width: 960px) {
    #app {
        max-width: 860px;
        margin: 0 auto;
        padding-left: 12px;
        padding-right: 12px;
    }
}

body.main-app-mode #app {
    max-width: 920px;
    margin: 0 auto;
    padding-top: max(74px, calc(var(--safe-top) + 26px));
    padding-left: 16px;
    padding-right: 16px;
}

body.native-ios.main-app-mode #app {
    padding-top: max(76px, calc(var(--safe-top) + 24px));
}

body.ios-device.main-app-mode #app {
    padding-top: max(76px, calc(var(--safe-top) + 24px));
}

body.main-app-mode .song-list-header {
    padding-top: 20px;
    padding-bottom: 2px;
    position: relative;
    z-index: 46;
}

body.main-app-mode .search-container {
    top: var(--safe-top);
    padding-top: 0;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    background: var(--bg);
    position: sticky;
    z-index: 44;
}

body.main-app-mode .search-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * var(--safe-top));
    height: var(--safe-top);
    background: var(--bg);
    pointer-events: none;
}

body.native-ios.main-app-mode .search-container,
body.ios-device.main-app-mode .search-container {
    top: var(--safe-top);
    padding-top: 0;
    padding-left: max(16px, calc(var(--safe-left) + 10px));
    padding-right: max(16px, calc(var(--safe-right) + 10px));
}

@supports (padding-top: max(0px)) {
    body.main-app-mode #app {
        padding-top: max(74px, calc(var(--safe-top) + 24px));
    }
}

@media (max-width: 820px) {
    body.main-app-mode #app {
        padding-top: max(78px, calc(var(--safe-top) + 26px));
    }
    body.main-app-mode .song-list-header {
        padding-top: 18px;
        padding-bottom: 2px;
    }
    body.main-app-mode .search-container {
        padding-top: 0;
    }
    body.native-ios.main-app-mode .search-container,
    body.ios-device.main-app-mode .search-container {
        top: var(--safe-top);
        padding-top: 0;
        padding-left: max(16px, calc(var(--safe-left) + 10px));
        padding-right: max(16px, calc(var(--safe-right) + 10px));
    }
}

body.keyboard-open #app {
    padding-bottom: 12px;
}

body.keyboard-open .now-playing {
    display: none !important;
}

.now-playing {
    position: fixed;
    bottom: calc(var(--tabs-bar-height) + var(--safe-bottom) + 6px);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(18, 28, 45, 0.94), rgba(14, 22, 37, 0.96));
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(132, 166, 216, 0.2);
    border-left: 1px solid rgba(132, 166, 216, 0.12);
    border-right: 1px solid rgba(132, 166, 216, 0.12);
    box-shadow: 0 -14px 36px rgba(2, 8, 20, 0.38);
    padding: 6px 10px 6px;
    z-index: 260;
    transition: transform 0.3s ease;
}

@media (max-width: 820px) {
    :root {
        --tabs-bar-height: 56px;
    }
    .now-playing {
        padding: 8px 12px 8px;
        bottom: calc(var(--tabs-bar-height) + var(--safe-bottom) + 8px);
    }
    .album-art {
        width: 54px;
        height: 54px;
    }
    .track-title {
        font-size: 17px;
    }
    .track-artist {
        font-size: 14px;
    }
    .play-btn {
        width: 48px;
        height: 48px;
    }
    .ctrl-btn {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
    .bottom-tabs {
        min-height: 56px;
        padding: 4px 10px calc(6px + var(--safe-bottom));
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
    }
    .bottom-tab {
        font-size: 24px;
    }
}

@media (min-width: 960px) {
    .now-playing {
        left: 50%;
        right: auto;
        width: min(820px, calc(100vw - 28px));
        transform: translateX(-50%);
        border-radius: 14px 14px 0 0;
    }
}

body.keyboard-open .bottom-tabs {
    display: none !important;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}


.album-art {
    width: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--btn), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.track-details {
    flex: 1;
    min-width: 0;
}

.edit-track-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    flex-shrink: 0;
}


.track-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.progress-wrapper {
    margin-bottom: 1px;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(133, 171, 225, 0.24);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: height 0.15s;
}

.progress-bar:active {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--btn);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb {
    width: 12px;
    height: 12px;
    background: var(--btn);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s;
}

.progress-bar:active .progress-thumb,
.progress-wrapper:hover .progress-thumb {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--hint);
    margin-top: 2px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.ctrl-btn:active {
    transform: scale(0.94) translateY(1px);
    opacity: 0.88;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.ctrl-btn.active {
    color: #8ec5ff;
}

.np-extra-btn {
    width: 34px;
    height: 34px;
    background: transparent;
    border-radius: 10px;
    font-size: 18px;
}

.np-extra-btn.active {
    background: rgba(91, 155, 213, 0.25);
}

.np-extra-btn.like-mode.active {
    color: #ff5f7a;
    background: rgba(255, 95, 122, 0.2);
}

.play-btn {
    width: 38px;
    height: 38px;
    background: var(--btn);
    color: var(--btn-text);
    border-radius: 50%;
}

.play-btn:active {
    transform: scale(0.95);
}

.song-list-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 16px 4px;
    gap: 10px;
}

.song-list-header h2 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.header-settings-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}

.header-settings-btn:active {
    transform: scale(0.94);
    opacity: 0.88;
}

.song-count {
    font-size: 14px;
    color: var(--hint);
    white-space: nowrap;
}

.edit-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.edit-card {
    width: 100%;
    max-width: 420px;
    background: var(--secondary-bg);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
}

.edit-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.edit-label {
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 6px;
    display: block;
}

.edit-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    padding: 10px 12px;
    margin-bottom: 10px;
    outline: none;
    caret-color: var(--text);
}

.edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.edit-btn {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text);
    background: rgba(255,255,255,0.08);
}

.edit-btn.primary {
    background: var(--btn);
    color: var(--btn-text);
}

.song-list {
    padding: 0 8px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s ease;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
}

.song-item:active {
    background: rgba(255,255,255,0.06);
    transform: scale(0.995);
}

.song-item.active {
    background: rgba(91, 155, 213, 0.12);
}

.song-item.playing .song-icon {
    animation: pulse 1.5s infinite;
}

.song-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.song-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.song-item.active .song-icon {
    background: linear-gradient(135deg, var(--btn), #8b5cf6);
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-meta {
    font-size: 13px;
    color: var(--hint);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    font-size: 13px;
    color: var(--hint);
    flex-shrink: 0;
}

.song-delete,
.song-actions-trigger {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 0;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.5;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.song-delete:active,
.song-actions-trigger:active {
    opacity: 1;
    color: #ff4444;
}

.empty-state {
    text-align: center;
    padding: 80px 32px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--hint);
    line-height: 1.5;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--hint);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--hint);
    border-top-color: var(--btn);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-top: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.song-list.hidden {
    display: none;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-container {
    padding: 8px 16px 10px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 40;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 10px 14px;
    gap: 10px;
}

.search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
}

.search-box input::placeholder {
    color: var(--hint);
}

.search-clear {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
}

.search-clear:hover {
    opacity: 1;
}

.mini-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding: 0 8px;
}

.mini-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-btn:active {
    background: rgba(255,255,255,0.1);
}

.mini-btn.play-btn {
    font-size: 28px;
    width: 48px;
    height: 48px;
}

.mini-btn#mini-shuffle,
.mini-btn#mini-delete {
    font-size: 16px;
    opacity: 0.7;
}

.mini-btn#mini-shuffle.active,
.mini-btn#mini-delete.active {
    opacity: 1;
    color: var(--btn);
}

.progress-wrapper-mini {
    margin: 8px 0;
    cursor: pointer;
}

.progress-bar-mini {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    position: relative;
    overflow: visible;
}

.progress-fill-mini {
    height: 100%;
    background: var(--btn);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb-mini {
    width: 12px;
    height: 12px;
    background: var(--btn);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s;
}

.progress-wrapper-mini:hover .progress-thumb-mini,
.progress-wrapper-mini:active .progress-thumb-mini {
    opacity: 1;
}

.full-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fp-title {
    font-size: 14px;
    color: var(--hint);
    text-transform: none;
    letter-spacing: 1px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.close-btn:active {
    background: rgba(255,255,255,0.1);
}

.fp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    gap: 32px;
}

.fp-album-art {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--btn), #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.fp-track-info {
    text-align: center;
}

.fp-track-info .fp-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}

.fp-track-info .fp-artist {
    font-size: 16px;
    color: var(--hint);
}

.fp-progress {
    width: 100%;
    max-width: 400px;
}

.fp-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.fp-progress-bar:active {
    height: 8px;
}

.fp-progress-fill {
    height: 100%;
    background: var(--btn);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.fp-progress-thumb {
    width: 16px;
    height: 16px;
    background: var(--btn);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s;
}

.fp-progress-bar:active .fp-progress-thumb,
.fp-progress-bar:hover .fp-progress-thumb {
    opacity: 1;
}

.fp-time {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--hint);
    margin-top: 8px;
}

.fp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.fp-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-btn:active {
    background: rgba(255,255,255,0.1);
}

.fp-btn#fp-delete,
.fp-btn#fp-shuffle {
    font-size: 20px;
    opacity: 0.7;
}

.fp-btn#fp-delete.active,
.fp-btn#fp-shuffle.active {
    opacity: 1;
    color: var(--btn);
}

.fp-btn-play {
    width: 72px;
    height: 72px;
    background: var(--btn);
    color: var(--btn-text);
    border: none;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.fp-btn-play:active {
    transform: scale(0.95);
}

.shuffle-btn {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 24px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.15s;
    margin-top: 16px;
}

.shuffle-btn:hover {
    color: var(--text);
}

.shuffle-btn.active {
    color: var(--btn);
}

.shuffle-btn:active {
    transform: scale(0.9);
}

.song-delete,
.song-actions-trigger {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0.6;
    transition: all 0.15s;
}

.song-delete:hover {
    opacity: 1;
    background: rgba(255, 100, 100, 0.1);
    color: #ff6464;
}

.song-actions-trigger {
    min-width: 30px;
    letter-spacing: 1px;
    font-weight: 700;
}

.song-actions-trigger:hover {
    opacity: 1;
    background: rgba(104, 151, 219, 0.12);
    color: var(--text);
}

.song-actions-menu {
    position: fixed;
    z-index: 420;
    width: 180px;
    padding: 6px;
    border: 1px solid rgba(145, 177, 224, 0.18);
    border-radius: 12px;
    background: rgba(20, 31, 49, 0.98);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
}

.song-actions-menu button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 10px 11px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.song-actions-menu button:hover {
    background: rgba(104, 151, 219, 0.13);
}

.song-actions-menu button.danger {
    color: #ff8088;
}

body.theme-light .song-actions-menu {
    border-color: rgba(51, 92, 145, 0.18);
    background: rgba(248, 251, 255, 0.98);
}

.song-delete:active {
    transform: scale(0.93);
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    contain: layout paint style;
}

.song-item:active {
    background: rgba(255,255,255,0.06);
}

.song-item.swiping {
    transform: translateX(var(--swipe-x, 0px));
    background: rgba(88, 198, 128, 0.12);
}

.song-item.active {
    background: rgba(91, 155, 213, 0.12);
}

.no-results {
    text-align: center;
    padding: 80px 32px;
}

.full-player-view {
    position: fixed;
    inset: 0;
    z-index: 280;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    contain: layout paint style;
}

.fp-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 2;
}

body.main-app-mode .full-player-view {
    padding-top: max(84px, calc(var(--safe-top) + 34px));
}

body.native-ios.main-app-mode .full-player-view {
    padding-top: max(84px, calc(var(--safe-top) + 34px));
}

body.ios-device.main-app-mode .full-player-view {
    padding-top: max(84px, calc(var(--safe-top) + 34px));
}

body.main-app-mode .fp-top {
    padding-top: 8px;
    padding-left: 18px;
    padding-right: 18px;
}

body.native-ios.main-app-mode .fp-top {
    min-height: 56px;
    padding-top: 8px;
    padding-left: max(18px, calc(var(--safe-left) + 18px));
    padding-right: max(18px, calc(var(--safe-right) + 18px));
}

@media (min-width: 900px) {
    body.main-app-mode .fp-main {
        align-items: center;
    }

    body.main-app-mode .fp-title,
    body.main-app-mode .fp-artist,
    body.main-app-mode .fp-main .progress-wrapper,
    body.main-app-mode .fp-controls,
    body.main-app-mode .fp-lyrics-preview,
    body.main-app-mode .fp-lyrics-refresh-btn,
    body.main-app-mode .fp-lyrics-refresh-status {
        width: min(100%, 560px);
        margin-left: auto;
        margin-right: auto;
    }

    body.main-app-mode .fp-controls {
        justify-content: center;
    }

    body.main-app-mode .fp-lyrics-head,
    body.main-app-mode .fp-lyrics-body {
        width: min(100%, 760px);
        margin-left: auto;
        margin-right: auto;
    }

    body.main-app-mode .fp-lyrics-full {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
}

#fp-close {
    position: fixed;
    top: calc(var(--safe-top) + 12px);
    left: 12px;
    z-index: 520;
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

body.main-app-mode #fp-close {
    top: calc(var(--safe-top) + 12px);
}

body.native-ios.main-app-mode #fp-close {
    top: calc(var(--safe-top) + 12px);
    left: max(16px, calc(var(--safe-left) + 12px));
    width: 52px;
    height: 52px;
    border-radius: 16px;
}

body.ios-device.main-app-mode #fp-close {
    top: calc(var(--safe-top) + 12px);
    left: max(16px, calc(var(--safe-left) + 12px));
    width: 52px;
    height: 52px;
    border-radius: 16px;
}

.fp-top-title {
    font-size: 14px;
    color: var(--hint);
    text-align: center;
}

.fp-top-gap {
    display: none;
}

.fp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 44px 24px 24px;
    min-height: 0;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.fp-desktop-stage {
    display: contents;
}

.fp-desktop-right {
    display: contents;
}

@media (min-width: 960px) {
    .fp-main {
        max-width: 760px;
        margin: 0 auto;
        width: 100%;
        padding-bottom: 180px;
    }
}

.fp-art {
    width: 220px;
    height: 220px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    border-radius: 20px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 84px;
    background: linear-gradient(135deg, var(--btn), #8b5cf6);
}

.full-player-view.is-playing .fp-art {
    animation: fpPulse 1.6s ease-in-out infinite;
}

@keyframes fpPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.012); }
    100% { transform: scale(1); }
}

.fp-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: none;
    word-break: break-word;
}

.fp-artist {
    text-align: center;
    color: var(--hint);
    margin-bottom: 22px;
    font-size: 16px;
}

.fp-meta-center {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

.fp-controls {
    margin-top: 20px;
    gap: 14px;
}

.fp-volume {
    margin-top: 14px;
    width: 100%;
}

body.no-volume-slider .fp-volume {
    display: none;
}

body.no-volume-slider .fp-controls-side-right {
    display: none;
}

body.no-volume-slider .fp-lyrics-preview {
    margin-top: 14px;
}

.fp-volume-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 6px;
}

.fp-volume-label {
    opacity: 0.9;
}

.fp-volume-value {
    font-variant-numeric: tabular-nums;
}

.fp-volume-bar {
    height: 5px;
}

.fp-volume-bar:active {
    height: 8px;
}

.fp-extra-btn {
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 10px;
    font-size: 24px;
}

.fp-extra-btn.active {
    background: rgba(91, 155, 213, 0.25);
    color: #8ec5ff;
}

.fp-lyrics-preview {
    margin-top: 28px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 14px;
    text-align: left;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    cursor: pointer;
}

.fp-controls-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.fp-controls-side {
    min-width: 0;
    display: flex;
    align-items: center;
}

.fp-controls-side-left {
    justify-content: flex-start;
}

.fp-controls-side-right {
    justify-content: flex-end;
}

.fp-like-indicator {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #ff5c78;
    background: rgba(255, 92, 120, 0.16);
}

body.ios-device .fp-like-indicator {
    display: none !important;
}

body.ios-device #btn-delete.like-mode {
    color: #8ec5ff;
    background: rgba(91, 155, 213, 0.2);
}

.fp-volume-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 132px;
    max-width: 220px;
    width: 100%;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.fp-volume-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hint);
    flex: 0 0 auto;
}

.fp-volume-track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    overflow: visible;
}

.fp-volume-track .progress-fill {
    height: 100%;
    border-radius: inherit;
}

.fp-volume-track .progress-thumb {
    width: 12px;
    height: 12px;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media (min-width: 1200px) {
    .fp-main {
        --fp-desktop-block-h: clamp(340px, calc(100vh - 350px), 760px);
    }

    .fp-main {
        max-width: min(1880px, calc(100vw - 36px));
        width: 100%;
        margin: 0 auto;
        padding: 28px 20px 22px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .fp-desktop-stage {
        display: grid;
        grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
        gap: 22px;
        align-items: stretch;
        min-height: 0;
        flex: 1;
        grid-auto-rows: minmax(0, var(--fp-desktop-block-h));
    }

    .fp-desktop-right {
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
    }

    .fp-art {
        width: 100%;
        height: var(--fp-desktop-block-h);
        min-height: var(--fp-desktop-block-h);
        max-height: var(--fp-desktop-block-h);
        margin: 0;
        border-radius: 30px;
        background-size: cover;
        background-position: center;
        box-sizing: border-box;
    }

    .fp-title {
        text-align: center;
        font-size: 44px;
        margin-bottom: 8px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .fp-artist {
        text-align: center;
        font-size: 28px;
        margin-bottom: 14px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .fp-lyrics-preview {
        margin-top: 0;
        flex: 1;
        min-height: 0;
        height: var(--fp-desktop-block-h);
        max-height: var(--fp-desktop-block-h);
        padding: 18px;
        box-sizing: border-box;
    }

    .fp-lyrics-title {
        display: none;
    }

    .fp-lyrics-snippet {
        max-height: none;
        height: 100%;
        overflow: auto;
        font-size: clamp(28px, 2.2vw, 42px);
        line-height: 1.34;
        text-align: left;
        padding-right: 12px;
        padding-bottom: 20px;
    }

    .fp-lyrics-refresh-btn,
    .fp-lyrics-refresh-status {
        margin-top: 8px;
    }

    .fp-volume-inline {
        max-width: 250px;
    }

    .fp-main .progress-wrapper {
        width: 100%;
        margin: 0;
    }

    .fp-controls {
        width: 100%;
        margin-top: 0;
        justify-content: center;
        gap: 38px;
        padding: 0;
    }

    body.main-app-mode .fp-main {
        align-items: stretch;
    }

    body.main-app-mode .fp-meta-center .fp-title,
    body.main-app-mode .fp-meta-center .fp-artist,
    body.main-app-mode .fp-desktop-right .fp-lyrics-preview,
    body.main-app-mode .fp-desktop-right .fp-lyrics-refresh-btn,
    body.main-app-mode .fp-desktop-right .fp-lyrics-refresh-status,
    body.main-app-mode .fp-main .progress-wrapper,
    body.main-app-mode .fp-controls-shell {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 820px) {
    .fp-main {
        padding-top: 62px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .fp-art {
        width: 244px;
        height: 244px;
        margin-bottom: 30px;
    }

    .fp-title {
        font-size: 25px;
    }

    .fp-artist {
        font-size: 17px;
    }

    .fp-lyrics-preview {
        padding: 12px;
    }

    .fp-lyrics-snippet {
        font-size: 16px;
        line-height: 1.42;
        max-height: calc(1.42em * 4);
        overflow: hidden;
        padding-right: 0;
        padding-bottom: 0;
    }

    .fp-controls-shell {
        gap: 8px;
    }

    .full-player-view .fp-controls {
        gap: 8px;
    }

    .full-player-view .fp-controls .ctrl-btn {
        width: 36px;
        height: 36px;
    }

    .full-player-view .fp-controls .play-btn {
        width: 44px;
        height: 44px;
    }

    .full-player-view .fp-controls .ctrl-btn svg {
        width: 21px;
        height: 21px;
    }

    .full-player-view .fp-controls .play-btn svg {
        width: 25px;
        height: 25px;
    }

    .full-player-view .fp-controls .fp-extra-btn {
        width: 38px;
        height: 38px;
    }

    body.native-ios.main-app-mode .fp-main {
        padding-top: 42px;
        padding-left: max(20px, calc(env(safe-area-inset-left) + 20px));
        padding-right: max(20px, calc(env(safe-area-inset-right) + 20px));
        padding-bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px));
    }
}

.fp-lyrics-refresh-btn {
    margin-top: 8px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.fp-lyrics-refresh-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.fp-lyrics-refresh-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.fp-lyrics-refresh-status {
    margin-top: 6px;
    font-size: 12px;
    color: var(--hint);
}

.fp-lyrics-title {
    font-size: 13px;
    color: var(--hint);
    margin-bottom: 8px;
}

.fp-lyrics-snippet {
    font-size: 17px;
    line-height: 1.55;
    white-space: pre-line;
    height: 100%;
    max-height: none;
    overflow: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 4px 10px 4px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fp-lyrics-snippet::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.fp-lyrics-preview-line {
    opacity: 0.4;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
    transform: translateX(0);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.fp-lyrics-preview-line.active {
    opacity: 1;
    color: #9fd0ff;
    transform: translateX(0);
}

.fp-lyrics-preview-line.past {
    opacity: 0.74;
    color: #7e93b2;
}

.fp-lyrics-preview-line.next {
    opacity: 0.44;
}

@media (max-width: 820px) {
    .fp-lyrics-preview .fp-lyrics-snippet {
        font-size: 16px !important;
        line-height: 1.42 !important;
        max-height: calc(1.42em * 4) !important;
        height: calc(1.42em * 4) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 0 !important;
        padding-bottom: 0 !important;
        display: block !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .fp-lyrics-preview .fp-lyrics-snippet::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
    }
}

.fp-lyrics-screen {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.fp-lyrics-head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.fp-lyrics-head-title {
    font-size: 14px;
    color: var(--hint);
}

.fp-lyrics-gap {
    display: none;
}

#fp-lyrics-back {
    position: absolute;
    left: 12px;
    top: 8px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

body.main-app-mode .fp-lyrics-head {
    padding-top: calc(env(safe-area-inset-top) + 112px);
}

body.main-app-mode #fp-lyrics-back {
    top: calc(env(safe-area-inset-top) + 106px);
}

.fp-lyrics-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 28px;
}

.fp-lyrics-foot {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.12);
}

.fp-lyrics-full {
    white-space: pre-line;
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
}

.lyric-line {
    opacity: 0.42;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    padding: 4px 0;
    cursor: pointer;
}

.lyric-line.active {
    opacity: 1;
    color: #9fd0ff;
    transform: scale(1.02);
}

.lyric-line.past {
    opacity: 0.72;
    color: #7e93b2;
}

.lyric-line.next {
    opacity: 0.42;
}

.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 320;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.settings-card {
    width: 100%;
    max-width: 420px;
    background: var(--secondary-bg);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-row label {
    font-size: 12px;
    color: var(--hint);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.theme-option {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 13px;
    padding: 9px 10px;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.theme-option:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.theme-option.active {
    background: rgba(79, 149, 231, 0.25);
    border-color: rgba(79, 149, 231, 0.55);
}

body.theme-light .theme-option {
    background: #eef5fd;
    border-color: rgba(58, 132, 216, 0.25);
}

body.theme-light .theme-option.active {
    background: rgba(79, 149, 231, 0.26);
    border-color: rgba(58, 132, 216, 0.5);
}

.settings-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.settings-btn {
    border: none;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text);
    background: rgba(255,255,255,0.08);
}

body.theme-light .header-settings-btn {
    background: #e8f1fb;
}

body.theme-light .now-playing {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.98));
    border-top: 1px solid rgba(28, 52, 84, 0.12);
    border-left-color: rgba(58, 132, 216, 0.12);
    border-right-color: rgba(58, 132, 216, 0.12);
    box-shadow: 0 -8px 24px rgba(25, 46, 74, 0.08);
}

body.theme-light .song-item:active,
body.theme-light .song-icon,
body.theme-light .edit-track-btn,
body.theme-light .search-box,
body.theme-light .fp-lyrics-preview,
body.theme-light .fp-lyrics-refresh-btn {
    background: rgba(45, 109, 183, 0.08);
}

body.theme-light .song-item.active,
body.theme-light .np-extra-btn.active,
body.theme-light .ctrl-btn.active,
body.theme-light .fp-lyrics-refresh-btn:active {
    background: rgba(79, 149, 231, 0.2);
}

body.theme-light .progress-bar,
body.theme-light .progress-bar-mini,
body.theme-light .fp-progress-bar {
    background: rgba(23, 45, 77, 0.14);
    border-color: rgba(58, 132, 216, 0.28);
}

body.theme-light .ctrl-btn {
    color: #26384f;
}

body.theme-light .play-btn {
    color: #ffffff;
    background: #4f95e7;
    box-shadow: 0 6px 16px rgba(79, 149, 231, 0.24);
}

body.theme-light .np-extra-btn {
    background: rgba(58, 132, 216, 0.06);
}

body.theme-light .np-extra-btn.active,
body.theme-light .ctrl-btn.active {
    color: #1667b7;
    background: rgba(58, 132, 216, 0.16);
}

body.theme-light .edit-modal,
body.theme-light .settings-modal {
    background: rgba(20, 40, 70, 0.2);
}

body.theme-light .edit-card,
body.theme-light .settings-card {
    border: 1px solid rgba(27, 54, 89, 0.14);
    box-shadow: 0 10px 40px rgba(39, 74, 117, 0.12);
}

body.theme-light .edit-input,
body.theme-light .settings-select {
    background: rgba(58, 132, 216, 0.08);
    border: 1px solid rgba(58, 132, 216, 0.2);
}

body.theme-light #fp-close {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 20px rgba(33, 64, 99, 0.18);
}

body.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(46, 95, 154, 0.25);
}

.app-version {
    text-align: center;
    font-size: 11px;
    color: var(--hint);
    opacity: 0.75;
    padding: 12px 0 6px;
}

.settings-screen {
    position: fixed;
    inset: 0;
    z-index: 320;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.settings-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.native-ios .settings-top {
    padding: max(16px, calc(var(--safe-top) + 12px)) max(16px, calc(var(--safe-right) + 12px)) 12px max(16px, calc(var(--safe-left) + 12px));
}

body.ios-device .settings-top {
    padding: max(16px, calc(var(--safe-top) + 12px)) max(16px, calc(var(--safe-right) + 12px)) 12px max(16px, calc(var(--safe-left) + 12px));
}

.settings-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
}

body.native-ios .settings-back-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 21px;
}

body.ios-device .settings-back-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 21px;
}

.settings-gap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: transparent;
    border: 0;
    pointer-events: none;
}

body.native-ios .settings-gap {
    width: 52px;
    height: 52px;
}

body.ios-device .settings-gap {
    width: 52px;
    height: 52px;
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.native-ios .settings-body {
    padding: 16px max(16px, calc(var(--safe-right) + 12px)) max(18px, calc(var(--safe-bottom) + 12px)) max(16px, calc(var(--safe-left) + 12px));
}

.settings-version {
    margin-top: auto;
    padding-top: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--hint);
    opacity: 0.82;
}

.settings-row {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
}

.settings-screen button,
.settings-screen input,
.settings-screen select,
.settings-screen textarea {
    font-family: inherit;
}

.settings-screen .toggle-btn,
.settings-screen .settings-wide-btn,
.settings-screen .theme-option,
.settings-screen [data-privacy] {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
}

.toggle-btn {
    margin-top: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
}

.toggle-btn.active {
    background: rgba(79, 149, 231, 0.26);
    border-color: rgba(79, 149, 231, 0.58);
}

.settings-wide-btn {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.settings-wide-btn:active {
    transform: scale(0.985);
    background: rgba(79, 149, 231, 0.18);
}

.settings-wide-btn-stop {
    margin-top: 8px;
    background: rgba(225, 64, 64, 0.14);
    border-color: rgba(225, 64, 64, 0.35);
    color: #ffd6d6;
}

.settings-wide-btn-stop.hidden {
    display: none;
}

.settings-wide-btn-stop:active {
    background: rgba(225, 64, 64, 0.24);
}

.settings-note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--hint);
    min-height: 16px;
}

.settings-pack-progress {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-pack-progress.hidden {
    display: none;
}

.settings-pack-progress-track {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.settings-pack-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #5b9bd5, #7ebdff);
    transition: width 180ms ease;
}

.settings-pack-progress-text {
    min-width: 48px;
    text-align: right;
    font-size: 12px;
    color: var(--hint);
    font-variant-numeric: tabular-nums;
}

.equalizer-body {
    gap: 16px;
}

.equalizer-hero {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79,149,231,0.22), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.12);
}

.equalizer-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.equalizer-hero-subtitle {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--hint);
}

.equalizer-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.equalizer-preset {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.equalizer-preset.active {
    background: rgba(79,149,231,0.28);
    border-color: rgba(79,149,231,0.62);
    color: #d9ecff;
}

.equalizer-bands {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-height: 310px;
    padding: 16px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.equalizer-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.equalizer-band-value {
    min-height: 18px;
    font-size: 11px;
    color: var(--hint);
    font-variant-numeric: tabular-nums;
}

.equalizer-slider-wrap {
    flex: 1;
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equalizer-slider {
    width: 210px;
    transform: rotate(-90deg);
    accent-color: var(--btn);
}

.equalizer-band-label {
    font-size: 11px;
    color: var(--hint);
    white-space: nowrap;
}

body.theme-light .settings-wide-btn,
body.theme-light .equalizer-preset {
    border-color: rgba(58,132,216,0.32);
    background: rgba(58,132,216,0.08);
}

body.theme-light .equalizer-hero,
body.theme-light .equalizer-bands {
    border-color: rgba(58,132,216,0.18);
    background: rgba(58,132,216,0.08);
}

@media (min-width: 760px) {
    .equalizer-presets {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .equalizer-bands {
        gap: 4px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .equalizer-slider {
        width: 190px;
    }

    .equalizer-band-label {
        font-size: 10px;
    }
}

body.theme-light .toggle-btn {
    border-color: rgba(58,132,216,0.35);
    background: rgba(58,132,216,0.08);
}

.queue-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(56vh, 520px);
    z-index: 330;
    background: var(--secondary-bg);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -12px 32px rgba(0,0,0,0.28);
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.queue-backdrop {
    position: fixed;
    inset: 0;
    z-index: 329;
    background: rgba(0,0,0,0.18);
}

.queue-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.queue-sheet-title {
    font-size: 14px;
    font-weight: 600;
}

.queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.04);
    -webkit-user-select: none;
    user-select: none;
}

.queue-item.current {
    background: rgba(79,149,231,0.22);
}

.queue-item.queue-swiping-remove {
    transform: translateX(var(--queue-swipe-x, 0px));
    background: rgba(220, 70, 70, 0.18);
}

.queue-item.queue-removed {
    animation: queueRemoved 0.34s ease;
    background: rgba(220, 70, 70, 0.26);
}

@keyframes queueRemoved {
    0% { transform: translateX(0); }
    45% { transform: translateX(16px); }
    100% { transform: translateX(0); }
}

.queue-item.dragging {
    opacity: 0.5;
}

.queue-drag {
    opacity: 0.6;
    cursor: grab;
    font-size: 16px;
}

.queue-item.current .queue-drag {
    opacity: 0.24;
    cursor: default;
}

.queue-item-title {
    font-size: 14px;
    font-weight: 500;
}

.queue-item-sub {
    font-size: 12px;
    color: var(--hint);
}

.song-item.swipe-queued {
    animation: swipeQueued 0.36s ease;
    background: rgba(88, 198, 128, 0.24);
    box-shadow: 0 0 0 1px rgba(88,198,128,0.45), 0 0 18px rgba(88,198,128,0.3);
}

.queue-reorder-btn {
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
}

.trim-screen {
    position: fixed;
    inset: 0;
    z-index: 340;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

.trim-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(14px, calc(var(--safe-top) + 10px)) 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.trim-back-btn,
.trim-gap {
    width: 40px;
    height: 40px;
}

.trim-back-btn {
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

.trim-title {
    font-size: 16px;
    font-weight: 600;
}

.trim-body {
    flex: 1;
    padding: 16px 16px max(16px, calc(var(--safe-bottom) + 16px));
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.trim-song-name {
    font-size: 14px;
    color: var(--hint);
}

.trim-row {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
}

.trim-row label {
    display: block;
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 8px;
}

.trim-row input[type="range"] {
    width: 100%;
}

.trim-value {
    margin-top: 6px;
    font-size: 13px;
}

.trim-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.waveform-row {
    gap: 10px;
}

.trim-waveform-wrap {
    position: relative;
    width: 100%;
    height: 210px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.trim-waveform {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(120, 1fr);
    align-items: end;
    gap: 1px;
    padding: 10px 6px;
}

.trim-wave-bar {
    background: rgba(91,155,213,0.45);
    border-radius: 2px;
}

.trim-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    appearance: none;
    background: transparent;
    pointer-events: auto;
    touch-action: none;
}

.trim-slider-start {
    z-index: 3;
}

.trim-slider-end {
    z-index: 2;
}

.trim-slider::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
    border-radius: 0;
}

.trim-slider::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 192px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0,0,0,0) 9px, var(--btn) 9px, var(--btn) 13px, rgba(0,0,0,0) 13px);
    border: 0;
    box-shadow: none;
    margin-top: 8px;
    cursor: ew-resize;
}

.trim-slider::-moz-range-track {
    height: 100%;
    background: transparent;
}

.trim-slider::-moz-range-thumb {
    width: 22px;
    height: 192px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0,0,0,0) 9px, var(--btn) 9px, var(--btn) 13px, rgba(0,0,0,0) 13px);
    border: 0;
    cursor: ew-resize;
}

.trim-values {
    display: flex;
    justify-content: space-between;
}

.trim-play-btn {
    width: 100%;
}

.bottom-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(var(--tabs-bar-height) + var(--safe-bottom));
    padding: 4px 8px calc(4px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.95), rgba(14, 20, 33, 0.98));
    border-top: 1px solid rgba(132, 166, 216, 0.18);
    backdrop-filter: blur(16px);
    display: flex;
    gap: 8px;
    align-items: stretch;
    z-index: 240;
    border-radius: 0;
}

@media (min-width: 960px) {
    :root {
        --tabs-bar-height: 44px;
    }
    .now-playing {
        left: 0;
        right: 0;
        width: auto;
        transform: none;
        border-radius: 0;
    }
    .bottom-tabs {
        left: 0;
        right: 0;
        width: auto;
        transform: none;
        border-radius: 0;
    }
}

.bottom-tab {
    flex: 1;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 18px;
    line-height: 1;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    min-height: var(--tabs-bar-height);
    padding: 4px 4px;
    transform: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.bottom-tab:active {
    transform: scale(0.98);
}

.bottom-tab.active {
    background: rgba(91, 155, 213, 0.24);
    box-shadow: inset 0 0 0 1px rgba(127, 180, 242, 0.24);
}

body.ios-device .bottom-tabs {
    padding-left: 0;
    padding-right: 0;
    gap: 8px;
    border-radius: 0;
}

body.ios-device .bottom-tab {
    border-radius: 12px;
    min-height: var(--tabs-bar-height);
    padding-top: 4px;
}

.bottom-tab-label {
    font-size: 11px;
    line-height: 1.1;
    color: inherit;
    opacity: 0.92;
    margin-bottom: 0;
}

@media (max-width: 820px) {
    :root {
        --tabs-bar-height: 56px;
    }
    .bottom-tab { padding-top: 4px; }
    body.ios-device .bottom-tab { padding-top: 4px; }
}

@media (min-width: 960px) {
    .bottom-tab {
        transform: none;
    }
}

.tab-unread {
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff4d57;
    box-shadow: 0 0 0 2px var(--secondary-bg);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    pointer-events: none;
}

.profiles-mode-btn .tab-unread {
    top: 5px;
    right: 6px;
}

.bottom-tab[data-tab="profiles"] {
    opacity: 0.9;
}

.bottom-tab.active {
    background: rgba(91,155,213,0.25);
    box-shadow: inset 0 0 0 1px rgba(91,155,213,0.45);
    color: #9fd0ff;
    opacity: 1;
    filter: none;
}

body.theme-light .bottom-tabs {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.98));
    border-top-color: rgba(28, 52, 84, 0.12);
    box-shadow: 0 -8px 24px rgba(25, 46, 74, 0.08);
}

body.theme-light .bottom-tab {
    background: rgba(58, 132, 216, 0.07);
    color: #42556e;
}

body.theme-light .bottom-tab.active {
    background: rgba(58, 132, 216, 0.16);
    box-shadow: inset 0 0 0 1px rgba(58, 132, 216, 0.28);
    color: #1f6fbf;
}

body.theme-light .tab-unread {
    box-shadow: 0 0 0 2px #f4f9ff;
}

.profiles-view {
    padding: 6px 16px 0;
}

#search-view {
    padding-bottom: calc(126px + var(--safe-bottom));
}

.music-search-head {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 8px 0 10px;
    background: var(--bg);
}

.music-search-box {
    min-height: 48px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 14px;
    border: 1px solid var(--border-1);
    border-radius: 8px;
    background: var(--secondary-bg);
}

.music-search-icon {
    width: 20px;
    height: 20px;
    color: var(--hint);
}

.music-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.music-search-input::-webkit-search-cancel-button {
    display: none;
}

.music-search-input::placeholder {
    color: var(--hint);
}

.music-search-clear {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--hint);
    font-size: 25px;
    line-height: 1;
}

.music-search-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 8px;
    padding: 4px;
    border: 1px solid var(--border-1);
    border-radius: 8px;
    background: var(--surface-1);
}

.music-search-mode {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--hint);
    font-size: 13px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.music-search-mode .ui-icon {
    width: 16px;
    height: 16px;
}

.music-search-mode.active {
    background: var(--btn);
    color: var(--btn-text);
}

.music-search-status {
    min-height: 44px;
    padding: 8px 4px 12px;
    color: var(--hint);
    font-size: 13px;
    line-height: 1.35;
}

.music-search-status.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid var(--border-2);
    border-top-color: var(--btn);
    border-radius: 50%;
    vertical-align: -2px;
    animation: musicSearchSpin 0.8s linear infinite;
}

@keyframes musicSearchSpin {
    to { transform: rotate(360deg); }
}

.music-search-results {
    display: grid;
    gap: 6px;
}

.music-search-row {
    width: 100%;
    min-width: 0;
    min-height: 66px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.music-search-row:active,
.music-search-row.playing {
    border-color: var(--border-1);
    background: var(--surface-1);
}

.music-search-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--surface-2);
    object-fit: cover;
}

.music-search-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hint);
    font-size: 20px;
}

.music-search-copy {
    min-width: 0;
}

.music-search-title,
.music-search-meta,
.music-search-album {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-search-title {
    font-size: 14px;
    font-weight: 650;
}

.music-search-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--hint);
}

.music-search-album {
    margin-top: 2px;
    font-size: 11px;
    color: var(--hint);
    opacity: 0.78;
}

.music-search-like {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--hint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-search-like .ui-icon {
    width: 21px;
    height: 21px;
}

.music-search-like.active {
    color: #ff5f7e;
}

.music-search-like.pending {
    color: var(--btn);
    animation: musicSearchPulse 1s ease-in-out infinite;
}

@keyframes musicSearchPulse {
    50% { opacity: 0.45; transform: scale(0.92); }
}

body.theme-light .music-search-box {
    box-shadow: 0 4px 16px rgba(36, 82, 132, 0.06);
}

body.theme-light .music-search-row:active,
body.theme-light .music-search-row.playing {
    background: rgba(58,132,216,0.08);
    border-color: rgba(58,132,216,0.2);
}

.profiles-search-wrap {
    margin-bottom: 10px;
}

.profiles-search-input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
}

.profiles-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.profiles-mode-btn {
    flex: 1;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(255,255,255,0.08);
    font-size: 14px;
    position: relative;
}

.profiles-mode-btn.active {
    background: rgba(91,155,213,0.25);
    box-shadow: inset 0 0 0 1px rgba(91,155,213,0.45);
}

.profiles-link-panel {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.profiles-link-input {
    flex: 1;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
}

.profiles-link-find {
    border: 0;
    border-radius: 12px;
    background: var(--btn);
    color: var(--btn-text);
    padding: 0 14px;
    font-weight: 600;
}

.profiles-title {
    font-size: 14px;
    color: var(--hint);
    margin: 4px 0 10px;
}

.profiles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-card {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    padding: 10px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    object-fit: cover;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}

.profile-dev-badge {
    color: #48a6ff;
    font-weight: 700;
}

.profile-sub {
    font-size: 12px;
    color: var(--hint);
    margin-top: 2px;
}

.profile-open {
    margin-top: 10px;
    border: 0;
    border-radius: 10px;
    background: rgba(91,155,213,0.2);
    color: var(--text);
    padding: 8px 10px;
    width: 100%;
}

.profile-songs {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 8px;
}

.profile-song-row {
    font-size: 13px;
    color: var(--text);
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.profile-screen-card {
    border-radius: 14px;
    border: 1px solid var(--border-1);
    background: var(--surface-1);
    padding: 12px;
}

.profile-screen-meta {
    margin-top: 8px;
    font-size: 13px;
    color: var(--hint);
}

.profile-top-box {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-1);
    background: var(--surface-1);
    padding: 10px;
}

.profile-top-title {
    font-size: 13px;
    color: var(--hint);
    margin-bottom: 8px;
}

.profile-top-row {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: 18px 40px 1fr;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    background: var(--surface-1);
    color: var(--text);
}

.profile-top-row:last-child {
    border-bottom: 0;
}

.profile-top-row:active {
    transform: scale(0.995);
    background: rgba(91,155,213,0.16);
}

.profile-top-index {
    color: #8ec5ff;
    font-weight: 700;
}

.profile-top-text {
    font-size: 13px;
}

.profile-tracks-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px calc(96px + env(safe-area-inset-bottom));
}

.profile-tracks-search-wrap {
    margin: 10px 12px 4px;
}

.profile-track-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-1);
    background: var(--surface-1);
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.chat-attach-track-row {
    justify-content: flex-start;
}

.profile-track-main {
    flex: 1;
    min-width: 0;
}

.profile-track-title {
    font-size: 14px;
    font-weight: 600;
}

.profile-track-sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--hint);
}

.profile-top-main {
    min-width: 0;
}

body.profile-overlay-open #profile-screen.settings-screen,
body.profile-overlay-open #profile-tracks-screen.settings-screen,
body.profile-overlay-open #chat-screen.settings-screen,
body.profile-overlay-open #chat-attach-screen.settings-screen {
    inset: 0;
    z-index: 380;
}

#profile-screen .settings-body {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.profile-track-like {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 18px;
}

.profile-track-like.active {
    color: #ff5f7e;
    border-color: rgba(255,95,126,0.45);
    background: rgba(255,95,126,0.14);
}

.settings-share-link {
    margin-top: 8px;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 13px;
    padding: 9px 10px;
    word-break: break-all;
}

body.theme-light .settings-share-link,
body.theme-light .profile-track-like,
body.theme-light .settings-back-btn,
body.theme-light .trim-back-btn,
body.theme-light .edit-btn:not(.primary),
body.theme-light .profiles-search-input,
body.theme-light .profiles-link-input {
    border-color: rgba(58,132,216,0.32);
    background: rgba(58,132,216,0.08);
}

body.theme-light .profiles-search-input::placeholder,
body.theme-light .profiles-link-input::placeholder {
    color: rgba(74, 99, 135, 0.72);
}

#profile-screen-open-tracks {
    margin-top: 8px;
    border-radius: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(79,149,231,0.95), rgba(66,131,206,0.95));
    border: 1px solid rgba(142,197,255,0.45);
    box-shadow: 0 10px 24px rgba(43, 96, 155, 0.24);
}

.chat-body {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.chat-messages-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0 10px;
}

.chat-row {
    max-width: 86%;
    border-radius: 12px;
    border: 1px solid var(--border-1);
    background: var(--surface-1);
    color: var(--text);
    padding: 8px 10px;
    transition: transform .14s ease;
    position: relative;
    touch-action: pan-y;
    user-select: none;
}

.chat-row.chat-row-new {
    animation: chat-pop-in .34s ease both;
}

@keyframes chat-pop-in {
    0% {
        transform: translateY(8px) scale(0.985);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.chat-row.mine {
    align-self: flex-end;
    background: rgba(91,155,213,0.22);
    border-color: rgba(91,155,213,0.45);
}

.chat-row.peer {
    align-self: flex-start;
}

.chat-row-meta {
    margin-top: 4px;
    color: var(--hint);
    font-size: 11px;
}

.chat-row.swiping-reply {
    background: rgba(79, 198, 132, 0.12);
    border-color: rgba(79, 198, 132, 0.45);
}

.chat-reply-inline {
    margin-bottom: 6px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(91,155,213,0.35);
    background: rgba(91,155,213,0.12);
    color: var(--hint);
    font-size: 12px;
    line-height: 1.25;
}

.chat-reply-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(91,155,213,0.35);
    background: rgba(91,155,213,0.12);
}

.chat-reply-text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-reply-cancel {
    border: 0;
    border-radius: 9px;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.chat-track-card {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    align-items: center;
}

.chat-track-main {
    min-width: 0;
}

.chat-track-title {
    font-size: 13px;
    font-weight: 600;
}

.chat-track-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--hint);
}

.chat-track-like {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 11px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 16px;
}

.chat-track-like.active {
    color: #ff5f7e;
    border-color: rgba(255,95,126,0.45);
    background: rgba(255,95,126,0.14);
}

.chat-compose-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    position: sticky;
    bottom: 0;
    z-index: 12;
    background: linear-gradient(180deg, rgba(16,21,31,0.02), rgba(16,21,31,0.95) 35%);
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

body.theme-light .chat-compose-row {
    background: linear-gradient(180deg, rgba(246,249,252,0.02), rgba(246,249,252,0.96) 35%);
}

body.theme-light .chat-compose-input {
    color: #1b2738;
    caret-color: #3a84d8;
}

.chat-compose-input {
    min-height: 40px;
}

#chat-screen .settings-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#chat-screen .chat-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.keyboard-open.profile-overlay-open #chat-screen.settings-screen {
    inset: 0;
}

body.keyboard-open #chat-screen .chat-compose-row {
    bottom: 0;
    z-index: 420;
}

.chat-thread-row {
    border-radius: 12px;
    border: 1px solid var(--border-1);
    background: var(--surface-1);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-thread-main {
    min-width: 0;
    flex: 1;
}

.chat-thread-title {
    font-size: 14px;
    font-weight: 600;
}

.chat-thread-last {
    margin-top: 3px;
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-thread-count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ff4d57;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

body.theme-light #profile-screen-open-tracks {
    background: linear-gradient(135deg, rgba(82,157,238,0.95), rgba(58,132,216,0.95));
    border-color: rgba(58,132,216,0.44);
    box-shadow: 0 8px 20px rgba(58,132,216,0.26);
    color: #0f2238;
}

@media (min-width: 960px) {
    .settings-top,
    .settings-body {
        width: min(100%, 860px);
        margin-left: auto;
        margin-right: auto;
    }

    .profile-tracks-search-wrap,
    .profile-tracks-list {
        width: min(100%, 860px);
        margin-left: auto;
        margin-right: auto;
    }
}

@keyframes swipeQueued {
    0% { transform: translateX(0); }
    40% { transform: translateX(20px); }
    100% { transform: translateX(0); }
}

.app-toast {
    position: fixed;
    z-index: 1200;
    left: 50%;
    bottom: calc(82px + env(safe-area-inset-bottom));
    max-width: min(88vw, 440px);
    padding: 8px 12px;
    border-radius: 7px;
    background: rgba(72, 76, 84, 0.96);
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.theme-light .app-toast {
    background: rgba(78, 84, 94, 0.94);
}

/* Localhost desktop prototype: right-side playback context rail. */
.desktop-right-rail {
    display: none;
}

@media (min-width: 1200px) {
    body.desktop-side-prototype {
        background:
            radial-gradient(circle at 86% 8%, rgba(70, 127, 224, 0.11), transparent 32%),
            radial-gradient(circle at 12% 88%, rgba(122, 84, 220, 0.07), transparent 28%),
            var(--bg);
    }

    body.desktop-side-prototype #app,
    body.desktop-side-prototype.main-app-mode #app {
        width: auto;
        max-width: min(920px, calc(100vw - 430px));
        margin-left: max(20px, calc((100vw - 1360px) / 2));
        margin-right: 400px;
    }

    body.desktop-side-prototype .desktop-right-rail {
        position: fixed;
        z-index: 220;
        top: 18px;
        right: 18px;
        bottom: calc(154px + var(--safe-bottom));
        width: 360px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 1px 3px 10px;
        scrollbar-width: thin;
    }

    .desktop-rail-card {
        flex: 0 0 auto;
        border: 1px solid rgba(139, 173, 224, 0.14);
        border-radius: 20px;
        background:
            linear-gradient(145deg, rgba(27, 39, 59, 0.96), rgba(17, 25, 39, 0.98));
        box-shadow:
            0 18px 42px rgba(2, 8, 20, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.035);
    }

    .desktop-now-card {
        padding: 14px;
    }

    .desktop-rail-eyebrow {
        display: flex;
        align-items: center;
        gap: 7px;
        color: var(--text);
        font-size: 13px;
        line-height: 1.2;
        font-weight: 720;
        letter-spacing: 0.01em;
    }

    .desktop-live-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #62aaff;
        box-shadow: 0 0 0 4px rgba(98, 170, 255, 0.12), 0 0 15px rgba(98, 170, 255, 0.66);
    }

    .desktop-now-art {
        width: 100%;
        height: 178px;
        margin-top: 12px;
        border: 0;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background:
            radial-gradient(circle at 68% 26%, rgba(126, 175, 255, 0.92), transparent 24%),
            radial-gradient(circle at 33% 70%, rgba(116, 72, 230, 0.68), transparent 34%),
            linear-gradient(145deg, #162a4c, #101522);
        background-size: cover;
        background-position: center;
        color: rgba(255, 255, 255, 0.9);
        font-size: 54px;
        cursor: pointer;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.28);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .desktop-now-art:hover {
        transform: translateY(-2px);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 36px rgba(0, 0, 0, 0.34);
    }

    .desktop-now-title {
        margin-top: 13px;
        font-size: 18px;
        line-height: 1.25;
        font-weight: 750;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .desktop-now-artist {
        margin-top: 4px;
        color: var(--hint);
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .desktop-now-progress {
        height: 4px;
        margin-top: 14px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
    }

    .desktop-now-progress-fill {
        width: 0;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #5c9cff, #96c4ff);
        box-shadow: 0 0 14px rgba(92, 156, 255, 0.5);
        transition: width 0.2s linear;
    }

    .desktop-now-times {
        display: flex;
        justify-content: space-between;
        margin-top: 5px;
        color: var(--hint);
        font-size: 11px;
        font-variant-numeric: tabular-nums;
    }

    .desktop-rail-section {
        padding: 13px 10px 9px;
    }

    .desktop-rail-section-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 0 4px 9px;
    }

    .desktop-rail-caption {
        margin-top: 4px;
        color: var(--hint);
        font-size: 11px;
    }

    .desktop-rail-link,
    .desktop-icon-action {
        flex: 0 0 auto;
        border: 1px solid rgba(133, 175, 235, 0.18);
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.045);
        color: #9cc9ff;
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .desktop-rail-link {
        padding: 6px 8px;
        font-size: 10px;
    }

    .desktop-icon-action {
        width: 28px;
        height: 28px;
        padding: 6px;
    }

    .desktop-rail-link:hover,
    .desktop-icon-action:hover {
        transform: translateY(-1px);
        border-color: rgba(133, 175, 235, 0.4);
        background: rgba(91, 155, 213, 0.14);
    }

    .desktop-compact-list {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .desktop-track-row {
        width: 100%;
        min-width: 0;
        border: 0;
        border-radius: 12px;
        padding: 7px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        background: transparent;
        color: var(--text);
        text-align: left;
        cursor: pointer;
        transition: background 0.15s ease, transform 0.15s ease;
    }

    .desktop-track-row:hover {
        background: rgba(112, 163, 234, 0.1);
        transform: translateX(2px);
    }

    .desktop-track-cover {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        object-fit: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(145deg, rgba(85, 147, 224, 0.35), rgba(111, 75, 207, 0.28));
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
        font-size: 15px;
    }

    .desktop-track-copy {
        min-width: 0;
        display: block;
    }

    .desktop-track-title,
    .desktop-track-meta {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .desktop-track-title {
        font-size: 12px;
        line-height: 1.25;
        font-weight: 650;
    }

    .desktop-track-meta {
        margin-top: 3px;
        color: var(--hint);
        font-size: 10px;
        line-height: 1.2;
    }

    .desktop-track-tail {
        min-width: 25px;
        color: var(--hint);
        font-size: 10px;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .desktop-similarity-score {
        min-width: 34px;
        padding: 4px 5px;
        border-radius: 999px;
        background: rgba(91, 155, 213, 0.13);
        color: #9dccff;
        text-align: center;
    }

    .desktop-similar-status,
    .desktop-rail-empty {
        padding: 10px 8px 12px;
        color: var(--hint);
        font-size: 11px;
        line-height: 1.35;
        text-align: center;
    }

    .desktop-similar-status.loading::after {
        content: '';
        display: inline-block;
        width: 10px;
        height: 10px;
        margin-left: 7px;
        border: 1px solid rgba(138, 190, 255, 0.35);
        border-top-color: #8ec5ff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        vertical-align: -1px;
    }

    body.theme-light.desktop-side-prototype {
        background:
            radial-gradient(circle at 86% 8%, rgba(79, 149, 231, 0.13), transparent 32%),
            radial-gradient(circle at 12% 88%, rgba(132, 104, 224, 0.07), transparent 28%),
            var(--bg);
    }

    body.theme-light .desktop-rail-card {
        border-color: rgba(48, 101, 164, 0.13);
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.98));
        box-shadow: 0 18px 38px rgba(42, 75, 118, 0.11), inset 0 1px 0 #ffffff;
    }

    body.theme-light .desktop-now-art {
        box-shadow: inset 0 0 0 1px rgba(36, 82, 140, 0.08), 0 14px 30px rgba(47, 83, 132, 0.16);
    }

    body.theme-light .desktop-now-progress {
        background: rgba(43, 84, 137, 0.13);
    }

    body.theme-light .desktop-track-row:hover {
        background: rgba(58, 132, 216, 0.09);
    }

    body.theme-light .desktop-rail-link,
    body.theme-light .desktop-icon-action {
        border-color: rgba(58, 132, 216, 0.18);
        background: rgba(58, 132, 216, 0.06);
        color: #246fbf;
    }

    body.theme-light .desktop-similarity-score {
        background: rgba(58, 132, 216, 0.1);
        color: #246fbf;
    }
}

/* Keep the complete desktop shell authoritative over the earlier rail prototype. */
@media (min-width: 1200px) {
    body.desktop-side-prototype #app,
    body.desktop-side-prototype.main-app-mode #app {
        position: fixed;
        top: calc(var(--desktop-top) + 12px);
        right: calc(var(--desktop-right) + 24px);
        bottom: calc(var(--desktop-player) + 12px);
        left: calc(var(--desktop-left) + 24px);
        width: auto;
        max-width: none;
        margin: 0;
    }

    body.desktop-side-prototype .desktop-right-rail {
        top: calc(var(--desktop-top) + 12px);
        right: 12px;
        bottom: calc(var(--desktop-player) + 12px);
        width: var(--desktop-right);
        gap: 10px;
        padding: 0;
    }

    body.desktop-side-prototype .desktop-rail-card { border-radius: 16px; }
    body.desktop-side-prototype .desktop-now-card { padding: 13px; }
    body.desktop-side-prototype .desktop-now-art { height: 142px; margin-top: 10px; border-radius: 13px; }
    body.desktop-side-prototype .desktop-now-title { margin-top: 11px; font-size: 14px; }
    body.desktop-side-prototype .desktop-now-artist { font-size: 10px; }
    body.desktop-side-prototype .desktop-now-progress { margin-top: 11px; }
    body.desktop-side-prototype .desktop-rail-section { padding: 11px 8px 7px; }
    body.desktop-side-prototype .desktop-track-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 5px 6px; }
    body.desktop-side-prototype .desktop-track-cover { width: 34px; height: 34px; border-radius: 7px; }
    body.desktop-side-prototype .desktop-track-title { font-size: 10px; }
    body.desktop-side-prototype .desktop-track-meta,
    body.desktop-side-prototype .desktop-track-tail { font-size: 9px; }
    body.desktop-side-prototype .desktop-rail-caption { display: none; }
}

/* Desktop test shell refinements. Kept scoped so mobile, iOS and Android stay unchanged. */
@media (min-width: 1200px) {
    body.desktop-side-prototype .desktop-topbar {
        grid-template-columns: var(--desktop-left) minmax(260px, 430px) minmax(430px, 1fr) 52px;
    }

    body.desktop-side-prototype .desktop-nav-button {
        min-width: 76px;
        padding-inline: 11px;
    }

    body.desktop-side-prototype .desktop-left-rail {
        overflow: hidden;
    }

    body.desktop-side-prototype .desktop-release-card {
        flex: 0 0 255px;
        cursor: pointer;
    }

    body.desktop-side-prototype .desktop-recent-card {
        min-height: 0;
        flex: 1 1 auto;
    }

    body.desktop-side-prototype .desktop-recent-list {
        overflow: hidden;
    }

    body.desktop-side-prototype #search-view .music-search-box {
        display: grid;
    }

    body.desktop-side-prototype #search-view .music-search-head {
        padding: 6px 0 18px;
    }

    body.desktop-side-prototype #profiles-mode-mine {
        display: none !important;
    }

    body.desktop-side-prototype .desktop-discovery-view {
        display: block;
        padding: 18px 18px 30px;
    }

    body.desktop-side-prototype .desktop-discovery-view.hidden {
        display: none !important;
    }

    .desktop-discovery-heading {
        min-height: 82px;
        display: flex;
        align-items: center;
        gap: 14px;
        border-bottom: 1px solid rgba(128, 160, 208, .09);
    }

    .desktop-discovery-heading h2 {
        margin-top: 4px;
        font-size: 25px;
        letter-spacing: -.035em;
    }

    .desktop-discovery-heading p {
        margin-top: 4px;
        color: #8293ac;
        font-size: 10px;
    }

    .desktop-discovery-back {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border: 1px solid rgba(126, 170, 232, .2);
        border-radius: 11px;
        background: rgba(76, 119, 181, .13);
        color: #dcecff;
        cursor: pointer;
        font-size: 19px;
    }

    .desktop-discovery-list {
        display: flex;
        flex-direction: column;
        padding-top: 10px;
    }

    .desktop-discovery-row {
        width: 100%;
        min-width: 0;
        border: 0;
        border-bottom: 1px solid rgba(128, 160, 208, .055);
        border-radius: 10px;
        padding: 8px 10px;
        display: grid;
        grid-template-columns: 28px 46px minmax(150px, 1.4fr) minmax(100px, 1fr) 32px;
        align-items: center;
        gap: 10px;
        background: transparent;
        color: #edf4ff;
        text-align: left;
        cursor: pointer;
    }

    .desktop-discovery-row:hover {
        background: rgba(102, 148, 216, .09);
    }

    .desktop-discovery-index,
    .desktop-discovery-album,
    .desktop-discovery-track-artist {
        color: #8192aa;
        font-size: 10px;
    }

    .desktop-discovery-cover {
        width: 46px;
        height: 46px;
        border-radius: 8px;
        object-fit: cover;
        display: grid;
        place-items: center;
        background: #1e2b40;
    }

    .desktop-discovery-copy,
    .desktop-discovery-track-title,
    .desktop-discovery-track-artist,
    .desktop-discovery-album {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .desktop-discovery-track-title {
        display: block;
        font-size: 11px;
        font-weight: 680;
    }

    .desktop-discovery-track-artist {
        display: block;
        margin-top: 4px;
    }

    .desktop-discovery-play {
        color: #77b3ff;
        text-align: center;
        font-size: 10px;
    }

    body.desktop-side-prototype .now-playing {
        background: rgba(14, 24, 39, .985);
        border-top-color: rgba(133, 177, 238, .24);
        box-shadow: 0 -20px 50px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .025);
    }

    body.desktop-side-prototype .now-playing > .progress-wrapper {
        top: 0;
        bottom: auto;
    }

    body.desktop-side-prototype .now-playing > .progress-wrapper .progress-bar {
        height: 3px;
        background: rgba(130, 164, 215, .18);
    }

    body.desktop-side-prototype .full-player-view,
    body.desktop-side-prototype .settings-screen {
        z-index: 900;
        background:
            radial-gradient(circle at 82% 12%, rgba(70, 127, 224, .13), transparent 34%),
            linear-gradient(180deg, #080d17 0%, #0b1220 100%);
    }

    body.desktop-side-prototype.main-app-mode .full-player-view {
        padding-top: 0;
    }

    body.desktop-side-prototype .full-player-view .fp-top,
    body.desktop-side-prototype .settings-screen .settings-top {
        min-height: 66px;
        padding: 12px 18px;
        border-bottom-color: rgba(128, 166, 222, .13);
        background: rgba(10, 17, 29, .78);
        backdrop-filter: blur(22px);
    }

    body.desktop-side-prototype #fp-close {
        position: absolute;
        top: 12px;
        left: 18px;
        background: rgba(83, 128, 191, .16);
        border: 1px solid rgba(132, 178, 240, .2);
    }

    body.desktop-side-prototype .full-player-view .fp-main {
        --fp-desktop-block-h: clamp(300px, calc(100vh - 500px), 620px);
        padding: 18px 26px 22px;
        gap: 12px;
    }

    body.desktop-side-prototype .full-player-view .fp-desktop-stage {
        flex: 0 1 auto;
    }

    body.desktop-side-prototype .full-player-view .fp-title {
        font-size: clamp(26px, 2.3vw, 38px);
        margin-bottom: 4px;
    }

    body.desktop-side-prototype .full-player-view .fp-artist {
        color: #8ea1bc;
        font-size: clamp(16px, 1.45vw, 23px);
        margin-bottom: 7px;
    }

    body.desktop-side-prototype .full-player-view .fp-art,
    body.desktop-side-prototype .full-player-view .fp-lyrics-preview {
        border: 1px solid rgba(133, 174, 232, .14);
        border-radius: 22px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .24);
    }

    body.desktop-side-prototype .full-player-view .fp-main > .progress-wrapper {
        position: relative;
        inset: auto;
        margin: 0 auto;
        padding: 8px 2px 0;
    }

    body.desktop-side-prototype .full-player-view .progress-bar {
        height: 5px;
        border: 0;
        background: rgba(134, 169, 219, .18);
    }

    body.desktop-side-prototype .full-player-view .time-display {
        margin-top: 6px;
        color: #8295af;
        font-size: 10px;
    }

    body.theme-light.desktop-side-prototype .desktop-discovery-row {
        color: #21364f;
    }

    body.theme-light.desktop-side-prototype .desktop-discovery-heading p,
    body.theme-light.desktop-side-prototype .desktop-discovery-index,
    body.theme-light.desktop-side-prototype .desktop-discovery-album,
    body.theme-light.desktop-side-prototype .desktop-discovery-track-artist {
        color: #687d97;
    }

    body.theme-light.desktop-side-prototype .now-playing {
        background: rgba(239, 245, 251, .99);
        border-top-color: rgba(47, 93, 150, .2);
        box-shadow: 0 -18px 45px rgba(42, 75, 118, .16), inset 0 1px 0 #fff;
    }

    body.theme-light.desktop-side-prototype .full-player-view,
    body.theme-light.desktop-side-prototype .settings-screen {
        background:
            radial-gradient(circle at 82% 12%, rgba(90, 151, 231, .17), transparent 34%),
            linear-gradient(180deg, #edf3f9 0%, #f6f9fc 100%);
    }

    body.theme-light.desktop-side-prototype .full-player-view .fp-top,
    body.theme-light.desktop-side-prototype .settings-screen .settings-top {
        background: rgba(247, 250, 253, .86);
        border-bottom-color: rgba(47, 93, 150, .12);
    }
}

/* Desktop-only player and recommendation refinements for localhost/test. */
.desktop-only-player-actions {
    display: none;
}

@media (min-width: 1200px) {
    body.desktop-side-prototype .desktop-for-you-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-top: 10px;
    }

    body.desktop-side-prototype .desktop-for-you-row {
        grid-template-columns: 28px 46px minmax(180px, 1.5fr) minmax(120px, 1fr) 52px;
    }

    body.desktop-side-prototype .now-playing {
        border: 1px solid rgba(133, 177, 238, .22);
        border-bottom: 0;
        border-radius: 15px 15px 0 0;
        padding-top: 14px;
    }

    body.desktop-side-prototype .now-playing-info {
        width: min(390px, 100%);
    }

    body.desktop-side-prototype .edit-track-btn:not(.hidden) {
        display: inline-flex;
        flex: 0 0 auto;
    }

    body.desktop-side-prototype .now-playing > .controls {
        transform: translateY(-8px);
    }

    body.desktop-side-prototype .now-playing > .progress-wrapper {
        left: 50%;
        right: auto;
        top: auto;
        bottom: 9px;
        width: min(520px, 38vw);
        transform: translateX(-50%);
        touch-action: none;
        user-select: none;
    }

    body.desktop-side-prototype .now-playing > .progress-wrapper .progress-bar {
        height: 4px;
        border-radius: 999px;
    }

    body.desktop-side-prototype .now-playing > .progress-wrapper .time-display {
        display: flex;
        margin-top: 4px;
        color: #8194af;
        font-size: 9px;
        font-variant-numeric: tabular-nums;
    }

    body.desktop-side-prototype .desktop-only-player-actions {
        grid-column: 3;
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body.desktop-side-prototype .np-volume-inline {
        width: 150px;
        height: 32px;
        display: flex;
        align-items: center;
        gap: 8px;
        color: #91a5c1;
        cursor: pointer;
        touch-action: none;
        user-select: none;
    }

    body.desktop-side-prototype .np-volume-icon {
        width: 18px;
        height: 18px;
        display: grid;
        place-items: center;
    }

    body.desktop-side-prototype .np-volume-track {
        position: relative;
        width: 118px;
        height: 4px;
        border-radius: 999px;
        background: rgba(135, 168, 215, .2);
        touch-action: none;
    }

    body.desktop-side-prototype .np-volume-track .progress-fill {
        height: 100%;
        border-radius: inherit;
    }

    body.desktop-side-prototype .np-volume-track .progress-thumb {
        width: 10px;
        height: 10px;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    body.desktop-side-prototype .full-player-view .fp-main {
        --fp-desktop-block-h: clamp(380px, calc(100vh - 390px), 700px);
        padding-bottom: 18px;
    }

    body.desktop-side-prototype .full-player-view .progress-wrapper {
        touch-action: none;
        user-select: none;
    }

    body.desktop-side-prototype .full-player-view .fp-desktop-stage {
        flex: 1 1 auto;
    }

    body.desktop-side-prototype .full-player-view .time-display {
        display: flex !important;
    }

    body.desktop-side-prototype .queue-sheet {
        z-index: 980;
        left: 18%;
        right: 18%;
        bottom: 18px;
        border: 1px solid rgba(133, 177, 238, .22);
        border-radius: 18px;
    }

    body.desktop-side-prototype .queue-backdrop {
        z-index: 979;
        background: rgba(3, 8, 16, .55);
        backdrop-filter: blur(6px);
    }

    body.theme-light.desktop-side-prototype .now-playing {
        border-color: rgba(47, 93, 150, .2);
    }

    body.theme-light.desktop-side-prototype .np-volume-track {
        background: rgba(47, 93, 150, .17);
    }
}
