:root{
  --bg:#0b0d12;--bg2:#12151c;--panel:#181c25;--panel2:#1f2430;--line:#262b37;
  --fg:#f2f4f8;--mut:#98a0ae;--dim:#6b7383;
  --acc:#8ab4f8;--acc2:#6a9de0;--warn:#f5b342;--err:#ff5c5c;
  --dyn:#1f2937;
  --sb:env(safe-area-inset-bottom,0px);--st:env(safe-area-inset-top,0px);
  --tabbar:60px;--bar:64px;--r:14px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--fg);
  font:15px/1.4 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Inter,sans-serif;
  -webkit-tap-highlight-color:transparent;overscroll-behavior-y:none;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.01em}
h1{font-size:28px}h2{font-size:15px;color:var(--mut);font-weight:600;text-transform:uppercase;letter-spacing:.06em}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sprite{display:none}
[hidden]{display:none!important}

/* header */
.hdr{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;
  padding:calc(var(--st) + 10px) 16px 8px;background:linear-gradient(var(--bg) 70%,transparent)}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:20px;letter-spacing:-.02em}
.brand .logo{width:24px;height:24px;color:var(--acc)}
.dot{width:9px;height:9px;border-radius:50%;background:var(--dim);display:inline-block;box-shadow:0 0 0 3px rgba(255,255,255,.04)}
.dot.ok{background:var(--acc)}.dot.bad{background:var(--err)}

