/* =========================================
   LIQUID GLASS DESIGN SYSTEM
========================================= */

:root {
    --bg: #07060c;
    --bg-raise: #0d0a16;

    --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    --glass-strong: linear-gradient(160deg, rgba(var(--accent-rgb), 0.2), rgba(15, 12, 26, 0.85) 55%);
    --surface: rgba(255, 255, 255, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.09);

    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #f5f3fa;
    --text-dim: #a49fb8;
    --text-faint: #6e687f;

    --accent: #8b5cf6;
    --accent-soft: #a78bfa;
    --accent-2: #d946ef;
    --gradient: linear-gradient(135deg, #8b5cf6, #c026d3 55%, #d946ef);
    --glow: 0 10px 40px -6px rgba(var(--accent-rgb), 0.55);

    --accent-rgb: 139, 92, 246;
    --accent-soft-rgb: 167, 139, 250;
    --accent-2-rgb: 217, 70, 239;
    --gradient-2: linear-gradient(90deg, #a78bfa, #e879f9);

    --danger: #fb7185;

    --radius: 18px;
    --spring: cubic-bezier(0.34, 1.4, 0.44, 1);
    --ease-out: cubic-bezier(0.22, 0.9, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
}

/* резервируем место под скроллбар: ширина таб-бара не «прыгает»
   при переходе между вкладками разной высоты */
html,
body {
    scrollbar-gutter: stable;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: contain;
    overflow-x: hidden;
    /* скроллбар всегда присутствует — ширина таб-бара и пузырька
       не меняется при переходе между вкладками разной высоты */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
}

input {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

.ic {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

::selection {
    background: rgba(var(--accent-rgb), 0.45);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
    background-clip: padding-box;
}

:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
    border-radius: 12px;
}


/* =========================================
   BACKGROUND SCENE (aurora + grain)
========================================= */

.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(120% 70% at 50% -20%, var(--bg-top, #12101f) 0%, var(--bg) 60%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.orb.o1 {
    width: 85vmin;
    height: 85vmin;
    top: -28vmin;
    right: -20vmin;
    background: radial-gradient(closest-side, var(--orb-1, rgba(var(--accent-rgb), 0.5)), transparent 72%);
    animation: drift-1 34s ease-in-out infinite alternate;
}

.orb.o2 {
    width: 75vmin;
    height: 75vmin;
    bottom: -26vmin;
    left: -22vmin;
    background: radial-gradient(closest-side, var(--orb-2, rgba(var(--accent-2-rgb), 0.34)), transparent 72%);
    animation: drift-2 40s ease-in-out infinite alternate;
}

.orb.o3 {
    width: 52vmin;
    height: 52vmin;
    top: 34%;
    left: -30vmin;
    background: radial-gradient(closest-side, var(--orb-3, rgba(76, 61, 205, 0.42)), transparent 72%);
    animation: drift-3 46s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-9vmin, 7vmin, 0) scale(1.15); }
}

@keyframes drift-2 {
    from { transform: translate3d(0, 0, 0) scale(1.1); }
    to   { transform: translate3d(11vmin, -8vmin, 0) scale(0.94); }
}

@keyframes drift-3 {
    from { transform: translate3d(0, 0, 0) scale(0.95); }
    to   { transform: translate3d(13vmin, 9vmin, 0) scale(1.12); }
}

.grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* =========================================
   LAYOUT
========================================= */

.app {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding:
        calc(env(safe-area-inset-top, 0px) + 16px)
        18px
        calc(env(safe-area-inset-bottom, 0px) + 168px);
}

body.has-player .app {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 250px);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.hello {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 5px;
    animation: fade-down 0.45s var(--ease-out) both;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fade-down 0.5s var(--ease-out) 0.06s both;
}

.header h1 {
    font-size: clamp(26px, 7vw, 31px);
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 24px rgba(var(--accent-rgb), 0.35));
    animation: fade-down 0.5s var(--ease-out) 0.04s both;
}

.ver {
    display: inline-block;
    vertical-align: 4px;
    margin-left: 9px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-soft-rgb), 0.35);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.18), rgba(255, 255, 255, 0.04));
    color: var(--accent-soft);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.5px;
    line-height: 1.4;
    -webkit-text-fill-color: initial;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 18px -6px rgba(var(--accent-rgb), 0.45);
}

.ver:empty {
    display: none;
}

@keyframes fade-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.35);
    color: var(--text-dim);
    transition: transform 0.25s var(--spring), color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:active {
    transform: scale(0.88);
    color: var(--text);
}


/* =========================================
   SEARCH
======================================== */

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.search-ic {
    position: absolute;
    left: 16px;
    width: 19px;
    height: 19px;
    color: var(--text-faint);
    pointer-events: none;
    transition: color 0.15s ease;
}

.search-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 46px;
    border-radius: 17px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -8px 20px rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrap input::placeholder {
    color: var(--text-faint);
}

.search-wrap input:focus {
    border-color: rgba(var(--accent-soft-rgb), 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 4px rgba(var(--accent-rgb), 0.16),
        0 12px 36px -10px rgba(var(--accent-rgb), 0.35);
}

.search-wrap input:focus ~ .search-ic,
.search-wrap:focus-within .search-ic {
    color: var(--accent-soft);
}

.search-clear {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-dim);
    transition: color 0.15s ease, transform 0.2s var(--spring);
}

.search-clear:active {
    transform: scale(0.85);
    color: var(--text);
}

.search-clear .ic {
    width: 15px;
    height: 15px;
}


/* =========================================
   BANNER
========================================= */

.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(251, 113, 133, 0.13), rgba(251, 113, 133, 0.05));
    border: 1px solid rgba(251, 113, 133, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 13.5px;
    line-height: 1.45;
    color: #fecdd3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.banner button {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 11px;
    background: rgba(251, 113, 133, 0.16);
    color: #fecdd3;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s var(--spring), background 0.15s ease;
}

.banner button:active {
    transform: scale(0.94);
    background: rgba(251, 113, 133, 0.26);
}

.banner button .ic {
    width: 15px;
    height: 15px;
}


/* =========================================
   SECTION HEAD
========================================= */

.section-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.section-head h2 {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.4px;
}

.count-badge {
    min-width: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-align: center;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.25s var(--spring);
}

.count-badge:not(:empty) {
    animation: badge-pop 0.35s var(--spring);
}

@keyframes badge-pop {
    0% { transform: scale(0.7); opacity: 0.4; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}


/* =========================================
   SKELETON
========================================= */

.sk {
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0.04) 30%,
        rgba(var(--accent-soft-rgb), 0.13) 48%,
        rgba(255, 255, 255, 0.04) 62%
    );
    background-size: 300% 100%;
    animation: shimmer 1.6s ease infinite;
    border-radius: 9px;
}

@keyframes shimmer {
    0% { background-position: 110% 50%; }
    100% { background-position: -10% 50%; }
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 9px 0;
}

.sk-cover {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.sk-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sk-line {
    height: 12px;
}

.w70 { width: 70%; }
.w55 { width: 55%; }
.w75 { width: 75%; }
.w60 { width: 60%; }
.w45 { width: 45%; }
.w65 { width: 65%; }
.w40 { width: 40%; }
.w50 { width: 50%; }


.track-handle {
    width: 28px;
    height: 44px;
    flex-shrink: 0;
    margin-left: -4px;
    margin-right: -4px;
    display: grid;
    place-items: center;
    color: var(--text-faint);
    touch-action: none;
    cursor: grab;
    border-radius: 10px;
    transition: color 0.15s ease, background 0.15s ease;
}

.track-handle .ic {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.track-handle:active {
    cursor: grabbing;
    color: var(--accent-soft);
    background: rgba(var(--accent-rgb), 0.12);
}

.track-list.reorderable .track,
#trackList.reorderable .track {
    padding-left: 4px;
}

.track.dragging {
    opacity: 0.55;
    z-index: 40;
}

.track.drag-float {
    position: fixed;
    z-index: 80;
    opacity: 0.97;
    pointer-events: none;
    margin: 0;
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(var(--accent-soft-rgb), 0.4);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.22), rgba(15, 12, 26, 0.94));
    border-color: rgba(var(--accent-soft-rgb), 0.4);
}

.track-placeholder {
    border-radius: var(--radius);
    border: 1.5px dashed rgba(var(--accent-soft-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.08);
    margin: 2px 0;
}

body.is-dragging {
    user-select: none;
    cursor: grabbing;
}

body.is-dragging .fab {
    pointer-events: none;
    opacity: 0.35;
}

.chip.drag-over {
    transform: scale(1.06);
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.28), 0 8px 24px rgba(var(--accent-rgb), 0.35);
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-2-rgb), 0.55));
    color: #fff;
}

/* =========================================
   TRACK LIST
========================================= */

.track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.25s var(--spring), box-shadow 0.22s ease;
    user-select: none;
}

.track-in {
    animation: track-in 0.42s var(--spring) both;
    animation-delay: calc(var(--i, 0) * 28ms);
}

@keyframes track-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.track:active {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(0.985);
}

.track.playing {
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-2-rgb), 0.07));
    border-color: rgba(var(--accent-soft-rgb), 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 3px 0 0 0 var(--accent-soft),
        0 8px 28px -12px rgba(var(--accent-rgb), 0.35);
}

