
:root {
    color-scheme: light;
    --bg:#f4f8ff; --surface:rgba(255,255,255,.84); --surface-solid:#fff;
    --surface-hover:#edf4ff; --text:#18243a; --muted:#8793a7;
    --accent:#3689f5; --accent-soft:#e5f1ff; --border:rgba(132,163,205,.2);
    --shadow:0 8px 28px rgba(63,105,163,.08);
}
[data-theme="dark"] {
    color-scheme:dark; --bg:#111827; --surface:rgba(31,43,62,.9);
    --surface-solid:#1f2b3e; --surface-hover:#293951; --text:#f1f5fc;
    --muted:#9ba9bd; --accent:#65a9ff; --accent-soft:#243d5d;
    --border:rgba(160,184,216,.13); --shadow:0 8px 28px rgba(0,0,0,.18);
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--bg)}
body{min-height:100vh;margin:0;background:radial-gradient(circle at 10% 0%,rgba(190,219,255,.24),transparent 35%),var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;transition:background .2s,color .2s;-webkit-font-smoothing:antialiased}
button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.app{width:100%;max-width:520px;min-height:100vh;margin:auto;padding:25px 20px 170px;position:relative}
.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px}
.header-brand h1{margin:0;font-size:29px;font-weight:800;letter-spacing:-1.2px}
.header-brand p{color:var(--muted);font-size:12px;margin:5px 0 0}
.profile-button{width:43px;height:43px;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--accent);box-shadow:var(--shadow);backdrop-filter:blur(16px);font-size:21px}
.search-section{margin-bottom:25px}
.search-box{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:17px;padding:13px 16px;box-shadow:var(--shadow);backdrop-filter:blur(18px)}
.search-box span{font-size:25px;line-height:1;color:var(--muted)}
.search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font-size:14px}
.search-box input::placeholder{color:var(--muted)}
.section{margin-top:27px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.section-heading h2{font-size:18px;font-weight:750;letter-spacing:-.35px;margin:0}
.heading-actions{display:flex;align-items:center;gap:9px}.section-count{color:var(--muted);font-size:12px}
.text-button{border:0;background:none;color:var(--accent);font-size:12px;font-weight:650;padding:6px}
.playlist-strip{display:flex;gap:11px;overflow-x:auto;padding:2px 1px 9px;scrollbar-width:none}
.playlist-strip::-webkit-scrollbar{display:none}
.playlist-card,.playlist-create-card{width:132px;min-width:132px;height:125px;padding:13px;border:1px solid var(--border);border-radius:18px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;color:#fff;box-shadow:0 8px 22px rgba(57,113,183,.12);transition:transform .18s}
.playlist-card:active,.playlist-create-card:active{transform:scale(.97)}
.playlist-color-0{background:linear-gradient(145deg,#78baff,#4389e9)}.playlist-color-1{background:linear-gradient(145deg,#9babea,#657ecb)}.playlist-color-2{background:linear-gradient(145deg,#78c8c0,#399a9a)}.playlist-color-3{background:linear-gradient(145deg,#d6a1ce,#a56ab2)}
.playlist-card-icon{font-size:25px;margin-bottom:auto;opacity:.95}
.playlist-card strong,.playlist-create-card strong{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.playlist-card small,.playlist-create-card small{font-size:10px;margin-top:5px;color:rgba(255,255,255,.8)}
.playlist-create-card{background:var(--surface);color:var(--text);border:1px dashed var(--border);align-items:center;justify-content:center;text-align:center;gap:6px;box-shadow:none}
.playlist-create-card>span{font-size:28px;color:var(--accent)}
.playlist-create-card small{color:var(--muted)}
.playlist-create-card.compact{width:82px;min-width:82px}
.playlist-create-card.compact>span{font-size:24px}
.playlist-skeleton{color:var(--muted);font-size:12px;padding:20px 4px}
.empty-state{padding:28px 16px;border:1px dashed var(--border);border-radius:18px;text-align:center;background:var(--surface)}
.empty-icon{font-size:32px;color:var(--accent)}.empty-state p{font-size:14px;font-weight:700;margin:10px 0 7px}.empty-state small{color:var(--muted);font-size:11px;line-height:1.5}
.page-heading{margin:15px 0 25px}.page-heading h2{font-size:26px;font-weight:800;letter-spacing:-.7px;margin:0 0 8px}.page-heading p{color:var(--muted);font-size:13px;margin:0}
.song-list{width:100%}.song-row{display:flex;align-items:center;gap:9px;padding:11px 2px;border-bottom:0;min-width:0;animation:rowIn .18s ease}
@keyframes rowIn{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
.song-row.selected{background:var(--accent-soft);border-radius:13px;padding-left:7px;padding-right:7px}
.song-cover{width:46px;height:46px;flex-shrink:0;border-radius:13px;display:grid;place-items:center;font-size:22px;background:linear-gradient(145deg,#8bc4ff,#478ee8);color:#fff;box-shadow:0 5px 14px rgba(65,139,224,.18)}
.song-details{flex:1;min-width:0;cursor:pointer;padding:3px 0}
.song-details strong,.song-details small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.song-details strong{font-size:13px;font-weight:700}.song-details small{color:var(--muted);font-size:11px;margin-top:5px}
.favorite-button,.song-play,.more-button,.select-song{width:31px;height:36px;flex-shrink:0;border:0;background:transparent;color:var(--text);font-size:20px;padding:3px}
.favorite-button{color:var(--accent)}.song-play{font-size:17px}.more-button{font-size:16px;color:var(--muted);letter-spacing:1px}
.select-song{border:1px solid var(--border);border-radius:50%;width:23px;height:23px;font-size:13px;color:var(--accent);padding:0}
.select-song.checked{background:var(--accent);color:#fff}
.bulk-toolbar{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px 12px;margin:-3px 0 8px;background:var(--accent-soft);border-radius:12px;font-size:11px;color:var(--text)}
.bulk-toolbar[hidden]{display:none}.danger-text{color:#e05b66}
.radio-empty{padding:42px 22px;text-align:center;border:1px solid var(--border);border-radius:21px;background:var(--surface);box-shadow:var(--shadow)}
.radio-empty-icon{width:74px;height:74px;margin:0 auto 19px;display:grid;place-items:center;border-radius:23px;background:var(--accent-soft);color:var(--accent);font-size:39px}
.radio-empty h3{font-size:17px;margin:0 0 9px}.radio-empty p{max-width:260px;margin:0 auto;color:var(--muted);font-size:12px;line-height:1.6}
.back-button{border:0;background:var(--accent-soft);color:var(--accent);border-radius:12px;padding:9px 14px;margin:-10px 0 18px;font-size:12px;font-weight:650}
.bottom-nav{position:fixed;bottom:calc(10px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 28px);max-width:492px;display:flex;justify-content:space-around;align-items:center;background:rgba(255,255,255,.9);border:1px solid rgba(132,163,205,.2);border-radius:23px;padding:7px 10px;z-index:10;box-shadow:0 8px 30px rgba(49,93,151,.13);backdrop-filter:blur(24px)}
[data-theme="dark"] .bottom-nav{background:rgba(25,36,53,.94);border-color:var(--border)}
.nav-item{flex:1;min-width:0;min-height:49px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:16px;background:transparent;color:var(--muted);transition:color .2s,background .2s,transform .2s}
.nav-item span{font-size:21px;line-height:1.1}.nav-item small{font-size:10px;font-weight:600}
.nav-item .nav-profile-icon{width:22px;height:22px;display:grid;place-items:center}
.nav-item .nav-profile-icon svg{width:22px;height:22px;display:block}
.nav-item.active{color:var(--accent);background:var(--accent-soft);transform:translateY(-1px)}
.mini-player{position:fixed;bottom:calc(79px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:496px;display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.9);border:1px solid rgba(132,163,205,.25);border-radius:17px;padding:9px 12px;z-index:9;box-shadow:0 7px 25px rgba(49,93,151,.13);backdrop-filter:blur(22px)}
[data-theme="dark"] .mini-player{background:rgba(35,49,70,.95);border-color:var(--border)}
.mini-cover{width:42px;height:42px;flex-shrink:0;border-radius:12px;background:linear-gradient(135deg,#8bc4ff,#478ee8);display:grid;place-items:center;color:#fff;font-size:21px}
.mini-info{flex:1;min-width:0}.mini-info strong,.mini-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-info strong{font-size:12px;font-weight:700}.mini-info small{color:var(--muted);font-size:10px;margin-top:4px}
.mini-play{width:40px;height:40px;flex-shrink:0;border:0;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:18px}
.player-overlay{position:fixed;inset:0;z-index:99999;display:none;align-items:flex-end;justify-content:center;background:rgba(18,34,57,.45);backdrop-filter:blur(10px);overflow-y:auto}
.player-overlay.open{display:flex}
.player-modal{position:relative;width:100%;max-width:520px;max-height:96vh;overflow-y:auto;margin:0;padding:19px 24px calc(28px + env(safe-area-inset-bottom));background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:27px 27px 0 0;box-shadow:0 -10px 50px rgba(0,0,0,.16);animation:playerSlideUp .25s ease}
@keyframes playerSlideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.player-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:21px}
.player-header span{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--muted)}
.player-header button,.player-favorite{border:0;background:transparent;color:var(--text);font-size:23px}
.player-cover{width:min(68vw,270px);aspect-ratio:1;margin:0 auto 24px;border-radius:25px;display:grid;place-items:center;background:linear-gradient(145deg,#8bc4ff,#478ee8);color:#fff;font-size:82px;box-shadow:0 15px 40px rgba(64,131,211,.22)}
.player-track-info{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}
.player-track-info>div{min-width:0}.player-track-info strong,.player-track-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-track-info strong{font-size:18px;font-weight:750}.player-track-info small{margin-top:7px;color:var(--muted);font-size:13px}
.player-favorite{color:var(--accent);font-size:27px}
.player-progress input,.player-volume input{width:100%;accent-color:var(--accent);cursor:pointer}
.player-time{display:flex;justify-content:space-between;margin-top:5px;color:var(--muted);font-size:11px}
.player-controls{display:flex;align-items:center;justify-content:center;gap:34px;margin:18px 0 12px}
.player-controls button{min-width:43px;min-height:43px;border:0;background:transparent;color:var(--text);font-size:23px;border-radius:50%;transition:transform .12s}
.player-controls button:active{transform:scale(.9)}
.player-controls #playerPlay{width:52px;height:52px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:21px;box-shadow:var(--shadow)}
.playback-mode-row{height:28px;display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 13px}
.mode-button{border:0;background:transparent;color:var(--muted);font-size:11px;padding:5px 9px;border-radius:9px}
.mode-button:active{background:var(--accent-soft);color:var(--accent)}
.mode-hint{font-size:10px;color:var(--accent);opacity:0;transition:opacity .2s}.mode-hint.visible{opacity:1}
.player-volume{display:flex;align-items:center;gap:10px;color:var(--muted)}
.player-volume button{width:25px;border:0;background:transparent;color:var(--muted);font-size:18px;padding:0}

/* Исправленное отображение меню трёх точек */
.context-menu {
    position: fixed !important;
    z-index: 2147483647 !important;
    display: none;
    visibility: visible !important;
    pointer-events: auto !important;
    min-width: 220px;
    max-width: calc(100vw - 16px);
    padding: 8px;
    background: var(--surface-solid);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(20,40,70,.25);
}

.context-menu.open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: menuIn .12s ease;
}

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.context-menu button {
    display: block;
    width: 100%;
    min-height: 42px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 12px;
    border-radius: 9px;
    font-size: 13px;
    pointer-events: auto;
    touch-action: manipulation;
}

.context-menu button:active {
    background: var(--surface-hover);
}

.toast{position:fixed;z-index:100002;bottom:calc(145px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,8px);opacity:0;pointer-events:none;background:#18243a;color:#fff;padding:10px 16px;border-radius:20px;font-size:12px;transition:opacity .2s,transform .2s;white-space:nowrap}
.toast.visible{opacity:1;transform:translate(-50%,0)}
@media(min-width:700px){.app{padding-top:35px}.player-overlay{align-items:center}.player-modal{border-radius:27px;margin:20px;max-height:90vh}}
@media(max-width:360px){.app{padding-left:14px;padding-right:14px}.nav-item small{font-size:9px}.player-controls{gap:25px}.playlist-card,.playlist-create-card{width:118px;min-width:118px}}

/* Исправление ввода в строке поиска MusicTG */
.search-section,
.search-box {
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

.search-box input {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    min-width: 0;
    pointer-events: auto !important;
    touch-action: manipulation;
    user-select: text !important;
    -webkit-user-select: text !important;
    opacity: 1;
}

/* Единое положение шапки на всех вкладках */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 43px;
    margin-top: 0;
    margin-bottom: 27px;
}

.header-brand {
    min-width: 0;
}

.profile-button {
    flex-shrink: 0;
    margin-left: 12px;
    align-self: center;
}

@media (min-width: 600px) {
    html {
        overflow-y: scroll;
        scrollbar-gutter: stable;
    }

    body {
        overflow-x: hidden;
    }
}


/* Компактный плеер по присланному референсу */
.player-overlay {
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 49, 69, .42);
}
.player-modal {
    width: min(100%, 680px);
    max-width: 680px;
    max-height: min(92vh, 560px);
    margin: 0;
    padding: 22px 30px 24px;
    overflow: visible;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.58);
    background: var(--bg);
    box-shadow: 0 24px 70px rgba(20,38,65,.22);
    animation: playerCardIn .2s ease;
}
@keyframes playerCardIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.player-header { min-height:48px; margin:0 0 24px; position:relative; }
.player-header span {
    position:absolute; left:50%; transform:translateX(-50%);
    white-space:nowrap; font-size:12px; letter-spacing:2.5px;
}
.player-header button {
    width:48px; height:48px; display:grid; place-items:center;
    border-radius:50%; background:var(--surface-solid);
    box-shadow:var(--shadow); font-size:24px; line-height:1;
}
.player-track-info { min-height:132px; margin:0 0 24px; justify-content:flex-start; gap:18px; }
.player-cover {
    width:132px; min-width:132px; height:132px; aspect-ratio:1;
    margin:0; border-radius:20px; font-size:52px;
    box-shadow:0 10px 26px rgba(64,131,211,.2);
}
.player-track-copy { flex:1; min-width:0; }
.player-track-info strong { font-size:clamp(17px,3vw,25px); letter-spacing:-.4px; }
.player-track-info small { font-size:16px; margin-top:8px; }
.player-favorite {
    align-self:flex-end; width:54px; height:54px; min-width:54px;
    display:grid; place-items:center; border-radius:50%;
    background:var(--surface-solid); box-shadow:var(--shadow); font-size:30px;
}
.player-progress { margin:0 0 18px; }
.player-progress input,.player-volume input { margin:0; accent-color:var(--accent); }
.player-progress input,.player-volume input { height:7px; }
.player-time { margin-top:8px; font-size:13px; }
.player-controls {
    display:grid; grid-template-columns:1fr 1fr 1fr 1fr;
    align-items:center; justify-items:center; gap:12px; margin:18px 0 22px;
}
.player-controls button {
    width:52px; height:52px; min-width:52px; min-height:52px;
    display:grid; place-items:center; font-size:25px;
}
.player-controls #playerPlay {
    width:76px; height:76px; font-size:30px; color:#fff; border:0;
    background:linear-gradient(145deg,#64aaff,#347fe8);
    box-shadow:0 10px 25px rgba(52,127,232,.3);
}
.player-controls #playbackMode { color:var(--text); font-size:25px; }
.playback-mode-row { height:18px; margin:-14px 0 14px; }
.mode-hint { opacity:1; color:var(--muted); font-size:11px; }
.player-volume {
    display:grid; grid-template-columns:48px 1fr 48px;
    align-items:center; gap:14px;
}
.player-volume button {
    width:48px; height:48px; border-radius:15px;
    background:var(--surface-solid); box-shadow:var(--shadow);
    color:var(--text); font-size:21px;
}
.volume-high { color:var(--muted); font-size:20px; text-align:center; }
[data-theme="dark"] .player-modal { border-color:var(--border); background:#1a2638; }
[data-theme="dark"] .player-header button,
[data-theme="dark"] .player-favorite,
[data-theme="dark"] .player-volume button { background:#26364d; }

@media (max-width:560px) {
    .player-overlay { align-items:flex-end; padding:0; }
    .player-modal {
        width:100%; max-width:100%; max-height:min(88vh,560px);
        overflow-y:auto; padding:16px 20px calc(20px + env(safe-area-inset-bottom));
        border-radius:26px 26px 0 0;
    }
    .player-header { margin-bottom:20px; }
    .player-track-info { min-height:94px; gap:13px; margin-bottom:22px; }
    .player-cover {
        width:94px; min-width:94px; height:94px;
        border-radius:17px; font-size:39px;
    }
    .player-track-info strong { font-size:16px; }
    .player-track-info small { font-size:12px; margin-top:6px; }
    .player-favorite {
        width:43px; height:43px; min-width:43px; font-size:25px;
    }
    .player-controls { gap:5px; margin:15px 0 20px; }
    .player-controls button {
        width:42px; height:42px; min-width:42px; min-height:42px; font-size:21px;
    }
    .player-controls #playerPlay { width:64px; height:64px; font-size:26px; }
    .player-volume { grid-template-columns:42px 1fr 35px; gap:10px; }
    .player-volume button { width:42px; height:42px; }
}
@media (max-width:360px) {
    .player-modal { padding-left:15px; padding-right:15px; }
    .player-cover { width:82px; min-width:82px; height:82px; }
    .player-controls #playerPlay { width:58px; height:58px; }
}


/* ===== MusicTG: финальная настройка компактного плеера ===== */

.player-overlay {
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(25, 40, 60, .48);
}

.player-modal {
    width: min(100%, 680px);
    max-width: 680px;
    max-height: min(92vh, 560px);
    overflow-y: auto;
    margin: 0;
    padding: 22px 30px 24px;
    border-radius: 28px;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(20,38,65,.22);
}

.player-header {
    min-height: 46px;
    margin: 0 0 22px;
    position: relative;
}

.player-header span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 2px;
}

.player-header button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    font-size: 23px;
}

.player-track-info {
    min-height: 124px;
    margin: 0 0 23px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 17px;
}

.player-cover {
    width: 124px;
    min-width: 124px;
    height: 124px;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 19px;
    font-size: 48px;
}

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

.player-track-info strong {
    font-size: clamp(16px, 3vw, 23px);
    letter-spacing: -.4px;
}

.player-track-info small {
    font-size: 14px;
    margin-top: 8px;
}

.player-favorite {
    align-self: flex-end;
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    font-size: 27px;
}

.player-progress {
    margin: 0 0 16px;
}

.player-progress input,
.player-volume input {
    margin: 0;
    accent-color: var(--accent);
}

.player-progress input {
    height: 7px;
}

.player-time {
    margin-top: 8px;
    font-size: 12px;
}

.player-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    gap: 10px;
    margin: 16px 0 10px;
}

.player-controls button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 23px;
}

.player-controls #playerPlay {
    width: 70px;
    height: 70px;
    font-size: 28px;
    color: #fff;
    border: 0;
    background: linear-gradient(145deg,#64aaff,#347fe8);
    box-shadow: 0 10px 25px rgba(52,127,232,.3);
}

.player-controls #playbackMode {
    color: var(--accent);
    font-size: 25px;
    background: var(--accent-soft);
}

.playback-mode-row {
    min-height: 22px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 13px;
}

.mode-hint {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--muted);
    opacity: 1;
}

.mode-hint.visible {
    color: var(--accent);
}

.player-volume {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 13px;
}

.player-volume button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 20px;
}

.player-volume input {
    width: 100%;
    min-width: 0;
    height: 7px;
}

.volume-high {
    color: var(--muted);
    font-size: 19px;
    text-align: center;
}

[data-theme="dark"] .player-modal {
    border-color: var(--border);
    background: #1a2638;
}

[data-theme="dark"] .player-header button,
[data-theme="dark"] .player-favorite,
[data-theme="dark"] .player-volume button {
    background: #26364d;
}

@media (max-width: 560px) {
    .player-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .player-modal {
        width: 100%;
        max-width: 100%;
        max-height: min(88vh, 560px);
        padding: 15px 19px calc(19px + env(safe-area-inset-bottom));
        border-radius: 25px 25px 0 0;
    }

    .player-header {
        margin-bottom: 18px;
    }

    .player-track-info {
        min-height: 88px;
        gap: 12px;
        margin-bottom: 19px;
    }

    .player-cover {
        width: 88px;
        min-width: 88px;
        height: 88px;
        border-radius: 16px;
        font-size: 36px;
    }

    .player-track-info strong {
        font-size: 15px;
    }

    .player-track-info small {
        font-size: 12px;
        margin-top: 6px;
    }

    .player-favorite {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 23px;
    }

    .player-controls {
        gap: 3px;
        margin: 14px 0 9px;
    }

    .player-controls button {
        width: 39px;
        height: 39px;
        min-width: 39px;
        min-height: 39px;
        font-size: 19px;
    }

    .player-controls #playerPlay {
        width: 60px;
        height: 60px;
        font-size: 25px;
    }

    .player-controls #playbackMode {
        font-size: 22px;
    }

    .player-volume {
        grid-template-columns: 40px minmax(0, 1fr) 35px;
        gap: 9px;
    }

    .player-volume button {
        width: 40px;
        height: 40px;
    }
}

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

    .player-cover {
        width: 78px;
        min-width: 78px;
        height: 78px;
    }

    .player-track-info {
        gap: 9px;
    }

    .player-favorite {
        width: 36px;
        min-width: 36px;
        height: 36px;
    }

    .player-controls #playerPlay {
        width: 54px;
        height: 54px;
    }
}


/* ===== MusicTG: симметричные кнопки управления плеером ===== */
.player-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    gap: 8px;
    width: 100%;
    margin: 18px 0 12px;
}

