/* ============ Muza design system ============ */
:root {
  --bg: #0b0d12;
  --bg2: #0f1219;
  --surface: #141824;
  --raised: #1b2130;
  --hover: rgba(255, 255, 255, .06);
  --active: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .08);
  --text: #f2f4f8;
  --dim: #9aa3b5;
  --faint: #667085;
  --ac1: #7c3aed;
  --ac2: #ec4899;
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, .16);
  --grad: linear-gradient(120deg, var(--ac1), var(--ac2));
  --danger: #ef4444;
  --ok: #22c55e;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --tb-h: 40px;
  --pb-h: 92px;
  --side-w: 252px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
img { -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.hidden { display: none !important; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .dir-flip { transform: scaleX(-1); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ titlebar ============ */
#titlebar {
  height: var(--tb-h);
  display: flex;
  align-items: stretch;
  background: var(--bg);
  position: relative;
  z-index: 60;
}
.tb-brand { display: flex; align-items: center; gap: 8px; padding-inline: 14px; -webkit-app-region: drag; }
.tb-logo { width: 20px; height: 20px; border-radius: 5px; }
.tb-name { font-weight: 800; font-size: 14px; letter-spacing: .04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-drag { flex: 1; -webkit-app-region: drag; }
.tb-controls { display: flex; direction: ltr; }
.tb-btn { width: 46px; color: var(--dim); display: grid; place-items: center; transition: background .15s var(--ease), color .15s var(--ease); }
.tb-btn svg { width: 12px; height: 12px; fill: none; }
.tb-btn:hover { background: var(--hover); color: var(--text); }
.tb-close:hover { background: #e81123; color: #fff; }

/* ============ layout ============ */
#layout {
  display: flex;
  height: calc(100vh - var(--tb-h) - var(--pb-h));
  padding: 0 8px;
  gap: 8px;
}

/* ============ sidebar ============ */
#sidebar {
  width: var(--side-w);
  flex: none;
  background: var(--bg2);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--dim);
  font-weight: 500;
  font-size: 15px;
  transition: color .18s var(--ease), background .18s var(--ease), transform .1s var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item:active { transform: scale(.98); }
.nav-item.active { color: var(--text); background: var(--active); }
.nav-item.active svg { fill: url(#mzg); }

.side-actions { display: flex; flex-direction: column; gap: 8px; margin-block: 8px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .16s var(--spring), box-shadow .18s var(--ease), filter .18s var(--ease), background .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px) scale(1.02); }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(168, 85, 247, .35); }
.btn-accent:hover { filter: brightness(1.1); box-shadow: 0 8px 26px rgba(168, 85, 247, .5); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--raised); }
.btn-danger { background: rgba(239, 68, 68, .14); color: #ff8383; }
.btn-danger:hover { background: rgba(239, 68, 68, .25); }

.side-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px 8px;
  color: var(--faint);
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
#side-playlists { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding-block-end: 6px; }
.side-pl {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--dim);
  transition: background .15s var(--ease), color .15s var(--ease);
  text-align: start; width: 100%;
}
.side-pl:hover { background: var(--hover); color: var(--text); }
.side-pl.active { color: var(--text); background: var(--active); }
.side-pl .pl-cover { width: 34px; height: 34px; border-radius: 6px; flex: none; object-fit: cover; background: var(--raised); }
.side-pl .pl-cover.liked { background: var(--grad); display: grid; place-items: center; }
.side-pl .pl-cover.liked svg { width: 16px; height: 16px; fill: #fff; }
.side-pl .pl-cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.side-pl .pl-cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.side-pl-meta { min-width: 0; }
.side-pl-name { font-size: 14px; font-weight: 500; }
.side-pl-count { font-size: 12px; color: var(--faint); }
.side-empty { color: var(--faint); font-size: 13px; padding: 8px 12px; line-height: 1.5; }

.cloud-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-block-start: 4px;
  border-radius: 999px; background: var(--surface);
  color: var(--dim); font-size: 12.5px;
  transition: background .18s var(--ease);
}
.cloud-pill:hover { background: var(--raised); }
.cloud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); transition: background .3s, box-shadow .3s; }
.cloud-pill.off .cloud-dot { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

/* ============ main / topbar ============ */
#main {
  flex: 1; min-width: 0;
  background: linear-gradient(180deg, var(--bg2), var(--bg) 320px);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  position: relative;
}
#topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  position: sticky; top: 0; z-index: 10;
}
.nav-arrows { display: flex; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--dim);
  transition: background .15s var(--ease), color .15s var(--ease), transform .12s var(--spring);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); transform: scale(1.08); }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn:disabled { opacity: .3; cursor: default; }
/* waiting on the network: a search result has to reach the shared library
   before a heart or a menu on it means anything */
.icon-btn.busy { opacity: .45; pointer-events: none; }

#searchbox {
  /* min-width:0 lets the search field give up room at narrow widths, so the
     action buttons on the other side never get pushed off the bar */
  flex: 1; max-width: 460px; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  height: 44px;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
#searchbox svg { width: 19px; height: 19px; fill: var(--faint); transition: fill .2s; }
#searchbox:focus-within { background: var(--raised); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#searchbox:focus-within svg { fill: var(--accent); }
#search-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14.5px; color: var(--text); }
#search-input::placeholder { color: var(--faint); }
#searchbox .icon-btn { width: 28px; height: 28px; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.pill-btn {
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); color: var(--dim);
  font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
  transition: background .18s, color .18s, transform .12s var(--spring);
}
.pill-btn:hover { background: var(--raised); color: var(--text); transform: scale(1.04); }
/* update chip in the top bar */
/* Always present, so "is there an update?" is never a question you have to go
   looking for an answer to. Quiet until there is something to say. */
.update-btn {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  min-width: 34px; min-height: 34px;
  justify-content: center;
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid transparent;
  color: var(--dim);
  font-weight: 700; font-size: 12.5px;
  white-space: nowrap;
  transition: transform .16s var(--spring), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.update-btn:hover { color: var(--text); background: var(--hover); }
.update-btn svg { width: 17px; height: 17px; }
.update-btn.has-update {
  padding-inline: 14px;
  background: var(--accent-soft);
  border-color: rgba(168, 85, 247, .45);
  color: var(--accent);
  animation: chipIn .4s var(--spring);
}
.update-btn.has-update:hover { transform: scale(1.05); background: rgba(168, 85, 247, .26); }
.update-btn.has-update svg { width: 15px; height: 15px; }
.update-btn.is-ready {
  background: rgba(34, 197, 94, .16);
  border-color: rgba(34, 197, 94, .5);
  color: var(--ok);
}
.update-dot {
  position: absolute; inset-block-start: 3px; inset-inline-end: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ac2);
  box-shadow: 0 0 0 2px var(--bg2);
  animation: updDot 1.9s var(--ease) infinite;
}
@keyframes updDot { 0%, 100% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 0 rgba(236, 72, 153, .55); } 60% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 7px rgba(236, 72, 153, 0); } }

.update-hero { display: flex; align-items: center; gap: 14px; }
.update-hero-badge {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 15px;
  background: var(--grad);
  color: #fff;
}
.update-hero-badge svg { width: 26px; height: 26px; }
.update-hero-title { font-size: 19px; font-weight: 800; }
.update-hero-sub { font-size: 13px; color: var(--faint); margin-block-start: 2px; }
.update-notes { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow-y: auto; }
.update-note { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--dim); line-height: 1.5; }
.update-note svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-block-start: 2px; }
@keyframes chipIn { from { opacity: 0; transform: translateY(-6px) scale(.9); } }
.update-spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, .3);
  border-block-start-color: var(--accent);
  animation: spin .8s linear infinite;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: 13.5px;
}
[dir="rtl"] .user-chip { padding: 4px 4px 4px 12px; }
#user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
}