.track.playing .t-cover {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 0 0 2px rgba(var(--accent-rgb), 0.35),
        0 8px 22px rgba(var(--accent-rgb), 0.28);
}

.t-cover {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 15px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.t-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: cover-fade 0.35s ease both;
}

@keyframes cover-fade {
    from { opacity: 0; transform: scale(1.06); }
    to   { opacity: 1; transform: scale(1); }
}

.t-cover .ic {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.g0 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.g1 { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.g2 { background: linear-gradient(135deg, #db2777, #ea580c); }
.g3 { background: linear-gradient(135deg, #059669, #2563eb); }
.g4 { background: linear-gradient(135deg, #d97706, #dc2626); }
.g5 { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }

.t-meta {
    flex: 1;
    min-width: 0;
}

.t-title {
    font-size: 15px;
    font-weight: 640;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.t-artist {
    display: flex;
    align-items: center;
    min-width: 0;
    font-size: 13px;
    color: var(--text-dim);
}

.t-artist-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.track.playing .t-title {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.play-indicator {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    background: rgba(7, 6, 12, 0.45);
}

.eq {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 16px;
    filter: drop-shadow(0 0 6px rgba(var(--accent-2-rgb), 0.7));
}

.eq i {
    width: 3px;
    border-radius: 2px;
    background: var(--accent-2);
    animation: eq-bounce 0.9s ease-in-out infinite;
}

.eq i:nth-child(1) { height: 55%; animation-delay: 0s; }
.eq i:nth-child(2) { height: 100%; animation-delay: 0.25s; }
.eq i:nth-child(3) { height: 70%; animation-delay: 0.5s; }

.eq.paused i {
    animation-play-state: paused;
    opacity: 0.45;
}

@keyframes eq-bounce {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}


/* =========================================
   EMPTY STATE
========================================= */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 46px 24px 30px;
    gap: 8px;
}

.empty-art {
    width: 88px;
    height: 88px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 44px rgba(0, 0, 0, 0.4);
    color: var(--accent-soft);
    margin-bottom: 14px;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.empty-art .ic {
    width: 38px;
    height: 38px;
}

.empty strong {
    font-size: 17px;
    font-weight: 700;
}

.empty p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 280px;
    margin-bottom: 14px;
}


/* =========================================
   BUTTONS
========================================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 22px;
    border-radius: 16px;
    background: var(--gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), var(--glow);
    transition: transform 0.25s var(--spring), box-shadow 0.2s ease, filter 0.15s ease;
}

.btn-primary:active {
    transform: scale(0.96);
    filter: brightness(1.12);
}

.btn-primary:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-primary .ic {
    width: 18px;
    height: 18px;
}

.btn-primary.wide {
    width: 100%;
    margin-bottom: 10px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 47px;
    border-radius: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 14.5px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, transform 0.2s var(--spring);
}

.btn-ghost:active {
    background: var(--surface-strong);
    color: var(--text);
    transform: scale(0.97);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 50px;
    border-radius: 15px;
    background: linear-gradient(160deg, rgba(251, 113, 133, 0.18), rgba(251, 113, 133, 0.08));
    border: 1px solid rgba(251, 113, 133, 0.32);
    color: var(--danger);
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s var(--spring), filter 0.15s ease;
}

.btn-danger:active {
    transform: scale(0.96);
    filter: brightness(1.2);
}

.btn-danger .ic {
    width: 17px;
    height: 17px;
}


/* =========================================
   FAB
========================================= */

.fab {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
    z-index: 60;
    width: 58px;
    height: 58px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    background: var(--gradient);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 14px 40px rgba(var(--accent-rgb), 0.5),
        0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s var(--spring), bottom 0.3s var(--ease-out), filter 0.15s ease;
    animation: fab-pulse 3.2s ease-in-out infinite;
}

@keyframes fab-pulse {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 40px rgba(var(--accent-rgb), 0.5), 0 4px 14px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 48px rgba(var(--accent-rgb), 0.62), 0 0 0 10px rgba(var(--accent-rgb), 0.08); }
}

.fab:active {
    transform: scale(0.9) rotate(90deg);
    filter: brightness(1.15);
    animation: none;
}

body.has-player .fab {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 168px);
}

/* mini-player sits above tab-bar; tab-bar stays pinned to bottom */


/* =========================================
   MINI PLAYER (liquid glass bar)
========================================= */

.mini-player {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
    z-index: 56;
    width: min(calc(100% - 28px), 492px);
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass-strong);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 3px 44px rgba(var(--accent-rgb), 0.07);
    animation: rise-up 0.32s var(--spring);
}

@keyframes rise-up {
    from { transform: translate(-50%, 28px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.mini-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
}

.mini-progress i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--gradient-2);
    box-shadow: 0 1px 5px rgba(var(--accent-2-rgb), 0.35);
    transition: width 0.25s linear;
}

.mini-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 10px;
}

.mini-cover {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s var(--spring);
}

body.is-playing .mini-cover {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 0 0 2px rgba(var(--accent-rgb), 0.4),
        0 0 18px rgba(var(--accent-2-rgb), 0.35);
    animation: mini-cover-breathe 2.8s ease-in-out infinite;
}

@keyframes mini-cover-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.mini-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-cover .ic {
    width: 21px;
    height: 21px;
}

.mini-meta {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.mini-title {
    font-size: 14.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.mini-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #14101f;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.18);
    transition: transform 0.25s var(--spring);
}

.mini-btn:active {
    transform: scale(0.86);
}

.mini-btn.dim {
    width: 38px;
    height: 38px;
    background: transparent;
    color: var(--text-dim);
    box-shadow: none;
}

.mini-btn.dim:active {
    color: var(--text);
}

.mini-btn .ic {
    width: 20px;
    height: 20px;
}


.fp-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-lyrics {
    position: relative;
    z-index: 2;
    margin: 0 0 12px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    animation: fade-down 0.35s var(--ease-out);
}

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

/* When lyrics open — shrink cover so close button stays reachable */
.full-player.lyrics-open .fp-cover-area {
    flex: 0 0 auto;
    padding: 4px 0 8px;
    min-height: 0;
}

.full-player.lyrics-open .fp-cover {
    width: min(28vw, 110px);
    border-radius: 16px;
}

.full-player.lyrics-open .fp-aura {
    width: min(42vw, 160px);
    opacity: 0.35;
}

.full-player.lyrics-open .fp-meta {
    margin-bottom: 10px;
}

.full-player.lyrics-open .fp-names h2 {
    font-size: 17px;
}

/* When EQ open — cover shrinks so sliders fit on short screens */
.full-player.eq-open .fp-cover-area {
    flex: 0 0 auto;
    padding: 2px 0 6px;
    min-height: 0;
}

.full-player.eq-open .fp-cover {
    width: min(26vw, 96px);
    border-radius: 14px;
}

.full-player.eq-open .fp-aura {
    width: min(38vw, 140px);
    opacity: 0.3;
}

.full-player.eq-open .fp-meta {
    margin-bottom: 8px;
}

.full-player.eq-open .fp-volume {
    margin-top: 8px;
}

.full-player.eq-open .eq-slider {
    height: 84px;
}

.full-player.eq-open + .fp-seek,
.full-player.eq-open .fp-seek {
    margin-bottom: 4px;
}

.fp-lyrics-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-faint);
}

.fp-lyrics-head button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-dim);
}

.fp-lyrics-head .ic {
    width: 15px;
    height: 15px;
}

.fp-lyrics-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px 12px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
    white-space: normal;
    overflow-anchor: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.fp-lyrics-body::-webkit-scrollbar { width: 4px; }

.fp-lyrics-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}

.fp-lyrics-src {
    padding: 0 16px 12px;
    font-size: 11px;
    color: var(--text-faint);
}

.icon-btn.active {
    color: var(--accent-soft);
    border-color: rgba(var(--accent-soft-rgb), 0.45);
    box-shadow: 0 0 16px -4px rgba(var(--accent-rgb), 0.45);
}

.seg-btn {
    min-width: 0;
    font-size: 12.5px;
    padding: 0 6px;
}

/* =========================================
   FULL PLAYER
========================================= */

.full-player {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding:
        calc(env(safe-area-inset-top, 0px) + 14px)
        26px
        calc(env(safe-area-inset-bottom, 0px) + 22px);
    background: linear-gradient(180deg, rgba(18, 13, 30, 0.82), rgba(8, 6, 14, 0.93));
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
    transform: translateY(105%);
    transition: transform 0.42s cubic-bezier(0.32, 0.72, 0.22, 1);
    visibility: hidden;
    overflow: hidden;
    overflow-y: auto;
}

.full-player.open {
    transform: translateY(0);
    visibility: visible;
}

.fp-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(64% 38% at 50% -2%, rgba(var(--accent-rgb), 0.25), transparent 65%),
        radial-gradient(50% 30% at 82% 104%, rgba(var(--accent-2-rgb), 0.12), transparent 65%);
    transition: background 0.6s ease;
}

