@property --accent { syntax: '<color>'; inherits: true; initial-value: #a78bfa; }

:root {
  --accent: #a78bfa;
  --bg: #0a0a11;
  --bg-2: #0f0f18;
  --elev: #161621;
  --menu-bg: rgba(24, 24, 36, .92);
  --modal-bg: #14141f;
  --surface: rgba(255, 255, 255, .035);
  --hover: rgba(255, 255, 255, .065);
  --active: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .07);
  --border-2: rgba(255, 255, 255, .12);
  --text: #ededf6;
  --text-2: #a4a4ba;
  --text-3: #6d6d84;
  --track: rgba(255, 255, 255, .14);
  --player-bg: rgba(13, 13, 21, .78);
  --on-accent: #0b0b12;
  --play-bg: #f4f4fa;
  --play-fg: #0b0b12;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-mid: color-mix(in srgb, var(--accent) 30%, transparent);
  --radius: 12px;
  --side-w: 252px;
  --panel-w: 0px;
  --player-h: 92px;
  --title-h: 44px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
  transition: --accent 1.1s ease;
}
:root[data-theme="light"] {
  --bg: #f5f5f9;
  --bg-2: #ececf3;
  --elev: #ffffff;
  --menu-bg: rgba(255, 255, 255, .94);
  --modal-bg: #fbfbfd;
  --surface: rgba(20, 20, 50, .035);
  --hover: rgba(20, 20, 50, .06);
  --active: rgba(20, 20, 50, .09);
  --border: rgba(20, 20, 50, .08);
  --border-2: rgba(20, 20, 50, .14);
  --text: #15151f;
  --text-2: #565670;
  --text-3: #8e8ea4;
  --track: rgba(20, 20, 50, .14);
  --player-bg: rgba(250, 250, 253, .82);
  --on-accent: #ffffff;
  --play-bg: #15151f;
  --play-fg: #ffffff;
  --shadow: 0 24px 60px rgba(30, 30, 60, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--panel-w);
  grid-template-rows: var(--title-h) minmax(0, 1fr) var(--player-h);
  grid-template-areas: "title title title" "side main panel" "player player player";
  transition: grid-template-columns .28s cubic-bezier(.2, .8, .2, 1);
}
body.panel-open { --panel-w: 340px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd { font-family: var(--font); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-2); color: var(--text-3); background: var(--surface); }

/* icons */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
symbol .fill { fill: currentColor; stroke: none; }

/* scrollbars */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--track); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }

.backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 600px at 18% -12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(800px 600px at 105% 8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
}