.player-controls button {
    justify-self: center;
}

.player-controls .mode-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .16s ease;
}

.player-controls .mode-toggle.mode-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(54,137,245,.22);
    box-shadow: 0 5px 16px rgba(54,137,245,.16);
}

.player-controls .mode-toggle:active {
    transform: scale(.86);
}

.player-controls #playerPrev,
.player-controls #playerNext {
    color: var(--text);
}

.player-controls #playerPlay {
    grid-column: auto;
    justify-self: center;
}

.playback-mode-row {
    min-height: 20px;
    margin: 0 0 12px;
}

.mode-hint {
    transition: color .2s ease, opacity .2s ease;
}

@media (max-width: 560px) {
    .player-controls {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        margin: 14px 0 9px;
    }

    .player-controls .mode-toggle {
        width: 38px;
        height: 42px;
        min-width: 38px;
        min-height: 42px;
        font-size: 21px;
    }

    .player-controls button:not(#playerPlay) {
        width: 40px;
        min-width: 40px;
        height: 42px;
        min-height: 42px;
        font-size: 19px;
    }

    .player-controls #playerPlay {
        width: 58px;
        min-width: 58px;
        height: 58px;
        min-height: 58px;
        font-size: 25px;
    }
}

@media (max-width: 360px) {
    .player-controls {
        gap: 0;
    }

    .player-controls .mode-toggle,
    .player-controls button:not(#playerPlay) {
        width: 35px;
        min-width: 35px;
    }

    .player-controls #playerPlay {
        width: 54px;
        min-width: 54px;
        height: 54px;
        min-height: 54px;
    }
}

/* ===== Аккуратные SVG-иконки плеера ===== */

.player-header #closePlayer {
    display: grid;
    place-items: center;
}

.player-header #closePlayer svg {
    width: 25px;
    height: 25px;
    display: block;
    fill: none;
    stroke: var(--text);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.player-volume #muteButton {
    display: grid;
    place-items: center;
    padding: 0;
}

.player-volume #muteButton svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== Финальная настройка иконок звука и воспроизведения ===== */

.player-volume #muteButton svg,
.player-volume .volume-high svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.player-volume .volume-high {
    display: grid;
    place-items: center;
}

.player-controls #playerPlay {
    display: grid;
    place-items: center;
    padding: 0;
}

.player-controls #playerPlay svg {
    display: block;
    width: 29px;
    height: 29px;
    fill: currentColor;
}

.mini-play {
    display: grid;
    place-items: center;
}

.mini-play svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* SVG-иконки воспроизведения на плитках песен */

[data-play] {
    display: grid;
    place-items: center;
}

[data-play] svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
}


/* ===== Окно выбора плейлиста ===== */

.playlist-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 100005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 27, 44, .48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.playlist-picker-modal {
    width: 100%;
    max-width: 390px;
    max-height: min(80vh, 600px);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: playlistPickerIn .2s ease;
}

@keyframes playlistPickerIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.playlist-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 19px;
}

.playlist-picker-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 750;
}

.playlist-picker-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.playlist-picker-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--text);
    font-size: 24px;
}

.playlist-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-picker-item {
    width: 100%;
    min-height: 65px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
    transition: background .15s, transform .15s;
}

.playlist-picker-item:active {
    background: var(--accent-soft);
    transform: scale(.98);
}

.playlist-picker-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #78baff, #4389e9);
    color: white;
    font-size: 23px;
}

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

.playlist-picker-info strong,
.playlist-picker-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-picker-info strong {
    font-size: 13px;
}

.playlist-picker-info small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.playlist-picker-arrow {
    color: var(--muted);
    font-size: 25px;
}

.playlist-picker-empty {
    padding: 22px 12px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.playlist-picker-create {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.playlist-picker-create-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(54, 137, 245, .25);
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.playlist-picker-create-button span {
    font-size: 21px;
}

.playlist-picker-create-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-picker-create-form[hidden] {
    display: none;
}

.playlist-picker-name {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

.playlist-picker-name:focus {
    border-color: var(--accent);
}

.playlist-picker-confirm {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.playlist-picker-modal button:disabled {
    opacity: .55;
    cursor: default;
}

@media (max-width: 560px) {
    .playlist-picker-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .playlist-picker-modal {
        width: 100%;
        max-width: 100%;
        max-height: 78vh;
        padding: 22px 19px calc(20px + env(safe-area-inset-bottom));
        border-radius: 25px 25px 0 0;
    }
}


/* Прокрутка плейлистов мышью на компьютере */

@media (min-width: 700px) {
    .playlist-strip {
        scrollbar-width: thin;
        scrollbar-color: var(--accent) var(--surface-hover);
        cursor: grab;
        padding-bottom: 12px;
    }

    .playlist-strip::-webkit-scrollbar {
        display: block;
        height: 7px;
    }

    .playlist-strip::-webkit-scrollbar-track {
        background: var(--surface-hover);
        border-radius: 10px;
    }

    .playlist-strip::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 10px;
    }

    .playlist-strip::-webkit-scrollbar-thumb:hover {
        background: #2475dc;
    }
}


/* Перетаскивание карусели плейлистов на компьютере */

@media (min-width: 700px) {
    #playlistStrip {
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
        scroll-behavior: auto;
    }

    #playlistStrip.dragging {
        cursor: grabbing;
    }

    #playlistStrip.dragging .playlist-card,
    #playlistStrip.dragging .playlist-create-card {
        pointer-events: none;
    }
}

/* ===== Меню действий плейлиста ===== */

.playlist-detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.playlist-detail-actions .back-button {
    margin: 0;
}

.playlist-actions-wrapper {
    position: relative;
    flex-shrink: 0;
}

.playlist-more-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    font-size: 25px;
    line-height: 1;
    letter-spacing: 1px;
    padding: 0 0 7px;
    transition: background .15s, transform .15s;
}

.playlist-more-button:active {
    background: var(--accent-soft);
    transform: scale(.94);
}

.playlist-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    width: 220px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-solid);
    box-shadow: 0 12px 35px rgba(20,40,70,.2);
    animation: playlistMenuIn .14s ease;
}

.playlist-actions-menu[hidden] {
    display: none;
}

@keyframes playlistMenuIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-menu-item {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: 13px;
    font-weight: 550;
}

.playlist-menu-item:active {
    background: var(--surface-hover);
}

.playlist-menu-item.danger-text {
    color: #e05b66;
}

.playlist-menu-item + .playlist-menu-item {
    margin-top: 2px;
}

[data-theme="dark"] .playlist-actions-menu {
    box-shadow: 0 12px 35px rgba(0,0,0,.35);
}


/* Скрепка закреплённого плейлиста */

.playlist-card {
    position: relative;
}

.playlist-card-title {
    display: block;
    width: 100%;
    text-align: center;
}

.playlist-pin-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 13px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* Исправление центрирования кнопки смены темы */
.profile-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

#themeIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
}

/* Увеличиваем область кнопки избранного на телефонах */
@media (max-width: 600px) {
    .favorite-button {
        width: 40px;
        min-width: 40px;
        height: 36px;
        flex: 0 0 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }
}

/* ===== MusicTG: Liquid Glass для активного трека ===== */

/* Плавность строк */
.song-row {
    animation: none;
    position: relative;
    border-radius: 15px;
    transition:
        background .4s ease,
        border-color .4s ease,
        box-shadow .4s ease,
        padding .35s ease;
}