.fp-top {
    position: relative;
    z-index: 20;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fp-top .icon-btn {
    position: relative;
    z-index: 21;
    pointer-events: auto;
}

.icon-btn.dark {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.fp-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--text-faint);
}

.fp-top .icon-btn.muted {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.45);
    filter: drop-shadow(0 0 8px rgba(251, 113, 133, 0.45));
}

.fp-cover-area {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 16px 0;
}

.fp-aura {
    position: absolute;
    width: min(92vw, 430px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.5), rgba(var(--accent-2-rgb), 0.2) 46%, transparent 70%);
    opacity: 0.4;
    transition: opacity 0.6s ease, background 0.6s ease;
    animation: aura-breathe 6s ease-in-out infinite;
}

body.is-playing .fp-aura {
    opacity: 0.85;
    animation-duration: 3.6s;
}

@keyframes aura-breathe {
    0%, 100% { transform: scale(0.92); }
    50% { transform: scale(1.05); }
}

.fp-cover {
    position: relative;
    z-index: 1;
    width: min(70vw, 320px);
    aspect-ratio: 1;
    max-height: 100%;
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.85);
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.35s var(--spring), box-shadow 0.4s ease;
    cursor: pointer;
}

body.is-playing .fp-cover {
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 60px -8px rgba(var(--accent-rgb), 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fp-cover:active {
    transform: scale(0.96);
}

.fp-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-cover .ic {
    width: 76px;
    height: 76px;
}

.full-player.open .fp-cover {
    animation: cover-in 0.5s var(--spring);
}

@keyframes cover-in {
    from { transform: scale(0.84) translateY(12px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.fp-meta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.fp-names {
    flex: 1;
    min-width: 0;
}

.fp-names h2 {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-names p {
    font-size: 14.5px;
    color: var(--text-dim);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-seek {
    position: relative;
    margin-bottom: 8px;
}

.seek-track {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.seek-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.seek-fill {
    position: absolute;
    left: 0;
    height: 5px;
    width: 0%;
    border-radius: 5px;
    background: var(--gradient-2);
    box-shadow: 0 0 14px rgba(var(--accent-2-rgb), 0.55);
}

.seek-knob {
    position: absolute;
    left: 0%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%) scale(0);
    transition: transform 0.18s var(--spring);
    box-shadow:
        0 0 0 5px rgba(var(--accent-2-rgb), 0.18),
        0 3px 10px rgba(0, 0, 0, 0.5);
}

.seek-track.dragging .seek-knob,
.seek-track:active .seek-knob {
    transform: translateX(-50%) scale(1.12);
}

.times {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--text-faint);
}

.fp-controls {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px 0;
}

.ctrl {
    display: grid;
    place-items: center;
    position: relative;
    color: var(--text);
    transition: transform 0.22s var(--spring), color 0.15s ease;
}

.ctrl:active {
    transform: scale(0.86);
}

.ctrl.side {
    width: 44px;
    height: 44px;
    color: var(--text-dim);
}

.ctrl.side.active {
    color: var(--accent-soft);
    filter: drop-shadow(0 0 10px rgba(var(--accent-2-rgb), 0.65));
}

.ctrl.big-dim {
    width: 52px;
    height: 52px;
}

.ctrl.big-dim .ic {
    width: 30px;
    height: 30px;
}

.ctrl.play {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    color: #14101f;
    box-shadow:
        inset 0 -2px 6px rgba(0, 0, 0, 0.08),
        0 16px 40px rgba(255, 255, 255, 0.2);
}

body.is-playing .ctrl.play {
    animation: play-pulse 2.6s ease-in-out infinite;
}

@keyframes play-pulse {
    0%, 100% { box-shadow: 0 16px 40px rgba(255, 255, 255, 0.2), 0 0 0 0 rgba(var(--accent-2-rgb), 0.35); }
    50% { box-shadow: 0 16px 44px rgba(255, 255, 255, 0.26), 0 0 0 14px rgba(var(--accent-2-rgb), 0); }
}

.ctrl.play .ic {
    width: 28px;
    height: 28px;
}

.repeat-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-2);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(var(--accent-2-rgb), 0.7);
}

.fp-volume {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.vol-track {
    position: relative;
    flex: 1;
    height: 26px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.vol-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 4.5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.vol-fill {
    position: absolute;
    left: 0;
    height: 4.5px;
    width: 100%;
    border-radius: 5px;
    background: var(--gradient-2);
    box-shadow: 0 0 12px rgba(var(--accent-2-rgb), 0.45);
}

.vol-knob {
    position: absolute;
    left: 100%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%) scale(0);
    transition: transform 0.18s var(--spring);
    box-shadow:
        0 0 0 4px rgba(var(--accent-2-rgb), 0.16),
        0 3px 10px rgba(0, 0, 0, 0.5);
}

.vol-track.dragging .vol-knob,
.vol-track:active .vol-knob {
    transform: translateX(-50%) scale(1.12);
}

.fp-bottom {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pill-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13.5px;
    font-weight: 600;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.2s var(--spring);
}

.pill-danger .ic {
    width: 16px;
    height: 16px;
}

.pill-danger:active {
    transform: scale(0.95);
    color: var(--danger);
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.3);
}


/* =========================================
   COVER ZOOM (Spotify-like art viewer)
========================================= */

.cover-zoom {
    position: fixed;
    inset: 0;
    z-index: 260;
    background: rgba(5, 3, 10, 0.82);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cover-zoom.open {
    opacity: 1;
    visibility: visible;
}

.cover-zoom-close {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
    right: calc(env(safe-area-inset-right, 0px) + 14px) !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 270;
    width: 44px;
    height: 44px;
    margin: 0;
    display: grid;
    place-items: center;
    background: rgba(20, 16, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #fff;
}

.cover-zoom-close .ic {
    width: 22px;
    height: 22px;
}

.cover-zoom-stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    perspective: 900px;
    perspective-origin: 50% 45%;
}

.cover-zoom-cover {
    width: min(86vw, 400px);
    aspect-ratio: 1;
    border-radius: 28px;
    overflow: hidden;
    background: #160d24;
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.65),
        0 12px 34px rgba(var(--accent-2-rgb), 0.22);
    transform-style: preserve-3d;
    will-change: transform;
    cursor: grab;
    touch-action: none;
    transition: transform 0.22s var(--spring);
}

.cover-zoom.open .cover-zoom-cover {
    animation: cover-zoom-in 0.5s var(--spring);
}

.cover-zoom-cover:active {
    cursor: grabbing;
}

.cover-zoom-cover .ic {
    width: 38%;
    height: 38%;
    color: rgba(255, 255, 255, 0.8);
}

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

.cover-zoom-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.42);
}

@keyframes cover-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.72) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* =========================================
   SHEETS
========================================= */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(4, 3, 8, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

.sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 105%);
    width: min(100%, 520px);
    max-height: 86vh;
    overflow-y: auto;
    padding:
        10px 20px
        calc(env(safe-area-inset-bottom, 0px) + 20px);
    border-radius: 28px 28px 0 0;
    background: var(--glass-strong);
    border: 1px solid var(--border-strong);
    border-bottom: none;
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 -24px 70px rgba(0, 0, 0, 0.55);
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0.22, 1);
}

.overlay.open .sheet.active {
    transform: translate(-50%, 0);
}

#downloadSheet {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* одна форма для всех режимов: список результатов скроллится внутри */
    height: min(86vh, 520px);
}

/* в шторке «+» скроллится только список результатов,
   кнопки и подсказки остаются на месте */
#downloadSheet > .download-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#downloadSheet > .download-body > div {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#downloadSheet #searchSection {
    flex: 1 1 auto;
    min-height: 0;
}

#downloadSheet .search-results {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 4px;
}

/* кнопки и поля не должны сжиматься, когда появляется список результатов */
#downloadSheet .btn-primary,
#downloadSheet .url-row,
#downloadSheet .url-row input,
#downloadSheet .sheet-hint {
    flex: 0 0 auto;
}

#downloadSheet .btn-primary {
    height: 50px;
    min-height: 50px;
}

#downloadSheet > #closeSheetBtn {
    margin-top: auto;
    flex: 0 0 auto;
}

.grabber {
    width: 40px;
    height: 4.5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.16);
    margin: 4px auto 18px;
}

.sheet h3 {
    font-size: 19px;
    font-weight: 750;
    margin-bottom: 6px;
}

.sheet-hint {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.url-row input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -8px 18px rgba(0, 0, 0, 0.18);
    color: var(--text);
    font-size: 14.5px;
    outline: none;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-row input:focus {
    border-color: rgba(var(--accent-soft-rgb), 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 4px rgba(var(--accent-rgb), 0.16);
}

.url-row input::placeholder {
    color: var(--text-faint);
}

.job-box {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.job-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13.5px;
}

.job-stage {
    color: var(--text-dim);
}

.job-percent {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.job-bar {
    position: relative;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.job-bar i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--gradient);
    box-shadow: 0 0 14px rgba(var(--accent-2-rgb), 0.55);
    transition: width 0.4s ease;
}

.job-bar i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    background-size: 220% 100%;
    animation: shimmer 1.4s ease infinite;
}

.job-error {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--danger);
}

.confirm-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.confirm-row .btn-ghost {
    flex: 1;
    height: 50px;
}