/* ---------------- titlebar ---------------- */
.titlebar {
  grid-area: title; position: relative; z-index: 6;
  display: flex; align-items: center; gap: 12px;
  padding: 0 150px 0 18px;
  -webkit-app-region: drag;
}
.titlebar button, .titlebar input, .titlebar label { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--side-w) - 64px); font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.logo { width: 24px; height: 24px; filter: drop-shadow(0 2px 10px var(--accent-mid)); }
.search {
  flex: 0 1 460px; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.search .i { width: 16px; height: 16px; }
.search:focus-within { background: var(--hover); border-color: var(--accent-mid); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 13px; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within kbd { display: none; }
.mini-title { display: none; }

/* ---------------- generic buttons ---------------- */
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--text-2); transition: color .15s, background .15s, transform .1s;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.xs { width: 26px; height: 26px; border-radius: 8px; }
.icon-btn.xs .i { width: 16px; height: 16px; }
.icon-btn.lg { width: 44px; height: 44px; border-radius: 50%; }
.icon-btn.lg .i { width: 24px; height: 24px; }
.icon-btn.toggle.on, .icon-btn.on { color: var(--accent); }
.icon-btn.toggle.on::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; transition: background .15s, transform .1s, box-shadow .2s, filter .15s;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 22px -6px var(--accent); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 28px -6px var(--accent); }
.btn.ghost { background: var(--surface); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { background: #e5484d; color: #fff; }
.btn.block { width: 100%; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.text-btn { color: var(--text-2); font-size: 12px; font-weight: 600; margin-left: auto; padding: 4px 8px; border-radius: 6px; }
.text-btn:hover { color: var(--text); background: var(--hover); }
.pill-btn { height: 26px; min-width: 40px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); border: 1px solid var(--border-2); transition: all .15s; }
.pill-btn:hover { color: var(--text); background: var(--hover); }
.pill-btn.on { color: var(--accent); border-color: var(--accent-mid); }
.link { cursor: pointer; }
.link:hover { text-decoration: underline; color: var(--text); }
.link.strong { font-weight: 700; color: var(--text); }
.muted { color: var(--text-3); }

/* ---------------- sidebar ---------------- */
.sidebar {
  grid-area: side; position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0;
  padding: 6px 12px 14px;
}
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 2px; margin-right: -6px; }
.nav-label {
  display: flex; align-items: center; justify-content: space-between; margin: 18px 10px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
}
.nav-label:first-child { margin-top: 6px; }
.nav-label-actions { display: flex; gap: 2px; margin-right: -6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; text-align: left; transition: background .15s, color .15s;
}
.nav-item .i { width: 19px; height: 19px; transition: color .2s; }
.nav-item span:not(.count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active .i { color: var(--accent); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.drop { background: var(--accent-mid); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.nav-empty { font-size: 12px; color: var(--text-3); padding: 4px 10px 8px; line-height: 1.5; }
.sidebar-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.foot-row { display: flex; justify-content: space-between; }
.scan { display: none; gap: 6px; font-size: 12px; color: var(--text-2); }
.scan.on { display: grid; }
.scan-text { display: flex; align-items: center; gap: 8px; }
.scan-bar { height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.scan-bar div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--track); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- main ---------------- */
.main {
  grid-area: main; position: relative; z-index: 1; overflow-y: auto; overflow-x: hidden; min-width: 0;
  margin: 0 0 0 0; border-radius: 16px 16px 0 0;
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  border: 1px solid var(--border); border-bottom: 0;
}
body.panel-open .main { margin-right: 10px; }
.view { min-height: 100%; padding-bottom: 40px; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.hero {
  display: flex; align-items: flex-end; gap: 28px; padding: 44px 32px 26px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, transparent), transparent);
}
.hero-art { width: 200px; height: 200px; flex: none; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.hero-art.round { border-radius: 50%; }
.hero-art .cover { width: 100%; height: 100%; border-radius: 0; }
.hero-text { min-width: 0; }
.kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--text-2); }
.hero-title {
  margin: 8px 0 12px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  font-size: clamp(34px, 4.6vw, 68px); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hero-sub { color: var(--text-2); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.hero-sub .path { font-family: Consolas, monospace; font-size: 12.5px; }
.badge-fmt { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--border-2); color: var(--text-2); letter-spacing: .03em; }
.smart-art { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; }
.smart-art .i { width: 42%; height: 42%; stroke-width: 1.6; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .3)); }
.smart-art.fav { background: linear-gradient(135deg, #ff5f8f, #8b5cf6); }
.smart-art.recent { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.smart-art.most { background: linear-gradient(135deg, #fb923c, #e11d48); }
.smart-art.added { background: linear-gradient(135deg, #34d399, #0ea5e9); }
.smart-art.pl { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), color-mix(in srgb, var(--accent) 60%, #000)); }
.smart-art.folder { background: linear-gradient(135deg, #fbbf24, #f97316); }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.mosaic .cover { border-radius: 0; }

.actions { display: flex; align-items: center; gap: 14px; padding: 4px 32px 18px; }
.play-big {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -8px var(--accent);
  transition: transform .15s, box-shadow .2s, filter .15s;
}
.play-big .i { width: 24px; height: 24px; margin-left: 2px; }
.play-big:hover { transform: scale(1.06); filter: brightness(1.06); box-shadow: 0 14px 36px -8px var(--accent); }
.play-big:active { transform: scale(.97); }

.section-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 18px 32px 12px; letter-spacing: -.01em; }
.toolbar { display: flex; padding: 0 32px 18px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.segmented button .i { width: 15px; height: 15px; }
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--active); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

/* covers */
.cover { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface); }
.cover.ph {
  display: grid; place-items: center; color: rgba(255, 255, 255, .75);
  background: linear-gradient(135deg, hsl(var(--h) 55% 46%), hsl(calc(var(--h) + 50) 60% 28%));
}
.cover.ph .i { width: 38%; height: 38%; stroke-width: 1.7; }
.cover.xs { width: 40px; height: 40px; border-radius: 6px; flex: none; }

/* ---------------- track list ---------------- */
.tl { padding: 0 20px; }
.tl-head, .row {
  display: grid; align-items: center; column-gap: 14px;
  grid-template-columns: 44px minmax(0, 5fr) minmax(0, 3fr) 92px 34px 58px;
  padding: 0 12px;
}
.tl-head {
  position: sticky; top: 0; z-index: 3; height: 38px; margin: 0 -20px 8px; padding: 0 32px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3);
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.tl-head .i { width: 15px; height: 15px; }
.tl-head .sortable { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tl-head .sortable:hover, .tl-head .sorted { color: var(--text); }
.sort-dir { font-size: 8px; color: var(--accent); }
.tl-head .c-dur { display: flex; justify-content: flex-end; }
.tl-body { position: relative; }
.row {
  position: absolute; left: 0; right: 0; top: 0; height: 52px; margin-top: 2px; border-radius: 10px;
  color: var(--text-2); font-size: 13.5px; cursor: default;
}
.row:hover { background: var(--hover); }
.row.selected { background: var(--accent-soft); }
.row.selected:hover { background: var(--accent-mid); }
.c-num { position: relative; display: grid; place-items: center; font-variant-numeric: tabular-nums; color: var(--text-3); height: 100%; }
.c-num > * { grid-area: 1 / 1; }
.row-play { display: none; color: var(--text); cursor: pointer; }
.row-play .i { width: 16px; height: 16px; }
.row:hover .num { visibility: hidden; }
.row:hover .row-play { display: grid; }
.eqbars { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.eqbars i { width: 3px; height: 30%; border-radius: 1px; background: var(--accent); }
.is-playing .eqbars i { animation: eqb 1s ease-in-out infinite; }
.eqbars i:nth-child(2) { animation-delay: -.4s !important; height: 70%; }
.eqbars i:nth-child(3) { animation-delay: -.2s !important; height: 50%; }
.eqbars i:nth-child(4) { animation-delay: -.7s !important; }
@keyframes eqb { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.row.playing .num { visibility: hidden; }
.row.playing .eqbars { display: flex; }
.row.playing:hover .eqbars { display: none; }
.row.playing .t1 { color: var(--accent); }
.c-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tt { min-width: 0; }
.t1 { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2 { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.c-album, .c-col4 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-col4 { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.c-dur { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.row-fav { opacity: 0; }
.row:hover .row-fav, .row-fav.on { opacity: 1; }
.row-fav.on { color: #ff5f8f; }
.tl.numbered .c-title { gap: 0; }
.drag-ghost {
  position: fixed; top: -100px; left: -100px; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13px;
}
.drag-ghost .i { width: 16px; height: 16px; }

/* ---------------- grids ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; padding: 0 22px 24px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.card { padding: 12px; border-radius: 14px; cursor: pointer; transition: background .2s; min-width: 0; }
.card:hover { background: var(--hover); }
.card-art { position: relative; margin-bottom: 12px; border-radius: 10px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .55); }
.card-art .cover { border-radius: 10px; }
.card-art.round, .card-art.round .cover { border-radius: 50%; }
.card-play {
  position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.card-play .i { width: 20px; height: 20px; margin-left: 2px; }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
.card-play:hover { transform: scale(1.07) !important; }
.card-t1 { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-t2 { font-size: 12.5px; color: var(--text-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.artist { text-align: center; }

.folder-list { padding: 0 20px; display: grid; gap: 2px; }
.folder-row { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 12px; border-radius: 12px; cursor: pointer; }
.folder-row:hover { background: var(--hover); }
.folder-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fbbf24; background: rgba(251, 191, 36, .12); flex: none; }
.folder-text { flex: 1; min-width: 0; }
.folder-count { color: var(--text-3); font-size: 12.5px; }
.folder-row .icon-btn { opacity: 0; }
.folder-row:hover .icon-btn { opacity: 1; }

.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 56px 24px; color: var(--text-3); }
.empty > .i { width: 44px; height: 44px; stroke-width: 1.5; color: var(--text-3); margin-bottom: 6px; }
.empty h3 { margin: 0; color: var(--text); font-size: 17px; }
.empty p { margin: 0; max-width: 340px; line-height: 1.5; font-size: 13px; }

/* welcome */
.welcome { position: relative; display: grid; justify-items: center; align-content: center; text-align: center; min-height: calc(100vh - 180px); padding: 40px; overflow: hidden; }
.welcome-orb {
  position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); opacity: .45; z-index: -1;
  background: conic-gradient(from 0deg, var(--accent), #38bdf8, #f472b6, var(--accent));
  animation: orb 16s linear infinite;
}
@keyframes orb { to { transform: rotate(360deg); } }
.welcome-logo { width: 84px; height: 84px; filter: drop-shadow(0 10px 30px var(--accent-mid)); }
.welcome h1 { font-family: var(--font-display); font-size: 44px; letter-spacing: -.03em; margin: 22px 0 10px; }
.welcome p { max-width: 460px; color: var(--text-2); line-height: 1.6; margin: 0 0 28px; font-size: 15px; }
.welcome-actions { display: flex; gap: 12px; }
.welcome-hint { margin-top: 26px; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.welcome-hint .i { width: 16px; height: 16px; }

/* ---------------- side panel ---------------- */
.panel { grid-area: panel; z-index: 2; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0 12px 0 0; }
body:not(.panel-open) .panel { padding-right: 0; }
.panel-tabs { display: flex; align-items: center; gap: 4px; padding: 0 0 10px; min-width: 316px; }
.tab { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.tab:hover { color: var(--text); background: var(--hover); }
.tab.on { background: var(--active); color: var(--text); }
.panel-close { margin-left: auto; }
.panel-body {
  position: relative; flex: 1; overflow-y: auto; min-width: 316px; padding: 8px; border-radius: 16px 16px 0 0;
  background: color-mix(in srgb, var(--bg-2) 55%, transparent); border: 1px solid var(--border); border-bottom: 0;
}
.q-label { display: flex; align-items: center; gap: 6px; padding: 12px 8px 8px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.q-label .muted { font-weight: 500; }
.q-item { position: relative; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px; border-radius: 10px; cursor: pointer; }
.q-item:hover { background: var(--hover); }
.q-item.current { background: var(--accent-soft); }
.q-item.current .t1 { color: var(--accent); }
.q-item .tt { flex: 1; }
.q-dur { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.q-grip { color: var(--text-3); cursor: grab; display: grid; margin: 0 -4px; opacity: 0; }
.q-grip .i { width: 14px; height: 14px; }
.q-item:hover .q-grip { opacity: 1; }
.q-rm { display: none; }
.q-item:hover .q-rm { display: grid; }
.q-item:hover .q-dur { display: none; }
.q-item.dragging { opacity: .4; }
.q-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.q-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.q-more, .q-end { text-align: center; padding: 14px; font-size: 12px; color: var(--text-3); }

.lyrics { padding: 30vh 12px 40vh; }
.lyric { margin: 0 0 16px; font-size: 21px; font-weight: 750; line-height: 1.3; letter-spacing: -.01em; color: var(--text); transition: color .35s, opacity .35s, transform .35s; transform-origin: left center; }
.lyrics.synced .lyric { color: var(--text-3); cursor: pointer; opacity: .75; }
.lyrics.synced .lyric:hover { opacity: 1; }
.lyrics.synced .lyric.past { opacity: .5; }
.lyrics.synced .lyric.active { color: var(--text); opacity: 1; transform: scale(1.03); }
.lyrics:not(.synced) { padding: 16px 12px; }
.lyrics:not(.synced) .lyric { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.lyrics-loading { display: grid; place-items: center; padding: 60px; }

/* ---------------- player bar ---------------- */
.player {
  grid-area: player; position: relative; z-index: 8;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(var(--tp-min, 360px), 1.6fr) minmax(0, 1fr); align-items: center; gap: 20px;
  padding: 0 18px; background: var(--player-bg); backdrop-filter: blur(30px) saturate(1.6);
  border-top: 1px solid var(--border);
}
.player::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-mid), transparent);
}
.np-mini { display: flex; align-items: center; gap: 14px; min-width: 0; }
.np-cover { position: relative; width: 58px; height: 58px; flex: none; border-radius: 9px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.np-cover .cover { width: 100%; height: 100%; border-radius: 0; }
.np-cover-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; opacity: 0; transition: opacity .15s; }
.np-cover:hover .np-cover-hint { opacity: 1; }
.np-cover-hint .i { width: 20px; height: 20px; }
.np-text { min-width: 0; }
.np-title-sm { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist-sm { font-size: 12.5px; color: var(--text-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-btn.on { color: #ff5f8f; animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.3); } }

.transport { display: grid; gap: 4px; justify-items: center; }
.transport-buttons { display: flex; align-items: center; gap: 10px; }
.transport-buttons .icon-btn .i { width: 19px; height: 19px; }
#btnPrev .i, #btnNext .i { width: 21px; height: 21px; }
.play-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--play-bg); color: var(--play-fg); transition: transform .12s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.play-btn .i { width: 20px; height: 20px; }
.play-btn use[href="#i-play"] { transform: translateX(1px); }
.play-btn:hover { transform: scale(1.07); box-shadow: 0 6px 24px -4px var(--accent); }
.play-btn:active { transform: scale(.95); }
.progress-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 38px; }
.time:first-child { text-align: right; }
.seek { position: relative; flex: 1; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: var(--track); transition: height .15s; }
.seek:hover .seek-track, .seek.dragging .seek-track { height: 6px; }
.seek-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff 0%), var(--accent)); }
.seek-thumb { position: absolute; right: -6px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transform: scale(0); transition: transform .15s; }
.seek:hover .seek-thumb, .seek.dragging .seek-thumb { transform: scale(1); }
.seek-tip {
  position: absolute; bottom: 20px; left: 0; transform: translateX(-50%); padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--elev); border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .12s; white-space: nowrap;
}
.seek:hover .seek-tip { opacity: 1; }
.seek-buf { display: none; }

.extras { display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; }
.extras > * { flex: none; }
.extras > .ovf { display: none !important; }
.extras .icon-btn .i { width: 18px; height: 18px; }
.extras .pill-btn { margin-right: 4px; }
.badge {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; font-size: 9.5px; font-weight: 800;
  background: var(--accent); color: var(--on-accent); display: none; place-items: center; line-height: 1;
}
.badge:not(:empty) { display: grid; }
#btnSleep.on { color: var(--accent); }
#btnEq.open { color: var(--text); background: var(--active); }
.volume { position: relative; display: flex; align-items: center; gap: 4px; margin: 0 4px; }
.vol-pop { display: flex; align-items: center; }
.volume .range { width: 104px; }
/* little room: the slider becomes a popover above the speaker button */
.volume.collapsed { margin: 0; }
.volume.collapsed .vol-pop {
  display: none; position: absolute; bottom: calc(100% + 12px); right: -40px; z-index: 20; padding: 12px 16px;
  border-radius: 14px; background: var(--menu-bg); backdrop-filter: blur(24px); border: 1px solid var(--border-2); box-shadow: var(--shadow);
}
.volume.collapsed.open .vol-pop { display: flex; animation: menuIn .12s ease-out; }
.volume.collapsed .range { width: 150px; }

/* ranges */
.range { -webkit-appearance: none; appearance: none; height: 16px; background: transparent; cursor: pointer; --val: 50%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--val), var(--track) var(--val)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); transition: transform .12s; }
.range:hover::-webkit-slider-thumb { transform: scale(1.15); }

/* ---------------- Now Playing ---------------- */
.nowplaying {
  position: fixed; left: 0; right: 0; top: 0; bottom: var(--player-h); z-index: 7; overflow: hidden;
  color: #fff; --text: #fff; --text-2: rgba(255, 255, 255, .72); --text-3: rgba(255, 255, 255, .45); --hover: rgba(255, 255, 255, .1); --border-2: rgba(255,255,255,.2);
  background: #07070c; opacity: 0; visibility: hidden; transform: translateY(30px) scale(.99);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s .45s;
}
.np-open .nowplaying { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.nowplaying::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: var(--title-h); -webkit-app-region: drag; z-index: 2; }
.np-bg {
  position: absolute; inset: -15%; background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.7) brightness(.55); transform: scale(1.1);
  background-color: color-mix(in srgb, var(--accent) 40%, #000);
  transition: background-image .8s;
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.25) rotate(8deg); } }
.nowplaying::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.np-viz { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26%; opacity: .5; z-index: 1; mix-blend-mode: screen; }
.np-close { position: absolute; top: 8px; left: 14px; z-index: 3; -webkit-app-region: no-drag; color: #fff; }
.np-close .i { width: 24px; height: 24px; }
.np-grip { display: none; }
/* wide: cover + title on the left, tabs (lyrics | queue | equalizer | devices) on the right */
.np-stage {
  position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 64px);
  padding: 64px clamp(20px, 4.5vw, 72px) 22px; max-width: 1560px; margin: 0 auto;
  --np-avail: calc(100vh - var(--player-h) - 86px);
  --np-avail: calc(100dvh - var(--player-h) - 86px);
}
.np-left { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; width: var(--np-art); --np-art: max(120px, min(calc(var(--np-avail) - 185px), 40vw, 560px)); }
.np-art-wrap { width: var(--np-art); flex: none; }
.np-art { border-radius: 18px; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .06); transform: scale(var(--pulse, 1)); transition: transform .09s linear; }
.np-art .cover { border-radius: 0; }
.np-info { min-width: 0; }
.np-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-title-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.np-titles { flex: 1; min-width: 0; }
.np-fav { flex: none; margin-top: 2px; }
.np-title {
  font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0 0 6px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .3); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.np-sub { font-size: 16px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; max-height: 26px; overflow: hidden; }
.np-meta:empty { display: none; }
.np-meta span { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text-2); backdrop-filter: blur(10px); }
.np-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.np-tabs { display: flex; gap: 4px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; flex: none; -webkit-app-region: no-drag; }
.np-tabs::-webkit-scrollbar { display: none; }
.np-tabs .tab { flex: none; color: var(--text-2); background: rgba(255, 255, 255, .06); }
.np-tabs .tab:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.np-tabs .tab.on { background: rgba(255, 255, 255, .9); color: #111; }
body:not(.connect-on) .np-tab-devices { display: none; }
.np-panes { position: relative; flex: 1; min-height: 0; border-radius: 18px; background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; -webkit-app-region: no-drag; }
.np-pane { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: none; }
.nowplaying[data-tab="lyrics"] .np-lyrics, .nowplaying[data-tab="queue"] .np-queue,
.nowplaying[data-tab="eq"] .np-eq, .nowplaying[data-tab="devices"] .np-devices { display: block; }
.np-pane::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .2); }
.np-lyrics { padding: 0 18px; -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 82%, transparent); }
.np-lyrics::-webkit-scrollbar { display: none; }
.np-lyrics .lyric { font-size: clamp(20px, 2vw, 30px); }
.np-lyrics .lyrics { padding-top: 30%; padding-bottom: 50%; }
.np-lyrics .lyrics:not(.synced) { padding-top: 24px; padding-bottom: 40px; }
.np-lyrics .empty { padding: 48px 16px; }
.np-queue .q-item:hover, .np-devices .dev-item:hover { background: rgba(255, 255, 255, .08); }
.np-queue .q-item.current { background: rgba(255, 255, 255, .12); }
.np-queue .q-item.current .t1 { color: #fff; }
.np-eq { padding: 16px 18px; --surface: rgba(255, 255, 255, .05); --border: rgba(255, 255, 255, .1); --track: rgba(255, 255, 255, .2); }
.np-eq .chip.on { background: #fff; border-color: #fff; color: #111; }
.np-eq .eq-top { flex-wrap: wrap; gap: 12px 28px; }
.np-eq .eq-graph { overflow-x: auto; }
.np-eq .eq-bands { min-width: 400px; }
.np-eq .vrange { height: clamp(110px, calc(var(--np-avail) - 330px), 200px); }
.np-devices { padding: 10px; }
.dev-head { padding: 10px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.dev-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 8px 12px; border-radius: 12px; text-align: left; }
.dev-item .i { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.dev-item.on .i, .dev-item.on .dev-name { color: var(--accent); }
.dev-text { flex: 1; min-width: 0; }
.dev-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.dev-note { padding: 14px 12px; color: var(--text-3); font-size: 13px; line-height: 1.5; }
:root[data-theme="light"] .nowplaying .tab.on { color: #111; }

/* ---------------- context menu ---------------- */
.ctx {
  position: fixed; z-index: 50; min-width: 220px; padding: 6px; border-radius: 12px; display: none;
  background: var(--menu-bg); backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  font-size: 13px;
}
.ctx.open { display: block; animation: menuIn .12s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: scale(.97); } }
.ctx-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; cursor: default; color: var(--text); }
.ctx-item .i { width: 16px; height: 16px; color: var(--text-2); }
.ctx-item:hover:not(.disabled) { background: var(--hover); }
.ctx-item:hover .i { color: var(--text); }
.ctx-item.disabled { opacity: .4; }
.ctx-item.danger, .ctx-item.danger .i { color: #ff6b70; }
.ctx-item.checked { color: var(--accent); }
.ctx-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ctx-check { color: var(--accent) !important; }
.ctx-hint { color: var(--text-3); font-size: 12px; }
.ctx-arrow { margin-right: -4px; }
.ctx-sep { height: 1px; margin: 5px 6px; background: var(--border); }
.ctx-header { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ctx-sub {
  position: absolute; left: calc(100% + 4px); top: -6px; display: none; min-width: 200px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: var(--menu-bg); backdrop-filter: blur(24px); border: 1px solid var(--border-2); box-shadow: var(--shadow);
}
.ctx.flip-sub .ctx-sub { left: auto; right: calc(100% + 4px); }
.ctx-item.has-sub:hover > .ctx-sub, .ctx-item.has-sub.open > .ctx-sub { display: block; }

/* ---------------- modals ---------------- */
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); animation: fadeIn .18s ease; padding: 24px; }
.modal-wrap.out { animation: fadeOut .18s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  width: min(440px, 100%); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); display: flex; flex-direction: column; border-radius: 18px;
  background: var(--modal-bg); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.wide { width: min(760px, 100%); }
@keyframes popIn { from { opacity: 0; transform: scale(.95) translateY(8px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px 24px; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; }
.modal-body { padding: 8px 24px 22px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.input { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-2); outline: 0; font-size: 14px; user-select: text; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* switches */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.switch input { display: none; }
.sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--track); transition: background .2s; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + .sw { background: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(16px); }

/* equalizer */
.eq-top { display: flex; gap: 28px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip { height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border-2); transition: all .15s; }
.chip:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); opacity: 1; }
.chip:disabled:not(.on) { display: none; }
.eq-graph { position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); padding: 14px 10px 10px; }
#eqCurve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.eq-bands { position: relative; display: grid; grid-template-columns: repeat(11, 1fr); }
.band { display: grid; justify-items: center; gap: 6px; }
.band.pre { border-right: 1px solid var(--border); }
.band .db { font-size: 11px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; height: 14px; }
.band .f { font-size: 11px; color: var(--text-3); font-weight: 600; }
.vrange {
  -webkit-appearance: none; appearance: none; writing-mode: vertical-lr; direction: rtl; width: 28px; height: 180px; background: transparent; cursor: pointer; --val: 50%;
  --eq-thumb: 18;   /* knob size in px; the EQ curve reads it to line up with the knobs */
}
.vrange::-webkit-slider-runnable-track { width: 4px; border-radius: 4px; background: linear-gradient(0deg, var(--track) 0 calc(50% - 1px), var(--border-2) calc(50% - 1px) calc(50% + 1px), var(--track) calc(50% + 1px)); }
.vrange::-webkit-slider-thumb { -webkit-appearance: none; width: calc(var(--eq-thumb) * 1px); height: calc(var(--eq-thumb) * 1px); margin-left: calc((4px - var(--eq-thumb) * 1px) / 2); border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.eq.off .eq-graph { opacity: .45; }
.eq .modal-actions .btn .i { width: 16px; height: 16px; }

/* settings */
.settings section { padding: 6px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.settings section:last-child { border: 0; margin: 0; padding-bottom: 0; }
.settings h3 { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 0; }
.s-title { font-weight: 600; }
.s-desc { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.slider-val { display: flex; align-items: center; gap: 10px; }
.slider-val .range { width: 180px; }
.slider-val span { width: 34px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.folder-manage { display: grid; gap: 4px; margin-bottom: 12px; }
.fm-row { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 12px; border-radius: 10px; background: var(--surface); }
.fm-row .i { width: 17px; height: 17px; color: #fbbf24; }
.fm-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.row-actions { display: flex; gap: 10px; }
.shortcuts { display: grid; gap: 2px; }
.sc { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sc:last-child { border: 0; }
.props-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.props-head .cover { width: 64px; height: 64px; }
.props dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.props dt { color: var(--text-3); }
.props dd { margin: 0; overflow-wrap: anywhere; user-select: text; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: calc(var(--bottom-h, var(--player-h)) + 18px); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--elev); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.toast .i { width: 17px; height: 17px; color: var(--accent); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* drag & drop */
.drop-overlay {
  position: fixed; inset: 10px; z-index: 70; display: none; place-items: center; border-radius: 22px; pointer-events: none;
  border: 2px dashed var(--accent); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px);
  text-align: center; font-size: 18px; font-weight: 700;
}
.drop-overlay .i { width: 52px; height: 52px; color: var(--accent); }
.dropping .drop-overlay { display: grid; animation: fadeIn .15s; }

/* ---------------- mini player ---------------- */
body.mini { --title-h: 34px; grid-template-columns: 1fr; grid-template-rows: 34px 1fr; grid-template-areas: "title" "player"; }
body.mini .sidebar, body.mini .main, body.mini .panel, body.mini .nowplaying, body.mini .search, body.mini .nav-back { display: none; }
body.mini .titlebar { padding-left: 12px; }
body.mini .brand { font-size: 12.5px; width: auto; }
body.mini .logo { width: 18px; height: 18px; }
body.mini .player {
  grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 8px; padding: 0 12px 10px; border-top: 0; align-content: center;
}
body.mini .player::before { display: none; }
body.mini .np-mini { grid-column: 1; grid-row: 1; gap: 10px; }
body.mini .np-cover { width: 42px; height: 42px; border-radius: 7px; pointer-events: none; }
body.mini .extras { grid-column: 2; grid-row: 1; }
body.mini .extras > :not(#btnMini) { display: none; }
body.mini .transport { grid-column: 1 / 3; grid-row: 2; display: flex; align-items: center; gap: 10px; }
body.mini .transport-buttons { gap: 2px; }
body.mini .play-btn { width: 34px; height: 34px; }
body.mini .play-btn .i { width: 16px; height: 16px; }
body.mini .icon-btn { width: 30px; height: 30px; }
body.mini .time { min-width: 30px; font-size: 10.5px; }
body.mini .toasts { display: none; }


body:not(.ready) * { transition: none !important; }

/* ---------------- Live radio ---------------- */
.live-logo { aspect-ratio: 1; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.live-logo img { width: 78%; height: 78%; object-fit: contain; }
.live-logo.ph { background: linear-gradient(135deg, var(--accent-mid), var(--surface)); color: var(--text); }
.live-logo.ph .i { width: 40%; height: 40%; }
.live-card.on .live-logo { box-shadow: 0 0 0 3px var(--accent); }
.live-card.on .card-t1 { color: var(--accent); }
.live-card .card-art { position: relative; }
.live-add { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(8px); }
.live-add .i { width: 18px; height: 18px; }
.live-hint { padding: 4px 32px 24px; font-size: 12.5px; }
.cover.live-art { object-fit: contain; background: #fff; padding: 8%; }
body.live-mode #tCur { color: var(--accent); font-weight: 800; letter-spacing: .08em; }
body.live-mode .seek { pointer-events: none; }
body.live-mode .seek-thumb { display: none; }
body.live-mode .seek-fill { opacity: .35; }

/* ---------------- YouTube Music (Discover) ---------------- */
.yt-head {
  padding: 44px 32px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, transparent), transparent);
}
.yt-head .hero-title { margin-bottom: 18px; }
.yt-searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.yt-search {
  flex: 0 1 520px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text-3);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.yt-search .i { width: 18px; height: 18px; flex: none; }
.yt-search:focus-within { background: var(--hover); border-color: var(--accent-mid); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text-2); }
.yt-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 14.5px; user-select: text; }
.yt-search input::placeholder { color: var(--text-3); }
.yt-hint { display: flex; align-items: center; gap: 8px; padding: 0 32px 10px; font-size: 12.5px; }
.yt-hint .i { width: 15px; height: 15px; }
.yt-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 24px; color: var(--text-3); font-size: 13px; }
.yt-error .row-actions { margin-top: 14px; justify-content: center; }
.yt-shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 0 22px 16px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.yt-shelf .card { scroll-snap-align: start; }
.yt-badge { display: inline-flex; vertical-align: -2px; margin-right: 5px; color: var(--text-3); }
.yt-badge .i { width: 13px; height: 13px; }
.yt-badge.on { color: var(--accent); }
.yt-input { width: 300px; height: 36px; font-size: 13px; }
.yt-ok { color: #3fb950 !important; }
.yt-err { color: #f2555a !important; }
body.is-loading .play-btn { position: relative; }
body.is-loading .play-btn::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spin .8s linear infinite; pointer-events: none;
}
body.is-loading .np-title-sm::after { content: ' · loading…'; color: var(--text-3); font-weight: 400; }
/* ---------------- Trends (radio charts mixes) ---------------- */
.trend-intro { max-width: 640px; color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0; }
.trend-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 4px 32px 8px; }
.trend-card {
  display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-2); transition: background .2s, border-color .2s, box-shadow .2s;
}
.trend-card:hover { background: var(--hover); }
.trend-card.on { border-color: var(--accent-mid); box-shadow: 0 0 0 3px var(--accent-soft); }
.trend-art { position: relative; flex: 0 0 112px; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .55); }
.trend-art > .cover { width: 100%; height: 100%; }
.trend-collage { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.trend-collage .cover { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.trend-card .card-play { opacity: 1; transform: none; width: 40px; height: 40px; right: 8px; bottom: 8px; }
.trend-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trend-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.trend-sub { font-size: 13px; color: var(--text-2); }
.trend-info { padding: 6px 0 2px; }
.trend-info .section-title { margin-bottom: 4px; }
.trend-meta { margin: 0 32px; font-size: 13px; color: var(--text-2); }
.trend-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 32px 0; }
.trend-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.trend-chip.t-neu { background: color-mix(in srgb, #34d399 20%, transparent); }
.trend-chip.t-dauerbrenner { background: color-mix(in srgb, #fbbf24 20%, transparent); }
.trend-chip.t-youtube { background: color-mix(in srgb, #f87171 20%, transparent); }
.trend-chip.t-weihnachten { background: color-mix(in srgb, #22c55e 26%, transparent); }
.trend-chip.t-club { background: color-mix(in srgb, #a78bfa 24%, transparent); }
.trend-chip.t-klassiker { background: color-mix(in srgb, #f472b6 22%, transparent); }
.trend-chip.t-apres { background: color-mix(in srgb, #fb923c 22%, transparent); }
.trend-chip.t-aktuell { background: color-mix(in srgb, #f87171 22%, transparent); }
@media (max-width: 700px) {
  .trend-cards { grid-template-columns: 1fr; padding: 4px 16px 8px; }
  .trend-art { flex-basis: 88px; width: 88px; height: 88px; }
  .trend-meta, .trend-chips { margin-left: 16px; margin-right: 16px; }
}

/* ---------------- Radio: the song on air is clickable (like / add to playlist) ---------------- */
.live-song { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.live-song .live-song-plus { width: 13px; height: 13px; flex: 0 0 auto; padding: 2px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); box-sizing: content-box; }
.live-song:hover .live-song-plus { background: var(--accent); color: var(--on-accent); }
.live-song.busy { opacity: .6; pointer-events: none; }

/* Spotify import progress */
.spot-status { margin: 4px 0 12px; color: var(--text-2); }
.spot-bar { height: 6px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.spot-bar div { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }

/* ---------------- account: sign-in screen, settings, users ---------------- */
.auth-screen {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 24px; overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); animation: fadeIn .2s ease;
}
.auth-screen.out { animation: fadeOut .2s ease forwards; }
.auth-screen::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--title-h); -webkit-app-region: drag; }
.auth-screen [hidden], .settings [hidden] { display: none !important; }
.auth-orb {
  position: fixed; left: 50%; top: 42%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  filter: blur(90px); opacity: .32; pointer-events: none;
  background: conic-gradient(from 0deg, var(--accent), #38bdf8, #f472b6, var(--accent)); animation: orb 16s linear infinite;
}
.auth-card {
  position: relative; width: min(420px, 100%); padding: 30px 30px 22px; border-radius: 20px; -webkit-app-region: no-drag;
  background: var(--modal-bg); border: 1px solid var(--border-2); box-shadow: var(--shadow); user-select: none;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-logo { width: 44px; height: 44px; filter: drop-shadow(0 8px 22px var(--accent-mid)); }
.auth-brand h1 { margin: 0; font-family: var(--font-display); font-size: 30px; letter-spacing: -.03em; }
.auth-lead { margin: 12px 0 18px; color: var(--text-2); line-height: 1.55; font-size: 13.5px; }
.auth-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.auth-tabs button { flex: 1; justify-content: center; height: 32px; }
.auth-form, .auth-pw { display: grid; gap: 12px; }
.auth-field { display: grid; gap: 6px; }
.auth-field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.auth-field em { font-style: normal; font-weight: 500; color: var(--text-3); }
.auth-screen:not(.register) .reg-only { display: none; }
.auth-hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.input.bad { border-color: #f2555a; box-shadow: 0 0 0 4px color-mix(in srgb, #f2555a 18%, transparent); }
.auth-msg:empty { display: none; }
.auth-msg-in { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.auth-msg-in .i { width: 18px; height: 18px; margin-top: 1px; }
.auth-msg-in b { display: block; }
.auth-msg-in span { color: var(--text-2); }
.auth-msg-in.err { background: color-mix(in srgb, #f2555a 13%, transparent); border: 1px solid color-mix(in srgb, #f2555a 30%, transparent); }
.auth-msg-in.err .i { color: #f2555a; }
.auth-msg-in.wait { background: color-mix(in srgb, #fbbf24 13%, transparent); border: 1px solid color-mix(in srgb, #fbbf24 32%, transparent); }
.auth-msg-in.wait .i { color: #d39b0b; }
.auth-submit { margin-top: 4px; }
.btn .spinner { display: none; border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; }
.btn.busy .spinner { display: inline-block; }
.auth-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 6px 0 2px; }
.auth-done-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.auth-done-ic .i { width: 28px; height: 28px; }
.auth-done h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: 21px; }
.auth-done p { margin: 0 0 8px; color: var(--text-2); line-height: 1.55; font-size: 13.5px; }
.auth-done .auth-msg { width: 100%; text-align: left; }
.auth-link, .auth-skip { margin: 0 auto; }
.auth-foot { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.auth-server { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.auth-server .text-btn { margin-left: auto; }
.auth-server-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); user-select: text; }
.auth-server-form { display: flex; gap: 8px; }
.auth-server-form .input { height: 38px; }
.auth-skip { font-size: 13px; padding: 8px 10px; }

.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.sm .i { width: 15px; height: 15px; }
.yt-warn { color: #d39b0b !important; }
.acct { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 16px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #38bdf8)); color: var(--on-accent);
}
.role-badge, .status-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; vertical-align: 1px; background: var(--accent-soft); color: var(--text);
}
.status-badge.off { background: color-mix(in srgb, #f2555a 18%, transparent); }
.status-badge.wait { background: color-mix(in srgb, #fbbf24 22%, transparent); }
.users-sub { margin: 4px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.user-list { display: grid; gap: 4px; margin-bottom: 12px; }
.user-list.pending { padding: 6px; border-radius: 12px; background: color-mix(in srgb, #fbbf24 8%, transparent); border: 1px solid color-mix(in srgb, #fbbf24 22%, transparent); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; }
.user-row:hover { background: var(--hover); }
.user-row .avatar { width: 34px; height: 34px; font-size: 14px; }
.user-row.disabled .avatar { filter: grayscale(1); opacity: .55; }
.user-text { flex: 1; min-width: 0; }
.user-text .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text .t2 { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; gap: 6px; flex: none; }
.invite-new { display: grid; gap: 10px; margin-bottom: 14px; }
.invite-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 12.5px; }
.invite-opts .btn { margin-left: auto; }
.invite-made { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border-2); }
.invite-made-t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.invite-made-t .i { width: 16px; height: 16px; color: var(--accent); }
.invite-link { font-family: Consolas, monospace; font-size: 12.5px; word-break: break-all; user-select: text; color: var(--text-2); }
.invite-code { font-family: Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .12em; user-select: text; }
.invite-copy { display: flex; flex-wrap: wrap; gap: 8px; }
.invite-row .avatar .i { width: 16px; height: 16px; }
.invite-row:not(.open) .avatar { filter: grayscale(1); opacity: .55; }
.invite-input { text-transform: uppercase; letter-spacing: .08em; font-family: Consolas, monospace; }
.invite-input::placeholder { text-transform: none; letter-spacing: normal; }
.auth-hint.invite-hint { margin-top: -6px; }
.settings .admin-only { display: none; }
#btnSettings .badge { top: 0; right: -2px; }
.trend-chip.t-favorit { background: color-mix(in srgb, #f472b6 22%, transparent); }
.trend-chip.t-entdeckung { background: color-mix(in srgb, #2dd4bf 22%, transparent); }
.setting .row-actions { flex: none; }
.setting .row-actions .btn, .user-actions .btn { white-space: nowrap; }

/* ---------------- Aurora Connect: devices button, "Playing on …", remote queue ---------------- */
#btnDevices { display: none; }
body.connect-on #btnDevices { display: inline-grid; }
#btnDevices.on { color: var(--accent); background: var(--accent-soft); }
#btnDevices.on .i { animation: connectPulse 2.4s ease-in-out infinite; }
@keyframes connectPulse { 50% { opacity: .55; } }
.np-remote {
  display: none; align-items: center; gap: 5px; margin-top: 4px; min-width: 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: var(--accent);
}
.np-remote .i { width: 13px; height: 13px; flex: none; }
.np-remote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.connect-remote .np-remote { display: flex; }
body.connect-remote .player::before { height: 2px; top: -2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
body.connect-remote .np-cover { box-shadow: 0 0 0 2px var(--accent-mid), 0 6px 18px rgba(0, 0, 0, .4); }
.q-remote {
  display: flex; align-items: center; gap: 10px; margin: 4px 4px 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-mid); font-size: 12.5px; color: var(--text-2);
}
.q-remote .i { width: 18px; height: 18px; color: var(--accent); }
.q-remote b { color: var(--text); }
.q-item.foreign .cover, .q-item.foreign .t1 { opacity: .55; }
.q-item.foreign .t2 { font-style: italic; }
body.mini .np-remote { margin-top: 2px; font-size: 10.5px; }

/* ---------------- Aurora Jam: player bar pill, entry cards, "Added by", the Jam sheet ---------------- */
.np-tags { display: flex; align-items: center; gap: 8px; min-width: 0; }
.np-tags .np-remote { min-width: 0; }
.np-jam {
  display: inline-flex; align-items: center; gap: 5px; flex: none; height: 21px; margin-top: 4px; padding: 0 9px 0 7px; border-radius: 999px;
  font-size: 11px; font-weight: 750; letter-spacing: .02em; color: var(--on-accent); background: var(--accent);
  box-shadow: 0 4px 14px -6px var(--accent); transition: filter .15s, transform .1s;
}
.np-jam[hidden] { display: none; }
.np-jam .i { width: 13px; height: 13px; flex: none; }
.np-jam:hover { filter: brightness(1.08); }
.np-jam:active { transform: scale(.96); }
body.mini .np-jam { display: none; }
html.l-phone body:not(.np-open) .np-jam { height: 18px; margin-top: 2px; padding: 0 7px 0 6px; font-size: 10.5px; }
html.l-phone body:not(.np-open) .np-jam .i { width: 11px; height: 11px; }

.jam-card {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 8px); margin: 4px 4px 8px; padding: 10px 12px; border-radius: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: background .15s, border-color .15s;
}
.jam-card:hover { background: var(--hover); border-color: var(--border-2); }
.jam-card > .i { width: 32px; height: 32px; padding: 7px; border-radius: 50%; flex: none; color: var(--accent); background: var(--accent-soft); }
.jam-card-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.jam-card-text b { color: var(--text); font-size: 13.5px; font-weight: 650; }
.jam-card-text span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-card .jam-chev { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.jam-card.on { background: var(--accent-soft); border-color: var(--accent-mid); }
.jam-card.on > .i { background: var(--accent); color: var(--on-accent); }
.jam-card-go { flex: none; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--surface); }
.jam-card.jam-dev { width: 100%; margin: 14px 0 4px; }
/* Now Playing sits on a dark, blurred cover in both themes */
.nowplaying .jam-card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.nowplaying .jam-card:hover { background: rgba(255, 255, 255, .1); }
.nowplaying .jam-card.on { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
.nowplaying .jam-card > .i { background: rgba(255, 255, 255, .12); color: #fff; }
.nowplaying .jam-card.on > .i { background: #fff; color: #111; }
.nowplaying .jam-card-go { color: #fff; background: rgba(255, 255, 255, .14); }

.q-item.jam-row { height: 64px; }
.jam-by { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.jam-by span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-by.mix .i { width: 12px; height: 12px; flex: none; color: var(--accent); }
.nowplaying .jam-by.mix .i { color: #fff; }

.jam-av {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; font-weight: 750; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, hsl(var(--h, 260) 62% 54%), hsl(calc(var(--h, 260) + 40) 66% 42%));
}
.jam-av.xs { width: 15px; height: 15px; font-size: 7.5px; letter-spacing: 0; }

.modal.jam-modal { width: min(480px, 100%); }
.jam-hero { display: flex; align-items: center; gap: 20px; padding: 6px 0 2px; }
.jam-qr {
  flex: none; width: 168px; height: 168px; padding: 10px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px var(--border-2), 0 12px 32px -14px rgba(0, 0, 0, .5);
}
.jam-qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.jam-join { flex: 1; min-width: 0; }
.jam-kicker { font-size: 12px; font-weight: 600; color: var(--text-3); }
.jam-code { margin: 4px 0 2px; font-family: var(--font-display); font-size: 34px; font-weight: 750; letter-spacing: .14em; color: var(--text); user-select: text; }
.jam-url { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.jam-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jam-note {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
}
.jam-note .i { width: 16px; height: 16px; flex: none; color: var(--accent); }
.jam-setting { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; }
.jam-setting-text { flex: 1; min-width: 0; }
.jam-setting-text .s-title, .jam-setting-text .s-desc { display: block; }
.jam-people-head { padding: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.jam-people-head .muted { font-weight: 500; }
.jam-people { display: grid; gap: 2px; }
.jam-person { display: flex; align-items: center; gap: 12px; margin: 0 -8px; padding: 7px 8px; border-radius: 10px; }
.jam-person:hover { background: var(--hover); }
.jam-person-text { flex: 1; min-width: 0; }
.jam-person-text .t2 { font-size: 12px; color: var(--text-3); }
.jam-empty { padding: 8px 0 2px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.jam-actions .btn .i { width: 16px; height: 16px; }
html.l-phone .jam-hero { flex-direction: column; gap: 14px; text-align: center; }
html.l-phone .jam-qr { width: min(220px, 62vw); height: min(220px, 62vw); }
html.l-phone .jam-join { width: 100%; }
html.l-phone .jam-links { justify-content: center; }
html.l-phone .jam-actions .btn { flex: 1; height: 44px; }
html.l-phone .jam-person .btn { height: 36px; }

/* ---------------- Wrapped (Aurora Wrapped: yearly recap story) ---------------- */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #7c3aed; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #ec4899; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #22d3ee; }

/* entry points: sidebar item, Discover banner, Trends card */
.nav-item[hidden] { display: none; }
.nav-wrapped { color: var(--text); }
.nav-wrapped .i { color: #f472b6; }
.nav-wrapped span { background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
:root[data-theme="light"] .nav-wrapped span { background-image: linear-gradient(90deg, #7c3aed, #db2777, #d97706); }
.wr-banner {
  position: relative; display: flex; align-items: center; gap: 20px; width: calc(100% - 64px); margin: 0 32px 18px; padding: 22px 26px;
  border-radius: 20px; overflow: hidden; text-align: left; color: #fff; isolation: isolate; box-shadow: 0 18px 50px -18px rgba(124, 58, 237, .7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wr-banner:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -18px rgba(236, 72, 153, .7); }
.wr-banner-bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #4c1d95, #be185d 55%, #0e7490); background-size: 200% 200%; animation: wr-shift 9s ease-in-out infinite alternate; overflow: hidden; }
.wr-banner-bg i { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; filter: blur(34px); opacity: .7; animation: wr-drift 12s ease-in-out infinite alternate; }
.wr-banner-bg i:nth-child(1) { background: #f472b6; left: -10%; top: -60%; }
.wr-banner-bg i:nth-child(2) { background: #22d3ee; right: -15%; top: -20%; animation-delay: -4s; }
.wr-banner-bg i:nth-child(3) { background: #fbbf24; left: 30%; bottom: -80%; animation-delay: -8s; }
.wr-banner-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.wr-banner-kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.wr-banner-title { font-family: var(--font-display); font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.wr-banner-sub { font-size: 13.5px; opacity: .88; }
.wr-banner-go { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: #1a1030; font-weight: 800; }
.wr-banner-go .i { width: 16px; height: 16px; }
.wr-card .wr-card-art { display: grid; place-items: center; color: #fff; isolation: isolate; }
.wr-card .wr-card-art b { font-family: var(--font-display); font-size: 30px; font-weight: 900; letter-spacing: -.03em; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.wr-card .trend-title { background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .wr-card .trend-title { background-image: linear-gradient(90deg, #7c3aed, #db2777, #d97706); }
@media (max-width: 700px) {
  .wr-banner { width: calc(100% - 32px); margin: 0 16px 16px; flex-wrap: wrap; padding: 18px; }
  .wr-banner-title { font-size: 22px; }
}

/* the story overlay: a 9:16 frame in the middle (desktop), full screen on phones */
.wr {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; color: #fff;
  opacity: 0; transition: opacity .3s ease; font-family: var(--font);
}
.wr.in { opacity: 1; }
.wr.out { opacity: 0; pointer-events: none; }
.wr-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 10, .86); overflow: hidden; }
.wr-backdrop::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: var(--title-h); -webkit-app-region: drag; z-index: 1; }
.wr-backdrop-img {
  position: absolute; inset: -12%; background-size: cover; background-position: center; opacity: .75;
  filter: blur(80px) saturate(1.6) brightness(.5); transition: background-image .6s ease;
  background-color: rgba(76, 29, 149, .35);
}
.wr-frame {
  --c1: #7c3aed; --c2: #ec4899; --c3: #22d3ee;
  position: relative; z-index: 1; overflow: hidden; outline: none;
  width: min(calc((100vh - 2 * var(--title-h)) * 9 / 16), calc(100vw - 32px), 560px); aspect-ratio: 9 / 16;
  border-radius: 24px; container-type: size; touch-action: none; user-select: none; cursor: pointer;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translateY(18px) scale(.97);
  transition: --c1 .9s ease, --c2 .9s ease, --c3 .9s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.wr.in .wr-frame { transform: none; }
.wr-bg {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(155deg, var(--c1), var(--c2) 55%, var(--c3)); background-size: 220% 220%;
  animation: wr-shift 14s ease-in-out infinite alternate;
}
.wr-blob { position: absolute; width: 85cqw; aspect-ratio: 1; border-radius: 50%; filter: blur(9cqw); opacity: .75; mix-blend-mode: screen; animation: wr-drift 16s ease-in-out infinite alternate; }
.wr-blob.b1 { background: var(--c3); left: -30cqw; top: -15cqh; }
.wr-blob.b2 { background: var(--c1); right: -35cqw; top: 30cqh; animation-delay: -5s; animation-duration: 19s; }
.wr-blob.b3 { background: var(--c2); left: -10cqw; bottom: -25cqh; animation-delay: -10s; animation-duration: 22s; }
.wr-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .42)), linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 18%, transparent 80%, rgba(0, 0, 0, .3)); }
@keyframes wr-shift { 0% { background-position: 0% 30%; } 100% { background-position: 100% 70%; } }
@keyframes wr-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 6%) scale(1.12); } 100% { transform: translate(-6%, 10%) scale(.92); } }

.wr-segs { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3; display: flex; gap: 4px; pointer-events: none; }
.wr-seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .32); overflow: hidden; }
.wr-seg i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; border-radius: 3px; }
.wr-tools { position: absolute; top: 24px; right: 8px; z-index: 4; display: flex; gap: 2px; }
.wr-tool { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .4)); transition: background .15s; cursor: pointer; }
.wr-tool:hover { background: rgba(255, 255, 255, .16); }
.wr-tool .i { width: 20px; height: 20px; }
.wr-tool.busy { opacity: .5; pointer-events: none; }
.wr-tool[hidden] { display: none; }
.wr-stage { position: absolute; inset: 0; z-index: 2; padding: 76px 7cqw 46px; }
.wr-foot { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; text-align: center; font-size: max(10px, 2.4cqw); opacity: .75; pointer-events: none; }
.wr-slide { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.wr-loading { align-items: center; gap: 16px; font-size: 4cqw; }
.wr-loading .spinner { width: 36px; height: 36px; border-width: 3px; border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }

/* type */
.wr-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqh; }
.wr-col { display: flex; flex-direction: column; gap: 1.8cqh; }
.wr-center-x { align-items: center; text-align: center; }
.wr-kicker { font-size: max(11px, 3.1cqw); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.wr-mega { margin: 0; display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 900; font-size: 19cqw; line-height: .9; letter-spacing: -.05em; }
.wr-mega-name { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 11cqw; line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.wr-grad { background: linear-gradient(90deg, #fff, #fde68a, #fbcfe8, #fff); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wr-shine 4s linear infinite; }
@keyframes wr-shine { to { background-position: 200% center; } }
.wr-big { font-family: var(--font-display); font-weight: 900; font-size: 24cqw; line-height: .95; letter-spacing: -.05em; font-variant-numeric: tabular-nums; text-shadow: 0 6px 40px rgba(0, 0, 0, .25); }
.wr-h { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 7.6cqw; line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.wr-h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 6.4cqw; letter-spacing: -.02em; }
.wr-lead { margin: 0; font-size: 4.3cqw; line-height: 1.35; font-weight: 600; opacity: .95; }
.wr-small { margin: 0; font-size: 3.4cqw; line-height: 1.4; opacity: .85; }
.wr-hint { margin: 3cqh 0 0; font-size: 3cqw; opacity: .7; }
.wr-hl { padding: 0 .18em; border-radius: .2em; background: rgba(255, 255, 255, .92); color: #1a1030; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.wr-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wr-chip { padding: .45em .9em; border-radius: 999px; background: rgba(0, 0, 0, .22); backdrop-filter: blur(8px); font-size: 3.6cqw; font-weight: 600; }
.wr-badge { margin: 1cqh 0 0; padding: .7em 1em; border-radius: 16px; background: #fff; color: #1a1030; font-size: 3.9cqw; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.wr-emoji { width: 22cqw; height: 22cqw; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.wr-emoji .i { width: 11cqw; height: 11cqw; }

/* art */
.wr-art { display: block; object-fit: cover; border-radius: 8%; background: rgba(0, 0, 0, .2); }
.wr-art.ph { display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 50) 70% 35%)); }
.wr-art.ph .i { width: 40%; height: 40%; opacity: .8; }
.wr-art.round { border-radius: 50%; }
.wr-cover-big { width: 58cqw; aspect-ratio: 1; margin: 1cqh 0; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .45)); }
.wr-cover-big .wr-art { width: 100%; height: 100%; }
.wr-cover-big.round .wr-art { border-radius: 50%; }

/* lists */
.wr-list { list-style: none; margin: 1cqh 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.4cqh; }
.wr-list li { display: flex; align-items: center; gap: 3cqw; padding: 1.6cqw; border-radius: 16px; background: rgba(0, 0, 0, .2); backdrop-filter: blur(8px); }
.wr-list li:first-child { background: rgba(255, 255, 255, .92); color: #1a1030; }
.wr-rank { width: 7cqw; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 6.4cqw; flex: none; }
.wr-art.sm { width: 13cqw; height: 13cqw; flex: none; }
.wr-li-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wr-li-text b { font-size: 4.2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-li-text span { font-size: 3.3cqw; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-li-val { font-size: 3.4cqw; font-weight: 700; opacity: .85; flex: none; }
.wr-bars-list { list-style: none; margin: 1cqh 0 0; padding: 0; display: flex; flex-direction: column; gap: 2cqh; }
.wr-bars-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 4.4cqw; font-weight: 700; }
.wr-bl-bar { grid-column: 1 / -1; height: 2.6cqw; border-radius: 99px; background: rgba(0, 0, 0, .22); overflow: hidden; order: 3; }
.wr-bl-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: #fff; transform-origin: left; animation: wr-grow 1.1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
.wr-bars-list li:first-child .wr-bl-name { font-size: 6cqw; font-family: var(--font-display); font-weight: 900; }
@keyframes wr-grow { from { transform: scaleX(0); } }

.wr-decades { display: flex; align-items: flex-end; justify-content: center; gap: 2.4cqw; height: 22cqh; margin-top: 1cqh; }
.wr-dec { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 3.2cqw; font-weight: 700; }
.wr-dec i { width: 8cqw; height: calc(var(--v) * 85%); min-height: 6px; border-radius: 8px 8px 3px 3px; background: rgba(255, 255, 255, .45); transform-origin: bottom; animation: wr-rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 500ms); }
.wr-dec.on i { background: #fff; box-shadow: 0 0 24px rgba(255, 255, 255, .6); }
@keyframes wr-rise { from { transform: scaleY(0); } }

.wr-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 3cqw; margin-top: 1.5cqh; }
.wr-face { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 16cqw; font-size: 2.8cqw; font-weight: 600; }
.wr-face .wr-art { width: 14cqw; height: 14cqw; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.wr-face span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* listening clock + top day + top month */
.wr-clock { position: relative; width: 62cqw; aspect-ratio: 1; align-self: center; }
.wr-clock svg { width: 100%; height: 100%; overflow: visible; }
.wr-clock rect { fill: rgba(255, 255, 255, .5); animation: wr-fade .6s ease both; animation-delay: calc(var(--i) * 40ms + 300ms); }
.wr-clock rect.pk { fill: #fff; filter: drop-shadow(0 0 6px #fff); }
.wr-clock text { fill: rgba(255, 255, 255, .8); font-size: 11px; font-weight: 700; text-anchor: middle; }
.wr-clock-face { fill: rgba(0, 0, 0, .22); }
.wr-clock-mid { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.wr-clock-mid b { max-width: 22cqw; text-align: center; font-size: 2.6cqw; line-height: 1.15; }
.wr-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; }
.wr-duo:has(> :only-child) { grid-template-columns: 1fr; }
.wr-tile { display: flex; flex-direction: column; gap: 3px; padding: 3cqw; border-radius: 16px; background: rgba(0, 0, 0, .22); backdrop-filter: blur(8px); min-width: 0; }
.wr-tile span { font-size: 2.8cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.wr-tile b { font-family: var(--font-display); font-size: 4.8cqw; font-weight: 900; line-height: 1.1; }
.wr-tile em { font-style: normal; font-size: 3cqw; opacity: .85; }
.wr-months { display: flex; align-items: flex-end; gap: 2px; height: 9cqw; margin-top: 4px; }
.wr-months i { flex: 1; height: calc(var(--v) * 100%); min-height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .45); transform-origin: bottom; animation: wr-rise .8s ease both; animation-delay: calc(var(--i) * 50ms + 700ms); }
.wr-months i.on { background: #fff; }

/* listener type */
.wr-code { display: flex; gap: 2cqw; justify-content: center; }
.wr-code span { width: 15cqw; height: 18cqw; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .92); color: #1a1030; font-family: var(--font-display); font-size: 11cqw; font-weight: 900; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.wr-axes { display: flex; flex-direction: column; gap: 1.8cqh; width: 100%; margin-top: 1cqh; text-align: left; }
.wr-axis-labels { display: flex; justify-content: space-between; font-size: 3.2cqw; margin-bottom: 5px; }
.wr-axis-labels span { opacity: .7; }
.wr-axis-labels .on { opacity: 1; font-weight: 800; }
.wr-axis-track { position: relative; height: 1.6cqw; border-radius: 99px; background: rgba(0, 0, 0, .25); }
.wr-axis-track i { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 5cqw; height: 5cqw; margin: -2.5cqw 0 0 -2.5cqw; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); animation: wr-knob 1.2s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .9s; }
@keyframes wr-knob { from { left: 50%; opacity: 0; } }

/* summary card */
.wr-summary { display: flex; flex-direction: column; gap: 2.4cqh; padding: 5cqw; border-radius: 22px; background: rgba(10, 8, 24, .38); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.wr-sum-head { display: flex; align-items: center; gap: 4cqw; }
.wr-sum-head b { display: block; font-family: var(--font-display); font-size: 7cqw; font-weight: 900; line-height: 1; letter-spacing: -.03em; margin-top: 4px; }
.wr-art.wr-sum-cover { width: 26cqw; height: 26cqw; flex: none; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.wr-sum-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.wr-sum-cols > * { min-width: 0; }
.wr-sum-cols h4, .wr-sum-stats span { margin: 0 0 4px; font-size: 2.8cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.wr-sum-cols ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 3px; font-size: 3.5cqw; font-weight: 700; }
.wr-sum-cols li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-sum-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqh 4cqw; }
.wr-sum-stats .wide { grid-column: 1 / -1; }
.wr-sum-stats span { display: block; }
.wr-sum-stats b { font-family: var(--font-display); font-size: 6.4cqw; font-weight: 900; letter-spacing: -.02em; }

/* outro buttons */
.wr-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 2cqh; }
.wr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: max(13px, 3.6cqw); background: rgba(0, 0, 0, .25); color: #fff; backdrop-filter: blur(8px); transition: transform .15s, background .15s; cursor: pointer; }
.wr-btn:hover { transform: scale(1.02); background: rgba(0, 0, 0, .35); }
.wr-btn.primary { background: #fff; color: #1a1030; }
.wr-btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }
.wr-btn .i { width: 18px; height: 18px; flex: none; }
.wr-btn.busy { opacity: .6; pointer-events: none; }
.wr-btn:disabled { opacity: .85; }

/* entrance animations (staggered by --i) */
.wr-in { animation: wr-up .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 120ms + 80ms); }
.wr-pop { animation: wr-pop .7s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--i, 0) * 120ms + 80ms); }
.wr-word { display: block; animation: wr-word .8s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i, 0) * 150ms + 100ms); }
.wr-slide-in { animation: wr-from-right .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 130ms + 100ms); }
.wr-spin { animation: wr-spin 1s cubic-bezier(.2, .9, .25, 1.05) both; animation-delay: .15s; }
.wr-slide { animation: wr-fade .35s ease both; }
@keyframes wr-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes wr-pop { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: none; } }
@keyframes wr-word { from { opacity: 0; transform: translateY(60%) skewY(6deg); } }
@keyframes wr-from-right { from { opacity: 0; transform: translateX(40%); } }
@keyframes wr-spin { from { opacity: 0; transform: rotate(-14deg) scale(.6); } }
@keyframes wr-fade { from { opacity: 0; } }
/* holding (or Space) pauses everything that moves */
.wr.paused .wr-frame *, .wr.paused .wr-bg { animation-play-state: paused !important; }

/* phones (Aurora Web): the story fills the screen */
@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  .wr-frame { width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
  .wr-stage { padding: calc(64px + env(safe-area-inset-top)) 6vw calc(40px + env(safe-area-inset-bottom)); }
  .wr-segs { top: calc(10px + env(safe-area-inset-top)); }
  .wr-tools { top: calc(20px + env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
  .wr-bg, .wr-blob, .wr-grad, .wr-banner-bg, .wr-banner-bg i { animation: none !important; }
  .wr-in, .wr-pop, .wr-word, .wr-slide-in, .wr-spin, .wr-slide, .wr-bl-bar i, .wr-dec i, .wr-months i, .wr-clock rect, .wr-axis-track i { animation: wr-fade .2s ease both !important; animation-delay: 0s !important; }
  .wr, .wr-frame { transition: none; }
}

/* =====================================================================================
   Responsive layout. layout.js sets one stage class on <html>: l-phone (< 640 px),
   l-tablet (640–1023), l-laptop (1024–1279), l-desktop (>= 1280) or l-mini (mini player),
   plus l-short (height < 600), np-stack (Now Playing as a vertical stack) and touch.
   ===================================================================================== */
.nav-toggle, .tabbar, .c-more, .ctx-scrim { display: none; }
.main { container: main / inline-size; }

/* song list columns follow the width of the content area (sidebar / panel open or not) */
@container main (max-width: 860px) {
  .c-col4, .tl-head .c-col4 { display: none; }
  .tl-head, .row { grid-template-columns: 44px minmax(0, 5fr) minmax(0, 3fr) 34px 58px; }
}
@container main (max-width: 600px) {
  .c-album, .tl-head .c-album { display: none; }
  .tl-head, .row { grid-template-columns: 40px minmax(0, 1fr) 34px 54px; }
  .tl { padding: 0 10px; }
  .tl-head { margin: 0 -10px 8px; padding: 0 22px; }
}
@container main (max-width: 720px) {
  .hero { padding: 28px 20px 20px; gap: 20px; }
  .hero-art { width: 150px; height: 150px; }
  .actions, .toolbar, .yt-hint { padding-left: 20px; padding-right: 20px; }
  .yt-head { padding: 28px 20px 18px; }
  .section-title { margin-left: 20px; margin-right: 20px; }
  .live-hint { padding-left: 20px; padding-right: 20px; }
  .trend-cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); padding: 4px 20px 8px; }
  .trend-meta, .trend-chips { margin-left: 20px; margin-right: 20px; }
  .wr-banner { width: calc(100% - 40px); margin: 0 20px 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 0 12px 20px; }
  .yt-shelf { grid-auto-columns: 150px; padding: 0 12px 16px; }
  .welcome { padding: 28px 20px; }
  .welcome h1 { font-size: 34px; }
  .welcome-actions { flex-wrap: wrap; justify-content: center; }
}

/* touch: what only shows on hover is always there */
@media (pointer: coarse) {
  .row-fav, .q-grip, .folder-row .icon-btn { opacity: 1; }
  .card-play { opacity: 1; transform: none; }
  .q-rm { display: grid; }
  .q-dur { display: none; }
  body { -webkit-touch-callout: none; }
}
.q-grip { touch-action: none; }
.q-item.grip-drag { opacity: .45; }

/* ---------------- laptop ---------------- */
html.l-laptop { --side-w: 220px; --tp-min: 320px; }
html.l-laptop .player { gap: 14px; }

/* ---------------- side panel as an overlay (laptop, tablet) ---------------- */
html.l-laptop body.panel-open, html.l-tablet body.panel-open { --panel-w: 0px; }
html.l-laptop body.panel-open .main, html.l-tablet body.panel-open .main { margin-right: 0; }
html.l-laptop .panel, html.l-tablet .panel {
  position: fixed; z-index: 7; top: var(--title-h); right: 0; bottom: var(--player-h); width: min(360px, calc(100vw - 24px)); padding: 0 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(24px); border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .6);
  transform: translateX(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s;
}
html.l-laptop body.panel-open .panel, html.l-tablet body.panel-open .panel { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
html.l-laptop .panel-tabs, html.l-tablet .panel-tabs { padding-top: 10px; min-width: 0; }
html.l-laptop .panel-body, html.l-tablet .panel-body { min-width: 0; }

/* ---------------- tablet: icon rail, opens as an overlay ---------------- */
html.l-tablet { --side-w: 72px; --tp-min: 220px; }
html.l-tablet .nav-toggle { display: inline-grid; margin-left: -6px; }
html.l-tablet .brand { width: auto; }
html.l-tablet .brand span { display: none; }
html.l-tablet .player { gap: 12px; padding: 0 12px; }
html.l-tablet .np-cover { width: 50px; height: 50px; }
html.l-tablet .np-mini { gap: 10px; }
html.l-tablet body:not(.nav-open) .sidebar { padding: 6px 8px 10px; }
html.l-tablet body:not(.nav-open) .nav { margin-right: -4px; padding-right: 0; scrollbar-width: none; }
html.l-tablet body:not(.nav-open) .nav::-webkit-scrollbar { display: none; }
html.l-tablet body:not(.nav-open) .nav-item { justify-content: center; padding: 0; height: 44px; }
html.l-tablet body:not(.nav-open) .nav-item span { display: none; }
html.l-tablet body:not(.nav-open) .nav-item .i { width: 21px; height: 21px; }
html.l-tablet body:not(.nav-open) .nav-item.active::before { left: -8px; }
html.l-tablet body:not(.nav-open) .nav-label { font-size: 0; height: 1px; margin: 10px 10px; background: var(--border); }
html.l-tablet body:not(.nav-open) .nav-label:first-child { display: none; }
html.l-tablet body:not(.nav-open) .nav-label-actions, html.l-tablet body:not(.nav-open) .nav-empty, html.l-tablet body:not(.nav-open) .scan { display: none; }
html.l-tablet body:not(.nav-open) #btnAddFolder { font-size: 0; gap: 0; padding: 0; }
html.l-tablet body:not(.nav-open) .foot-row { flex-direction: column; align-items: center; gap: 2px; }
html.l-tablet body:not(.nav-open) #btnOpenFiles, html.l-tablet body:not(.nav-open) #btnShortcuts { display: none; }
html.l-tablet.l-short body:not(.nav-open) .sidebar-foot { display: none; }
html.l-tablet body.nav-open .sidebar {
  position: fixed; z-index: 30; top: var(--title-h); left: 0; bottom: var(--player-h); width: 270px;
  background: var(--elev); border-right: 1px solid var(--border); box-shadow: 30px 0 80px -20px rgba(0, 0, 0, .5); animation: railIn .22s ease;
}
@keyframes railIn { from { transform: translateX(-30px); opacity: 0; } }

/* ---------------- phone: tab bar, mini player, single column ---------------- */
html.l-phone { --title-h: 48px; --tab-h: 58px; --bottom-h: calc(var(--tab-h) + 78px + env(safe-area-inset-bottom)); }
html.l-phone body {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--title-h) minmax(0, 1fr) auto auto;
  grid-template-areas: "title" "main" "player" "tabs";
}
html.l-phone .sidebar, html.l-phone .panel, html.l-phone .brand span, html.l-phone .search kbd { display: none; }
html.l-phone .titlebar { gap: 6px; padding-left: 8px; }
html.l-phone .brand { width: auto; flex: 1; min-width: 0; }
html.l-phone .nav-back:disabled { display: none; }
html.l-phone .main { border-radius: 0; border-left: 0; border-right: 0; }
/* search: an icon that opens into a field */
html.l-phone .search { flex: 0 0 36px; height: 36px; padding: 0; justify-content: center; border-color: transparent; background: none; cursor: pointer; }
html.l-phone .search .i { width: 20px; height: 20px; color: var(--text-2); }
html.l-phone .search input { width: 0; flex: 0 0 0; opacity: 0; }
html.l-phone .search:focus-within, html.l-phone .search.has-q {
  flex: 1 1 auto; justify-content: flex-start; padding: 0 12px; background: var(--surface); border-color: var(--border); cursor: text;
}
html.l-phone .search:focus-within input, html.l-phone .search.has-q input { flex: 1 1 auto; opacity: 1; font-size: 16px; }
html.l-phone .titlebar:has(.search:focus-within) .brand, html.l-phone .titlebar:has(.search.has-q) .brand { display: none; }

/* tab bar */
html.l-phone .tabbar {
  grid-area: tabs; position: relative; z-index: 9; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--player-bg); backdrop-filter: blur(30px) saturate(1.6); border-top: 1px solid var(--border);
}
.tab-item { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); min-width: 0; }
.tab-item .i { width: 23px; height: 23px; }
.tab-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-item.on { color: var(--accent); }
.tab-item:active .i { transform: scale(.9); }

/* mini player above the tab bar */
html.l-phone body:not(.np-open) .player {
  display: flex; align-items: center; gap: 4px; height: 64px; margin: 6px 8px; padding: 0 6px 0 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--elev) 88%, var(--accent) 12%); border: 1px solid var(--border-2); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  overflow: hidden; cursor: pointer;
}
html.l-phone body:not(.np-open) .player::before { display: none; }
html.l-phone body:not(.np-open) .np-mini { flex: 1; gap: 10px; }
html.l-phone body:not(.np-open) .np-cover { width: 46px; height: 46px; border-radius: 8px; pointer-events: none; }
html.l-phone body:not(.np-open) .np-cover-hint { display: none; }
html.l-phone body:not(.np-open) .np-mini .link { pointer-events: none; }
html.l-phone body:not(.np-open) .np-title-sm { font-size: 14px; }
html.l-phone body:not(.np-open) .np-remote { margin-top: 1px; }
html.l-phone body:not(.np-open) .fav-btn, html.l-phone body:not(.np-open) .extras,
html.l-phone body:not(.np-open) .time, html.l-phone body:not(.np-open) .seek-thumb, html.l-phone body:not(.np-open) .seek-tip, html.l-phone body:not(.np-open) #btnShuffle,
html.l-phone body:not(.np-open) #btnRepeat, html.l-phone body:not(.np-open) #btnPrev { display: none; }
html.l-phone body:not(.np-open) .transport-buttons { gap: 0; }
html.l-phone body:not(.np-open) .play-btn { width: 40px; height: 40px; background: none; color: var(--text); box-shadow: none; }
html.l-phone body:not(.np-open) .play-btn .i { width: 24px; height: 24px; }
html.l-phone body:not(.np-open) .transport-buttons .icon-btn { width: 44px; height: 44px; }
/* the progress bar turns into a thin line along the bottom edge */
html.l-phone body:not(.np-open) .progress-row { position: absolute; left: 10px; right: 10px; bottom: 0; width: auto; pointer-events: none; }
html.l-phone body:not(.np-open) .seek { height: 2px; }
html.l-phone body:not(.np-open) .seek-track { height: 2px !important; }

/* lists */
html.l-phone .tl { padding: 0 6px; }
html.l-phone .tl-head { display: none; }
html.l-phone .row { grid-template-columns: minmax(0, 1fr) 36px 36px; height: 60px; padding: 0 2px 0 10px; column-gap: 4px; font-size: 14px; }
html.l-phone .tl.numbered .row { grid-template-columns: 26px minmax(0, 1fr) 36px 36px; }
html.l-phone .row .c-num, html.l-phone .row .c-album, html.l-phone .row .c-col4, html.l-phone .row .c-dur { display: none; }
html.l-phone .tl.numbered .row .c-num { display: grid; }
html.l-phone .row .c-more, html.l-phone .row .c-fav { display: grid; place-items: center; }
html.l-phone .row .cover.xs { width: 46px; height: 46px; }
html.l-phone .row-fav { opacity: 1; }
html.l-phone .row .t1 { font-size: 15px; }
html.l-phone .row .t2 { font-size: 13px; }
html.l-phone .hero { flex-direction: column; align-items: flex-start; padding: 20px 16px 16px; gap: 16px; }
html.l-phone .hero.with-art { align-items: center; text-align: center; }
html.l-phone .hero.with-art .hero-sub { justify-content: center; }
html.l-phone .hero-art { width: min(52vw, 200px); height: min(52vw, 200px); }
html.l-phone .hero-title { font-size: clamp(28px, 8.5vw, 40px); }
html.l-phone .actions { padding: 2px 16px 14px; }
html.l-phone .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; padding: 0 6px 18px; }
html.l-phone .card { padding: 10px; }
html.l-phone .card-play { width: 40px; height: 40px; right: 8px; bottom: 8px; }
html.l-phone .folder-row .folder-count { display: none; }
html.l-phone .yt-search { flex-basis: 100%; }
html.l-phone .wr-banner-go { display: none; }
html.l-phone .toolbar { overflow-x: auto; }

/* Library / Playlists pages (phone tabs; reachable on every size) */
.lib-list { display: grid; gap: 2px; padding: 0 12px 20px; }
.lib-head { margin: 18px 8px 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.lib-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 7px 10px; border-radius: 12px; text-align: left; color: var(--text); font-weight: 600; font-size: 15px; }
.lib-row:hover, .lib-row:active { background: var(--hover); }
.lib-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); overflow: hidden; }
.lib-ic .cover, .lib-ic .mosaic, .lib-ic .smart-art { width: 100%; height: 100%; border-radius: 0; }
.lib-ic .smart-art .i { width: 50%; height: 50%; }
.lib-ic > .i { width: 22px; height: 22px; }
.lib-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-count { color: var(--text-3); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lib-row > .i:last-child { width: 18px; height: 18px; color: var(--text-3); }

/* ---------------- menus: bottom sheet on phones and for touch ---------------- */
.ctx.sheet {
  left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; min-width: 0; max-height: 72vh; max-height: 72dvh; overflow-y: auto;
  padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; border-bottom: 0; font-size: 15px;
  overscroll-behavior: contain;
}
.ctx.sheet.open { animation: sheetUp .24s cubic-bezier(.2, .9, .3, 1); }
.ctx.sheet::before { content: ''; display: block; width: 38px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: var(--border-2); }
.ctx.sheet .ctx-item { height: auto; min-height: 50px; gap: 14px; padding: 0 12px; }
.ctx.sheet .ctx-item .i { width: 20px; height: 20px; }
.ctx.sheet .ctx-label { max-width: none; }
.ctx.sheet .ctx-sub { display: none !important; }
.ctx-scrim.open { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, .4); animation: fadeIn .2s ease; }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* ---------------- dialogs on phones: sheets from the bottom ---------------- */
html.l-phone .modal-wrap { padding: 0; place-items: end stretch; }
html.l-phone .modal, html.l-phone .modal.wide {
  width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - env(safe-area-inset-top) - 12px); border-radius: 20px 20px 0 0; border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom); animation: sheetUp .26s cubic-bezier(.2, .9, .3, 1);
}
html.l-phone .modal-head { padding: 14px 10px 6px 18px; }
html.l-phone .modal-body { padding: 6px 18px 20px; }
html.l-phone .setting, html.l-tablet .setting { flex-wrap: wrap; gap: 10px 24px; }
html.l-phone .setting > :first-child { flex: 1 1 100%; }
html.l-phone .setting .slider-val, html.l-phone .setting .yt-input { flex: 1 1 100%; width: 100%; }
html.l-phone .slider-val .range { flex: 1; width: auto; }
html.l-phone .setting .row-actions { flex-wrap: wrap; }
html.l-phone .props dl { grid-template-columns: 92px 1fr; }
html.l-phone .eq-top { flex-direction: column; gap: 12px; }
.eq-graph { overflow-x: auto; }
.eq-bands { min-width: 400px; }

/* equalizer on phones: one row per band, sliders lying down */
html.l-phone .eq-graph { padding: 6px 12px; overflow: visible; }
html.l-phone .eq-curve { display: none; }
html.l-phone .eq-bands { grid-template-columns: 1fr; min-width: 0; }
html.l-phone .band { grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
html.l-phone .band .f { order: -1; justify-self: start; }
html.l-phone .band .db { order: 1; justify-self: end; height: auto; }
html.l-phone .band.pre { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 4px; }
html.l-phone .vrange { writing-mode: horizontal-tb; direction: ltr; width: 100% !important; height: 34px !important; }
html.l-phone .vrange::-webkit-slider-runnable-track { width: auto; height: 4px; background: linear-gradient(90deg, var(--track) 0 calc(50% - 1px), var(--border-2) calc(50% - 1px) calc(50% + 1px), var(--track) calc(50% + 1px)); }
html.l-phone .vrange::-webkit-slider-thumb { margin-left: 0; margin-top: calc((4px - var(--eq-thumb) * 1px) / 2); }

/* ---------------- short windows (tablet held sideways, small windows) ---------------- */
html.l-short:not(.l-phone) { --player-h: 80px; }
html.l-short .player .np-cover { width: 50px; height: 50px; }
html.l-short .hero { padding-top: 22px; padding-bottom: 16px; }
html.l-short .hero-art { width: 132px; height: 132px; }
html.l-short:not(.np-stack) .np-stage { padding-top: 52px; padding-bottom: 14px; --np-avail: calc(100vh - var(--player-h) - 66px); --np-avail: calc(100dvh - var(--player-h) - 66px); }
html.l-short:not(.np-stack) .np-left { gap: 12px; --np-art: max(96px, min(calc(var(--np-avail) - 110px), 40vw, 560px)); }
html.l-short .np-meta, html.l-short .np-kicker { display: none; }

/* ---------------- Now Playing as a stack (phone, tablet held upright) ---------------- */
html.np-stack .nowplaying { bottom: 0; z-index: 30; }
html.np-stack body.np-open .tabbar { visibility: hidden; }
html.np-stack .np-grip { display: block; position: absolute; z-index: 3; top: calc(8px + env(safe-area-inset-top)); left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
html.np-stack .np-close { top: calc(14px + env(safe-area-inset-top)); left: 10px; }
html.np-stack .nowplaying::before { height: calc(var(--title-h) + env(safe-area-inset-top)); }
html.np-stack .np-stage {
  display: flex; flex-direction: column; gap: 14px; max-width: 640px;
  padding: calc(60px + env(safe-area-inset-top)) 24px calc(var(--np-ctrl-h, 250px) + 8px);
  --np-avail: calc(100vh - var(--np-ctrl-h, 250px) - 80px); --np-avail: calc(100dvh - var(--np-ctrl-h, 250px) - 80px);
}
html.np-stack .np-left { flex: 1; width: auto; gap: 18px; min-height: 0; --np-art: max(110px, min(calc(100vw - 48px), 38vh, calc(var(--np-avail) - 110px), 520px)); }
html.l-tablet.np-stack .np-left { --np-art: max(110px, min(calc(100vw - 48px), 46vh, calc(var(--np-avail) - 110px), 560px)); }
html.np-stack .np-art-wrap { align-self: center; }
/* the cover and the header take the swipe down (closes); lists scroll as usual */
html.np-stack .np-left, html.np-stack .np-grip { touch-action: none; }
html.np-stack .np-meta, html.np-stack .np-kicker { display: none; }
html.np-stack .np-title { font-size: clamp(21px, 6vw, 28px); white-space: nowrap; text-overflow: ellipsis; display: block; }
html.np-stack .np-sub { font-size: 15.5px; }
html.np-stack .np-tabs { display: none; }
html.np-stack .np-right { display: none; flex: 1; }
html.np-stack .np-panes { background: none; border: 0; border-radius: 0; }
html.np-stack .np-pane { padding: 0; }
html.np-stack .np-eq { padding: 4px 0; }
/* lyrics / queue / equalizer / devices take the cover's place; a compact header stays on top */
html.np-stack .nowplaying:not([data-tab="art"]) .np-left { flex: none; flex-direction: row; align-items: center; gap: 12px; --np-art: 54px; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-art { border-radius: 8px; transform: none; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-info { flex: 1; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-title-row { margin: 0; align-items: center; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-title { font-size: 17px; margin: 0 0 2px; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-sub { font-size: 14px; }
html.np-stack .nowplaying:not([data-tab="art"]) .np-right { display: flex; }

/* the player bar becomes the controls at the bottom of the stack */
html.np-stack body.np-open .player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  max-width: 640px; margin: 0 auto; height: auto; padding: 0 22px calc(10px + env(safe-area-inset-bottom));
  background: none; backdrop-filter: none; border: 0; color: #fff;
  --text: #fff; --text-2: rgba(255, 255, 255, .72); --text-3: rgba(255, 255, 255, .5); --hover: rgba(255, 255, 255, .1); --track: rgba(255, 255, 255, .22); --border-2: rgba(255, 255, 255, .2);
}
html.np-stack body.np-open .player::before, html.np-stack body.np-open .np-mini { display: none; }
html.np-stack body.np-open .transport { display: flex; flex-direction: column; gap: 6px; }
html.np-stack body.np-open .progress-row { order: -1; }
html.np-stack body.np-open .time { min-width: 40px; }
html.np-stack body.np-open .transport-buttons { justify-content: space-between; width: 100%; gap: 0; }
html.np-stack body.np-open .transport-buttons .icon-btn { width: 52px; height: 52px; border-radius: 50%; }
html.np-stack body.np-open .transport-buttons .icon-btn .i { width: 24px; height: 24px; }
html.np-stack body.np-open #btnPrev .i, html.np-stack body.np-open #btnNext .i { width: 30px; height: 30px; }
html.np-stack body.np-open .play-btn { width: 70px; height: 70px; background: #fff; color: #0b0b12; }
html.np-stack body.np-open .play-btn .i { width: 30px; height: 30px; }
html.np-stack body.np-open .seek { height: 30px; }
html.np-stack body.np-open .seek-thumb { transform: scale(1); }
html.np-stack body.np-open .extras { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 0; }
html.np-stack body.np-open .volume { order: -1; flex: 1 0 100%; margin: 0; }
html.np-stack body.np-open #btnLyrics { order: 1; }
html.np-stack body.np-open #btnDevices { order: 2; }
html.np-stack body.np-open #btnEq { order: 3; }
html.np-stack body.np-open #btnQueue { order: 4; }
html.np-stack body.np-open #btnSleep { order: 5; }
html.np-stack body.np-open .volume .vol-pop { display: flex !important; position: static; transform: none; flex: 1; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; animation: none; }
html.np-stack body.np-open .volume .range { width: 100%; }
html.np-stack body.np-open #btnSpeed, html.np-stack body.np-open #btnMini, html.np-stack body.np-open #btnMore { display: none !important; }
html.np-stack body.np-open .extras .icon-btn { width: 48px; height: 48px; }
html.np-stack body.np-open .extras .icon-btn .i { width: 22px; height: 22px; }
html.np-stack body.np-open .extras .icon-btn.toggle.on::after { display: none; }
html.np-stack body.np-open .extras .icon-btn.np-on { color: #fff; background: rgba(255, 255, 255, .16); }
html.np-stack body.np-open .toasts { bottom: calc(var(--np-ctrl-h, 250px) + 10px); }
.nowplaying.dragging { transition: none !important; }

/* ---------------- Aurora Web on phones: safe areas ---------------- */
html.web.l-phone { --title-h: calc(52px + env(safe-area-inset-top)); }
html.web.l-phone .titlebar { padding-top: env(safe-area-inset-top); padding-right: 10px; }
html.web body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ---------------- own music on the server (music-upload.js) ---------------- */
.srv-badge { color: var(--accent); }
.up-panel {
  position: fixed; right: 16px; bottom: calc(var(--bottom-h, var(--player-h)) + 16px); z-index: 59; width: 340px; max-width: calc(100vw - 32px);
  background: var(--elev); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 12px 10px;
  animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.up-panel.min { display: none; }
.up-head { display: flex; align-items: center; gap: 10px; }
.up-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.up-ic .i { width: 18px; height: 18px; }
.up-title { flex: 1; min-width: 0; }
.up-title .t1 { font-weight: 700; font-size: 13px; }
.up-title .t2 { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-panel [data-up="toggle"] .i { transition: transform .2s; }
.up-panel.open [data-up="toggle"] .i { transform: rotate(180deg); }
.up-bar { height: 4px; border-radius: 4px; background: var(--track); margin: 10px 0 2px; overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .3s; }
.up-panel:not(.busy) .up-bar i { background: #34d399; }
.up-panel.has-errors:not(.busy) .up-bar i { background: #fbbf24; }
.up-list { display: none; max-height: 240px; overflow-y: auto; margin-top: 8px; }
.up-panel.open .up-list { display: block; }
.up-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-st { flex: none; max-width: 52%; text-align: right; color: var(--text-3); font-size: 12px; }
.up-row.ok .up-st { color: #34d399; }
.up-row.err .up-st { color: #f87171; white-space: normal; }
.up-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.up-foot[hidden] { display: none; }
html.l-phone .up-panel { right: 10px; left: 10px; width: auto; max-width: none; }

.srv-main { flex: 1; min-width: 0; }
.srv-usage { margin-bottom: 6px; max-width: 460px; }
.srv-usage-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
.srv-bar { height: 8px; border-radius: 6px; background: var(--track); margin-top: 7px; overflow: hidden; }
.srv-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.srv-usage.full .srv-bar i { background: #f87171; }
.s-desc.warn { color: #fbbf24; }
.srv-empty { margin: 4px 0 0; font-size: 13px; }
.srv-files { display: grid; gap: 4px; margin-top: 6px; }
.srv-folder { border-radius: 10px; background: var(--surface); }
.srv-folder summary { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px 0 12px; cursor: pointer; list-style: none; font-size: 13px; }
.srv-folder summary::-webkit-details-marker { display: none; }
.srv-folder summary > .i { width: 17px; height: 17px; color: #fbbf24; flex: none; }
.srv-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.srv-folder summary .muted { font-size: 12px; white-space: nowrap; }
.srv-file { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 2px 6px 2px 39px; border-top: 1px solid var(--border); font-size: 12.5px; }
.srv-file-t { flex: 1; min-width: 0; }
.srv-file-t .t1, .srv-file-t .t2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-file-t .t2 { color: var(--text-3); font-size: 12px; }
.srv-file > .muted { font-size: 12px; white-space: nowrap; }
.users-music { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.users-music .i { width: 15px; height: 15px; }
