/* ATLAS BEATS v11.0 — My Library (playlists · artists · downloads), artist pages, add-to-playlist picker, artists carousel, download queue */
.app-tile.lib { --tile: #e7c98a; }
.apps-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .apps-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .apps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .app-tile.lib { grid-column: span 2; } }
@media (max-width: 600px) { .app-tile.lib { grid-column: span 2; } }

/* ── native page shell ── */
.lib-sec { max-width: 1080px; margin: 0 auto 26px; }
.pg-frame.pg-native .lib-sec { padding-top: 4px; }
#libHolder .lib-sec { display: none; }
.lib-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; flex-wrap: wrap; }
.lib-logo { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #e7c98a, #7c3aed 70%); box-shadow: 0 12px 28px -12px rgba(231, 201, 138, .7); flex: none; }
.lib-logo .i { width: 22px; height: 22px; color: #fff; }
.lib-htx { flex: 1 1 240px; min-width: 0; } .lib-htx h2 { margin: 0; font-size: 22px; letter-spacing: .02em; } .lib-htx p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.lib-sync { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); max-width: 100%; }
.lib-sync em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-sync.on { color: #a7f3d0; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.lib-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tab { flex: 1 1 0; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.lib-tab:hover { color: var(--ink); } .lib-tab.on { color: #fff; background: linear-gradient(135deg, rgba(124, 58, 237, .55), rgba(59, 130, 246, .4)); box-shadow: 0 8px 20px -10px rgba(124, 58, 237, .8); }
.lib-tab i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.lib-pane[hidden] { display: none; }
.lib-new, .lib-search { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); margin-bottom: 14px; }
.lib-new .i, .lib-search .i { color: var(--muted); flex: none; }
.lib-new input, .lib-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 14px; padding: 6px 0; }
.lib-new input::placeholder, .lib-search input::placeholder { color: var(--dim); }
.lib-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 16px; border-radius: 20px; border: 1px dashed rgba(255, 255, 255, .12); color: var(--muted); }
.lib-empty .i { width: 34px; height: 34px; opacity: .5; margin-bottom: 6px; } .lib-empty b { color: var(--ink); font-size: 15px; } .lib-empty span { font-size: 13px; max-width: 420px; }
.lib-empty.sm { padding: 18px 12px; }
.lib-loading { display: grid; place-items: center; padding: 30px; color: var(--muted); } .spin { animation: libSpin 1s linear infinite; } @keyframes libSpin { to { transform: rotate(360deg); } }
.lib-h3 { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; font-size: 14px; color: var(--muted); font-weight: 800; letter-spacing: .02em; } .lib-h3 i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.lib-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 10px; font-size: 13px; color: var(--muted); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; min-height: 34px; } .btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: var(--ink); } .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.pd-btn.sm { min-height: 34px; padding: 0 10px; font-size: 12.5px; } .pd-btn.icon.sm { width: 34px; height: 34px; padding: 0; } .pd-btn.icon.sm .i { width: 15px; height: 15px; }
.pd-btn.danger:hover, .pd-dl.danger:hover { color: #fda4af; }
.pd-btn.follow.on { background: linear-gradient(135deg, rgba(52, 211, 153, .28), rgba(16, 185, 129, .14)); border-color: rgba(52, 211, 153, .5); color: #d1fae5; }

/* rows inside the library pages — auto-placed, per row type */
.lib-sec .pd-row > * { grid-column: auto; }
.lib-sec .pd-row .pd-n, .lib-sec .pd-row .pd-eq { grid-column: 1; } .lib-sec .pd-row .pd-thumb { grid-column: 2; } .lib-sec .pd-row .pd-rtx { grid-column: 3; }
.lib-sec .ar-row { grid-template-columns: 34px 46px minmax(0, 1fr) auto auto 52px; }
.lib-sec .pl-row { grid-template-columns: 34px 46px minmax(0, 1fr) auto auto auto 52px; }
.lib-sec .dl-row { grid-template-columns: 46px minmax(0, 1fr) auto auto; } .lib-sec .dl-row .pd-thumb { grid-column: 1; } .lib-sec .dl-row .pd-rtx { grid-column: 2; }
.lib-sec .pl-row [data-lib="trup"] .i { transform: rotate(180deg); }
.lib-rows { display: grid; gap: 4px; }

/* ── playlists grid ── */
.bidi { unicode-bidi: plaintext; text-align: left; } [dir="rtl"] .bidi { text-align: right; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lib-pl { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 14px; padding: 12px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); transition: border-color .2s, transform .2s, box-shadow .2s; }
.lib-pl:hover { border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); box-shadow: 0 16px 40px -24px rgba(0, 0, 0, .8); }
.lib-pl.playing { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 44px -26px color-mix(in srgb, var(--accent) 60%, transparent); }
.lib-pl.open { grid-column: 1 / -1; }
.lib-pl-cover { grid-row: 1 / 3; position: relative; width: 84px; height: 84px; border: 0; padding: 0; border-radius: 16px; overflow: hidden; cursor: pointer; background: rgba(255, 255, 255, .06); }
.lib-mosaic-wrap, .lib-mosaic { display: block; width: 100%; height: 100%; }
.lib-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .lib-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-mosaic.one { display: block; } .lib-mosaic.empty { display: grid; place-items: center; color: rgba(255, 255, 255, .35); background: linear-gradient(135deg, rgba(124, 58, 237, .35), rgba(59, 130, 246, .2)); }
.lib-pl-play { position: absolute; inset: auto 6px 6px auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7c3aed, #3b82f6); color: #fff; box-shadow: 0 8px 18px -8px rgba(124, 58, 237, .9); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--spring); }
.lib-pl-play .i { width: 15px; height: 15px; }
.lib-pl:hover .lib-pl-play, .lib-pl.playing .lib-pl-play, .lib-pl.open .lib-pl-play { opacity: 1; transform: none; }
[dir="rtl"] .lib-pl-play { inset: auto auto 6px 6px; }
.lib-pl-tx { min-width: 0; align-self: end; } .lib-pl-tx b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-pl-tx small { color: var(--muted); font-size: 12px; }
.lib-pl-acts { display: flex; align-items: center; gap: 4px; align-self: start; flex-wrap: wrap; }
.lib-pl-tracks { grid-column: 1 / -1; display: grid; gap: 3px; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.lib-pl-tracks[hidden] { display: none; }

/* ── add-to-playlist picker ── */
.lib-pick { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: end center; } .lib-pick[hidden] { display: none; }
.lib-pick-bd { position: absolute; inset: 0; background: rgba(3, 2, 8, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.lib-pick-card { position: relative; width: min(520px, 100%); max-height: min(78vh, 640px); overflow: auto; border-radius: 26px 26px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #16122a, #0b0a14); border: 1px solid rgba(255, 255, 255, .1); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); transform: translateY(30px); opacity: 0; transition: transform .3s var(--spring), opacity .22s; }
@media (min-width: 720px) { .lib-pick { place-items: center; } .lib-pick-card { border-radius: 26px; border-bottom: 1px solid rgba(255, 255, 255, .1); } }
.lib-pick.in .lib-pick-bd, .lib-pick.in .lib-pick-card { opacity: 1; transform: none; }
.lib-pick-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.lib-pick-head img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.lib-pick-tx { min-width: 0; display: grid; } .lib-pick-tx small { color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; } .lib-pick-tx b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-pick-tx span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lib-pick-new { display: flex; gap: 8px; margin-bottom: 12px; } .lib-pick-new input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: var(--ink); font: inherit; outline: 0; } .lib-pick-new input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.lib-pick-new .btn { white-space: nowrap; }
.lib-pick-list { display: grid; gap: 6px; }
.lib-pick-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 28px; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .035); color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: background .2s, border-color .2s; }
.lib-pick-row:hover { background: rgba(255, 255, 255, .08); } .lib-pick-row .lib-mosaic { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; }
.lib-pick-name { min-width: 0; display: grid; } .lib-pick-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-pick-name small { color: var(--muted); font-size: 12px; }
.lib-check { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; color: transparent; transition: background .2s, color .2s; }
.lib-pick-row.on { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .08); } .lib-pick-row.on .lib-check { background: #10b981; border-color: #10b981; color: #fff; }
.lib-pick-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── artists ── */
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.ar-card { display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .035); color: var(--ink); font: inherit; cursor: pointer; text-align: center; transition: background .2s, transform .2s, border-color .2s; min-width: 0; }
.ar-card:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); border-color: rgba(255, 255, 255, .16); }
.ar-card.fol { border-color: rgba(52, 211, 153, .35); }
.ar-card-ava { position: relative; width: 84px; height: 84px; border-radius: 50%; overflow: visible; }
.ar-card-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .9); }
.ar-fol { position: absolute; right: -2px; bottom: 2px; width: 22px; height: 22px; border-radius: 50%; background: #10b981; color: #fff; display: grid; place-items: center; border: 2px solid #0b0a14; } .ar-fol .i { width: 11px; height: 11px; }
.ar-card b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ar-card small { color: var(--muted); font-size: 11.5px; }
.ar-more { grid-column: 1 / -1; padding: 12px; border-radius: 14px; border: 1px dashed rgba(255, 255, 255, .15); background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; } .ar-more:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }

.ar-hero { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); margin-bottom: 16px; isolation: isolate; }
.ar-hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--img) center / cover no-repeat; filter: blur(40px) saturate(1.4) brightness(.55); transform: scale(1.3); }
.ar-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 6, 11, .2), rgba(6, 6, 11, .85)); }
.ar-hero-in { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: end; padding: 54px 24px 22px; }
.lib-back { position: absolute; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px 7px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); }
[dir="rtl"] .lib-back .i { transform: rotate(180deg); }
.ar-ava { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9), 0 0 0 4px rgba(255, 255, 255, .08); }
.ar-tx { min-width: 0; display: grid; gap: 4px; } .ar-tx small { color: rgba(255, 255, 255, .6); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.ar-tx h2 { margin: 0; font-size: clamp(26px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -.01em; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); }
.ar-meta { margin: 0; color: rgba(255, 255, 255, .7); font-size: 13.5px; }
.ar-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ar-list { display: grid; gap: 3px; }
@media (max-width: 640px) { .ar-hero-in { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 58px 16px 18px; } .ar-ava { width: 128px; height: 128px; } .ar-acts { justify-content: center; } .lib-sec .ar-row { grid-template-columns: 26px 42px minmax(0, 1fr) 36px 36px; } .lib-sec .pl-row { grid-template-columns: 26px 42px minmax(0, 1fr) 36px 36px 36px; } .lib-sec .pd-row .pd-d { display: none; } .lib-pl { grid-template-columns: 72px minmax(0, 1fr); } .lib-pl-cover { width: 72px; height: 72px; } .lib-pl-acts { grid-column: 1 / -1; } .lib-grid { grid-template-columns: 1fr; } }

/* ── home: artists carousel ── */
.artists-home { margin: 20px 0 6px; } .artists-home[hidden] { display: none; }
.ah-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ah-head .sec-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; } .ah-head .sec-sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.ah-strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ah-strip::-webkit-scrollbar { display: none; }
.ah-card { flex: 0 0 auto; width: 108px; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; scroll-snap-align: start; text-align: center; }
.ah-ava { width: 88px; height: 88px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)); transition: transform .25s var(--spring), background .2s; }
.ah-card:hover .ah-ava { transform: translateY(-3px) scale(1.04); background: linear-gradient(135deg, #7c3aed, #3b82f6); } .ah-card.fol .ah-ava { background: linear-gradient(135deg, #10b981, #3b82f6); }
.ah-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid #0b0a14; }
.ah-card b { font-size: 12.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ah-card small { color: var(--muted); font-size: 11px; margin-top: -4px; }
@media (max-width: 600px) { .ah-card { width: 86px; } .ah-ava { width: 70px; height: 70px; } .ah-card small { display: none; } }

/* ── download queue ── */
#libQueue { margin-bottom: 14px; padding: 12px; border-radius: 18px; border: 1px solid rgba(124, 58, 237, .35); background: linear-gradient(160deg, rgba(124, 58, 237, .14), rgba(59, 130, 246, .06)); }
.lq-head { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; } .lq-head b { font-size: 14px; } .lq-head span { color: var(--muted); }
.lq-bar { position: relative; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; } .lq-bar b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7c3aed, #3b82f6); border-radius: 999px; transition: width .4s; }
[dir="rtl"] .lq-bar b { inset: 0 0 0 auto; }
.lq-list { display: grid; gap: 3px; max-height: 300px; overflow: auto; }
.lq-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; font-size: 13px; }
.lq-row.run { background: rgba(255, 255, 255, .06); } .lq-row.done { opacity: .75; } .lq-row.fail em, .lq-row.cancel em { color: #fda4af; } .lq-row.done em { color: #a7f3d0; }
.lq-ring { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .75); background: conic-gradient(var(--accent) calc(var(--p, 0) * 360deg), rgba(255, 255, 255, .1) 0); position: relative; }
.lq-ring::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #110f1e; } .lq-ring .i { position: relative; width: 13px; height: 13px; }
.lq-row.run .lq-ring { animation: lqPulse 1.2s ease-in-out infinite; } @keyframes lqPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); } }
.lq-tx { min-width: 0; display: grid; } .lq-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; } .lq-tx small { color: var(--muted); font-size: 11.5px; }
.lq-row em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* the detail head's «download all» button */
.pd-dlall { position: relative; }
html.reduce-motion .lib-pick-card, html.reduce-motion .lq-row.run .lq-ring { transition: none; animation: none; }