/* ============ view ============ */
#view { flex: 1; overflow-y: auto; padding: 6px 26px 40px; outline: none; }
.view-enter { animation: viewIn .34s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.h1 { font-size: 30px; font-weight: 800; margin-block: 10px 4px; }
.h2 { font-size: 20px; font-weight: 700; margin-block: 26px 14px; display: flex; align-items: baseline; justify-content: space-between; }
.h2 .see-all { font-size: 13px; color: var(--faint); font-weight: 600; cursor: pointer; transition: color .15s; }
.h2 .see-all:hover { color: var(--text); text-decoration: underline; }
.sub { color: var(--dim); font-size: 14.5px; line-height: 1.6; }

/* greeting gradient */
.greet { font-size: 32px; font-weight: 800; margin-block: 14px 20px; background: linear-gradient(100deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* quick grid (home top) */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.quick-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--r-md);
  overflow: hidden; height: 64px;
  transition: background .18s var(--ease), transform .18s var(--spring);
  position: relative;
  text-align: start;
}
.quick-tile:hover { background: var(--raised); transform: translateY(-2px); }
.quick-tile .qt-img { width: 64px; height: 64px; object-fit: cover; flex: none; background: var(--raised); }
.quick-tile .qt-img.liked { background: var(--grad); display: grid; place-items: center; }
.quick-tile .qt-img.liked svg { fill: #fff; }
.quick-tile .qt-name { font-weight: 700; font-size: 14.5px; min-width: 0; }
.quick-tile .qt-play {
  position: absolute; inset-inline-end: 10px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(6px) scale(.8);
  transition: opacity .2s var(--ease), transform .2s var(--spring);
  box-shadow: 0 6px 18px rgba(168, 85, 247, .5);
}
.quick-tile:hover .qt-play { opacity: 1; transform: none; }
.qt-play svg { width: 18px; height: 18px; }
[dir="rtl"] .qt-play svg { transform: scaleX(-1); }

/* cards row */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 12px;
  transition: background .2s var(--ease), transform .2s var(--spring);
  position: relative;
  text-align: start;
}
.card:hover { background: var(--raised); transform: translateY(-4px); }
.card-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); background: var(--raised); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.card-art.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; aspect-ratio: 1; border-radius: var(--r-md); }
.card-art.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.card-art.liked-art { display: grid; place-items: center; background: var(--grad); aspect-ratio: 1; border-radius: var(--r-md); }
.card-art.liked-art svg { width: 42%; height: 42%; fill: #fff; }
.card-title { font-weight: 700; margin-block-start: 10px; font-size: 14.5px; }
.card-sub { color: var(--faint); font-size: 13px; margin-block-start: 3px; min-height: 1.2em; }
.card-play {
  position: absolute;
  inset-inline-end: 20px;
  bottom: 74px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(10px) scale(.8);
  transition: opacity .22s var(--ease), transform .22s var(--spring);
  box-shadow: 0 8px 22px rgba(168, 85, 247, .55);
}
.card:hover .card-play { opacity: 1; transform: none; }
.card-play:hover { filter: brightness(1.12); }
.card-play svg { width: 20px; height: 20px; }
[dir="rtl"] .card-play svg { transform: scaleX(-1); }

/* ============ song rows ============ */
.songlist { display: flex; flex-direction: column; }
.songlist-head {
  display: grid;
  grid-template-columns: 34px 52px 1fr 110px 136px;
  gap: 14px; align-items: center;
  padding: 6px 14px;
  color: var(--faint); font-size: 12.5px; font-weight: 600;
  border-block-end: 1px solid var(--border);
  margin-block-end: 6px;
}
.song-row {
  display: grid;
  grid-template-columns: 34px 52px 1fr 110px 136px;
  gap: 14px; align-items: center;
  padding: 7px 14px;
  border-radius: var(--r-md);
  transition: background .14s var(--ease);
  position: relative;
}
.view-enter .song-row { animation: rowIn .3s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Only a playlist has anything to say about when a song was added, so anywhere
   else that column collapses and the title gets the room back rather than
   sitting next to 110px of nothing. */
.songlist-head.no-added, .song-row.no-added { grid-template-columns: 34px 52px 1fr 136px; }
.song-row.no-added .sr-added, .songlist-head.no-added .sh-added { display: none; }

.song-row:hover { background: var(--hover); }
.song-row.playing .sr-title { color: var(--accent); }
.sr-idx { color: var(--faint); font-size: 13.5px; text-align: center; position: relative; }
.sr-idx .idx-play { display: none; width: 100%; height: 100%; color: var(--text); }
.sr-idx .idx-play svg { width: 16px; height: 16px; }
[dir="rtl"] .sr-idx .idx-play svg { transform: scaleX(-1); }
.song-row:hover .idx-num { display: none; }
.song-row:hover .idx-play { display: grid; place-items: center; }
.song-row:hover .eq { display: none; }

.eq { display: inline-flex; gap: 2.5px; align-items: flex-end; height: 16px; }
.eq i { width: 3.5px; background: var(--accent); border-radius: 2px; animation: eqb 1s ease-in-out infinite; }
.eq i:nth-child(1) { animation-delay: -.4s; }
.eq i:nth-child(2) { animation-delay: -.1s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
.eq.paused i { animation-play-state: paused; height: 5px !important; }
@keyframes eqb { 0%, 100% { height: 4px; } 50% { height: 15px; } }

.sr-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--raised); }
.sr-main { min-width: 0; }
.sr-title { font-weight: 600; font-size: 14.5px; }
.sr-artist { color: var(--dim); font-size: 13px; margin-block-start: 2px; }
.sr-added { color: var(--faint); font-size: 12.5px; }
.sr-end { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--faint); font-size: 13px; }
.sr-end .icon-btn { width: 30px; height: 30px; opacity: 0; transition: opacity .15s; }
.song-row:hover .sr-end .icon-btn, .sr-end .icon-btn.liked { opacity: 1; }
.sr-end .icon-btn svg { width: 17px; height: 17px; }
.sr-dur { min-width: 34px; text-align: end; }

.like-btn .heart-line { fill: none; stroke: currentColor; stroke-width: 1.8; transition: fill .2s, stroke .2s; }
.like-btn.liked { color: var(--ac2); }
.like-btn.liked .heart-line { fill: var(--ac2); stroke: var(--ac2); }
.like-btn.pop svg { animation: heartPop .4s var(--spring); }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ============ playlist header ============ */
.pl-hero { display: flex; gap: 22px; align-items: flex-end; padding-block: 18px 22px; }
.pl-hero-art { width: 190px; height: 190px; border-radius: var(--r-lg); object-fit: cover; box-shadow: var(--shadow); background: var(--raised); flex: none; }
.pl-hero-art.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.pl-hero-art.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.pl-hero-art.liked-art { display: grid; place-items: center; background: var(--grad); }
.pl-hero-art.liked-art svg { width: 80px; height: 80px; fill: #fff; }
.pl-hero-meta { min-width: 0; }
.pl-kicker { font-size: 12.5px; font-weight: 700; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.pl-title { font-size: 42px; font-weight: 800; line-height: 1.1; margin-block: 8px; cursor: text; border-radius: 8px; padding: 2px 6px; margin-inline-start: -6px; }
.pl-title[contenteditable="true"]:hover, .pl-title[contenteditable="true"]:focus { background: var(--hover); outline: none; }
.pl-stats { color: var(--dim); font-size: 14px; }
.pl-actions { display: flex; align-items: center; gap: 10px; margin-block: 6px 16px; }
.big-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(168, 85, 247, .45);
  transition: transform .18s var(--spring), filter .18s;
}
.big-play:hover { transform: scale(1.07); filter: brightness(1.1); }
.big-play:active { transform: scale(.96); }
.big-play svg { width: 24px; height: 24px; }
[dir="rtl"] .big-play svg { transform: scaleX(-1); }

/* ============ empty states ============ */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 60px 20px; gap: 8px;
}
.empty-emoji { font-size: 54px; animation: bounceIn .6s var(--spring); }
@keyframes bounceIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.empty h2 { font-size: 24px; font-weight: 800; }
.empty p { color: var(--dim); max-width: 440px; line-height: 1.65; }
.empty .btn { margin-block-start: 14px; }

/* hero card for empty home */
.hero-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(236, 72, 153, .18)), var(--surface);
  border: 1px solid rgba(168, 85, 247, .3);
  border-radius: 20px;
  padding: 40px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  margin-block: 16px;
  overflow: hidden; position: relative;
}
.hero-card h2 { font-size: 26px; font-weight: 800; }
.hero-card p { color: var(--dim); max-width: 520px; line-height: 1.65; }
.hero-bars { position: absolute; inset-inline-end: 30px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; align-items: center; opacity: .5; }
.hero-bars i { width: 9px; border-radius: 5px; background: var(--grad); animation: eqb2 1.4s ease-in-out infinite; }
.hero-bars i:nth-child(1) { height: 24px; animation-delay: -.2s; }
.hero-bars i:nth-child(2) { height: 48px; animation-delay: -.6s; }
.hero-bars i:nth-child(3) { height: 72px; animation-delay: -1s; }
.hero-bars i:nth-child(4) { height: 48px; animation-delay: -.4s; }
.hero-bars i:nth-child(5) { height: 24px; animation-delay: -.8s; }
@keyframes eqb2 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.5); } }

/* ============ player bar ============ */
#playerbar {
  height: var(--pb-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--bg);
}
#playerbar.pb-empty .pb-song, #playerbar.pb-empty .pb-center, #playerbar.pb-empty .pb-right { opacity: .35; pointer-events: none; }
/* before anything has played there is no artwork, and an empty <img> renders as
   a pale box in the corner - show the placeholder tile instead */
#playerbar.pb-empty #pb-thumb { visibility: hidden; }
#playerbar.pb-empty #pb-thumb-wrap { background: var(--raised); border-radius: 8px; }
.pb-song { display: flex; align-items: center; gap: 12px; min-width: 0; }
#pb-thumb-wrap { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; position: relative; flex: none; cursor: pointer; background: var(--surface); }
#pb-thumb { width: 100%; height: 100%; object-fit: cover; }
.pb-thumb-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity .18s;
  color: #fff;
}
#pb-thumb-wrap:hover .pb-thumb-overlay { opacity: 1; }
.pb-thumb-overlay svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.pb-meta { min-width: 0; }
#pb-title { font-weight: 600; font-size: 14px; cursor: pointer; }
#pb-title:hover { text-decoration: underline; }
#pb-artist { color: var(--dim); font-size: 12.5px; margin-block-start: 2px; }