.help-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.help-item {
    display: flex;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-dim);
}

.help-item b {
    color: var(--accent-soft);
}


/* =========================================
   TOASTS
========================================= */

#toastWrap {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 40px);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    background: linear-gradient(160deg, rgba(46, 40, 68, 0.92), rgba(24, 20, 38, 0.94));
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 14px 36px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 550;
    animation: toast-in 0.35s var(--spring), toast-out 0.3s ease 2.3s forwards;
}

.toast.error {
    border-color: rgba(251, 113, 133, 0.4);
    color: #fecdd3;
}

.toast.success {
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

@keyframes toast-in {
    from { transform: translateY(16px) scale(0.94); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toast-out {
    to { transform: translateY(10px); opacity: 0; }
}


/* =========================================
   DESKTOP / POINTER DEVICES
========================================= */

@media (hover: hover) and (pointer: fine) {

    .track:hover {
        background: rgba(255, 255, 255, 0.045);
        border-color: var(--border);
        transform: translateY(-1px);
    }

    .track.playing:hover {
        background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-2-rgb), 0.08));
    }

    .btn-primary:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: scale(0.97);
    }

    .fab:hover {
        filter: brightness(1.12);
        transform: translateY(-2px);
    }

    .icon-btn:hover {
        color: var(--text);
        border-color: var(--border-strong);
    }

    .ctrl.side:hover,
    .mini-btn.dim:hover,
    .pill-danger:hover,
    .banner button:hover,
    .btn-ghost:hover {
        color: var(--text);
    }

    .pill-danger:hover {
        border-color: rgba(251, 113, 133, 0.3);
    }

    .mini-player:hover {
        border-color: rgba(255, 255, 255, 0.22);
    }

    .seek-knob,
    .vol-knob {
        transform: translateX(-50%) scale(0.9);
    }
}


/* =========================================
   WIDE SCREENS
========================================= */

@media (min-width: 720px) {

    .app {
        max-width: 600px;
        padding-top: calc(env(safe-area-inset-top, 0px) + 34px);
    }

    .full-player {
        padding-left: 40px;
        padding-right: 40px;
    }

    .fp-cover-area {
        padding: 26px 0;
    }

    .fp-cover {
        width: min(46vh, 340px);
    }

    .fp-aura {
        width: min(56vh, 460px);
    }

    /* Sheets become centered floating cards */
    .sheet {
        bottom: auto;
        top: 50%;
        width: min(480px, calc(100% - 48px));
        max-height: min(80vh, 640px);
        border-radius: 28px;
        border-bottom: 1px solid var(--border-strong);
        padding-bottom: 24px;
        transform: translate(-50%, calc(-50% + 26px)) scale(0.96);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.34s cubic-bezier(0.32, 0.72, 0.22, 1), opacity 0.25s ease, visibility 0.25s;
    }

    .overlay.open .sheet.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
    }

    #toastWrap {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
    }
}


/* =========================================
   SMALL SCREENS
========================================= */

@media (max-width: 360px) {
    .app {
        padding-left: 14px;
        padding-right: 14px;
    }

    .header h1 {
        font-size: 25px;
    }

    .full-player {
        padding-left: 18px;
        padding-right: 18px;
    }

    .fp-controls {
        gap: 2px;
    }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .orb,
    .empty-art,
    .fp-aura,
    .fab,
    .track-in,
    .mini-cover,
    body.is-playing .mini-cover,
    body.is-playing .ctrl.play {
        animation: none !important;
    }
}


/* =========================================
   PLAYLIST BAR
========================================= */

.pl-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 10px 16px;
    margin: -8px 0 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pl-bar::-webkit-scrollbar {
    display: none;
}

.pl-bar::after {
    content: "";
    position: absolute;
    left: 0;
    top: var(--pl-y, 12px);
    width: var(--pl-w, 0px);
    height: var(--pl-h, 34px);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.92), rgba(var(--accent-2-rgb), 0.92));
    box-shadow: 0 3px 12px -2px rgba(var(--accent-rgb), 0.5);
    transform: translateX(var(--pl-x, 0px));
    opacity: var(--pl-opacity, 0);
    transition:
        transform 0.42s var(--spring-snap),
        width 0.42s var(--spring-snap),
        top 0.2s var(--ease-out),
        height 0.2s var(--ease-out),
        opacity 0.2s var(--ease-out);
    pointer-events: none;
    z-index: 0;
    will-change: transform, width;
}

.pl-bar.no-indicator-transition::after {
    transition: none;
}

.chip {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--spring), box-shadow 0.25s ease;
}

.chip .count {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.75;
}

.chip:active {
    transform: scale(0.95);
}

.chip.active {
    background: transparent;
    border-color: transparent;
    color: #fff;
    box-shadow: none;
}

@keyframes chip-pop {
    0% { transform: scale(0.92); }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.chip-add {
    width: 34px;
    padding: 0;
    justify-content: center;
    color: var(--accent-soft);
}

.chip-add .ic {
    width: 15px;
    height: 15px;
}


/* =========================================
   TRACK PLAYLIST BUTTON
========================================= */

.track-pl-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-left: 2px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--text-faint);
    transition: color 0.15s ease, background 0.15s ease, transform 0.2s var(--spring);
}

.track-pl-btn .ic {
    width: 17px;
    height: 17px;
}

.track-pl-btn:active {
    transform: scale(0.9);
    color: var(--accent-soft);
    background: rgba(var(--accent-rgb), 0.12);
}


/* =========================================
   SEGMENTED CONTROL
========================================= */

.seg {
    position: relative;
    display: flex;
    padding: 4px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.seg-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.5), rgba(var(--accent-2-rgb), 0.34));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 6px 18px rgba(var(--accent-2-rgb), 0.28);
    transform: translateX(0);
    transition:
        transform 0.36s var(--spring-snap),
        width 0.36s var(--spring-snap);
    pointer-events: none;
    z-index: 0;
    will-change: transform, width;
}

.seg-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    height: 38px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text-dim);
    transition: background 0.18s ease, color 0.18s ease;
}

.seg-btn.active {
    background: transparent;
    color: #fff;
    box-shadow: none;
}


/* =========================================
   SEARCH RESULTS
========================================= */

.search-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 14px 0 4px;
    max-height: 46vh;
    overflow-y: auto;
}

.sr-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px;
    border-radius: 14px;
    text-align: left;
    transition: background 0.15s ease;
}

.sr-row:active {
    background: rgba(255, 255, 255, 0.06);
}

.sr-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.sr-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sr-meta b {
    font-size: 14px;
    font-weight: 640;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-sub {
    font-size: 12.5px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-add {
    color: var(--accent-soft);
}

.search-loading,
.search-empty,
.search-error {
    padding: 22px 10px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-dim);
}

.search-error {
    color: var(--danger);
}


/* =========================================
   PLAYLIST SHEET
========================================= */

.pl-create {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.pl-create input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pl-create input:focus {
    border-color: rgba(var(--accent-soft-rgb), 0.6);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16);
}

.pl-create input::placeholder {
    color: var(--text-faint);
}

.pl-create-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    flex-shrink: 0;
}

.pl-create-btn .ic {
    width: 18px;
    height: 18px;
    margin: auto;
}

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    max-height: 40vh;
    overflow-y: auto;
}

.pl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 6px 10px 12px;
    border-radius: 14px;
    transition: background 0.15s ease;
}

.pl-row:active {
    background: rgba(255, 255, 255, 0.05);
}

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

.pl-info b {
    display: block;
    font-size: 14.5px;
    font-weight: 640;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-info span {
    display: block;
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 2px;
}

.pl-action {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--text-faint);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    transition: color 0.15s ease, transform 0.2s var(--spring), border-color 0.15s ease;
}

.pl-action .ic {
    width: 16px;
    height: 16px;
}

.pl-action:active {
    transform: scale(0.9);
}

.pl-action.on {
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.4);
}

.pl-action.danger:active {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.4);
}

.pl-empty {
    padding: 24px 10px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-faint);
}


/* =========================================
   CUSTOMIZATION (accent, wallpaper, animations)
========================================= */

body.no-aurora .bg-scene {
    display: none;
}

#resetThemeBtn {
    margin-bottom: 10px;
}

#closeCustomBtn {
    margin-top: 10px;
}

#resetThemeBtn {
    margin-top: 16px;
}

body.no-anim *,
body.no-anim *::before,
body.no-anim *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
}

.set-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 18px 0 10px;
}

.set-label:first-of-type {
    margin-top: 2px;
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swatch {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s var(--spring), border-color 0.15s ease, box-shadow 0.2s ease;
}

.swatch:active {
    transform: scale(0.9);
}

.swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.swatch.active::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
        center / 16px 16px no-repeat;
}

.swatch-custom input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border-radius: 50%;
}

.wp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wp-chip {
    padding: 9px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dim);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.2s var(--spring), border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}

.wp-chip:active {
    transform: scale(0.94);
}

.wp-chip.active {
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 139, 92, 246), 0.22);
    background: rgba(var(--accent-rgb, 139, 92, 246), 0.14);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.toggle-row:last-of-type {
    border-bottom: none;
}

.toggle-name {
    font-size: 14.5px;
    font-weight: 600;
}

