:root {
  --bg: #0a0a10;
  --bg-2: #12121b;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f3f8;
  --text-2: rgba(244, 243, 248, 0.64);
  --text-3: rgba(244, 243, 248, 0.42);
  --accent: #ff4f8b;
  --accent-2: #a45cff;
  --accent-3: #4d7cff;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  --dyn: 164, 92, 255;            /* color dominante de la carátula actual */
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 240px;
  --mini-h: 84px;
  --tab-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
img { display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--dyn), .5); }
::-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; }

/* Fondo ambiental con el color de la carátula */
.ambient-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vw 50vh at 15% -10%, rgba(var(--dyn), .35), transparent 70%),
    radial-gradient(50vw 45vh at 100% 0%, rgba(var(--dyn), .18), transparent 70%);
  transition: background 1.2s var(--ease);
}

.layout { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100%; }

/* Barra lateral */
.sidebar { padding: 28px 16px; display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--border); background: rgba(10,10,16,.45); backdrop-filter: blur(30px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 8px 24px rgba(164,92,255,.4); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; color: var(--text-2); font-weight: 600; transition: .2s var(--ease); }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav a.active svg { color: var(--accent); }
.scan-status { margin-top: auto; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.scan-status .bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.scan-status .bar i { display: block; height: 100%; background: var(--grad); transition: width .3s; }

/* Zona principal */
.main { overflow-y: auto; overflow-x: hidden; padding-bottom: calc(var(--mini-h) + var(--tab-h) + var(--safe-b) + 32px); scroll-behavior: smooth; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 18px 40px; background: linear-gradient(var(--bg) 30%, transparent); }
.back-btn { opacity: .9; }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 16px; height: 44px; backdrop-filter: blur(20px); transition: .2s; }
.search:focus-within { border-color: rgba(var(--dyn), .7); box-shadow: 0 0 0 4px rgba(var(--dyn), .15); }
.search svg { width: 18px; height: 18px; color: var(--text-3); }
.search input { flex: 1; background: none; border: 0; outline: none; min-width: 0; }
.search input::placeholder { color: var(--text-3); }
.view { padding: 8px 40px 40px; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

h1.page-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 24px; }
.section { margin: 8px 0 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.section-head a { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.section-head a:hover { color: var(--text); }

/* Botones */
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); transition: .2s var(--ease); flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.lg svg { width: 28px; height: 28px; }
.icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.toggle.on { color: rgb(var(--dyn)); filter: brightness(1.4) saturate(1.2); }
.icon-btn.toggle.on::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateY(16px); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); transition: .2s var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.btn.primary { background: var(--grad); border: 0; box-shadow: 0 10px 30px rgba(255,79,139,.3); color: #fff; }
.btn.primary:hover { box-shadow: 0 14px 34px rgba(255,79,139,.45); }
.btn.danger { color: #ff7a8f; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Carátulas */
.art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-2); }
.card { position: relative; display: block; border-radius: var(--radius); padding: 12px; transition: .25s var(--ease); min-width: 0; }
.card:hover { background: var(--surface); }
.card .art-box { position: relative; }
.card .art { box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.card .art.round { border-radius: 50%; }
.card .hover-play { position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px) scale(.9); transition: .25s var(--ease); }
.card .hover-play svg { width: 20px; height: 20px; margin-left: 2px; }
.card:hover .hover-play, .card:focus-within .hover-play { opacity: 1; transform: none; }
.card-title { margin: 12px 2px 2px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin: 0 2px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.center { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 6px 4px; margin: 0 -12px; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 4px; overflow-x: auto; margin: 0 -40px; padding: 0 28px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel .card { scroll-snap-align: start; }

/* Héroe de inicio */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 40px; margin: 8px 0 36px; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(135deg, rgba(255,79,139,.85), rgba(164,92,255,.85) 50%, rgba(77,124,255,.85)); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px 300px at 85% 20%, rgba(255,255,255,.35), transparent 70%); }
.hero > * { position: relative; }
.hero small { font-weight: 700; letter-spacing: .12em; font-size: 12px; opacity: .85; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; letter-spacing: -.035em; margin: 8px 0 10px; font-weight: 800; }
.hero p { margin: 0 0 22px; max-width: 520px; opacity: .9; }
.hero .btn { background: #fff; color: #18121f; border: 0; }
.hero .btn.ghost { background: rgba(255,255,255,.18); color: #fff; }
.hero-covers { position: absolute; right: 30px; top: 50%; transform: translateY(-50%) rotate(-8deg); display: flex; gap: 14px; }
.hero-covers img { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.hero-covers img:nth-child(2) { transform: translateY(-30px); }

/* Detalle de álbum / artista */
.detail-hero { display: flex; gap: 32px; align-items: flex-end; margin: 8px 0 28px; }
.detail-hero .art { width: 232px; flex: none; border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.detail-hero .art.round { border-radius: 50%; }
.detail-hero small { color: var(--text-2); font-weight: 700; letter-spacing: .1em; font-size: 12px; }
.detail-hero h1 { font-size: clamp(28px, 4.5vw, 48px); line-height: 1.05; letter-spacing: -.035em; margin: 8px 0 10px; font-weight: 800; }
.detail-hero .meta { color: var(--text-2); margin: 0 0 20px; }
.detail-hero .meta a { color: var(--text); font-weight: 700; }
.detail-hero .meta a:hover { text-decoration: underline; }

/* Lista de canciones */
.tracks { display: flex; flex-direction: column; }
.track { display: grid; grid-template-columns: 36px 48px minmax(0, 1fr) minmax(0, .8fr) 60px; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.track.no-art { grid-template-columns: 36px minmax(0, 1fr) minmax(0, .8fr) 60px; }
.track:hover { background: var(--surface); }
.track.playing { background: rgba(var(--dyn), .14); }
.track.playing .t-title { color: rgb(var(--dyn)); filter: brightness(1.5); }
.track .num { color: var(--text-3); font-size: 13.5px; text-align: center; font-variant-numeric: tabular-nums; position: relative; }
.track .num svg { width: 16px; height: 16px; display: none; color: var(--text); margin: auto; }
.track:hover .num span { display: none; } .track:hover .num svg { display: block; }
.track .art { width: 48px; border-radius: 8px; }
.t-main { min-width: 0; }
.t-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sub, .t-album { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-dur { text-align: right; color: var(--text-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tracks-head { display: grid; grid-template-columns: 36px 48px minmax(0, 1fr) minmax(0, .8fr) 60px; gap: 14px; padding: 0 12px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 12px; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.tracks-head button { text-align: left; letter-spacing: inherit; font-weight: inherit; }
.tracks-head button:hover, .tracks-head button.on { color: var(--text); }
.eq { display: inline-flex; gap: 2px; height: 14px; align-items: flex-end; }
.eq i { width: 3px; background: rgb(var(--dyn)); filter: brightness(1.5); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.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 { 0%,100% { height: 30%; } 50% { height: 100%; } }

.tracks.hide-album .t-album { display: none; }
.tracks.hide-album .track.no-art { grid-template-columns: 36px minmax(0, 1fr) 60px; }

/* Artistas */
.artist-avatar { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 42px; font-weight: 800; overflow: hidden; }

/* Fuentes */
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.source { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.source-head { display: flex; gap: 14px; align-items: center; }
.source-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.source-icon svg { width: 24px; height: 24px; }
.source h3 { margin: 0; font-size: 18px; }
.source p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.source .status { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.source .status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.source .status.ok::before { background: #3ddc97; box-shadow: 0 0 10px #3ddc97; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field input { height: 44px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.25); padding: 0 14px; outline: none; transition: .2s; }
.field input:focus { border-color: rgba(var(--dyn), .8); box-shadow: 0 0 0 4px rgba(var(--dyn), .15); }
details.help { font-size: 13px; color: var(--text-2); }
details.help summary { cursor: pointer; font-weight: 600; color: var(--text); }
details.help ol { padding-left: 18px; margin: 8px 0 0; } details.help li { margin: 4px 0; }
details.help code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty svg { width: 48px; height: 48px; color: var(--text-3); margin-bottom: 12px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 0 20px; }

/* Mini reproductor */
.mini { position: fixed; z-index: 20; left: calc(var(--sidebar) + 16px); right: 16px; bottom: calc(16px + var(--tab-h) + var(--safe-b)); height: var(--mini-h); display: flex; align-items: center; gap: 16px; padding: 0 18px 0 12px; border-radius: 22px; background: rgba(24, 22, 34, .72); backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6); border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 0 0 100vmax rgba(var(--dyn), .06); animation: slideUp .4s var(--ease); }
@keyframes slideUp { from { transform: translateY(120%); } }
.mini-progress { position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.mini-progress-fill { height: 100%; width: 0; background: rgb(var(--dyn)); filter: brightness(1.5); }
.mini-info { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; text-align: left; }
.mini-art { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 16px rgba(0,0,0,.4); background: var(--bg-2); }
.mini-text { display: flex; flex-direction: column; min-width: 0; }
.mini-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.mini-text span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-controls { display: flex; align-items: center; gap: 4px; }
.play-btn { width: 48px; height: 48px; background: #fff; color: #111 !important; }
.play-btn:hover { transform: scale(1.06); background: #fff !important; }
.play-btn svg { width: 20px; height: 20px; }
.mini-extra { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: flex-end; }
.time { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-right: 8px; }

/* Controles deslizantes */
.range { -webkit-appearance: none; appearance: none; background: transparent; height: 18px; cursor: pointer; --p: 0%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.18) var(--p)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.18) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; }
.range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb { opacity: 1; }
.vol { width: 110px; }

/* Reproduciendo ahora (pantalla completa) */
.np { position: fixed; inset: 0; z-index: 40; overflow: hidden; background: #000; transform: translateY(100%); transition: transform .55s var(--ease), visibility 0s .55s; visibility: hidden; }
.np.open { transform: none; visibility: visible; transition: transform .55s var(--ease); }
.np-bg { position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(var(--dyn), .9), rgba(var(--dyn), .25) 55%, #07070b); transition: background 1s; }
.np-bg img { position: absolute; inset: -15%; width: 130%; height: 130%; object-fit: cover; filter: blur(80px) saturate(1.6) brightness(.6); opacity: .75; animation: drift 30s ease-in-out infinite alternate; }
.np-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55)); }
@keyframes drift { to { transform: scale(1.15) rotate(6deg); } }
.np-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 28px calc(24px + var(--safe-b)); max-width: 1180px; margin: 0 auto; }
.np-head { display: flex; align-items: center; justify-content: space-between; }
.np-head .icon-btn { color: #fff; background: rgba(255,255,255,.1); }
.np-head .icon-btn svg { width: 24px; height: 24px; }
.np-from { text-align: center; display: flex; flex-direction: column; }
.np-from small { font-size: 10.5px; letter-spacing: .14em; color: rgba(255,255,255,.6); font-weight: 700; }
.np-from span { font-weight: 700; font-size: 14px; }
.np-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; min-height: 0; }
.np-art-wrap { position: relative; justify-self: end; width: min(100%, 52vh, 520px); }
.np-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 24px; box-shadow: 0 40px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); transition: transform .5s var(--ease); background: var(--bg-2); }
.np.paused .np-art { transform: scale(.92); }
.np-loading { position: absolute; inset: 0; display: none; place-items: center; }
.np-loading.on { display: grid; }
.np-loading span { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.np-panel { display: flex; flex-direction: column; gap: 22px; max-width: 460px; width: 100%; }
.np-meta h2 { font-size: clamp(26px, 3.5vw, 40px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 800; }
.np-meta p { margin: 0; color: rgba(255,255,255,.72); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta a:hover { color: #fff; text-decoration: underline; }
.np-meta .dot { opacity: .5; }
.np-viz { width: 100%; height: 80px; }
.np-seek .range { width: 100%; }
.np-seek .range::-webkit-slider-thumb { opacity: 1; }
.np-seek .range::-moz-range-thumb { opacity: 1; }
.np-times { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; margin-top: 4px; }
.np-controls { display: flex; align-items: center; justify-content: space-between; }
.np-controls .icon-btn { color: rgba(255,255,255,.85); position: relative; }
.np-controls .icon-btn.toggle.on { color: #fff; filter: none; }
.np-controls .icon-btn.toggle.on svg { filter: drop-shadow(0 0 8px rgba(255,255,255,.7)); }
.play-big { width: 76px; height: 76px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; box-shadow: 0 16px 40px rgba(0,0,0,.35); transition: transform .2s var(--ease); }
.play-big:hover { transform: scale(1.06); } .play-big:active { transform: scale(.96); }
.play-big svg { width: 30px; height: 30px; }
.np-vol { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.7); }
.np-vol .range { flex: 1; }
.np-vol .icon-btn { color: inherit; }

/* Cola */
.queue-panel { position: fixed; z-index: 50; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px)); background: rgba(20, 18, 28, .85); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px); border: 1px solid var(--border); border-radius: 24px; display: flex; flex-direction: column; transform: translateX(110%); transition: transform .45s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.queue-panel.open { transform: none; }
.queue-panel header { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px 22px; }
.queue-panel h3 { margin: 0; font-size: 19px; }
.queue-list { overflow-y: auto; padding: 0 10px 14px; }
.queue-list .track { grid-template-columns: 44px minmax(0, 1fr) 48px; }
.queue-list .track .art { width: 44px; }
.queue-list .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--text-3); padding: 14px 12px 6px; }

.toast { line-height: 1.4; text-align: center; position: fixed; z-index: 60; left: 50%; bottom: calc(var(--mini-h) + var(--tab-h) + var(--safe-b) + 32px); transform: translate(-50%, 20px); background: #fff; color: #111; padding: 12px 20px; border-radius: 14px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s var(--ease); max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.tabbar { display: none; }

/* ======= Móvil y tablet ======= */
@media (max-width: 900px) {
  :root { --tab-h: 64px; --mini-h: 68px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: max(12px, env(safe-area-inset-top)) 16px 12px; }
  .search { max-width: none; }
  .view { padding: 4px 16px 24px; }
  .carousel { margin: 0 -16px; padding: 0 4px 8px; grid-auto-columns: 152px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 -8px; }
  .card { padding: 8px; }
  .card .hover-play { opacity: 1; transform: none; width: 38px; height: 38px; }
  .hero { padding: 26px; min-height: 220px; border-radius: 22px; }
  .hero-covers { display: none; }
  .detail-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .detail-hero .art { width: min(62vw, 260px); align-self: center; }
  .track, .tracks-head { grid-template-columns: 28px 44px minmax(0, 1fr) 48px; gap: 12px; padding: 8px 6px; }
  .track.no-art { grid-template-columns: 28px minmax(0, 1fr) 48px; }
  .track .art { width: 44px; }
  .t-album, .tracks-head .col-album { display: none; }
  .tabbar { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: rgba(10,10,16,.85); backdrop-filter: blur(30px); border-top: 1px solid var(--border); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active svg { color: var(--accent); }
  .mini { left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); border-radius: 16px; padding: 0 8px 0 8px; gap: 8px; }
  .mini-art { width: 50px; height: 50px; border-radius: 10px; }
  .mini-progress { left: 14px; right: 14px; top: auto; bottom: 0; }
  .play-btn { width: 42px; height: 42px; background: transparent; color: var(--text) !important; }
  .play-btn:hover { background: transparent !important; }
  .play-btn svg { width: 24px; height: 24px; }
  .hide-sm { display: none !important; }
  .np-inner { padding-left: 22px; padding-right: 22px; }
  .np-body { grid-template-columns: 1fr; gap: 26px; align-content: center; }
  .np-art-wrap { justify-self: center; width: min(100%, 44vh); }
  .np-panel { justify-self: center; gap: 16px; }
  .np-viz { height: 50px; }
  .np-meta h2 { font-size: 24px; }
}
@media (max-width: 900px) and (max-height: 700px) { .np-viz { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