.pb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(560px, 42vw); }
.pb-buttons { display: flex; align-items: center; gap: 6px; }
.play-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: #0b0d12;
  display: grid; place-items: center;
  margin-inline: 6px;
  transition: transform .16s var(--spring), background .2s;
}
.play-btn:hover { transform: scale(1.08); background: var(--accent); color: #fff; }
.play-btn:active { transform: scale(.94); }
.play-btn svg { width: 20px; height: 20px; }
[dir="rtl"] .play-btn #pb-play-ic { transform: scaleX(-1); }
.mode-btn { position: relative; }
.mode-btn.on { color: var(--accent); }
.mode-btn.on::after {
  content: ''; position: absolute; bottom: 2px; inset-inline-start: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
[dir="rtl"] .mode-btn.on::after { transform: translateX(50%); }
.rep-one {
  position: absolute; top: 3px; inset-inline-end: 3px;
  font-size: 9px; font-weight: 800; color: var(--accent);
  opacity: 0;
}
.mode-btn.one .rep-one { opacity: 1; }

.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.pb-time { font-size: 11.5px; color: var(--faint); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }

.slider { position: relative; height: 4px; border-radius: 3px; background: rgba(255,255,255,.14); flex: 1; cursor: pointer; }
.slider::before { content: ''; position: absolute; inset: -7px 0; }
.slider-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0%; border-radius: 3px; background: #fff; transition: background .2s; }
.slider:hover .slider-fill, .slider.drag .slider-fill { background: var(--grad); }
.slider-thumb {
  position: absolute; top: 50%; inset-inline-start: 0%;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%) scale(0);
  transition: transform .15s var(--spring);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  pointer-events: none;
}
[dir="rtl"] .slider-thumb { transform: translate(50%, -50%) scale(0); }
.slider:hover .slider-thumb, .slider.drag .slider-thumb { transform: translate(-50%, -50%) scale(1); }
[dir="rtl"] .slider:hover .slider-thumb, [dir="rtl"] .slider.drag .slider-thumb { transform: translate(50%, -50%) scale(1); }

.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.slider.vol { width: 92px; flex: none; }

/* ============ queue panel ============ */
#queue-panel {
  position: fixed;
  inset-block: calc(var(--tb-h) + 8px) calc(var(--pb-h) + 8px);
  inset-inline-end: 8px;
  width: 330px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  z-index: 40;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  animation: qIn .28s var(--ease);
  --qin-x: 30px;
}
[dir="rtl"] #queue-panel { --qin-x: -30px; }
@keyframes qIn { from { opacity: 0; transform: translateX(var(--qin-x, 30px)); } to { opacity: 1; transform: none; } }
#queue-panel.closing { animation: qOut .2s var(--ease) forwards; }
@keyframes qOut { to { opacity: 0; transform: translateX(var(--qin-x, 30px)); } }
.qp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.qp-head h3 { font-size: 17px; font-weight: 800; }
#queue-list { flex: 1; overflow-y: auto; padding: 0 10px 14px; }
.q-section { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 12px 8px 6px; }
.q-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--r-sm);
  transition: background .14s;
  cursor: pointer;
}
.q-row:hover { background: var(--hover); }
.q-row img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.q-row .q-meta { min-width: 0; flex: 1; }
.q-row .q-title { font-size: 13.5px; font-weight: 600; }
.q-row .q-artist { font-size: 12px; color: var(--faint); }
.q-row.q-now .q-title { color: var(--accent); }
.q-row .q-dur { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.q-row .q-x {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--faint); opacity: 0;
  transition: opacity .14s, color .14s, background .14s;
}
.q-row .q-x svg { width: 14px; height: 14px; }
.q-row:hover .q-x { opacity: 1; }
.q-row .q-x:hover { color: var(--text); background: var(--active); }
.q-grip { color: var(--faint); opacity: 0; cursor: grab; transition: opacity .14s; }
.q-grip svg { width: 14px; height: 14px; }
.q-row:hover .q-grip { opacity: .8; }
.q-row.dragging { opacity: .4; }
.q-row.drag-over-top { box-shadow: inset 0 2px 0 var(--accent); }
.q-row.drag-over-bot { box-shadow: inset 0 -2px 0 var(--accent); }
.q-section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.q-auto-hint { font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: none; letter-spacing: 0; }
.q-row.q-auto .q-title { color: var(--dim); }
.q-clear {
  font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: none; letter-spacing: 0;
  padding: 3px 8px; border-radius: 20px;
  transition: color .15s, background .15s;
}
.q-clear:hover { color: var(--text); background: var(--hover); }

/* ============ notifications ============ */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; inset-block-start: 2px; inset-inline-end: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--ac2); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--bg2);
  animation: badgePop .3s var(--spring);
}
@keyframes badgePop { from { transform: scale(0); } to { transform: none; } }

#notif-panel {
  position: fixed;
  inset-block-start: calc(var(--tb-h) + 56px);
  inset-inline-end: 14px;
  width: 350px;
  max-height: min(560px, calc(100vh - var(--tb-h) - var(--pb-h) - 80px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  z-index: 60;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  animation: notifIn .24s var(--ease);
}
@keyframes notifIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
#notif-panel.closing { animation: notifOut .18s var(--ease) forwards; }
@keyframes notifOut { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
/* the title carries the panel; the two actions are icons so the row can breathe */
.notif-head {
  display: flex; align-items: center; gap: 4px;
  padding: 15px 14px 8px 16px;
}
.notif-head h3 { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; }
.notif-head .icon-btn { width: 32px; height: 32px; }
.notif-head .icon-btn svg { width: 17px; height: 17px; }
#notif-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.notif {
  width: 100%;
  display: flex; align-items: center; gap: 11px; text-align: start;
  padding: 9px 8px; border-radius: var(--r-sm);
  transition: background .14s;
}
.notif:hover { background: var(--hover); }
.notif img, .notif-ph { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.notif-ph { display: grid; place-items: center; background: var(--raised); color: var(--faint); }
.notif-ph.notif-report { background: rgba(239, 68, 68, .16); color: var(--danger); }
.notif-meta { min-width: 0; flex: 1; }
.notif-title { font-size: 13.5px; font-weight: 650; }
.notif-sub { font-size: 12.5px; color: var(--dim); }
.notif-when { font-size: 11px; color: var(--faint); margin-block-start: 2px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notif.unread { background: var(--accent-soft); }

/* ============ jam ============ */
#jam-bar { margin: 0 26px 4px; }
.jam-bar-inner {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 13px;
  background: linear-gradient(100deg, rgba(124, 58, 237, .28), rgba(236, 72, 153, .18));
  border: 1px solid rgba(168, 85, 247, .38);
  border-radius: 999px;
  font-size: 13px;
  animation: jamIn .3s var(--spring);
}
@keyframes jamIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.jam-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none;
  animation: jamPulse 1.8s var(--ease) infinite;
}
@keyframes jamPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 60% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.jam-label { font-weight: 650; }
.jam-code {
  font-family: 'Segoe UI Mono', ui-monospace, monospace;
  font-weight: 800; letter-spacing: .16em;
  padding: 3px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .3);
  transition: background .15s, transform .15s;
}
.jam-code:hover { background: rgba(0, 0, 0, .5); transform: translateY(-1px); }
.jam-people {
  display: flex; align-items: center; gap: 4px;
  color: var(--dim); font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  transition: color .15s, background .15s;
}
.jam-people svg { width: 16px; height: 16px; }
.jam-people:hover { color: var(--text); background: rgba(0, 0, 0, .28); }
.jam-btn {
  margin-inline-start: auto;
  padding: 4px 12px; border-radius: 20px;
  font-size: 12.5px; font-weight: 700;
  background: rgba(0, 0, 0, .28);
  transition: background .15s, color .15s;
}
.jam-btn:hover { background: rgba(0, 0, 0, .5); }

.jam-people-pop {
  position: fixed; z-index: 200;
  min-width: 200px; padding: 6px 8px 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  animation: menuIn .16s var(--ease);
}
.jam-person { display: flex; align-items: center; gap: 9px; padding: 6px 6px; font-size: 13.5px; }
.jam-avatar {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 800;
}
.jam-host-tag {
  margin-inline-start: auto; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
}

.jam-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 6px 4px; }
.jam-card {
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
  min-height: 148px;
  padding: 16px 14px; text-align: start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .18s, transform .18s, background .18s;
}
button.jam-card:hover { border-color: var(--accent); background: var(--raised); transform: translateY(-2px); }
.jam-card svg { width: 26px; height: 26px; color: var(--accent); }
.jam-card strong { font-size: 15px; }
.jam-card span { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.jam-card .input-row { margin-block-start: auto; padding-block-start: 8px; }
.jam-input { text-align: center; letter-spacing: .3em; font-weight: 800; text-transform: uppercase; }
body.jamming #view { padding-block-start: 4px; }

/* ============ list filter ============ */
.filter-box {
  display: flex; align-items: center; gap: 8px;
  max-width: 340px;
  margin-block: 4px 12px;
  padding: 7px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .18s, background .18s;
}
.filter-box:focus-within { border-color: var(--accent); background: var(--surface); }
.filter-box svg { width: 17px; height: 17px; color: var(--faint); }
.filter-input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13.5px; }
.filter-input::placeholder { color: var(--faint); }
.filter-clear { display: grid; place-items: center; color: var(--faint); transition: color .15s; }
.filter-clear svg { width: 14px; height: 14px; }
.filter-clear:hover { color: var(--text); }