.switch {
    position: relative;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.switch i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s var(--spring);
}

.switch.on {
    background: var(--accent);
    border-color: var(--accent);
}

.switch.on i {
    transform: translateX(20px);
}

.theme-row-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}


/* =========================================
   THEME EXTRAS (density / radius / glass)
========================================= */

body.no-grain .grain {
    display: none !important;
}

body.hide-fab .fab {
    display: none !important;
}

body.big-text {
    font-size: 17px;
}

body.big-text .t-title,
body.big-text .mini-title,
body.big-text .fp-names h2 {
    font-size: 1.08em;
}

body.big-text .t-artist,
body.big-text .mini-artist,
body.big-text .shelf-sub {
    font-size: 0.95em;
}

/* density */
body.density-cozy .track {
    padding: 12px 12px;
    gap: 15px;
}

body.density-cozy .t-cover {
    width: 64px;
    height: 64px;
}

body.density-cozy .shelf-card {
    flex-basis: 132px;
    width: 132px;
}

body.density-cozy .shelf-cover {
    width: 132px;
    height: 132px;
}

body.density-compact .track {
    padding: 5px 8px;
    gap: 10px;
}

body.density-compact .t-cover {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

body.density-compact .t-title {
    font-size: 14px;
    margin-bottom: 1px;
}

body.density-compact .t-artist {
    font-size: 12px;
}

body.density-compact .shelf-card {
    flex-basis: 100px;
    width: 100px;
}

body.density-compact .shelf-cover {
    width: 100px;
    height: 100px;
    border-radius: 14px;
}

body.density-compact .chip {
    height: 30px;
    padding: 0 11px;
    font-size: 12px;
}

/* radius */
body.radius-round {
    --radius: 24px;
}

body.radius-round .t-cover,
body.radius-round .mini-cover,
body.radius-round .shelf-cover,
body.radius-round .fp-cover,
body.radius-round .cover-zoom-cover {
    border-radius: 22px !important;
}

body.radius-round .chip,
body.radius-round .wp-chip,
body.radius-round .btn-primary,
body.radius-round .btn-ghost,
body.radius-round .search-wrap input,
body.radius-round .tab-bar,
body.radius-round .mini-player {
    border-radius: 999px;
}

body.radius-round .url-row input,
body.radius-round .pl-create input,
body.radius-round .btn-danger,
body.radius-round .select-bar-btn,
body.radius-round .pl-action,
body.radius-round .menu-row,
body.radius-round .track-pl-btn,
body.radius-round .track-handle,
body.radius-round .sub-status,
body.radius-round .sub-promo-row input {
    border-radius: 999px;
}

body.radius-round .icon-btn,
body.radius-round .ctrl.play,
body.radius-round .ctrl.side,
body.radius-round .ctrl.big-dim,
body.radius-round .pill-danger,
body.radius-round .fp-lyrics-head button,
body.radius-round .eq-preset,
body.radius-round .eq-btn {
    border-radius: 999px;
}

body.radius-round .tab-btn,
body.radius-round .tab-indicator {
    border-radius: 999px;
}

body.radius-round .seg,
body.radius-round .seg-btn,
body.radius-round .seg-indicator {
    border-radius: 999px;
}

body.radius-round .fab {
    border-radius: 50%;
}

body.radius-sharp {
    --radius: 10px;
}

body.radius-sharp .t-cover,
body.radius-sharp .mini-cover,
body.radius-sharp .shelf-cover,
body.radius-sharp .fp-cover,
body.radius-sharp .cover-zoom-cover {
    border-radius: 10px !important;
}

body.radius-sharp .chip,
body.radius-sharp .wp-chip,
body.radius-sharp .btn-primary,
body.radius-sharp .btn-ghost,
body.radius-sharp .search-wrap input,
body.radius-sharp .tab-bar,
body.radius-sharp .mini-player,
body.radius-sharp .tab-btn,
body.radius-sharp .fab,
body.radius-sharp .sheet {
    border-radius: 12px;
}

body.radius-sharp .url-row input,
body.radius-sharp .pl-create input,
body.radius-sharp .btn-danger,
body.radius-sharp .select-bar-btn,
body.radius-sharp .pl-action,
body.radius-sharp .menu-row,
body.radius-sharp .track-pl-btn,
body.radius-sharp .track-handle,
body.radius-sharp .sub-status,
body.radius-sharp .sub-promo-row input {
    border-radius: 12px;
}

body.radius-sharp .icon-btn,
body.radius-sharp .ctrl.play,
body.radius-sharp .ctrl.side,
body.radius-sharp .ctrl.big-dim,
body.radius-sharp .pill-danger,
body.radius-sharp .fp-lyrics-head button,
body.radius-sharp .eq-preset,
body.radius-sharp .eq-btn,
body.radius-sharp .fp-lyrics,
body.radius-sharp .fp-eq {
    border-radius: 12px;
}

body.radius-sharp .tab-indicator,
body.radius-sharp .pl-bar::after {
    border-radius: 12px;
}

body.radius-sharp .seg,
body.radius-sharp .seg-btn,
body.radius-sharp .seg-indicator {
    border-radius: 12px;
}

/* glass */
body.glass-strong .mini-player,
body.glass-strong .tab-bar,
body.glass-strong .sheet {
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.28), rgba(10, 8, 18, 0.92) 55%);
    border-color: rgba(255, 255, 255, 0.18);
}

body.glass-flat .mini-player,
body.glass-flat .tab-bar,
body.glass-flat .sheet {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 12, 22, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
}

body.glass-flat .icon-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#customSheet {
    max-height: min(88vh, 720px);
    overflow-y: auto;
}


/* =========================================
   SELECT MODE / UNDO / PWA
========================================= */

.select-toggle {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 650;
    transition: color 0.18s ease, background 0.18s ease, transform 0.2s var(--spring);
}

.select-toggle:active {
    transform: scale(0.94);
}

.select-toggle.on {
    color: var(--accent-soft);
    border-color: rgba(var(--accent-soft-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.14);
}

.shuffle-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-soft-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-soft);
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease,
        border-color 0.18s ease, transform 0.2s var(--spring);
}

.shuffle-play .ic {
    width: 14px;
    height: 14px;
}

.shuffle-play:active {
    transform: scale(0.94);
}

.shuffle-play[disabled] {
    opacity: 0.4;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
}

/* =========================================
   QUEUE TAB
   ========================================= */

.queue-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 6px;
}

.queue-head h2 {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.4px;
}

.queue-hint {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: var(--text-faint);
}

.select-bar {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
}

.select-bar.hidden {
    display: none;
}

.select-bar-btn {
    flex: 1;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 650;
    transition: transform 0.2s var(--spring), background 0.18s ease, color 0.18s ease;
}

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

.select-bar-btn.danger {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.3);
    background: rgba(251, 113, 133, 0.12);
}

.select-bar-btn.danger:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.select-bar-btn.ghost {
    flex: 0 0 auto;
    padding: 0 14px;
}

.track.selecting {
    padding-left: 6px;
}

.track-check {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 9px;
    border: 1.5px solid var(--border-strong);
    display: grid;
    place-items: center;
    color: transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.2s var(--spring);
}

.track-check .ic {
    width: 15px;
    height: 15px;
}

.track.selected .track-check {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(var(--accent-rgb), 0.6);
}

.track.selected {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-soft-rgb), 0.3);
}

.t-dur {
    flex: 0 0 auto;
    margin-left: 7px;
    padding-left: 7px;
    border-left: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.toast-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 8px;
}

.toast-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 9px;
    background: rgba(var(--accent-rgb), 0.24);
    border: 1px solid rgba(var(--accent-soft-rgb), 0.4);
    color: var(--accent-soft);
    font-size: 12.5px;
    font-weight: 700;
}

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

.btn-mini {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 11px;
    background: rgba(var(--accent-rgb), 0.18);
    border: 1px solid rgba(var(--accent-soft-rgb), 0.35);
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 650;
}

/* =========================================
   EQUALIZER
========================================= */

.fp-eq {
    position: relative;
    z-index: 2;
    margin: 0 0 12px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.12), rgba(0, 0, 0, 0.24));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    animation: fade-down 0.35s var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.fp-eq.hidden {
    display: none;
}

.eq-body {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px 10px 12px;
}

.eq-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.eq-db {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    min-height: 13px;
}

.eq-col.off .eq-db {
    color: var(--text-faint);
    opacity: 0.6;
}

.eq-hz {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-faint);
    text-transform: uppercase;
}

.eq-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 110px;
    background: transparent;
    outline: none;
    margin: 0;
    writing-mode: vertical-lr;
    direction: rtl;
    cursor: pointer;
}

.eq-slider::-webkit-slider-runnable-track {
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(
        180deg,
        rgba(var(--accent-rgb), 0.55),
        rgba(255, 255, 255, 0.08) 50%,
        rgba(var(--accent-2-rgb), 0.4)
    );
}

.eq-slider::-moz-range-track {
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(
        180deg,
        rgba(var(--accent-rgb), 0.55),
        rgba(255, 255, 255, 0.08) 50%,
        rgba(var(--accent-2-rgb), 0.4)
    );
}

.eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-left: -6px;
    border-radius: 50%;
    background: var(--gradient);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.6);
}

.eq-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.6);
}

.fp-eq.off .eq-slider::-webkit-slider-thumb {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.fp-eq.off .eq-slider::-moz-range-thumb {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.eq-presets {
    display: flex;
    gap: 6px;
    padding: 0 10px 8px;
    flex-wrap: wrap;
}

.eq-preset {
    flex: 1 1 auto;
    min-width: 62px;
    height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 650;
    transition: background 0.18s ease, color 0.18s ease, transform 0.2s var(--spring), border-color 0.18s ease;
}

.eq-preset.active {
    color: #fff;
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 4px 14px -4px rgba(var(--accent-rgb), 0.6);
}

.eq-preset:active {
    transform: scale(0.95);
}

.eq-foot {
    display: flex;
    gap: 8px;
    padding: 0 10px 12px;
}

.eq-btn {
    flex: 1;
    height: 36px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, transform 0.2s var(--spring);
}

.eq-btn:active {
    transform: scale(0.96);
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--text);
}

.eq-btn.on {
    color: var(--accent-soft);
    border-color: rgba(var(--accent-soft-rgb), 0.4);
}

/* =========================================
   SUBSCRIPTION
========================================= */

.sub-badge {
    background: var(--danger);
    box-shadow: 0 4px 12px rgba(251, 113, 133, 0.5);
}

.sub-badge::after {
    content: "!";
}

.sub-status {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    font-size: 14.5px;
    line-height: 1.55;
    margin-bottom: 12px;
}

.sub-promo-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.sub-promo-row input {
    flex: 1;
    min-width: 0;
    height: 47px;
    padding: 0 14px;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 15px;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sub-promo-row input:focus {
    border-color: rgba(var(--accent-soft-rgb), 0.6);
}

.sub-promo-row .btn-ghost {
    width: auto;
    padding: 0 18px;
    height: 47px;
}

.sub-promo-msg {
    min-height: 20px;
    font-size: 13px;
    margin: 8px 2px 4px;
    color: var(--text-dim);
}

.sub-promo-msg.ok {
    color: #86efac;
}

.sub-promo-msg.error {
    color: var(--danger);
}


/* =========================================
   V2 TABS / HOME / QUEUE
========================================= */

.tab-page {
    animation: fade-down 0.32s var(--ease-out);
}

.tab-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 54;
    width: min(calc(100% - 28px), 492px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    border-radius: 22px;
    background: var(--glass-strong);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 16px 40px rgba(0, 0, 0, 0.45);
}

.tab-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px 7px;
    border-radius: 16px;
    color: var(--text-faint);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.2px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.2s var(--spring);
}

.tab-btn .badge-dot {
    top: 1px;
    right: 4px;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
}

.tab-btn .ic {
    width: 22px;
    height: 22px;
}

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

.tab-btn:active {
    transform: scale(0.94);
}

.badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.5);
}

.icon-btn {
    position: relative;
}

.home-shelves {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 8px;
}

.home-loading {
    padding: 40px 12px;
    text-align: center;
    color: var(--text-faint);
    font-size: 14px;
}

/* ---------- статистика прослушиваний ---------- */

.stats-panel {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--glass-v3);
    box-shadow: var(--glass-edge), 0 18px 44px rgba(0, 0, 0, 0.32);
}

.stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.stats-head h2 {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.3px;
}

.stats-hint {
    font-size: 12px;
    font-weight: 650;
    color: var(--accent-soft);
    white-space: nowrap;
}

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

.stat-card {
    padding: 11px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-card b {
    display: block;
    font-size: 18px;
    font-weight: 720;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
    color: var(--text);
}

.stat-card span {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-faint);
}

.stats-bars {
    display: flex;
    align-items: stretch;
    gap: 4px;
    height: 82px;
    margin-top: 12px;
}

.stat-bar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.stat-val {
    font-size: 9px;
    line-height: 1;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-bar-track {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.stat-bar i {
    display: block;
    width: 100%;
    max-width: 24px;
    min-height: 4px;
    border-radius: 6px;
    background: var(--gradient-2);
    box-shadow: 0 0 12px rgba(var(--accent-2-rgb), 0.35);
    transition: height 0.35s var(--spring-snap);
}

.stat-bar em {
    font-style: normal;
    font-size: 10px;
    line-height: 1;
    color: var(--text-faint);
}

.stats-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--text-dim);
    min-width: 0;
}

.stats-top b {
    color: var(--text);
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-top span {
    margin-left: auto;
    flex: 0 0 auto;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.shelf-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.shelf-head h2 {
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.3px;
}

.shelf-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin: 0 -4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.shelf-row::-webkit-scrollbar {
    display: none;
}

.shelf-card {
    flex: 0 0 118px;
    width: 118px;
    text-align: left;
    color: inherit;
    transition: transform 0.24s var(--spring-snap);
}

.shelf-card:active {
    transform: scale(0.96);
}

.shelf-cover {
    width: 118px;
    height: 118px;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 12px 28px rgba(0, 0, 0, 0.4);
    position: relative;
}

.shelf-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shelf-cover .ic {
    width: 36px;
    height: 36px;
    color: rgba(255, 255, 255, 0.85);
}

.shelf-title {
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shelf-sub {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 2px;
}

.shelf-sub-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shelf-sub-time {
    flex: 0 0 auto;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.shelf-empty {
    padding: 16px 14px;
    border-radius: 16px;
    border: 1px dashed var(--border);
    color: var(--text-faint);
    font-size: 13.5px;
}

.shelf-pls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shelf-pl {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-align: left;
    font-size: 14.5px;
    font-weight: 600;
    transition:
        transform 0.24s var(--spring-snap),
        background 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out);
}

.shelf-pl:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.07);
}

.shelf-pl .ic {
    width: 20px;
    height: 20px;
    color: var(--accent-soft);
}

.shelf-pl span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shelf-pl b {
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 700;
}

.queue-now {
    margin-bottom: 12px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(48vh, 420px);
    overflow-y: auto;
    margin-bottom: 12px;
}

.queue-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.queue-row.now {
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-2-rgb), 0.06));
    border-color: rgba(var(--accent-soft-rgb), 0.25);
}

.queue-row.dragging {
    opacity: 0.55;
}

.queue-row .t-cover {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 12px;
    margin-bottom: 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    transition: background 0.15s ease, transform 0.2s var(--spring);
}

.menu-row:active {
    transform: scale(0.98);
    background: rgba(var(--accent-rgb), 0.12);
}

.menu-row .ic {
    width: 20px;
    height: 20px;
    color: var(--accent-soft);
}

/* =========================================
   DESIGN LAYER v3 — glass on max + film
   Направление C (стекло на максимуме) с
   плёночными деталями из B
   ========================================= */

:root {
    --glass-v3: linear-gradient(168deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035) 58%, rgba(255, 255, 255, 0.01));
    --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    --film: rgba(255, 255, 255, 0.028);
    --spring-snap: cubic-bezier(0.34, 1.56, 0.44, 1);
    --spring-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --tape: linear-gradient(90deg, rgba(var(--accent-rgb), 0.85), rgba(var(--accent-2-rgb), 0.9));
}

/* ---------- 1. ФОН: орбы дышат, плёнка поверх ---------- */

.bg-scene::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
        radial-gradient(60% 40% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.22) 100%);
    opacity: 0.5;
    mix-blend-mode: soft-light;
    animation: film-drift 22s linear infinite;
}

@keyframes film-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

.orb {
    filter: blur(48px) saturate(160%);
    transition: background 1.1s var(--spring-soft), opacity 1.1s var(--spring-soft);
    animation: orb-breathe 17s ease-in-out infinite alternate;
}

.orb.o2 { animation-duration: 21s; animation-delay: -6s; }
.orb.o3 { animation-duration: 25s; animation-delay: -11s; }

@keyframes orb-breathe {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(26px, -34px, 0) scale(1.12); }
    100% { transform: translate3d(-22px, 22px, 0) scale(0.94); }
}

.grain { opacity: 0.07; }

/* ---------- 2. КНОПКИ: пружина везде ---------- */

.icon-btn,
.ctrl,
.tab-btn,
.chip,
.seg-btn,
.eq-preset,
.pill-danger,
.select-toggle,
.select-bar-btn,
.shuffle-play,
.track-pl-btn,
.track-handle {
    transition:
        transform 0.24s var(--spring-snap),
        background 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out),
        color 0.2s var(--ease-out),
        box-shadow 0.28s var(--ease-out),
        opacity 0.2s var(--ease-out);
}

.icon-btn:active,
.ctrl:active,
.tab-btn:active,
.chip:active,
.seg-btn:active,
.eq-preset:active,
.pill-danger:active,
.select-toggle:active,
.select-bar-btn:active,
.shuffle-play:active,
.track-pl-btn:active,
.track-handle:active {
    transform: scale(0.9);
}

/* ---------- 3. ПЛЕЕР: стеклянная карточка ---------- */

.full-player {
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(var(--accent-rgb), 0.22), transparent 62%),
        linear-gradient(180deg, rgba(10, 8, 18, 0.86), rgba(6, 5, 11, 0.97));
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
}