/* Стеклянная подсветка активной песни */
.song-row.current-track {
    padding-left: 9px;
    padding-right: 9px;
    margin: 5px 0;
    border: 1px solid rgba(54, 137, 245, .25);
    border-bottom: 1px solid rgba(54, 137, 245, .25);
    background: linear-gradient(
        110deg,
        rgba(91, 165, 255, .17),
        rgba(255, 255, 255, .52),
        rgba(91, 165, 255, .09)
    );
    box-shadow:
        0 5px 20px rgba(54, 137, 245, .09),
        inset 0 1px 0 rgba(255, 255, 255, .55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Активное название */
.song-row.current-track .song-details strong {
    color: var(--accent);
    transition: color .3s ease;
}

/* Мягкое свечение обложки */
.song-row.current-track .song-cover {
    box-shadow:
        0 5px 18px rgba(54, 137, 245, .28),
        0 0 0 3px rgba(54, 137, 245, .08);
    transition: box-shadow .35s ease;
}

/* Пульсация только во время воспроизведения */
.song-row.is-playing .song-cover {
    animation: musicCoverPulse 2.4s ease-in-out infinite;
}

@keyframes musicCoverPulse {
    0%, 100% {
        box-shadow:
            0 5px 18px rgba(54, 137, 245, .25),
            0 0 0 3px rgba(54, 137, 245, .07);
    }

    50% {
        box-shadow:
            0 6px 23px rgba(54, 137, 245, .4),
            0 0 0 5px rgba(54, 137, 245, .12);
    }
}

/* Тёмная тема */
[data-theme="dark"] .song-row.current-track {
    background: linear-gradient(
        110deg,
        rgba(75, 145, 235, .22),
        rgba(48, 67, 94, .55),
        rgba(75, 145, 235, .12)
    );
    border-color: rgba(101, 169, 255, .28);
    box-shadow:
        0 5px 22px rgba(0, 0, 0, .16),
        inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* Учитываем настройки уменьшения анимации */
@media (prefers-reduced-motion: reduce) {
    .song-row,
    .song-row.is-playing .song-cover {
        animation: none;
        transition: none;
    }
}

/* Плеер появляется без эффекта увеличения */
@keyframes playerFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.player-modal {
    animation: playerFadeIn .16s ease both !important;
}

/* Одинаковая ширина страницы на всех вкладках */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* ===== Красивое окно создания плейлиста ===== */

.playlist-create-overlay {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(20, 35, 58, .42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: playlistCreateFade .2s ease;
}

.playlist-create-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 30px 26px 25px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(20, 38, 65, .2);
    animation: playlistCreateIn .25s ease;
}

@keyframes playlistCreateFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes playlistCreateIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.playlist-create-close {
    position: absolute;
    top: 17px;
    right: 17px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--muted);
    font-size: 25px;
}

.playlist-create-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border-radius: 25px;
    background: linear-gradient(145deg, #61c7ff, #4169e8);
    color: white;
    font-size: 42px;
    box-shadow: 0 10px 25px rgba(54, 137, 245, .25);
}

.playlist-create-modal h2 {
    margin: 0;
    text-align: center;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.playlist-create-subtitle {
    margin: 8px 0 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.playlist-create-input-wrap {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(54, 137, 245, .06);
}

.playlist-create-input-wrap > span {
    color: var(--accent);
    font-size: 23px;
}

.playlist-create-input {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.playlist-create-input::placeholder {
    color: var(--muted);
}

.playlist-create-counter {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.playlist-create-label {
    margin: 22px 0 12px;
    font-size: 14px;
    font-weight: 750;
}

.playlist-create-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.playlist-create-color {
    position: relative;
    aspect-ratio: 1;
    border: 3px solid transparent;
    border-radius: 19px;
    background: var(--playlist-choice-color);
    box-shadow: 0 5px 14px rgba(40, 70, 110, .12);
    transition: transform .18s, border-color .18s;
}

.playlist-create-color:active {
    transform: scale(.94);
}

.playlist-create-color.selected {
    border-color: var(--surface-solid);
    outline: 2px solid var(--accent);
}

.playlist-create-color span {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 25px;
    height: 25px;
    display: none;
    place-items: center;
    border: 2px solid var(--surface-solid);
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 800;
}

.playlist-create-color.selected span {
    display: grid;
}

.playlist-create-submit,
.playlist-create-cancel {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 750;
}

.playlist-create-submit {
    background: linear-gradient(110deg, #399cf5, #2474ed);
    color: white;
    box-shadow: 0 8px 20px rgba(54, 137, 245, .2);
}

.playlist-create-cancel {
    margin-top: 12px;
    background: var(--accent-soft);
    color: var(--text);
}

.playlist-create-submit:disabled {
    opacity: .6;
}

[data-theme="dark"] .playlist-create-modal {
    background: #1b293d;
}

@media (max-width: 560px) {
    .playlist-create-overlay {
        align-items: center;
        padding: 14px;
    }

    .playlist-create-modal {
        padding: 27px 21px 21px;
        border-radius: 27px;
    }

    .playlist-create-color {
        border-radius: 16px;
    }
}

/* Количество песен — точно такого же цвета, как название плейлиста */
.playlist-card-meta .playlist-card-count {
    color: #fff !important;
}

/* Цвет текста на карточках плейлистов */
.playlist-card-meta .playlist-card-title,
.playlist-card-meta .playlist-card-count {
    color: var(--text) !important;
}

/* Компактные подписи плейлистов */
.playlist-card-meta {
    width: 132px;
    min-width: 132px;
    margin-top: 7px;
    text-align: center;
}

.playlist-card-meta .playlist-card-title {
    display: block;
    font-size: 12px;
    line-height: 15px;
    font-weight: 700;
    color: var(--text);
}

.playlist-card-meta .playlist-card-count {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    line-height: 13px;
    color: var(--text);
}


/* Новое оформление меню действий в плеере */
.context-menu.player-menu {
    min-width: 240px;
    padding: 8px;
    border-radius: 19px;
    background: var(--surface-solid);
    box-shadow: 0 12px 32px rgba(25, 45, 75, .18);
}

.context-menu.player-menu button {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.context-menu.player-menu button + button {
    border-top: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
}

.context-menu.player-menu .menu-icon-svg {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
}

.context-menu.player-menu .danger-text {
    color: #df514b !important;
}

.context-menu.player-menu button:active {
    background: var(--surface-hover);
}


/* Фиксированный размер иконок только в меню плеера */
.context-menu.player-menu svg.menu-icon-svg {
    display: block;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px;
    min-height: 23px;
    max-width: 23px;
    max-height: 23px;
    flex: 0 0 23px;
    overflow: visible;
}
.context-menu.player-menu button {
    box-sizing: border-box;
}


/* Иконки в меню редактирования плейлиста */
.playlist-actions-menu .playlist-menu-item {
    gap: 12px;
}

.playlist-actions-menu .playlist-menu-icon-svg {
    display: block;
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    flex: 0 0 19px;
    color: currentColor;
}

.playlist-actions-menu .playlist-menu-item span {
    display: block;
}

.playlist-actions-menu .playlist-menu-item.danger-text .playlist-menu-icon-svg {
    color: #e05b66;
}


/* ===== MusicTG: Apple-inspired Liquid Glass + плавный плеер ===== */

/* Более выразительные SVG-сердца в списке и в плеере */
.favorite-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--accent);
    transition: transform .22s cubic-bezier(.2,.8,.2,1), color .22s ease;
}

.favorite-icon {
    display: block;
    width: 25px;
    height: 25px;
    overflow: visible;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill .22s ease, transform .22s cubic-bezier(.2,.8,.2,1), stroke-width .22s ease;
}

.favorite-icon.is-favorite {
    fill: currentColor;
    stroke-width: 1.5;
}

.favorite-button:active .favorite-icon,
.player-favorite:active .favorite-icon {
    transform: scale(1.2);
}

.player-favorite {
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--accent);
    transition: transform .22s ease, background .22s ease;
}

.player-favorite .favorite-icon {
    width: 29px;
    height: 29px;
}

/* Стеклянная нижняя панель */
.bottom-nav {
    isolation: isolate;
    overflow: hidden;
    background: rgba(245, 249, 255, .68);
    border-color: rgba(255, 255, 255, .68);
    box-shadow:
        0 12px 34px rgba(42, 75, 119, .14),
        inset 0 1px 0 rgba(255, 255, 255, .78),
        inset 0 -1px 0 rgba(125, 158, 201, .10);
    backdrop-filter: blur(30px) saturate(1.65);
    -webkit-backdrop-filter: blur(30px) saturate(1.65);
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.bottom-nav::before,
.mini-player::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, .48) 0%,
        rgba(255, 255, 255, .12) 42%,
        rgba(255, 255, 255, .02) 100%);
}

.bottom-nav .nav-item {
    position: relative;
    z-index: 1;
    transition: color .28s ease, background .28s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}

.bottom-nav .nav-item.active {
    background: rgba(90, 157, 245, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48);
}

/* Стеклянный мини-плеер */
.mini-player {
    isolation: isolate;
    overflow: hidden;
    background: rgba(246, 250, 255, .66);
    border-color: rgba(255, 255, 255, .72);
    box-shadow:
        0 12px 32px rgba(42, 75, 119, .15),
        inset 0 1px 0 rgba(255, 255, 255, .82),
        inset 0 -1px 0 rgba(125, 158, 201, .10);
    backdrop-filter: blur(30px) saturate(1.7);
    -webkit-backdrop-filter: blur(30px) saturate(1.7);
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}

.mini-player > * {
    position: relative;
    z-index: 1;
}

.mini-play {
    transition: transform .2s cubic-bezier(.2,.8,.2,1), background .25s ease, box-shadow .25s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.mini-play:active {
    transform: scale(.9);
}

/* Тёмное стекло */
[data-theme="dark"] .bottom-nav {
    background: rgba(24, 36, 55, .68);
    border-color: rgba(180, 204, 235, .16);
    box-shadow: 0 12px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.10);
}

[data-theme="dark"] .mini-player {
    background: rgba(29, 44, 65, .70);
    border-color: rgba(180, 204, 235, .17);
    box-shadow: 0 12px 32px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.11);
}

[data-theme="dark"] .bottom-nav::before,
[data-theme="dark"] .mini-player::before {
    background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.025) 55%, transparent);
}

[data-theme="dark"] .bottom-nav .nav-item.active {
    background: rgba(101, 169, 255, .17);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

/* Плавное появление и закрытие полноэкранного плеера */
.player-overlay {
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(18, 34, 57, .34);
    backdrop-filter: blur(0px) saturate(1);
    -webkit-backdrop-filter: blur(0px) saturate(1);
    transition:
        opacity .34s ease,
        visibility 0s linear .34s,
        backdrop-filter .34s ease,
        -webkit-backdrop-filter .34s ease;
}

.player-overlay.open {
    display: flex !important;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    transition-delay: 0s;
}

.player-modal {
    opacity: 0;
    transform: translateY(22px) scale(.985);
    animation: none !important;
    transition:
        transform .38s cubic-bezier(.22,.8,.25,1),
        opacity .28s ease,
        background .3s ease,
        box-shadow .3s ease;
    will-change: transform, opacity;
}

.player-overlay.open .player-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Стеклянная поверхность самого плеера */
.player-modal {
    background: rgba(250, 252, 255, .88);
    border-color: rgba(255, 255, 255, .78);
    box-shadow:
        0 26px 80px rgba(18, 38, 68, .24),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    backdrop-filter: blur(34px) saturate(1.55);
    -webkit-backdrop-filter: blur(34px) saturate(1.55);
}

[data-theme="dark"] .player-modal {
    background: rgba(25, 39, 59, .92);
    border-color: rgba(190, 211, 239, .17);
    box-shadow: 0 26px 80px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.10);
}

/* Микроанимации элементов управления */
.player-controls button,
.player-header button,
.player-volume button {
    transition:
        transform .2s cubic-bezier(.2,.8,.2,1),
        background .25s ease,
        box-shadow .25s ease,
        color .25s ease;
}

.player-controls button:active,
.player-header button:active,
.player-volume button:active {
    transform: scale(.91);
}

.player-controls #playerPlay {
    box-shadow: 0 10px 25px rgba(52,127,232,.25), inset 0 1px 0 rgba(255,255,255,.35);
    transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, filter .25s ease;
}

.player-controls #playerPlay:active {
    transform: scale(.94);
    box-shadow: 0 5px 14px rgba(52,127,232,.22);
}

.player-cover {
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}

.player-overlay.open .player-cover {
    animation: coverArrive .55s .04s both cubic-bezier(.2,.8,.2,1);
}

@keyframes coverArrive {
    from { opacity: .65; transform: translateY(9px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .favorite-button {
        width: 42px;
        min-width: 42px;
        height: 40px;
        flex-basis: 42px;
    }

    .favorite-icon {
        width: 27px;
        height: 27px;
        stroke-width: 1.8;
    }

    .player-favorite .favorite-icon {
        width: 28px;
        height: 28px;
    }

    .bottom-nav {
        background: rgba(246, 250, 255, .64);
        backdrop-filter: blur(32px) saturate(1.7);
        -webkit-backdrop-filter: blur(32px) saturate(1.7);
    }

    .mini-player {
        background: rgba(246, 250, 255, .62);
        backdrop-filter: blur(32px) saturate(1.75);
        -webkit-backdrop-filter: blur(32px) saturate(1.75);
    }

    [data-theme="dark"] .bottom-nav { background: rgba(24, 36, 55, .66); }
    [data-theme="dark"] .mini-player { background: rgba(29, 44, 65, .68); }

    .player-overlay {
        align-items: flex-end;
    }

    .player-modal {
        transform: translateY(35px);
        border-radius: 25px 25px 0 0;
    }

    .player-overlay.open .player-modal {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .player-overlay,
    .player-modal,
    .player-cover,
    .favorite-icon,
    .favorite-button,
    .mini-player,
    .mini-play,
    .bottom-nav,
    .nav-item,
    .player-controls button,
    .player-header button,
    .player-volume button {
        animation: none !important;
        transition: none !important;
    }
}


/* ===== MusicTG: усиленное Liquid Glass и точечные исправления ===== */

/* Нижние панели: меньше белой заливки, больше видимого фона */
.bottom-nav {
    background: rgba(245, 249, 255, .40) !important;
    border-color: rgba(255, 255, 255, .58);
    backdrop-filter: blur(26px) saturate(1.8);
    -webkit-backdrop-filter: blur(26px) saturate(1.8);
}

.mini-player {
    background: rgba(246, 250, 255, .38) !important;
    border-color: rgba(255, 255, 255, .62);
    backdrop-filter: blur(26px) saturate(1.9);
    -webkit-backdrop-filter: blur(26px) saturate(1.9);
}

/* Сам плеер тоже должен пропускать фон, а не выглядеть непрозрачной карточкой */
.player-modal {
    background: rgba(247, 250, 255, .56) !important;
    border-color: rgba(255, 255, 255, .72);
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
}

[data-theme="dark"] .bottom-nav {
    background: rgba(24, 36, 55, .43) !important;
}

[data-theme="dark"] .mini-player {
    background: rgba(29, 44, 65, .44) !important;
}

[data-theme="dark"] .player-modal {
    background: rgba(19, 31, 49, .68) !important;
    border-color: rgba(190, 211, 239, .2);
}

/* В большом плеере оставляем только контур/заливку самого сердечка — без кнопки-круга */
.player-favorite {
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--accent);
}

.player-favorite .favorite-icon {
    width: 31px;
    height: 31px;
}

@media (max-width: 560px) {
    .player-favorite {
        width: 43px !important;
        min-width: 43px !important;
        height: 43px !important;
    }
}

/* На компьютере не двигаем и не масштабируем окно при открытии:
   это исключает артефакт повторной отрисовки правого края в Telegram Desktop */
@media (min-width: 561px) {
    .player-modal {
        transform: none !important;
        will-change: opacity;
        transition: opacity .24s ease !important;
        animation: none !important;
        backface-visibility: visible;
    }

    .player-overlay.open .player-modal {
        transform: none !important;
    }
}


/* ===== MusicTG: единая стеклянная поверхность большого плеера ===== */

/* Чуть более плотная и светлая поверхность: фон не спорит с текстом плеера */
.player-modal {
    background: rgba(250, 252, 255, .72) !important;
    border: 1px solid rgba(222, 233, 247, .42) !important;
    border-top-color: rgba(222, 233, 247, .38) !important;
    box-shadow:
        0 22px 64px rgba(31, 55, 88, .18),
        inset 0 1px 0 rgba(255, 255, 255, .22) !important;
    backdrop-filter: blur(30px) saturate(1.55) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.55) !important;
}

/* Верхний край больше не выглядит отдельной белой полосой */
.player-modal::before {
    content: none !important;
}

/* Кнопки управления — спокойное матовое стекло в тон панели */
.player-header button,
.player-volume #muteButton {
    background: rgba(232, 240, 251, .48) !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
    box-shadow:
        0 3px 12px rgba(48, 75, 112, .07),
        inset 0 1px 0 rgba(255, 255, 255, .22) !important;
    color: var(--text) !important;
    backdrop-filter: blur(14px) saturate(1.25);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

.player-header button:active,
.player-volume #muteButton:active {
    background: rgba(218, 231, 248, .62) !important;
    box-shadow: inset 0 1px 3px rgba(40, 65, 100, .08) !important;
}