/* ============ recommendations under a playlist ============ */
.h2-sub { font-size: 12.5px; font-weight: 600; color: var(--faint); }
/* the line that matched, under the song it belongs to */
.sr-lyric { font-size: 12px; color: var(--accent); font-style: italic; margin-block-start: 2px; opacity: .9; }
.rec-strip { margin-block-start: 14px; }
/* four suggestions want to sit on one line whenever the window allows it */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 10px; }
.rec-card {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: background .18s, border-color .18s, opacity .22s var(--ease), transform .22s var(--ease);
  animation: recIn .3s var(--ease);
}
@keyframes recIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rec-card:hover { background: var(--surface); border-color: rgba(255,255,255,.16); }
.rec-card.rec-out { opacity: 0; transform: scale(.94); }
.rec-card img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.rec-meta { min-width: 0; flex: 1; }
.rec-title { font-size: 13.5px; font-weight: 650; }
.rec-artist { font-size: 12px; color: var(--faint); }
.rec-preview, .rec-add {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  transition: transform .16s var(--spring), background .16s, color .16s;
}
.rec-preview { color: var(--dim); opacity: 0; }
.rec-card:hover .rec-preview { opacity: 1; }
.rec-preview:hover { color: var(--text); background: var(--active); }
.rec-preview svg, .rec-add svg { width: 16px; height: 16px; }
.rec-add { background: var(--accent-soft); color: var(--accent); }
.rec-add:hover { background: var(--accent); color: #fff; transform: scale(1.12); }
.rec-add.busy { animation: recSpin .8s linear infinite; }
@keyframes recSpin { to { transform: rotate(360deg); } }

/* ============ following ============ */
.follow-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700;
  border: 1.5px solid var(--border);
  color: var(--dim);
  transition: border-color .18s, color .18s, background .18s, transform .15s;
}
.follow-btn svg { width: 16px; height: 16px; }
.follow-btn:hover { color: var(--text); border-color: var(--text); transform: scale(1.03); }
.follow-btn.following { color: #fff; background: var(--accent); border-color: var(--accent); }
.follow-btn.following:hover { background: #b96bff; border-color: #b96bff; }
.follow-chip {
  margin-block-start: 6px;
  align-self: center;
  cursor: pointer;
  padding: 3px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
  transition: background .15s, color .15s;
}
.follow-chip:hover { background: var(--danger); color: #fff; }

.hidden-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hidden-chip {
  display: flex; align-items: center; gap: 6px;
  max-width: 280px;
  padding: 6px 8px 6px 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px; color: var(--dim);
}
.hidden-chip button { display: grid; place-items: center; color: var(--faint); transition: color .15s; }
.hidden-chip button svg { width: 13px; height: 13px; }
.hidden-chip button:hover { color: var(--danger); }

/* ============ admins & reports ============ */
.set-nav-badge {
  margin-inline-start: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--ac2); color: #fff;
  font-size: 11px; font-weight: 800;
  border-radius: 10px;
}

.admin-list { display: flex; flex-direction: column; gap: 6px; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.admin-avatar {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 13px; font-weight: 800;
}
.admin-email { flex: 1; min-width: 0; direction: ltr; text-align: start; font-size: 13.5px; }
.admin-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px; border-radius: 20px;
}

.reason-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 8px; }
.reason-card {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; text-align: start;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px; line-height: 1.3;
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
.reason-card svg { width: 17px; height: 17px; color: var(--faint); transition: color .16s; }
.reason-card:hover { background: var(--surface); border-color: rgba(255, 255, 255, .2); }
.reason-card.on { border-color: var(--danger); background: rgba(239, 68, 68, .1); }
.reason-card.on svg { color: var(--danger); }
.reason-grid.shake { animation: shake .38s var(--ease); }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.report-card {
  padding: 12px 14px;
  margin-block-end: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--danger);
  border-radius: var(--r-md);
}
.report-card.handled { border-inline-start-color: var(--ok); opacity: .62; }
.report-head { display: flex; align-items: center; gap: 10px; }
.report-head img { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; flex: none; background: var(--raised); }
.report-meta { min-width: 0; flex: 1; }
.report-title { font-size: 14px; font-weight: 650; }
.report-artist { font-size: 12.5px; color: var(--faint); }
.report-badge {
  flex: none;
  font-size: 11px; font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, .14);
  padding: 4px 10px; border-radius: 20px;
}
.report-badge.done { color: var(--ok); background: rgba(34, 197, 94, .14); }
.report-note { margin-block-start: 9px; font-size: 13px; color: var(--dim); font-style: italic; }
.report-link {
  margin-block-start: 8px; padding: 6px 10px;
  background: var(--surface); border-radius: var(--r-sm);
  font-size: 11.5px; direction: ltr; text-align: start; color: var(--accent);
}
.report-by { margin-block-start: 8px; font-size: 11.5px; color: var(--faint); }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-block-start: 11px; }
.report-actions .btn { font-size: 12.5px; }
.report-actions svg { width: 15px; height: 15px; }

/* ---- two songs, side by side ----
   Deciding whether a song the app found is the same recording as one that was
   added by hand is a comparison, so the card is built to be compared: the same
   facts in the same order down both columns, and the eye does the rest. */
.clash-card { border-inline-start-color: var(--accent); }
.clash-ic {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px; background: var(--accent-soft); color: var(--accent);
}
.clash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-block-start: 12px;
}
.clash-side {
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.clash-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .04em;
  margin-block-end: 8px;
}
.clash-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 20px;
}
.clash-art {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--r-sm); background: var(--raised);
  margin-block-end: 8px;
}
.clash-title { font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.clash-artist { font-size: 12px; color: var(--dim); margin-block-start: 2px; }
.clash-facts { margin-block-start: 9px; display: grid; gap: 3px; }
.clash-fact { display: flex; gap: 8px; font-size: 11.5px; }
.clash-fact dt { color: var(--faint); flex: none; min-width: 62px; }
.clash-fact dd { color: var(--dim); min-width: 0; }
.clash-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.clash-acts .btn { font-size: 12px; }
.clash-acts svg { width: 14px; height: 14px; }

/* the same warning shape, used before a hand-added song is written down */
.clash-warn {
  display: flex; align-items: center; gap: 9px;
  margin-block-start: 12px; padding: 9px 12px;
  font-size: 12.5px; font-weight: 600;
  color: #ffc46b;
  background: rgba(255, 176, 62, .12);
  border-radius: var(--r-sm);
}
.clash-warn svg { width: 18px; height: 18px; flex: none; }

/* ---- the add-a-song form ---- */
.manual-existing { margin-block-start: 8px; display: grid; gap: 6px; }
.manual-line {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  background: var(--surface); border-radius: var(--r-sm);
}
.manual-line img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--raised); }
.manual-line-meta { min-width: 0; flex: 1; font-size: 13px; }
.manual-line-sub { font-size: 11.5px; color: var(--faint); }
.manual-form { margin-block-start: 4px; }
.manual-form .set-label { display: block; margin-block-end: 6px; }
.manual-thumb-row { display: flex; align-items: center; gap: 10px; }
.manual-thumb-row .text-input { flex: 1; min-width: 0; }
.manual-preview {
  width: 52px; height: 52px; flex: none;
  border-radius: var(--r-sm); object-fit: cover; background: var(--raised);
}
.manual-preview.broken { opacity: .25; }

/* ---- picking who is on the song ---- */
.manual-results { display: grid; gap: 5px; margin-block: 10px; }
.manual-result {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); text-align: start;
  transition: background .14s var(--ease);
}
.manual-result:hover { background: var(--raised); }
.manual-result img, .manual-result .ma-blank { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; }
.manual-result span { flex: 1; min-width: 0; font-size: 13.5px; }
.manual-result svg { width: 17px; height: 17px; color: var(--faint); flex: none; }
.manual-result.added { opacity: .5; cursor: default; }
.manual-result.added svg { color: var(--ok); }

.manual-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 6px; }
.manual-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 4px;
  background: var(--accent-soft); border-radius: 20px;
  font-size: 12.5px; max-width: 100%;
}
[dir="rtl"] .manual-chip { padding: 4px 4px 4px 6px; }
.manual-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.manual-chip > span { min-width: 0; }
.chip-x { display: grid; place-items: center; color: var(--dim); flex: none; }
.chip-x svg { width: 13px; height: 13px; }
.chip-x:hover { color: var(--danger); }

/* ---- the artists, shown but not editable, on the song page ---- */
.manual-artists {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
/* three rows, then it scrolls - so the song's own name and picture never move */
.ma-scroll { max-height: 150px; overflow-y: auto; }
.ma-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  padding-inline-end: 40px;          /* clear of the arrow parked in the corner */
  color: var(--dim); font-size: 13.5px;
  min-height: 50px;
}
.ma-row img, .ma-blank { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--raised); }
.ma-blank { display: grid; place-items: center; color: var(--faint); }
.ma-blank svg { width: 17px; height: 17px; }
.ma-row > span { min-width: 0; }
.ma-more { margin-inline-start: auto; font-size: 12px; color: var(--faint); flex: none; }
.ma-empty { color: var(--faint); font-style: italic; }
.ma-toggle {
  position: absolute; inset-block-start: 12px; inset-inline-end: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--dim);
  background: var(--surface);
}
.ma-toggle:hover { background: var(--raised); color: var(--text); }
.ma-toggle svg { width: 18px; height: 18px; transition: transform .18s var(--ease); }
.manual-artists.open .ma-toggle svg { transform: rotate(180deg); }

@media (max-width: 720px) {
  .clash-grid { grid-template-columns: 1fr; }
}

