/* Jukebox: the omarchy palette and the shell's type scale and spacing, as the
   QML version drew them. Qt.darker(fg, k) is fg's value divided by k. */
@font-face { font-family: "JB"; src: url("fonts/jb-regular.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "JB"; src: url("fonts/jb-bold.woff2") format("woff2"); font-weight: 700; }

:root {
  --bg: #121212; --fg: #f5f5f5; --accent: #B14242; --urgent: #D66E36; --muted: #949494;
  --spotify: #1DB954; --ytm: #FF0033; --sc: #FF5500; --maro: #8A63D2;
  --good: #6FBF73; --wait: #E0B252; --ok: #4A8B8B;
  --d12: #cccccc; --d125: #c4c4c4; --d13: #bcbcbc; --d135: #b5b5b5; --d14: #afafaf; --d145: #a9a9a9;
  --d15: #a3a3a3; --d155: #9e9e9e; --d16: #999999; --d17: #909090; --d18: #888888; --d20: #7a7a7a;
  --d22: #6f6f6f; --d24: #666666; --d26: #5e5e5e; --d30: #525252; --d34: #484848; --d42: #3a3a3a;
  --f04: rgba(245,245,245,.04); --f06: rgba(245,245,245,.06); --f07: rgba(245,245,245,.07); --f08: rgba(245,245,245,.08);
  --f10: rgba(245,245,245,.10); --f16: rgba(245,245,245,.16); --f18: rgba(245,245,245,.18); --f22: rgba(245,245,245,.22);
  --f25: rgba(245,245,245,.25); --f40: rgba(245,245,245,.40); --dim: rgba(245,245,245,.62);
  --cur: var(--accent);
  /* the redesign's surfaces (design/desktop-mockup) */
  --page: #0D0D0D; --tile: #121212; --line: #242424; --raise: #1A1A1A; --hover: #1F1F1F; --pill: #262626;
  --t2: #A0A0A0; --t3: #8C8C8C; --soft: #FF9494;
  --ease-pop: cubic-bezier(.34,1.56,.64,1); --ease-out: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--page); color: var(--fg);
  font: 12px/1.2 "JB", "JetBrainsMono Nerd Font", monospace; letter-spacing: -0.2px; -webkit-font-smoothing: antialiased; user-select: none; cursor: default; }
[hidden] { display: none !important; }
.g { font-family: "JB", "JetBrainsMono Nerd Font"; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; }
input { font: inherit; }
.scroll { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* -- the redesign's buttons (m-btn: labelled, t-btn: icon) ------------------ */
.m-btn { height: 36px; padding: 0 16px; border: 1px solid #333; background: var(--raise); color: var(--fg); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .18s var(--ease-pop), box-shadow .2s; }
.m-btn:hover { background: #242424; border-color: #5A5A5A; transform: translateY(-1px); }
.m-btn:active { transform: scale(.96); }
.m-btn.sm { height: 32px; padding: 0 14px; font-size: 11.5px; }
.m-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-btn.primary:hover { background: #C45454; border-color: #C45454; box-shadow: 0 6px 18px rgba(177,66,66,.35); }
.m-btn.danger { background: transparent; color: #FF8A8A; border-color: rgba(177,66,66,.55); }
.m-btn.danger:hover { background: rgba(177,66,66,.14); border-color: var(--accent); }
.m-btn.ghost { background: transparent; border-color: transparent; }
.m-btn.ghost:hover { background: var(--hover); border-color: transparent; }
.t-btn { width: 36px; height: 36px; color: #B3B3B3; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer;
  transition: color .15s, background-color .15s, transform .18s var(--ease-pop); }
.t-btn:hover { color: var(--fg); background: #222; }
.t-btn:active { transform: scale(.88); }
.t-btn.on { color: var(--soft); background: var(--pill); }
/* shared motion */
.fade { animation: fadeUp .25s var(--ease-out) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* -- the shell's Button ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; color: var(--fg);
  font-size: 12px; letter-spacing: -0.2px; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: background-color .12s; flex: none; }
.btn .g { font-size: 14px; letter-spacing: -0.4px; }
.btn.half { padding-top: 3px; padding-bottom: 3px; }
.btn:hover { background: var(--f08); border-color: var(--f25); }
.btn:active { background: var(--f22); }
.btn.sel { background: var(--f18); font-weight: 700; }
.btn.sel:hover { background: var(--f08); }
.btn.bordered { border-color: var(--f40); }
.btn.bordered:hover { border-color: var(--f25); }
.btn:disabled, .btn.off { opacity: .4; pointer-events: none; }
.btn.big { padding: 6px 10px; }

/* -- splash ------------------------------------------------------------ */
#splash { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; transition: opacity .22s; }
#splash img { width: 96px; height: 96px; }
/* Gone: faded out, then not drawn at all (its spinner kept the page painting). */
#splash.gone { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .22s, visibility 0s .22s; }
#splash.gone .spin { animation: none; }
#splashChecks { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 280px; }
#splashChecks[hidden] { display: none; }
#splashRows { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.check-row .g { width: 18px; text-align: center; color: var(--tint); }
.check-row .cn { flex: 1; }
.check-row .cl { color: var(--f60, #999); }
.check-row.ok .cl { color: var(--fg); }
.check-row.unreachable .cl { color: var(--urgent); }
.spin { width: 22px; height: 22px; border: 2px solid var(--f18); border-top-color: var(--fg); border-radius: 50%; animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
/* A ring, not a rotated font glyph: a glyph's box is not square and the
   glyph is not centred in it, so it swung in an oval and was clipped. */
.spinner { flex: none; display: inline-block; box-sizing: border-box; width: 10px; height: 10px; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 50%; color: var(--accent); animation: rot .8s linear infinite; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.pulse { animation: pulse .9s ease-in-out infinite; }

/* -- the frame: top bar, queue above the player, the main tile ---------- */
#body { position: absolute; inset: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.tile { background: var(--tile); border: 1px solid var(--line); min-width: 0; transition: border-color .3s; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dim { color: var(--t2); } .faint { color: var(--t3); }
svg { flex-shrink: 0; display: block; }
:where(button:focus-visible, select:focus-visible, input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.scroll.thin { scrollbar-width: thin; scrollbar-color: #2E2E2E transparent; }

#strip { height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 0 16px; position: relative; z-index: 30; }
#strip .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
#strip .logo { width: 24px; height: 24px; flex: none; display: block; }
#email { font-size: 12px; min-width: 0; }
#strip .acts { display: flex; align-items: center; gap: 4px; position: relative; }
.ibtn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--t2); cursor: pointer;
  transition: background-color .15s, color .3s, transform .18s var(--ease-pop); }
.ibtn:hover, .ibtn.on, .ibtn.sel { background: var(--hover); color: var(--fg); }
.ibtn:active { transform: scale(.9); }

#player { flex: 1; min-height: 0; display: flex; gap: 8px; position: relative; }
.lcol { width: clamp(340px, 26vw, 480px); flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.qtile { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.qtile > .view { position: static; display: flex; flex: 1; min-height: 0; padding: 12px 8px 8px; }
#side { flex: none; position: relative; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.mainc { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.mainc > #jobs { padding: 8px 20px 0; }
.mainc > #views { margin: 12px 20px 16px; }
@media (max-width: 1100px) { .lcol { width: 320px; } }
/* Round 2 L: an empty queue hides the queue panel; the player tile keeps its
   place and size at the bottom of the column (Maro: "the player remains in
   the bottom"), the panel's space is plain page background. */
body.noqueue:not(.narrow) #qtile { visibility: hidden; }
body.narrow #body { padding: 6px; gap: 6px; }
body.narrow #player { flex-direction: column; gap: 6px; }
body.narrow .lcol { width: auto; order: 2; flex: none; }
body.narrow .qtile { display: none; }
body.narrow .mainc { order: 1; }
body.narrow #side { padding: 12px 14px; gap: 10px; }
body.narrow .tabpad { padding: 10px 10px 0; }
body.narrow .tabs { gap: 2px; }
body.narrow .tab { padding: 0 4px; font-size: 11.5px; }
body.narrow .mainc > #views { margin: 10px 10px 12px; }
@media (min-width: 2200px) { #body { zoom: 1.2; } }
@media (min-width: 2800px) { #body { zoom: 1.45; } }
@media (min-width: 3400px) { #body { zoom: 1.75; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

#np { display: flex; flex-direction: column; align-items: center; gap: 10px; }
body.narrow #np { flex-direction: row; align-items: center; }
#npText { width: 100%; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.narrow #npText { flex: 1; }
#npTitleRow { display: flex; align-items: center; gap: 6px; }
#npTitle { flex: 1; min-width: 0; font-size: 13px; letter-spacing: 0.2px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#npArtist { color: var(--d13); font-size: 11px; letter-spacing: 0.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#npLoading { display: flex; gap: 5px; align-items: center; color: var(--accent); font-size: 10px; letter-spacing: 0.0px; white-space: nowrap; overflow: hidden; }
#npMeta { color: var(--d16); font-size: 10px; letter-spacing: 0.0px; overflow: hidden; text-overflow: ellipsis; white-space: pre; }

/* covers */
.cover { position: relative; flex: none; width: 30px; height: 30px; border-radius: 4px; overflow: hidden; background: var(--f04);
  display: flex; align-items: center; justify-content: center; }
.cover img { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; border-radius: 3px; }
.cover .gl { font-size: 11px; letter-spacing: 0.4px; color: var(--fg); }
.cover .busy { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.cover.big { border: 1px solid var(--cur); width: 380px; height: 380px; }
.cover.big img { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 2px; }
.cover.big .gl { font-size: 28px; letter-spacing: 0.2px; }
.cover.big.empty { border-color: var(--f40); }
body.narrow .cover.big { width: 68px; height: 68px; }

/* progress rows */
#progress { display: flex; flex-direction: column; gap: 4px; }
#artRow { display: flex; align-items: center; gap: 6px; }
#artText { flex: 1; min-width: 0; color: var(--d15); font-size: 10px; letter-spacing: 0.0px; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.bar { height: 3px; border-radius: 2px; background: var(--d26); overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); transition: width .22s cubic-bezier(.33,1,.68,1); }

/* sliders: the shell's PanelSlider */
.slider { position: relative; height: 22px; flex: 1; min-width: 40px; cursor: pointer; touch-action: none; }
.slider .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--f18); }
.slider .fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--fg); }
.slider .knob { position: absolute; top: 4px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); border: 2px solid var(--bg);
  transition: transform .11s; }
.slider:hover .knob, .slider.drag .knob { transform: scale(1.15); }
.slider.glide:not(.drag) .fill, .slider.glide:not(.drag) .knob { transition: translate .14s cubic-bezier(.33,1,.68,1), width .14s cubic-bezier(.33,1,.68,1), transform .11s; }
.slider.off { pointer-events: none; }
#seekRow { display: flex; align-items: center; gap: 8px; }
#elapsed { width: 38px; font-size: 10px; letter-spacing: 0.0px; flex: none; }
#total { font-size: 10px; letter-spacing: 0.0px; flex: none; }
#transportWrap { position: relative; display: flex; align-items: center; height: 28px; }
#transport { position: absolute; left: calc(50% - 64px); transform: translateX(-50%); display: flex; gap: 6px; }
#repeatOne { font-size: 12px; letter-spacing: -0.2px; font-weight: 700; display: none; }
#bRepeat.one #repeatOne { display: inline; }
#bShuffle, #bRepeat { color: var(--d18); }
#bShuffle.on, #bRepeat.on { color: var(--accent); }
#vol { position: absolute; right: 0; display: flex; align-items: center; gap: 5px; }
#volIcon { width: 16px; text-align: center; font-size: 10px; letter-spacing: 0.0px; color: var(--d13); cursor: pointer; }
#volIcon.mute { color: var(--d20); }
#volSlider { width: 72px; flex: none; }
#volLabel { width: 30px; text-align: right; font-size: 10px; letter-spacing: 0.0px; color: var(--d16); }

/* tabs and views */
.tabpad { padding: 14px 20px 0; flex: none; }
.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; height: 32px; padding: 0 14px; display: flex; align-items: center; font-size: 12.5px; font-weight: 700;
  color: var(--t2); white-space: nowrap; flex: none; cursor: pointer; transition: color .2s; }
.tab:hover { color: var(--fg); }
.tab.on { color: #fff; }
.tabpill { position: absolute; top: 0; height: 32px; background: var(--pill); transition: left .38s cubic-bezier(.34,1.3,.64,1), width .38s cubic-bezier(.34,1.3,.64,1); }
#jobs { display: flex; flex-direction: column; gap: 4px; flex: none; }
#jobs[hidden] { display: none; }
.job { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--f25); }
.job .g { color: var(--d14); }
.job .jt { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .jbar { flex: 1; height: 3px; background: var(--f08); }
.job .jbar div { height: 100%; background: var(--accent); }
.job.done .jbar div { background: #6FBF73; }
#views { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; display: none; flex-direction: column; gap: 4px; }
.view.on { display: flex; }
.vhead { display: flex; align-items: center; gap: 6px; flex: none; }
.vhead > span:first-child, #plTitle { flex: 1; min-width: 0; color: var(--d16); font-size: 10px; letter-spacing: 0.0px; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
#plHead { gap: 10px; }
#plTitle { color: var(--fg); font-size: 11px; letter-spacing: 0.4px; font-weight: 700; white-space: pre; }
.empty { color: var(--d16); font-size: 11px; letter-spacing: 0.4px; white-space: pre-line; }
.list { flex: 1; min-height: 0; position: relative; }
.list .inner { position: relative; }

/* rows: the queue card and every other list's */
.row { position: absolute; left: 0; right: 0; height: 38px; border-radius: 4px; display: flex; align-items: center; gap: 8px; padding: 0 4px; cursor: pointer; }
.row::after { content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; transition: background-color 90ms; }
.row:hover::after { background: var(--f07); }
.row:active::after, .row.pressed::after { background: var(--f16); }
.row.now { background: color-mix(in srgb, var(--cur) 22%, transparent); box-shadow: inset 0 0 0 1px var(--cur); }
.row.now:hover::after { background: color-mix(in srgb, var(--cur) 7%, transparent); }
.row .txt { flex: 1; min-width: 40px; display: flex; flex-direction: column; gap: 1px; }
.row .t { font-size: 11px; letter-spacing: 0.4px; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.row.now .t.b, .row .t.b { font-weight: 700; }
.row .a { display: flex; align-items: center; gap: 4px; color: var(--d15); font-size: 10px; letter-spacing: 0.0px; min-width: 0; }
.row .a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.row .len { color: var(--d15); font-size: 10px; letter-spacing: 0.0px; flex: none; }
.row .len.w44 { width: 44px; text-align: right; }
.row .mark { width: 18px; text-align: center; font-size: 10px; letter-spacing: 0.0px; color: var(--d15); flex: none; }
.row .x { width: 26px; height: 26px; padding: 0; }
.row .x .g { font-size: 14px; letter-spacing: -0.4px; }
/* .content is display: contents, so it has no box to fade - fade what is inside it */
.row.dim .content > * { opacity: .4; }
.row .content { display: contents; }
.row.head { height: 24px; align-items: flex-end; padding-bottom: 3px; gap: 5px; color: var(--accent); font-size: 10px; letter-spacing: 0.0px; font-weight: 700; }
.row.head:hover::after { background: none; }
.row.head .chev { display: inline-block; transition: transform .12s cubic-bezier(.33,1,.68,1); transform: rotate(90deg); font-weight: 400; }
.row.head.folded .chev { transform: rotate(0); }
.row.gone { opacity: .35; }
.row.gone .content > *:not(.txt) { filter: grayscale(1); }
.row .a .why { color: var(--danger, #e5484d); }
.saved { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; border-radius: 50%; background: #E5323F; }
.saved svg { display: block; width: 8px; height: 8px; }
.saved path { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; position: relative; }

/* the heart — one shared component; the mockup's like: colour #E05263, a pop on
   the svg (scale 1 → 1.45 → .86 → 1) and six 4 px squares that fly out. */
.heart { position: relative; width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #B3B3B3; overflow: visible; transition: color .15s, background-color .15s, transform .18s var(--ease-pop); }
.heart:hover { color: var(--fg); }
.heart svg { overflow: visible; }
.liked { color: #E05263 !important; }
.liked svg { animation: heartPop .42s cubic-bezier(.34,1.56,.64,1); }
@keyframes heartPop { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 60% { transform: scale(.86); } 100% { transform: scale(1); } }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; background: #E05263; opacity: 0; animation: .55s cubic-bezier(.2,.7,.3,1) both; }
.burst i:nth-child(1) { animation-name: b1; } .burst i:nth-child(2) { animation-name: b2; } .burst i:nth-child(3) { animation-name: b3; } .burst i:nth-child(4) { animation-name: b4; } .burst i:nth-child(5) { animation-name: b5; } .burst i:nth-child(6) { animation-name: b6; }
@keyframes b1 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(0,-18px) scale(.4); } }
@keyframes b2 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(15px,-9px) scale(.4); } }
@keyframes b3 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(15px,9px) scale(.4); } }
@keyframes b4 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(0,18px) scale(.4); } }
@keyframes b5 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(-15px,9px) scale(.4); } }
@keyframes b6 { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(-15px,-9px) scale(.4); } }

/* lyrics */
#lyricsView, #lyricsHolder > div { position: absolute; inset: 0; }
#lyricsList { position: absolute; inset: 0; bottom: 18px; }
#lyricsList .line { padding: 0 4px; margin-bottom: 10px; font-size: 16px; letter-spacing: 0.4px; color: var(--d155); white-space: pre-wrap; word-break: break-word; transition: color .25s; }
#lyricsList.plain .line { font-size: 12px; letter-spacing: -0.2px; color: var(--fg); }
#lyricsList .line.past { color: var(--d22); }
#lyricsList .line.now { color: var(--fg); font-weight: 700; }
#lyricsList.synced .line { cursor: pointer; }
#lyricsNote { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--d16); font-size: 12px; letter-spacing: -0.2px; }
#lyricsCredit { position: absolute; right: 0; bottom: 0; color: var(--d20); font-size: 10px; letter-spacing: 0.0px; }

#plLoading { position: absolute; inset: 30px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--d15); font-size: 10px; letter-spacing: 0.0px; }
#plLoading .g { color: var(--accent); font-size: 28px; letter-spacing: 0.2px; }

/* fields: the shell's TextField */
.field { height: 28px; padding: 0 10px; background: var(--f04); color: var(--fg); border: 1px solid var(--f40); border-radius: 0; outline: none; font-size: 12px; letter-spacing: -0.2px; user-select: text; }
.field:hover { background: var(--f08); border-color: var(--f25); }
.field:focus { background: var(--f08); border-color: var(--f25); }
.field::placeholder { color: var(--d16); }
.field::selection { background: rgba(245,245,245,.35); }

/* -- settings ---------------------------------------------------------- */
#settings { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; width: min(100%, 820px); align-self: center; }
#settingsHead { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.4px; font-weight: 700; flex: none; }
#settingsList { flex: 1; min-height: 0; }
.srow { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 4px; border-radius: 4px; min-height: 30px; font-size: 10px; letter-spacing: 0.0px; }
.srow.gap { min-height: 14px; }
.srow.head { min-height: 26px; align-items: flex-end; padding-bottom: 4px; color: var(--accent); font-weight: 700; }
.srow.note { min-height: 0; padding: 0 4px 6px; color: var(--d17); line-height: 1.2; }
.srow.choice { min-height: 38px; }
.srow .k { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--d15); }
.srow.action .k, .srow.switch .k, .srow.choice .k { color: var(--fg); }
.srow .v { color: var(--d135); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .act { width: 38px; text-align: right; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .12s; }
.srow.action { cursor: pointer; }
.srow.action:hover { background: var(--f18); }
.srow.action:hover .act, .srow.armed .act { opacity: 1; }
.srow.armed { background: #5a2420; }
.srow.armed .k, .srow.danger .k, .srow.danger .act, .srow.signout .act { color: var(--urgent); }
.srow.switch .k { flex: 0 1 auto; }
.srow.switch .sv { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--d16); }
.switch-t { width: 34px; height: 18px; border-radius: 9px; background: var(--d22); position: relative; cursor: pointer; transition: background-color .14s; flex: none; }
.switch-t.on { background: var(--accent); }
.switch-t i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); transition: left .16s cubic-bezier(.33,1,.68,1); }
.switch-t.on i { left: 18px; }
.acct { min-height: 58px; margin: 0; padding: 0 8px 0 10px; border: 1px solid var(--f16); background: var(--f06); border-radius: 4px; gap: 10px; }
.acct.on { border-color: color-mix(in srgb, var(--tint) 55%, transparent); background: color-mix(in srgb, var(--tint) 10%, transparent); }
.acct .ag { font-size: 14px; letter-spacing: -0.4px; color: color-mix(in srgb, var(--tint) 55%, transparent); }
.acct.on .ag { color: var(--tint); }
.acct .ac { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acct .ac div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .an { font-size: 11px; letter-spacing: 0.4px; font-weight: 700; }
.acct { margin-bottom: 4px; padding-top: 6px; padding-bottom: 6px; }
.acct .service-glyph { flex: none; width: 22px; text-align: center; font-size: 16px; color: var(--tint); }
.acct:not(.on) .service-glyph { color: color-mix(in srgb, var(--tint) 70%, transparent); }
.acct .hl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct .hs { display: inline-flex; align-items: center; gap: 6px; color: var(--d14); white-space: nowrap; }
.acct .hd { width: 7px; height: 7px; }
.acct .hl .hw { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--d16); }
.accts-head { justify-content: space-between; }
.acct .av { color: var(--dim); }
.acct.on .av { color: var(--tint); }
.acct .ano { color: rgba(245,245,245,.45); }
.acct .btn { font-size: 10px; letter-spacing: 0.0px; padding: 3px 10px; border-color: var(--f40); color: var(--tint); }
.acct.on .btn { color: var(--urgent); }
.dd { height: 28px; padding: 0 8px 0 10px; display: flex; align-items: center; gap: 6px; background: var(--f04); border: 1px solid var(--f40); cursor: pointer; font-size: 12px; letter-spacing: -0.2px; flex: none; }
.dd:hover { background: var(--f08); border-color: var(--f25); }
.dd span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd .g { color: var(--d12); }

/* the log page */
.log-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 0 4px; }
.log-tools .btn { padding: 3px 8px; font-size: 10px; letter-spacing: 0.0px; }
.logrow { display: flex; gap: 8px; padding: 2px 4px; font-size: 10px; letter-spacing: 0.0px; line-height: 1.35; }
.logrow .lt { width: 58px; flex: none; color: var(--d16); }
.logrow .ld { width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; flex: none; }
.logrow .ls { width: 42px; flex: none; color: var(--d16); }
.logrow .lx { flex: 1; min-width: 0; user-select: text; word-break: break-word; white-space: pre-wrap; }
.logrow { cursor: pointer; }
.logrow:hover { background: var(--f04); }
.logrow.lv-error .lx { color: #F0A07A; }
.logrow.lv-warn .lx { color: #E8CF8F; }
.logrow .ldetail { margin-top: 4px; color: var(--d16); white-space: pre-wrap; }
.logrow.focus { background: color-mix(in srgb, var(--urgent) 16%, transparent); }
.log-gap { width: 8px; flex: none; }
.log-search { flex: 1; min-width: 160px; height: 28px; padding: 0 10px; background: #141414; border: 1px solid #333; color: var(--fg); font: inherit; font-size: 11px; }
.log-search:focus { outline: none; border-color: var(--accent); }

/* -- overlays ---------------------------------------------------------- */
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 150; max-width: calc(100% - 40px); padding: 10px 16px;
  background: var(--d42); border: 1px solid var(--accent); font-size: 11px; letter-spacing: 0.4px; line-height: 1.2; text-align: center; white-space: pre-line;
  opacity: 0; transition: opacity .15s; pointer-events: none; cursor: pointer; }
#toast.on { opacity: 1; pointer-events: auto; }
#toast.error { border-color: var(--urgent); color: var(--urgent); }
#menuScrim { position: fixed; inset: 0; z-index: 100; }
#menu { position: absolute; width: 190px; padding: 5px; background: var(--d30); border: 1px solid var(--f40); border-radius: 4px; display: flex; flex-direction: column; gap: 1px; }
#menu .mh { color: var(--d13); font-size: 10px; letter-spacing: 0.0px; font-weight: 700; padding-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu .mi { height: 24px; display: flex; align-items: center; padding: 0 6px; border-radius: 4px; cursor: pointer; font-size: 10px; letter-spacing: 0.0px; gap: 6px; white-space: nowrap; overflow: hidden; }
#menu .mi:hover { background: var(--f18); }
#menu .mi .g { width: 16px; text-align: center; font-size: 13px; letter-spacing: 0.2px; flex: none; }
#menu .mi.danger { color: var(--urgent); }
#menu .mi.accent { color: var(--accent); }
#menu input { height: 28px; padding: 0 6px; background: rgba(0,0,0,.18); border: 1px solid var(--d16); color: var(--fg); font-size: 10px; letter-spacing: 0.0px; outline: none; border-radius: 4px; }
#menu .mrow { display: flex; gap: 4px; padding-top: 3px; }
#menu .mrow .btn { padding: 3px 10px; }
#confirm { position: fixed; inset: 0; z-index: 200; background: rgba(18,18,18,.7); display: flex; align-items: center; justify-content: center; }
#confirm .card { width: min(calc(100% - 32px), 370px); padding: 18px; background: var(--bg); border: 1px solid var(--accent); display: flex; flex-direction: column; gap: 20px; }
#confirmText { font-size: 14px; letter-spacing: -0.4px; white-space: pre-line; line-height: 1.25; }
#confirm .row { position: static; height: auto; display: flex; justify-content: flex-end; gap: 10px; }
.cbtn { width: 88px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 10px; letter-spacing: 0.0px; border: 1px solid rgba(245,245,245,.38); cursor: pointer; }
.cbtn.sel { background: var(--f08); border-color: var(--accent); color: var(--accent); }
.cbtn.danger { border-color: rgba(214,110,54,.56); }
.cbtn.danger.sel { background: rgba(214,110,54,.22); border-color: var(--urgent); color: var(--urgent); }
.popup { position: fixed; z-index: 120; background: var(--bg); border: 1px solid var(--accent); padding: 4px; }
#devicePopup { width: 240px; }
#devicePopup .dv { height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 4px; cursor: pointer; font-size: 12px; letter-spacing: -0.2px; }
#devicePopup .dv:hover { background: var(--f08); }
#devicePopup .dv.cur { color: var(--accent); font-weight: 700; }
#devicePopup .btn { width: 100%; justify-content: flex-start; font-size: 11px; letter-spacing: 0.4px; color: var(--d13); }
#statsPopup { width: 400px; max-width: calc(100% - 36px); padding: 10px; display: flex; flex-direction: column; gap: 8px; border-color: var(--cur); }
#statsPopup .sh { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--cur); }
#statsPopup .sh i { width: 10px; height: 10px; border-radius: 50%; background: var(--cur); }
#statsPopup .hop { color: var(--d13); font-size: 10px; letter-spacing: 0.0px; }
#statsPopup .sr { display: flex; gap: 8px; font-size: 10px; letter-spacing: 0.0px; }
#statsPopup .sr span:first-child { width: 110px; flex: none; color: var(--d16); }
#statsPopup .sr span:last-child { flex: 1; word-break: break-all; }
#statsPopup .btn { align-self: flex-start; font-size: 10px; letter-spacing: 0.0px; color: var(--d13); }
.modal { position: fixed; inset: 0; z-index: 180; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.modal .card { width: 320px; padding: 12px; background: var(--bg); border: 1px solid var(--accent); display: flex; flex-direction: column; gap: 8px; }
.modal .mtitle { font-size: 11px; letter-spacing: 0.4px; font-weight: 700; }
.modal .mtext { font-size: 10px; letter-spacing: 0.0px; color: var(--d15); }
.modal .row { position: static; display: flex; gap: 8px; height: auto; }
.dropdown { position: fixed; z-index: 190; background: var(--bg); border: 1px solid var(--accent); padding: 1px; display: flex; flex-direction: column; gap: 4px; max-height: 256px; overflow-y: auto; scrollbar-width: none; }
.dropdown div { height: 28px; flex: none; display: flex; align-items: center; padding: 0 10px; font-size: 12px; letter-spacing: -0.2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown div:hover, .dropdown div.cur { background: var(--f08); }
#tip { position: fixed; z-index: 300; background: rgba(18,18,18,.97); border: 1px solid var(--fg); padding: 6px 10px; font-size: 11px; letter-spacing: 0.4px; pointer-events: none; white-space: nowrap; }

/* -- the gate ---------------------------------------------------------- */
#gate { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0; scrollbar-width: none; }
#gateTitle { font-size: 12px; letter-spacing: -0.2px; font-weight: 700; text-align: center; }
#gateText { width: calc(100% - 40px); max-width: 520px; text-align: center; color: var(--d145); font-size: 11px; letter-spacing: 0.4px; line-height: 1.25; }
#gateStep { color: var(--spotify); font-size: 10px; letter-spacing: 0.0px; }
#choose { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
#choose .btn { width: min(300px, calc(100vw - 80px)); }
#maroHead { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#mark { position: relative; width: 66px; height: 60px; }
#mark i { position: absolute; width: 6px; height: 6px; background: #F0BE66; }
#maroHead .brand { padding-top: 4px; font-size: 26px; letter-spacing: 0.4px; font-weight: 700; }
#maroHead .tag { color: var(--dim); font-size: 12px; letter-spacing: -0.2px; }
#maroCard { width: min(380px, calc(100% - 24px)); padding: 20px; background: var(--bg); border: 1px solid var(--f16); display: flex; flex-direction: column; gap: 10px; }
#modeSwitch { height: 40px; padding: 4px; display: flex; background: var(--bg); border: 1px solid var(--f16); }
#modeSwitch div { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 12px; letter-spacing: -0.2px; cursor: pointer; }
#modeSwitch div.on { background: var(--f10); color: var(--fg); font-weight: 700; }
#maroCard label { padding-top: 4px; color: var(--dim); font-size: 10px; letter-spacing: 0.0px; margin-bottom: -10px; }
#maroCard .field { height: auto; padding: 7px 10px; }
#forgotText { font-size: 11px; letter-spacing: 0.4px; line-height: 1.25; }
#forgotLink { align-self: flex-end; color: var(--dim); font-size: 10px; letter-spacing: 0.0px; cursor: pointer; }
#forgotLink:hover { color: var(--fg); text-decoration: underline; }
#maroHint2 { color: var(--dim); font-size: 10px; letter-spacing: 0.0px; }
#maroNote { color: var(--accent); font-size: 11px; letter-spacing: 0.4px; line-height: 1.2; }
#maroHint { color: var(--urgent); font-size: 11px; letter-spacing: 0.4px; }
#maroSubmit { height: 42px; background: var(--accent); color: var(--bg); font-size: 12px; letter-spacing: -0.2px; font-weight: 700; cursor: pointer; }
#maroSubmit:hover { background: #c45252; }
#maroSubmit.busy { opacity: .6; }
#maroFoot { color: var(--dim); font-size: 12px; letter-spacing: -0.2px; cursor: pointer; }
#maroFoot b { color: var(--accent); }
#gateActions { display: flex; gap: 6px; }
/* Settings > Health: one hairline-separated line per account. */
.hrow { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 4px; border-bottom: 1px solid var(--f07); font-size: 10px; }
.hrow.last { border-bottom: 0; }
.hrow .g { width: 14px; text-align: center; font-size: 12px; }
.hrow .hn { color: var(--fg); white-space: nowrap; }
.hrow .hw { flex: 1; min-width: 0; color: var(--d17); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .hs { display: inline-flex; align-items: center; gap: 6px; color: var(--d14); white-space: nowrap; }
.hrow .hd { width: 7px; height: 7px; }
.hrow .btn { padding: 2px 8px; }

/* == redesign: player tile ============================================== */

/* == redesign: queue tile =============================================== */

/* == redesign: lyrics + jamming mode ==================================== */

/* == redesign: library + playlist page ================================== */

/* == redesign: artist + album pages ===================================== */
.detail-view { overflow-y: auto; padding: 16px 20px 40px; gap: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.detail-back { align-self: flex-start; padding: 0 12px 0 8px; margin-left: -8px; }
.dhead { display: flex; align-items: flex-end; gap: 20px; margin: 16px 0 24px; flex-wrap: wrap; }
.dcov { position: relative; width: clamp(112px,12vw,168px); aspect-ratio: 1 / 1; flex-shrink: 0; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.55); background: var(--tile); display: flex; align-items: center; justify-content: center; }
.dcov > .detail-cover-img { width: 100%; height: 100%; flex: none; border: 0; border-radius: 0; }
.dcov > .detail-cover-img img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.detail-initial { color: rgba(255,255,255,.92); font-size: 34px; font-weight: 800; letter-spacing: -.05em; }
.detail-info { flex: 1 1 220px; min-width: 0; }
.dlab { color: #FF9494; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; }
.dname { margin-top: 6px; color: #FFFFFF; font-size: clamp(22px,3vw,40px); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
.detail-meta { margin-top: 6px; color: #A0A0A0; font-size: 11.5px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-actions .m-btn { min-height: 34px; }
.detail-actions .primary { background: #B14242; color: #FFFFFF; }
.shead { margin: 28px 0 10px; color: #A0A0A0; font-size: 12px; }
.detail-list, .release-list { display: flex; flex: none; flex-direction: column; gap: 2px; overflow: visible; min-height: 0; }
.detail-track { position: relative; left: auto; right: auto; height: 54px; min-height: 54px; }
.artist-link, .album-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.artist-link:hover, .album-link:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
#npArtist .artist-link { color: inherit; }
#npArtist .artist-link:hover { color: var(--fg); }
#npMeta .album-link { color: var(--d16); }
#npMeta .album-link:hover { color: var(--fg); }
#albumArtists .artist-link { color: #6FC3B2; }
#albumArtists .artist-link:hover { color: #FFFFFF; }
.release-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid transparent; background: transparent; color: var(--fg); text-align: left; cursor: pointer; }
.release-row:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.release-cover { position: relative; width: 48px; height: 48px; overflow: hidden; background: var(--tile); }
.release-cover > .cover { width: 100%; height: 100%; border: 0; border-radius: 0; }
.release-cover > .cover img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.release-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.release-name { overflow: hidden; color: #FFFFFF; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.release-sub { color: #A0A0A0; font-size: 11.5px; }
.release-chevron { color: #8C8C8C; font-size: 22px; line-height: 1; }
.release-row:active { transform: scale(.995); }
.dcov.round, .dcov.round > .detail-cover-img, .dcov.round > .detail-cover-img img { border-radius: 50%; }
.detail-note { margin: -8px 0 8px; color: #8C8C8C; font-size: 11.5px; }
.detail-note[hidden] { display: none; }
.detail-sections { display: flex; flex-direction: column; }
.shead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shead .see-all { height: 26px; padding: 0 10px; font-size: 11px; color: #A0A0A0; }
.shead .see-all:hover { color: #FFFFFF; }
@media (max-width:760px) {
  .detail-view { padding: 4px 12px 28px; }
  #artistBack, #albumBack { height: 28px; }
  .detail-note { margin: 0 0 6px; }
}

/* == redesign: recent, discover, search ================================= */
/* The three tabs share the main tile's gutter (the #views margin) and the queue's
   song row (.qrow); Discover's lists are the library's rows (.lrow). */
.tabview { padding: 4px 0 0; gap: 0; min-width: 0; overflow: hidden; }
.tabhead { min-height: 36px; gap: 8px; flex: none; }
.tabhead > span:first-child { flex: 1; min-width: 0; color: #A0A0A0; font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.tabhead #dTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #A0A0A0; font-size: 12px; letter-spacing: 0; }
.tabhead #dBack { padding: 0 12px 0 8px; margin-left: -8px; }
.tabview .m-btn { gap: 8px; }
.m-btn.off { opacity: .4; pointer-events: none; }
.tabview .list { margin-top: 8px; padding-bottom: 8px; overflow-x: hidden; }
.tabview .list .inner { min-height: 100%; }
.tabview .empty { padding: 40px 0; color: #A0A0A0; font-size: 12px; letter-spacing: 0; text-align: center; white-space: normal; }
.tabview .empty.hint { padding: 16px 0 0; color: #8C8C8C; text-align: left; }
#recentEmpty { margin-top: 8px; }

/* Transfers: the overall line, then one row per download or upload */
#xTotal { flex: none; padding: 10px 0 12px; border-bottom: 1px solid var(--f08); }
#xTotal[hidden] { display: none; }
.xnums { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--d14); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.xnums span:last-child { color: var(--fg); }
.xbar { height: 3px; background: var(--f08); }
.xbar > div { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.xlist { margin-top: 0; overflow-y: auto; }
.xrow { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; column-gap: 10px; row-gap: 2px; padding: 9px 4px 10px 0; border-bottom: 1px solid var(--f06); }
.xrow .xd { grid-row: 1 / span 2; color: var(--d14); font-size: 14px; line-height: 18px; text-align: center; }
.xrow .xt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.xrow .xt b { font-weight: 700; margin-right: 8px; }
.xrow .xt i { font-style: normal; color: var(--t2); font-size: 12px; }
.xrow .xs { font-size: 12px; color: var(--d14); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xrow .xm { grid-column: 2 / span 2; min-width: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--t2); font-variant-numeric: tabular-nums; }
.xrow .xm span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xrow .xbar { grid-column: 2 / span 2; margin-top: 4px; }
.xrow.queued { opacity: .55; }
.xrow.done .xbar > div { background: #6FBF73; }
.xrow.done .xs { color: #6FBF73; }
.xrow.failed .xbar > div { background: #E5534B; }
.xrow.failed .xs, .xrow.failed .xm span:first-child { color: #FF8A8A; }
.xrow.unknown.active .xbar > div { width: 30% !important; animation: xslide 1.2s linear infinite; }
@keyframes xslide { from { margin-left: -30%; } to { margin-left: 100%; } }
#recentHead[hidden] { display: none; }

/* song rows: the queue's row with a time and an add button */
.trow { grid-template-columns: 44px 36px minmax(0,1fr) auto 36px; }
.trow .qaction { width: 34px; height: 34px; }
.trow .qmark { min-width: 18px; white-space: nowrap; }
.trow .qservice { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .qartist { min-width: 0; }
.trow .qartist.artist-link { color: inherit; cursor: pointer; }
.trow .qartist.artist-link:hover { color: #FFFFFF; }
.trow .qmark .spinner { width: 14px; height: 14px; }

/* search: the mockup's 48px field with its Search button inside */
#searchRow { display: flex; align-items: center; gap: 12px; flex: none; height: 48px; padding: 0 8px 0 16px; background: #0D0D0D; border: 1px solid #333; color: #8C8C8C; transition: border-color .15s; }
#searchRow:hover { border-color: #5A5A5A; }
#searchRow:focus-within { border-color: #8C8C8C; }
#searchRow svg { flex: none; }
#searchField { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: #F5F5F5; font: inherit; font-size: 13px; letter-spacing: 0; user-select: text; }
#searchField::placeholder { color: #8C8C8C; }
#searchFilters { display: flex; align-items: center; gap: 4px; flex: none; margin-top: 12px; min-height: 32px; flex-wrap: wrap; }
#searchFilters:empty { display: none; }
#searchFilters .m-btn.sel { color: #FFFFFF; }
#searchFilters .linkcard { flex: 1; display: flex; align-items: center; gap: 14px; padding: 14px; background: #161616; }
.linkcover.cover { width: 52px; height: 52px; border-radius: 0; }
.linkcover.cover img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.linkinfo { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.linktag { color: #7FD083; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; }
.linkinfo .linkname { padding: 0; color: #F5F5F5; font-size: 13.5px; font-weight: 700; }
.linkinfo .dim { font-size: 11.5px; }
#searching { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: #A0A0A0; font-size: 12px; letter-spacing: 0; }
#searching .spinner { width: 16px; height: 16px; }
#searching[hidden] { display: none; }
#searching, #searchEmpty { order: 1; }
#searchList { order: 2; }

/* discover: a featured pick, then every list as a library row */
#dPage { flex: 1; min-height: 0; padding-bottom: 24px; }
.shead { margin: 28px 0 10px; color: #A0A0A0; font-size: 12px; letter-spacing: 0; }
.hero { position: relative; overflow: hidden; margin-top: 8px; border: 1px solid rgba(177,66,66,.5); background: color-mix(in srgb, var(--tint, #B14242) 24%, #0D0D0D); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 140% at 12% 50%, rgba(13,13,13,0) 0%, rgba(13,13,13,.55) 55%, rgba(13,13,13,.92) 100%); }
.heroin { position: relative; display: flex; align-items: center; gap: clamp(18px,3vw,36px); padding: clamp(20px,3vw,36px); flex-wrap: wrap; }
.hcov { position: relative; width: clamp(140px,16vw,220px); aspect-ratio: 1 / 1; flex: none; overflow: hidden; padding: 0; border: 1px solid #B14242; background: #171717; box-shadow: 0 24px 60px rgba(0,0,0,.6); cursor: pointer; transition: transform .3s var(--ease-pop); }
.hcov:hover { transform: scale(1.03) rotate(-1deg); }
.hcov .cover.big { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
.hcov .cover.big img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.hcov .cover.big .gl { font-size: 40px; }
.hinfo { position: relative; flex: 1 1 260px; min-width: 0; }
.htag { display: flex; align-items: center; gap: 10px; color: #FF9494; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; }
.htag i { width: 7px; height: 7px; background: #B14242; }
.htitle { margin-top: 12px; color: #F5F5F5; font-size: clamp(26px,3.6vw,54px); font-weight: 800; letter-spacing: -.05em; line-height: 1.05; overflow-wrap: anywhere; }
.hsub { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 8px; font-size: clamp(13px,1.3vw,16px); }
.hsub .faint { flex: none; }
.hsub .faint.ell { flex: 0 1 auto; min-width: 0; font-size: 11.5px; }
.hacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.hbtn { height: 40px; padding: 0 20px; gap: 8px; }
.hbtn.dark { padding: 0 16px; background: rgba(0,0,0,.35); }
.hnext { margin-left: auto; gap: 8px; }
.hdots { position: relative; display: flex; gap: 6px; padding: 0 clamp(20px,3vw,36px) 18px; }
.fdot { width: 18px; height: 4px; padding: 0; background: rgba(255,255,255,.22); transition: width .35s var(--ease-pop), background-color .2s; }
.fdot.on { width: 36px; background: #FFFFFF; }
.dlist { display: flex; flex-direction: column; gap: 2px; }
#dPage .lrow { position: relative; left: auto; right: auto; height: 80px; min-height: 80px; grid-template-columns: 64px minmax(0,1fr) auto 40px; }
#dPage .lib-cover.cover { width: 64px; height: 64px; }
#dPage .lrow:focus-visible { outline: 1px solid #B14242; }
#dPage .lib-name { font-size: 13.5px; }
#dPage .lib-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dPage .lib-service { font-size: 11px; }
#dEmpty { position: absolute; inset: 52px 0 0; display: flex; align-items: center; justify-content: center; padding: 0; }
#dEmpty[hidden] { display: none; }
#dLoading { position: absolute; inset: 52px 0 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--t2); font-size: 12px; background: rgba(13,13,13,.86); }
#dLoading[hidden] { display: none; }
#dLoading .spinner { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .tabview { padding: 2px 0 0; }
  .trow { grid-template-columns: 44px 34px minmax(0,1fr) auto 34px; column-gap: 6px; padding: 6px 4px; }
  .trow .qservice { display: none; }
  #dPage .lrow { grid-template-columns: 64px minmax(0,1fr) auto 36px; column-gap: 8px; padding: 8px 4px; }
  .heroin { flex-direction: column; align-items: flex-start; }
  .hcov { width: 132px; }
  .hnext { margin-left: 0; }
}

/* == redesign: menus, popovers, settings ================================ */

/* == redesign: player == */
/* -- player tile -------------------------------------------------------- */
#side { min-width: 0; gap: 12px; padding: 16px; }
#side > * { position: relative; z-index: 1; }
#playerAmb { position: absolute; z-index: 0; inset: -36% -30% auto; height: 190%; pointer-events: none;
  opacity: .72; background: radial-gradient(ellipse at 28% 0%, color-mix(in srgb, var(--player-ambient, var(--cur)) 27%, transparent), transparent 62%); transition: background .6s, opacity .6s; }
#playerAmb::before { content: ""; position: absolute; inset: -14px; background: var(--player-art) center / cover no-repeat; filter: blur(34px) saturate(1.15); opacity: .34; mask-image: radial-gradient(ellipse at 28% 0%, #000 0%, transparent 68%); }
#np { display: flex; flex-direction: row; align-items: center; gap: 14px; min-width: 0; }
#npArt.cover.big { width: 88px; height: 88px; flex: none; border: 1px solid var(--cur); border-radius: 0; box-shadow: 0 10px 28px rgba(0,0,0,.55); cursor: pointer; }
#npArt.cover.big img { border-radius: 0; }
#npText { position: relative; width: auto; flex: 1; min-width: 0; gap: 3px; padding-right: 27px; }
#npTitleRow { gap: 3px; }
#npTitle { font-size: 15px; letter-spacing: -0.3px; font-weight: 800; }
#npArtist { color: var(--track-source, var(--d13)); font-size: 11px; letter-spacing: .2px; }
#npMeta { font-size: 10px; color: #8C8C8C; }
#npHeart { display: inline-flex; flex: none; }
#npHeart .heart { width: 24px; height: 24px; color: #B3B3B3; }
#npLoading { font-size: 10px; }
.jam-open { position: absolute; top: 0; right: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: #8C8C8C; cursor: pointer; transition: color .15s, background-color .15s, transform .18s var(--ease-pop); }
.jam-open:hover { color: #F5F5F5; background: #222; }
.jam-open:active { transform: scale(.88); }
#progress { gap: 4px; }
#seekRow { gap: 10px; }
#elapsed, #total { width: 34px; color: #C8C8C8; font-size: 11px; }
#total { text-align: right; }
#seek.wave { height: 26px; min-width: 40px; display: flex; align-items: center; overflow: hidden; }
#seek.wave .wave-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; pointer-events: none; }
#seek.wave .wb { flex: 1; min-width: 1px; transition: background-color .25s, transform .2s; }
#seek.wave .wb.un { background: #333 !important; }
#seek.wave:hover .wb.un { background: #4A4A4A !important; }
#seek.wave:hover .wb { transform: scaleY(1.15); }
#seek.wave .track, #seek.wave .fill { display: none; }
#seek.wave .knob { top: 0; width: 2px; height: 100%; border: 0; background: #F5F5F5; transform: none; z-index: 1; pointer-events: none; }
#transportWrap { height: auto; min-height: 36px; }
#transport { position: relative; left: auto; transform: none; display: flex; align-items: center; gap: 2px; }
#transport .t-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: #B3B3B3; }
#transport .t-btn:hover { color: #F5F5F5; background: #222; }
#transport .t-btn:active { transform: scale(.88); }
#transport .t-btn.off { opacity: .4; pointer-events: none; }
#transport #bPlay { width: 40px; height: 40px; margin: 0 6px; background: #F5F5F5; color: #121212; }
#transport #bPlay:hover { background: #FFFFFF; }
#transport #bPlay .g { font-size: 16px; }
#bShuffle, #bRepeat { color: #8C8C8C; }
#bShuffle.on, #bRepeat.on { color: #FF9494; background: transparent; }
#bRepeat.flash .g { animation: repeatFlash .45s var(--ease-pop); }
@keyframes repeatFlash { 0% { transform: scale(1); } 42% { transform: scale(1.35); color: #FF9494; } 100% { transform: scale(1); } }
#vol { position: relative; right: auto; flex: 1; min-width: 120px; gap: 10px; margin-top: 4px; }
#volIcon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #B3B3B3; }
#volSlider { width: auto; flex: 1; }
#volSlider .track { height: 3px; top: 10px; border-radius: 0; background: #333; }
#volSlider .fill { height: 3px; top: 10px; border-radius: 0; background: #F5F5F5; }
#volSlider .knob { width: 10px; height: 10px; top: 7px; border: 0; background: #F5F5F5; }
#volLabel { width: 34px; color: #8C8C8C; font-size: 11px; }
body.narrow #np { flex-direction: row; }
body.narrow #npText { flex: 1; }
body.narrow #npArt.cover.big { width: 56px; height: 56px; }
body.narrow #side { padding: 12px 14px; gap: 10px; }
#npHeart .heart.player-heart { color: #B3B3B3; }

/* == redesign: player layout refinements == */
#npText { padding-right: 0; }
#transportWrap { width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
#transport { width: 100%; justify-content: space-between; gap: 0; }
#vol { position: relative; right: auto; width: 100%; min-width: 0; flex: 1 1 auto; gap: 10px; margin-top: 0; }
#volSlider { width: auto; min-width: 40px; flex: 1 1 0; }
#volLabel { flex: none; width: 34px; }
#jamOpen { position: relative; top: auto; right: auto; flex: none; width: 32px; height: 32px; margin-left: 0; }
#seek.wave .wb { flex: 1 1 0; min-width: 2px; }

/* == redesign: queue tile == */
/* The one song row (trackRow) in every list: queue, playlist, album, artist, recent, search, discover. */
.qrow.static { position: relative; left: auto; right: auto; }
.qrow .qsub .artist-link { flex: 0 0 auto; max-width: 62%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #A0A0A0; }
.qrow .qsub .artist-link:hover { color: #FFFFFF; }
.qrow .qmeta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8C8C8C; }
/* Round 2 K: line 2 is Artist · Album; the album truncates at the end. */
.qrow .qartists { flex: 0 1 auto; max-width: 55%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #A0A0A0; }
.qrow .qartists .artist-link { max-width: none; }
.qrow .qsub .album-link.qalbum { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8C8C8C; }
.qrow .qsub .album-link.qalbum:hover { color: #FFFFFF; }
.qrow .qsep { flex: none; color: #666666; }
.qrow .qwhen { flex: none; }
.qrow .qsub .saved { margin-right: 0; }
.qrow .qadd { color: #A0A0A0; }
#queueView { min-width: 0; min-height: 0; flex-direction: column; padding: 0; }
#queueHead.qhead { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px 18px; }
.qhead-label { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.qhead-title { font-size: 12.5px; font-weight: 700; color: var(--fg); }
.qhead-count { color: var(--t3); font-size: 11.5px; }
.qclear { height: 32px; padding: 0 10px !important; gap: 8px; }
.qclear svg { color: #E05263; }
.qclear:disabled { opacity: .4; pointer-events: none; }
#queueList { flex: 1; min-height: 0; position: relative; overflow-x: hidden; padding: 0 8px 8px; }
#queueEmpty { margin: 4px; padding: 40px 16px; text-align: center; background: #161616; font-size: 12px; }
.qrow { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 44px 36px minmax(0,1fr) 40px 36px; column-gap: 8px; align-items: center; min-height: 56px; max-height: 90px; padding: 6px 8px; border: 1px solid transparent; cursor: pointer; overflow: hidden; transition: background-color .15s, border-color .25s, opacity .25s; }
.qrow:hover { background: #1A1A1A; }
.qrow.on { background: color-mix(in srgb, var(--cur) 18%, transparent); border-color: color-mix(in srgb, var(--cur) 80%, transparent); }
.qrow.on .qtitle { color: #FFFFFF; }
.qrow .qcover { width: 44px; height: 44px; border-radius: 0; }
.qrow .qcover img { border-radius: 0; }
.qrow .qcover .gl { font-size: 14px; }
.qrow .t-btn { position: relative; z-index: 2; width: 36px; height: 36px; color: #A0A0A0; }
.qrow .t-btn:hover { color: #F5F5F5; background: #222; }
.qrow .qheart { position: relative; z-index: 2; width: 34px; height: 34px; color: #A0A0A0; }
.qrow .qheart:hover { color: #F5F5F5; background: #222; }
.qrow .qtext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qrow .qtitle { overflow: hidden; color: #F5F5F5; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.qrow .qline1 { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.qrow .qline1 .qtitle { flex: 0 1 auto; min-width: 0; }
.qrow .qline1 .qlen { flex: none; color: #8C8C8C; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qrow .qsub { display: flex; align-items: center; gap: 6px; min-width: 0; color: #A0A0A0; font-size: 11.5px; }
.qrow .badge { width: 12px; height: 12px; border-radius: 50%; display: inline-flex; flex: none; align-items: center; justify-content: center; color: #FFFFFF; }
.qrow .badge svg { width: 8px; height: 8px; }
.qrow .qartist, .qrow .qservice { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .qservice { flex: none; color: #8C8C8C; }
.qrow .qmark { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 18px; color: #8C8C8C; font-size: 11.5px; }
.qrow .qnum { text-align: right; }
.qrow .qhoverplay { display: none; position: absolute; inset: 0; align-items: center; justify-content: flex-end; color: #F5F5F5; }
.qrow:not(.on):hover .qnum { visibility: hidden; }
.qrow:not(.on):hover .qhoverplay { display: flex; }
.qrow .qcurrentplay { color: #F5F5F5; }
.qrow.dk { opacity: .3; }
.qrow.dk:hover { opacity: .8; }
.qrow.dk > * { opacity: 1; }
.qrow.gone { opacity: .4; }
.qrow.dk.gone { opacity: .3; }
.qrow.dk.gone:hover { opacity: .8; }
.qrow .why { flex: none; overflow: hidden; color: #E06C6C; text-overflow: ellipsis; white-space: nowrap; }
.qrow.out { animation: qRowOut .26s cubic-bezier(.4,0,1,1) forwards; pointer-events: none; }
@keyframes qRowOut { 0% { opacity: 1; transform: none; } 60% { opacity: 0; transform: translateX(28px); max-height: 56px; min-height: 56px; } 100% { opacity: 0; transform: translateX(28px); max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; } }
.qrow.new { animation: qRowNew 1.2s ease; }
@keyframes qRowNew { 0% { background: rgba(232,131,58,.28); } 100% { background: transparent; } }
body.narrow #queueHead.qhead { padding: 10px 10px 8px; }
body.narrow #queueList { padding: 0 8px 8px; }
body.narrow .qrow { grid-template-columns: 44px 34px minmax(0,1fr) 30px 34px; column-gap: 6px; padding: 6px 4px; }
body.narrow .qrow .qservice { display: none; }

/* == redesign: lyrics + jamming mode ==================================== */
#lyricsView { flex-direction: column; }
.lyric-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.lyrics-window { position: absolute; inset: 0; overflow: hidden; min-height: 320px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%); }
#lyricsList { --lh: 76px; position: absolute; top: 36%; left: 0; right: 0; display: flex; flex-direction: column; padding: 0 clamp(20px, 6vw, 96px); transition: transform .7s cubic-bezier(.2,0,0,1); }
#lyricsList .line { display: block; width: 100%; height: auto; min-height: var(--lh); flex: 0 0 auto; overflow: visible; padding: 0; margin: 0; border: 0; background: transparent; color: rgba(245,245,245,.68); font-size: clamp(22px, 2.4vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; white-space: normal; overflow-wrap: anywhere; text-align: left; transform-origin: left center; transition: opacity .45s, transform .55s cubic-bezier(.2,0,0,1), color .45s; cursor: pointer; }
#lyricsList .line:hover { opacity: 1 !important; color: #fff !important; }
#lyricsList.plain .line { font-size: 17px; font-weight: 500; white-space: pre-wrap; }
#lyricsList .line.lyric-gap { display: flex; align-items: center; gap: 10px; }
.gd { width: 9px; height: 9px; flex: 0 0 9px; background: rgba(255,255,255,.4); animation: gdP 1.4s ease-in-out infinite; }
@keyframes gdP { 0%,100% { transform: scale(.7); opacity: .4; } 50% { transform: scale(1.2); opacity: 1; } }
#lyricsNote { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px; color: var(--t2); font-size: 13px; text-align: center; pointer-events: none; }
#lyricsNote[hidden] { display: none; }
.lyrics-footer { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px 14px; }
#lyricsCredit { position: static; min-width: 0; font-size: 10.5px; }
.lyrics-footer .m-btn { flex: none; }
#jamOverlay { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden; color: #F5F5F5; background: #0D0D0D; }
#jamOverlay[hidden] { display: none; }
.jamin { animation: jamIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes jamIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
.jam-ambient { position: absolute; inset: 0; background: radial-gradient(100% 115% at 4% 48%, rgba(177,66,66,.38) 0%, rgba(177,66,66,.15) 42%, rgba(13,13,13,0) 74%), radial-gradient(70% 100% at 18% 95%, rgba(177,66,66,.2) 0%, rgba(13,13,13,0) 68%), linear-gradient(90deg, rgba(13,13,13,.18) 0%, rgba(13,13,13,.78) 58%, #0D0D0D 100%); pointer-events: none; transition: background .6s ease; }
.jam-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: clamp(12px,2.5vw,24px) clamp(12px,3vw,32px); }
.jam-head, .jam-head-actions { flex: 0 0 auto; pointer-events: auto; }
.jam-head { min-height: 52px; }
.jam-head-actions { position: relative; z-index: 3; }
.jam-mark { width: 26px; height: 26px; display: block; }
.jam-head-actions { display: flex; gap: 8px; }
.jam-head .m-btn { background: rgba(0,0,0,.5); }
.jamgrid { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; align-items: center; gap: clamp(24px,5vw,88px); padding: 0 clamp(16px,5vw,80px) clamp(16px,3vw,32px); }
.jam-art-column { flex: 0 0 auto; width: min(34vw,50vh,500px); display: flex; flex-direction: column; gap: 12px; }
.jam-cover,.jam-cover-large { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #181818; border: 1px solid var(--cur); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.jam-cover img,.jam-cover-large img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jam-trackrow { display: flex; align-items: center; gap: 12px; }
.jam-trackcopy { flex: 1; min-width: 0; }
.jam-title { color: #F5F5F5; font-size: clamp(16px,1.8vw,26px); font-weight: 700; letter-spacing: -.04em; }
.jam-artist { margin-top: 2px; font-size: 13px; }
/* The open control block (round 1, item 8): exactly the cover's width, no box.
   A thin seek line with the times, then five evenly spaced controls. */
.jam-controls { box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.jam-seek { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; column-gap: 10px; outline: none; --p: 0; }
.jam-time { color: #8C8C8C; font-size: 11px; font-variant-numeric: tabular-nums; min-width: 32px; }
.jam-dur { text-align: right; }
.jam-bar { position: relative; height: 20px; cursor: pointer; touch-action: none; }
.jam-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: rgba(255,255,255,.18); }
.jam-fill { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; width: calc(var(--p) * 100%); background: #E5323F; }
.jam-knob { position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 4px rgba(0,0,0,.5); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.jam-seek:hover .jam-knob, .jam-seek.drag .jam-knob, .jam-seek:focus-visible .jam-knob { opacity: 1; transform: none; }
.jam-seek:focus-visible .jam-bar::before { box-shadow: 0 0 0 2px rgba(229,50,63,.5); }
.jam-tip { position: absolute; bottom: 18px; transform: translateX(-50%); padding: 3px 6px; background: #F5F5F5; color: #121212; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.jam-tip[hidden] { display: none; }
.jam-transport { box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0; padding: 0; border: 0; background: transparent; }
.jam-transport .t-btn { position: relative; box-sizing: border-box; width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #FFFFFF; cursor: pointer; transition: color .15s, transform .15s var(--ease-pop); }
.jam-transport .t-btn:hover { color: #FFFFFF; background: transparent; }
.jam-transport .t-btn:focus-visible { outline: 2px solid rgba(229,50,63,.8); outline-offset: 2px; }
.jam-transport .t-btn:active { transform: scale(.9); }
.jam-transport .t-btn.off { opacity: .35; pointer-events: none; }
.jam-transport [data-jam-control="bPrev"] svg, .jam-transport [data-jam-control="bNext"] svg { width: 26px; height: 26px; }
.jam-transport [data-jam-control="bShuffle"], .jam-transport [data-jam-control="bRepeat"] { color: #B3B3B3; }
.jam-transport [data-jam-control="bShuffle"]:hover, .jam-transport [data-jam-control="bRepeat"]:hover { color: #FFFFFF; }
.jam-transport [data-jam-control="bShuffle"] svg, .jam-transport [data-jam-control="bRepeat"] svg { width: 20px; height: 20px; }
.jam-transport .t-btn.on, .jam-transport .t-btn.on:hover { color: #E5323F; background: transparent; }
.jam-transport .t-btn.on::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #E5323F; }
.jam-transport .t-btn.jam-main-play { width: 56px; height: 56px; flex-basis: 56px; border-radius: 50%; background: #FFFFFF; color: #000000; }
.jam-transport .t-btn.jam-main-play:hover { background: #FFFFFF; color: #000000; }
.jam-transport .t-btn.jam-main-play:active { transform: scale(.94); }
.jam-transport .t-btn.jam-main-play svg { width: 24px; height: 24px; }
.jam-transport .jam-repeat-one { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; line-height: 1; }
.jam-transport .t-btn:not(.one) .jam-repeat-one { display: none; }
.jamgrid.plain #jamLyrics { top: 8%; }
.jam-swap { animation: jamSwap .22s cubic-bezier(.2,0,0,1) both; }
@keyframes jamSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.jam-lyrics-window { position: relative; flex: 1 1 0; min-width: 0; align-self: stretch; min-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%, #000 74%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 20%, #000 74%, transparent 100%); }
#jamLyrics { --lh: 96px; position: absolute; top: 38%; left: 0; right: 0; display: flex; flex-direction: column; transition: transform .7s cubic-bezier(.2,0,0,1); }
#jamLyrics .ll { height: auto; min-height: var(--lh); flex: 0 0 auto; display: block; width: 100%; overflow: visible; padding: 0; border: 0; background: transparent; color: rgba(245,245,245,.68); font-size: clamp(26px,4vw,64px); font-weight: 700; letter-spacing: -.045em; line-height: 1.1; text-align: left; white-space: normal; overflow-wrap: anywhere; transform-origin: left center; transition: opacity .45s,transform .55s cubic-bezier(.2,0,0,1),color .45s; }
#lyricsList.user-scroll, #jamLyrics.user-scroll,
#lyricsList.instant-scroll, #jamLyrics.instant-scroll { transition: none; }
.lyrics-window, .jam-lyrics-window { cursor: grab; touch-action: none; user-select: none; }
.lyrics-window.dragging, .jam-lyrics-window.dragging { cursor: grabbing; }
.lyrics-window.plain-scroll { cursor: auto; touch-action: pan-y; user-select: text; }
#lyricsList.plain { top: 0; bottom: 0; display: block; overflow-y: auto; padding-top: 12px; padding-bottom: 28px; transform: none; scrollbar-width: none; }
#lyricsList.plain::-webkit-scrollbar { display: none; }
#lyricsList.plain .line { min-height: 0; height: auto; padding: 8px 0; }
#jamLyrics button { cursor: pointer; }
#jamLyrics .lyric-gap { display: flex; align-items: center; gap: 12px; }
#jamLyrics .gd { width: 12px; height: 12px; flex-basis: 12px; }
.jam-cover-only { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 24px; text-align: center; }
.jam-cover-only[hidden] { display: none; }
.jam-cover-large { width: min(420px,46vh,80vw); flex: none; box-shadow: 0 24px 64px rgba(0,0,0,.85); }
.jam-cover-meta { width: min(420px,46vh,80vw); }
.jam-cover-meta .jam-title { font-size: clamp(22px,3.4vw,38px); }
.jam-cover-meta .jam-artist { font-size: clamp(13px,1.6vw,17px); }
.jam-cover-only .jam-controls { width: min(420px,46vh,80vw); }
#jamLyricsToggle .jam-chev { display: none; }
@media (max-width: 760px) {
  #lyricsList { --lh: 60px; padding: 0 20px; }
  #lyricsList .line { font-size: clamp(20px,5vw,30px); }
  .jam-cover-only .jam-transport .t-btn.jam-main-play { width: 60px; height: 60px; flex-basis: 60px; }
  #jamLyrics { --lh: 58px; }
  #jamLyrics .ll { font-size: 26px; }
  /* Lyrics on, phone width: the lyrics take the screen and the song folds
     into one bar at the bottom - the seek line over a small cover, the title
     and heart, and previous / play / next. The cover layout is unchanged. */
  .jamgrid { flex-direction: column; align-items: stretch; gap: 8px; padding: 0 12px 12px; }
  .jamgrid .jam-lyrics-window { order: 1; flex: 1 1 0; min-height: 0; }
  .jamgrid .jam-art-column { order: 2; flex: none; width: auto; min-width: 0; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; grid-template-areas: "seek seek seek" "cover track ctrl"; align-items: center; column-gap: 10px; row-gap: 2px; padding: 6px 10px 10px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.08); }
  .jamgrid .jam-cover { grid-area: cover; width: 48px; box-shadow: none; }
  .jamgrid .jam-trackrow { grid-area: track; min-width: 0; gap: 6px; }
  .jamgrid .jam-trackrow .jam-title { font-size: 13px; letter-spacing: -.02em; }
  .jamgrid .jam-artist { font-size: 11px; }
  .jamgrid .jam-controls { display: contents; }
  .jamgrid .jam-seek { grid-area: seek; column-gap: 8px; }
  .jamgrid .jam-bar { height: 16px; }
  .jamgrid .jam-transport { grid-area: ctrl; width: auto; gap: 2px; }
  .jamgrid .jam-transport [data-jam-control="bShuffle"], .jamgrid .jam-transport [data-jam-control="bRepeat"] { display: none; }
  .jamgrid .jam-transport .t-btn { width: 36px; height: 36px; flex-basis: 36px; }
  .jamgrid .jam-transport [data-jam-control="bPrev"] svg, .jamgrid .jam-transport [data-jam-control="bNext"] svg { width: 20px; height: 20px; }
  .jamgrid .jam-transport .t-btn.jam-main-play { width: 40px; height: 40px; flex-basis: 40px; }
  .jamgrid .jam-transport .t-btn.jam-main-play svg { width: 18px; height: 18px; }
  /* The header: an X instead of "Exit", the chevron instead of the words. */
  .jam-head .jam-btn-label { display: none; }
  .jam-head .m-btn { width: 32px; padding: 0; justify-content: center; }
  #jamLyricsToggle .jam-chev { display: block; transition: transform .25s var(--ease-pop); }
  #jamLyricsToggle.open .jam-chev { transform: rotate(180deg); }
}

/* == redesign: library + playlist page ================================== */
#playlistsView { min-width: 0; overflow: hidden; }
.lib-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 0 16px; flex: none; }
.lib-toolbar[hidden], .playlist-page[hidden] { display: none; }
#libCount { font-size: 12px; }
.lib-tools { display: flex; align-items: center; gap: 8px; }
.lib-sort { display: flex; align-items: center; gap: 4px; }
.lib-sort .m-btn { height: 30px; padding: 0 12px; }
.lib-refresh { width: 32px; padding: 0; }
.library-list { padding: 0 16px 8px; overflow-x: hidden; }
.library-list .inner { min-height: 100%; }
.lrow { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 48px minmax(0,1fr) auto 40px; column-gap: 14px; align-items: center; height: 64px; min-height: 64px; padding: 8px; cursor: pointer; transition: background-color .15s; }
.lrow:hover { background: #1A1A1A; }
.lib-cover.cover { position: relative; width: 48px; height: 48px; border-radius: 0; background: #171717; }
.lib-cover.cover img { inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.lib-cover .gl { font-size: 16px; }
.lib-liked-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #FFFFFF; background: #B14242; }
.lib-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-name { color: #F5F5F5; font-size: 13px; font-weight: 700; }
.lib-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: #8C8C8C; font-size: 11.5px; }
.lib-service { flex: none; }
.lib-sep { color: #666666; }
.lib-syncing { color: #666666; font-style: italic; }
/* Round 2 E: the services' own Liked covers, drawn locally under the picture. */
.cover.liked-sp { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23FFFFFF%22%3E%3Cpath%20d%3D%22M19%2014c1.49-1.46%203-3.21%203-5.5A5.5%205.5%200%200%200%2016.5%203c-1.76%200-3%20.5-4.5%202-1.5-1.5-2.74-2-4.5-2A5.5%205.5%200%200%200%202%208.5c0%202.3%201.5%204.05%203%205.5l7%207Z%22%2F%3E%3C%2Fsvg%3E") center / 46% no-repeat, linear-gradient(135deg, #450AF5 0%, #8E8EE5 55%, #C4EFD9 100%); }
.cover.liked-ytm { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23FFFFFF%22%3E%3Cpath%20d%3D%22M2%2021h4V9H2v12zm20-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L13.17%201%206.59%207.59C6.22%207.95%206%208.45%206%209v10c0%201.1.9%202%202%202h9c.83%200%201.54-.5%201.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z%22%2F%3E%3C%2Fsvg%3E") center / 44% no-repeat, linear-gradient(135deg, #FF5F38 0%, #E5323F 55%, #B3125E 100%); }
.cover.liked-sp .gl, .cover.liked-ytm .gl { display: none; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 14px; flex: none; color: var(--cur); }
.eq:not(.on) { visibility: hidden; }
.eq i { display: block; width: 2.5px; height: 100%; background: var(--cur); transform-origin: bottom; animation: eqB .75s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-duration: .52s; animation-delay: .08s; }
.eq i:nth-child(2) { animation-duration: .82s; animation-delay: .22s; }
.eq i:nth-child(3) { animation-duration: .62s; animation-delay: .04s; }
.eq i:nth-child(4) { animation-duration: .72s; animation-delay: .18s; }
@keyframes eqB { 0% { transform: scaleY(.2); } 50% { transform: scaleY(.95); } 100% { transform: scaleY(.35); } }
.lib-play { width: 36px; height: 36px; padding: 0; opacity: 0; transform: scale(.8); transition: opacity .15s, transform .2s var(--ease-pop); }
.lrow:hover .lib-play, .lib-play.on { opacity: 1; transform: none; }
.lib-play.on { background: #1A1A1A; border-color: #333; color: #FF9494; }
.library-empty { position: absolute; inset: 58px 16px 12px; display: flex; align-items: center; justify-content: center; padding: 32px; color: var(--t2); text-align: center; background: #161616; }
.library-empty[hidden] { display: none; }
#plLoading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--t2); font-size: 12px; background: rgba(13,13,13,.86); }
#plLoading[hidden] { display: none; }
#plLoading .spinner { width: 18px; height: 18px; }
.playlist-page { flex: none; min-height: 0; padding: 12px 20px 0; }
.playlist-backbar { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.playlist-backbar #plBack { padding: 0 12px 0 8px; margin-left: -8px; }
.playlist-sync[hidden] { display: none; }
.playlist-sync .m-btn { gap: 7px; }
.playlist-sync svg { color: var(--t2); }
.playlist-hero { display: flex; align-items: flex-end; gap: 20px; margin: 16px 0 24px; flex-wrap: wrap; }
.playlist-cover.cover.big { position: relative; width: clamp(112px,12vw,168px); height: auto; aspect-ratio: 1; flex: 0 0 clamp(112px,12vw,168px); border: 0; border-radius: 0; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.playlist-cover.cover.big img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.playlist-cover.cover.big .gl { font-size: 26px; }
.playlist-info { flex: 1 1 220px; min-width: 0; }
.playlist-info .dlab { color: #FF9494; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; }
.playlist-info .dname { margin: 6px 0 0; color: #F5F5F5; font-size: clamp(22px,3vw,40px); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
#plTitle.dname { color: #F5F5F5; font-size: clamp(22px,3vw,40px); font-weight: 800; letter-spacing: -.045em; line-height: 1.1; white-space: normal; }
.playlist-meta { margin-top: 6px; font-size: 11.5px; }
.playlist-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.playlist-actions .m-btn { min-width: 96px; }
.playlist-actions #plQueue { min-width: 126px; }
.playlist-actions #plShuffle { min-width: 104px; }
.playlist-backbar #plSyncWrap { display: flex; }
.playlist-backbar #plSyncWrap[hidden] { display: none; }
.playlist-backbar #plSync { color: var(--t2); }
.playlist-backbar #plSync:hover { color: var(--fg); }
.library-list .playlist-track { display: grid; grid-template-columns: 44px 36px minmax(0,1fr) 40px 36px; gap: 8px; height: 56px; min-height: 56px; border-radius: 0; padding: 6px 8px; }
.library-list .playlist-track .cover { width: 44px; height: 44px; border-radius: 0; }
.library-list .playlist-track .cover img { inset: 0; width: 100%; height: 100%; border-radius: 0; }
.library-list .playlist-track .heart { width: 36px; height: 36px; }
.library-list .playlist-track .txt { gap: 3px; }
.library-list .playlist-track .t { color: #F5F5F5; font-size: 13px; font-weight: 600; }
.library-list .playlist-track .a { color: #A0A0A0; font-size: 11.5px; }
.library-list .playlist-track-right { display: contents; }
.library-list .playlist-track .playlist-number { color: #8C8C8C; font-size: 11.5px; text-align: right; }
.library-list .playlist-track .playlist-enqueue { width: 30px; height: 30px; padding: 0; color: #A0A0A0; }
.library-list .playlist-track .playlist-enqueue:hover { color: #FFFFFF; background: rgba(255,255,255,.08); }
.library-list .playlist-track .playlist-subtitle { display: flex; align-items: center; gap: 6px; min-width: 0; color: #A0A0A0; }
.library-list .playlist-track .badge { width: 12px; height: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 12px; border-radius: 50%; color: #FFFFFF; }
.library-list .playlist-track .badge svg { width: 8px; height: 8px; }
.library-list .playlist-track .playlist-artist, .library-list .playlist-track .playlist-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-list .playlist-track .playlist-source { flex: none; }
.library-list .playlist-track.now { background: color-mix(in srgb, var(--cur) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cur) 65%, transparent); }
@media (max-width: 760px) {
  .lib-toolbar { padding: 0 8px; flex-wrap: wrap; }
  .lib-tools { gap: 4px; }
  .library-list { padding-right: 6px; padding-left: 6px; }
  .lrow { grid-template-columns: 48px minmax(0,1fr) auto 36px; column-gap: 8px; padding: 8px 4px; }
  .playlist-page { padding: 4px 10px 0; }
  .playlist-backbar { min-height: 28px; }
  .playlist-backbar #plBack, .playlist-backbar #plSync { height: 28px; }
  .library-list .playlist-track { grid-template-columns: 44px 34px minmax(0,1fr) 30px 34px; gap: 6px; padding: 6px 4px; }
}

#settings { width:min(100%,860px); gap:0; padding:24px 24px 0; }
#settingsHead { min-height:40px; gap:16px; margin-bottom:24px; color:var(--fg); font-size:16px; letter-spacing:-.045em; font-weight:700; } #settingsHead #settingsBack { gap:8px; } #settingsList { padding-bottom:56px; }
.srow { min-height:56px; gap:16px; padding:12px 16px; border:1px solid var(--line); background:#161616; border-radius:0; font-size:12px; letter-spacing:0; } .srow + .srow { margin-top:2px; }
.srow.gap { min-height:28px; padding:0; border:0; background:transparent; } .srow.head { min-height:24px; padding:0 0 10px; margin-top:28px; border:0; background:transparent; color:#E06C6C; font-size:11px; letter-spacing:.6px; text-transform:uppercase; } .srow.head:first-child { margin-top:0; }
.srow.note { min-height:0; padding:8px 0 10px; border:0; background:transparent; color:var(--t3); line-height:1.45; } .srow.choice { min-height:56px; } .srow .k { color:#D7D7D7; } .srow.action .k,.srow.switch .k,.srow.choice .k { color:var(--fg); }
.srow .v,.srow.switch .sv { color:var(--t2); font-size:11.5px; } .srow .act { width:auto; min-width:56px; color:var(--soft); font-size:11px; opacity:0; } .srow.action:hover { background:#1B1B1B; border-color:#333; } .srow.armed { background:rgba(177,66,66,.12); border-color:rgba(177,66,66,.55); }
.srow.armed .k,.srow.danger .k,.srow.danger .act { color:#FF8A8A; } .srow.switch .k { flex:1; } .srow.switch .sv { flex:0 1 45%; text-align:left; } .switch-t { width:42px; height:24px; border:1px solid #3A3A3A; border-radius:0; background:#2D2D2D; }
.switch-t.on { background:var(--accent); border-color:var(--accent); } .switch-t i { top:4px; left:4px; width:14px; height:14px; border-radius:0; background:#E6E6E6; } .switch-t.on i { left:22px; }
.acct { min-height:72px; padding:14px 16px; margin:0; gap:14px; background:#161616; border:1px solid var(--line); border-radius:0; } .acct.on { border-color:color-mix(in srgb,var(--tint) 44%,#242424); background:color-mix(in srgb,var(--tint) 5%,#161616); } .service-mark { width:10px; height:10px; flex:none; }
.acct .ac { gap:4px; } .acct .an { font-size:12px; letter-spacing:-.2px; } .acct .av,.acct .ano { color:var(--t2); font-size:11px; } .acct .m-btn { margin-left:auto; }
.hrow { min-height:42px; gap:12px; padding:4px 0; border-bottom-color:var(--line); font-size:11.5px; } .hrow .service-mark { width:8px; height:8px; } .hrow .hn { width:112px; flex:none; color:#D7D7D7; } .hrow .hw { color:var(--t3); } .hrow .hs { gap:8px; color:var(--t2); } .hrow .hd { width:7px; height:7px; border-radius:0; }
.dd { width:min(300px,48vw); max-width:300px; height:36px; padding:0 10px 0 12px; gap:10px; background:var(--page); border-color:#333; border-radius:0; font-size:12px; } .dd:hover,.dd:focus-visible { background:#111; border-color:#555; } .dd .overlay-icon { color:var(--t3); }
.log-tools { padding:8px 0; gap:6px; } .log-tools .m-btn { font-size:11px; } .logrow { padding:4px 0; font-size:11px; border-bottom:1px solid rgba(255,255,255,.04); }
#menuScrim { z-index:100; background:transparent; } #menu { width:248px; max-width:calc(100vw - 16px); padding:6px; gap:2px; background:#161616; border:1px solid var(--accent); border-radius:4px; box-shadow:0 18px 44px rgba(0,0,0,.85); animation:cmIn .18s var(--ease-out) both; transform-origin:top left; }
#menu .mh { display:flex; align-items:center; gap:10px; min-height:48px; padding:6px 8px 10px; color:var(--fg); font-size:12px; letter-spacing:-.1px; white-space:normal; } #menu .mh .cover { width:36px; height:36px; flex:none; border-radius:0; } #menu .mhd { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
#menu .mht { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--fg); font-size:12px; font-weight:700; } #menu .mha { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--t3); font-size:10.5px; font-weight:400; }
#menu .mi { height:36px; flex:none; gap:12px; padding:0 12px; border-radius:3px; font-size:12px; letter-spacing:0; } #menu .mi:hover { background:rgba(177,66,66,.28); } #menu .mi .overlay-icon { width:14px; height:14px; color:#8C8C8C; } #menu .mi.submenu .overlay-icon:last-child { margin-left:auto; color:#8C8C8C; }
#menu .mi.danger { color:#FF7B7B; } #menu .mi.accent { color:var(--soft); } #menu .msep { height:1px; margin:4px 6px; background:#262626; } #menu input { height:36px; padding:0 12px; background:#0D0D0D; border:1px solid #333; border-radius:0; font-size:12px; }
#menu .mrow { gap:6px; padding:6px 2px 2px; } #menu .mrow .m-btn { flex:1; } .overlay-icon { display:block; flex:none; }
#confirm { background:rgba(0,0,0,.72); backdrop-filter:blur(2px); } #confirm .card { width:min(calc(100% - 32px),420px); padding:24px; gap:22px; background:#141414; border:1px solid var(--accent); box-shadow:0 18px 50px rgba(0,0,0,.72); animation:popIn .2s var(--ease-pop) both; } #confirmText { font-size:14px; letter-spacing:-.2px; line-height:1.5; } #confirm .row { gap:8px; }
.cbtn { width:auto; min-width:104px; height:36px; padding:0 14px; border-color:#333; background:#1A1A1A; font-size:11.5px; font-weight:700; } .cbtn:hover { background:#242424; border-color:#555; } .cbtn.sel { background:var(--accent); border-color:var(--accent); color:#fff; } .cbtn.danger { border-color:rgba(177,66,66,.55); color:#FF8A8A; } .cbtn.danger.sel { background:rgba(177,66,66,.18); border-color:var(--accent); color:#FF8A8A; }
.popup { padding:10px; background:#141414; border:1px solid var(--accent); border-radius:4px; box-shadow:0 18px 44px rgba(0,0,0,.85); animation:popIn .2s var(--ease-pop) both; } #devicePopup { width:280px; max-width:calc(100vw - 24px); } #devicePopup .dv { height:48px; gap:12px; padding:0 12px; border:1px solid transparent; border-radius:0; background:#1A1A1A; font-size:12px; letter-spacing:0; }
#devicePopup .dv + .dv { margin-top:2px; } #devicePopup .dv:hover { background:#222; border-color:#333; } #devicePopup .dv.cur { color:var(--fg); background:rgba(177,66,66,.16); border-color:rgba(177,66,66,.75); } #devicePopup .dv.cur .overlay-icon { color:var(--soft); } #devicePopup .dv:not(.cur) { color:var(--t2); } #devicePopup .overlay-icon { color:#8C8C8C; } #devicePopup .m-btn { width:100%; margin-top:8px; justify-content:flex-start; }
#statsPopup { width:min(340px,calc(100vw - 24px)); max-width:none; padding:16px; gap:8px; border-color:var(--accent); } #statsPopup .sh { gap:10px; color:var(--fg); font-size:12px; } #statsPopup .sh i { width:8px; height:8px; border-radius:0; background:var(--accent); } #statsPopup .hop { color:var(--t3); font-size:11px; }
#statsPopup .sr { display:grid; grid-template-columns:108px minmax(0,1fr); gap:8px; padding:4px 0; border-bottom:1px solid #242424; font-size:11.5px; } #statsPopup .sr span:first-child { width:auto; color:var(--t3); } #statsPopup .sr span:last-child { min-width:0; color:#DDD; overflow-wrap:anywhere; } #statsPopup .m-btn { align-self:flex-start; margin-top:6px; }
.modal { background:rgba(0,0,0,.72); backdrop-filter:blur(2px); } .modal .card { width:min(calc(100vw - 32px),420px); padding:24px; gap:14px; background:#141414; border:1px solid var(--accent); box-shadow:0 18px 50px rgba(0,0,0,.72); animation:popIn .2s var(--ease-pop) both; } .modal .mtitle { font-size:16px; letter-spacing:-.04em; font-weight:700; } .modal .mtext { color:var(--t2); font-size:12px; line-height:1.5; } .modal .field { width:100%; height:42px; padding:0 14px; background:var(--page); border-color:#333; font-size:12px; } .modal .row { justify-content:flex-end; gap:8px; margin-top:8px; }
.dropdown { min-width:180px; max-width:min(300px,calc(100vw - 24px)); padding:4px; gap:2px; background:#141414; border:1px solid var(--accent); border-radius:4px; box-shadow:0 18px 44px rgba(0,0,0,.85); animation:popIn .2s var(--ease-pop) both; } .dropdown div { height:36px; gap:8px; padding:0 12px; font-size:12px; letter-spacing:0; } .dropdown div:hover,.dropdown div.cur { background:rgba(177,66,66,.24); color:var(--fg); }
#tip { padding:7px 10px; background:#141414; border:1px solid var(--accent); border-radius:4px; box-shadow:0 8px 24px rgba(0,0,0,.55); color:#E8E8E8; font-size:11px; letter-spacing:0; }
@keyframes popIn { from { opacity:0; transform:translateY(-6px) scale(.97); } to { opacity:1; transform:none; } } @keyframes cmIn { from { opacity:0; transform:scale(.95); } to { opacity:1; transform:none; } } @keyframes toastIn { from { opacity:0; transform:translate(-50%,8px); } to { opacity:1; transform:translate(-50%,0); } }
#toast { bottom:24px; max-width:calc(100vw - 32px); padding:11px 18px 11px 36px; border:1px solid var(--accent); background:#1C1C1C; box-shadow:0 12px 30px rgba(0,0,0,.5); color:#E8E8E8; font-size:11.5px; letter-spacing:0; text-align:left; } #toast::before { content:""; position:absolute; left:14px; top:50%; width:7px; height:7px; background:var(--accent); transform:translateY(-50%); } #toast.on { animation:toastIO 2.2s var(--ease-out) both; } #toast.on.stick { animation:toastIn .22s var(--ease-out) both; } #toast.error { border-color:var(--urgent); color:#FFB07A; } #toast.error::before { background:var(--urgent); }
#gate .btn,#gate .field { border-radius:0; } #gate .btn.primary,#gate #maroSubmit { background:var(--accent); border-color:var(--accent); color:#fff; } @media(max-width:720px) { #settings { padding:16px 12px 0; } #settingsHead { margin-bottom:16px; } .srow { gap:10px; padding:10px 12px; } .hrow .hn { width:82px; } .srow.switch .sv { display:none; } }

/* == redesign: animations ================================================= */

/* page slide — wsR when the new view is "later" in the order, wsL when earlier */
.wsR { animation: wsR .36s var(--ease-out) both; }
.wsL { animation: wsL .36s var(--ease-out) both; }
@keyframes wsR { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes wsL { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* rows stagger in when a list opens; the class is dropped after the run so a
   virtual list never replays it on scroll or refresh */
.stag > * { animation: rowIn .32s cubic-bezier(.2,0,0,1) backwards; }
.stag > *:nth-child(2) { animation-delay: .025s; }
.stag > *:nth-child(3) { animation-delay: .05s; }
.stag > *:nth-child(4) { animation-delay: .075s; }
.stag > *:nth-child(5) { animation-delay: .1s; }
.stag > *:nth-child(6) { animation-delay: .125s; }
.stag > *:nth-child(7) { animation-delay: .15s; }
.stag > *:nth-child(8) { animation-delay: .175s; }
.stag > *:nth-child(n+9) { animation-delay: .2s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* now-playing text + cover swap on track change (the A/B flip lets the same
   element replay its entrance) */
.swA { animation: swapIn .45s var(--ease-out) both; }
.swB { animation: swapIn2 .45s var(--ease-out) both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes swapIn2 { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.cvA { animation: covIn .55s var(--ease-out) both; }
.cvB { animation: covIn2 .55s var(--ease-out) both; }
@keyframes covIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes covIn2 { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* shuffle pop */
.shufPop { animation: shufPop .45s var(--ease-pop); }
@keyframes shufPop { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(-14deg) scale(1.3); } 100% { transform: none; } }

/* toast in + out; .stick stays until dismissed (long statuses and errors) */
@keyframes toastIO { 0% { opacity: 0; transform: translate(-50%,16px) scale(.96); } 10% { opacity: 1; transform: translate(-50%,0); } 85% { opacity: 1; transform: translate(-50%,0); } 100% { opacity: 0; transform: translate(-50%,8px); } }

/* ok flash on a service that just came back up */
.okflash { animation: okF .8s ease both; }
@keyframes okF { 0% { transform: scale(.6); opacity: 0; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }

/* a ring pulses on the devices button while this PC is playing elsewhere */
#devicesBtn { position: relative; }
.ring { position: absolute; inset: 4px; border: 2px solid #F5F5F5; animation: ring 1.6s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.35); } }

/* the cover breathes — the player's ambient and the jamming covers */
.breath { animation: breath 6s ease-in-out infinite; }
@keyframes breath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.018); } }
#playerAmb, #jamArt, #jamArtLarge { animation: breath 6s ease-in-out infinite; }
/* Still while paused: an endless animation repaints the window every frame. */
body.paused #playerAmb, body.paused #jamArt, body.paused #jamArtLarge, body.paused .breath { animation-play-state: paused; }

/* paused: the eq bars and the lyric gap dots hold still */
.paused .eq i, .paused .gd { animation-play-state: paused !important; }

/* == redesign: titlebar ================================================= */
/* The strip is the title bar: it drags the window (data-tauri-drag-region),
   a double-click toggles maximize, and the three window buttons at the far
   right drive the window through the Tauri window API. */
.wgap { width: 8px; flex: none; }
.wbtn .w-restore { display: none; }
.wbtn.maximized .w-max { display: none; }
.wbtn.maximized .w-restore { display: block; }
.wbtn.wclose:hover { background: #B14242; color: #fff; }
.wbtn.wclose:active { background: #B14242; color: #fff; }

/* The slim bar that stands in for the strip on the gate and settings pages,
   so the window stays draggable and closable while the strip is hidden. */
#dragbar { height: 36px; flex: none; display: flex; align-items: center; justify-content: flex-end; }
#dragbar[hidden] { display: none; }
#dragbar .dragbar-acts { display: flex; align-items: center; gap: 4px; }
body.narrow #strip .wgap { width: 4px; }
#settings { padding-top: 0; }

/* Resize handles on the page edge: 5px on the sides, 8px squares in the corners.
   The window buttons and the strip sit 8px inside the edge, so nothing is covered. */
.rz { position: fixed; z-index: 100; }
body.maxed .rz { display: none; }
.rz-North, .rz-South { left: 8px; right: 8px; height: 5px; cursor: ns-resize; }
.rz-East, .rz-West { top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
.rz-North { top: 0; } .rz-South { bottom: 0; } .rz-East { right: 0; } .rz-West { left: 0; }
.rz-NorthEast, .rz-NorthWest, .rz-SouthEast, .rz-SouthWest { width: 8px; height: 8px; }
.rz-NorthEast { top: 0; right: 0; cursor: nesw-resize; } .rz-SouthWest { bottom: 0; left: 0; cursor: nesw-resize; }
.rz-NorthWest { top: 0; left: 0; cursor: nwse-resize; } .rz-SouthEast { bottom: 0; right: 0; cursor: nwse-resize; }

/* == redesign: animations == */
.jam-heart { display: inline-flex; flex: none; }
.jam-heart .heart { width: 40px; height: 40px; color: #B3B3B3; }
.jam-actions { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* == phone player: slim bar with an arrow to open the full player == */
#playerToggle { display: none; }
body.narrow #playerToggle { display: flex; position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; }
body.narrow #playerToggle svg { transition: transform .25s var(--ease-pop); }
body.narrow #playerToggle.open svg { transform: rotate(180deg); }
body.narrow #side:not(.mini) #npText { padding-right: 34px; }
body.narrow #side.mini { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; align-items: center; column-gap: 6px; padding: 8px 8px 8px 10px; }
body.narrow #side.mini > #np { grid-row: 1; grid-column: 1; min-width: 0; gap: 10px; }
body.narrow #side.mini #npArt.cover.big { width: 44px; height: 44px; box-shadow: none; }
body.narrow #side.mini #npTitle { font-size: 13px; }
body.narrow #side.mini #npMeta, body.narrow #side.mini #npHeart, body.narrow #side.mini #npLoading { display: none !important; }
body.narrow #side.mini > #progress, body.narrow #side.mini > #seekRow, body.narrow #side.mini #vol { display: none !important; }
body.narrow #side.mini > #transportWrap { grid-row: 1; grid-column: 2; width: auto; min-height: 0; }
body.narrow #side.mini #transport { width: auto; gap: 2px; justify-content: flex-end; }
body.narrow #side.mini #bRestart, body.narrow #side.mini #bPrev, body.narrow #side.mini #bShuffle, body.narrow #side.mini #bRepeat { display: none; }
body.narrow #side.mini #transport #bPlay { width: 36px; height: 36px; margin: 0; }
body.narrow #side.mini #playerToggle { position: static; grid-row: 1; grid-column: 3; }

/* == Discover: sections of square tiles (no hero, no carousel) == */
#dPage .shead { font-size: 12px; font-weight: 700; color: #F5F5F5; margin: 22px 0 12px; }
#dPage .shead:first-child { margin-top: 4px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px 16px; }
.dtile { min-width: 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; margin: -8px; transition: background-color .15s; }
.dtile:hover, .dtile:focus-visible { background: #161616; }
.dtile-art { position: relative; aspect-ratio: 1 / 1; margin-bottom: 6px; }
.dtile .dtile-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.dtile .dtile-cover img { border-radius: 0; width: 100%; height: 100%; object-fit: cover; }
.dtile.on .dtile-art { outline: 1px solid var(--accent); }
.dtile-play { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border: 0; cursor: pointer;
  opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .22s var(--ease-pop), background-color .15s; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.dtile:hover .dtile-play, .dtile:focus-visible .dtile-play, .dtile.on .dtile-play { opacity: 1; transform: none; }
.dtile-play:hover { background: #C45454; }
.dtile-name { font-size: 12.5px; font-weight: 700; color: #F5F5F5; }
.dtile-meta { font-size: 11px; color: #8C8C8C; }
.dtile-svc { font-weight: 700; }
body.narrow .dgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 10px; }
body.narrow .dtile-meta { display: none; }
body.narrow .dtile-name { font-size: 11.5px; }

/* The tab row on narrow windows: fade the edge where more tabs are hidden. */
body.narrow .tabs.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
body.narrow .tabs.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
body.narrow .tabs.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

/* The phone-width header for playlist, artist and album pages (round 1, item 3):
   back row, a 64 px cover beside the kind label, the name (one line) and one
   meta line, then ONE full-width row: Play (filled) and Shuffle (outlined), each
   flex 1, and a 36 px square Add to queue. */
@media (max-width:760px) {
  .playlist-hero, .dhead { display: grid; grid-template-columns: 64px minmax(0,1fr); grid-template-rows: auto auto auto; align-items: center; column-gap: 12px; row-gap: 0; margin: 8px 0 12px; }
  .dcov, .playlist-cover.cover.big, body.narrow .playlist-cover.cover.big { grid-column: 1; grid-row: 1 / span 3; align-self: center; width: 64px; height: 64px; flex: 0 0 64px; box-shadow: none; }
  body.narrow .dcov > .detail-cover-img { width: 100%; height: 100%; }
  .playlist-info, .detail-info { display: contents; }
  .playlist-info .dlab, .detail-info .dlab { display: block; grid-column: 2; grid-row: 1; align-self: end; color: #E5323F; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; line-height: 1.3; }
  .playlist-info .dname, #plTitle.dname, .detail-info .dname { grid-column: 2; grid-row: 2; margin: 2px 0 0; color: #F5F5F5; font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .playlist-meta, .detail-info > .detail-meta, .detail-metas { grid-column: 2; grid-row: 3; align-self: start; margin: 3px 0 0; color: #8C8C8C; font-size: 11.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .detail-metas { display: flex; flex-direction: row; gap: 0; min-width: 0; }
  .detail-metas .detail-meta { margin: 0; flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8C8C8C; }
  .detail-metas .detail-meta + .detail-meta { flex: 1 1 auto; max-width: none; }
  .detail-metas .detail-meta + .detail-meta::before { content: "\00a0\00b7\00a0"; }
  .playlist-actions, .detail-info .detail-actions { grid-column: 1 / -1; grid-row: 4; display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; }
  .playlist-actions .m-btn, .detail-actions .m-btn { height: 36px; min-width: 0; padding: 0 12px; gap: 8px; font-size: 12px; }
  #plPlayAll, #plShuffle, #artistPlay, #artistShuffle, #albumPlay, #albumShuffle { flex: 1 1 0; }
  #plShuffle, #artistShuffle, #albumShuffle, #plQueue, #artistQueue, #albumQueue { background: #161616; border-color: #2A2A2A; color: #F5F5F5; }
  #plShuffle:hover, #artistShuffle:hover, #albumShuffle:hover, #plQueue:hover, #artistQueue:hover, #albumQueue:hover { background: #222; border-color: #3A3A3A; }
  .playlist-actions #plQueue, .playlist-actions #plShuffle { min-width: 0; }
  #plQueue, #artistQueue, #albumQueue { flex: 0 0 36px; width: 36px; padding: 0; }
  #plQueue span, #artistQueue span, #albumQueue span { display: none; }
  #plQueue svg, #artistQueue svg, #albumQueue svg { width: 16px; height: 16px; }
}
.jam-artist-link { cursor: pointer; }
.jam-artist-link:hover { text-decoration: underline; text-underline-offset: 2px; }
/* -- listen together: the Friends tab, the jam strip, the line by the player -- */
.tg-page { flex: 1; min-height: 0; padding-bottom: 16px; }
.tg-head { margin: 20px 0 4px; padding: 0 8px; }
.tg-search { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.tg-search .field { flex: 1; min-width: 0; height: 36px; font-size: 12.5px; }
.tg-found { margin-top: 4px; }
.tg-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; transition: background-color .15s; }
.tg-row:hover { background: #1A1A1A; }
.tg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tg-name { overflow: hidden; color: #F5F5F5; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tg-sub { overflow: hidden; color: #A0A0A0; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.tg-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.tg-dim { padding: 0 6px; color: #8C8C8C; font-size: 11.5px; }
/* "Waiting": the name and what waits on one line. */
.tg-line { min-height: 44px; }
.tg-line .tg-text { flex-direction: row; align-items: baseline; gap: 6px; }
.tg-line .tg-name { flex: none; max-width: 50%; }
.tg-line .tg-sub { flex: 1; min-width: 0; }
.tg-joinrow .tg-sub { letter-spacing: .5px; }
.tg-more { width: 32px; height: 32px; color: #8C8C8C; }
/* A friend's ⋯ is for touch; with a mouse it is the row's right click, as on songs. */
@media (hover: hover) { .tg-friend .tg-more { display: none; } }
.tg-jam { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 8px 8px 8px 12px; background: rgba(177,66,66,.10); border: 1px solid rgba(177,66,66,.55); }
.tg-jam .tg-more { color: var(--soft); }
.tg-note { padding: 12px 8px 4px; color: #8C8C8C; font-size: 11.5px; }
.tg-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 0; }
.tg-empty .tg-note { padding: 0; }
.tg-signin { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; }
.tg-signin .empty { padding: 0; }
.tg-bar { width: 100%; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; background: rgba(177,66,66,.14); border: 1px solid rgba(177,66,66,.55); color: var(--soft); font-size: 11.5px; font-weight: 700; text-align: left; cursor: pointer; transition: background-color .15s; }
.tg-bar:hover { background: rgba(177,66,66,.24); }
.tg-bar span { flex: 1; min-width: 0; }
#tgStart { position: relative; top: auto; right: auto; flex: none; width: 32px; height: 32px; }
#tgStart.on { color: var(--soft); }
.qrow .qsub:has(.qby) .qartists { flex: 0 1 auto; min-width: 3ch; }
.qrow .qby { flex: 0 0 auto; min-width: 0; max-width: 75%; overflow: hidden; color: var(--soft); text-overflow: ellipsis; white-space: nowrap; }
body.narrow .tg-jam { flex-wrap: wrap; row-gap: 8px; }
body.narrow .tg-jam .tg-text { flex: 1 0 100%; }
body.narrow .tg-jam .tg-acts { margin-left: auto; }
body.narrow .tg-line .tg-text { flex-direction: column; align-items: stretch; gap: 3px; }
body.narrow .tg-line .tg-name { max-width: none; }
body.narrow .tg-empty { flex-direction: column; align-items: flex-start; }
/* A guest's player: the host decides shuffle, repeat and the queue's order. */
body.tg-guest #bShuffle, body.tg-guest #bRepeat, body.tg-guest #clearQueue, body.tg-guest .qrow .qremove { opacity: .35; pointer-events: none; }
body.tg-locked #bPlay, body.tg-locked #bPrev, body.tg-locked #bNext, body.tg-locked #bRestart, body.tg-locked #seek { opacity: .35; pointer-events: none; }
#toast.acts { cursor: default; }
#toast.acts::before { top: 16px; transform: none; }
#toast .tacts { display: flex; gap: 8px; margin-top: 10px; }
#friendsBtn { position: relative; }
#friendsBtn .tab-badge { position: absolute; top: 3px; right: 3px; margin: 0; min-width: 14px; height: 14px; font-size: 9px; }
.tab-badge { min-width: 16px; height: 16px; margin-left: 6px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; }