.fp-top .icon-btn.dark,
.fp-actions .icon-btn.dark {
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-edge);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.fp-label {
    font-size: 10.5px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    font-weight: 700;
}

/* название трека — всегда одна строка, длинное уходит в многоточие */
.fp-names h2 {
    font-size: 19px;
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.fp-names {
    min-width: 0;
}

/* 3D-обложка: наклон + глубина */
.full-player {
    perspective: 1100px;
    perspective-origin: 50% 42%;
}

/* Наклон применяем к внутренней сцене, а не к самой области наведения:
   иначе элемент уезжает из-под курсора и pointerleave зацикливается. */
.fp-tilt-stage {
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.55s var(--spring-soft);
}

.fp-tilt-stage.tilting {
    transition: transform 0.14s linear;
}

.fp-cover-tilt .fp-cover {
    width: min(56vw, 214px);
    border-radius: 26px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 34px 80px rgba(0, 0, 0, 0.68),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 18px 40px rgba(var(--accent-rgb), 0.28);
}

/* высоту не задаём — квадрат держит aspect-ratio из базовых правил,
   иначе при открытом тексте (width уменьшается) обложка сплющивается */

/* текст открыт — обложка уступает место панели */
.full-player.lyrics-open .fp-cover-tilt .fp-cover {
    width: min(36vw, 132px);
    border-radius: 18px;
}

.full-player.lyrics-open .fp-cover-tilt .fp-aura {
    width: min(56vw, 210px);
    opacity: 0.32;
}

/* эквалайзер открыт — обложка ещё меньше */
.full-player.eq-open .fp-cover-tilt .fp-cover {
    width: min(30vw, 112px);
    border-radius: 16px;
}

.full-player.eq-open .fp-cover-tilt .fp-aura {
    width: min(48vw, 180px);
    opacity: 0.28;
}

.fp-cover-tilt .fp-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 42%);
    pointer-events: none;
}

.fp-aura {
    width: min(86vw, 330px);
    opacity: 0.5;
    filter: blur(60px);
}

/* ---------- 4. КНОПКИ ПЛЕЕРА: пружинный объём ---------- */

.ctrl {
    border-radius: 20px;
}

.ctrl.side,
.ctrl.big-dim {
    border-radius: 50%;
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-edge);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ctrl.play {
    border-radius: 26px;
    background: var(--gradient);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 14px 38px rgba(var(--accent-2-rgb), 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ctrl.play .ic { width: 27px; height: 27px; }

.ctrl.active {
    color: var(--accent-soft);
    border-color: rgba(var(--accent-2-rgb), 0.55);
    background: rgba(var(--accent-2-rgb), 0.16);
}

/* ---------- 5. ПРОГРЕСС: лента + светящийся ползунок ---------- */

.seek-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* базовая подложка ::before больше не нужна: ленту рисует сам .seek-track,
   иначе рисуются две наложенные полоски разной высоты и скругления */
.seek-track::before {
    content: none;
}

.seek-fill {
    height: 7px;
    border-radius: 999px;
    background: var(--tape);
    box-shadow: 0 0 16px rgba(var(--accent-2-rgb), 0.7);
}

.seek-knob {
    width: 17px;
    height: 17px;
    background: #fff;
    box-shadow:
        0 0 0 6px rgba(var(--accent-2-rgb), 0.2),
        0 0 20px rgba(var(--accent-2-rgb), 0.55),
        0 4px 12px rgba(0, 0, 0, 0.55);
}

.times {
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
    /* отступ, чтобы крупный бегунок не наезжал на цифры */
    margin-top: 6px;
    padding: 0 2px;
}

/* ---------- 6. ПАНЕЛИ ПЛЕЕРА: стекло ---------- */

.fp-lyrics,
.fp-eq {
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    box-shadow: var(--glass-edge), 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.fp-lyrics-body {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.62;
}

/* караоке: подсветка активной строки и слов */
.fp-lyrics-body .lr-line {
    display: block;
    padding: 3px 0;
    transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out), transform 0.35s var(--spring-snap);
    color: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    /* строки строим как блоки, pre-wrap оставляем только пустым */
    white-space: pre-wrap;
}

.fp-lyrics-body .lr-line.past { color: rgba(255, 255, 255, 0.2); }

.fp-lyrics-body .lr-line.active {
    color: #fff;
    transform: scale(1.03);
    text-shadow: 0 0 22px rgba(var(--accent-2-rgb), 0.55);
}

/* без тайм-кодов клик по строке бессмысленен */
.fp-lyrics-body .lr-line:not([data-time]) { cursor: default; }

.fp-lyrics-body .lr-word {
    transition: color 0.16s linear, text-shadow 0.3s var(--ease-out);
}

/* в неактивной строке слова не светятся */
.fp-lyrics-body .lr-line:not(.active) .lr-word.on {
    color: inherit;
    text-shadow: none;
}

.fp-lyrics-body .lr-word.on {
    color: #fff;
    text-shadow: 0 0 18px rgba(var(--accent-2-rgb), 0.8);
}

/* текст без тайм-кодов — сплошной, без караоке-подсветки */
.fp-lyrics-body.plain .lr-line {
    color: rgba(255, 255, 255, 0.72);
    transform: none;
    cursor: default;
}

/* ---------- 7. ТАБ-БАР: островок стекла ---------- */

.tab-bar {
    background: linear-gradient(180deg, rgba(22, 17, 34, 0.78), rgba(12, 9, 20, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-edge), 0 18px 44px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(34px) saturate(175%);
    -webkit-backdrop-filter: blur(34px) saturate(175%);
}

.tab-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 0;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.36), rgba(var(--accent-2-rgb), 0.26));
    border: 1px solid rgba(var(--accent-2-rgb), 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 6px 20px rgba(var(--accent-2-rgb), 0.28);
    transform: translateX(0);
    /* как в stats-period: двигаем и позицию, и ширину,
       чтобы пузырёк не менял форму в конце анимации */
    transition:
        transform 0.42s var(--spring-snap),
        width 0.42s var(--spring-snap);
    pointer-events: none;
    z-index: 0;
    will-change: transform, width;
}

.tab-btn {
    z-index: 1;
}

.tab-btn.active {
    color: var(--text);
    text-shadow: 0 0 16px rgba(var(--accent-2-rgb), 0.5);
}

/* ---------- 8. ПЕРЕХОДЫ МЕЖДУ ВКЛАДКАМИ ---------- */

.tab-page {
    will-change: transform, opacity, filter;
}

.tab-page.page-in {
    animation: page-in 0.42s var(--spring-soft) both;
}

.tab-page.page-in-back {
    animation: page-in-back 0.42s var(--spring-soft) both;
}

@keyframes page-in {
    0% { opacity: 0; transform: translate3d(26px, 0, 0) scale(0.985); filter: blur(6px); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes page-in-back {
    0% { opacity: 0; transform: translate3d(-26px, 0, 0) scale(0.985); filter: blur(6px); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- 9. СПИСОК ТРЕКОВ ---------- */

.track {
    transition:
        transform 0.24s var(--spring-snap),
        background 0.2s var(--ease-out),
        box-shadow 0.24s var(--ease-out);
}

.track:active { transform: scale(0.985); }

.track.playing {
    background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-2-rgb), 0.1));
    box-shadow: inset 0 0 0 1px rgba(var(--accent-2-rgb), 0.34);
}

.track.selected {
    background: rgba(var(--accent-2-rgb), 0.16);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-2-rgb), 0.4);
}

.track-check {
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--glass-edge);
}

.track.selected .track-check {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(var(--accent-2-rgb), 0.5);
}

/* ---------- 10. ЧИПЫ ПЛЕЙЛИСТОВ ---------- */

.chip {
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: var(--glass-edge);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.chip.active {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.42), rgba(var(--accent-2-rgb), 0.3));
    border-color: rgba(var(--accent-2-rgb), 0.45);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 22px rgba(var(--accent-2-rgb), 0.3);
}

/* ---------- 11. ШТОРКИ И КНОПКИ ---------- */