/* ============ sleep timer + share ============ */
#pb-sleep { position: relative; }
.sleep-left {
  position: absolute; inset-block-end: 1px; inset-inline-end: 0;
  font-size: 9.5px; font-weight: 800;
  color: var(--accent);
  background: var(--bg2);
  border-radius: 6px; padding: 0 3px;
  line-height: 1.4;
}
.share-link {
  font-family: 'Segoe UI Mono', ui-monospace, monospace;
  font-size: 13px;
  direction: ltr;
  text-align: start;
}

/* ============ now playing overlay (leaves the player bar visible) ============ */
#np-overlay {
  position: fixed; inset: 0 0 var(--pb-h) 0; z-index: 55;
  display: flex; align-items: center; justify-content: center;
  animation: npIn .4s var(--ease);
}
@keyframes npIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
#np-overlay.closing { animation: npOut .26s var(--ease) forwards; }
@keyframes npOut { to { opacity: 0; transform: translateY(30px); } }
.np-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(124, 58, 237, .5), transparent 60%),
    radial-gradient(70% 70% at 75% 75%, rgba(236, 72, 153, .4), transparent 60%),
    var(--bg);
  animation: bgFloat 14s ease-in-out infinite alternate;
}
@keyframes bgFloat {
  from { background-position: 0% 0%, 100% 100%, 0 0; filter: hue-rotate(0deg); }
  to { background-position: 30% 20%, 60% 60%, 0 0; filter: hue-rotate(24deg); }
}
.np-close { position: absolute; top: 50px; inset-inline-end: 26px; z-index: 2; background: rgba(255,255,255,.08); }
.np-content { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; max-width: min(80vw, 900px); }
#np-art-wrap { width: min(46vh, 480px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); position: relative; }
#np-art { width: 100%; height: 100%; object-fit: cover; }
.np-info { text-align: center; }
#np-title { font-size: 34px; font-weight: 800; }
#np-artist { font-size: 18px; color: var(--dim); margin-block-start: 6px; display: inline-block; }
#np-added { font-size: 13px; color: var(--faint); margin-block-start: 10px; }

/* lyrics mode */
#np-lyrics { display: none; }
#np-overlay.lyrics-mode #np-art-wrap { display: none; }
#np-overlay.lyrics-mode #np-lyrics {
  display: block;
  width: min(90vw, 760px);
  height: min(58vh, 560px);
  overflow-y: auto;
  padding: 22vh 30px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  text-align: center;
}
#np-overlay.lyrics-mode #np-title { font-size: 24px; }
#np-overlay.lyrics-mode #np-added { display: none; }
.lyr-line {
  display: block;
  width: 100%;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.45;
  padding: 9px 6px;
  color: rgba(255, 255, 255, .38);
  border-radius: 12px;
  transition: color .3s var(--ease), transform .3s var(--ease), background .2s;
  text-align: center;
  cursor: pointer;
}
.lyr-line:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); }
.lyr-line.on { color: #fff; transform: scale(1.04); text-shadow: 0 2px 24px rgba(168,85,247,.45); }
.lyr-line.plain { font-size: 21px; cursor: default; color: rgba(255,255,255,.75); font-weight: 600; }
.lyr-line.plain:hover { background: none; }
.lyr-status { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: 24vh 0; color: var(--dim); font-size: 17px; font-weight: 600; }
/* the line under transcribed lyrics, and the explanation next to the button
   that asks for them - both quiet enough not to compete with the words */
.lyr-step { font-size: 17px; font-weight: 700; color: rgba(255,255,255,.85); }
.lyr-note { max-width: 420px; text-align: center; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--dim); opacity: .8; }
.lyr-foot { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 28px 0 40px; font-size: 13px; font-weight: 600; color: var(--dim); opacity: .6; }
.np-mode {
  position: absolute; bottom: 26px; inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: rgba(255,255,255,.1);
  border-color: transparent;
  color: var(--text);
}
[dir="rtl"] .np-mode { transform: translateX(50%); }

/* ============ artist page ============ */
.artist-hero { display: flex; gap: 22px; align-items: flex-end; padding-block: 18px 10px; }
.artist-photo {
  width: 190px; height: 190px; border-radius: 50%;
  overflow: hidden; flex: none;
  background: var(--raised);
  box-shadow: var(--shadow);
}
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.artist-link { cursor: pointer; }
.artist-link:hover { text-decoration: underline; color: var(--text); }
.card-art.round { border-radius: 50%; }
.artist-card:hover .card-art.round { box-shadow: 0 10px 26px rgba(168, 85, 247, .35); }

/* playlist cover editing */
.cover-edit { position: relative; flex: none; }
.cover-edit-btn {
  position: absolute; inset: 0;
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: rgba(4, 6, 10, .55);
  color: #fff;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.cover-edit:hover .cover-edit-btn { opacity: 1; }
.cover-edit-btn svg { width: 34px; height: 34px; }

.stream-badge { font-size: 22px; }

/* ============ download button (grey / ring / green) ============ */
.dl-btn {
  position: relative;
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--faint);
  transition: color .18s var(--ease), background .18s var(--ease), transform .12s var(--spring);
}
.dl-btn:hover { background: var(--hover); color: var(--text); transform: scale(1.1); }
.dl-btn:active { transform: scale(.92); }
.dl-btn .dl-icon { width: 17px; height: 17px; fill: currentColor; grid-area: 1 / 1; }
.dl-btn .dl-ring { width: 26px; height: 26px; grid-area: 1 / 1; opacity: 0; transform: rotate(-90deg); pointer-events: none; }
[dir="rtl"] .dl-btn .dl-ring { transform: rotate(-90deg) scaleY(-1); }
.dl-ring-bg { stroke: rgba(255, 255, 255, .13); }
.dl-ring-fg { stroke: var(--ok); transition: stroke-dashoffset .35s var(--ease); }

.dl-btn.busy { color: var(--dim); }
.dl-btn.busy .dl-ring { opacity: 1; }
.dl-btn.busy .dl-icon { width: 11px; height: 11px; }
.dl-btn.busy::after {
  content: '';
  position: absolute; inset: 2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-block-start-color: rgba(34, 197, 94, .45);
  animation: spin 1.6s linear infinite;
}
.dl-btn.saved { color: var(--ok); }
.dl-btn.saved:hover { color: #ff8383; }

/* row buttons stay hidden until hover unless the song is saved/downloading */
.song-row .dl-btn { opacity: 0; transition: opacity .15s, color .18s, background .18s, transform .12s var(--spring); }
.song-row:hover .dl-btn,
.song-row .dl-btn.saved,
.song-row .dl-btn.busy { opacity: 1; }

/* bigger variant used above a playlist */
.dl-btn.dl-big { width: 42px; height: 42px; }
.dl-btn.dl-big .dl-icon { width: 22px; height: 22px; }
.dl-btn.dl-big .dl-ring { width: 38px; height: 38px; }
.dl-btn.dl-big.busy .dl-icon { width: 14px; height: 14px; }

/* offline library art */
.dl-art, .dl-cover {
  display: grid; place-items: center;
  background: linear-gradient(140deg, #0f766e, #16a34a 55%, #4ade80);
}
.dl-art svg { width: 34%; height: 34%; fill: rgba(255, 255, 255, .92); }
.dl-cover svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, .92); }

/* account block */
.account-box { margin-block-start: 10px; display: flex; flex-direction: column; gap: 8px; }
.account-box .text-input { padding: 10px 13px; }
.acct-row { display: flex; align-items: center; gap: 12px; }
.acct-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; flex: none;
}
.acct-err {
  background: rgba(239, 68, 68, .12);
  color: #ff9c9c;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 12.5px; font-weight: 600;
}
.acct-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--faint); font-size: 12px;
  margin-block: 4px;
}
.acct-or::before, .acct-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.google-btn { justify-content: center; gap: 10px; }
.google-btn svg { width: 17px; height: 17px; fill: currentColor; }
.link-btn {
  color: var(--accent); font-size: 12.5px; font-weight: 600;
  text-align: start;
}
.link-btn:hover { text-decoration: underline; }

/* sync section */
.sync-code-row { display: flex; align-items: center; gap: 10px; margin-block-start: 10px; }
.sync-code {
  font-family: Consolas, monospace;
  font-size: 16px; font-weight: 700;
  letter-spacing: .12em;
  background: var(--bg2);
  border: 1px dashed var(--accent);
  color: var(--accent);
  padding: 7px 14px; border-radius: 10px;
  user-select: text;
  direction: ltr;
}

/* player bar loading (stream starting) */
.pb-loading #pb-thumb-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(6, 8, 12, .55);
}
.pb-loading #pb-thumb-wrap::before {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-block-start-color: #fff;
  animation: spin .8s linear infinite;
  z-index: 2;
}
.pb-loading #pb-cur { color: var(--accent); font-weight: 700; }

/* ============ settings page ============ */
#settings-view {
  position: fixed;
  inset: var(--tb-h) 0 0 0;
  z-index: 65;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: setIn .28s var(--ease);
}
@keyframes setIn { from { opacity: 0; transform: translateY(18px) scale(.99); } }

#settings-view.closing {
  animation: setOut .22s var(--ease) forwards;
  pointer-events: none;
}
@keyframes setOut { to { opacity: 0; transform: translateY(14px) scale(.985); } }

.set-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 30px 14px;
  border-block-end: 1px solid var(--border);
  flex: none;
}
.set-head h1 { font-size: 27px; font-weight: 800; }

