:root {
  --bg: #17121a;
  --surface: #211a25;
  --surface-2: #2c2331;
  --line: #3b3041;
  --text: #f7eff4;
  --muted: #ae9db3;
  --accent: #e4007c;      /* rosa mexicano */
  --accent-hi: #ff2b93;
  --tint: 300 40% 30%;
  --radius: 10px;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bar-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
svg { width: 22px; height: 22px; flex: none; }
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; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }

/* ---------- layout ---------- */
.app {
  height: 100dvh;
  display: grid;
  grid-template: "side main" 1fr "bar bar" var(--bar-h) / 248px 1fr;
  gap: 8px;
  padding: 8px;
}
.side { grid-area: side; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.main {
  grid-area: main;
  background: var(--surface);
  border-radius: var(--radius);
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  outline: none;
}
.bar { grid-area: bar; }
.tabs { display: none; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font: 800 26px/1 var(--display); letter-spacing: -0.04em;
  padding: 14px 14px 10px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
}
.brand-mark svg { width: 18px; height: 18px; }
.side-nav { background: var(--surface); border-radius: var(--radius); padding: 8px; }
.side-nav a, .side-settings {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 600;
}
.side-nav a:hover, .side-settings:hover { color: var(--text); }
.side-nav a.on { color: var(--text); }
.side-nav a.on svg { color: var(--accent-hi); }
.side-lists { flex: 1; min-height: 0; background: var(--surface); border-radius: var(--radius); padding: 8px; overflow-y: auto; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 8px; color: var(--muted); font-weight: 600; }
.side-pl { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; }
.side-pl:hover, .side-pl.on { background: var(--surface-2); }
.side-pl .art { width: 44px; height: 44px; border-radius: 6px; }
.side-pl small { display: block; color: var(--muted); font-size: 13px; }
.side-empty { padding: 4px 12px; color: var(--muted); font-size: 14px; }
.side-settings { background: var(--surface); border-radius: var(--radius); width: 100%; padding: 14px 20px; }

/* ---------- vistas ---------- */
.view { padding: 24px 28px 40px; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.view-head h1 { font-size: 32px; font-weight: 800; }
.section { margin: 0 0 36px; }
.section > h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.hello {
  font: 800 clamp(34px, 5vw, 58px)/0.95 var(--display);
  letter-spacing: -0.045em;
  margin: 8px 0 28px;
  max-width: 14ch;
}
.muted { color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.quick a {
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border-radius: 6px; overflow: hidden; font-weight: 700; padding-right: 10px;
}
.quick a:hover { background: var(--line); }
.quick .art { width: 56px; height: 56px; border-radius: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.card { padding: 12px; border-radius: 8px; min-width: 0; }
.card:hover { background: var(--surface-2); }
.card .art { width: 100%; aspect-ratio: 1; border-radius: 6px; margin-bottom: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .35); }
.card.round .art { border-radius: 50%; }
.card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { color: var(--muted); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Portadas (imagen o mosaico o color) */
.art { position: relative; overflow: hidden; background: var(--surface-2); flex: none; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art.mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.art.letter {
  display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 70% 42%), hsl(calc(var(--h) + 50) 65% 22%));
  font: 800 2.2em/1 var(--display); letter-spacing: -0.04em; color: #fff;
}
.side-pl .art.letter, .quick .art.letter { font-size: 18px; }
.art.letter span { padding: 10%; text-align: left; align-self: end; justify-self: start; line-height: .95; overflow-wrap: anywhere; }
.card .art.letter { font-size: clamp(20px, 2.2vw, 28px); }
.art.empty { display: grid; place-items: center; color: var(--muted); }
.art.empty svg { width: 40%; height: 40%; }

/* ---------- búsqueda ---------- */
.searchbox {
  position: sticky; top: 0; z-index: 2;
  padding: 16px 28px; margin: -24px -28px 16px;
  background: var(--surface);
}
.searchbox label {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border-radius: 999px; padding: 0 16px;
  max-width: 520px; border: 2px solid transparent;
}
.searchbox label:focus-within { border-color: var(--text); }
.searchbox input { flex: 1; background: none; border: 0; outline: none; padding: 13px 0; font-size: 16px; min-width: 0; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px;
}
.chip:hover { background: var(--line); }
.chip.on { background: var(--text); color: var(--bg); }

/* ---------- lista de canciones ---------- */
.tracks { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: 28px 44px minmax(0, 1fr) minmax(0, .6fr) 28px 52px 36px;
  align-items: center; gap: 12px;
  padding: 6px 10px; border-radius: 6px; cursor: default;
  user-select: none;
}
.tracks.no-num .row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, .6fr) 28px 52px 36px; }
.tracks.no-num .num { display: none; }
.row:hover { background: var(--surface-2); }
.row .num { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.row .art { width: 44px; height: 44px; border-radius: 4px; }
.row .t { min-width: 0; }
.row .t b, .row .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t b { font-weight: 600; }
.row .t small, .row .alb, .row .dur { color: var(--muted); font-size: 14px; }
.row .alb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .dur { text-align: right; font-variant-numeric: tabular-nums; }
.row.now .t b { color: var(--accent-hi); }
.row .st { color: var(--accent-hi); display: grid; place-items: center; }
.row .st svg { width: 18px; height: 18px; }
.row .dl { color: var(--muted); opacity: 0; }
.row:hover .dl, .row .dl:focus-visible { opacity: 1; }
.row .dl:hover { color: var(--text); }
.row .more { color: var(--muted); opacity: 0; }
.row:hover .more, .row .more:focus-visible { opacity: 1; }
.row .more:hover { color: var(--text); }
.row .play-hover { display: none; }
.row:hover .num-n { display: none; }
.row:hover .play-hover { display: inline-block; }
.row .play-hover svg { width: 16px; height: 16px; color: var(--text); }
.row.now .num-n { display: none; }
.row.now .eq { display: inline-flex; }
.row:hover .eq { display: none !important; }

.eq { display: none; gap: 2px; height: 14px; align-items: end; }
.eq i { width: 3px; background: var(--accent-hi); border-radius: 1px; animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { from { height: 3px } to { height: 14px } }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--accent-hi) 25%, transparent); border-top-color: var(--accent-hi);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.tracks-head {
  padding: 0 10px 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}

/* ---------- encabezado de colección ---------- */
.hero {
  display: flex; align-items: end; gap: 24px;
  padding: 72px 28px 24px; margin: -24px -28px 0;
  background: linear-gradient(hsl(var(--tint)) , hsl(var(--tint) / .55));
}
.hero .art { width: clamp(150px, 20vw, 232px); aspect-ratio: 1; border-radius: 6px; box-shadow: 0 12px 48px rgb(0 0 0 / .5); }
.hero.round .art { border-radius: 50%; }
.hero .kind { font-size: 14px; font-weight: 600; }
.hero h1 {
  font-size: clamp(36px, 7vw, 92px); font-weight: 800; line-height: .92; letter-spacing: -0.05em;
  margin: 6px 0 14px; overflow-wrap: anywhere;
}
.hero h1.long { font-size: clamp(30px, 4.5vw, 56px); }
.hero .stats { font-size: 14px; }
.hero .stats b { font-weight: 700; }
.actions {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 28px; margin: 0 -28px 8px;
  background: linear-gradient(hsl(var(--tint) / .28), transparent 120px);
}
.play-big {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgb(0 0 0 / .3);
}
.play-big:hover { background: var(--accent-hi); transform: scale(1.04); }
.play-big svg { width: 26px; height: 26px; }
.icon-btn { color: var(--muted); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.icon-btn:hover { color: var(--text); }
.icon-btn.big svg { width: 30px; height: 30px; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.on { color: var(--accent-hi); position: relative; }
.icon-btn.on::after { content: ''; position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.icon-btn .badge { position: absolute; font: 700 9px/1 var(--body); top: 6px; right: 5px; }

.tabs-in { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 10px 20px; font-weight: 700;
  background: var(--text); color: var(--bg);
}
.btn:hover { transform: scale(1.03); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--text); }
.btn.pink { background: var(--accent); color: #fff; }
.btn svg { width: 18px; height: 18px; }

.empty {
  padding: 48px 20px; text-align: center; max-width: 440px; margin: 0 auto;
}
.empty h2 { font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 0 20px; }

/* ---------- barra del reproductor ---------- */
.bar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center; gap: 16px; padding: 0 8px;
}
.np { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np .art { width: 56px; height: 56px; border-radius: 6px; cursor: pointer; }
.np .t { min-width: 0; }
.np .t b, .np .t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np .t b { font-weight: 600; font-size: 14.5px; }
.np .t small { color: var(--muted); font-size: 13px; }
.np .t a:hover { text-decoration: underline; }
.ctrl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ctrl-btns { display: flex; align-items: center; gap: 14px; }
.ctrl-btns .icon-btn svg { width: 19px; height: 19px; }
.pp {
  width: 36px; height: 36px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center;
}
.pp:hover { transform: scale(1.06); }
.pp svg { width: 18px; height: 18px; }
.prog { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog span { min-width: 40px; }
.prog span:first-child { text-align: right; }
.extra { display: flex; justify-content: end; align-items: center; gap: 6px; }
.extra .vol { width: 110px; flex: none; }
.extra .icon-btn svg { width: 19px; height: 19px; }
.mini-line { display: none; }

/* Slider */
input[type=range] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 16px; background: transparent; margin: 0; cursor: pointer;
  --p: 0%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--text) var(--p), var(--line) var(--p));
}
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent-hi) var(--p), var(--line) var(--p)); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); margin-top: -4px; opacity: 0;
}
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }

/* ---------- reproductor completo ---------- */
.full {
  position: fixed; inset: 0; z-index: 20;
  background: linear-gradient(hsl(var(--tint)) 0%, var(--bg) 85%);
  display: flex; flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) 24px calc(24px + var(--safe-b));
  animation: rise .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise { from { transform: translateY(100%) } }
.full-top { display: flex; align-items: center; justify-content: space-between; }
.full-top small { text-align: center; font-weight: 600; font-size: 13px; }
.full-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; width: 100%; margin: 0 auto; min-height: 0; }
.full .cover { width: 100%; max-height: 52vh; aspect-ratio: 1; border-radius: 8px; box-shadow: 0 18px 60px rgb(0 0 0 / .55); margin: 0 auto; }
.full .meta { display: flex; align-items: center; gap: 12px; }
.full .meta .t { flex: 1; min-width: 0; }
.full .meta b { display: block; font: 700 24px/1.15 var(--display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full .meta small { color: var(--muted); font-size: 16px; }
.full .prog { flex-wrap: wrap; font-size: 12.5px; }
.full .prog input { flex-basis: 100%; order: -1; }
.full .prog span:last-child { margin-left: auto; }
.full .ctrl-btns { justify-content: space-between; }
.full .ctrl-btns .icon-btn svg { width: 26px; height: 26px; }
.full .ctrl-btns .icon-btn.shuf svg, .full .ctrl-btns .icon-btn.rep svg { width: 22px; height: 22px; }
.full .pp { width: 66px; height: 66px; }
.full .pp svg { width: 28px; height: 28px; }
.full-queue { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -10px; }
.full-queue h3 { font-size: 16px; padding: 12px 10px 8px; }

/* ---------- menú contextual ---------- */
.menu-layer { position: fixed; inset: 0; z-index: 40; }
.menu {
  position: fixed; min-width: 230px; max-width: calc(100vw - 16px);
  background: var(--surface-2); border-radius: 8px; padding: 4px;
  box-shadow: 0 16px 40px rgb(0 0 0 / .55);
}
.menu-head { display: none; }
.menu button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: 4px; text-align: left; font-size: 14.5px;
}
.menu button:hover, .menu button:focus-visible { background: var(--line); outline: none; }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .danger { color: #ff8fa3; }

/* ---------- diálogos ---------- */
dialog {
  border: 0; border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px));
  background: var(--surface-2); color: var(--text); box-shadow: 0 24px 64px rgb(0 0 0 / .6);
}
dialog::backdrop { background: rgb(10 6 12 / .7); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
dialog h2 { font-size: 24px; font-weight: 700; }
dialog p { margin: 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input, .field select {
  background: var(--line); border: 1px solid transparent; border-radius: 6px; padding: 11px 12px; font-size: 15px; font-weight: 400; outline: none;
}
.field input:focus { border-color: var(--muted); }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.pick { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; margin: 0 -8px; }
.pick button { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; text-align: left; }
.pick button:hover { background: var(--line); }
.pick .art { width: 44px; height: 44px; border-radius: 4px; }
.pick .art.empty svg { width: 22px; height: 22px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }

/* ---------- avisos ---------- */
.toasts {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 24px); transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .4);
  animation: pop .2s ease-out; max-width: calc(100vw - 32px);
}
.toast.err { background: #ffb3c4; }
@keyframes pop { from { transform: translateY(8px); opacity: 0 } }

/* ---------- cuenta y sincronización ---------- */
body.locked .app, body.locked .sync-pill { visibility: hidden; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font: 700 15px/1 var(--display); color: #fff;
  background: hsl(var(--h, 320) 55% 40%);
}
.side-settings { justify-content: start; }
.side-settings .gear { margin-left: auto; width: 18px; height: 18px; }
.side-settings #side-user { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync-dot[data-st=ok] { background: #4ade80; }
.sync-dot[data-st=syncing] { background: var(--accent-hi); animation: blink 1s ease-in-out infinite alternate; }
.sync-dot[data-st=error] { background: #ff6b81; }
@keyframes blink { to { opacity: .3 } }
.home-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.avatar-btn { position: relative; margin-top: 6px; }
.avatar-btn .avatar { width: 36px; height: 36px; }
.avatar-btn .sync-dot { position: absolute; right: -1px; bottom: -1px; box-shadow: 0 0 0 2px var(--bg); }
.m-only { display: none; }

.account { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--line); border-radius: 8px; }
.account .avatar { width: 44px; height: 44px; font-size: 20px; }
.account b { display: block; font-size: 17px; }
.account small { color: var(--muted); font-size: 13px; }
.switch { display: flex; gap: 12px; align-items: start; cursor: pointer; font-weight: 600; }
.switch small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.switch input {
  appearance: none; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line);
  position: relative; cursor: pointer; margin: 0; transition: background .15s;
}
.switch input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s;
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.devices li { padding: 10px 12px; background: var(--line); border-radius: 6px; }
.devices b, .devices small { display: block; }
.devices small { color: var(--muted); font-size: 13px; }
.bad { color: #ff8fa3 !important; }
.btn.danger { color: #ff8fa3; box-shadow: inset 0 0 0 1px #ff8fa3; }
.dialog-actions.spread { justify-content: space-between; }
.btn.big { justify-content: center; padding: 14px 20px; font-size: 16px; min-height: 50px; }
.btn:disabled { opacity: .7; transform: none; }

.sync-pill {
  position: fixed; z-index: 15; right: 16px; bottom: calc(var(--bar-h) + 20px);
  display: flex; align-items: center; gap: 12px; overflow: hidden;
  background: var(--surface-2); border-radius: 10px; padding: 10px 14px 12px; max-width: 320px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .45); font-size: 13.5px;
}
.sync-pill b, .sync-pill small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-pill small { color: var(--muted); }
.sync-pill span:last-of-type { min-width: 0; }
.sync-pill i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--accent); transition: width .3s; }

