:root {
  --bg: #0b0b12;
  --bg-2: #12121c;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .08);
  --text: #f4f4f8;
  --muted: #9a9ab0;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --player-h: 88px;
  --sidebar-w: 248px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%),
              var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background .8s;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
img { display: block; }
svg { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::selection { background: color-mix(in srgb, var(--accent) 60%, transparent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 18px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px; transition: transform .15s, background .2s, opacity .2s; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.14); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); transition: color .2s, background .2s, transform .15s; position: relative; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.on, .shuffle-on .tgl-shuffle, .repeat-all .tgl-repeat, .repeat-one .tgl-repeat, .sleep-on .tgl-sleep { color: var(--accent); }
.tgl-repeat .one { display: none; position: absolute; font-style: normal; font-size: 9px; font-weight: 800; top: 6px; right: 5px; background: var(--accent); color: #fff; border-radius: 6px; padding: 0 3px; }
.repeat-one .tgl-repeat .one { display: block; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: #0b0b12; display: grid; place-items: center; transition: transform .15s, box-shadow .2s; }
.play-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); }
.play-btn svg { width: 22px; height: 22px; }
.play-btn .i-pause, .is-playing .play-btn .i-play { display: none; }
.is-playing .play-btn .i-pause { display: block; }
.i-mute, .muted-on .i-vol { display: none; }
.muted-on .i-mute { display: block; }

/* ---------- Login / install ---------- */
.login { display: none; position: fixed; inset: 0; place-items: center; z-index: 100; padding: 16px; }
.logged-out .login { display: grid; }
.logged-out .app, .logged-out .np { display: none; }
.login-card, .install-card { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; box-shadow: 0 30px 80px -20px #000; }
.login-card h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.login-card p { margin: 0; }
.login-card input, .install-card input { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); outline: none; }
.login-card input:focus, .install-card input:focus { border-color: var(--accent); }
.login-card .btn { width: 100%; }
.login-err { color: var(--bad); min-height: 1.2em; font-size: 14px; }
body.install { overflow: auto; }
.install-card { width: min(760px, 100%); margin: 40px auto; text-align: left; align-items: stretch; }
.install-card h1 { display: flex; gap: 12px; align-items: center; margin: 0; font-size: 24px; }
.install-card h2 { font-size: 17px; margin: 14px 0 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.alert { padding: 12px 14px; border-radius: 12px; font-weight: 500; }
.alert.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.alert.err { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; background: var(--panel); border-radius: 10px; flex-wrap: wrap; }
.checks li span { font-weight: 800; width: 16px; }
.checks li.ok span { color: var(--ok); } .checks li.bad span { color: var(--bad); } .checks li.warn span { color: var(--warn); }
.checks small { color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tool { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tool p { margin: 0; font-size: 13px; flex: 1; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: 1fr var(--player-h); height: 100dvh; }
.sidebar { grid-row: 1; padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); background: rgba(0,0,0,.25); backdrop-filter: blur(20px); min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding: 4px 10px 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: background .2s, color .2s; position: relative; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); background: var(--panel-2); }
.nav a.active svg { color: var(--accent); }
.badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 8px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 18px 12px 6px; font-weight: 700; }
.side-genres { display: flex; flex-direction: column; gap: 1px; flex: none; }
.side-genres a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.side-genres a:hover { background: var(--panel); color: var(--text); }
.side-genres a small { opacity: .6; }
.side-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 0; border-top: 1px solid var(--line); margin-top: auto; flex: none; }
.sidebar .nav a { padding: 9px 12px; }
.main { overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.view { padding: 28px clamp(16px, 3vw, 40px) 40px; max-width: 1400px; margin: 0 auto; animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.mobile-nav { display: none; }

/* ---------- Headings ---------- */
.h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 32px 0 14px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sub { color: var(--muted); margin: 0 0 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Stats / Cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 6px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid transparent; border-radius: var(--radius); padding: 12px; transition: background .2s, transform .2s, border-color .2s; cursor: pointer; position: relative; min-width: 0; }
.card:hover { background: var(--panel-2); transform: translateY(-3px); border-color: var(--line); }
.card .art { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #2a2a3a, #15151f); position: relative; box-shadow: 0 10px 30px -12px #000; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .art.round { border-radius: 50%; }
.card b { display: block; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .fab { position: absolute; right: 20px; top: calc(100% - 92px); width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: .25s; box-shadow: 0 10px 20px -6px #000; }
.card:hover .fab { opacity: 1; transform: none; }
.genre-card { aspect-ratio: 1.6; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; font-weight: 800; font-size: 19px; cursor: pointer; position: relative; overflow: hidden; transition: transform .2s; }
.genre-card:hover { transform: scale(1.03); }
.genre-card small { font-weight: 600; font-size: 13px; opacity: .85; }
.genre-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -18px; bottom: -18px; border-radius: 16px; background: rgba(255,255,255,.18); transform: rotate(25deg); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.35); font-size: 40px; font-weight: 800; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 180px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; }

/* ---------- Search ---------- */
.searchbar { display: flex; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; transition: border-color .2s, box-shadow .2s; }
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.searchbar input { flex: 1; background: none; border: 0; outline: none; font-size: 17px; padding: 8px 0; min-width: 0; }
.searchbar svg { color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 10px; }
.tab { padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--text); color: #0b0b12; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: transparent; }
.chip.on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; padding: 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.seg { display: inline-flex; background: rgba(0,0,0,.25); border-radius: 999px; padding: 3px; }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 16px; height: 16px; }
.seg button.active { background: var(--panel-2); color: var(--text); }
.results { display: flex; flex-direction: column; gap: 4px; }
.res { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 14px; transition: background .2s; }
.res:hover { background: var(--panel); }
.res-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; position: relative; background: #1d1d29; }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-thumb.wide img { transform: scale(1.35); }
.res-thumb button { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; color: #fff; }
.res:hover .res-thumb button, .res-thumb button.on { opacity: 1; }
.res-main { min-width: 0; }
.res-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-main small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-main .chips { margin-top: 5px; }
.res-main .chip { padding: 1px 8px; font-size: 11.5px; }
.res-dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.res-act { display: flex; gap: 6px; justify-content: flex-end; min-width: 150px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); min-width: 120px; position: relative; overflow: hidden; }
.pill i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 40%, transparent); transition: width .6s; }
.pill span { position: relative; }
.pill.err { color: var(--bad); }
.btn.have { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: transparent; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty svg { width: 54px; height: 54px; opacity: .4; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin: 0 0 6px; }
.skeleton { height: 80px; border-radius: 14px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Track list ---------- */
.tracks { display: flex; flex-direction: column; }
.trk { display: grid; grid-template-columns: 34px 46px minmax(0, 1fr) minmax(0, .7fr) 38px 52px 38px; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 12px; cursor: default; user-select: none; }
.trk:hover { background: var(--panel); }
.trk.playing { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.trk.playing .trk-main b { color: var(--accent); }
.trk-num { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.trk-num svg { display: none; width: 18px; height: 18px; color: var(--text); }
.trk:hover .trk-num span { display: none; }
.trk:hover .trk-num svg { display: block; }
.trk.playing .trk-num span { display: none; }
.trk.playing .trk-num::after { content: ""; width: 14px; height: 14px; background: linear-gradient(var(--accent), var(--accent)) 0 100%/3px 60% no-repeat, linear-gradient(var(--accent), var(--accent)) 50% 100%/3px 100% no-repeat, linear-gradient(var(--accent), var(--accent)) 100% 100%/3px 40% no-repeat; animation: eqbars .9s ease-in-out infinite alternate; }
.trk.playing:hover .trk-num::after { display: none; }
body:not(.is-playing) .trk.playing .trk-num::after { animation-play-state: paused; }
@keyframes eqbars { 0% { background-size: 3px 30%, 3px 90%, 3px 50%; } 50% { background-size: 3px 100%, 3px 40%, 3px 80%; } 100% { background-size: 3px 50%, 3px 70%, 3px 100%; } }
.trk-cover { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #1d1d29; display: grid; place-items: center; color: var(--muted); }
.trk-cover img { width: 100%; height: 100%; object-fit: cover; }
.trk-cover svg { width: 18px; height: 18px; }
.trk-main { min-width: 0; }
.trk-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.trk-main small, .trk-album { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 13.5px; }
.trk-main small a:hover, .trk-album a:hover { color: var(--text); text-decoration: underline; }
.tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--panel-2); color: var(--muted); border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.trk-dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.trk .fav { opacity: 0; }
.trk:hover .fav, .trk .fav.on { opacity: 1; }
.fav.on, .pl-fav.on { color: var(--accent); }
.trk .more { opacity: 0; }
.trk:hover .more { opacity: 1; }
.filter-input { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; outline: none; min-width: 0; }
.filter-input:focus { border-color: var(--accent); }
.crumbs { display: flex; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.hero { display: flex; gap: 24px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.hero .art { width: 200px; height: 200px; border-radius: 18px; overflow: hidden; flex: none; box-shadow: 0 24px 60px -18px #000; background: #1d1d29; }
.hero .art img { width: 100%; height: 100%; object-fit: cover; }
.hero .meta { min-width: 0; flex: 1; }
.hero .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }

/* ---------- Downloads ---------- */
.job { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel); margin-bottom: 8px; }
.job img, .job .ph-sm { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #1d1d29; }
.job b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job small { color: var(--muted); }
.job .bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.08); margin-top: 7px; overflow: hidden; }
.job .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 9px; transition: width .6s; }
.job.done small { color: var(--ok); }
.job.error small { color: var(--bad); }
.job.running .bar i { background-size: 200% 100%; animation: flow 1.5s linear infinite; background-image: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); }
@keyframes flow { to { background-position: -200% 0; } }

/* ---------- Player bar ---------- */
.player { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 0 18px; background: rgba(10, 10, 16, .82); backdrop-filter: blur(30px) saturate(1.4); border-top: 1px solid var(--line); position: relative; z-index: 20; }
.pl-track { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.pl-cover { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #1d1d29; position: relative; flex: none; box-shadow: 0 6px 20px -6px #000; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pl-meta { min-width: 0; }
.pl-meta b, .pl-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta small { color: var(--muted); font-size: 13px; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pl-controls { display: flex; align-items: center; gap: 10px; }
.pl-controls.big { gap: 20px; justify-content: center; margin-top: 10px; }
.pl-controls.big .play-btn { width: 66px; height: 66px; }
.pl-controls.big .play-btn svg { width: 30px; height: 30px; }
.pl-controls.big .icon-btn { width: 46px; height: 46px; }
.pl-controls.big .icon-btn svg { width: 24px; height: 24px; }
.pl-seek { display: flex; gap: 10px; align-items: center; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-seek span { min-width: 38px; text-align: center; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.pl-mini-progress { display: none; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; flex: 1; height: 18px; cursor: pointer; --p: 0%; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--text) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--text) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; margin-top: -4.5px; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type=range]:hover::-moz-range-track { background: linear-gradient(90deg, var(--accent) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { opacity: 1; }
input[type=range]:hover::-moz-range-thumb { opacity: 1; }
.vol { max-width: 110px; }
input[type=range].vert { writing-mode: vertical-lr; direction: rtl; width: 18px; height: 130px; flex: none; }
input[type=range].vert::-webkit-slider-runnable-track { width: 4px; height: 100%; background: linear-gradient(0deg, var(--accent) var(--p), rgba(255,255,255,.18) var(--p)); }
input[type=range].vert::-webkit-slider-thumb { margin-top: 0; margin-left: -4.5px; opacity: 1; }
input[type=range].vert::-moz-range-thumb { opacity: 1; }

/* ---------- Now playing ---------- */
.np { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; transform: translateY(100%); transition: transform .45s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
.np.open { transform: none; visibility: visible; }
.np-bg { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.np-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.6) brightness(.45); transform: scale(1.3); }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.65)); }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top)); }
.np-tabs { display: flex; gap: 4px; background: rgba(0,0,0,.3); border-radius: 999px; padding: 4px; }
.np-tabs button { padding: 7px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.np-tabs button.active { background: rgba(255,255,255,.14); color: var(--text); }
.np-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 80px); padding: 10px clamp(16px, 5vw, 80px) 30px; min-height: 0; }
.np-left { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 0; }
.np-stage { width: min(100%, 52vh, 520px); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.np-stage canvas { position: absolute; inset: -18%; width: 136%; height: 136%; pointer-events: none; }
.np-art { width: 72%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.9); position: relative; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.is-playing .np-art { transform: scale(1.02); }
body:not(.is-playing) .np-art { transform: scale(.94); }
#np-video { display: none; width: 100%; max-height: 100%; border-radius: 18px; background: #000; position: relative; box-shadow: 0 40px 90px -20px rgba(0,0,0,.9); }
.np.video .np-stage { aspect-ratio: 16/9; width: min(100%, 900px); }
.np.video #np-video { display: block; }
.np.video .np-art, .np.video canvas { display: none; }
.np-meta { width: min(100%, 520px); display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; }
.np-meta h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.02em; }
.np-meta p { margin: 2px 0 0; color: rgba(255,255,255,.7); }
.np-left .pl-seek { width: min(100%, 520px); margin-top: 12px; }
.np-right { min-height: 0; position: relative; }
.np-pane { display: none; height: 100%; overflow-y: auto; }
.np-pane.active { display: block; }
.lyrics { padding: 30vh 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.01em; line-height: 1.35; mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.lyrics p { margin: 0 0 18px; color: rgba(255,255,255,.32); transition: color .35s, transform .35s, filter .35s; cursor: pointer; transform-origin: left center; filter: blur(.4px); }
.lyrics p:hover { color: rgba(255,255,255,.6); }
.lyrics p.past { color: rgba(255,255,255,.5); }
.lyrics p.active { color: #fff; transform: scale(1.03); filter: none; text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 60%, transparent); }
.lyrics.plain p { color: rgba(255,255,255,.85); font-size: .7em; font-weight: 600; cursor: default; filter: none; margin-bottom: 8px; }
.lyrics .none { color: var(--muted); font-size: 18px; font-weight: 600; text-align: center; }
#queue-list .trk { grid-template-columns: 34px 46px minmax(0, 1fr) 52px 38px; }
#queue-list .q-h { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 14px 8px 6px; font-weight: 700; }

/* ---------- Popover / toasts ---------- */
.pop { position: fixed; z-index: 80; background: #1b1b27; border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-width: 210px; box-shadow: 0 20px 60px -10px rgba(0,0,0,.8); animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(4px); } }
.pop .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 14px; text-align: left; }
.pop .mi:hover { background: var(--panel-2); }
.pop .mi svg { width: 18px; height: 18px; color: var(--muted); }
.pop .mi.danger { color: var(--bad); }
.pop .mi.on { color: var(--accent); }
.pop h4 { margin: 4px 8px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.eq { display: flex; gap: 18px; padding: 6px 12px 10px; justify-content: center; }
.eq label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.eq-presets { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 8px 6px; }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--player-h) + 16px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: #1f1f2d; border: 1px solid var(--line); padding: 11px 14px 11px 16px; border-radius: 14px; box-shadow: 0 16px 40px -10px #000; display: flex; gap: 12px; align-items: center; pointer-events: auto; animation: toast .3s cubic-bezier(.2,.8,.2,1); font-size: 14px; width: 100%; }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.toast.err { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.toast span { flex: 1; min-width: 0; }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .trk { grid-template-columns: 34px 46px minmax(0, 1fr) 38px 52px 38px; }
  .trk-album { display: none; }
}
@media (max-width: 860px) {
  :root { --player-h: 70px; }
  body { font-size: 14.5px; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr var(--player-h) calc(60px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main { grid-row: 1; }
  .view { padding: 18px 16px 30px; }
  .player { grid-row: 2; grid-template-columns: minmax(0, 1fr) auto; margin: 0 8px; border-radius: 14px; border: 1px solid var(--line); padding: 0 8px; gap: 8px; height: calc(var(--player-h) - 8px); align-self: start; }
  .pl-center .pl-seek, .pl-right, .tgl-shuffle, .tgl-repeat, .pl-controls [data-action=prev] { display: none; }
  .pl-controls.big .tgl-shuffle, .pl-controls.big .tgl-repeat, .pl-controls.big [data-action=prev], .np .pl-seek { display: inline-grid; }
  .np .pl-seek { display: flex; }
  .pl-cover { width: 46px; height: 46px; }
  .pl-controls { gap: 2px; }
  .pl-mini-progress { display: block; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
  .pl-mini-progress i { display: block; height: 100%; width: 0; background: var(--text); }
  .mobile-nav { display: flex; grid-row: 3; justify-content: space-around; align-items: flex-start; padding: 8px 0 env(safe-area-inset-bottom); background: rgba(10,10,16,.95); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; min-width: 64px; }
  .mobile-nav a.active { color: var(--text); }
  .trk { grid-template-columns: 46px minmax(0, 1fr) 38px; gap: 10px; padding: 6px 4px; }
  .trk-num, .trk-dur, .trk .fav, .trk-album { display: none; }
  .trk .more { opacity: 1; }
  .res { grid-template-columns: 54px 1fr; gap: 10px; padding: 8px 4px; }
  .res-thumb { width: 54px; height: 54px; }
  .res-dur { display: none; }
  .res-act { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; padding-left: 64px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .hero .art { width: 140px; height: 140px; }
  .np-body { grid-template-columns: 1fr; overflow-y: auto; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .np-right { min-height: 60vh; }
  .lyrics { padding: 10vh 0; }
  .toasts { bottom: calc(var(--player-h) + 76px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =================== Plataforma: painel, contas, pagamentos =================== */
.panel-nav, .only-admin, .panel-only { display: none !important; }
.is-panel .panel-nav { display: block !important; }
.is-admin .only-admin { display: flex !important; }
.no-offline .only-offline { display: none !important; }
.brand-logo { border-radius: 10px; object-fit: cover; }
.ph-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-head .sub { margin: 0; }
h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

#banners { padding: 0 clamp(16px, 3vw, 40px); max-width: 1400px; margin: 0 auto; }
#banners:not(:empty) { padding-top: 16px; }
.banner { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; margin-bottom: 10px; font-size: 14px; border: 1px solid; }
.banner.info { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.banner.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.banner.err { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); } .stat.bad b { color: var(--bad); }
.stat span { display: block; }
.meter { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.hero .art.avatar { border-radius: 50%; width: 120px; height: 120px; }
.hero .art.avatar .ph { font-size: 48px; }

/* Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fadein .2s; }
.modal { position: relative; width: min(480px, 100%); background: #161621; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 40px 100px -20px #000; animation: pop .22s ease; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal.wide { width: min(720px, 100%); }
.modal h3 { margin: 0 0 14px; font-size: 20px; letter-spacing: -.01em; padding-right: 30px; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.form, .card-form { display: flex; flex-direction: column; gap: 12px; }
.card-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card-form h3 { margin: 0; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.fld input, .fld select, .fld textarea { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0,0,0,.28); color: var(--text); outline: none; font-size: 14.5px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--accent); }
.fld input[type=color] { padding: 3px; height: 44px; cursor: pointer; }
.fld textarea { resize: vertical; font-family: ui-monospace, monospace; }
select option { background: #161621; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.in-btn { display: flex; gap: 6px; align-items: center; }
.in-btn input { flex: 1; }
.row.end { justify-content: flex-end; margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.switch input { display: none; }
.switch i { width: 38px; height: 22px; border-radius: 22px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.role-seg { flex-wrap: wrap; align-self: flex-start; }
.renew-sum { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; }
.cred { white-space: pre-wrap; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font: 14px/1.5 var(--font); margin: 0; }

/* Pagamento */
.pay { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.pay-amount { font-size: 40px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 10px; image-rendering: pixelated; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--muted); font-size: 12px; }
.pay-wait { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; padding: 8px; }
.pay-ok { width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); display: grid; place-items: center; margin: 0 auto; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.pay-ok svg { width: 38px; height: 38px; }
#confetti { position: fixed; inset: 0; z-index: 99; pointer-events: none; display: none; }

/* Planos */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 10px; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan.hot { border-color: var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, transparent), var(--panel)); box-shadow: 0 20px 50px -25px var(--accent); }
.plan.off { opacity: .55; }
.plan h3 { margin: 0; font-size: 17px; }
.plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; flex: 1; }
.plan li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.plan li.no { color: var(--muted); text-decoration: line-through; }
.plan li.no::before { content: "✕ "; color: var(--bad); }
.plan-badge { position: absolute; top: -11px; right: 16px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em; }

/* Tabelas / listas */
.table { display: flex; flex-direction: column; gap: 6px; }
.tr { display: grid; grid-template-columns: 56px 1.2fr 1.4fr 1fr 1fr auto 100px; gap: 12px; align-items: center; padding: 11px 14px; background: var(--panel); border-radius: 12px; font-size: 14px; }
.pill-s { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); white-space: nowrap; text-align: center; }
.pill-s.approved, .pill-s.active { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill-s.pending, .pill-s.soon, .pill-s.trial { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill-s.failed, .pill-s.expired, .pill-s.blocked { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.pill-s.trial { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); }
.acc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.acc { display: grid; grid-template-columns: 42px minmax(0, 1.6fr) 110px 100px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; background: var(--panel); border: 1px solid transparent; border-radius: 14px; transition: border-color .2s; }
.acc:hover { border-color: var(--line); }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.acc-main { min-width: 0; }
.acc-main b, .acc-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-main small { color: var(--muted); font-size: 13px; }
.acc-exp, .acc-plan { font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-exp small, .acc-plan small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.acc-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.neg { color: var(--bad); }
.role-tag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); margin-left: 4px; vertical-align: 1px; }
.role-tag.master { color: #c4b5fd; } .role-tag.reseller { color: #67e8f9; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel-card h3 { margin: 0 0 14px; font-size: 16px; }
.chart { display: flex; gap: 6px; align-items: flex-end; height: 180px; padding-bottom: 20px; position: relative; }
.chart .col { flex: 1; height: 100%; display: flex; gap: 2px; align-items: flex-end; position: relative; }
.chart .col i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .6s; }
.chart .col small { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }
.chart i.rev, .legend i.rev { background: var(--accent); }
.chart i.sig, .legend i.sig { background: var(--accent-2); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.mini-acc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-acc:last-child { border: 0; }
.mini-acc div { flex: 1; min-width: 0; }
.mini-acc b, .mini-acc small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-acc small { color: var(--muted); }
.mini-acc .av { width: 34px; height: 34px; font-size: 14px; }
.brand-prev { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: radial-gradient(400px 160px at 90% 0, color-mix(in srgb, var(--pc) 45%, transparent), transparent), linear-gradient(135deg, #12121c, #0b0b12); border: 1px solid var(--line); }
.brand-prev img { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; }
.brand-prev div { flex: 1; min-width: 0; }
.brand-prev b { display: block; font-size: 20px; }
.brand-prev small { color: var(--muted); }
.brand-prev .btn { background: linear-gradient(135deg, var(--pc), var(--pc2)); color: #fff; border: 0; }
.timeline { display: flex; flex-direction: column; gap: 4px; }
.tl { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.tl-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; }
.tl small { display: block; color: var(--muted); }
.off-dot { display: inline-grid; vertical-align: -3px; margin-left: 6px; color: var(--ok); }
.off-dot svg { width: 15px; height: 15px; }
body.offline .player { border-top-color: color-mix(in srgb, var(--warn) 40%, transparent); }

@media (max-width: 860px) {
  .is-panel .mobile-nav .panel-only { display: flex !important; }
  .mobile-nav a { min-width: 0; flex: 1; }
  .acc { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .acc-exp, .acc-plan { display: none; }
  .acc-act { grid-column: 1 / -1; justify-content: flex-start; padding-left: 56px; }
  .tr { grid-template-columns: 1fr auto; }
  .tr > span:nth-child(1), .tr > span:nth-child(5) { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 36px 1fr; }
  .tl > span:last-child { grid-column: 2; }
  .modal { padding: 20px; }
}

select.filter-input { padding: 8px 14px; color: var(--text); width: auto; }

.artist-card { display: flex; align-items: center; gap: 18px; padding: 18px; margin-bottom: 14px; border-radius: 20px; flex-wrap: wrap;
  background: radial-gradient(500px 200px at 0 0, color-mix(in srgb, var(--accent) 35%, transparent), transparent), var(--panel); border: 1px solid var(--line); }
.artist-card img, .artist-card .ph { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 16px 40px -14px #000; font-size: 36px; }
.artist-card > div:not(.ph) { flex: 1; min-width: 180px; }
.artist-card .ph { display: grid; place-items: center; color: #fff; font-weight: 800; }
.artist-card small { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--muted); font-weight: 700; }
.artist-card b { display: block; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.artist-card span { color: var(--muted); font-size: 14px; }
.invite-badge { width: 100%; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent-2) 18%, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.art.mosaic { display: grid; place-items: stretch; }
.art.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.art.mosaic.four { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.art.mosaic .ph svg { width: 64px; height: 64px; color: rgba(255,255,255,.7); }
.trk.dragging { opacity: .4; }
.tracks .trk[draggable=true] { cursor: grab; }
.plan .was { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.plan .was .off { display: inline-block; text-decoration: none; background: var(--ok); color: #04130c; font-weight: 800; font-size: 11px; padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.ref-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; margin: 22px 0 6px; padding: 20px; border-radius: 20px;
  background: radial-gradient(500px 220px at 100% 0, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent), linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.ref-gift { font-size: 46px; text-align: center; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.ref-main h3 { margin: 0 0 4px; font-size: 19px; }
.ref-main p { margin: 0 0 10px; color: rgba(255,255,255,.8); font-size: 14px; }
.ref-stats { display: flex; gap: 10px; }
.ref-stats div { text-align: center; background: rgba(0,0,0,.25); border-radius: 14px; padding: 10px 14px; min-width: 84px; }
.ref-stats b { display: block; font-size: 22px; }
.ref-stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .ref-card { grid-template-columns: 1fr; text-align: left; }
  .ref-gift { text-align: left; }
  .ref-stats div { flex: 1; min-width: 0; }
}

/* Player do YouTube (toca sem baixar) — sempre visível enquanto toca */
.yt-float { position: fixed; right: 16px; bottom: calc(var(--player-h) + 14px); width: 356px; height: 200px; z-index: 45; border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.9); border: 1px solid var(--line); transition: left .35s, top .35s, width .35s, height .35s; }
.yt-float iframe, .yt-float #yt-host { width: 100%; height: 100%; display: block; border: 0; }
.yt-float .yt-x { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; }
.yt-float .yt-badge { position: absolute; left: 10px; bottom: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; pointer-events: none; }
.yt-float.in-np { z-index: 60; border-radius: 20px; }
.yt-float.in-np .yt-badge { display: none; }
.np.remote.clip .np-art, .np.remote.clip #np-viz { visibility: hidden; }
.yt-float .i-pause, .is-playing .yt-float .i-play { display: none; }
.is-playing .yt-float .i-pause { display: block; }
.res-act .btn.primary { box-shadow: none; }
@media (max-width: 860px) {
  .yt-float:not(.in-np) { right: 8px; left: 8px; width: auto; height: 200px; bottom: calc(var(--player-h) + 70px); }
}

/* ---------- Descoberta ---------- */
.search-wrap { position: relative; z-index: 15; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #1b1b27; border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 24px 60px -12px #000; animation: pop .15s; }
.suggest > small { display: block; padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.suggest .sg { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.suggest .sg:hover { background: var(--panel-2); }
.suggest .sg img, .suggest .sg .av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.suggest .sg b, .suggest .sg small { display: block; }
.suggest .sg small { color: var(--muted); font-size: 12.5px; }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.style-card { position: relative; overflow: hidden; height: 92px; border-radius: 16px; padding: 14px; font-weight: 800; font-size: 17px; display: flex; align-items: flex-end;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #000)); transition: transform .2s; }
.style-card:hover { transform: translateY(-3px) scale(1.02); }
.style-card::after { content: "♪"; position: absolute; right: -6px; top: -14px; font-size: 76px; opacity: .22; transform: rotate(18deg); }
.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rk { display: grid; grid-template-columns: 28px 46px minmax(0, 1fr) 52px; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 12px; cursor: pointer; }
.rank-list .rk:not(:has(.rk-n)) { grid-template-columns: 46px minmax(0, 1fr) 52px; }
.rk:hover { background: var(--panel); }
.rk-n { font-weight: 800; font-size: 17px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rk:nth-child(-n+3) .rk-n { color: var(--accent); }
.own { position: absolute; top: 8px; left: 8px; background: var(--ok); color: #04130c; font-size: 11px; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.own-s { color: var(--ok); font-size: 12px; }
.artist-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.achip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: background .2s; }
.achip:hover { background: var(--panel-2); }
.achip img, .achip .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; font-size: 14px; }
.related { width: 100%; margin-top: 4px; }
.related > small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.q-auto { margin: 4px 8px 6px; font-size: 13px; color: var(--muted); }
.yt-float.mini { width: 200px; height: 200px; }
.clip-on .tgl-clip { color: var(--accent); }
.h2 > span:first-child { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .yt-float.mini:not(.in-np) { left: auto; right: 8px; width: 200px; height: 200px; }
  .styles { grid-template-columns: repeat(2, 1fr); }
  .rk { grid-template-columns: 24px 46px minmax(0, 1fr); }
  .rk .trk-dur { display: none; }
}
.card .art { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, #1d1d29), #15151f); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