.set-body { flex: 1; display: flex; min-height: 0; }

.set-nav {
  width: 232px; flex: none;
  padding: 16px 12px;
  overflow-y: auto;
  border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.set-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--dim);
  font-size: 14.5px; font-weight: 600;
  text-align: start;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.set-nav-item svg { width: 19px; height: 19px; flex: none; }
.set-nav-item:hover { background: var(--hover); color: var(--text); }
.set-nav-item.active { background: var(--accent-soft); color: var(--accent); }

.set-panel { flex: 1; overflow-y: auto; padding: 22px 34px 60px; min-width: 0; }
.set-panel.panel-in { animation: panelIn .26s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.set-group { max-width: 760px; margin-block-end: 34px; }
.set-group > h2 {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint);
  margin-block-end: 12px;
}
.set-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.set-row2 {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-block-end: 8px;
  transition: border-color .18s var(--ease);
}
.set-row2:hover { border-color: rgba(255,255,255,.16); }
.set-row2.danger { border-color: rgba(239, 68, 68, .3); }
.set-row2.danger:hover { border-color: rgba(239, 68, 68, .55); }
.set-row2-text { min-width: 0; flex: 1; }
.set-row2 .set-label { font-size: 15px; font-weight: 600; }
.set-row2 .set-sub { margin-block-start: 4px; }
.set-row2 .btn, .set-row2 .text-input, .set-row2 .seg, .set-row2 .switch { flex: none; }
.set-stat { font-size: 19px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.set-note {
  max-width: 760px;
  color: var(--faint); font-size: 12.5px; line-height: 1.6;
  background: var(--bg2);
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.set-card .account-box { margin-block-start: 0; }

@media (max-width: 900px) {
  .set-nav { width: 64px; padding: 12px 8px; }
  .set-nav-item span { display: none; }
  .set-nav-item { justify-content: center; padding: 12px 0; }
  .set-panel { padding: 18px 20px 50px; }
}

/* ============ modals ============ */
#modal-root:not(:empty) {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  background: rgba(4, 6, 10, .7);
  animation: fadeIn .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(520px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  animation: modalIn .3s var(--spring);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.92) translateY(16px); } to { opacity: 1; transform: none; } }
#modal-root.closing { animation: fadeOut .18s var(--ease) forwards; }
#modal-root.closing .modal { animation: modalOut .18s var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalOut { to { opacity: 0; transform: scale(.95) translateY(10px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 16px; }
.modal-head h2 { font-size: 20px; font-weight: 800; }
.modal .field { margin-block: 14px; }
.modal label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin-block-end: 7px; }
.text-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  color: var(--text);
}
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-row { display: flex; gap: 8px; }
.input-row .text-input { flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-block-start: 20px; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.6; margin-block-start: 8px; }

.tabs { display: flex; gap: 6px; background: var(--bg2); padding: 5px; border-radius: 999px; margin-block-end: 6px; }
.tab {
  flex: 1; padding: 9px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; color: var(--dim);
  transition: background .2s, color .2s;
}
.tab.active { background: var(--raised); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.3); }

/* add-song result card */
.result-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px;
  margin-block: 14px;
  animation: modalIn .35s var(--spring);
}
.result-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.result-card .rc-img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; }
.result-card .rc-img.mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.result-card .rc-img.mosaic img { width: 100%; height: 100%; }
.result-card .rc-img.liked-art { display: grid; place-items: center; background: var(--grad); }
.result-card .rc-img.liked-art svg { width: 26px; height: 26px; fill: #fff; }
.result-card .rc-meta { flex: 1; min-width: 0; }
.result-card .rc-title { font-weight: 700; }
.result-card .rc-artist { color: var(--dim); font-size: 13px; margin-block-start: 3px; }
.result-card.dup { border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .07); }
.result-ok-banner { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; font-size: 14px; }
.result-dup-banner { color: #fbbf24; font-weight: 700; font-size: 14px; }

.pick-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--r-md);
  cursor: pointer; transition: background .15s;
  width: 100%; text-align: start;
}
.pick-row:hover { background: var(--hover); }
.pick-row img { width: 60px; height: 34px; border-radius: 6px; object-fit: cover; }
.pick-row .pk-title { font-size: 13.5px; font-weight: 600; }
.pick-row .pk-sub { font-size: 12px; color: var(--faint); }

/* progress bar (import) */
.progress-wrap { margin-block: 18px; }
.progress-bar { height: 8px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.progress-bar > div { height: 100%; width: 0%; background: var(--grad); border-radius: 6px; transition: width .3s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); margin-block-start: 8px; }
.progress-label .cur-song { max-width: 60%; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-block-start-color: var(--accent);
  animation: spin .8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* playlist picker */
.pl-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.pl-pick {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: var(--r-md);
  transition: background .14s; text-align: start; width: 100%;
}
.pl-pick:hover { background: var(--hover); }
.pl-pick-busy { opacity: .55; pointer-events: none; }
.pl-pick-busy::after {
  content: ''; width: 16px; height: 16px; margin-inline-start: auto;
  border-radius: 50%; border: 2px solid var(--accent-soft); border-block-start-color: var(--accent);
  animation: spin .8s linear infinite;
}
.pl-pick .pl-cover { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--raised); flex: none; }
.pl-pick .pl-cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.pl-pick .pl-cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.pl-pick-new { color: var(--accent); font-weight: 700; }
.pl-pick-new .pl-cover { display: grid; place-items: center; background: var(--accent-soft); }

/* settings */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 13px; border-block-end: 1px solid var(--border); }
.set-row:last-child { border: 0; }
.set-label { font-weight: 600; }
.set-sub { font-size: 12.5px; color: var(--faint); margin-block-start: 3px; line-height: 1.5; }
.seg { display: flex; background: var(--bg2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--dim); transition: background .2s, color .2s; }
.seg button.active { background: var(--grad); color: #fff; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--border); position: relative; transition: background .2s; flex: none; }
.switch::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 4px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--dim);
  transition: transform .22s var(--spring), background .2s;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { transform: translateX(-18px); background: #fff; }
[dir="ltr"] .switch.on::after { transform: translateX(18px); }

/* ============ context menu ============ */
.ctx-menu {
  position: fixed; z-index: 80;
  min-width: 220px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow);
  animation: menuIn .16s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: scale(.95); } }