/* У кнопки громкости убираем прежнюю яркую белую заливку */
.player-volume #muteButton {
    border-radius: 15px !important;
}

/* Тёмная тема */
[data-theme="dark"] .player-modal {
    background: rgba(34, 48, 68, .82) !important;
    border-color: rgba(176, 198, 226, .18) !important;
    border-top-color: rgba(176, 198, 226, .16) !important;
    box-shadow:
        0 22px 64px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}

[data-theme="dark"] .player-header button,
[data-theme="dark"] .player-volume #muteButton {
    background: rgba(105, 127, 157, .22) !important;
    border-color: rgba(190, 211, 239, .14) !important;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, .10),
        inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    color: #e8f0fb !important;
}

[data-theme="dark"] .player-header button:active,
[data-theme="dark"] .player-volume #muteButton:active {
    background: rgba(125, 151, 185, .30) !important;
}


/* ===== MusicTG: восстановление отклика плиток и финальная настройка плеера ===== */

/* Возвращаем прежнее поведение плиток песен: без выделения текста,
   с мягким нажатием на телефоне и подсветкой на компьютере. */
/* Не допускаем системного выделения текста при обычном нажатии на песню */
.song-row,
.song-row * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.song-row {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transform: translateZ(0);
    transition:
        transform .16s cubic-bezier(.2,.8,.2,1),
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

/* Тактильный отклик на телефоне и заметный hover/press на компьютере */
.song-row:active {
    transform: scale(.985);
    background-color: rgba(75, 145, 235, .10);
    border-radius: 14px;
}

@media (hover: hover) and (pointer: fine) {
    .song-row:hover {
        background-color: rgba(75, 145, 235, .07);
        border-radius: 14px;
    }

    .song-row:active {
        transform: scale(.992);
        background-color: rgba(75, 145, 235, .13);
    }
}

.song-row .song-details {
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

[data-theme="dark"] .song-row:active,
[data-theme="dark"] .song-row:hover {
    background-color: rgba(101, 169, 255, .12);
}

@media (prefers-reduced-motion: reduce) {
    .song-row { transition: none !important; }
}

/* Светлое жидкое стекло большого плеера.
   Убираем внутреннюю верхнюю засветку, которая выглядела отдельной белой полосой. */
.player-overlay {
    background: rgba(30, 48, 72, .22) !important;
}

.player-modal {
    background: rgba(247, 251, 255, .90) !important;
    border: 1px solid rgba(255, 255, 255, .48) !important;
    border-top-color: rgba(255, 255, 255, .38) !important;
    box-shadow: 0 22px 64px rgba(31, 55, 88, .18) !important;
    backdrop-filter: blur(32px) saturate(1.75) !important;
    -webkit-backdrop-filter: blur(32px) saturate(1.75) !important;
}

.player-modal::before {
    content: none !important;
}

/* Тёмную тему оставляем самостоятельной. */
[data-theme="dark"] .player-overlay {
    background: rgba(0, 0, 0, .38) !important;
}

[data-theme="dark"] .player-modal {
    background: rgba(31, 46, 67, .91) !important;
    border: 1px solid rgba(190, 211, 239, .20) !important;
    box-shadow: 0 22px 64px rgba(0, 0, 0, .32) !important;
}

/* Одинаковое положение плеера на компьютере и телефоне:
   панель выдвигается снизу окна Mini App, а не центрируется. */
@media (hover: hover) and (pointer: fine) {
    .player-overlay {
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .player-modal {
        width: 100% !important;
        max-width: 680px !important;
        max-height: min(88vh, 560px) !important;
        margin: 0 auto !important;
        border-radius: 25px 25px 0 0 !important;
        transform: none !important;
    }

    .player-overlay.open .player-modal {
        transform: none !important;
    }
}

/* На сенсорных устройствах сохраняем прежнее нижнее выдвижное положение. */
@media (hover: none), (pointer: coarse) {
    .player-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .player-modal {
        width: 100% !important;
        max-width: 680px !important;
        margin: 0 auto !important;
        border-radius: 25px 25px 0 0 !important;
    }
}

/* Радио */
.radio-tools{margin:0 0 22px}.radio-search{margin-bottom:11px}.radio-filter-row{display:flex;gap:9px}.radio-filter-row select{flex:1;min-width:0;padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--text);font-size:12px;outline:none}.radio-favorites-section{margin:0 0 24px}.radio-list{display:flex;flex-direction:column}.radio-row{display:flex;align-items:center;gap:9px;min-height:91px;border-bottom:1px solid var(--border);padding:9px 2px}.radio-station-main{display:flex;align-items:center;gap:13px;flex:1;min-width:0;text-align:left;border:0;background:transparent;color:var(--text);padding:0}.radio-logo{width:70px;height:70px;flex-shrink:0;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:var(--accent-soft);color:var(--accent);font-size:30px}.radio-logo img{width:100%;height:100%;object-fit:contain;background:#fff}.radio-station-info{display:block;min-width:0}.radio-station-info strong,.radio-station-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.radio-station-info strong{font-size:14px;font-weight:650}.radio-station-info small{font-size:12px;color:var(--muted);margin-top:5px}.radio-favorite-button{width:38px;height:42px;flex-shrink:0;border:0;background:transparent;color:var(--accent);font-size:27px}.radio-favorite-button.active{font-size:25px}.radio-now-panel{position:sticky;bottom:145px;z-index:8;margin:18px 0 4px;padding:13px 15px;border:1px solid var(--border);border-radius:17px;background:var(--surface-solid);box-shadow:var(--shadow)}.radio-now-panel[hidden]{display:none}.radio-now-heading strong,.radio-now-heading small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.radio-now-heading strong{font-size:13px}.radio-now-heading small{font-size:11px;color:var(--muted);margin-top:3px}.radio-now-controls{display:flex;align-items:center;gap:12px;margin-top:9px}.radio-now-controls button{border:0;background:transparent;color:var(--accent);font-size:19px}.radio-now-controls input{flex:1;min-width:0;accent-color:var(--accent)}.mini-cover img{width:100%;height:100%;object-fit:cover;border-radius:inherit}


/* Статус доступности интернет-радиостанции */
.radio-availability {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 600;
}
.radio-availability.available {
    color: #16834a;
    background: rgba(35, 190, 112, .12);
}
.radio-availability.unavailable {
    color: #c43e45;
    background: rgba(220, 65, 75, .12);
}
.radio-availability.unknown {
    color: #8a93a2;
    background: rgba(130, 145, 165, .12);
}

/* Radio filters — match MusicTG controls */
.radio-filter-row select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    width: 100%;
    padding: 13px 40px 13px 15px;
    border: 1px solid var(--border, rgba(132,163,205,.25));
    border-radius: 16px;
    color: var(--text, #18243a);
    background-color: var(--surface-solid, #fff);
    box-shadow: 0 5px 16px rgba(35, 75, 125, .07);
    font: inherit;
    font-size: 14px;
    outline: none;
}
.radio-filter-row { gap: 10px; }
.radio-filter-row select:focus { border-color: var(--accent, #3689f5); box-shadow: 0 0 0 3px var(--accent-soft, #e5f1ff); }

/* Radio mode: hide controls that do not apply to live streams */
body.radio-playing #playerMore,
body.radio-playing #shuffleModeButton,
body.radio-playing #repeatModeButton,
body.radio-playing #playerPrev,
body.radio-playing #playerNext,
body.radio-playing .player-progress,
body.radio-playing .playback-mode-row { display: none !important; }
body.radio-playing .player-controls { justify-content: center; }
body.radio-playing #playerPlay { margin: 0 auto; }


/* Radio filters: native Android select replacement */
.radio-filter{position:relative;flex:1;min-width:0}
.radio-filter-trigger{width:100%;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 14px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);font:inherit;font-size:13px;box-shadow:var(--shadow)}
.radio-filter-trigger span{color:var(--muted);font-size:17px}
.radio-filter-menu{position:absolute;z-index:30;top:calc(100% + 7px);left:0;right:0;max-height: min(48vh, 330px);overflow:auto;padding:6px;border:1px solid var(--border);border-radius:15px;background:var(--surface-solid);box-shadow:0 12px 32px rgba(25,45,75,.2)}
.radio-filter-menu[hidden]{display:none}
.radio-filter-menu button{display:block;width:100%;padding:11px 12px;text-align:left;border:0;border-radius:10px;background:transparent;color:var(--text);font:inherit;font-size:13px}
.radio-filter-menu button.selected{background:var(--accent-soft);color:var(--accent);font-weight:700}
.radio-mode-hidden{display:none!important}
.radio-mode-controls{gap:0!important}
.mini-play svg,.player-controls #playerPlay svg,.player-volume button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}


/* Refined expanded radio player */
body.radio-playing .player-modal {
    padding: 24px 26px calc(30px + env(safe-area-inset-bottom));
}
body.radio-playing .player-header {
    margin-bottom: 22px;
}
body.radio-playing .player-track-info {
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}
body.radio-playing .player-cover {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    border-radius: 22px;
}
body.radio-playing .player-controls.radio-mode-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 0 !important;
    margin: 24px 0 28px;
}
/* In radio mode the side speaker decorations are redundant; keep only the centered Play/Pause. */
body.radio-playing .player-controls .radio-control-side {
    display: none !important;
}
body.radio-playing .player-controls #playerPlay {
    width: 82px;
    height: 82px;
    min-width: 82px;
    min-height: 82px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #78b8ff, #287ce8);
    box-shadow: 0 12px 28px rgba(48, 132, 239, .28);
}
body.radio-playing .player-controls #playerPlay svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.radio-control-side {
    display: none;
}
body.radio-playing .radio-control-side {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.radio-control-side svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.radio-playing .player-volume {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
body.radio-playing .player-volume #muteButton {
    width: 30px;
    height: 36px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
body.radio-playing .player-volume #muteButton svg,
body.radio-playing .player-volume .volume-high svg {
    width: 24px;
    height: 24px;
}
body.radio-playing .player-volume .volume-high {
    display: flex;
    align-items: center;
    justify-content: center;
}
body.radio-playing .player-volume input {
    min-width: 0;
}
@media (max-width: 420px) {
    body.radio-playing .player-modal {
        padding-left: 20px;
        padding-right: 20px;
    }
    body.radio-playing .player-cover {
        flex-basis: 88px;
        width: 88px;
        height: 88px;
    }
    body.radio-playing .player-controls.radio-mode-controls {
        margin: 20px 0 24px;
        gap: 6px !important;
    }
    body.radio-playing .player-controls #playerPlay {
        width: 72px;
        height: 72px;
        min-width: 72px;
        min-height: 72px;
    }
}


/* Радио: мягкое выделение выбранной и играющей станции */
.radio-row {
    position: relative;
    border: 1px solid transparent;
    border-radius: 15px;
    padding-left: 7px;
    padding-right: 7px;
    transition:
        background .35s ease,
        border-color .35s ease,
        box-shadow .35s ease,
        transform .2s ease;
}
.radio-row.radio-current {
    background: linear-gradient(
        110deg,
        rgba(91, 165, 255, .17),
        rgba(255, 255, 255, .48),
        rgba(91, 165, 255, .08)
    );
    border-color: rgba(54, 137, 245, .25);
    box-shadow:
        0 5px 20px rgba(54, 137, 245, .09),
        inset 0 1px 0 rgba(255, 255, 255, .55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.radio-row.radio-current .radio-station-info strong {
    color: var(--accent);
    transition: color .3s ease;
}
.radio-row.radio-playing .radio-logo {
    box-shadow: 0 5px 18px rgba(54, 137, 245, .25), 0 0 0 3px rgba(54, 137, 245, .08);
    animation: radioLogoPulse 2.4s ease-in-out infinite;
}
@keyframes radioLogoPulse {
    0%, 100% { box-shadow: 0 5px 18px rgba(54, 137, 245, .22), 0 0 0 3px rgba(54, 137, 245, .07); }
    50% { box-shadow: 0 6px 23px rgba(54, 137, 245, .38), 0 0 0 5px rgba(54, 137, 245, .12); }
}
[data-theme="dark"] .radio-row.radio-current {
    background: linear-gradient(110deg, rgba(75, 145, 235, .22), rgba(48, 67, 94, .55), rgba(75, 145, 235, .12));
    border-color: rgba(101, 169, 255, .28);
    box-shadow: 0 5px 22px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .07);
}
@media (prefers-reduced-motion: reduce) {
    .radio-row, .radio-row.radio-playing .radio-logo { animation: none !important; transition: none !important; }
}


/* Радио: hover-подсветка плиток на компьютере — в стиле главной */
@media (hover: hover) and (pointer: fine) {
    .radio-row {
        border-radius: 14px;
        transition:
            background-color .16s ease,
            border-color .16s ease,
            box-shadow .16s ease;
    }

    .radio-row:hover {
        background-color: rgba(75, 145, 235, .07);
        border-radius: 14px;
    }

    .radio-row:active {
        background-color: rgba(75, 145, 235, .13);
    }

    [data-theme="dark"] .radio-row:hover {
        background-color: rgba(101, 169, 255, .12);
    }

    [data-theme="dark"] .radio-row:active {
        background-color: rgba(101, 169, 255, .17);
    }
}

@media (prefers-reduced-motion: reduce) {
    .radio-row {
        transition: none !important;
    }
}


/* Профиль MusicTG */
.profile-heading { margin-bottom: 18px; }
.profile-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.profile-card, .profile-links-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 17px;
    margin-bottom: 14px;
}
.profile-account-card { display:flex; align-items:center; gap:14px; }
.profile-avatar {
    width:58px; height:58px; flex:0 0 58px; border-radius:50%;
    position:relative; overflow:hidden; display:grid; place-items:center;
    color:#fff; font-size:29px; font-weight:700;
    background:linear-gradient(135deg,#55a8ff,#6875ed);
    box-shadow:0 7px 18px rgba(65,130,220,.24);
}
.profile-avatar-photo { width:100%; height:100%; display:block; object-fit:cover; border-radius:50%; }
.profile-avatar-fallback { display:grid; place-items:center; width:100%; height:100%; }
.profile-avatar-fallback[hidden] { display:none; }
.profile-account-info { min-width:0; display:flex; flex-direction:column; gap:4px; }
.profile-account-info strong { font-size:16px; overflow-wrap:anywhere; }
.profile-account-info > span { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.profile-account-info small { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.profile-account-info .profile-private-note { color:var(--muted); display:flex; align-items:center; gap:4px; }
.profile-account-info .profile-private-note svg { width:11px; height:11px; flex:0 0 11px; fill:none; stroke:currentColor; stroke-width:1.35; stroke-linecap:round; stroke-linejoin:round; }
.profile-card-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.profile-card h3 { margin:0; font-size:16px; }
.profile-crown { color:#d9a441; font-size:23px; vertical-align:-2px; margin-right:5px; }
.profile-status { border-radius:999px; padding:5px 10px; font-size:10px; font-weight:800; letter-spacing:.4px; }
.profile-status.free { color:var(--muted); background:var(--surface-hover); }
.profile-status.premium { color:#16784f; background:rgba(32,173,112,.13); }
.profile-card-description { color:var(--muted); font-size:13px; line-height:1.45; margin:11px 0 13px; }
.profile-benefits { display:grid; gap:9px; font-size:13px; }
.profile-benefits > div { display:flex; align-items:center; gap:9px; }
.profile-benefits > div > span { width:14px; flex:0 0 14px; text-align:center; font-weight:800; }
.profile-benefits > div.unavailable > span { color:#e06464; }
.profile-benefits > div.available > span { color:#20ad70; }
.profile-note { margin:14px 0 0; padding-top:12px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; line-height:1.45; }
.profile-settings-card h3 { margin-bottom:13px; }
.profile-setting-row { display:flex; width:100%; align-items:center; gap:12px; min-height:58px; border:0; border-top:1px solid var(--border); padding:11px 0; background:transparent; color:var(--text); text-align:left; }
.profile-setting-icon { width:34px; flex:0 0 34px; color:var(--accent); font-size:25px; text-align:center; }
.profile-setting-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.profile-setting-copy strong { font-size:13px; font-weight:700; }
.profile-setting-copy small { color:var(--muted); font-size:11px; line-height:1.35; }
.profile-theme-switch { display:flex; padding:3px; border:1px solid var(--border); border-radius:999px; background:var(--surface-hover); }
.profile-theme-switch button { width:34px; height:31px; border:0; border-radius:999px; background:transparent; color:var(--muted); font-size:17px; }
.profile-theme-switch button.active { color:#fff; background:var(--accent); box-shadow:0 2px 8px rgba(54,137,245,.25); }
.profile-locked-row { cursor:not-allowed; opacity:.78; }
.profile-lock { color:var(--muted); font-size:17px; }
.profile-links-card { padding:4px 16px; }
.profile-link-row { min-height:51px; display:flex; align-items:center; gap:12px; font-size:13px; }
.profile-link-row + .profile-link-row { border-top:1px solid var(--border); }
.profile-link-row > span:first-child { width:24px; color:var(--accent); font-size:19px; text-align:center; }
.profile-link-row strong { flex:1; font-weight:650; }
.profile-chevron { color:var(--muted); font-size:23px; }
.profile-version { text-align:center; color:var(--muted); font-size:11px; margin:19px 0 8px; }

/* Панель разработчика MusicTG */
.developer-entry-card { display:flex; width:100%; align-items:center; gap:12px; text-align:left; color:var(--text); cursor:pointer; }
.developer-entry-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 38px; border-radius:13px; color:#b98225; background:rgba(217,164,65,.14); font-size:23px; }
.developer-entry-copy { min-width:0; flex:1; display:flex; flex-direction:column; gap:4px; }
.developer-entry-copy strong { font-size:14px; }
.developer-entry-copy small { color:var(--muted); font-size:11px; }
.developer-back { border:0; background:transparent; color:var(--accent); font:inherit; font-size:13px; font-weight:700; padding:8px 0; }
.developer-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.developer-stats .profile-card { margin-bottom:12px; display:flex; flex-direction:column; gap:5px; }
.developer-stats strong { font-size:25px; }
.developer-stats small, .developer-row small { color:var(--muted); font-size:11px; }
.developer-row { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.developer-row > div { display:flex; flex-direction:column; gap:5px; }
.developer-toggle { position:relative; width:48px; height:28px; flex:0 0 48px; }
.developer-toggle input { opacity:0; width:0; height:0; }
.developer-toggle span { position:absolute; inset:0; border-radius:20px; background:var(--surface-hover); border:1px solid var(--border); transition:.2s; }
.developer-toggle span:before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; border-radius:50%; background:var(--muted); transition:.2s; }
.developer-toggle input:checked + span { background:rgba(32,173,112,.22); border-color:rgba(32,173,112,.4); }
.developer-toggle input:checked + span:before { transform:translateX(20px); background:#20ad70; }
.developer-search-card h3, .developer-user-card h4 { margin:0 0 12px; font-size:15px; }
.developer-search-card form { display:flex; gap:8px; }
.developer-input, .developer-user-card input, .developer-user-card select, .developer-user-card textarea { width:100%; min-width:0; border:1px solid var(--border); border-radius:12px; background:var(--surface-solid); color:var(--text); padding:12px; font:inherit; font-size:13px; outline:none; }
.developer-input:focus, .developer-user-card input:focus, .developer-user-card select:focus, .developer-user-card textarea:focus { border-color:var(--accent); }
.developer-primary { border:0; border-radius:12px; padding:11px 15px; background:var(--accent); color:#fff; font:inherit; font-size:13px; font-weight:700; white-space:nowrap; }
.developer-user-card { margin-top:15px; padding-top:15px; border-top:1px solid var(--border); }
.developer-user-head { display:flex; align-items:center; gap:13px; margin-bottom:15px; }
.developer-avatar { width:58px; height:58px; flex:0 0 58px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:var(--surface-hover); color:var(--accent); font-size:25px; }
.developer-avatar img { width:100%; height:100%; object-fit:cover; }
.developer-user-name { min-width:0; display:flex; flex-direction:column; gap:4px; }
.developer-user-name strong { font-size:15px; }
.developer-user-name small { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.developer-user-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; padding:12px; margin-bottom:17px; border-radius:13px; background:var(--surface-hover); font-size:12px; }
.developer-user-meta span { color:var(--muted); }
.developer-user-meta strong { text-align:right; overflow-wrap:anywhere; }
.developer-user-card form { display:grid; gap:10px; margin-bottom:14px; }
.developer-user-card form label { display:grid; gap:6px; color:var(--muted); font-size:11px; }
.developer-user-card form button { width:100%; }
.developer-user-card textarea { resize:vertical; }
.developer-actions { display:flex; gap:8px; flex-wrap:wrap; }
.developer-actions button { border:1px solid var(--border); border-radius:11px; background:var(--surface-hover); color:var(--text); padding:9px 11px; font:inherit; font-size:12px; }
.developer-history-item { padding:10px 0; border-top:1px solid var(--border); display:grid; gap:4px; font-size:12px; }
.developer-history-item small { color:var(--muted); }
.developer-history-item p { margin:3px 0 0; color:var(--text); }
.developer-error { color:#d45b5b; font-size:13px; line-height:1.45; }
@media (max-width:380px) { .developer-search-card form { flex-direction:column; } }

/* Массовая выдача Premium: поля идут вертикально и не сжимаются в мобильной панели. */
.premium-campaign-card { min-width:0; }
.developer-search-card form.premium-campaign-form { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; width:100%; }
.premium-campaign-form label { display:grid; gap:6px; min-width:0; color:var(--text); font-size:13px; font-weight:600; }
.premium-campaign-form input,
.premium-campaign-form select,
.premium-campaign-form textarea { box-sizing:border-box; width:100%; min-width:0; min-height:44px; border:1px solid var(--border); border-radius:12px; padding:11px 12px; background:var(--surface-solid); color:var(--text); font:inherit; font-size:14px; }
.premium-campaign-form select { white-space:normal; }
.premium-campaign-form textarea { min-height:76px; resize:vertical; }
.premium-campaign-form .developer-primary { width:100%; min-height:44px; white-space:normal; }
.premium-campaign-preview { display:grid; gap:10px; margin-top:12px; }
.premium-campaign-preview:empty { display:none; }
.premium-campaign-preview .profile-note { margin:0; }
.premium-campaign-preview .developer-primary { width:100%; min-height:44px; white-space:normal; }


/* FREE/PREMIUM access states */
.entitlement-lock-label{display:block!important;margin-top:4px;color:var(--muted);font-size:11px!important;font-weight:600}
.song-row.entitlement-locked{opacity:.78}
.song-row.entitlement-locked .song-play:disabled{opacity:.7;cursor:not-allowed}
.playlist-card.entitlement-locked{filter:saturate(.55);opacity:.72}
.playlist-picker-item.entitlement-locked{opacity:.58;cursor:not-allowed}
.radio-row.entitlement-locked .radio-favorite-button:disabled{opacity:.7;cursor:not-allowed}

.radio-rank{display:inline-block;margin-right:5px;color:var(--accent);font-size:11px;font-weight:800;vertical-align:1px}
.radio-catalog-note{margin:7px 0 12px;font-size:11px;line-height:1.45}
.playlist-create-card:disabled{opacity:.6;cursor:not-allowed}
.radio-availability.available::before{content:"●";margin-right:4px;font-size:8px}
.radio-availability.unavailable::before{content:"⊘";margin-right:4px;font-size:11px}
.radio-availability.unknown::before{content:"◌";margin-right:4px;font-size:10px}

/* ===== Правки интерфейса: поиск, радио, плеер и прокрутка ===== */
.search-box { min-width: 0; }
.search-box input { min-width: 0; flex: 1 1 auto; }
.search-clear {
    width: 28px; min-width: 28px; height: 28px;
    display: grid; place-items: center; flex: 0 0 28px;
    padding: 0; border: 0; border-radius: 50%;
    background: var(--surface-hover); color: var(--muted);
    font-size: 21px; line-height: 1;
}
.search-clear[hidden] { display: none !important; }
.search-clear:active { background: var(--accent-soft); color: var(--accent); }

.radio-filter-trigger .radio-filter-chevron {
    display: grid; place-items: center; width: 22px; min-width: 22px;
    height: 22px; margin-left: auto; color: var(--muted); font-size: 0;
}
.radio-filter-trigger .radio-filter-chevron svg {
    display: block; width: 20px; height: 20px; fill: none;
    stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round;
}

.radio-logo-fallback-wrap {
    position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 72% 24%, rgba(255,255,255,.27), transparent 31%),
        linear-gradient(145deg, #315f9f 0%, #263c78 48%, #512f83 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 5px 16px rgba(42,67,125,.2);
}
.radio-logo-fallback-wrap::before,
.radio-logo-fallback-wrap::after {
    content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%; pointer-events: none;
}
.radio-logo-fallback-wrap::before { width: 76px; height: 76px; right: -28px; top: -30px; }
.radio-logo-fallback-wrap::after { width: 48px; height: 48px; left: -20px; bottom: -20px; }
.radio-logo-fallback {
    position: relative; z-index: 1; display: grid; place-items: center;
    width: 100%; height: 100%; color: #fff; font-size: 34px;
    font-weight: 500; text-shadow: 0 2px 9px rgba(0,0,0,.2);
}
.radio-logo-fallback-wrap img { display: none; }

.player-controls #playerPlay {
    display: grid; place-items: center; padding: 0;
    color: #111827 !important;
}
.player-controls #playerPlay svg {
    display: block; width: 29px; height: 29px;
    fill: #111827 !important; stroke: none !important;
}
.player-controls #playerPlay svg path,
.player-controls #playerPlay svg rect {
    fill: #111827 !important; stroke: none !important;
}

.scroll-to-top {
    position: fixed; z-index: 45;
    right: max(20px, calc((100vw - 520px) / 2 + 20px));
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: 50%;
    background: var(--surface-solid); color: var(--text);
    box-shadow: 0 5px 20px rgba(20, 42, 75, .2);
    backdrop-filter: blur(14px); transition: opacity .18s ease, transform .18s ease;
}
.scroll-to-top[hidden] { display: none !important; }
.scroll-to-top svg {
    width: 21px; height: 21px; fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.scroll-to-top:active { transform: scale(.94); }

.radio-logo-fallback { display: none; }
.radio-logo-fallback-wrap .radio-logo-fallback { display: grid; }


/* === Точечные исправления после проверки на телефоне и ПК === */

/* Меню трёх точек: компактные строки и фиксированный размер SVG */
#contextMenu:not(.player-menu) {
    box-sizing: border-box;
    width: 240px;
    min-width: 240px;
    max-width: calc(100vw - 16px);
    padding: 7px;
}
#contextMenu:not(.player-menu) > button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    min-height: 46px;
    height: auto;
    padding: 9px 11px;
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
}
#contextMenu:not(.player-menu) > button .menu-icon-svg {
    display: block;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex: 0 0 22px !important;
}

/* Кнопка прокрутки выше мини-плеера, с полупрозрачным glass-эффектом */
.scroll-to-top {
    bottom: calc(230px + env(safe-area-inset-bottom)) !important;
    background: rgba(255, 255, 255, .48) !important;
    border: 1px solid rgba(255, 255, 255, .68) !important;
    color: var(--text) !important;
    box-shadow:
        0 8px 24px rgba(31, 56, 92, .13),
        inset 0 1px 0 rgba(255, 255, 255, .72) !important;
    -webkit-backdrop-filter: blur(20px) saturate(165%) !important;
    backdrop-filter: blur(20px) saturate(165%) !important;
}

/* Крестик поиска: центрируем сам символ независимо от метрик шрифта */
.search-box .search-clear {
    box-sizing: border-box !important;
    position: relative !important;
    display: block !important;
    align-self: center !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    font-size: 0 !important;
    line-height: 0 !important;
    vertical-align: middle;
}
.search-box .search-clear::before {
    content: "×";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -53%);
    display: block;
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

/* Подпись фильтра занимает свободное место, SVG-стрелка остаётся отдельным элементом */
.radio-filter-trigger .radio-filter-label {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Фильтры радио: закрепляем оформление при каждом повторном рендере раздела */
.radio-filter-row .radio-filter .radio-filter-trigger {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    font: inherit !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    box-shadow: var(--shadow) !important;
    text-align: left !important;
}
.radio-filter-row .radio-filter .radio-filter-trigger .radio-filter-chevron {
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    font-size: 0 !important;
}
.radio-filter-row .radio-filter .radio-filter-trigger .radio-filter-chevron svg {
    display: block !important;
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    margin: 0 !important;
}


/* MusicTG: branded confirmation dialogs */
.music-confirm-overlay {
    position: fixed; inset: 0; z-index: 100020;
    display: grid; place-items: center;
    padding: 18px;
    background: rgba(18, 31, 52, .42);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    animation: playlistCreateFade .18s ease;
}
.music-confirm-modal {
    width: min(100%, 390px); box-sizing: border-box;
    padding: 26px 24px 22px; position: relative;
    border: 1px solid var(--border); border-radius: 28px;
    background: var(--surface-solid); color: var(--text);
    box-shadow: 0 24px 70px rgba(20,38,65,.22);
    text-align: center; animation: playlistCreateIn .22s ease;
}
.music-confirm-close {
    position: absolute; top: 13px; right: 13px;
    width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: var(--surface-hover); color: var(--muted); font-size: 23px;
}
.music-confirm-icon {
    width: 62px; height: 62px; margin: 0 auto 15px;
    display: grid; place-items: center; border-radius: 21px;
    color: white; background: linear-gradient(145deg,#61c7ff,#4169e8);
    box-shadow: 0 9px 22px rgba(54,137,245,.22);
}
.music-confirm-icon.danger { background: linear-gradient(145deg,#ff9b9b,#ed5b70); box-shadow: 0 9px 22px rgba(237,91,112,.2); }
.music-confirm-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.music-confirm-modal h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.45px; }
.music-confirm-message { margin: 10px 0 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.music-confirm-detail { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.music-confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.music-confirm-actions button { flex: 1; min-height: 46px; border: 0; border-radius: 15px; font-size: 13px; font-weight: 750; }
.music-confirm-cancel { background: var(--accent-soft); color: var(--text); }
.music-confirm-accept { background: linear-gradient(110deg,#399cf5,#2474ed); color: #fff; }
.music-confirm-accept.danger { background: linear-gradient(110deg,#f18491,#df5269); }

.music-lock-icon { width: 17px; height: 17px; display: inline-block; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.playlist-card-icon .music-lock-icon { width: 25px; height: 25px; vertical-align: middle; }
.playlist-create-card .music-lock-icon { width: 20px; height: 20px; vertical-align: middle; }
.song-play .music-lock-icon { width: 17px; height: 17px; }

@media (max-width: 600px) {
    .playlist-create-overlay {
        align-items: center;
        padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
        overflow-y: auto;
    }
    .playlist-create-modal {
        width: 100%; max-width: 420px;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto; overscroll-behavior: contain;
        padding: 19px 17px 16px; border-radius: 25px;
    }
    .playlist-create-icon { width: 58px; height: 58px; margin-bottom: 10px; border-radius: 19px; font-size: 33px; }
    .playlist-create-modal h2 { font-size: 22px; }
    .playlist-create-subtitle { margin: 5px 0 15px; font-size: 12px; }
    .playlist-create-input-wrap { min-height: 50px; }
    .playlist-create-colors { gap: 9px; margin-bottom: 16px; }
    .playlist-create-color { border-radius: 15px; }
    .playlist-create-submit, .playlist-create-cancel { min-height: 46px; border-radius: 14px; }
    .playlist-create-cancel { margin-top: 8px; }
}


/* Точечные исправления: поиск и модальное окно подтверждения */
.search-box .search-clear[hidden],
.search-clear[hidden] {
    display: none !important;
}
.music-confirm-close {
    display: grid !important;
    place-items: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
}
.music-confirm-close::before {
    content: "×";
    display: block;
    font-family: Arial, sans-serif;
    font-size: 24px !important;
    font-weight: 400;
    line-height: 1;
    color: var(--text);
    transform: translateY(-1px);
}
.music-confirm-close {
    font-size: 0 !important;
}

/* Search clear control: keep the native hidden state authoritative on all devices. */
.search-box .search-clear:not([hidden]) {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.search-box .search-clear[hidden] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Final visual polish: remove pale button rims in dark mode. */
[data-theme="dark"] .scroll-to-top {
    background: #172b49 !important;
    color: #e7f0ff !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28) !important;
}
[data-theme="dark"] .mini-play {
    background: #17365f !important;
    color: #79b7ff !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.mini-play:focus,
.mini-play:focus-visible,
.scroll-to-top:focus,
.scroll-to-top:focus-visible {
    outline: none !important;
}
.mini-play {
    border: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Search clear button: robust visible glyph on desktop and mobile. */
.search-box .search-clear {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: var(--muted) !important;
}
.search-box .search-clear::before {
    content: "×";
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -53%);
    font: 400 23px/1 Arial, sans-serif !important;
    color: currentColor !important;
}
.search-box .search-clear[hidden] {
    display: none !important;
}
.search-box .search-clear:not([hidden]) {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Floating bulk actions: shown only after the in-list toolbar scrolls away. */
.bulk-action-dock {
    position: fixed;
    left: 50%;
    bottom: calc(145px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 12;
    width: min(560px, calc(100% - 28px));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(20, 40, 70, .18);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}
.bulk-action-dock[hidden] { display: none !important; }
.bulk-action-dock span {
    flex: 1;
    min-width: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}
.bulk-action-dock button {
    min-height: 38px;
    padding: 0 11px;
    border: 0;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.bulk-action-dock #bulkDockDelete { color: #df5965; background: rgba(224, 89, 101, .11); }
.bulk-action-dock #bulkDockCancel { color: var(--muted); background: var(--surface-hover); }
@media (max-width: 430px) {
    .bulk-action-dock { gap: 5px; padding: 8px; }
    .bulk-action-dock button { padding: 0 8px; font-size: 11px; }
    .bulk-action-dock span { font-size: 11px; }
}


/* SoundSpace: системная плитка «Избранное» */
.favorite-playlist-card {
    background: linear-gradient(145deg, #c5e4ff 0%, #a8d4ff 48%, #8dc4ff 100%);
    border: 1px solid rgba(255,255,255,.72);
    color: #fff;
    box-shadow: 0 8px 22px rgba(75,145,220,.18), inset 0 1px 0 rgba(255,255,255,.55);
}
.favorite-playlist-card:active { transform: scale(.97); }
.favorite-playlist-icon { font-size: 31px; color: #fff; text-shadow: 0 2px 8px rgba(54,137,245,.22); }
.favorite-playlist-wrap .playlist-card-title { color: var(--text); }
.favorite-playlist-wrap .playlist-card-count { color: var(--muted); }

/* Одинаковая голубая палитра плавающих панелей выделения в библиотеке и плейлистах */
.bulk-action-dock button { background: var(--accent-soft); color: var(--accent); }
.bulk-action-dock #bulkDockDelete,
.bulk-action-dock #playlistBulkDockDelete { color: var(--accent); background: var(--accent-soft); }
.bulk-action-dock #bulkDockCancel,
.bulk-action-dock #playlistBulkDockCancel { color: var(--accent); background: var(--accent-soft); }


/* SoundSpace: системная плитка «Избранное» */
.favorite-playlist-card {
    background: linear-gradient(145deg, #c5e4ff 0%, #a8d4ff 48%, #8dc4ff 100%);
    border: 1px solid rgba(255,255,255,.72);
    color: #fff;
    box-shadow: 0 8px 22px rgba(75,145,220,.18), inset 0 1px 0 rgba(255,255,255,.55);
}
.favorite-playlist-card:active { transform: scale(.97); }
.favorite-playlist-icon { font-size: 31px; color: #fff; text-shadow: 0 2px 8px rgba(54,137,245,.22); }
.favorite-playlist-wrap .playlist-card-title { color: var(--text); }
.favorite-playlist-wrap .playlist-card-count { color: var(--muted); }

/* Одинаковая голубая палитра плавающих панелей выделения в библиотеке и плейлистах */
.bulk-action-dock button { background: var(--accent-soft); color: var(--accent); }
.bulk-action-dock #bulkDockDelete,
.bulk-action-dock #playlistBulkDockDelete { color: var(--accent); background: var(--accent-soft); }
.bulk-action-dock #bulkDockCancel,
.bulk-action-dock #playlistBulkDockCancel { color: var(--accent); background: var(--accent-soft); }

/* Final alignment: playlist selection dock matches the main-library dock. */
.bulk-action-dock #bulkDockDelete,
.bulk-action-dock #playlistBulkDockDelete {
    color: #df5965;
    background: rgba(224, 89, 101, .11);
}
.bulk-action-dock #bulkDockCancel,
.bulk-action-dock #playlistBulkDockCancel {
    color: var(--muted);
    background: var(--surface-hover);
}
.song-row { border-bottom: 0 !important; }

/* Prevent native scroll anchoring from fighting the explicit visible-row
   preservation used when entering or leaving song-selection mode. */
#mainContent {
    overflow-anchor: none;
}


/* SoundSpace UI refinements — November 2026 */
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.back-button .back-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    line-height: 1;
    font-size: 20px;
    transform: translateY(-1px);
}
.context-menu button.danger-text {
    color: #df514b !important;
}
.favorite-playlist-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    font-size: 0;
}
.favorite-playlist-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linejoin: round;
}
.player-favorite .favorite-icon {
    width: 25px;
    height: 25px;
}
@media (max-width: 600px) {
    .player-favorite .favorite-icon {
        width: 25px;
        height: 25px;
    }
}

#closePlayer,
#playerMore {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
#closePlayer:focus,
#playerMore:focus,
#closePlayer:focus-visible,
#playerMore:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}


/* SoundSpace desktop parity + preserve borderless floating controls */
@media (min-width: 700px) {
    /* Center the back chevron using a fixed icon box on desktop too. */
    .playlist-detail-actions .back-button,
    #mainContent .back-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        line-height: 1 !important;
    }
    #mainContent .back-button .back-chevron {
        width: 14px !important;
        height: 18px !important;
        display: inline-grid !important;
        place-items: center !important;
        line-height: 18px !important;
        font-size: 20px !important;
        transform: none !important;
    }

    /* Keep desktop song context menu actions consistent. */
    #contextMenu button.danger-text,
    #contextMenu.player-menu button.danger-text,
    .playlist-actions-menu button.danger-text {
        color: #df514b !important;
    }

    /* Desktop player header controls stay visually borderless. */
    .player-header #closePlayer,
    .player-header #playerMore,
    #closePlayer,
    #playerMore {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    /* Match the requested slightly smaller main-player heart. */
    #playerFavorite .favorite-icon,
    .player-favorite .favorite-icon {
        width: 25px !important;
        height: 25px !important;
    }
}

/* Restore the intentionally borderless mini-player control and scroll-to-top button. */
#miniPlayer,
.mini-player {
    outline: none !important;
}
#miniPlayer .mini-play,
.mini-player .mini-play {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
#scrollToTopButton,
.scroll-to-top {
    border: 0 !important;
    outline: 0 !important;
}
#miniPlayer .mini-play:focus,
#miniPlayer .mini-play:focus-visible,
#scrollToTopButton:focus,
#scrollToTopButton:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Slightly reduce song-tile hearts without changing their tap targets. */
.song-row .favorite-button .favorite-icon {
    width: 21px !important;
    height: 21px !important;
}


/* SoundSpace UI correction v3 — desktop + mobile, cache-busted */
/* Back button: align the chevron glyph itself vertically with the label. */
#mainContent .back-button,
.playlist-detail-actions .back-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    line-height: 1 !important;
    min-height: 36px;
}
#mainContent .back-button .back-chevron,
.playlist-detail-actions .back-button .back-chevron {
    display: inline-grid !important;
    place-items: center !important;
    flex: 0 0 14px !important;
    width: 14px !important;
    height: 20px !important;
    line-height: 1 !important;
    font-size: 22px !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* All delete/remove actions use the same red text and icon color. */
button.danger-text,
.context-menu button.danger-text,
.context-menu.player-menu button.danger-text,
.playlist-actions-menu button.danger-text,
.playlist-menu-item.danger-text {
    color: #df514b !important;
}
button.danger-text svg,
.context-menu button.danger-text svg,
.playlist-actions-menu button.danger-text svg {
    color: #df514b !important;
    stroke: currentColor !important;
}

/* Remove decorative outlines from floating player controls and panel. */
#miniPlayer,
.mini-player {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: 0 7px 25px rgba(49, 93, 151, .13) !important;
}
#miniPlayer::before,
.mini-player::before {
    content: none !important;
    display: none !important;
}
#miniPlayer .mini-play,
.mini-player .mini-play,
#closePlayer,
#playerMore,
#scrollToTopButton,
.scroll-to-top {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
#miniPlayer .mini-play:focus,
#miniPlayer .mini-play:focus-visible,
#closePlayer:focus,
#closePlayer:focus-visible,
#playerMore:focus,
#playerMore:focus-visible,
#scrollToTopButton:focus,
#scrollToTopButton:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Song hearts: reduce only the visible SVG, not the clickable hit area. */
.song-row button.favorite-button > svg.favorite-icon,
.song-row .favorite-button svg.favorite-icon {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    min-height: 21px !important;
    max-width: 21px !important;
    max-height: 21px !important;
}


/* Back button: remove the chevron entirely; keep the text label. */
#mainContent .back-button .back-chevron,
.playlist-detail-actions .back-button .back-chevron {
    display: none !important;
}


/* Header wordmark: match the SoundSpace bot banner typography. */
.header-brand h1 {
    font-weight: 700;
    font-style: italic;
}
.header-brand h1 .brand-sound {
    color: #172f60;
}
.header-brand h1 .brand-space {
    color: #55a7f5;
}


/* Язык приложения — сегментный переключатель в стиле день/ночь. */
.profile-language-row { margin-top: 2px; }
.profile-language-switch { flex: 0 0 auto; min-width: 82px; }
.profile-language-switch button { width: 38px; min-width: 38px; height: 31px; font-size: 12px; font-weight: 700; }


/* SoundSpace branded playlist rename dialog */
.playlist-rename-overlay {
    position: fixed;
    inset: 0;
    z-index: 100030;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(18, 31, 52, .44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: playlistCreateFade .18s ease;
}
.playlist-rename-modal {
    position: relative;
    width: min(100%, 430px);
    padding: 30px 24px 24px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 28px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 24px 70px rgba(34,75,125,.22);
    text-align: center;
    color: var(--text);
}
.playlist-rename-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--muted);
    font-size: 25px;
}
.playlist-rename-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 21px;
    color: #fff;
    font-size: 32px;
    background: linear-gradient(145deg, #68b7ff, #347fe8);
    box-shadow: 0 10px 24px rgba(54,137,245,.25);
}
.playlist-rename-modal h2 {
    margin: 0 36px 8px;
    font-size: 23px;
    line-height: 1.2;
}
.playlist-rename-modal p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
}
.playlist-rename-input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 17px;
    outline: none;
    background: rgba(242,247,255,.9);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
.playlist-rename-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(54,137,245,.12);
}
.playlist-rename-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.playlist-rename-actions button {
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-weight: 700;
}
.playlist-rename-cancel {
    color: var(--text);
    background: var(--accent-soft);
}
.playlist-rename-save {
    color: #fff;
    background: linear-gradient(110deg, #3e9af3, #2674e8);
    box-shadow: 0 7px 18px rgba(54,137,245,.2);
}
.playlist-rename-save:disabled { opacity: .65; }
[data-theme="dark"] .playlist-rename-modal {
    background: rgba(28,42,62,.96);
    border-color: rgba(190,211,239,.18);
}
[data-theme="dark"] .playlist-rename-input {
    background: rgba(13,25,42,.75);
    border-color: rgba(190,211,239,.2);
}

/* The Telegram mobile keyboard must not push fixed controls into the visible area. */
body.search-keyboard-open .bottom-nav,
body.search-keyboard-open #miniPlayer,
body.search-keyboard-open #scrollToTopButton {
    display: none !important;
}


/* SoundSpace playback queue */
.player-header-actions{display:flex;align-items:center;gap:12px}
.player-header-actions button{width:38px;height:38px;border:0;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:20px}
.player-header-actions button[hidden]{display:none}
.queue-overlay{position:fixed;inset:0;z-index:100001;display:flex;align-items:flex-end;justify-content:center;padding-top:24px;background:rgba(16,31,52,.38);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s ease}
.queue-overlay.open{opacity:1;visibility:visible;pointer-events:auto}
.queue-panel{width:100%;max-width:520px;max-height:min(78vh,720px);display:flex;flex-direction:column;overflow:hidden;padding:20px 20px calc(18px + env(safe-area-inset-bottom));border-radius:26px 26px 0 0;background:var(--bg);color:var(--text);border:1px solid var(--border);box-shadow:0 -12px 44px rgba(20,45,80,.18);transform:translateY(28px);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.queue-overlay.open .queue-panel{transform:translateY(0)}
.queue-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:15px;border-bottom:1px solid var(--border)}
.queue-panel-header h2{margin:0;font-size:19px;font-weight:800}
.queue-panel-header p{margin:5px 0 0;color:var(--muted);font-size:12px}
.queue-panel-header>button{width:36px;height:36px;border:0;border-radius:50%;background:var(--accent-soft);color:var(--text);font-size:25px}
.queue-list{overflow-y:auto;overscroll-behavior:contain;padding:8px 0;min-height:110px}
.queue-group-title{padding:13px 2px 7px;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.8px;text-transform:uppercase}
.queue-track-row{display:flex;align-items:center;gap:11px;min-height:58px;padding:8px 3px;border-bottom:1px solid var(--border);transition:background-color .18s ease,transform .18s ease,opacity .18s ease;will-change:transform}
.queue-track-row.is-current{background:var(--accent-soft);border-radius:13px;padding:9px}
.queue-track-index{width:26px;flex-shrink:0;text-align:center;color:var(--accent);font-size:15px;font-weight:750}
.queue-track-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.queue-track-copy strong,.queue-track-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.queue-track-copy strong{font-size:13px}.queue-track-copy small{font-size:11px;color:var(--muted)}
.queue-reorder{display:flex;align-items:center;gap:3px}
.queue-reorder button{width:29px;height:32px;border:0;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:17px}
.queue-reorder button:last-child{color:#df5c67}
.queue-reorder button:disabled{opacity:.3}
.queue-panel-footer{padding-top:10px;border-top:1px solid var(--border)}
.queue-panel-footer button:disabled{opacity:.4;pointer-events:none}
.queue-empty{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted);text-align:center}
.queue-empty>span{font-size:34px;color:var(--accent)}
.queue-empty strong{color:var(--text);font-size:14px}
.queue-empty small{font-size:12px}
.history-song-row{animation:rowIn .24s ease both}
.history-missing{font-size:10px;color:var(--muted)}
.history-unavailable{opacity:.58}
.history-empty{padding:14px 4px;color:var(--muted);font-size:12px}
.listening-history-section{animation:sectionSoftIn .28s ease both}
.history-full-list{padding-bottom:30px}
@keyframes queueRowIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}

/* Gentle, consistent transitions without changing the existing SoundSpace visual language. */
.player-overlay{display:flex;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .24s ease,visibility .24s ease}
.player-overlay.open{display:flex;visibility:visible;opacity:1;pointer-events:auto}
.player-modal{animation:none;transform:translateY(24px);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.player-overlay.open .player-modal{transform:translateY(0)}
#mainContent>.section,#mainContent>.page-heading{animation:sectionSoftIn .24s ease both}
@keyframes sectionSoftIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.favorite-button.favorite-pop .favorite-icon,.player-favorite.favorite-pop .favorite-icon{animation:favoritePop .32s cubic-bezier(.2,.8,.2,1)}
@keyframes favoritePop{0%{transform:scale(.72)}55%{transform:scale(1.24)}100%{transform:scale(1)}}
50%{box-shadow:0 14px 36px rgba(64,131,211,.34)}}
to{opacity:1;transform:translateX(-50%) scaleY(1)}}
.context-menu.open{animation:menuIn .18s cubic-bezier(.2,.8,.2,1)}
.playlist-actions-menu:not([hidden]){animation:menuIn .18s ease}
.playlist-skeleton{position:relative;overflow:hidden;border-radius:10px;background:linear-gradient(90deg,rgba(132,163,205,.08),rgba(132,163,205,.2),rgba(132,163,205,.08));background-size:200% 100%;animation:skeletonShimmer 1.4s ease-in-out infinite}
@keyframes skeletonShimmer{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.queue-overlay,.queue-panel,.player-overlay,.player-modal,#mainContent>.section,#mainContent>.page-heading,.favorite-button.favorite-pop .favorite-icon,.player-favorite.favorite-pop .favorite-icon,.context-menu.open,.playlist-actions-menu:not([hidden]),.playlist-skeleton{animation:none!important;transition:none!important}}
[data-theme="dark"] .queue-panel{background:var(--surface-solid);border-color:var(--border)}

.loading-skeleton-list{display:flex;flex-direction:column;gap:14px;padding:8px 0}
.loading-skeleton-row{height:62px;display:flex;align-items:center;gap:12px}
.loading-skeleton-row span,.loading-skeleton-row i,.loading-skeleton-row b{display:block;position:relative;overflow:hidden;border-radius:12px;background:rgba(132,163,205,.14)}
.loading-skeleton-row span{width:48px;height:48px;flex-shrink:0}
.loading-skeleton-row i{width:44%;height:13px}
.loading-skeleton-row b{width:18%;height:10px;margin-left:auto}
.loading-skeleton-row span:after,.loading-skeleton-row i:after,.loading-skeleton-row b:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-100%);animation:skeletonShimmer 1.25s infinite}
.queue-track-row[draggable="true"]{cursor:grab;user-select:none;-webkit-user-select:none}
.queue-track-row[draggable="true"]:active{cursor:grabbing}
.queue-track-row.is-dragging{opacity:.28;transform:scale(.985);background:var(--surface-hover);border-radius:12px}
.queue-track-row.drag-over{background:var(--accent-soft);border-radius:12px;box-shadow:inset 0 0 0 1px rgba(54,137,245,.16);transform:scale(.995)}
.queue-track-row.drag-over .queue-track-copy{opacity:.82}
@media(prefers-reduced-motion:reduce){.queue-track-row{transition:none!important}}

/* v51: clean, clickable unified playback queue; no cover motion. */
.player-cover.is-playing,.mini-cover.is-playing,.player-cover,.mini-cover{animation:none!important;transform:none!important;filter:none!important;}
.player-cover::before,.player-cover::after,.mini-cover::before,.mini-cover::after{animation:none!important;}
.queue-track-draggable{cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none;border-radius:12px;padding-left:9px;padding-right:9px;}
.queue-track-draggable:active{cursor:grabbing;}
.queue-track-draggable[data-queue-play]{cursor:pointer;}
.queue-track-draggable.is-dragging{opacity:.72;background:var(--accent-soft);box-shadow:0 5px 16px rgba(30,70,120,.10);transform:scale(.99);}
.queue-track-draggable.drag-over{background:var(--accent-soft);box-shadow:inset 0 0 0 1px rgba(54,137,245,.28);}
.queue-drag-handle{color:var(--muted);font-size:20px;letter-spacing:-3px;padding:4px 5px;opacity:.65;cursor:grab;}
.queue-track-draggable .queue-track-copy{pointer-events:none;}
.queue-track-draggable:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}


/* SoundSpace v52: compact mini-player controls and clean navigation */
.mini-player-controls{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}
.mini-player-controls .mini-play{order:2;background:transparent!important;color:#111!important;margin-left:0}
.mini-player-controls .mini-next{order:1;width:34px;height:40px;display:grid;place-items:center;border:0;background:transparent;color:#111;border-radius:50%;padding:0}
.mini-player-controls .mini-next svg{width:21px;height:21px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
[data-theme="dark"] .mini-player-controls .mini-play,[data-theme="dark"] .mini-player-controls .mini-next{color:#111!important}
.mini-player-controls .mini-play svg{fill:#111!important;stroke:#111!important}
.mini-player-controls .mini-play:active,.mini-player-controls .mini-next:active{transform:scale(.94)}
.nav-item,.bottom-nav .nav-item,.bottom-nav{border-color:transparent!important;outline:0!important}
.profile-help-link{width:100%;margin-top:12px;padding:12px 14px;border:0;border-radius:12px;background:var(--accent-soft);color:var(--accent);font:inherit;font-weight:650;text-align:left}


/* v53: restore standalone help placement and theme-aware minimal mini-player icons */
.profile-help-card{padding:0;background:transparent;border:0;box-shadow:none}
.profile-help-card .profile-help-link{margin-top:0}
.mini-player-controls .mini-play,
.mini-player-controls .mini-next{color:var(--text)!important}
.mini-player-controls .mini-play svg,
.mini-player-controls .mini-next svg{fill:none!important;stroke:currentColor!important;stroke-width:1.65!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.mini-player-controls .mini-play svg path:first-child{fill:none!important}
[data-theme="dark"] .mini-player-controls .mini-play,
[data-theme="dark"] .mini-player-controls .mini-next{color:#fff!important}

/* SoundSpace v54: мини-плеер не показывает переход к следующему треку в режиме радио. */
body.radio-playing .mini-next { display: none !important; }


/* SoundSpace v55: unified circular mini-player controls and compact help card */
.mini-player-controls{display:flex!important;align-items:center!important;justify-content:center;gap:8px!important;flex-shrink:0;margin-left:auto}
.mini-player-controls .mini-play,.mini-player-controls .mini-next{order:initial!important;width:40px!important;height:40px!important;min-width:40px;display:grid!important;place-items:center!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:var(--accent-soft)!important;color:var(--text)!important;box-shadow:none!important;line-height:1}
.mini-player-controls .mini-play svg,.mini-player-controls .mini-next svg{display:block;width:19px!important;height:19px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.mini-player-controls .mini-play:active,.mini-player-controls .mini-next:active{transform:scale(.94)}
[data-theme="dark"] .mini-player-controls .mini-play,[data-theme="dark"] .mini-player-controls .mini-next{color:#fff!important;background:rgba(255,255,255,.09)!important}
.profile-help-card{padding:0!important;margin-top:12px;background:transparent!important;border:0!important;box-shadow:none!important}
.profile-help-card .profile-help-link{width:100%;display:flex;align-items:center;gap:12px;margin:0!important;padding:13px 15px!important;border:1px solid var(--border)!important;border-radius:17px!important;background:var(--surface)!important;color:var(--text)!important;text-align:left!important;font:inherit!important;font-weight:400!important;box-shadow:0 5px 18px rgba(49,93,151,.06)!important}
.profile-help-icon{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:13px;background:var(--accent-soft);color:var(--accent)}
.profile-help-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.profile-help-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.profile-help-copy strong{font-size:14px;font-weight:700;color:var(--text)}
.profile-help-copy small{font-size:12px;line-height:1.35;color:var(--muted);font-weight:400}
.profile-help-chevron{width:19px;height:19px;flex:0 0 19px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* SoundSpace v59: принудительно возвращаем голубое оформление мини-плеера.
   Версия стилей обновлена в index.html для сброса кэша Telegram WebView. */
#miniPlayer .mini-player-controls .mini-play,
#miniPlayer .mini-player-controls .mini-next {
    background: rgba(54, 137, 245, .16) !important;
    color: #3689f5 !important;
    border: 0 !important;
    box-shadow: none !important;
}
#miniPlayer .mini-player-controls .mini-play svg,
#miniPlayer .mini-player-controls .mini-next svg {
    color: #3689f5 !important;
    fill: none !important;
    stroke: currentColor !important;
}
#miniPlayer .mini-player-controls .mini-play:hover,
#miniPlayer .mini-player-controls .mini-next:hover {
    background: rgba(54, 137, 245, .24) !important;
}
[data-theme="dark"] #miniPlayer .mini-player-controls .mini-play,
[data-theme="dark"] #miniPlayer .mini-player-controls .mini-next {
    background: rgba(86, 164, 255, .20) !important;
    color: #78b7ff !important;
}
[data-theme="dark"] #miniPlayer .mini-player-controls .mini-play svg,
[data-theme="dark"] #miniPlayer .mini-player-controls .mini-next svg {
    color: #78b7ff !important;
    stroke: currentColor !important;
}


/* SoundSpace v69: radio favorites use the same wide SVG heart on mobile and desktop. */
.radio-favorite-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 0;
    line-height: 0;
}
.radio-favorite-button .favorite-icon {
    display: block;
    width: 29px;
    height: 29px;
    stroke-width: 1.8;
}
.radio-favorite-button.active .favorite-icon {
    fill: currentColor;
    stroke-width: 1.5;
}
#playerFavorite .favorite-icon {
    display: block;
    width: 29px;
    height: 29px;
}
@media (max-width: 600px) {
    .radio-favorite-button {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }
    .radio-favorite-button .favorite-icon,
    #playerFavorite .favorite-icon {
        width: 29px;
        height: 29px;
    }
}


/* Progressive song-list rendering: keep the loading sentinel lightweight. */
.song-list-sentinel {
    min-height: 1px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}
.song-list-load-more {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--accent);
    background: var(--accent-soft);
    font: inherit;
    cursor: pointer;
}

/* Premium color themes: palette-only overrides; component layout stays shared. */
:root {
    --accent-strong: var(--accent);
    --accent-button-text: #fff;
    --cover-a: #8bc4ff;
    --cover-b: #478ee8;
    --app-glow: rgba(190,219,255,.24);
}

:root[data-skin="vinyl"][data-theme="light"] {
    color-scheme: light;
    --bg: #f6eee3; --surface: rgba(255,249,240,.9); --surface-solid: #fff9f0;
    --surface-hover: #f1e2d0; --text: #39231b; --muted: #806454;
    --accent: #93401f; --accent-strong: #93401f; --accent-button-text: #fff;
    --accent-soft: #f6ddca; --border: rgba(112,65,41,.22);
    --shadow: 0 8px 28px rgba(89,52,32,.12); --app-glow: rgba(224,167,111,.2);
    --cover-a: #9b4b22; --cover-b: #713017;
}
:root[data-skin="vinyl"][data-theme="dark"] {
    color-scheme: dark;
    --bg: #1d130f; --surface: rgba(48,31,24,.94); --surface-solid: #302018;
    --surface-hover: #472b1d; --text: #f8e8d2; --muted: #c4a58c;
    --accent: #f1b15e; --accent-strong: #984513; --accent-button-text: #fff;
    --accent-soft: #4c301f; --border: rgba(241,177,94,.22);
    --shadow: 0 8px 28px rgba(0,0,0,.32); --app-glow: rgba(171,92,42,.2);
    --cover-a: #a35624; --cover-b: #63301d;
}

:root[data-skin="aurora"][data-theme="light"] {
    color-scheme: light;
    --bg: #eef5ff; --surface: rgba(255,255,255,.88); --surface-solid: #fff;
    --surface-hover: #e2eff7; --text: #16264a; --muted: #5c6e8e;
    --accent: #176f78; --accent-strong: #176f78; --accent-button-text: #fff;
    --accent-soft: #d9f1f0; --border: rgba(67,112,157,.22);
    --shadow: 0 8px 28px rgba(50,91,143,.12); --app-glow: rgba(105,220,204,.2);
    --cover-a: #237c82; --cover-b: #5645a5;
}
:root[data-skin="aurora"][data-theme="dark"] {
    color-scheme: dark;
    --bg: #07162f; --surface: rgba(15,36,69,.94); --surface-solid: #102748;
    --surface-hover: #19395d; --text: #edf6ff; --muted: #b7c8e3;
    --accent: #53e2d3; --accent-strong: #176f78; --accent-button-text: #fff;
    --accent-soft: #153950; --border: rgba(111,194,214,.22);
    --shadow: 0 8px 28px rgba(0,0,0,.32); --app-glow: rgba(37,194,193,.2);
    --cover-a: #1e7772; --cover-b: #5b48a3;
}

:root[data-skin="graphite"][data-theme="light"] {
    color-scheme: light;
    --bg: #f1f2f2; --surface: rgba(255,255,255,.9); --surface-solid: #fff;
    --surface-hover: #e7e9e9; --text: #25272a; --muted: #62676c;
    --accent: #4d7100; --accent-strong: #4d7100; --accent-button-text: #fff;
    --accent-soft: #e7f2ce; --border: rgba(63,70,72,.19);
    --shadow: 0 8px 26px rgba(28,33,34,.1); --app-glow: rgba(189,235,85,.15);
    --cover-a: #587b00; --cover-b: #466500;
}
:root[data-skin="graphite"][data-theme="dark"] {
    color-scheme: dark;
    --bg: #111315; --surface: rgba(31,34,36,.96); --surface-solid: #202326;
    --surface-hover: #303438; --text: #f3f4f4; --muted: #b6b9ba;
    --accent: #c1f75a; --accent-strong: #587d14; --accent-button-text: #fff;
    --accent-soft: #28351b; --border: rgba(199,211,190,.18);
    --shadow: 0 8px 28px rgba(0,0,0,.38); --app-glow: rgba(146,194,39,.14);
    --cover-a: #587b00; --cover-b: #456400;
}

:root[data-skin="sakura"][data-theme="light"] {
    color-scheme: light;
    --bg: #fff5f7; --surface: rgba(255,250,252,.92); --surface-solid: #fffafd;
    --surface-hover: #fbe8ee; --text: #421c31; --muted: #806475;
    --accent: #a3345c; --accent-strong: #a3345c; --accent-button-text: #fff;
    --accent-soft: #f8dfe8; --border: rgba(139,73,102,.2);
    --shadow: 0 8px 28px rgba(126,65,97,.11); --app-glow: rgba(248,177,203,.22);
    --cover-a: #a3345c; --cover-b: #84294e;
}
:root[data-skin="sakura"][data-theme="dark"] {
    color-scheme: dark;
    --bg: #22101d; --surface: rgba(53,28,49,.95); --surface-solid: #351c31;
    --surface-hover: #4a2942; --text: #fff0f8; --muted: #d2b2c5;
    --accent: #ff9fbd; --accent-strong: #a84268; --accent-button-text: #fff;
    --accent-soft: #4b293f; --border: rgba(244,168,202,.22);
    --shadow: 0 8px 28px rgba(0,0,0,.34); --app-glow: rgba(191,83,133,.18);
    --cover-a: #a54770; --cover-b: #783054;
}

html[data-skin] body {
    background: radial-gradient(circle at 10% 0%, var(--app-glow), transparent 36%), var(--bg);
}
html[data-skin] .profile-card,
html[data-skin] .profile-links-card,
html[data-skin] .search-box,
html[data-skin] .empty-state,
html[data-skin] .radio-empty,
html[data-skin] .playlist-create-card,
html[data-skin] .bottom-nav,
html[data-skin] .mini-player,
html[data-skin] .player-modal,
html[data-skin] .queue-panel,
html[data-skin] .context-menu,
html[data-skin] .playlist-create-modal,
html[data-skin] .playlist-rename-modal,
html[data-skin] .playlist-actions-menu {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
html[data-skin] .bottom-nav,
html[data-skin] .mini-player,
html[data-skin] .profile-card,
html[data-skin] .player-modal,
html[data-skin] .queue-panel,
html[data-skin] .context-menu,
html[data-skin] .playlist-create-modal,
html[data-skin] .playlist-rename-modal,
html[data-skin] .playlist-actions-menu {
    box-shadow: var(--shadow);
}
html[data-skin] .player-modal { background: var(--bg); }
html[data-skin] .profile-setting-row,
html[data-skin] .song-row,
html[data-skin] .radio-row,
html[data-skin] .queue-row { color: var(--text); border-color: var(--border); }
html[data-skin] .song-row.selected,
html[data-skin] .bulk-toolbar,
html[data-skin] .nav-item.active,
html[data-skin] .back-button,
html[data-skin] .playlist-create-card { background-color: var(--accent-soft); color: var(--text); }
html[data-skin] .playlist-color-0 { background: linear-gradient(145deg, var(--cover-a), var(--cover-b)); }
html[data-skin] .playlist-color-1 { background: linear-gradient(145deg, var(--cover-b), var(--accent-strong)); }
html[data-skin] .playlist-color-2 { background: linear-gradient(145deg, var(--cover-a), var(--accent-strong)); }
html[data-skin] .playlist-color-3 { background: linear-gradient(145deg, var(--cover-b), var(--cover-a)); }
html[data-skin] .favorite-playlist-card {
    background: linear-gradient(145deg, var(--cover-a) 0%, var(--cover-b) 100%);
    border-color: var(--border);
    color: #fff;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.16);
}
html[data-skin] .favorite-playlist-icon { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.18); }
html[data-skin="standard"][data-theme="light"] .favorite-playlist-card {
    background: linear-gradient(145deg, #3479b3, #285d93);
}
html[data-skin="standard"][data-theme="dark"] .favorite-playlist-card {
    background: linear-gradient(145deg, #365f8b, #233e61);
}
html[data-skin] .song-cover,
html[data-skin] .mini-cover,
html[data-skin] .player-cover,
html[data-skin] .radio-empty-icon,
html[data-skin] .profile-avatar {
    background: linear-gradient(145deg, var(--cover-a), var(--cover-b));
}
html[data-skin] .developer-primary,
html[data-skin] .profile-theme-switch button.active,
html[data-skin] .select-song.checked {
    background: var(--accent-strong);
    color: var(--accent-button-text);
}
html[data-skin] .header-brand h1 .brand-sound { color: var(--text); }
html[data-skin] .header-brand h1 .brand-space { color: var(--accent); }
html[data-skin] .playlist-create-icon,
html[data-skin] .music-confirm-icon:not(.danger) {
    background: linear-gradient(145deg, var(--cover-a), var(--cover-b));
}
html[data-skin] .music-confirm-accept:not(.danger) {
    background: var(--accent-strong);
    color: var(--accent-button-text);
}
html[data-skin] .music-confirm-icon.danger,
html[data-skin] .music-confirm-accept.danger { background: #a92d43; color: #fff; }
html[data-skin] #miniPlayer .mini-player-controls .mini-play,
html[data-skin] #miniPlayer .mini-player-controls .mini-next {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}
html[data-skin] #miniPlayer .mini-player-controls .mini-play svg,
html[data-skin] #miniPlayer .mini-player-controls .mini-next svg {
    color: var(--accent) !important;
    stroke: currentColor !important;
}
html[data-skin] .toast { background: var(--surface-solid); color: var(--text); border: 1px solid var(--border); }
html[data-skin] input,
html[data-skin] textarea,
html[data-skin] select { color: var(--text); border-color: var(--border); }
html[data-skin] input::placeholder,
html[data-skin] textarea::placeholder { color: var(--muted); }
html[data-skin="vinyl"][data-theme="dark"] .profile-status.premium,
html[data-skin="aurora"][data-theme="dark"] .profile-status.premium,
html[data-skin="graphite"][data-theme="dark"] .profile-status.premium,
html[data-skin="sakura"][data-theme="dark"] .profile-status.premium { color: #b8f3d4; }

.profile-color-theme-row { cursor: pointer; font: inherit; }
.profile-color-theme-row:hover { background: var(--surface-hover); }
.profile-color-theme-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
body.color-theme-picker-open { overflow: hidden; }
.color-theme-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(8,15,28,.58);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    overscroll-behavior: contain;
}
.color-theme-picker-modal {
    width: min(100%, 440px);
    max-height: min(86vh, 760px);
    overflow-y: auto;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: 0 18px 55px rgba(0,0,0,.24);
    overscroll-behavior: contain;
}
.color-theme-picker-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:16px; }
.color-theme-picker-header h2 { margin:0; font-size:18px; font-weight:750; }
.color-theme-picker-header p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.color-theme-picker-close {
    width:34px; height:34px; flex:0 0 34px; border:1px solid var(--border); border-radius:50%;
    background:var(--surface-hover); color:var(--text); font-size:22px; line-height:1;
}
.color-theme-picker-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.color-theme-option {
    position:relative;
    min-width:0;
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:9px;
    overflow:hidden;
    padding:10px 11px 10px 17px;
    border:1px solid var(--option-border,var(--border));
    border-radius:14px;
    background:var(--option-bg,var(--surface-hover));
    color:var(--option-text,var(--text));
    text-align:left;
    font:inherit;
    font-size:13px;
    font-weight:700;
    transition:border-color .15s,transform .15s,box-shadow .15s;
}
.color-theme-option::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--option-accent,var(--accent)); }
.color-theme-option:active { transform:scale(.985); }
.color-theme-option:focus-visible { outline:2px solid var(--option-accent,var(--accent)); outline-offset:2px; }
.color-theme-option.active { border:2px solid var(--option-accent,var(--accent)); box-shadow:0 0 0 2px var(--accent-soft); }
.color-theme-option[aria-disabled="true"] { cursor:pointer; }
.color-theme-option-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.color-theme-option-state { width:20px; min-width:20px; display:grid; place-items:center; color:var(--option-accent,var(--accent)); font-size:17px; font-weight:800; }
.color-theme-option-state .music-lock-icon { width:17px; height:17px; }
.color-theme-picker-premium { margin-top:14px; padding:12px; border:1px solid var(--border); border-radius:14px; background:var(--surface-hover); }
.color-theme-picker-premium p { margin:0 0 10px; color:var(--muted); font-size:12px; line-height:1.4; }
.color-theme-picker-premium .developer-primary { width:100%; min-height:42px; white-space:normal; }
.color-theme-picker-done {
    width:100%; min-height:43px; margin-top:14px; border:0; border-radius:12px;
    background:var(--accent-strong); color:var(--accent-button-text); font:inherit; font-size:13px; font-weight:700;
}

.color-theme-option[data-preview-skin="standard"] { --option-bg:#e8f1ff; --option-text:#18243a; --option-accent:#3689f5; --option-border:#c8d8ec; }
.color-theme-option[data-preview-skin="vinyl"] { --option-bg:#f6eee3; --option-text:#39231b; --option-accent:#93401f; --option-border:#dfc4ad; }
.color-theme-option[data-preview-skin="aurora"] { --option-bg:#d9f1f0; --option-text:#16264a; --option-accent:#176f78; --option-border:#b4d8da; }
.color-theme-option[data-preview-skin="graphite"] { --option-bg:#e7f2ce; --option-text:#25272a; --option-accent:#4d7100; --option-border:#c8d5a7; }
.color-theme-option[data-preview-skin="sakura"] { --option-bg:#f8dfe8; --option-text:#421c31; --option-accent:#a3345c; --option-border:#e6c1ce; }
:root[data-theme="dark"] .color-theme-option[data-preview-skin="standard"] { --option-bg:#1f2b3e; --option-text:#f1f5fc; --option-accent:#65a9ff; --option-border:#3b4d66; }
:root[data-theme="dark"] .color-theme-option[data-preview-skin="vinyl"] { --option-bg:#302018; --option-text:#f8e8d2; --option-accent:#f1b15e; --option-border:#6a4934; }
:root[data-theme="dark"] .color-theme-option[data-preview-skin="aurora"] { --option-bg:#102748; --option-text:#edf6ff; --option-accent:#53e2d3; --option-border:#315371; }
:root[data-theme="dark"] .color-theme-option[data-preview-skin="graphite"] { --option-bg:#202326; --option-text:#f3f4f4; --option-accent:#c1f75a; --option-border:#4c5254; }
:root[data-theme="dark"] .color-theme-option[data-preview-skin="sakura"] { --option-bg:#351c31; --option-text:#fff0f8; --option-accent:#ff9fbd; --option-border:#64415a; }
