:root {
  --bg: #0b0b10; --bg2: #121219; --surface: #181822; --surface2: #20202c; --hover: #262634;
  --line: #2a2a38; --text: #f3f3f7; --muted: #a2a2b5; --dim: #6e6e82;
  --a1: #ff4d7d; --a2: #8b5cff; --accent: #ff4d7d;
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --radius: 10px; --side: 280px; --player: 88px; --tab: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); }
[hidden] { display: none !important; }
img { display: block; }
i[data-i] { display: inline-flex; width: 22px; height: 22px; flex: none; }
i[data-i] svg { width: 100%; height: 100%; }
.muted { color: var(--muted); } .center { text-align: center; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #33334a; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--surface2); font-weight: 600; transition: transform .1s, background .15s, opacity .15s; }
.btn:hover { background: var(--hover); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; } .btn.primary:hover { opacity: .92; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13.5px; } .btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  color: var(--muted); transition: color .15s, background .15s, transform .1s; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.06); } .icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateY(14px); }
.icon-btn { position: relative; }
.like.on { color: var(--a1); }
.play-btn { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #111; display: inline-flex; align-items: center; justify-content: center; transition: transform .1s; }
.play-btn:hover { transform: scale(1.06); } .play-btn i { width: 22px; height: 22px; }
.big-play { width: 56px; height: 56px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 77, 125, .35); transition: transform .12s; }
.big-play:hover { transform: scale(1.06); } .big-play i { width: 28px; height: 28px; }

/* ---------- logo ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.02em; padding: 4px 8px 14px; }
.brand.big { font-size: 26px; justify-content: center; padding-bottom: 6px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: inline-flex; align-items: center; justify-content: center; flex: none;
  box-shadow: 0 4px 16px rgba(139, 92, 255, .35); }
.brand.big .logo { width: 48px; height: 48px; border-radius: 14px; }
.logo::before { content: ""; width: 60%; height: 60%; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10v4M8 6v12M12 3v18M16 7v10M20 10v4' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10v4M8 6v12M12 3v18M16 7v10M20 10v4' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- entrar ---------- */
#auth { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(255,77,125,.25), transparent 60%), radial-gradient(900px 600px at 110% 110%, rgba(139,92,255,.25), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; background: rgba(24,24,34,.85); border: 1px solid var(--line); border-radius: 18px; padding: 24px; backdrop-filter: blur(10px); }
.auth-form h1 { margin: 0 0 4px; font-size: 22px; text-align: center; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input[type=text], input[type=password], input:not([type]), input[type=search], select, textarea {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 15px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--a2); }
.err { color: #ff7a8f; font-size: 13.5px; margin: 0; min-height: 0; }
.err:empty { display: none; }

/* ---------- estructura ---------- */
#shell { display: grid; height: 100%; grid-template-columns: var(--side) 1fr auto; grid-template-rows: 1fr var(--player);
  grid-template-areas: "side main panel" "player player player"; gap: 8px; padding: 8px; }