#menu-root.closing { animation: fadeOut .13s var(--ease) forwards; }
#menu-root.closing .ctx-menu, #menu-root.closing .jam-people-pop { animation: menuOut .13s var(--ease) forwards; }
@keyframes menuOut { to { opacity: 0; transform: scale(.96); } }
.ctx-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: start;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500;
  transition: background .12s;
}
.ctx-item:hover { background: var(--hover); }
.ctx-item svg { width: 17px; height: 17px; color: var(--dim); }
.ctx-item.danger { color: #ff8383; }
.ctx-item.danger svg { color: #ff8383; }
.ctx-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* ============ toasts ============ */
#toast-root {
  position: fixed; bottom: calc(var(--pb-h) + 14px); inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
[dir="rtl"] #toast-root { transform: translateX(50%); }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn .3s var(--spring);
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.94); } }
.toast svg { width: 17px; height: 17px; color: var(--accent); }
.toast.ok svg { color: var(--ok); }
.toast.warn svg { color: #fbbf24; }

/* ============ onboarding ============ */
#onboard-root:not(:empty) { position: fixed; inset: var(--tb-h) 0 0 0; z-index: 100; }
.ob {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 20% 10%, rgba(124, 58, 237, .35), transparent 55%),
    radial-gradient(80% 80% at 85% 85%, rgba(236, 72, 153, .28), transparent 55%),
    var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.ob-card { width: min(560px, 92vw); text-align: center; padding: 20px; animation: obIn .5s var(--ease); }
@keyframes obIn { from { opacity: 0; transform: translateY(26px); } }
.ob-logo { width: 84px; height: 84px; border-radius: 22px; margin-block-end: 18px; box-shadow: 0 16px 50px rgba(168, 85, 247, .45); animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.ob-title { font-size: 30px; font-weight: 800; margin-block-end: 6px; }
.ob-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ob-sub { color: var(--dim); font-size: 15px; line-height: 1.6; margin-block-end: 26px; }
.lang-cards { display: flex; gap: 14px; justify-content: center; }
.lang-card {
  flex: 1; max-width: 200px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 18px; padding: 26px 18px;
  font-size: 19px; font-weight: 800;
  transition: border-color .2s, transform .2s var(--spring), background .2s;
}
.lang-card span { display: block; font-size: 34px; margin-block-end: 10px; }
.lang-card:hover { border-color: var(--accent); transform: translateY(-4px); background: var(--raised); }
.ob-input {
  width: 100%; max-width: 340px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 999px; padding: 14px 22px;
  font-size: 16px; text-align: center; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ob-input:focus { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.ob-next { margin: 26px auto 0; padding: 12px 40px; font-size: 15px; }
.ob-skip { display: block; margin: 14px auto 0; color: var(--faint); font-size: 13px; }
.ob-skip:hover { color: var(--text); }
.ob-dots { display: flex; gap: 7px; justify-content: center; margin-block-start: 30px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .3s, transform .3s; }
.ob-dots i.on { background: var(--accent); transform: scale(1.25); }
.tip-emoji { font-size: 58px; margin-block-end: 14px; display: block; animation: bounceIn .5s var(--spring); }

/* ============ tooltip ============ */
#tip {
  position: fixed; z-index: 120;
  background: var(--raised); border: 1px solid var(--border);
  padding: 6px 11px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  pointer-events: none;
  box-shadow: var(--shadow);
  animation: fadeIn .15s;
  white-space: nowrap;
}

/* ============ skeletons ============ */
.skel { background: linear-gradient(90deg, var(--surface) 25%, var(--raised) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* search platform badges */
.src-badges { display: inline-flex; gap: 5px; align-items: center; }
.src-badge { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); letter-spacing: .03em; }

/* drag & drop reorder */
.song-row.drag-over-top { box-shadow: inset 0 2px 0 var(--accent); }
.song-row.drag-over-bot { box-shadow: inset 0 -2px 0 var(--accent); }
.song-row.dragging { opacity: .4; }

@media (max-width: 1100px) {
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .songlist-head, .song-row { grid-template-columns: 34px 52px 1fr 136px; }
  .sr-added, .sh-added { display: none; }
}

/* ============ sort control above a playlist ============ */
.sort-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--dim);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.sort-btn:hover { background: var(--raised); color: var(--text); }
.sort-btn svg { width: 15px; height: 15px; }
.sort-btn svg:last-child { width: 16px; height: 16px; opacity: .6; margin-inline-start: -2px; }

/* a browse card waiting on its song being pulled in */
.card-busy { opacity: .6; pointer-events: none; }
.card-busy .card-play { opacity: 1; animation: spin 1s linear infinite; }

/* song details panel */
.det-loading { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13.5px; padding-block: 12px; }
.det-loading .spinner { width: 18px; height: 18px; }

/* ============ ambience theme ============
   A personal look for the two accounts that have it. Everything below is scoped
   to body.aura, so an ordinary install never renders a single rule of it. */

#aura-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
#aura-bg.on { opacity: 1; }
.aura-layer {
  position: absolute;
  /* blown well past the edges: a blur that heavy pulls the frame inwards and
     would otherwise leave pale bands down the sides */
  inset: -18%;
  background-size: cover;
  background-position: center;
  filter: blur(90px) saturate(1.7);
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 1.1s var(--ease);
}
.aura-layer.show { opacity: 1; }
.aura-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(247,248,251,.7), rgba(236,238,244,.82)); }

body.aura {
  --bg: #eef0f4;
  --bg2: #e8eaf0;
  --surface: rgba(255, 255, 255, .55);
  --raised: rgba(255, 255, 255, .72);
  --hover: rgba(20, 24, 36, .06);
  --active: rgba(20, 24, 36, .1);
  --border: rgba(20, 24, 36, .09);
  --text: #14171f;
  --dim: #545b6b;
  --faint: #838b9c;
  --ac1: #6d28d9;
  --ac2: #db2777;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, .14);
  --shadow: 0 10px 30px rgba(20, 24, 36, .1);
  background: transparent;
}
body.aura #sidebar,
body.aura #main { background: transparent; }
body.aura #playerbar,
body.aura #titlebar {
  background: rgba(255, 255, 255, .42);
  backdrop-filter: blur(28px) saturate(1.4);
}
body.aura #queue-panel,
body.aura #notif-panel,
body.aura #settings-view,
body.aura .modal,
body.aura .menu,
body.aura .jam-people-pop {
  backdrop-filter: blur(30px) saturate(1.4);
}
body.aura #np-overlay { background: rgba(238, 240, 245, .78); backdrop-filter: blur(30px); }