.sheet {
    background: linear-gradient(180deg, rgba(24, 19, 38, 0.94), rgba(10, 8, 17, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-edge), 0 -18px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(34px) saturate(175%);
    -webkit-backdrop-filter: blur(34px) saturate(175%);
}

.btn-primary {
    background: var(--gradient);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 12px 30px rgba(var(--accent-2-rgb), 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn-primary:active { transform: scale(0.97); }

.seg {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seg-btn.active {
    background: transparent;
    color: #fff;
    box-shadow: none;
    text-shadow: 0 0 14px rgba(var(--accent-2-rgb), 0.45);
}

/* ---------- 12. ШАПКА ---------- */

.icon-btn {
    background: var(--glass-v3);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: var(--glass-edge);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ---------- 13. ПРОЧЕЕ: полоски, счётчики ---------- */

/* панель выбора — это набор отдельных кнопок, без «контейнера» */
.select-bar {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.count-badge,
.queue-head h2 { letter-spacing: -0.3px; }

.shuffle-play {
    box-shadow: 0 6px 18px rgba(var(--accent-2-rgb), 0.28);
}

/* ---------- 14. ДОСТУПНОСТЬ ---------- */

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
    .bg-scene::after { animation: none; }
    .tab-page.page-in,
    .tab-page.page-in-back { animation: none; }
    .fp-tilt-stage { transition: none; }
}

/* =========================================
   v3.3 — comfort
   ========================================= */

.resume-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 16px;
    padding: 11px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background:
        linear-gradient(150deg, rgba(var(--accent-rgb), 0.16), rgba(255, 255, 255, 0.035)),
        var(--surface);
    box-shadow: var(--glass-edge), 0 14px 30px rgba(0, 0, 0, 0.28);
    color: var(--text);
    text-align: left;
    transition: transform 0.22s var(--spring), border-color 0.2s ease;
}

.resume-card:active {
    transform: scale(0.985);
    border-color: rgba(var(--accent-soft-rgb), 0.45);
}

.resume-card.hidden {
    display: none;
}

.resume-cover {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.resume-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.resume-label {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.resume-meta b {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resume-meta span:last-child {
    font-size: 11.5px;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resume-play {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #14101f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.resume-play .ic {
    width: 17px;
    height: 17px;
}

.queue-actions {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
}

.queue-action {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 12px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 650;
    transition: background 0.15s ease, color 0.15s ease, transform 0.2s var(--spring);
}

.queue-action:active {
    transform: scale(0.97);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text);
}

.queue-action .ic {
    width: 16px;
    height: 16px;
    color: var(--accent-soft);
}

.sleep-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    margin: 10px auto 0;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-soft-rgb), 0.32);
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent-soft);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.sleep-pill.hidden {
    display: none;
}

.sleep-pill .ic {
    width: 14px;
    height: 14px;
}

.sleep-pill .ic:last-child {
    opacity: 0.55;
}

.fp-actions .icon-btn.dark.active,
.fp-actions .icon-btn.dark[aria-pressed="true"] {
    color: var(--accent-soft);
    border-color: rgba(var(--accent-soft-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12), var(--glass-edge);
}

.sleep-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.sleep-option {
    min-height: 48px;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    transition: background 0.15s ease, transform 0.2s var(--spring);
}

.sleep-option.wide {
    grid-column: 1 / -1;
}

.sleep-option:active {
    transform: scale(0.97);
    background: rgba(var(--accent-rgb), 0.14);
}

body.radius-round .sleep-option {
    border-radius: 999px;
}

body.radius-sharp .sleep-option {
    border-radius: 12px;
}

body.radius-sharp .sleep-pill {
    border-radius: 12px;
}

/* ---------- daily mix / weekly recap ---------- */

.daily-mix {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(var(--accent-rgb), 0.2), transparent 62%),
        var(--glass-v3);
    box-shadow: var(--glass-edge), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.daily-mix-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.daily-mix-head h2 {
    margin: 1px 0 0;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.4px;
}

.daily-mix-kicker {
    display: block;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.daily-mix-play {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
    transition: transform 0.2s var(--spring), filter 0.15s ease;
}

.daily-mix-play:active {
    transform: scale(0.95);
    filter: brightness(1.1);
}

.daily-mix-play .ic {
    width: 15px;
    height: 15px;
}

.weekly-recap {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
        var(--surface);
    box-shadow: var(--glass-edge), 0 18px 40px rgba(0, 0, 0, 0.24);
}

.weekly-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.weekly-head h2 {
    margin: 1px 0 0;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.35px;
}

.weekly-kicker {
    display: block;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.weekly-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-soft-rgb), 0.32);
    background: rgba(var(--accent-rgb), 0.13);
    color: var(--accent-soft);
    font-size: 12px;
    font-weight: 650;
}

.weekly-share:active {
    transform: scale(0.96);
}

.weekly-share .ic {
    width: 14px;
    height: 14px;
}

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

.weekly-item {
    min-width: 0;
    padding: 11px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.weekly-item b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 720;
    letter-spacing: -0.15px;
}

.weekly-item span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-faint);
}

/* объединённая статистика: сутки / неделя / месяц / всё время */

.stats-kicker {
    display: block;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.stats-periods {
    position: relative;
    display: flex;
    gap: 6px;
    margin: 2px 0 13px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    isolation: isolate;
}

.stats-period-indicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.38), rgba(var(--accent-2-rgb), 0.28));
    border: 1px solid rgba(var(--accent-soft-rgb), 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 6px 16px rgba(var(--accent-2-rgb), 0.22);
    transform: translateX(0);
    transition:
        transform 0.36s var(--spring-snap),
        width 0.36s var(--spring-snap);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    will-change: transform, width;
}

.stats-period {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--text-faint);
    font-size: 11.5px;
    font-weight: 650;
    background: transparent;
    transition: color 0.15s ease, transform 0.2s var(--spring);
}

.stats-period:active {
    transform: scale(0.96);
}

.stats-period.active {
    color: var(--text);
    background: transparent;
    box-shadow: none;
    text-shadow: 0 0 14px rgba(var(--accent-2-rgb), 0.45);
}

.stats-hero {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.stats-hero b {
    font-size: 29px;
    line-height: 1;
    font-weight: 760;
    letter-spacing: -0.8px;
    font-variant-numeric: tabular-nums;
}

.stats-hero span {
    font-size: 12px;
    color: var(--text-faint);
}

.stats-grid-info .stat-card {
    min-width: 0;
}

.stats-grid-info .stat-card b {
    font-size: 13.5px;
    font-weight: 680;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 13px;
    font-size: 10px;
    color: var(--text-faint);
}

body.radius-round .stats-periods,
body.radius-round .stats-period,
body.radius-round .stats-period-indicator {
    border-radius: 999px;
}

body.radius-sharp .stats-periods,
body.radius-sharp .stats-period,
body.radius-sharp .stats-period-indicator {
    border-radius: 8px;
}

/* ---------- what's new ---------- */

.ver-button {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.ver-button:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}

.ver-new {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 5px;
    border-radius: 50%;
    vertical-align: 2px;
    background: var(--accent-soft);
    box-shadow: 0 0 8px rgba(var(--accent-soft-rgb), 0.9);
}

.ver-new.hidden {
    display: none;
}

.changelog-sheet {
    max-height: min(88vh, 760px);
}

.changelog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.changelog-head h3 {
    margin: 1px 0 0;
}

.changelog-kicker {
    display: block;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.changelog-lang {
    display: flex;
    flex: 0 0 auto;
    gap: 3px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.045);
}

.changelog-lang button {
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 750;
}

.changelog-lang button.active {
    color: var(--text);
    background: rgba(var(--accent-rgb), 0.22);
}

.changelog-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.changelog-version {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
}

.changelog-version.current {
    border-color: rgba(var(--accent-soft-rgb), 0.28);
    background:
        linear-gradient(150deg, rgba(var(--accent-rgb), 0.15), rgba(255, 255, 255, 0.03)),
        var(--surface);
    box-shadow: var(--glass-edge);
}

.changelog-version-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.changelog-version-num {
    font-size: 12.5px;
    font-weight: 750;
    color: var(--accent-soft);
    letter-spacing: 0.2px;
}

.changelog-date {
    font-size: 10.5px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.changelog-version h4 {
    margin: 0 0 7px;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.25px;
}

.changelog-section h5 {
    margin: 10px 0 5px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.changelog-section ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding-left: 16px;
}

.changelog-section li {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-dim);
}

.changelog-section li::marker {
    color: var(--accent-soft);
}

.changelog-version.old summary {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
}

.changelog-version.old summary::-webkit-details-marker {
    display: none;
}

.changelog-old-title {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-faint);
}

.changelog-empty {
    padding: 14px;
    color: var(--text-faint);
    font-size: 13px;
}

body.radius-round .changelog-lang,
body.radius-round .changelog-lang button {
    border-radius: 999px;
}

body.radius-round .changelog-version {
    border-radius: 24px;
}

body.radius-sharp .changelog-lang,
body.radius-sharp .changelog-lang button {
    border-radius: 8px;
}

body.radius-sharp .changelog-version {
    border-radius: 10px;
}

body.radius-round .daily-mix,
body.radius-round .weekly-recap {
    border-radius: 24px;
}

body.radius-sharp .daily-mix,
body.radius-sharp .weekly-recap {
    border-radius: 10px;
}

body.radius-sharp .daily-mix-play,
body.radius-sharp .weekly-share {
    border-radius: 12px;
}

/* остальные новые элементы тоже слушаются выбранного радиуса */
body.radius-round .queue-action {
    border-radius: 999px;
}

body.radius-round .resume-card {
    border-radius: 24px;
}

body.radius-round .resume-cover {
    border-radius: 22px;
}

body.radius-sharp .queue-action {
    border-radius: 12px;
}

body.radius-sharp .resume-card {
    border-radius: 10px;
}

body.radius-sharp .resume-cover {
    border-radius: 10px;
}

.range-row {
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--border);
}

.range-row.hidden {
    display: none;
}

.range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13px;
    color: var(--text-dim);
}

.range-head b {
    color: var(--accent-soft);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.range-row input[type="range"] {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 8px;
    box-sizing: border-box;
    accent-color: var(--accent);
    cursor: pointer;
}

.menu-row:disabled {
    opacity: 0.5;
    pointer-events: none;
}