#side { grid-area: side; background: var(--bg2); border-radius: 12px; padding: 14px 10px; display: flex; flex-direction: column; min-height: 0; }
#main { grid-area: main; background: var(--bg2); border-radius: 12px; overflow-y: auto; overflow-x: hidden; position: relative; min-width: 0; }
#panel { grid-area: panel; width: 340px; background: var(--bg2); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; }
#player { grid-area: player; }
.nav a, .side-foot a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.nav a:hover, .side-foot a:hover { color: var(--text); }
.nav a.on, .side-foot a.on { color: var(--text); background: var(--surface); }
.side-sec { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; flex: 1; overflow-y: auto; min-height: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 6px 12px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.pl-item:hover { background: var(--surface); } .pl-item.on { background: var(--surface2); }
.pl-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-cover { width: 42px; height: 42px; border-radius: 6px; background: var(--surface2); flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.liked-cover { background: linear-gradient(135deg, #5b3cff, #c3b8ff); color: #fff; }
.liked-cover i { width: 18px; height: 18px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; }
.me-av { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- vistas ---------- */
.view { padding: 22px 26px 40px; }
.hero { position: relative; padding: 70px 26px 22px; display: flex; align-items: flex-end; gap: 24px; min-height: 280px;
  background: linear-gradient(180deg, var(--hero, #3b2b6b) 0%, rgba(18,18,25,.0) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(18,18,25,.5)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-art { width: 210px; height: 210px; border-radius: 8px; object-fit: cover; box-shadow: 0 10px 40px rgba(0,0,0,.5); flex: none; background: var(--surface2); }
.hero-art.round { border-radius: 50%; }
.hero-txt { min-width: 0; }
.hero-txt small { font-weight: 600; font-size: 13px; }
.hero-txt h1 { font-size: clamp(30px, 6vw, 72px); line-height: 1.02; margin: 6px 0 10px; letter-spacing: -.035em; word-break: break-word; }
.hero-txt p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }
.hero-txt p a:hover { text-decoration: underline; }
.actions { display: flex; align-items: center; gap: 14px; padding: 18px 26px; position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hero, #3b2b6b) 30%, transparent), transparent 180px); }
.actions .icon-btn { width: 44px; height: 44px; } .actions .icon-btn i { width: 28px; height: 28px; }
h2.sec { font-size: 22px; margin: 26px 0 12px; letter-spacing: -.02em; display: flex; align-items: baseline; justify-content: space-between; }
h2.sec a { font-size: 13px; color: var(--muted); font-weight: 600; }
h2.sec a:hover { color: var(--text); }
.greet { font-size: 30px; margin: 4px 0 18px; letter-spacing: -.03em; }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; font-weight: 700; font-size: 14px; transition: background .15s; position: relative; }
.quick a:hover { background: rgba(255,255,255,.14); }
.quick img, .quick .ph { width: 56px; height: 56px; object-fit: cover; flex: none; }
.quick .ph { display: flex; align-items: center; justify-content: center; }

.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card { background: var(--surface); padding: 12px; border-radius: 10px; transition: background .2s; position: relative; scroll-snap-align: start; min-width: 0; }
.card:hover { background: var(--hover); }
.card .art { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface2); margin-bottom: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card.round .art { border-radius: 50%; }
.card b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.card .fab { position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.card:hover .fab { opacity: 1; transform: none; }
.card .fab i { width: 22px; height: 22px; }

.mix-art { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; line-height: 1.05; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }

/* lista de canciones */
.tracks { padding: 0 18px 30px; }
.t-head, .t-row { display: grid; grid-template-columns: 34px minmax(0, 4fr) minmax(0, 3fr) 44px 56px 38px; align-items: center; gap: 12px; padding: 0 10px; }
.t-head { color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); height: 36px; margin-bottom: 8px; position: sticky; top: 0; background: var(--bg2); z-index: 2; }
.t-row { height: 56px; border-radius: 6px; cursor: default; color: var(--muted); font-size: 14px; }
.t-row:hover { background: rgba(255,255,255,.07); }
.t-row.sel { background: rgba(255,255,255,.12); }
.t-num { text-align: center; font-variant-numeric: tabular-nums; }
.t-row .t-num .pi { display: none; }
.t-row:hover .t-num .n { display: none; } .t-row:hover .t-num .pi { display: inline-flex; }
.t-row.playing { color: var(--text); } .t-row.playing .t-title b { color: var(--a1); }
.t-row.playing .t-num .n { display: none; }
.t-row.playing .t-num::before { content: ""; display: inline-block; width: 14px; height: 14px; background: var(--a1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9v6M10 5v14M15 8v8M20 11v2' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9v6M10 5v14M15 8v8M20 11v2' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; animation: eq 1s ease-in-out infinite alternate; }
.t-row.playing:hover .t-num::before { display: none; }
@keyframes eq { to { transform: scaleY(.55); } }
.t-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-title img { width: 40px; height: 40px; border-radius: 4px; flex: none; background: var(--surface2); object-fit: cover; }
.t-title div { min-width: 0; }
.t-title b { display: block; color: var(--text); font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-title small, .t-album { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-title small a:hover, .t-album:hover { color: var(--text); text-decoration: underline; }
.t-dur { text-align: right; font-variant-numeric: tabular-nums; }
.t-row .like { opacity: 0; } .t-row:hover .like, .t-row .like.on { opacity: 1; }
.t-row .t-more { opacity: 0; } .t-row:hover .t-more { opacity: 1; }
.t-row .icon-btn { width: 32px; height: 32px; } .t-row .icon-btn i { width: 18px; height: 18px; }
.empty-msg { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-msg b { display: block; color: var(--text); font-size: 20px; margin-bottom: 6px; }

/* buscar */
.search-bar { position: sticky; top: 0; z-index: 3; padding: 16px 26px; background: var(--bg2); }
.search-bar .box { display: flex; align-items: center; gap: 10px; background: var(--surface2); border-radius: 999px; padding: 0 16px; max-width: 520px; border: 2px solid transparent; }
.search-bar .box:focus-within { border-color: var(--text); }
.search-bar input { flex: 1; background: none; border: 0; padding: 12px 0; font-size: 15px; outline: none; }
.genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.genre { aspect-ratio: 1.6; border-radius: 10px; padding: 14px; font-weight: 800; font-size: 20px; position: relative; overflow: hidden; letter-spacing: -.02em; }
.genre::after { content: ""; position: absolute; right: -18px; bottom: -14px; width: 90px; height: 90px; border-radius: 12px; background: rgba(255,255,255,.18); transform: rotate(25deg); }
.top-res { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; }
.top-card { background: var(--surface); border-radius: 10px; padding: 20px; position: relative; transition: background .2s; }
.top-card:hover { background: var(--hover); }
.top-card img { width: 96px; height: 96px; border-radius: 6px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.4); margin-bottom: 18px; }
.top-card b { font-size: 28px; display: block; letter-spacing: -.02em; }
.top-card .fab { position: absolute; right: 18px; bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--surface2); font-size: 13.5px; font-weight: 600; }
.chip.on { background: var(--text); color: #111; }

/* ---------- reproductor ---------- */
#player { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(180px, 1fr); align-items: center; gap: 12px; padding: 0 10px; position: relative; }
#player.empty .pl-left, #player.empty .pl-right { visibility: hidden; }
.pl-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
#p-art { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--surface2); flex: none; cursor: pointer; }
.p-meta { min-width: 0; display: flex; flex-direction: column; }
.p-meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#p-title { font-weight: 600; font-size: 14px; } #p-artist { color: var(--muted); font-size: 12.5px; }
.p-meta a:hover { text-decoration: underline; color: var(--text); }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ctrls { display: flex; align-items: center; gap: 14px; }
.ctrls .icon-btn i { width: 20px; height: 20px; }
.prog { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog span { min-width: 36px; text-align: center; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--text) var(--p, 0%), #4a4a5c var(--p, 0%)); }
input[type=range]:hover { background: linear-gradient(90deg, var(--a1) var(--p, 0%), #4a4a5c var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
input[type=range]:hover::-webkit-slider-thumb { opacity: 1; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pl-right .vol-ico { color: var(--muted); width: 20px; height: 20px; margin-left: 6px; }
#p-vol { max-width: 110px; }
.mini-prog { display: none; }

/* panel letra / cola */
.panel-tabs { display: flex; align-items: center; gap: 6px; padding: 12px 12px 6px; }
.panel-tabs button[data-ptab] { padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.panel-tabs button.on { background: var(--surface2); color: var(--text); }
.panel-tabs #panel-x { margin-left: auto; }
#panel-body { flex: 1; overflow-y: auto; padding: 10px 16px 30px; }
.lyrics { font-size: 22px; font-weight: 700; line-height: 1.5; letter-spacing: -.01em; }
.lyrics p { margin: 0 0 10px; color: rgba(255,255,255,.45); transition: color .25s; cursor: pointer; }
.lyrics p.past { color: rgba(255,255,255,.75); } .lyrics p.cur { color: #fff; }
.lyrics.plain p { color: rgba(255,255,255,.9); cursor: default; }
.q-sec { color: var(--muted); font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 6px; font-size: 14px; }
.q-item:hover { background: var(--surface); }
.q-item img { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; background: var(--surface2); }
.q-item div { flex: 1; min-width: 0; } .q-item b, .q-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item b { font-weight: 500; } .q-item small { color: var(--muted); }
.q-item.cur b { color: var(--a1); }
.q-item .icon-btn { width: 30px; height: 30px; opacity: 0; } .q-item:hover .icon-btn { opacity: 1; }

/* pantalla completa */
#now { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; padding: 12px 22px calc(18px + var(--safe-b)); overflow-y: auto; background: #111; }
.now-bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--hero, #3b2b6b), #0b0b10 75%); transition: background .6s; }
.now-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
.now-top .icon-btn { color: var(--text); }
.now-art-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 26px 0; min-height: 260px; }
#now-art { width: min(100%, 52vh); aspect-ratio: 1; border-radius: 10px; object-fit: cover; box-shadow: 0 20px 60px rgba(0,0,0,.55); background: var(--surface2); }
.now-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.now-meta div { min-width: 0; } .now-meta b { display: block; font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-meta a { color: rgba(255,255,255,.75); }
.now-meta .like i { width: 26px; height: 26px; }
.now-prog { flex-direction: column; align-items: stretch; max-width: none; margin-top: 14px; }
.now-prog .times { display: flex; justify-content: space-between; }
.ctrls.big { justify-content: space-between; margin: 10px 0 14px; }
.ctrls.big .icon-btn { width: 48px; height: 48px; color: var(--text); } .ctrls.big .icon-btn i { width: 30px; height: 30px; }
.ctrls.big #now-shuffle i, .ctrls.big #now-repeat i { width: 24px; height: 24px; }
.ctrls.big .icon-btn.on { color: var(--a1); }
.ctrls.big .play-btn { width: 68px; height: 68px; } .ctrls.big .play-btn i { width: 32px; height: 32px; }
.now-tabs { display: flex; justify-content: center; gap: 10px; }
.now-tabs button { padding: 8px 18px; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 600; font-size: 14px; }
.now-tabs button.on { background: #fff; color: #111; }
#now-extra { margin-top: 14px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 16px; min-height: 50vh; }

/* menú contextual, avisos, diálogos */
#menu { position: fixed; z-index: 60; min-width: 220px; max-width: 300px; background: #262634; border-radius: 8px; padding: 4px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
#menu button, #menu a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 4px; font-size: 14px; text-align: left; }
#menu button:hover, #menu a:hover { background: rgba(255,255,255,.1); }
#menu i { width: 18px; height: 18px; color: var(--muted); }
#menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 4px 0; }
#menu .sub-title { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
#toast { position: fixed; left: 50%; bottom: calc(var(--player) + 30px + var(--safe-b)); transform: translate(-50%, 20px); background: #fff; color: #111; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 70; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(440px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h3 { margin: 0 0 14px; }
dialog form { display: flex; flex-direction: column; gap: 12px; }
dialog .bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* subir */
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 40px 20px; text-align: center; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--a1); background: rgba(255,77,125,.06); }
.drop i { width: 48px; height: 48px; color: var(--a1); margin-bottom: 6px; }
.drop h3 { margin: 6px 0; } .drop .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.up-list { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.up-item { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.up-item div { flex: 1; min-width: 0; } .up-item b, .up-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item small { color: var(--muted); }
.up-item .st { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.st.ok { color: #4ade80; } .st.error { color: #ff7a8f; } .st.repetida { color: #facc15; } .st.subiendo { color: var(--muted); }
.bar-wrap { height: 6px; border-radius: 6px; background: var(--surface2); overflow: hidden; margin-top: 10px; }
.bar-wrap span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.tips { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.tips li { margin-bottom: 4px; }

/* admin / cuenta */
.box-card { background: var(--surface); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.box-card h3 { margin: 0 0 12px; font-size: 17px; }
.u-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.u-row:first-of-type { border-top: 0; }
.u-row div { flex: 1; min-width: 140px; } .u-row small { color: var(--muted); display: block; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--muted); font-weight: 700; margin-left: 6px; }
.disk { height: 10px; border-radius: 10px; background: var(--surface2); overflow: hidden; margin: 8px 0; }
.disk span { display: block; height: 100%; background: var(--grad); }
.code-box { font: 700 22px ui-monospace, monospace; letter-spacing: .08em; background: var(--bg2); border-radius: 10px; padding: 14px; text-align: center; margin: 10px 0; user-select: all; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

/* ---------- celular ---------- */
#tabbar { display: none; }
@media (max-width: 860px) {
  :root { --player: 64px; --tab: 58px; }
  #shell { grid-template-columns: 1fr; grid-template-rows: 1fr; grid-template-areas: "main"; padding: 0; gap: 0; }
  #side, #panel { display: none !important; }
  #main { border-radius: 0; padding-bottom: calc(var(--player) + var(--tab) + var(--safe-b) + 12px); }
  #player { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tab) + var(--safe-b) + 6px); height: var(--player); z-index: 20;
    grid-template-columns: 1fr auto; padding: 0 8px; border-radius: 10px; background: var(--hero-mini, #2c2540); box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: background .5s; }
  #player.empty { display: none; }
  #p-art { width: 46px; height: 46px; border-radius: 4px; }
  .pl-center .prog, #p-shuffle, #p-prev, #p-repeat, .pl-right { display: none; }
  .pl-center { flex-direction: row; } .ctrls { gap: 2px; }
  .pl-center .play-btn { background: none; color: #fff; width: 40px; height: 40px; } .pl-center .play-btn i { width: 28px; height: 28px; }
  .mini-prog { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; }
  .mini-prog span { display: block; height: 100%; width: 0; background: #fff; }
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); z-index: 19;
    background: linear-gradient(180deg, rgba(11,11,16,.6), #0b0b10 40%); backdrop-filter: blur(8px); }
  #tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
  #tabbar a.on { color: var(--text); }
  .view { padding: 16px 16px 30px; }
  .hero { flex-direction: column; align-items: center; text-align: center; padding: 50px 16px 16px; min-height: 0; }
  .hero-art { width: 200px; height: 200px; }
  .hero-txt h1 { font-size: 30px; }
  .actions { padding: 12px 16px; }
  .tracks { padding: 0 6px 30px; }
  .t-head { display: none; }
  .t-row { grid-template-columns: minmax(0, 1fr) 36px 36px; height: 60px; padding: 0 10px; }
  .t-row .t-num, .t-row .t-album, .t-row .t-dur { display: none; }
  .t-row .like, .t-row .t-more { opacity: 1; }
  .search-bar { padding: 12px 16px; }
  .top-res { grid-template-columns: 1fr; }
  .row { grid-auto-columns: 140px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card .fab { display: none; }
  .quick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick a { font-size: 12.5px; } .quick img, .quick .ph { width: 48px; height: 48px; }
  .greet { font-size: 24px; }
  .mobile-top { display: flex !important; }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; margin-bottom: 6px; }
@media (min-width: 861px) { #now { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.top-card { display: block; }
.top-card .muted { display: block; margin-top: 4px; }
.top-res .t-head, .top-res .t-row { grid-template-columns: 34px minmax(0, 1fr) 40px 50px 34px; }
.top-res .t-album, .top-res .t-head span:nth-child(3) { display: none; }
.top-res .tracks { padding: 0; }