body.aura #playerbar,
body.aura #sidebar { border-color: var(--border); }
body.aura ::-webkit-scrollbar-thumb { background: rgba(20,24,36,.16); border: 2px solid transparent; background-clip: padding-box; }
body.aura ::-webkit-scrollbar-thumb:hover { background: rgba(20,24,36,.28); border: 2px solid transparent; background-clip: padding-box; }
body.aura .slider { background: rgba(20,24,36,.14); }
body.aura .slider-fill { background: #2a2f3d; }
body.aura .slider-thumb { background: #2a2f3d; box-shadow: 0 2px 8px rgba(20,24,36,.28); }

/* --- quieter: what is not the music steps back until it is wanted --- */
body.aura .sr-added { opacity: 0; transition: opacity .18s var(--ease); }
body.aura .song-row:hover .sr-added { opacity: 1; }
body.aura .song-row .like-btn,
body.aura .song-row .dl-btn,
body.aura .song-row .sr-end .icon-btn:last-child { opacity: 0; transition: opacity .18s var(--ease); }
body.aura .song-row:hover .like-btn,
body.aura .song-row:hover .dl-btn,
body.aura .song-row:hover .sr-end .icon-btn:last-child,
body.aura .song-row .like-btn.liked,
body.aura .song-row .dl-btn.saved,
body.aura .song-row .dl-btn.busy,
body.aura .song-row:focus-within .like-btn,
body.aura .song-row:focus-within .dl-btn { opacity: 1; }

body.aura #btn-lang,
body.aura #btn-bell,
body.aura #btn-jam,
body.aura #cloud-pill { opacity: .32; transition: opacity .2s var(--ease); }
body.aura #topbar:hover #btn-lang,
body.aura #topbar:hover #btn-bell,
body.aura #topbar:hover #btn-jam,
body.aura #sidebar:hover #cloud-pill,
body.aura #btn-bell:focus-visible,
body.aura #btn-jam:focus-visible { opacity: 1; }
/* a waiting notification is not clutter */
body.aura #btn-bell:has(.bell-badge:not(.hidden)) { opacity: 1; }

body.aura #pb-shuffle,
body.aura #pb-repeat,
body.aura #pb-lyrics,
body.aura #pb-queue,
body.aura #pb-sleep,
body.aura #pb-mini,
body.aura #pb-expand { opacity: .34; transition: opacity .2s var(--ease); }
body.aura #playerbar:hover #pb-shuffle,
body.aura #playerbar:hover #pb-repeat,
body.aura #playerbar:hover #pb-lyrics,
body.aura #playerbar:hover #pb-queue,
body.aura #playerbar:hover #pb-sleep,
body.aura #playerbar:hover #pb-mini,
body.aura #playerbar:hover #pb-expand,
body.aura #pb-shuffle.on,
body.aura #pb-repeat.on,
body.aura #pb-lyrics.on,
body.aura #pb-queue.on,
body.aura #pb-sleep.on { opacity: 1; }

/* --- the volume that goes past full --- */
.slider.vol.boostable {
  background:
    linear-gradient(to right, transparent calc(var(--vol-full) - 1px), rgba(20,24,36,.45) calc(var(--vol-full) - 1px), rgba(20,24,36,.45) var(--vol-full), transparent var(--vol-full)),
    linear-gradient(to right, rgba(20,24,36,.14) var(--vol-full), rgba(239, 68, 68, .3) var(--vol-full));
}
[dir="rtl"] .slider.vol.boostable {
  background:
    linear-gradient(to left, transparent calc(var(--vol-full) - 1px), rgba(20,24,36,.45) calc(var(--vol-full) - 1px), rgba(20,24,36,.45) var(--vol-full), transparent var(--vol-full)),
    linear-gradient(to left, rgba(20,24,36,.14) var(--vol-full), rgba(239, 68, 68, .3) var(--vol-full));
}
.slider.vol.boostable.over .slider-fill { background: linear-gradient(90deg, #f97316, #ef4444); }
.slider.vol.boostable.over .slider-thumb { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.25); }
body.aura #pb-mute.hot { color: #ef4444; }

/* --- theme picker --- */
.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card {
  text-align: start;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.theme-card:hover { background: var(--hover); }
.theme-card.on { border-color: var(--accent); background: var(--accent-soft); }
.theme-swatch { width: 100%; height: 68px; border-radius: var(--r-md); border: 1px solid var(--border); }
.theme-swatch.classic { background: linear-gradient(135deg, #0b0d12 55%, #7c3aed); }
.theme-swatch.aura { background: linear-gradient(135deg, #eef0f4 55%, #c4b5fd); }
.theme-card strong { font-size: 14.5px; }
.theme-card span { color: var(--dim); font-size: 12.5px; line-height: 1.45; }

.jam-invite-ic {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  flex: none;
}
.jam-invite-ic svg { width: 28px; height: 28px; }

.lyr-none { margin-block-start: 6px; }

/* ============ keyboard shortcuts ============ */
.key-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 2px;
  border-block-end: 1px solid var(--border);
}
.key-row:last-child { border-block-end: 0; }
.key-row.off .key-row-name { color: var(--faint); }
.key-row-name { flex: 1; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.key-row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.key-play-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 999px; flex: none;
}
.key-cap {
  min-width: 104px; text-align: center;
  padding: 7px 12px; border-radius: var(--r-sm);
  background: var(--raised); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  /* a combination always reads left to right - "Ctrl + Alt + →", never mirrored */
  direction: ltr;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.key-cap:hover { border-color: var(--accent); }
.key-cap.empty { color: var(--faint); font-weight: 500; }
.key-cap.listening {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
  animation: keyPulse 1.1s var(--ease) infinite;
}
@keyframes keyPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.key-add-wrap { margin-block-start: 6px; }
.key-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.key-add:disabled { opacity: .4; cursor: default; }
.key-add svg { width: 18px; height: 18px; }

/* ============ who's using it ============ */
.ppl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ppl-count { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.ppl-list { display: flex; flex-direction: column; gap: 6px; }
.ppl-loading { display: flex; align-items: center; gap: 10px; color: var(--dim); padding: 14px 2px; }
.ppl-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ppl-row.blocked { opacity: .62; }
.ppl-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700;
  background: var(--grad); color: #fff;
}
.ppl-avatar.me { background: var(--raised); color: var(--dim); border: 1px solid var(--border); }
.ppl-main { flex: 1; min-width: 0; }
.ppl-name-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ppl-name { font-weight: 600; }
.ppl-tag {
  font-size: 11px; color: var(--dim);
  background: var(--hover); padding: 1px 7px; border-radius: 999px;
  direction: ltr;
}
.ppl-tag.me { color: var(--accent); background: var(--accent-soft); }
.ppl-tag.blocked { color: var(--danger); background: rgba(239,68,68,.14); }
.ppl-sub { color: var(--faint); font-size: 12.5px; display: flex; gap: 7px; align-items: center; margin-block-start: 3px; }
.ppl-dot { opacity: .5; }

/* ============ access wall ============ */
#access-wall {
  position: fixed; inset: 0; z-index: 9999;
  display: none; place-items: center;
  background: rgba(6, 8, 12, .86);
  backdrop-filter: blur(16px);
  -webkit-app-region: drag;
}
#access-wall.on { display: grid; }
#access-wall .aw-card {
  text-align: center; max-width: 340px; padding: 32px;
  -webkit-app-region: no-drag;
}
#access-wall .aw-emoji { font-size: 44px; margin-block-end: 14px; }
#access-wall .aw-title { font-size: 20px; font-weight: 800; color: #f2f4f8; margin-block-end: 8px; }
#access-wall .aw-sub { color: #9aa3b5; font-size: 14px; }

/* ============ jam kick ============ */
.jam-person { display: flex; align-items: center; gap: 9px; }
.jam-person-name { flex: 1; min-width: 0; }
.jam-kick {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--faint);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.jam-kick:hover { color: var(--danger); background: rgba(239,68,68,.12); }
.jam-kick svg { width: 17px; height: 17px; }

/* ---- moderation's four jobs ---- */
.sub-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 18px; border-block-end: 1px solid var(--border); padding-block-end: 10px; }
.sub-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--dim);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.sub-tab:hover { background: var(--hover); color: var(--text); }
.sub-tab.on { background: var(--accent-soft); color: var(--accent); }
.sub-tab-badge {
  min-width: 18px; padding: 1px 6px; border-radius: 20px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
}

/* ---- which part of the video is the song ---- */
.trim { margin-block-start: 4px; }
.trim-labels { position: relative; height: 18px; }
.trim-label {
  position: absolute; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 600; color: var(--dim); white-space: nowrap;
}
[dir="rtl"] .trim-label { transform: translateX(50%); }
.trim-track {
  position: relative; height: 6px; margin: 8px 11px;
  background: rgba(255, 255, 255, .13); border-radius: 4px;
}
.trim-fill { position: absolute; inset-block: 0; background: var(--accent); border-radius: 4px; }
.trim-dot {
  position: absolute; inset-block-start: 50%;
  width: 15px; height: 15px; margin-inline-start: -7.5px; margin-block-start: -7.5px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  cursor: grab; touch-action: none;
}
.trim-dot:active { cursor: grabbing; transform: scale(1.15); }

/* ---- the picture of you ---- */
.acct-face { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; }
.acct-face-btn { position: relative; width: 72px; height: 72px; flex: none; border-radius: 50%; }
.acct-face-btn img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; }
.acct-avatar.big { width: 72px; height: 72px; font-size: 26px; }
.acct-face-edit {
  position: absolute; inset-block-end: 0; inset-inline-end: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border: 2px solid var(--bg2);
}
.acct-face-edit svg { width: 12px; height: 12px; }
.acct-avatar-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.discord-btn { width: 100%; justify-content: center; }
.discord-btn svg { width: 18px; height: 18px; color: #5865f2; }

/* two doors, one line - the label is only whose door it is */
.acct-providers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acct-providers .btn { justify-content: center; padding-block: 9px; font-size: 13px; }
.acct-providers .btn svg { width: 17px; height: 17px; }
.acct-providers .btn:only-child { grid-column: 1 / -1; }

/* handing somebody the controls */
.jam-baton { display: grid; place-items: center; padding: 4px; border-radius: 6px; color: var(--faint); }
.jam-baton svg { width: 16px; height: 16px; }
.jam-baton:hover { background: var(--hover); color: var(--text); }
.jam-baton.on { color: var(--accent); background: var(--accent-soft); }
.jam-mgr-tag { color: var(--accent); background: var(--accent-soft); }

/* ============ eat this playlist ============ */
/* Snake, where the snake is the covers. It takes the whole window because the
   board needs the room, and because it is meant to feel like leaving the app
   for a minute. */
.snake-wrap {
  position: fixed; inset: 0; z-index: 400;
  display: grid; grid-template-rows: auto 1fr auto auto;
  gap: 10px; padding: 16px 20px 20px;
  background: rgba(11, 13, 18, .97);
  animation: fadeIn .18s var(--ease);
}
.snake-head { display: flex; align-items: center; gap: 14px; }
.snake-title { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 700; min-width: 0; }
.snake-pl { font-size: 13px; font-weight: 500; color: var(--dim); max-width: 40vw; }
.snake-scores { margin-inline-start: auto; display: flex; gap: 16px; align-items: baseline; font-size: 13px; color: var(--dim); }
.snake-score { font-size: 20px; font-weight: 800; color: var(--text); }
.snake-best { color: var(--faint); font-size: 12.5px; }
.snake-board { min-height: 0; }
.snake-board { padding: 4px; }
.snake-canvas {
  display: block; width: 100%; height: 100%;
  border-radius: var(--r-md);
  background: radial-gradient(circle at 50% 40%, #131826 0%, var(--bg2) 70%);
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.snake-loading { gap: 10px; }
.snake-load-title { font-size: 17px; font-weight: 700; }
.snake-load-label { font-size: 13px; color: var(--dim); margin-block-end: 4px; }
.snake-now {
  text-align: center; font-size: 13px; color: var(--dim); min-height: 18px;
}
.snake-now.pop { animation: snakePop .5s var(--spring); }
@keyframes snakePop { from { transform: scale(1.14); color: var(--accent) } to { transform: none } }
.snake-hint { text-align: center; font-size: 11.5px; color: var(--faint); }

.snake-result {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  background: rgba(11, 13, 18, .82);
  animation: fadeIn .25s var(--ease);
}
.snake-result-score { font-size: 64px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.snake-result-sub { font-size: 14px; color: var(--dim); margin-block-end: 10px; }

/* ============ lyrics editor (admin, developer builds) ============ */
/* The song plays underneath while this is open, so the list has to stay
   readable at a glance and the row being sung has to be obvious. */
.lyre-bar { display: flex; align-items: center; gap: 12px; padding: 0 4px 12px; }
.lyre-play { display: inline-flex; align-items: center; gap: 8px; }
.lyre-play-icon svg { width: 16px; height: 16px; display: block; }
.lyre-clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; color: var(--dim); }
.lyre-spacer { flex: 1; }

.lyre-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }

.lyre-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.lyre-row.live { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.45); }
.lyre-row.over { border-color: rgba(255,255,255,.5); }
.lyre-grip { cursor: grab; opacity: .35; flex: none; }
.lyre-grip svg { width: 16px; height: 16px; display: block; }
.lyre-row:hover .lyre-grip { opacity: .7; }

.lyre-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lyre-text { width: 100%; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 7px 10px; color: #fff; font-size: 15px; font-weight: 600; }
.lyre-text:focus { outline: none; border-color: rgba(168,85,247,.6); }

.lyre-times { display: flex; align-items: center; gap: 6px; }
.lyre-time { width: 78px; text-align: center; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1); border-radius: 7px; padding: 4px 6px; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.lyre-time:focus { outline: none; border-color: rgba(168,85,247,.6); }
.lyre-arrow { color: var(--dim); font-size: 13px; }

.lyre-mini { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); flex: none; }
.lyre-mini:hover { background: rgba(255,255,255,.14); color: #fff; }
.lyre-mini svg { width: 14px; height: 14px; display: block; }

.lyre-del { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: rgba(255,255,255,.45); flex: none; }
.lyre-del:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
.lyre-del svg { width: 15px; height: 15px; display: block; }

.lyre-hint { flex: 1; font-size: 12px; font-weight: 500; color: var(--dim); opacity: .75; text-align: start; }

/* the timeline: scrub the song without leaving the editor, and see where every
   line starts as a tick against it */
.lyre-track { display: flex; align-items: center; gap: 8px; padding: 0 4px 14px; }
.lyre-seek { flex: 1; position: relative; }
.lyre-step { min-width: 34px; height: 26px; padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.lyre-step:hover { background: rgba(255,255,255,.16); color: #fff; }
.lyre-slash { color: var(--dim); opacity: .5; }
.lyre-total { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--dim); }

.lyre-ticks { position: absolute; inset: 0; pointer-events: none; }
.lyre-tick { position: absolute; top: 50%; width: 2px; height: 10px; margin-top: -5px; border-radius: 1px; background: rgba(255,255,255,.34); }
.lyre-tick.on { background: #fff; height: 14px; margin-top: -7px; box-shadow: 0 0 8px rgba(168,85,247,.9); }