.auth {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  background:
    radial-gradient(120% 70% at 100% 0%, hsl(325 100% 45% / .35), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, hsl(275 70% 35% / .35), transparent 60%),
    var(--bg);
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 20px calc(32px + var(--safe-b));
}
.auth-in { width: 100%; max-width: 400px; min-width: 0; }
.auth .field input { width: 100%; min-width: 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; font: 800 30px/1 var(--display); letter-spacing: -0.04em; margin-bottom: 40px; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth h1 { font-size: clamp(38px, 9vw, 52px); font-weight: 800; line-height: .95; letter-spacing: -0.045em; margin-bottom: 14px; }
.auth-sub { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .field input { background: var(--surface-2); padding: 14px; font-size: 16px; }
.auth .btn { margin-top: 8px; }
.auth-err, .auth-note { border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; font-size: 14.5px; }
.auth-err { background: rgb(255 107 129 / .15); color: #ffb3c4; }
.auth-note { background: var(--surface-2); color: var(--muted); }
.captcha { display: flex; align-items: center; gap: 8px; }
.captcha-img {
  width: 220px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; flex: none;
}
.captcha-img img { width: 100%; height: 100%; image-rendering: auto; }
.mono-in { letter-spacing: .35em; text-transform: uppercase; font-weight: 700 !important; }
.code-in { font: 800 32px/1 var(--display) !important; letter-spacing: .45em; text-align: center; padding: 16px 0 16px .45em !important; }
.auth-sub b { color: var(--text); }
.auth-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.auth-link { color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.auth-link:hover:not(:disabled) { color: var(--text); }
.auth-link:disabled { text-decoration: none; opacity: .7; cursor: default; }
.auth-switch { margin-top: 22px; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-switch:hover { color: var(--text); }

/* ---------- móvil ---------- */
@media (max-width: 760px) {
  :root { --bar-h: 64px; }
  .app {
    grid-template: "main" 1fr "bar" auto "tabs" auto / 1fr;
    gap: 0; padding: 0;
  }
  .side { display: none; }
  .main { border-radius: 0; background: var(--bg); padding-top: env(safe-area-inset-top); }
  .view { padding: 16px 16px 24px; }
  .searchbox { margin: -16px -16px 12px; padding: 12px 16px; background: var(--bg); }
  .hero { flex-direction: column; align-items: start; padding: 24px 16px 18px; margin: -16px -16px 0; gap: 16px; }
  .hero .art { width: min(56vw, 240px); align-self: center; }
  .hero h1 { font-size: clamp(32px, 9vw, 48px); margin-bottom: 8px; }
  .actions { margin: 0 -16px 4px; padding: 14px 16px; }
  .quick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick a { font-size: 13px; line-height: 1.2; }
  .quick .art { width: 52px; height: 52px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
  .card { padding: 8px; }
  .row, .tracks.no-num .row { grid-template-columns: 48px minmax(0, 1fr) 22px 36px; gap: 12px; padding: 6px 0; }
  .row .art { width: 48px; height: 48px; }
  .row .num, .row .alb, .row .dur { display: none !important; }
  .row .more, .row .dl { opacity: 1; }
  .row:hover { background: none; }
  .row:active { background: var(--surface); }
  .tracks-head { display: none; }

  .bar {
    margin: 0 8px 6px; padding: 8px; border-radius: 8px; height: auto;
    background: hsl(var(--tint) / .95); grid-template-columns: 1fr auto; gap: 8px; position: relative;
  }
  .bar.off { display: none; }
  .np .art { width: 42px; height: 42px; border-radius: 4px; }
  .bar .prog, .bar .ctrl-btns > :not(.pp), .extra { display: none !important; }
  .bar .pp { background: none; color: var(--text); width: 40px; height: 40px; }
  .bar .pp svg { width: 24px; height: 24px; }
  .mini-line {
    display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 1px;
    background: rgb(255 255 255 / .25); overflow: hidden;
  }
  .mini-line i { display: block; height: 100%; background: var(--text); width: 0; }

  .tabs {
    grid-area: tabs; display: flex; justify-content: space-around;
    background: linear-gradient(transparent, var(--bg) 30%);
    padding: 6px 0 calc(6px + var(--safe-b));
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 4px 18px; }
  .tabs a.on { color: var(--text); }
  .toasts { bottom: calc(150px + var(--safe-b)); }
  .m-only { display: block; }
  .sync-pill { left: 12px; right: 12px; top: calc(8px + env(safe-area-inset-top)); bottom: auto; max-width: none; }

  .menu { left: 0 !important; right: 0; bottom: 0; top: auto !important; border-radius: 14px 14px 0 0; padding: 8px 8px calc(12px + var(--safe-b)); max-width: none; animation: rise .22s ease-out; }
  .menu-layer { background: rgb(10 6 12 / .6); }
  .menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .menu-head .art { width: 44px; height: 44px; border-radius: 4px; }
  .menu-head b, .menu-head small { display: block; }
  .menu-head small { color: var(--muted); font-size: 13px; }
  .menu button { padding: 13px 10px; font-size: 15.5px; }
}
@media (min-width: 761px) {
  .full { background: linear-gradient(110deg, hsl(var(--tint)) 0%, var(--bg) 70%); }
  .full-body.with-queue { max-width: 1000px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .full-body.with-queue .full-queue { max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
