:root { --bg:#111216; --panel:#181a20; --panel-2:#20232b; --border:#2a2e38; --text:#f4f2f8; --muted:#9499a8; --accent:#84e4af; --accent-dark:#174c35; --radius:18px; }
* { box-sizing:border-box; }
html { background:var(--bg); }
body { margin:0; min-width:320px; background:radial-gradient(circle at 74% -10%, #242936 0, transparent 35rem),var(--bg); color:var(--text); font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI",sans-serif; padding-bottom:116px; }
button,input { font:inherit; } button { cursor:pointer; } button:focus-visible,input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.app-shell { min-height:calc(100vh - 116px); display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { border-right:1px solid var(--border); padding:27px 17px; display:flex; flex-direction:column; background:#13151a; }
.brand { display:flex; gap:10px; align-items:center; color:var(--text); text-decoration:none; font-size:19px; font-weight:750; letter-spacing:-.04em; padding:0 10px 34px; }
.brand-mark { display:grid; place-items:center; width:29px; height:29px; border-radius:9px; background:var(--accent); color:#102319; font-size:22px; }
.nav-item,.folder-button { width:100%; border:0; background:transparent; color:var(--muted); text-align:left; display:flex; gap:10px; align-items:center; padding:11px 10px; border-radius:9px; font-size:14px; transition:.2s; }
.nav-item:hover,.folder-button:hover,.folder-button.active { color:var(--text); background:#22252e; }.nav-item.active { color:var(--text); background:#282c36; }.nav-icon { font-size:18px; line-height:1; }.nav-title,.section-label { margin:32px 10px 9px; color:#777d8c; font-weight:700; letter-spacing:.1em; font-size:10px; }.nav-item small,.folder-button small { margin-left:auto; color:#737988; }.nav-item.active small { color:#b6edcd; }.folder-button span:first-child { color:#bdc4d3; }
.sidebar-note { margin:auto 10px 0; border-top:1px solid var(--border); padding-top:19px; color:#747a89; font-size:11px; line-height:1.55; }.sidebar code,.empty-state code { color:#c8cedb; }
.content { max-width:1500px; width:100%; margin:0 auto; padding:43px clamp(24px,5vw,74px) 76px; }.topbar { display:flex; justify-content:space-between; align-items:flex-end; gap:26px; }.topbar h1 { margin:0; font-size:clamp(29px,3vw,42px); line-height:1; letter-spacing:-.055em; }.topbar .section-label { margin:0 0 10px; }.search { min-width:min(100%,350px); height:43px; display:flex; align-items:center; gap:10px; padding:0 14px; border:1px solid var(--border); background:#1b1e25; border-radius:11px; color:#9da3b3; }.search span { font-size:24px; transform:rotate(-20deg); }.search input { border:0; outline:0; color:var(--text); background:transparent; width:100%; font-size:13px; }.search input::placeholder { color:#858b99; }
.album-section { margin-top:47px; }.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }.section-heading h2 { margin:0; font-size:20px; letter-spacing:-.035em; }.muted { color:var(--muted); font-size:12px; }.mobile-albums-toggle { display:none; }.album-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:18px; }.album-card { min-width:0; position:relative; }.album-select { display:block; width:100%; border:0; padding:0; background:transparent; text-align:left; color:var(--text); }.cover { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:13px; background:#282b36; box-shadow:0 9px 22px #0004; }.album-card .cover { transition:transform .22s,filter .22s; }.album-card:hover .cover,.album-card.selected .cover { transform:translateY(-3px); filter:brightness(1.1); }.album-card.selected .cover { outline:2px solid var(--accent); outline-offset:3px; }.album-card-title { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; padding-top:12px; font-weight:670; font-size:14px; }.album-card-meta { display:block; color:var(--muted); font-size:12px; padding-top:3px; }.album-play { position:absolute; top:calc(100% - 74px); right:11px; width:37px; height:37px; display:grid; place-items:center; border:0; border-radius:50%; color:#102419; background:var(--accent); opacity:0; transform:translateY(5px); transition:.2s; font-size:13px; }.album-card:hover .album-play,.album-card.selected .album-play,.album-play:focus-visible { opacity:1; transform:translateY(0); }
.tracks-section { margin-top:60px; }.tracks-section .section-label { margin:0 0 6px; }.album-actions { display:flex; gap:8px; }.play-album,.shuffle-album { border:0; padding:10px 15px; border-radius:9px; font-weight:750; font-size:12px; }.play-album { background:var(--accent); color:#13271b; }.shuffle-album { display:flex; align-items:center; gap:6px; background:#292d37; color:#e7eaf0; }.shuffle-album svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }.play-album:hover:not(:disabled) { background:#9bf2bd; }.shuffle-album:hover:not(:disabled) { color:var(--accent); background:#343945; }.play-album:disabled,.shuffle-album:disabled { opacity:.38; cursor:not-allowed; }.track-list { border-top:1px solid var(--border); }.track-row { display:grid; grid-template-columns:56px minmax(0,1fr) 40px; align-items:center; width:100%; min-height:62px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text); text-align:left; padding:0 9px; border-radius:5px; }.track-row:hover,.track-row.playing { background:#1b1e25; }.track-index { color:#818797; font-size:12px; display:flex; gap:2px; align-items:end; height:15px; }.track-row.playing .track-index { color:var(--accent); }.track-index i { width:2px; background:var(--accent); animation:bounce .75s infinite alternate; }.track-index i:nth-child(1){height:8px}.track-index i:nth-child(2){height:14px;animation-delay:.25s}.track-index i:nth-child(3){height:5px;animation-delay:.5s}@keyframes bounce{to{height:3px}}.track-title { min-width:0; display:flex; flex-direction:column; gap:4px; }.track-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:620; }.track-title small { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.track-action { color:#8a91a0; text-align:center; font-size:12px; }.track-row:hover .track-action,.track-row.playing .track-action { color:var(--accent); }.empty-state { padding:30px 11px; color:var(--muted); font-size:14px; }.empty-state.wide { grid-column:1/-1; border:1px dashed #343946; border-radius:13px; padding:28px; }
.player { position:fixed; z-index:10; bottom:0; left:0; right:0; min-height:116px; display:grid; grid-template-columns:minmax(220px,1fr) minmax(320px,520px) minmax(170px,1fr); align-items:center; gap:18px; padding:12px clamp(17px,3vw,43px); background:rgba(20,22,28,.96); border-top:1px solid #30343e; backdrop-filter:blur(15px); }.now-playing { min-width:0; display:flex; align-items:center; gap:13px; }.cover-small { width:61px; height:61px; flex:0 0 61px; border-radius:9px; display:grid; place-items:center; background:linear-gradient(135deg,#8257d9,#273252); color:white; font-size:25px; overflow:hidden; }.cover-small img { width:100%; height:100%; object-fit:cover; }.now-cover-button { border:0; padding:0; cursor:pointer; }.now-cover-button:not(:disabled):hover { outline:2px solid var(--accent); outline-offset:3px; }.now-cover-button:disabled { cursor:default; }.now-text { min-width:0; display:flex; flex-direction:column; gap:5px; }.now-text strong,.now-text span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.now-text strong { font-size:13px; }.now-text span { font-size:12px; color:var(--muted); }.playback { display:flex; flex-direction:column; gap:8px; }.controls { display:flex; justify-content:center; align-items:center; gap:11px; }.icon-button,.play-button { display:grid; place-items:center; border:0; background:transparent; color:#c9ced9; border-radius:50%; width:31px; height:31px; }.icon-button:hover,.icon-button.active { color:var(--accent); background:#292d36; }.icon-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.play-button { width:37px; height:37px; color:#13271b; background:var(--accent); }.play-button:disabled { opacity:.35; }.play-button svg { width:19px; height:19px; fill:currentColor; }.pause-icon,.play-button.is-playing .play-icon { display:none; }.play-button.is-playing .pause-icon { display:block; }.progress-row { display:grid; grid-template-columns:34px 1fr 34px; gap:8px; align-items:center; color:#8d93a1; font-size:10px; }.progress-row time:last-child { text-align:right; } input[type=range] { --fill:0%; width:100%; height:4px; appearance:none; cursor:pointer; border-radius:6px; background:linear-gradient(to right,var(--accent) var(--fill),#454a56 var(--fill)); } input[type=range]::-webkit-slider-thumb { appearance:none; height:11px; width:11px; border-radius:50%; background:var(--text); } .volume { display:flex; justify-content:flex-end; align-items:center; gap:7px; }.volume input { width:100px; }.volume .muted { color:#6d7280; }
.mobile-menu,.scrim,.mobile-featured-grid { display:none; }
@media (max-width:760px) { body { padding-bottom:154px; }.app-shell { display:block; }.sidebar { position:fixed; z-index:30; top:0; bottom:0; left:0; box-sizing:border-box; width:260px; overflow:hidden; transform:translateX(-102%); transition:transform .24s; }.sidebar nav { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }.sidebar .folder-list { padding-bottom:12px; }.menu-open .sidebar { transform:translateX(0); }.menu-open .scrim { display:block; position:fixed; inset:0; z-index:20; background:#0009; }.content { padding:29px 20px 48px; }.topbar { align-items:center; gap:10px; }.topbar h1 { font-size:32px; }.mobile-menu { display:grid; place-items:center; width:37px; height:37px; border:1px solid var(--border); border-radius:9px; color:var(--text); background:#1b1e25; font-size:18px; }.search { min-width:140px; width:min(44vw,190px); padding:0 10px; }.search input { display:block; font-size:12px; }.album-section { margin-top:35px; }.album-section>.section-heading { display:none; }.mobile-featured-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }.mobile-albums-toggle { display:flex; align-items:center; width:100%; gap:10px; margin-top:15px; padding:13px 14px; border:1px solid #3a404d; border-radius:11px; background:#20242d; color:var(--text); text-align:left; font-weight:750; }.mobile-albums-toggle img { width:18px; height:18px; object-fit:contain; filter:invert(1); }.mobile-albums-toggle small { color:#aeb5c4; font-size:12px; font-weight:600; }.mobile-albums-toggle i { margin-left:auto; color:var(--accent); font-size:20px; font-style:normal; line-height:1; transition:transform .2s; }.mobile-albums-open .mobile-albums-toggle { border-color:#63c98b; background:#1b2a22; }.mobile-albums-open .mobile-albums-toggle i { transform:rotate(180deg); }.album-section:not(.mobile-albums-open) .album-grid { display:none; }.mobile-albums-open .album-grid { margin-top:15px; }.album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }.tracks-section { margin-top:27px; }.tracks-section.current-track-focus { padding-top:var(--current-track-focus-offset,0); }.player { min-height:154px; grid-template-columns:1fr auto; grid-template-areas:"play play" "now volume"; padding:10px 15px 13px; gap:8px; }.now-playing { grid-area:now; }.volume { grid-area:volume; }.volume input { display:none; }.playback { grid-area:play; }.cover-small { width:47px; height:47px; flex-basis:47px; }.now-text strong { font-size:20px; line-height:1.1; }.now-text span { font-size:12px; }.controls { gap:16px; }.tracks-section .section-heading { align-items:flex-end; }.play-album { font-size:11px; padding:9px 10px; } }
@media (max-width:410px) { .topbar .section-label { display:none; }.album-grid { gap:12px; }.content { padding-left:16px; padding-right:16px; } }

/* Bibliotēkas pārvaldība */
.topbar { gap:18px; }.topbar-actions { display:flex; }.add-folder { display:flex; align-items:center; gap:5px; height:43px; padding:0 13px; color:#15281c; background:var(--accent); border:0; border-radius:10px; font-size:12px; }.add-folder span { font-size:19px; line-height:1; }.add-folder:hover { background:#9bf2bd; }
.play-album,.shuffle-album,.upload-tracks { padding:10px 13px; }.upload-tracks { display:flex; align-items:center; gap:6px; border:0; border-radius:9px; background:#292d37; color:#e7eaf0; font-weight:750; font-size:12px; }.upload-tracks span { color:var(--accent); font-size:17px; line-height:11px; }.upload-tracks:hover:not(:disabled) { color:var(--accent); background:#343945; }.upload-tracks:disabled { opacity:.38; cursor:not-allowed; }
.folder-dialog { width:min(92vw,430px); padding:0; border:1px solid #373c48; border-radius:17px; background:#1a1d24; color:var(--text); box-shadow:0 26px 80px #000b; }.folder-dialog::backdrop { background:#07080bb8; backdrop-filter:blur(3px); }.dialog-card { position:relative; padding:29px; }.dialog-card .section-label { margin:0 0 10px; }.dialog-card h2 { margin:0; font-size:25px; letter-spacing:-.04em; }.dialog-card>p:not(.section-label):not(.form-error) { margin:11px 0 24px; color:var(--muted); font-size:13px; line-height:1.55; }.dialog-card label { display:block; margin-bottom:7px; font-size:12px; font-weight:700; }.dialog-card input { width:100%; height:43px; padding:0 12px; border:1px solid #3c414e; border-radius:9px; background:#111318; color:var(--text); outline:0; }.dialog-card input::placeholder { color:#767c8b; }.dialog-close { position:absolute; top:13px; right:13px; display:grid; place-items:center; width:31px; height:31px; border:0; border-radius:8px; background:transparent; color:#b8becc; font-size:25px; }.dialog-close:hover { background:#292d37; }.form-error { min-height:18px; margin:6px 0 0; color:#ff9e9e; font-size:12px; }.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }.dialog-actions button { border:0; border-radius:8px; padding:10px 13px; font-size:12px; font-weight:700; }.dialog-cancel { background:#2b2f39; color:#e6e9f0; }.dialog-submit { background:var(--accent); color:#12261a; }.dialog-submit:disabled { opacity:.5; }.toast { position:fixed; z-index:50; left:50%; bottom:136px; max-width:min(92vw,440px); padding:12px 15px; border:1px solid #4d6657; border-radius:10px; background:#203228; color:#eafff1; box-shadow:0 15px 35px #0008; font-size:13px; opacity:0; pointer-events:none; transform:translate(-50%,14px); transition:.22s; }.toast.visible { opacity:1; transform:translate(-50%,0); }.toast[data-type="error"] { background:#47252b; border-color:#86515c; color:#ffe8ea; }.toast[data-type="warning"] { background:#42371f; border-color:#867034; color:#fff4d3; }
@media (max-width:760px) { .search { width:min(40vw,190px); }.add-folder { width:39px; justify-content:center; padding:0; }.add-folder b { display:none; }.play-album,.shuffle-album,.upload-tracks { font-size:11px; padding:9px 10px; }.toast { bottom:168px; } }
@media (max-width:560px) { .tracks-section .section-heading { align-items:stretch; flex-direction:column; }.album-actions { justify-content:flex-end; flex-wrap:wrap; }.topbar h1 { font-size:27px; } }

/* Nextcloud albumu josla */
.nextcloud-section { margin-top:22px; }
.nextcloud-toggle { width:100%; display:flex; align-items:center; gap:11px; min-height:48px; padding:12px 15px; border:1px solid #39404b; border-radius:11px; background:#1b2028; color:var(--text); text-align:left; font-weight:760; transition:background .18s,border-color .18s; }
.nextcloud-toggle:hover,.nextcloud-toggle.open { border-color:#57aa81; background:#1b2a22; }
.nextcloud-toggle-icon { color:var(--accent); font-size:18px; }
.nextcloud-toggle small { margin-left:auto; color:var(--muted); font-size:12px; font-weight:600; }
.nextcloud-toggle i { color:var(--accent); font-size:20px; font-style:normal; line-height:1; transition:transform .2s; }
.nextcloud-toggle.open i { transform:rotate(180deg); }
.nextcloud-panel { padding:17px 0 0; }
.nextcloud-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.nextcloud-panel-heading .section-label { margin:0; }
.nextcloud-refresh { border:1px solid #3a414d; border-radius:8px; padding:8px 11px; background:#222630; color:#dfe4ed; font-size:12px; font-weight:700; }
.nextcloud-refresh:hover { border-color:#69cf96; color:var(--accent); }
.nextcloud-album-grid { grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); }
.nextcloud-source-errors { margin:0 0 12px; color:#ffb1b1; font-size:12px; }
.nextcloud-source-errors p { margin:0 0 6px; }
.nextcloud-error { color:#ffb1b1; }
.nextcloud-error .nextcloud-refresh { display:inline-block; margin-top:12px; }
@media (max-width:760px) { .nextcloud-section { margin-top:17px; }.nextcloud-toggle { min-height:46px; padding:11px 13px; gap:9px; font-size:13px; }.nextcloud-toggle small { font-size:11px; }.nextcloud-panel { padding-top:14px; }.nextcloud-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.album-section:not(.mobile-albums-open) #nextcloudPanel .album-grid { display:grid; } }
@media (max-width:410px) { .topbar h1 { font-size:24px; }.search { min-width:104px; } }
.admin-link { display:flex; align-items:center; justify-content:center; gap:8px; margin:auto 10px 0; padding:11px 10px; border:1px solid #38404b; border-radius:9px; background:#20242d; color:#d9dee8; text-decoration:none; font-size:13px; font-weight:700; }.admin-link:hover { color:#14281b; background:var(--accent); border-color:var(--accent); }
.all-folders-play { width:100%; display:flex; gap:9px; align-items:center; border:1px solid #3d4650; border-radius:9px; margin:8px 0 0; padding:10px; background:#1b2a22; color:#baf5d1; text-align:left; font-size:12px; font-weight:700; }.all-folders-play:hover { border-color:#6ccf94; background:#233a2d; }.all-folders-play span { font-size:17px; line-height:1; }
.audioteka-heading .section-label { margin:0 0 7px; }.audioteka-title-row { display:flex; align-items:center; gap:11px; }.audioteka-title-row>img { width:38px; height:38px; object-fit:contain; padding:0; background:transparent; filter:invert(1); mix-blend-mode:screen; }.audioteka-title-row h1 { margin:0; }.track-row { grid-template-columns:56px 39px minmax(0,1fr) 38px 40px; gap:9px; }.track-cover { width:35px; height:35px; border-radius:6px; object-fit:cover; background:#292d37; }.track-row .track-index { justify-content:center; }
.track-row { display:grid; }.lyrics-button { width:34px; height:30px; border:1px solid #3c414d; border-radius:7px; background:#20232b; color:#858b99; font-size:11px; font-weight:800; letter-spacing:.02em; cursor:pointer; }.lyrics-button.has-lyrics { border-color:#3d6950; background:#1b2a22; color:var(--accent); }.lyrics-button.has-lyrics:hover { border-color:var(--accent); background:#233a2d; }.lyrics-button:disabled { border-color:#343945; background:#1a1d24; color:#737987; cursor:not-allowed; opacity:.78; }
.lyrics-dialog { width:min(680px,calc(100vw - 30px)); max-height:min(82dvh,760px); padding:0; overflow:hidden; border:1px solid #3b404c; border-radius:18px; background:#17191f; color:var(--text); box-shadow:0 24px 90px #000b; }.lyrics-dialog::backdrop { background:#06070bd9; backdrop-filter:blur(5px); }.lyrics-card { max-height:inherit; overflow:auto; }.lyrics-header { display:flex; align-items:center; gap:15px; padding:21px 24px 17px; border-bottom:1px solid var(--border); }.lyrics-header .section-label { margin:0 0 6px; }.lyrics-header h2 { margin:0; font-size:23px; }.lyrics-header p:last-child { margin:5px 0 0; color:var(--muted); font-size:13px; }.lyrics-back { flex:0 0 39px; width:39px; height:39px; border:1px solid var(--border); border-radius:9px; background:#22252e; color:var(--text); font-size:21px; cursor:pointer; }.lyrics-tabs { display:flex; gap:8px; padding:14px 24px 0; }.lyrics-tabs button { border:1px solid #3c414d; border-radius:8px; padding:8px 12px; background:#22252e; color:#c4cad5; font-size:12px; cursor:pointer; }.lyrics-tabs button[aria-pressed="true"] { border-color:#5a946f; background:#1c2e24; color:var(--accent); }.lyrics-tabs button[hidden] { display:none; }.lyrics-content { max-height:55dvh; overflow:auto; margin:0; padding:18px 24px 25px; color:#e9ebf1; font-family:inherit; font-size:15px; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
@media (max-width:760px) { .audioteka-title-row>img { width:32px; height:32px; }.track-row { grid-template-columns:39px 36px minmax(0,1fr) 34px 31px; gap:5px; padding:0 4px; }.track-cover { width:32px; height:32px; }.track-row .track-index { font-size:11px; }.lyrics-button { width:31px; height:28px; }.lyrics-header { padding:18px 17px 14px; }.lyrics-tabs { padding-right:18px; padding-left:18px; }.lyrics-content { padding:15px 18px 21px; font-size:14px; } }
.repeat-ten-button { font-size:11px; font-weight:800; letter-spacing:-.03em; }.repeat-ten-button:disabled { opacity:.42; cursor:not-allowed; }

/* Application-inspired three-pane library (desktop) and touch-first phone layout */
@media (min-width:1100px) {
  html,body { height:100%; overflow:hidden; }
  body { padding:0; background:#101116; }
  .app-shell { width:100%; height:100dvh; min-height:0; grid-template-columns:minmax(300px,1.03fr) minmax(320px,1fr) minmax(350px,1.02fr); gap:0; }
  .library-pane,.tracks-pane,.player { min-width:0; min-height:0; height:100dvh; }
  .library-pane { position:relative; inset:auto; width:auto; transform:none; overflow:hidden; display:flex; flex-direction:column; padding:22px 20px 18px; border-right:1px solid #30323b; background:radial-gradient(ellipse at 15% 0%,#1d2530 0,transparent 48%),#13151b; }
  .library-pane>.topbar { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:18px; padding:0 2px 17px; border-bottom:1px solid var(--border); }
  .library-pane .brand { flex:1; min-width:0; padding:0; gap:10px; font-size:clamp(18px,1.4vw,23px); }
  .library-pane .brand-mark { width:34px; height:34px; flex:0 0 34px; border-radius:10px; font-size:25px; }
  .library-nav { display:flex; flex-direction:column; flex:0 0 auto; max-height:24dvh; min-height:0; margin:14px 0 7px; overflow:hidden; }
  .library-nav .nav-item { flex:none; color:#eff1f6; background:#232630; border:1px solid #343844; min-height:42px; }
  .folder-nav { min-height:0; overflow:auto; scrollbar-width:thin; }
  .folder-nav .nav-title { margin:12px 8px 5px; }
  .folder-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 5px; }
  .folder-button { min-width:0; padding:8px; font-size:12px; }
  .folder-button span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .library-pane .search { width:100%; min-width:0; height:42px; flex:1 0 100%; border-radius:12px; }
  .library-pane .search input { font-size:13px; }
  .album-section { display:flex; flex:1; flex-direction:column; min-height:0; margin:0; padding-top:13px; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; }
  .album-section>.section-heading { flex:none; margin:0 1px 11px; }
  .album-section>.section-heading h2 { font-size:19px; }
  .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
  .album-card .cover { border-radius:11px; }
  .album-card-title { padding-top:9px; font-size:13px; }
  .album-card-meta { font-size:11px; }
  .album-play { opacity:1; transform:none; top:calc(100% - 67px); right:8px; width:32px; height:32px; }
  .library-actions { display:flex; align-items:center; gap:10px; flex:none; margin:0 0 13px; }
  .suggestion-icon,.all-folders-play { width:43px; height:43px; flex:0 0 43px; display:grid; place-items:center; margin:0; padding:0; border:1px solid #3d4650; border-radius:50%; background:#252833; color:#f1f2f6; text-decoration:none; }
  .suggestion-icon:hover,.all-folders-play:hover { color:#102319; background:var(--accent); border-color:var(--accent); }
  .suggestion-icon svg,.all-folders-play svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .all-folders-play span { display:none; }
  .nextcloud-toggle { width:43px; height:43px; min-height:43px; flex:0 0 43px; justify-content:center; gap:0; padding:0; border-radius:50%; }
  .nextcloud-toggle-icon { font-size:20px; }
  .nextcloud-label,.nextcloud-toggle small,.nextcloud-toggle i { display:none; }
  .nextcloud-panel { flex:none; padding:0 0 12px; }
  .nextcloud-panel-heading { margin-bottom:9px; }
  .nextcloud-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  .tracks-pane { overflow:auto; padding:27px clamp(19px,2.4vw,34px) 28px; background:#101116; scrollbar-width:thin; }
  .tracks-section { margin:0; }
  .tracks-section>.section-heading { align-items:flex-start; flex-direction:column; margin-bottom:14px; }
  .tracks-section .section-heading h2 { font-size:clamp(20px,1.8vw,27px); overflow-wrap:anywhere; }
  .album-actions { width:100%; }
  .album-actions button { min-height:40px; border-radius:22px; }
  .track-list { border-top:1px solid #2c2f38; }
  .track-row { min-height:70px; grid-template-columns:27px 43px minmax(0,1fr) 36px 38px; gap:9px; padding:0 3px; }
  .track-cover { width:39px; height:39px; border-radius:50%; }
  .track-title strong { font-size:13px; }
  .track-title small { font-size:11px; }
  .player { position:relative; inset:auto; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:18px; min-height:100dvh; padding:clamp(24px,4vh,44px) clamp(22px,2.5vw,38px) 26px; border-top:0; border-left:1px solid #30323b; background:linear-gradient(180deg,#191a22,#111217 70%); backdrop-filter:none; }
  .now-playing { display:flex; flex-direction:column; align-items:stretch; gap:18px; }
  .cover-small { width:100%; height:auto; aspect-ratio:1; flex:none; border-radius:17px; background:#242731; box-shadow:0 18px 45px #0007; }
  .now-text { gap:7px; }
  .now-text strong { font-size:clamp(21px,2vw,29px); line-height:1.2; white-space:normal; }
  .now-text span { font-size:15px; }
  .playback { width:100%; gap:14px; }
  .controls { justify-content:space-between; gap:8px; }
  .icon-button,.play-button { width:43px; height:43px; }
  .icon-button svg { width:22px; height:22px; }
  .play-button { width:57px; height:57px; }
  .play-button svg { width:26px; height:26px; }
  .progress-row { grid-template-columns:40px minmax(0,1fr) 40px; gap:11px; font-size:12px; }
  .progress-row input[type=range] { height:5px; }
  .progress-row input[type=range]::-webkit-slider-thumb { width:15px; height:15px; }
  .volume { margin-top:auto; justify-content:flex-start; border-top:1px solid var(--border); padding-top:17px; }
  .volume input { width:auto; flex:1; }
  .mobile-menu,.mobile-featured-grid,.mobile-albums-toggle,.scrim { display:none!important; }
  .lyrics-dialog { z-index:80; }
}

@media (min-width:761px) and (max-width:1099px) {
  body { padding:0 0 112px; }
  .app-shell { min-height:calc(100dvh - 112px); grid-template-columns:minmax(260px,34vw) minmax(0,1fr); }
  .sidebar { position:relative; inset:auto; width:auto; transform:none; height:calc(100dvh - 112px); overflow:hidden; padding:22px 17px; }
  .sidebar>.topbar { display:flex; flex-direction:column; align-items:stretch; gap:15px; }
  .sidebar .brand { padding:0; }
  .sidebar .brand-mark { width:32px; height:32px; flex:0 0 32px; font-size:24px; }
  .sidebar .search { width:100%; min-width:0; }
  .library-nav { max-height:23dvh; overflow:auto; }
  .folder-list { max-height:16dvh; overflow:auto; }
  .album-section { flex:1; min-height:0; overflow:auto; margin:0; padding-top:17px; }
  .album-grid,.nextcloud-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .library-actions { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
  .suggestion-icon,.all-folders-play { width:42px; height:42px; display:grid; place-items:center; margin:0; padding:0; border-radius:50%; background:#252833; color:var(--text); border:1px solid #3d4650; }
  .suggestion-icon { text-decoration:none; }
  .suggestion-icon svg,.all-folders-play svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .all-folders-play span { display:none; }
  .nextcloud-toggle { width:42px; height:42px; min-height:42px; padding:0; justify-content:center; border-radius:50%; }
  .nextcloud-label,.nextcloud-toggle small,.nextcloud-toggle i { display:none; }
  .tracks-pane { padding:28px clamp(20px,4vw,42px) 40px; }
  .player { min-height:112px; }
  .mobile-menu,.mobile-featured-grid,.mobile-albums-toggle { display:none!important; }
}

@media (min-width:761px) and (max-width:1099px) {
  .album-view-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0 0 13px; }
  .album-view-actions .nav-item { width:auto; min-height:39px; gap:7px; padding:0 11px; border:0; border-radius:21px; background:var(--accent); color:#10261a; font-size:12px; font-weight:700; }
  .album-view-actions .nav-item .nav-icon { display:none; }
  .album-view-actions .nav-item small { color:#24573d; font-size:11px; }
  .album-view-actions .play-all-label { display:flex; flex:0 1 auto; align-items:center; justify-content:center; gap:7px; width:auto; min-height:39px; padding:0 11px; border:1px solid #333943; border-radius:21px; background:#111419; color:#f1f2f5; font-size:12px; }
  .album-view-actions .play-all-label svg { width:15px; height:15px; fill:var(--accent); stroke:none; }
}

@media (max-width:760px) {
  html,body { height:auto; min-height:100%; overflow-x:hidden; overflow-y:auto; }
  body { padding:0 0 calc(148px + env(safe-area-inset-bottom)); background:radial-gradient(ellipse at 50% -160px,#263042 0,transparent 440px),#101116; }
  .app-shell { display:block; min-height:100dvh; }
  .library-pane { position:relative; inset:auto; transform:none; width:100%; height:auto; min-height:0; overflow:visible; padding:calc(12px + env(safe-area-inset-top)) 17px 0; border:0; background:transparent; }
  .library-pane>.topbar { display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:8px; padding:0 0 16px; }
  .mobile-menu { display:grid; width:36px; height:36px; place-items:center; border-radius:50%; border:1px solid #343844; background:#20232b; color:var(--text); font-size:17px; }
  .library-pane .brand { min-width:0; padding:0; gap:8px; font-size:clamp(17px,5vw,22px); }
  .library-pane .brand-mark { width:30px; height:30px; flex:0 0 30px; border-radius:9px; font-size:23px; }
  .library-pane .brand span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .library-pane .search { grid-column:1/-1; width:100%; min-width:0; height:46px; border-radius:14px; background:#1b1e25; }
  .library-pane .search input { font-size:14px; }
  .library-nav { display:none; }
  .menu-open .library-nav { position:fixed; z-index:41; top:calc(64px + env(safe-area-inset-top)); left:14px; display:block; width:min(330px,calc(100vw - 28px)); max-height:min(62dvh,540px); overflow:auto; padding:12px; border:1px solid #3b404c; border-radius:16px; background:#191b22; box-shadow:0 18px 55px #000b; }
  .library-nav .nav-item { min-height:46px; background:#252832; }
  .folder-nav .nav-title { margin:15px 8px 8px; }
  .folder-list { max-height:44dvh; overflow:auto; }
  .folder-button { min-height:42px; }
  .album-section { margin:0; padding:0; overflow:visible; }
  .album-section>.section-heading { display:flex; margin:0 0 11px; }
  .album-section>.section-heading h2 { font-size:25px; letter-spacing:-.04em; }
  .album-count { color:var(--muted); }
  .library-actions { display:flex; align-items:center; gap:12px; margin:0 0 14px; }
  .suggestion-icon,.all-folders-play { display:grid; place-items:center; flex:0 0 45px; width:45px; height:45px; margin:0; padding:0; border:1px solid #3a3e49; border-radius:50%; background:#20232b; color:#f3f4f7; text-decoration:none; }
  .suggestion-icon svg,.all-folders-play svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .all-folders-play span { display:none; }
  .nextcloud-toggle { display:grid; place-items:center; flex:0 0 45px; width:45px; height:45px; min-height:45px; padding:0; border-radius:50%; }
  .nextcloud-label,.nextcloud-toggle small,.nextcloud-toggle i { display:none; }
  .mobile-featured-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
  .mobile-albums-toggle { min-height:46px; margin:14px 0 0; border-radius:13px; }
  .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .album-card-title { font-size:14px; }
  .album-play { opacity:1; transform:none; width:35px; height:35px; top:calc(100% - 66px); right:8px; }
  .nextcloud-panel { padding:0 0 14px; }
  .nextcloud-panel-heading { margin:8px 1px 11px; }
  .tracks-pane { max-width:none; width:100%; margin:0; padding:26px 17px 28px; overflow:visible; background:transparent; }
  .tracks-section { margin:0; }
  .tracks-section>.section-heading { align-items:flex-end; flex-direction:row; gap:9px; margin-bottom:14px; }
  .tracks-section .section-heading h2 { max-width:56vw; font-size:clamp(18px,5.1vw,23px); }
  .tracks-section .section-label { margin:0 0 5px; font-size:9px; }
  .album-actions { gap:6px; justify-content:flex-end; flex-wrap:nowrap; }
  .play-album,.shuffle-album { white-space:nowrap; padding:9px 11px; border-radius:20px; font-size:11px; }
  .track-list { border-top:1px solid #2a2d36; }
  .track-row { min-height:67px; grid-template-columns:24px 40px minmax(0,1fr) 34px 34px; gap:7px; padding:0 2px; }
  .track-cover { width:36px; height:36px; border-radius:50%; }
  .track-title strong { font-size:13px; }
  .track-title small { font-size:11px; }
  .lyrics-button { width:31px; height:29px; }
  .player { position:fixed; inset:auto 0 0; z-index:15; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"play play" "now volume"; align-items:center; gap:7px 10px; min-height:0; padding:8px 14px calc(9px + env(safe-area-inset-bottom)); border:0; border-top:1px solid #30343e; background:rgba(25,27,35,.97); backdrop-filter:blur(18px); }
  .playback { grid-area:play; gap:4px; }
  .controls { justify-content:center; gap:clamp(14px,5vw,25px); }
  .controls .icon-button:first-child { display:none; }
  .icon-button,.play-button { width:32px; height:32px; }
  .play-button { width:38px; height:38px; }
  .play-button svg { width:19px; height:19px; }
  .progress-row { grid-template-columns:31px minmax(0,1fr) 31px; gap:6px; font-size:9px; }
  .progress-row input[type=range] { height:4px; }
  .progress-row input[type=range]::-webkit-slider-thumb { width:12px; height:12px; }
  .now-playing { grid-area:now; min-width:0; gap:9px; }
  .cover-small { width:41px; height:41px; flex:0 0 41px; border-radius:8px; }
  .now-text { gap:3px; }
  .now-text strong { font-size:14px; line-height:1.1; }
  .now-text span { font-size:10px; }
  .volume { grid-area:volume; justify-content:flex-end; }
  .volume input { display:none; }
  .volume .icon-button { width:30px; height:30px; }
  .menu-open .scrim { display:block!important; position:fixed; z-index:40; inset:0; background:#05060ab0; }
  .tracks-section.current-track-focus { padding-top:0; }
  .toast { bottom:calc(155px + env(safe-area-inset-bottom)); }
}

/* Explicit source selector: host albums and Nextcloud albums are separate views. */
.source-toggle { display:grid; place-items:center; flex:0 0 43px; width:43px; height:43px; min-height:43px; margin:0; padding:0; border:1px solid #3a3e49; border-radius:50%; background:#20232b; color:#aeb5c3; transition:color .18s,border-color .18s,background .18s; }
.source-toggle:hover { border-color:#568d70; color:#d5e1da; }
.source-toggle.active { border-color:#1c6248; background:#14231f; color:#42dc95; }
.source-la-mark { font-size:14px; font-weight:850; letter-spacing:-1.4px; padding-right:1px; }
.nextcloud-toggle-icon { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nextcloud-toggle.open { border-color:#1c6248; background:#14231f; color:#42dc95; }
.nextcloud-toggle.open .nextcloud-toggle-icon { color:#42dc95; }
.nextcloud-toggle:not(.open) .nextcloud-toggle-icon { color:#aeb5c3; }
.album-section.nextcloud-source-active #mobileFeaturedGrid,
.album-section.nextcloud-source-active #mobileAlbumsToggle,
.album-section.nextcloud-source-active #albumGrid,
.album-section.nextcloud-source-active .album-view-actions { display:none!important; }
.album-section.nextcloud-source-active #nextcloudPanel[hidden] { display:none!important; }
.library-pane.nextcloud-source-active .library-nav { display:none!important; }
@media (min-width:1100px) {
  .source-toggle { flex-basis:58px; width:58px; height:58px; min-height:58px; }
  .source-la-mark { font-size:17px; }
  .nextcloud-toggle-icon { width:27px; height:27px; }
}
@media (min-width:761px) and (max-width:1099px) {
  .source-toggle { flex-basis:42px; width:42px; height:42px; min-height:42px; }
}
@media (max-width:760px) {
  .source-toggle { flex-basis:45px; width:45px; height:45px; min-height:45px; }
  .source-la-mark { font-size:14px; }
}

@media (max-width:760px) {
  .library-pane { z-index:auto; }
  .player { z-index:30; }
}
@media (max-width:390px) {
  .library-pane,.tracks-pane { padding-left:13px; padding-right:13px; }
  .tracks-section>.section-heading { align-items:flex-start; flex-direction:column; }
  .tracks-section .section-heading h2 { max-width:88vw; }
  .album-actions { width:100%; justify-content:flex-start; }
  .track-row { grid-template-columns:20px 36px minmax(0,1fr) 31px 31px; gap:5px; }
  .track-cover { width:33px; height:33px; }
}

@media (max-width:760px) {
  .library-pane>.topbar { grid-template-columns:minmax(0,1fr); }
  .mobile-albums-toggle { display:none!important; }
  .album-section:not(.nextcloud-source-active):not(.mobile-albums-open) #albumGrid { display:grid!important; margin-top:15px; }
}

.brand-logo { display:block; flex:0 0 34px; width:34px; height:34px; object-fit:contain; background:transparent; }
@media (min-width:761px) and (max-width:1099px) {
  .brand-logo { flex-basis:38px; width:38px; height:38px; }
}
@media (min-width:1100px) {
  .brand-logo { flex-basis:52px; width:52px; height:52px; }
}
@media (max-width:760px) {
  .brand-logo { flex-basis:40px; width:40px; height:40px; }
}

/* Reference layout: album browser, selected-album queue, and full player */
.selected-album-hero { display:grid; grid-template-columns:minmax(110px,185px) minmax(0,1fr); align-items:center; gap:20px; margin:0 0 23px; }
.selected-album-hero[hidden] { display:none; }
.selected-album-cover { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:12px; background:#20232b; }
.selected-album-copy { min-width:0; }
.selected-album-copy h2 { margin:0; color:var(--text); font-size:clamp(21px,2vw,30px); line-height:1.15; letter-spacing:-.035em; }
.selected-album-copy>p { min-height:1em; margin:8px 0 17px; color:var(--muted); font-size:16px; }
.track-list-intro { margin:0 0 16px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.track-list-intro h3 { margin:0; color:#aeb4c2; font-size:15px; font-weight:550; }
.track-list-intro .section-label { display:none; }
.album-view-actions { display:none; }
.brand-mark-note { display:grid; place-items:center; flex:none; width:30px; height:30px; border-radius:9px; background:var(--accent); color:#102319; font-size:23px; line-height:1; }
.brand-mark-la { display:none; }
.album-view-actions .play-all-label span { display:inline; }

@media (min-width:1100px) {
  .library-pane { padding:18px 28px 24px; }
  .library-pane>.topbar { position:relative; flex:0 0 auto; display:flex; align-items:center; justify-content:flex-start; gap:15px; min-height:58px; margin:0 0 17px; padding:0; border:0; }
  .library-pane .brand { min-width:0; padding:0; gap:15px; font-size:23px; letter-spacing:-.035em; }
  .brand-mark-note { display:none; }
  .brand-mark-la { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; overflow:hidden; border:1px solid #58606a; border-radius:50%; background:#111318; color:#35d58d; font-size:19px; font-weight:850; letter-spacing:-2px; padding-right:2px; }
  .library-pane .search { position:absolute; z-index:4; top:7px; right:0; display:flex; width:38px; min-width:38px; height:38px; flex:none; gap:6px; overflow:hidden; padding:0; border:1px solid transparent; border-radius:22px; background:transparent; transition:width .22s ease,background .22s ease,border-color .22s ease; }
  .library-pane .search span { display:grid; flex:0 0 36px; width:36px; height:36px; place-items:center; margin:0; transform:none; color:#b8c0ce; font-size:24px; cursor:text; }
  .library-pane .search input { width:0; min-width:0; height:36px; padding:0; opacity:0; font-size:13px; transition:width .22s ease,opacity .15s ease; }
  .library-pane .search:focus-within { width:min(310px,calc(100% - 75px)); min-width:190px; padding-right:11px; border-color:#353a44; background:#1b1e25; }
  .library-pane .search:focus-within input { width:100%; opacity:1; }
  .library-nav { display:none; }
  .album-section { margin:0; padding-top:0; overflow:auto; }
  .library-actions { display:flex; align-items:center; gap:17px; margin:0 0 27px; }
  .suggestion-icon,.library-actions .nextcloud-toggle,.library-actions .icon-shuffle-all { display:grid; flex:0 0 58px; width:58px; height:58px; min-height:58px; place-items:center; margin:0; padding:0; border:1px solid #2d333a; border-radius:50%; background:#14171c; color:#c1c7d1; text-decoration:none; }
  .suggestion-icon { border-color:#1c6248; color:#42dc95; background:#14231f; }
  .suggestion-icon:hover,.library-actions .nextcloud-toggle:hover,.library-actions .icon-shuffle-all:hover { border-color:#3bcb8b; color:var(--accent); background:#1a2823; }
  .suggestion-icon svg,.library-actions .icon-shuffle-all svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
  .library-actions .all-folders-play span { display:none; }
  .library-actions .nextcloud-toggle-icon { font-size:27px; }
  .album-section>.section-heading { flex:none; margin:0 0 14px; }
  .album-section>.section-heading h2 { font-size:25px; letter-spacing:-.04em; }
  .album-view-actions { display:flex; align-items:center; gap:10px; margin:0 0 21px; }
  .album-view-actions .nav-item { width:auto; min-height:44px; gap:10px; padding:0 17px; border:1px solid transparent; border-radius:24px; background:var(--accent); color:#10261a; font-size:15px; font-weight:700; }
  .album-view-actions .nav-item .nav-icon { display:none; }
  .album-view-actions .nav-item small { margin-left:3px; color:#24573d; font-size:13px; }
  .album-view-actions .play-all-label { display:flex; flex:0 0 auto; align-items:center; justify-content:center; gap:10px; width:auto; min-height:44px; padding:0 17px; border:1px solid #333943; border-radius:24px; background:#111419; color:#f1f2f5; font-size:15px; font-weight:550; }
  .album-view-actions .play-all-label svg { width:18px; height:18px; fill:var(--accent); stroke:none; }
  .album-view-actions .play-all-label:hover { border-color:#55d798; color:var(--accent); background:#161e1b; }
  .album-grid,.nextcloud-album-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  .album-card .cover { border-radius:9px; box-shadow:none; }
  .album-card-title { padding-top:8px; font-size:12px; font-weight:650; }
  .album-card-meta { padding-top:2px; font-size:11px; }
  .album-play { top:calc(100% - 60px); right:7px; width:29px; height:29px; opacity:1; transform:none; }
  .tracks-pane { display:flex; flex-direction:column; justify-content:flex-start; padding:38px 16px 30px; border-right:1px solid #282c34; border-left:1px solid #282c34; background:linear-gradient(180deg,#111318,#101116); }
  .tracks-section { width:100%; margin:0; }
  .selected-album-hero { grid-template-columns:minmax(130px,185px) minmax(0,1fr); gap:22px; margin:0 10px 31px; }
  .selected-album-cover { border-radius:11px; }
  .selected-album-copy h2 { font-size:clamp(21px,1.8vw,29px); }
  .selected-album-copy>p { margin:8px 0 16px; font-size:16px; }
  .album-actions { width:auto; flex-wrap:wrap; gap:8px; }
  .album-actions button { min-height:43px; padding:0 16px; border-radius:24px; font-size:13px; }
  .track-list-intro { margin:0 8px 16px; padding-bottom:13px; }
  .track-list-intro h3 { font-size:16px; }
  .track-list { min-height:0; overflow:auto; border-top:0; scrollbar-width:thin; }
  .track-row { min-height:60px; grid-template-columns:28px 44px minmax(0,1fr) 38px 38px; gap:9px; padding:0 9px; border-bottom:1px solid #272a31; border-radius:7px; }
  .track-row.playing { background:#193127; }
  .track-cover { width:40px; height:40px; border-radius:7px; }
  .track-title strong { font-size:14px; }
  .track-title small { font-size:12px; }
  .lyrics-button { width:34px; height:30px; }
  .track-action { display:grid; place-items:center; height:36px; border:0; border-radius:7px; background:#2b3037; font-size:12px; }
  .track-row.playing .track-action { background:var(--accent); color:#10261a; }
  .track-list-intro .section-label { display:none; }
  .player { justify-content:center; gap:0; padding:38px clamp(24px,2.8vw,45px) 27px; }
  .now-playing { gap:clamp(23px,4vh,43px); }
  .cover-small { max-width:min(100%,470px); align-self:center; border-radius:13px; }
  .now-text { align-items:center; text-align:center; }
  .now-text strong { font-size:clamp(25px,2.2vw,33px); }
  .now-text span { font-size:21px; }
  .playback { display:flex; flex-direction:column; margin-top:30px; }
  .progress-row { order:1; }
  .controls { order:2; }
  .progress-row { grid-template-columns:42px minmax(0,1fr) 42px; font-size:13px; }
  .progress-row input[type=range] { height:5px; }
  .progress-row input[type=range]::-webkit-slider-thumb { width:15px; height:15px; }
  .controls { margin-top:20px; gap:20px; }
  .icon-button,.play-button { width:46px; height:46px; }
  .play-button { width:106px; height:106px; }
  .play-button svg { width:46px; height:46px; }
  .icon-button svg { width:25px; height:25px; }
  .volume { margin-top:36px; border:0; padding:0; opacity:.72; }
  .volume input { width:100%; max-width:170px; }
  .mobile-menu,.mobile-featured-grid,.mobile-albums-toggle { display:none!important; }
}

@media (max-width:760px) {
  .album-view-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 15px; }
  .album-view-actions .nav-item { width:auto; min-height:40px; gap:7px; padding:0 13px; border:0; border-radius:22px; background:var(--accent); color:#10261a; font-size:13px; font-weight:700; }
  .album-view-actions .nav-item .nav-icon { display:none; }
  .album-view-actions .nav-item small { color:#24573d; font-size:12px; }
  .album-view-actions .play-all-label { display:flex; flex:0 1 auto; align-items:center; justify-content:center; gap:7px; width:auto; min-height:40px; padding:0 13px; border:1px solid #333943; border-radius:22px; background:#111419; color:#f1f2f5; font-size:13px; }
  .album-view-actions .play-all-label svg { width:16px; height:16px; fill:var(--accent); stroke:none; }
  .brand-mark-note { display:grid; }
  .brand-mark-la { display:none; }
  .selected-album-hero { grid-template-columns:1fr; gap:0; margin:0 0 13px; }
  .selected-album-cover { display:none; }
  .selected-album-copy h2 { font-size:clamp(18px,5.1vw,23px); }
  .selected-album-copy>p { min-height:0; margin:4px 0 8px; font-size:12px; }
  .selected-album-hero .album-actions { width:100%; justify-content:flex-end; flex-wrap:wrap; }
  .track-list-intro { display:none; }
}

@media (min-width:1100px) {
  .library-pane .album-section {
    margin-right:-28px;
    padding-right:22px;
    scrollbar-gutter:stable;
    scrollbar-width:thin;
    scrollbar-color:#67717f transparent;
  }
  .library-pane .album-section::-webkit-scrollbar { width:6px; }
  .library-pane .album-section::-webkit-scrollbar-track { background:transparent; }
  .library-pane .album-section::-webkit-scrollbar-thumb { border-radius:8px; background:#67717f; }
  .library-pane .album-section::-webkit-scrollbar-thumb:hover { background:#93a0af; }
}

@media (max-width:760px) {
  #trackList::after {
    content: "";
    display: block;
    height: var(--mobile-scroll-runway, 0px);
  }
}

.icon-shuffle-all.active {
  border-color:#1c6248;
  background:#14231f;
  color:#42dc95;
}
.icon-shuffle-all:disabled { opacity:.62; cursor:wait; }

.mobile-scroll-top { display:none; }
@media (max-width:760px) {
  .mobile-scroll-top { display:grid; }
}

.favorites-open svg {width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.favorite-heart.active svg {fill:var(--accent);stroke:var(--accent)}.favorite-heart:disabled {opacity:.4}.favorites-dialog {width:min(560px,calc(100vw - 24px));max-height:80vh;padding:0;border:1px solid #444b58;border-radius:16px;background:#171b23;color:var(--text)}.favorites-dialog::backdrop {background:#000b}.favorites-card {padding:20px}.favorites-card header {display:flex;align-items:center;justify-content:space-between;gap:16px}.favorites-card header button {border:0;background:transparent;color:inherit;font-size:24px}.favorites-list {display:grid;gap:6px;margin-top:16px;overflow:auto}.favorite-row {display:flex;align-items:center;gap:12px;width:100%;padding:9px;border:0;border-radius:8px;background:#252b36;color:inherit;text-align:left}.favorite-row img {width:48px;height:48px;object-fit:cover}.favorite-row span:nth-child(2) {display:grid;flex:1;min-width:0;gap:4px}.favorite-row strong,.favorite-row small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.favorite-row small {color:var(--muted)}.user-account {display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px}.user-account span {max-width:70px;overflow:hidden;text-overflow:ellipsis}.user-account button {border:0;background:transparent;color:var(--accent);padding:4px}@media(max-width:760px){.library-actions {gap:6px!important;flex-wrap:wrap}.controls {gap:4px!important}.user-account span {display:none}.favorites-card {padding:14px}}

.favorites-view[hidden],.tracks-section[hidden]{display:none!important}.favorites-view{width:100%;min-width:0}.favorites-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.favorites-heading h2{margin:0;overflow-wrap:anywhere}.favorites-heading button{flex:none;min-height:40px}.brand-and-account{display:flex;align-items:center;gap:8px;min-width:0}.brand-and-account .brand{flex:none}.brand-and-account .user-account{display:flex;min-width:0;gap:3px}.brand-and-account .user-account span{display:block;max-width:85px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand-and-account .user-account button{font-size:22px;line-height:1;min-width:30px;min-height:36px;cursor:pointer}@media(min-width:1100px){.library-pane>.topbar{gap:4px}.library-pane .brand{font-size:clamp(14px,1.35vw,23px);gap:6px}.library-pane .brand-and-account{flex:1;min-width:0}.library-pane .search{position:relative;top:auto;right:auto;flex:none}.library-pane .search:focus-within{position:absolute;right:0;width:min(310px,calc(100% - 75px))}}@media(max-width:760px){.library-pane>.topbar{display:flex;flex-wrap:wrap;gap:6px}.brand-and-account{flex:1 1 auto;max-width:100%}.brand-and-account .brand{min-width:0;flex:0 1 auto}.brand-and-account .brand span{white-space:nowrap;font-size:clamp(14px,4.2vw,20px)}.brand-and-account .user-account span{display:block;max-width:76px}.favorites-heading{margin:18px 0}.favorites-view{padding-bottom:20px}}

.brand-and-account{gap:6px}.brand-and-account .user-account{gap:1px;flex:0 1 auto;white-space:nowrap;font-size:16px;font-weight:600;color:var(--muted)}.brand-and-account .user-account::before{content:'('}.brand-and-account .user-account::after{content:')'}.brand-and-account .user-account span{max-width:120px;font-size:inherit}.brand-and-account .user-account button{min-width:24px;min-height:36px;padding:2px;font-size:22px}@media(max-width:760px){.brand-and-account .user-account{font-size:15px}.brand-and-account .user-account span{max-width:90px}}

.brand-and-account{width:100%;justify-content:space-between}.brand-and-account .user-account{margin-left:auto}@media(max-width:760px){.brand-and-account{flex:1 1 100%}}

.favorites-heading #favoritesRandom{margin:0} .favorites-heading #favoritesRandom:disabled{opacity:.45;cursor:not-allowed}@media(min-width:1100px){.favorites-heading #favoritesRandom{display:grid;place-items:center;flex:0 0 58px;width:58px;height:58px;min-height:58px;padding:0;border:1px solid #2d333a;border-radius:50%;background:#14171c;color:#c1c7d1}.favorites-heading #favoritesRandom svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.favorites-heading #favoritesRandom:not(:disabled):hover{border-color:#3bcb8b;color:var(--accent);background:#1a2823}}

/* Inbox uses the same source controls and independent DAV panel. */
.inbox-plus{font-size:30px;line-height:1;font-weight:400;color:inherit}.inbox-toggle.open{color:var(--accent)}
.album-section.nextcloud-source-active #inboxPanel[hidden]{display:none!important}
.album-section #inboxPanel:not([hidden]) .album-grid{display:grid!important}