/* pages */
main{padding:4px 16px calc(var(--tabbar) + var(--bar) + var(--sb) + 24px)}
.view{display:none;animation:fade .18s ease}.view.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.page-head{margin:6px 0 14px}.page-head .sub{margin:2px 0 12px}
.sub{color:var(--mut);font-size:13px;margin:0 0 8px}
.actions{display:flex;gap:8px}
.pill{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-weight:600;font-size:14px}
.pill svg{width:16px;height:16px}.pill.primary{background:var(--acc);color:#071426;border-color:transparent}.pill.primary svg{stroke:#071426}
.pill:active{transform:scale(.97)}
.link{color:var(--mut);font-size:13px;font-weight:600;padding:6px}
.row-head{display:flex;align-items:center;justify-content:space-between;margin:18px 0 6px}

/* search box */
.search-wrap{position:relative;display:flex;align-items:center;margin:4px 0 14px}
.search-wrap .ic{position:absolute;left:14px;width:18px;height:18px;color:var(--mut);pointer-events:none}
.search-wrap input{width:100%;padding:13px 44px 13px 42px;border-radius:14px;border:1px solid var(--line);background:var(--panel);color:var(--fg);font-size:16px;outline:none;appearance:none;-webkit-appearance:none}
.search-wrap input::-webkit-search-cancel-button{display:none}
.search-wrap input:focus{border-color:rgba(138,180,248,.6);box-shadow:0 0 0 3px rgba(138,180,248,.12)}
.search-wrap input::placeholder{color:var(--dim)}
.search-wrap .ib{position:absolute;right:6px}
.search-wrap.compact input{padding-top:10px;padding-bottom:10px;font-size:15px}
.block{margin:6px 0 20px}.block h2{margin-bottom:10px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{padding:8px 12px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:13px;color:var(--fg)}
.chip:active{background:var(--panel2)}
.carousel{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 0 6px;margin:0 -16px;padding-left:16px;padding-right:16px;scrollbar-width:none}
.carousel::-webkit-scrollbar{display:none}
.tile{flex:none;width:128px;scroll-snap-align:start}
.tile img{width:128px;height:128px;border-radius:12px;object-fit:cover;background:var(--panel);display:block;box-shadow:0 6px 18px rgba(0,0,0,.35)}
.tile .t{font-size:13px;margin-top:8px}.tile .a{font-size:12px}
.tile:active img{transform:scale(.97)}

/* lists */
.list{list-style:none;margin:0;padding:0}
.row{display:flex;align-items:center;gap:12px;padding:8px 6px;border-radius:12px;position:relative;user-select:none;-webkit-user-select:none}
.row:active{background:var(--bg2)}
.row .cover{width:50px;height:50px;border-radius:9px;object-fit:cover;background:var(--panel);flex:none;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.row .cover.ph{display:grid;place-items:center;color:var(--dim)}
.meta{flex:1;min-width:0}
.t{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
.a,.al{color:var(--mut);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.k{font-size:11px;color:var(--acc);text-transform:uppercase;letter-spacing:.08em;font-weight:700;margin-bottom:2px}
.row.playing .t{color:var(--acc)}
.row .st{display:inline-flex;align-items:center;gap:4px;margin-right:6px;color:var(--mut)}
.row .st svg{width:14px;height:14px}.row .st.ok{color:var(--acc)}.row .st.dl{color:var(--warn)}.row .st.err{color:var(--err)}
.ib{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:var(--fg);flex:none;transition:background .15s,transform .1s}
.ib:active{background:rgba(255,255,255,.08);transform:scale(.94)}
.ib.sm{width:44px;height:44px;color:var(--mut)}.ib.sm.on{color:var(--acc)}
.ib.lg{width:56px;height:56px}.ib.lg svg{width:30px;height:30px}
.ib.xl{width:76px;height:76px;background:var(--fg);color:#0b0d12}.ib.xl svg{width:34px;height:34px;stroke:#0b0d12}.ib.xl svg *{fill:#0b0d12}
.ib.xl:active{background:#dfe3ea}
.group{color:var(--mut);font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin:16px 6px 4px;font-weight:700;display:flex;justify-content:space-between}
.group span{color:var(--dim);font-weight:500;letter-spacing:0;text-transform:none}
.eq{display:flex;align-items:flex-end;gap:2px;height:16px;width:16px;flex:none}
.eq i{flex:1;background:var(--acc);border-radius:1px;animation:eq 1s ease-in-out infinite;height:40%}
.eq i:nth-child(2){animation-delay:.2s;height:90%}.eq i:nth-child(3){animation-delay:.4s;height:60%}
@keyframes eq{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}
.paused .eq i{animation-play-state:paused}

/* cards */
.card{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--r);background:var(--panel);border:1px solid var(--line);margin-bottom:10px}
.card .ic{width:22px;height:22px;color:var(--acc)}
.card .cover{width:56px;height:56px;border-radius:10px;object-fit:cover;background:var(--bg)}
.radio-card{cursor:pointer}
.toggle{appearance:none;-webkit-appearance:none;width:46px;height:28px;border-radius:999px;background:var(--line);position:relative;flex:none;transition:background .2s;margin:0}
.toggle::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.toggle:checked{background:var(--acc)}.toggle:checked::after{transform:translateX(18px)}

/* states */
.empty{text-align:center;color:var(--mut);padding:44px 20px}
.empty svg{width:44px;height:44px;color:var(--dim);margin-bottom:12px;stroke-width:1.5}
.empty h3{color:var(--fg);font-size:17px;margin-bottom:6px}.empty p{margin:0;font-size:14px;max-width:320px;margin-inline:auto}
.skel{display:flex;gap:12px;padding:8px 6px;align-items:center}
.skel .c{width:50px;height:50px;border-radius:9px}.skel .l{height:12px;border-radius:6px;margin:5px 0}
.skel .c,.skel .l{background:linear-gradient(90deg,var(--panel) 25%,var(--panel2) 50%,var(--panel) 75%);background-size:200% 100%;animation:sh 1.2s infinite}
@keyframes sh{to{background-position:-200% 0}}
.spin{display:inline-block;width:12px;height:12px;border:2px solid rgba(255,255,255,.25);border-top-color:var(--acc);border-radius:50%;animation:sp .8s linear infinite;vertical-align:-2px;margin-right:6px}
@keyframes sp{to{transform:rotate(360deg)}}

/* playback bar + tab bar */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:12;display:flex;height:calc(var(--tabbar) + var(--sb));padding-bottom:var(--sb);
  background:rgba(11,13,18,.9);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-top:1px solid var(--line)}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--dim);font-size:11px;font-weight:600}
.tab svg{width:23px;height:23px}.tab.active{color:var(--fg)}
.bar{position:fixed;left:8px;right:8px;bottom:calc(var(--tabbar) + var(--sb) + 8px);z-index:11}
.bar-inner{position:relative;display:flex;align-items:center;gap:10px;padding:8px 8px 10px;border-radius:14px;
  background:var(--panel2);border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.45);overflow:hidden}
.bar .cover{width:46px;height:46px;border-radius:8px;object-fit:cover;background:var(--bg)}
.bar .t{font-size:14px}.bar .a{font-size:12px}
.bar .progress{position:absolute;left:0;right:0;bottom:0;height:2px;background:rgba(255,255,255,.08)}
.bar .progress div{height:100%;width:0;background:var(--acc);transition:width .25s linear}

/* full-screen player */
.full{position:fixed;inset:0;z-index:20;transform:translateY(100%);transition:transform .32s cubic-bezier(.2,.8,.2,1);visibility:hidden}
.full.open{transform:none;visibility:visible}
.full-bg{position:absolute;inset:0;background:linear-gradient(180deg,var(--dyn) 0%,#0b0d12 75%);transition:background .6s}
.full-inner{position:relative;height:100%;display:flex;flex-direction:column;padding:calc(var(--st) + 8px) 24px calc(var(--sb) + 20px);max-width:520px;margin:0 auto}
.full-top{display:flex;align-items:center;justify-content:space-between}
.full-k{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.7)}
.art-wrap{flex:1;display:grid;place-items:center;min-height:0;padding:12px 0}
.art{width:min(82vw,380px,42vh);aspect-ratio:1;border-radius:18px;object-fit:cover;background:var(--panel);box-shadow:0 24px 60px rgba(0,0,0,.6);transition:transform .3s}
.paused .art{transform:scale(.94)}
.full-meta .t{font-size:22px;white-space:normal;line-height:1.2}.full-meta .a{font-size:16px;margin-top:4px}
.status{min-height:18px;color:var(--warn);font-size:13px;margin-top:8px}
.seek-wrap{margin-top:14px}
#seek{width:100%;margin:0;appearance:none;-webkit-appearance:none;height:26px;background:transparent}
#seek::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:linear-gradient(var(--fg),var(--fg)) 0/var(--p,0%) 100% no-repeat,rgba(255,255,255,.18)}
#seek::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#fff;margin-top:-5px;box-shadow:0 1px 4px rgba(0,0,0,.5)}
#seek::-moz-range-track{height:4px;border-radius:2px;background:rgba(255,255,255,.18)}
#seek::-moz-range-progress{height:4px;border-radius:2px;background:var(--fg)}
#seek::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:#fff}
.times{display:flex;justify-content:space-between;color:rgba(255,255,255,.6);font-size:12px;font-variant-numeric:tabular-nums}
.controls{display:flex;align-items:center;justify-content:space-between;margin-top:12px}

/* action sheet */
.sheet{position:fixed;inset:0;z-index:30}
.sheet-bg{position:absolute;inset:0;background:rgba(0,0,0,.55);animation:fade .2s}
.sheet-panel{position:absolute;left:0;right:0;bottom:0;background:var(--panel);border-radius:18px 18px 0 0;padding:14px 16px calc(var(--sb) + 16px);animation:up .25s cubic-bezier(.2,.8,.2,1);max-width:520px;margin:0 auto}
@keyframes up{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
.sheet-head{display:flex;align-items:center;gap:12px;padding:4px 4px 14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.sheet-head .cover{width:52px;height:52px;border-radius:9px;object-fit:cover;background:var(--bg)}
.sheet-actions button{display:flex;align-items:center;gap:14px;width:100%;padding:13px 6px;border-radius:10px;font-size:15px;font-weight:500;text-align:left}
.sheet-actions button svg{color:var(--mut)}.sheet-actions button:active{background:var(--panel2)}
.sheet-actions button.danger{color:var(--err)}.sheet-actions button.danger svg{color:var(--err)}

/* toast */
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--tabbar) + var(--bar) + var(--sb) + 20px);z-index:40;
  background:#262b37;color:var(--fg);padding:10px 16px;border-radius:12px;font-size:14px;max-width:90vw;box-shadow:0 10px 30px rgba(0,0,0,.5);animation:up .2s;display:flex;align-items:center;gap:8px}
.toast.err{background:#3a1f22;color:#ffd5d5}.toast svg{width:18px;height:18px}

@media (min-width:720px){
  main{max-width:720px;margin:0 auto}
  .hdr{max-width:720px;margin:0 auto}
  .bar{left:50%;transform:translateX(-50%);width:min(704px,calc(100% - 16px))}
}

/* user */
.hdr-right{display:flex;align-items:center;gap:10px}
.avatar{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#8ab4f8,#5b8def);color:#071426;font-weight:800;font-size:13px;display:grid;place-items:center;text-transform:uppercase}

/* playlists */
.pl-section{margin:14px 0 4px}
.pl-row .cover{border-radius:8px}
.pl-row .cover.ph{background:linear-gradient(135deg,var(--panel2),var(--panel))}
.tag{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 6px;border-radius:5px;background:var(--line);color:var(--mut);margin-left:6px;vertical-align:1px}
.tag.acc{background:rgba(138,180,248,.15);color:var(--acc)}.tag.warn{background:rgba(245,179,66,.15);color:var(--warn)}
.detail-top{display:flex;justify-content:space-between;align-items:center;margin:0 -6px}
.detail-head{text-align:center;padding:4px 0 14px}
.detail-cover{width:min(52vw,220px);aspect-ratio:1;margin:6px auto 14px;border-radius:14px;overflow:hidden;background:linear-gradient(135deg,var(--panel2),var(--panel));box-shadow:0 14px 40px rgba(0,0,0,.5);display:grid;place-items:center;color:var(--dim)}
.detail-cover img{width:100%;height:100%;object-fit:cover;display:block}
.detail-cover img[src=""]{display:none}
.detail-head h1{font-size:24px;margin-bottom:4px}
.detail-head .actions{justify-content:center;margin-top:12px}
.import-bar{display:flex;align-items:center;gap:10px;margin-top:14px;font-size:12px;color:var(--mut)}
.pb{flex:1;height:4px;border-radius:2px;background:var(--line);overflow:hidden}.pb div{height:100%;background:var(--acc);width:0;transition:width .4s}
.empty.small{padding:24px 16px}.empty.small p{font-size:13px}

/* modal */
.modal-panel h3{font-size:18px;margin-bottom:4px}
.modal-panel input{width:100%;padding:12px 14px;margin-top:10px;border-radius:12px;border:1px solid var(--line);background:var(--bg2);color:var(--fg);font-size:16px;outline:none}
.modal-panel input:focus{border-color:rgba(138,180,248,.6)}
.modal-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.sheet-actions .sep{height:1px;background:var(--line);margin:6px 0}
.sheet-actions .sub-head{font-size:12px;color:var(--mut);padding:8px 6px 2px;text-transform:uppercase;letter-spacing:.06em;font-weight:700}

/* search by type */
.seg{display:flex;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:4px;margin:-4px 0 12px}
.seg button{flex:1;padding:8px;border-radius:9px;font-size:13px;font-weight:600;color:var(--mut)}
.seg button.on{background:var(--panel2);color:var(--fg);box-shadow:0 1px 3px rgba(0,0,0,.3)}
.row .cover.round{border-radius:50%}
.lnk{color:inherit}.lnk:active{color:var(--fg);text-decoration:underline}
.a .lnk{pointer-events:auto}

/* album / artist pages */
.page{position:fixed;left:0;right:0;top:0;bottom:calc(var(--tabbar) + var(--sb));z-index:8;background:var(--bg);overflow-y:auto;overscroll-behavior:contain;animation:slide .22s cubic-bezier(.2,.8,.2,1)}
@keyframes slide{from{transform:translateX(40px);opacity:0}to{transform:none;opacity:1}}
.page-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:calc(var(--st) + 6px) 10px 6px;background:linear-gradient(var(--bg) 60%,transparent)}
.page-title{flex:1;text-align:center;font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .2s}
.page.scrolled .page-title{opacity:1}
#page-body{padding:0 16px calc(var(--bar) + 28px);max-width:720px;margin:0 auto}
.hero{text-align:center;padding:4px 0 16px}
.hero .art{width:min(58vw,240px);aspect-ratio:1;border-radius:14px;object-fit:cover;background:var(--panel);box-shadow:0 16px 44px rgba(0,0,0,.55);margin:4px auto 16px;display:block}
.hero.artist .art{width:min(46vw,190px);border-radius:50%}
.hero h1{font-size:24px;line-height:1.15}
.hero .sub{margin-top:6px}.hero .sub .lnk{color:var(--fg);font-weight:600}
.hero .actions{justify-content:center;margin-top:14px}
.bio{color:var(--mut);font-size:14px;line-height:1.5;margin:12px 0 4px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-align:left}
.bio.open{display:block}
.bio-more{color:var(--fg);font-size:13px;font-weight:600;padding:6px 0;display:block;text-align:left}
.tile.round img{border-radius:50%}
.tile .y{color:var(--dim);font-size:12px}
.page .row-head{margin-top:20px}
.page .list{margin-bottom:6px}
.a.err{color:var(--err);white-space:normal;font-size:12px;line-height:1.3}
.sub-head.err-line{display:flex;gap:8px;align-items:flex-start;color:var(--err);text-transform:none;letter-spacing:0;font-weight:500;font-size:13px;padding:8px 6px 10px}
.sub-head.err-line svg{width:16px;height:16px;flex:none;margin-top:1px}

/* home: full-width grids */
.grid{display:grid;gap:12px 10px}
.grid.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:520px){.grid.g3{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.g2{grid-template-columns:repeat(3,minmax(0,1fr))}}
.grid .tile{width:auto}
.grid .tile img,.grid .tile .cover.ph{width:100%;aspect-ratio:1;height:auto;border-radius:12px}
.grid .tile .cover.ph{display:grid;place-items:center;color:var(--dim);background:var(--panel)}
.tile.round .cover.ph{border-radius:50%}
.grid .tile .t{font-size:13px;margin-top:7px;line-height:1.25;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.grid .tile .a{font-size:12px}
.block h2{margin-bottom:10px}
.block .row-head{margin:0 0 10px}
.row-head .link{padding:0}
.chips.moods{gap:8px}
.chip.mood{background:var(--panel2);border-color:transparent}
.chip.mood.genre{background:var(--panel)}
.home-sub{color:var(--dim);font-size:12px;margin:-6px 0 10px}
.list.compact .row{padding:6px}
.list.compact .row .cover{width:44px;height:44px}
.rank{width:22px;text-align:center;color:var(--dim);font-size:13px;font-variant-numeric:tabular-nums;flex:none}
.skel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}
.skel-grid div{aspect-ratio:1;border-radius:12px;background:linear-gradient(90deg,var(--panel) 25%,var(--panel2) 50%,var(--panel) 75%);background-size:200% 100%;animation:sh 1.2s infinite}
.hero .desc{color:var(--mut);font-size:13px;margin-top:6px}

/* login */
.login{position:fixed;inset:0;z-index:50;background:radial-gradient(120% 80% at 50% 0%,#151a24 0%,var(--bg) 60%);display:grid;place-items:center;padding:24px}
.login-box{width:100%;max-width:340px;text-align:center}
.login-box .logo{width:52px;height:52px;color:var(--acc);margin-bottom:12px}
.login-box h1{font-size:30px;letter-spacing:-.02em}
.login-box .sub{margin:6px 0 22px}
.login-box input{width:100%;padding:14px 16px;margin-bottom:10px;border-radius:12px;border:1px solid var(--line);background:var(--panel);color:var(--fg);font-size:16px;outline:none}
.login-box input:focus{border-color:rgba(138,180,248,.6);box-shadow:0 0 0 3px rgba(138,180,248,.12)}
.pill.block{width:100%;justify-content:center;padding:13px;margin-top:6px;font-size:15px}
.login-err{color:var(--err);font-size:13px;margin:2px 0 8px;min-height:16px}
.login-note{color:var(--dim);font-size:12px;margin-top:16px}
.resume{color:var(--acc);font-size:12px}
.link.block{display:block;width:100%;margin-top:14px;text-align:center}
.admin-user{display:flex;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid var(--line)}
.admin-user:last-child{border-bottom:0}
.admin-user .meta{flex:1;min-width:0}
.admin-user .t{font-size:14px}
.code-box{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--bg2);border:1px dashed var(--line);border-radius:10px;padding:12px 14px;margin:10px 0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:16px;letter-spacing:.08em}
.seg.small button{padding:6px;font-size:12px}

/* likes and lyrics in the player */
.full-meta{display:flex;align-items:center;gap:10px}
.full-meta .meta-text{flex:1;min-width:0}
.ib.like svg{width:26px;height:26px}
.ib.like.on{color:var(--acc)}
.ib.like.on svg{fill:currentColor}
.full-extra{display:flex;justify-content:center;margin-top:12px}
.pill.ghost{background:rgba(255,255,255,.08);border-color:transparent}
.pill.ghost.on{background:var(--acc);color:#071426}
.pill.ghost.on svg{stroke:#071426}
.art-wrap{position:relative}
.full.show-lyrics .art{display:none}
.full.show-lyrics .art-wrap{min-height:min(42vh,340px)}
.lyrics{position:absolute;inset:0;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:34% 4px;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(transparent,#000 16%,#000 84%,transparent);mask-image:linear-gradient(transparent,#000 16%,#000 84%,transparent)}
.lyrics::-webkit-scrollbar{display:none}
.lyrics p{margin:0;padding:7px 4px;font-size:22px;font-weight:700;line-height:1.3;color:rgba(255,255,255,.36);transition:color .25s;cursor:pointer}
.lyrics p.past{color:rgba(255,255,255,.6)}
.lyrics p.on{color:#fff}
.lyrics .plain{white-space:pre-wrap;font-size:18px;font-weight:600;color:rgba(255,255,255,.86);line-height:1.55;padding:0 4px}
.lyrics .none{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.62);text-align:center;font-size:15px;padding:0 24px}
.lyrics-src{font-size:11px;color:rgba(255,255,255,.38);text-align:center;padding-top:18px}

/* avatars */
.avatar{overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.sheet-head .cover.round{border-radius:50%}
.cover.ph.likes,.detail-cover.likes{background:linear-gradient(135deg,#5b8def,#8ab4f8);color:#071426}
.detail-cover.likes svg{stroke:#071426;fill:#071426}
.cover.ph.likes svg{fill:currentColor}

/* backups */
.warn-line{color:var(--warn)}
.backup-item{display:flex;align-items:center;gap:12px;padding:10px 6px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line)}
.backup-item:last-child{border-bottom:0}
.backup-item>svg{color:var(--mut);width:20px;height:20px}
.backup-item .meta{display:flex;flex-direction:column;min-width:0}
.backup-item .t{font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

/* private session and party */
body.private{--acc:#c4a7ff;--acc2:#a98bf0}
body.private .hdr{background:linear-gradient(rgba(70,45,110,.55),var(--bg) 88%)}
.priv-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:rgba(196,167,255,.16);color:#dccbff;font-size:12px;font-weight:700;white-space:nowrap}
.priv-pill svg{width:14px;height:14px}
.party-qr{background:#fff;border-radius:18px;padding:12px;width:min(76vw,290px);margin:4px auto 12px;box-shadow:0 14px 40px rgba(0,0,0,.45)}
.party-qr img{width:100%;height:auto;display:block}
.party-link{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--mut);word-break:break-all;text-align:center;margin:0 0 12px}
.admin-user.played{opacity:.5}
.admin-user .cover{width:44px;height:44px;border-radius:8px;object-fit:cover;background:var(--panel);flex:none}
.guest-tag{color:var(--acc);font-weight:600}
.pill.danger-pill{color:var(--err);border-color:rgba(255,92,92,.35)}
.pill.danger-pill svg{stroke:var(--err)}
.hist-time{color:var(--dim);font-size:12px;flex:none;margin-right:2px}
.party-now{margin:2px 0 16px}
.party-now .cover{width:52px;height:52px}
.party-now.idle{flex-wrap:wrap;row-gap:10px}
.party-now.idle .pill{margin-left:auto}

/* desktop: sidebar navigation, docked player bar, wide grids, centered dialogs */
@media (min-width:900px){
  /* --content caps the width; --gutter centers it in the space right of the sidebar */
  :root{--side:236px;--tabbar:0px;--bar:78px;--content:1200px;--gutter:max(32px,calc((100vw - var(--side) - var(--content)) / 2))}
  .hdr{margin:0 0 0 var(--side);max-width:none;padding:18px var(--gutter) 8px;justify-content:flex-end;background:none}
  .hdr .brand{display:none}
  main{margin:0 0 0 var(--side);max-width:none;padding:4px var(--gutter) calc(var(--bar) + 36px)}
  .tabbar{top:0;bottom:0;right:auto;width:var(--side);height:auto;flex-direction:column;align-items:stretch;gap:4px;padding:22px 12px;
    background:var(--bg2);border-top:0;border-right:1px solid var(--line);backdrop-filter:none;-webkit-backdrop-filter:none}
  .tabbar::before{content:"Echoes";display:block;padding:6px 12px 22px;font-weight:800;font-size:22px;letter-spacing:-.02em;color:var(--fg)}
  .tab{flex:none;flex-direction:row;justify-content:flex-start;gap:12px;padding:11px 12px;border-radius:10px;font-size:14px;color:var(--mut);cursor:pointer}
  .tab:hover{color:var(--fg)}.tab.active{background:var(--panel2);color:var(--fg)}
  .tab svg{width:20px;height:20px}
  .bar{left:var(--side);right:0;bottom:0;width:auto;transform:none}
  .bar-inner{border-radius:0;border-width:1px 0 0;padding:12px var(--gutter) 14px;gap:14px;box-shadow:none;background:var(--bg2)}
  .bar .cover{width:52px;height:52px}.bar .t{font-size:15px}.bar .a{font-size:13px}.bar .meta{max-width:460px}
  .bar .progress{top:0;bottom:auto}
  .bar .ib{width:44px;height:44px}
  .page{left:var(--side);bottom:var(--bar)}
  .page-top{padding:14px calc(var(--gutter) - 8px) 6px}
  #page-body{max-width:none;margin:0;padding:0 var(--gutter) calc(var(--bar) + 28px)}
  .grid.g3{grid-template-columns:repeat(6,minmax(0,1fr))}.grid.g2{grid-template-columns:repeat(4,minmax(0,1fr))}
  .grid .tile .t{font-size:14px}
  .list{max-width:none}
  /* Library, playlists index and search results: rows flow into as many columns as fit the width.
     Queue, playlist detail and album tracks stay single-column because their order matters. */
  #library,#results,#pl-sections .list{display:grid;grid-template-columns:repeat(auto-fill,minmax(460px,1fr));column-gap:32px;align-items:start}
  #library>.group,#library>.skel,#results>.skel,#pl-sections .list>.skel{grid-column:1/-1}
  .search-wrap,.queue-tools{max-width:none}.seg{max-width:820px}
  .page-head .actions,.hero .actions{flex-wrap:wrap}
  .row,.tile,.chip,.link,.ib,.pill,.admin-user,.backup-item{cursor:pointer}
  .row:hover{background:var(--bg2)}.tile img{transition:transform .15s}.tile:hover img{transform:translateY(-2px)}
  .ib:hover{background:rgba(255,255,255,.08)}.chip:hover,.pill:hover{filter:brightness(1.12)}
  .hero{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:28px;align-items:center;text-align:left;padding:8px 0 20px}
  .hero .art{grid-row:1/4;width:220px;margin:0}
  .hero.artist .art{width:200px}
  .hero h1{font-size:32px;align-self:end}
  .hero .actions{justify-content:flex-start}
  .hero .bio,.hero .bio-more,.hero .desc{grid-column:1/-1}
  .hero .actions.only{grid-column:1/-1}
  .full{left:var(--side)}
  /* Two columns. The flexible rows 2 and 8 absorb the extra height, so the right-hand block stays
     vertically centered next to the cover (or the lyrics) and its rows never stretch. */
  .full-inner{max-width:1080px;height:100%;display:grid;grid-template-columns:minmax(280px,420px) minmax(0,1fr);
    grid-template-rows:auto 1fr auto auto auto auto auto auto 1fr;column-gap:56px;padding:28px 48px}
  .full-top{grid-column:1/-1;margin-bottom:12px}
  .art-wrap{grid-column:1;grid-row:2/9;padding:0;align-self:center;min-height:420px}
  .full.show-lyrics .art-wrap{min-height:min(72vh,680px)}
  .art{width:100%;max-width:420px}
  .full-meta{grid-column:2;grid-row:3}.status{grid-column:2;grid-row:4}.seek-wrap{grid-column:2;grid-row:5}
  .controls{grid-column:2;grid-row:6;justify-content:center;gap:22px}
  .full-extra{grid-column:2;grid-row:8;justify-content:center;align-items:flex-start}
  .full-meta .t{font-size:30px}.full-meta .a{font-size:17px}
  .lyrics{padding:150px 12px;scrollbar-width:none}.lyrics::-webkit-scrollbar{display:none}
  .lyrics p{font-size:22px;padding:8px 4px}.lyrics .plain{font-size:19px}
  /* Centered with auto margins rather than a transform, which the entrance animation would override */
  .sheet-panel{inset:0;margin:auto;width:440px;height:fit-content;max-height:calc(100vh - 80px);overflow:auto;transform:none;border-radius:18px;
    padding:16px 16px 18px;animation:fade .18s;box-shadow:0 24px 60px rgba(0,0,0,.55)}
  .toast{bottom:calc(var(--bar) + 20px)}
  .login-box{max-width:380px}
  .carousel{margin:0;padding:2px 0 6px}
  .empty{padding:60px 20px}
  .party-qr{margin-left:0}
  .detail-head{text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:28px;align-items:center}
  .detail-cover{grid-row:1/4;margin:0;width:200px}
  .detail-head .actions{justify-content:flex-start}
  .detail-head .import-bar{grid-column:1/-1}
  .priv-pill{font-size:13px}
}
@media (min-width:1300px){
  :root{--side:260px;--content:1320px}
  .grid.g3{grid-template-columns:repeat(7,minmax(0,1fr))}.grid.g2{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (min-width:1800px){
  :root{--content:1640px}
  .grid.g3{grid-template-columns:repeat(8,minmax(0,1fr))}.grid.g2{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* sharing dialog */
.share-opt{display:flex;align-items:center;gap:12px;padding:10px 6px;border-radius:10px;font-size:15px;cursor:pointer}
.share-opt:hover{background:var(--panel2)}
.share-opt input{width:18px;height:18px;margin:0;accent-color:var(--acc);flex:none}
.share-opt b{font-weight:600;display:block}.share-opt small{display:block;color:var(--mut);font-size:12px;margin-top:2px}
.share-opt .avatar{width:28px;height:28px;font-size:12px;flex:none}
.share-users{margin:2px 0 6px 14px;padding-left:12px;border-left:2px solid var(--line)}
.sheet-actions button.primary-act{justify-content:center;background:var(--acc);color:#071426;font-weight:700;margin-top:10px;border-radius:12px}
.sheet-actions button.primary-act svg{color:#071426}

/* admin alerts banner */
.alerts{position:sticky;top:0;z-index:6;padding:0 16px}
.alert{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:12px;margin:8px 0;background:rgba(245,179,66,.14);border:1px solid rgba(245,179,66,.4);color:var(--fg);font-size:14px}
.alert.error{background:rgba(255,92,92,.14);border-color:rgba(255,92,92,.45)}
.alert>svg{flex:none;color:var(--warn);margin-top:2px}.alert.error>svg{color:var(--err)}
.alert .meta{flex:1}.alert .t{font-weight:700}.alert .a{white-space:normal;margin-top:2px}
.alert .ib{width:32px;height:32px;flex:none}

/* settings, tag editor, upload */
.sheet-form label.field{display:block;padding:6px 6px 2px;font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.sheet-form input[type=text],.sheet-form input[type=number]{width:100%;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg2);color:var(--fg);font-size:15px;outline:none;margin:0 0 4px}
.sheet-form input:focus{border-color:rgba(138,180,248,.6)}
.range-row{display:flex;align-items:center;gap:12px;padding:8px 6px}
.range-row input[type=range]{flex:1;accent-color:var(--acc)}
.range-row output{min-width:44px;text-align:right;font-variant-numeric:tabular-nums;color:var(--mut)}
.cover-row{display:flex;align-items:center;gap:12px;padding:8px 6px}
.cover-row img,.cover-row .cover.ph{width:64px;height:64px;border-radius:10px;object-fit:cover;background:var(--panel2)}
.cover-row .btns{display:flex;flex-direction:column;gap:6px}
.drop-hint{position:fixed;inset:0;z-index:45;display:grid;place-items:center;background:rgba(11,13,18,.82);color:var(--fg);font-size:18px;font-weight:700;pointer-events:none}
.drop-hint svg{width:44px;height:44px;color:var(--acc);margin-bottom:10px;display:block;margin-inline:auto}
.drop-hint span{display:block;text-align:center}
.uploading{color:var(--mut);font-size:13px;padding:6px 0}

/* your year */
.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 18px}
@media (min-width:900px){.stat-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
.stat{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px}
.stat .n{font-size:28px;font-weight:800;letter-spacing:-.02em;color:var(--acc)}.stat .l{font-size:12px;color:var(--mut);margin-top:2px}
.bars{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;align-items:end;height:120px;margin:6px 0 4px}
.bars div{background:var(--acc);border-radius:4px 4px 2px 2px;min-height:2px;opacity:.85}
.bars div.top{opacity:1;background:#fff}
.bar-labels{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;font-size:11px;color:var(--dim);text-align:center;margin-bottom:14px}
.year-chips{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 10px}
.chip.on{background:var(--acc);color:#071426;border-color:transparent}
.rank-row .rank{width:26px;font-weight:700;color:var(--acc)}

/* admin: downtify section */
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14px;padding:6px 6px}
.kv b{color:var(--mut);font-weight:600}
.fail-row{padding:8px 6px;border-bottom:1px solid var(--line);font-size:13px}
.fail-row:last-child{border-bottom:0}
.fail-row .t{font-size:14px}.fail-row .a{white-space:normal;color:var(--err)}

/* devices (playback transfer) */
.ib.devices.on,.pill.ghost.remote{color:var(--acc)}
.pill.ghost.remote{background:rgba(138,180,248,.16)}
.bar.remote .bar-inner{border-color:rgba(138,180,248,.5)}
.bar .remote-tag{position:absolute;top:6px;right:12px;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--acc)}
.device-row{display:flex;align-items:center;gap:12px;padding:10px 6px;border-radius:10px;cursor:pointer}
.device-row:hover{background:var(--panel2)}
.device-row svg{color:var(--mut);flex:none}
.device-row.on svg,.device-row.on .t{color:var(--acc)}
.device-row .meta{flex:1;min-width:0}
.device-row .a{white-space:normal}
.device-row .ib{flex:none}
#full-extra-devices{margin-top:8px}

/* devices: fixes */
.full-extra{gap:10px;flex-wrap:wrap}
.sheet-panel{overflow-x:hidden}
.sheet-actions .ib{width:40px;min-width:40px;height:40px;padding:0;margin:0;display:grid;place-items:center;text-align:center;border-radius:50%}
.sheet-actions .device-hint{color:var(--dim);font-size:12px;padding:8px 6px 2px}
.sheet-head.no-cover .cover{display:none}

/* identify album */
.idf-row{display:flex;align-items:center;gap:12px;padding:9px 6px;border-bottom:1px solid var(--line);cursor:pointer}
.idf-row:last-child{border-bottom:0}
.idf-row input{width:18px;height:18px;margin:0;accent-color:var(--acc);flex:none}
.idf-row .meta{flex:1;min-width:0}.idf-row .t{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.idf-row .a{font-size:12px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.idf-row .dim{opacity:.7}
.idf-search{display:flex;gap:8px;margin:4px 0 10px}
.idf-search input[type=text]{flex:1;min-width:0;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg2);color:var(--fg);font-size:15px;outline:none}
.idf-search input:focus{border-color:rgba(138,180,248,.6)}
.idf-album{display:flex;align-items:center;gap:12px;padding:8px 6px;border-radius:10px;cursor:pointer}
.idf-album:hover{background:var(--panel2)}.idf-album.on{background:var(--panel)}
.idf-album .cover{width:48px;height:48px;border-radius:8px;object-fit:cover;background:var(--panel2);flex:none}
.idf-album .meta{flex:1;min-width:0}.idf-album .t{font-size:14px;font-weight:600}.idf-album .a{font-size:12px;color:var(--mut)}
.idf-ctl{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;margin:6px 0 4px}
.idf-ctl label{display:block;font-size:12px;color:var(--mut);margin-bottom:4px}
.idf-ctl input[type=number]{width:96px;padding:9px 10px;border-radius:10px;border:1px solid var(--line);background:var(--bg2);color:var(--fg);font-size:15px;outline:none}
.idf-pair{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--line)}
.idf-pair .n{width:26px;text-align:right;color:var(--mut);font-variant-numeric:tabular-nums;flex:none}
.idf-pair .meta{flex:1;min-width:0}.idf-pair .t,.idf-pair .a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.idf-pair .t{font-size:13px;color:var(--mut)}.idf-pair .a{font-size:14px}
.idf-pair small{color:var(--mut);margin-left:6px;font-size:12px}
.idf-pair.warn .a{color:var(--warn,#e6b450)}.idf-pair.bad .a{color:var(--mut);font-style:italic}
#idf-pairs .actions{margin:14px 0 24px}
@media (min-width:900px){#idf-files,#idf-albums,#idf-pairs{max-width:760px}}
.idf-form{margin:4px 0 8px}
.idf-pair .idf-title{width:100%;padding:7px 10px;border-radius:8px;border:1px solid var(--line);background:var(--bg2);color:var(--fg);font-size:14px;outline:none;margin-top:3px}
.idf-pair .idf-title:focus{border-color:rgba(138,180,248,.6)}

/* library selection */
.list.selecting .row .ib,.list.selecting .row .st,.list.selecting .row .eq{display:none}
.selbox{width:22px;height:22px;border-radius:6px;border:2px solid var(--mut);flex:none;display:grid;place-items:center;color:transparent}
.selbox svg{width:14px;height:14px}
.row.sel-row.on .selbox{background:var(--acc);border-color:var(--acc);color:#0b1020}
.row.sel-row.on{background:var(--panel)}
.list.selecting .group{cursor:pointer}
.selbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 6px;margin:0 0 6px;background:var(--bg);border-bottom:1px solid var(--line)}
.selbar .cnt{flex:1;font-size:14px;color:var(--mut);min-width:90px}
.selbar .pill.danger{color:var(--err);border-color:rgba(255,92,92,.4)}
.selbar .pill[disabled]{opacity:.45;pointer-events:none}
#lib-select.on{color:var(--acc);border-color:var(--acc)}
.hidden-note{margin:6px 6px 0}.hidden-note .link{display:inline;padding:0;font-size:inherit;color:var(--acc);background:none;border:0;cursor:pointer}
.row .tag{margin-left:6px}

/* mobile: nothing may be wider than the screen (a wide row makes the browser show the page zoomed and
   pushes the fixed bottom bars out of view) */
body{overflow-x:clip}
.actions{flex-wrap:wrap}
.row-head{flex-wrap:wrap;gap:4px 12px}
.pill{white-space:nowrap;max-width:100%}
@media (max-width:899px){
  #view-library .page-head .actions .pill:not(.primary){padding:8px 12px;font-size:13px}
}

/* offline */
.offline-bar{display:flex;align-items:center;gap:10px;margin:8px 16px 0;padding:10px 14px;border-radius:12px;background:var(--panel);border:1px solid var(--line);color:var(--mut);font-size:13px;cursor:pointer}
.offline-bar svg{width:18px;height:18px;flex:none;color:var(--warn)}
body.offline #q{opacity:.5}
.tag.off{display:inline-flex;align-items:center;gap:4px}.tag.off svg{width:11px;height:11px}
/* profiles */
.hero.profile .avatar.big{width:96px;height:96px;font-size:36px;margin:4px auto 12px;display:flex}
.hero.profile h1 .tag{vertical-align:middle;margin-left:8px}
.person-row{display:flex;align-items:center;gap:12px;padding:10px 6px;border-radius:10px;cursor:pointer}.person-row:hover{background:var(--panel2)}.person-row .meta{flex:1;min-width:0}.person-row .a{color:var(--mut);font-size:12px}
.sheet-actions .person-row .avatar{width:40px;height:40px;font-size:15px;flex:none}

/* volume (this device on desktop, or the controlled device in remote mode) */
.vol-row{display:flex;align-items:center;gap:10px;margin:10px auto 0;max-width:360px;width:100%}
.vol-row .ib{flex:none}
#vol{flex:1;margin:0;appearance:none;-webkit-appearance:none;height:26px;background:transparent}
#vol::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:linear-gradient(var(--acc),var(--acc)) 0/var(--p,100%) 100% no-repeat,rgba(255,255,255,.18)}
#vol::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#fff;margin-top:-5px}
#vol::-moz-range-track{height:4px;border-radius:2px;background:rgba(255,255,255,.18)}
#vol::-moz-range-progress{height:4px;border-radius:2px;background:var(--acc)}
#vol::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:#fff}
.vol-label{font-size:12px;color:var(--mut);white-space:nowrap;max-width:40%;overflow:hidden;text-overflow:ellipsis}
@media (min-width:900px){.vol-row{grid-column:2;grid-row:7;margin-top:4px}}
.sheet-actions .idf-search .pill{width:auto;flex:none;justify-content:center;gap:6px;padding:9px 14px;font-weight:600}
.sheet-actions .idf-album{cursor:pointer}

/* upload results */
.up-row{display:flex;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid var(--line)}
.up-row:last-child{border-bottom:0}
.up-row .meta{flex:1;min-width:0;cursor:pointer}
.up-row .t{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-row .a{font-size:12px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-row .acts{display:flex;gap:4px;flex:none}
.up-row.bad .t{color:var(--warn)}
.up-row .tag .spin{width:9px;height:9px;border-width:2px;margin-right:4px}
@media (min-width:900px){.up-row{max-width:760px}}

/* the song identifier needs room: long titles are what tell one version from another */
.idf-album .t{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sheet-panel{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent}
.sheet-panel::-webkit-scrollbar{width:10px}
.sheet-panel::-webkit-scrollbar-track{background:transparent}
.sheet-panel::-webkit-scrollbar-thumb{background:rgba(255,255,255,.22);border-radius:8px;border:3px solid transparent;background-clip:content-box}
@media (min-width:900px){
  .sheet.wide .sheet-panel{width:min(780px,92vw)}
  .sheet.wide .idf-album{padding:10px 8px}
  .sheet.wide .idf-album .cover{width:56px;height:56px}
  .sheet.wide .idf-album .t{font-size:15px}
  .sheet.wide .idf-album .a{font-size:13px}
}

/* pairing: drag handle, gaps */
.idf-pair{gap:8px}
.idf-handle{flex:none;width:26px;display:grid;place-items:center;color:var(--dim);cursor:grab;touch-action:none}
.idf-handle svg{width:16px;height:16px;fill:currentColor;stroke:none}
.idf-pair.dragging{background:var(--panel2);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.45);opacity:.95}
.idf-pair.gap{border-style:dashed}
.idf-pair.gap .t{color:var(--mut);font-style:italic}
.idf-pair .idf-title[disabled]{opacity:.5}
.idf-pair .ib{width:30px;height:30px;flex:none}
.idf-pair .ib svg{width:16px;height:16px}
.row-head .link{background:none;border:0}

/* transport stays centred however many toggles sit beside it */
.controls .side{flex:1;display:flex;align-items:center;gap:10px}
.controls .side.right{justify-content:flex-end}
.controls .mid{display:flex;align-items:center;gap:18px;flex:none}
#full-repeat.on{color:var(--acc)}

/* per-account stats (admin) */
.ustat{border-top:1px solid var(--line);padding-top:4px;margin-top:18px}
.ustat:first-of-type{border-top:0}
.ustat .stat-grid{margin:8px 0 10px}
.ustat .bars.small{height:44px}
.ustat .bar-labels.small span{font-size:9px}
.ustat-top{list-style:none;counter-reset:n;margin:10px 0 6px;padding:0}
.ustat-top li{counter-increment:n;display:flex;align-items:baseline;gap:8px;padding:5px 6px;border-bottom:1px solid var(--line);font-size:14px}
.ustat-top li:last-child{border-bottom:0}
.ustat-top li::before{content:counter(n);color:var(--dim);font-size:12px;width:14px;flex:none;font-variant-numeric:tabular-nums}
.ustat-top li span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ustat-top li small{color:var(--mut);font-size:12px;max-width:35%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ustat-top li b{color:var(--acc);font-variant-numeric:tabular-nums}
@media (min-width:900px){.ustat{max-width:820px}}
.ustat .bars.small,.ustat .bar-labels.small{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
.full-meta .a .yr{color:var(--dim)}

/* the banners live outside main, so on desktop they need the same sidebar offset and gutter */
@media (min-width:900px){
  .alerts{margin:0 0 0 var(--side);padding:0 var(--gutter)}
  .offline-bar{margin:8px var(--gutter) 0 calc(var(--side) + var(--gutter))}
}

/* radio: what you asked to keep back */
.avoid-row{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--line)}
.avoid-row:last-child{border-bottom:0}
.avoid-row .meta{flex:1;min-width:0}
.sheet-actions .avoid-row .ib{width:34px;height:34px;flex:none;padding:0}

/* Install as an app */
.install-why{color:var(--mut);font-size:14px;line-height:1.45;padding:0 6px 10px}
.install-steps{list-style:none;margin:2px 0 8px;padding:0 6px;display:grid;gap:12px}
.install-steps li{display:flex;gap:12px;align-items:flex-start;font-size:15px;line-height:1.45}
.install-steps .n{flex:none;width:24px;height:24px;border-radius:50%;background:var(--panel2);color:var(--acc);display:grid;place-items:center;font-size:13px;font-weight:700}
.install-steps svg{width:18px;height:18px;vertical-align:-4px;color:var(--acc);margin:0 1px}
.install-note{color:var(--mut);font-size:12px;line-height:1.45;padding:2px 6px 6px}
