/* ============================================================
   MauPlayer — styles.css
   Diseño oscuro, tipografía Inter + Syne, paleta verde Spotify.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #06060a;
  --bg2: #0c0c12;
  --surface: #131319;
  --surface2: #1b1b24;
  --surface3: #25252f;
  --surface4: #30303d;
  --accent: #1ed760;
  --accent-soft: rgba(30, 215, 96, 0.16);
  --accent-glow: rgba(30, 215, 96, 0.35);
  --danger: #ff5e6e;
  --warn: #fbbf24;
  --like: #ff4d8d;
  --text: #f6f6f8;
  --text2: #cccdd5;
  --text3: #9999a4;
  --muted: #6e6e7b;
  --muted2: #2a2a34;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --sidebar: 268px;
  --queue: 320px;
  --player-h: 92px;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 200ms var(--easing);
  --shadow-1: 0 2px 6px rgba(0,0,0,0.25);
  --shadow-2: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-3: 0 24px 60px rgba(0,0,0,0.55);
}
/* Tema claro — se activa con data-theme="light" en <html>. Solo se pisan
   los tokens que necesitan cambiar; los colores brand quedan iguales. */
:root[data-theme="light"] {
  --bg: #f7f7fa;
  --bg2: #ececf0;
  --surface: #ffffff;
  --surface2: #f0f0f4;
  --surface3: #e2e2e8;
  --surface4: #d0d0d8;
  --text: #14141a;
  --text2: #3a3a44;
  --text3: #5c5c68;
  --muted: #8a8a94;
  --muted2: #c8c8d0;
  --accent-soft: rgba(30, 215, 96, 0.22);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-rows: 1fr var(--player-h);
  grid-template-columns: var(--sidebar) 1fr;
  /* Usa dvh (dynamic viewport height) que se adapta a la barra de URL en iOS
     Safari. vh cuenta 100% del viewport SIN la barra, entonces cuando la
     barra está visible, el layout se corta arriba (bug visible en mobile). */
  height: 100vh;
  height: 100dvh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface3);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--surface4); background-clip: padding-box; }

button, input { font-family: inherit; }
button { background: none; border: none; color: inherit; cursor: pointer; }

/* ============== SIDEBAR ============== */
#sidebar {
  grid-row: 1;
  grid-column: 1;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg2) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--muted2);
}

#logo {
  padding: 24px 22px 18px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), #67e893);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

#logo svg {
  width: 26px; height: 26px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 22px 8px;
}

/* Antes: #genre-list era el único con flex:1 + overflow. Cuando
   agregamos #official-playlist-list y #playlist-list, se peleaban
   por el espacio y "Tu librería" se colapsaba a 1 item visible.
   Ahora #sidebar-scroll es el ÚNICO scroll y todas las sublistas
   comparten espacio natural (height auto), con jerarquía visual
   dada por el peso de los labels, no por altura arbitraria. */
#sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;         /* imprescindible en flex children con overflow;
                             sin esto los flex parents con children altos
                             colapsan el scroll y esconden el contenido */
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}
#genre-list {
  padding: 0 10px 4px;
}

.sidebar-label--sub {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.6px;
  opacity: 0.75;
}

.genre-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  color: var(--text2);
  margin-bottom: 2px;
  position: relative;
}

.genre-item:hover { background: var(--surface2); color: var(--text); }
.genre-item.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--accent);
}
.genre-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.genre-emoji {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.genre-meta { flex: 1; min-width: 0; }
.genre-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.genre-count { font-size: 11px; color: var(--muted); }

#sidebar-foot {
  border-top: 1px solid var(--muted2);
  padding: 14px 22px 16px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

#sidebar-foot a {
  color: var(--text3);
  text-decoration: none;
  cursor: pointer;
}
#sidebar-foot a:hover { color: var(--accent); }

/* ============== MAIN ============== */
#main {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 240px);
  position: relative;
  min-width: 0;
}

#topbar {
  padding: 18px 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text2);
}

#search-wrap {
  position: relative;
  flex-shrink: 0;
}

#search {
  background: var(--surface2);
  border: 1px solid var(--muted2);
  border-radius: 22px;
  padding: 9px 16px 9px 38px;
  color: var(--text);
  font-size: 13px;
  width: 280px;
  outline: none;
  transition: all var(--transition);
}

#search:focus { border-color: var(--accent); background: var(--surface3); width: 340px; }
#search::placeholder { color: var(--muted); }

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.topbar-spacer { flex: 1; }

.icon-btn-sq {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text2);
  transition: all var(--transition);
}
.icon-btn-sq:hover { background: var(--surface3); color: var(--text); }
.icon-btn-sq.active { background: var(--accent-soft); color: var(--accent); }

/* ============== HERO ============== */
#hero {
  padding: 14px 28px 10px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-shrink: 0;
}

#hero-cover {
  width: 120px; height: 120px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 48px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 4px 16px rgba(0,0,0,0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  background: linear-gradient(135deg, var(--accent), #0a4a1f);
  position: relative;
  overflow: hidden;
}

#hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.35) 100%);
}

#hero-meta { flex: 1; min-width: 0; padding-bottom: 6px; }

.hero-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
}

#hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  /* Antes: clamp(34px, 5vw, 62px). Ahora más compacto para dar aire a la lista. */
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -1.4px;
  line-height: 1;
  margin: 6px 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hero-sub {
  font-size: 13px;
  color: var(--text2);
}
#hero-sub strong { color: var(--text); }

#hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: 22px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform 100ms;
}
.btn:hover { background: #33e074; transform: scale(1.03); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

.btn.ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--muted2);
}
.btn.ghost:hover { color: var(--text); border-color: var(--muted); background: var(--surface2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #ff7c7c; }

/* ============== HIDDEN BANNER ============== */
#hidden-banner {
  margin: 8px 28px 0;
  padding: 11px 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

#hidden-banner.show { display: flex; }
#hidden-banner svg { width: 18px; height: 18px; color: var(--warn); flex-shrink: 0; }
#hidden-banner span { flex: 1; color: var(--text2); }
#hidden-banner .btn { padding: 5px 12px; font-size: 12px; }
#hidden-banner .btn.ghost { background: transparent; color: var(--muted); border-color: var(--muted2); }
#hidden-banner .btn.ghost:hover { color: var(--text); }

/* ============== TRACKLIST ============== */
#track-area {
  flex: 1;
  overflow-y: auto;
  padding: 6px 28px 16px;
}

#track-list-header {
  display: grid;
  grid-template-columns: 32px 40px 1fr 200px 110px 70px 130px;
  gap: 14px;
  padding: 10px 14px 8px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--muted2);
  margin-bottom: 4px;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}

#track-list-header .sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}
#track-list-header .sortable:hover { color: var(--text2); }
#track-list-header .sortable.sorted { color: var(--accent); }
#track-list-header .sortable.sorted::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  vertical-align: middle;
}
#track-list-header .sortable.sorted.asc::after { border-bottom: 5px solid var(--accent); }
#track-list-header .sortable.sorted.desc::after { border-top: 5px solid var(--accent); }
#track-list-header .h-r { text-align: right; }

.track-row {
  display: grid;
  grid-template-columns: 32px 40px 1fr 200px 110px 70px 130px;
  gap: 14px;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  position: relative;
}

.track-row:hover {
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface2) 60%, rgba(30,215,96,0.06) 100%);
}
.track-row.playing { background: var(--accent-soft); }
.track-row.playing .track-name,
.track-row.playing .track-num { color: var(--accent); }
.track-row.removing { opacity: 0; transform: translateX(20px); transition: opacity 0.25s, transform 0.25s; }
.track-row.dim { opacity: 0.4; }

.track-num {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  height: 24px;
  font-variant-numeric: tabular-nums;
}

.track-row:hover .track-num .num { display: none; }
.track-row:hover .track-num .play-icon { display: block; }
.play-icon { display: none; width: 14px; height: 14px; fill: var(--text); }

.track-row.playing .num { display: none; }
.track-row.playing .play-icon { display: none !important; }
.track-row.playing .bars { display: flex; }

.bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.bars span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: bar 1s ease-in-out infinite;
}
.bars span:nth-child(1) { animation-delay: -0.2s; }
.bars span:nth-child(2) { animation-delay: -0.5s; }
.bars span:nth-child(3) { animation-delay: -0.8s; }
@keyframes bar { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.track-row.paused .bars span { animation-play-state: paused; }

.track-cover {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  /* Centrar dentro del slot del grid (que es 40px). Sin esto la cover se
     ve corrida a la derecha 4px, "desalineada" del número de fila. */
  justify-self: center;
  border-radius: 5px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  position: relative;   /* para que el img absoluto se apile encima del text initial */
}
/* La carátula cargada debe llenar la caja de 36px. Position absolute encima
   del text-initial del fallback (setCoverArt sólo remueve el img viejo, no
   el textContent), sino aparecen ambos side-by-side como flex-children. */
.track-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Cuando hay art, oculta el text-initial que queda debajo (accesibilidad) */
.track-cover.has-art { color: transparent; text-shadow: none; }

.track-info { min-width: 0; }
.track-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.track-artist {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Nombre de artista clickeable */
.artist-link {
  cursor: pointer;
  transition: color 0.15s;
}
.artist-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.track-col.artist .artist-link:hover { color: var(--accent); }

.track-col {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-genre {
  font-size: 11px;
  color: var(--text3);
  padding: 3px 10px;
  background: var(--surface3);
  border-radius: 20px;
  width: fit-content;
  font-weight: 500;
  white-space: nowrap;
}

.track-row-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
}

.icon-mini {
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  opacity: 0;
}
.icon-mini svg { width: 18px; height: 18px; }
.track-row:hover .icon-mini { opacity: 1; }
.icon-mini.always { opacity: 1; }
.icon-mini:hover { background: var(--surface3); color: var(--text); }
.icon-mini.danger:hover { background: rgba(255,94,110,0.15); color: var(--danger); }
/* Add-to-playlist: SIEMPRE visible + tinte verde para destacar. Antes era
   uno de 4 iconos iguales y los users no lo encontraban. */
.icon-mini.add-pl {
  color: var(--accent, #1ed760);
  background: rgba(30,215,96,0.10);
}
.icon-mini.add-pl:hover {
  background: rgba(30,215,96,0.22);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(30,215,96,0.35);
}
.icon-mini.queue:hover { background: rgba(255,255,255,0.08); color: var(--text); transform: scale(1.05); }

/* Cover clickeable */
#cover-art, #hero-cover {
  cursor: zoom-in;
}
/* La carátula de cada fila reproduce la canción (no hace zoom), así que usa el
   mismo cursor de la fila para no confundir al usuario. */
.track-cover {
  cursor: pointer;
}
#cover-art:hover, #hero-cover:hover {
  filter: brightness(1.15);
  transition: filter 0.15s;
}

/* Modal ampliado de cover */
#cover-modal { z-index: 300; }
#cover-modal.show { display: flex; }
.cover-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: coverIn 0.24s var(--easing);
  position: relative;
}
@keyframes coverIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
#cover-modal-art {
  width: min(70vh, 520px);
  height: min(70vh, 520px);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 180px;
  color: rgba(255,255,255,0.95);
}
#cover-modal-art img { width: 100%; height: 100%; object-fit: cover; }
#cover-modal-info { text-align: center; max-width: 520px; }
#cover-modal-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--text);
  margin-bottom: 6px;
}
#cover-modal-artist { font-size: 15px; color: var(--text2); }
#cover-modal-close {
  position: absolute;
  top: -8px; right: -8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
#cover-modal-close:hover { background: var(--danger); transform: scale(1.1); }

/* Cola: item con marca */
.upnext-item.from-queue {
  background: linear-gradient(90deg, rgba(30,215,96,0.06), transparent);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.upnext-item .queue-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-right: 6px;
}
.icon-mini.liked,
.icon-mini.liked:hover { color: var(--like); opacity: 1; }
.icon-mini.liked svg { fill: var(--like); }
.icon-mini svg { width: 16px; height: 16px; }

.track-duration {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ============== EMPTY ============== */
#empty-state {
  text-align: center;
  padding: 60px 24px 80px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#empty-state .empty-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.85;
  filter: drop-shadow(0 8px 20px rgba(30, 215, 96, 0.15));
}
#empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  color: var(--text);
  margin: 0;
}
#empty-state p { font-size: 14px; max-width: 380px; margin: 0; color: var(--text2); line-height: 1.5; }
#empty-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============== PLAYER BAR ============== */
#player {
  grid-row: 2;
  grid-column: 1 / -1;
  background: var(--surface);
  border-top: 1px solid var(--muted2);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(220px, 1fr);
  align-items: center;
  padding: 0 22px;
  gap: 18px;
}

#now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#cover-art {
  width: 56px; height: 56px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
  background: var(--surface3);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: rgba(255,255,255,0.95);
}

#cover-art .ph { color: var(--muted); }
#cover-art .ph svg { width: 24px; height: 24px; }

#viz {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
#viz.on { opacity: 1; }

#np-text { min-width: 0; flex: 1; }
#np-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#np-artist {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

#btn-like-np {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  border-radius: 50%;
  transition: all var(--transition);
}
#btn-like-np:hover { color: var(--like); background: var(--surface3); }
#btn-like-np.liked { color: var(--like); }
#btn-like-np svg { width: 16px; height: 16px; }
#btn-like-np.liked svg { fill: currentColor; }
#btn-open-np-fs {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  border-radius: 50%;
  background: none;
  border: 0;
  cursor: pointer;
  transition: all var(--transition);
}
#btn-open-np-fs:hover { color: var(--accent); background: var(--surface3); }
#btn-open-np-fs svg { width: 15px; height: 15px; }

/* CENTER CONTROLS */
#controls-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#transport {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ctrl-btn {
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  padding: 6px;
  transition: color var(--transition), transform 100ms;
}
.ctrl-btn:hover { color: var(--text); }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.active { color: var(--accent); }

#btn-play {
  background: var(--text);
  color: #000;
  width: 38px; height: 38px;
  border-radius: 50%;
  transition: transform 100ms, background var(--transition);
  box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}
#btn-play:hover { background: var(--accent); transform: scale(1.05); }

#progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 540px;
}

.time-label {
  font-size: 11px;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#progress {
  flex: 1;
  height: 4px;
  background: var(--muted2);
  border-radius: 2px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
#progress::-webkit-slider-thumb {
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  margin-top: -4px;
  opacity: 0;
  transition: opacity var(--transition);
}
#progress:hover::-webkit-slider-thumb { opacity: 1; }
#progress::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), var(--muted2) var(--pct, 0%));
}

/* RIGHT CONTROLS */
#controls-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#btn-crossfade { font-size: 10px; gap: 4px; padding: 6px 10px; border-radius: 14px; }
#btn-crossfade.active { background: var(--accent-soft); }

#vol-icon { color: var(--muted); cursor: pointer; padding: 6px; border-radius: 50%; }
#vol-icon:hover { color: var(--text); }

#volume {
  width: 100px;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--muted2);
  border-radius: 2px;
}
#volume::-webkit-slider-thumb {
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
  transition: opacity var(--transition);
}
#volume:hover::-webkit-slider-thumb { opacity: 1; }
#volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--text) var(--vol, 80%), var(--muted2) var(--vol, 80%));
}

/* ============== DROP ZONE ============== */
#drop-zone {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 100;
  gap: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
#drop-zone.active { opacity: 1; pointer-events: all; }
#drop-zone svg { width: 64px; height: 64px; color: var(--accent); }
#drop-zone p { font-family: 'Syne', sans-serif; font-size: 22px; }

/* ============== MODAL ============== */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s var(--easing);
}
.modal-bg.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--muted2);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 640px;
  width: 92%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.modal p { font-size: 13px; color: var(--text2); line-height: 1.65; }

.modal pre {
  background: var(--bg2);
  border: 1px solid var(--muted2);
  border-radius: 8px;
  padding: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--accent);
  overflow: auto;
  max-height: 320px;
  white-space: pre;
  user-select: text;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* ============== HELP MODAL TABLE ============== */
.shortcuts-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 22px;
  font-size: 13px;
  align-items: center;
}

.shortcuts-table kbd {
  background: var(--surface3);
  border: 1px solid var(--muted2);
  color: var(--text);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  min-width: 18px;
  text-align: center;
}

.shortcuts-table .label { color: var(--text2); }

/* ============== CONTEXT MENU ============== */
#ctx-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--muted2);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 6px;
  min-width: 220px;
  z-index: 250;
  display: none;
  animation: ctxIn 0.12s var(--easing);
}
#ctx-menu.show { display: block; }

@keyframes ctxIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#ctx-menu .ctx-header {
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--muted2);
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ctx-menu .ctx-header strong { color: var(--text); display: block; font-size: 13px; }

#ctx-menu button {
  width: 100%;
  text-align: left;
  display: flex; align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
}
#ctx-menu button:hover { background: var(--surface2); color: var(--text); }
#ctx-menu button svg { width: 14px; height: 14px; flex-shrink: 0; }
#ctx-menu button.danger:hover { color: var(--danger); }
#ctx-menu button.like:hover { color: var(--like); }
#ctx-menu .sep { height: 1px; background: var(--muted2); margin: 4px 0; }

/* ============== PLAYLISTS SECTION ============== */
.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 6px;
  margin-top: 4px;
}
.sidebar-section-head .sidebar-label {
  padding: 0;
}
.sidebar-section-head button {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface2);
  transition: all var(--transition);
}
.sidebar-section-head button:hover { background: var(--accent); color: #000; }
.sidebar-section-head button svg { width: 12px; height: 12px; }

#playlist-list {
  padding: 0 10px 12px;
}

/* Playlist input inline */
.playlist-new-form {
  padding: 6px 12px 10px;
  display: flex;
  gap: 6px;
}
.playlist-new-form input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.playlist-new-form button {
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
}

/* Submenu for "add to playlist" */
#submenu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--muted2);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 6px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 260;
  display: none;
  animation: ctxIn 0.12s var(--easing);
}
#submenu.show { display: block; }
#submenu .submenu-header {
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--muted2);
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
#submenu button {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--transition);
}
#submenu button:hover { background: var(--surface2); color: var(--text); }
#submenu button.new-pl { color: var(--accent); font-weight: 600; }
#submenu .pl-icon-small {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
#submenu .pl-count-small {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

/* ============== UP NEXT PANEL ============== */
#upnext-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: calc(var(--player-h) + 16px);
  width: var(--queue);
  background: var(--surface);
  border: 1px solid var(--muted2);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 32px));
  transition: transform 280ms var(--easing);
  overflow: hidden;
}
#upnext-panel.open { transform: translateX(0); }

#upnext-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--muted2);
}

#upnext-head h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.upnext-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--muted2);
}

.upnext-tab {
  padding: 6px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
}
.upnext-tab.active { background: var(--accent-soft); color: var(--accent); }
.upnext-tab:hover { color: var(--text); }
.upnext-tab.active:hover { color: var(--accent); }

.upnext-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 10px;
}

.upnext-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.upnext-item:hover { background: var(--surface2); }
.upnext-item .uc {
  width: 36px; height: 36px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
}
.upnext-item .uc img { width: 100%; height: 100%; object-fit: cover; }
.upnext-item .ui-info { flex: 1; min-width: 0; }
.upnext-item .ui-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upnext-item .ui-artist {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upnext-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

#btn-close-panel {
  background: var(--surface2);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
#btn-close-panel:hover { color: var(--text); }

/* Player bar buttons: queue + sleep */
#btn-queue, #btn-sleep {
  position: relative;
}
#btn-queue.active, #btn-sleep.active { color: var(--accent); }
#sleep-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: none;
}
#btn-sleep.active #sleep-badge { display: block; }

/* Sleep timer modal layout */
.sleep-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0;
}
.sleep-opt {
  padding: 14px 8px;
  background: var(--surface2);
  border: 1px solid var(--muted2);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text2);
}
.sleep-opt:hover { background: var(--surface3); color: var(--text); }
.sleep-opt.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sleep-opt .v {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: block;
}
.sleep-opt .l { font-size: 11px; opacity: 0.7; margin-top: 4px; }

/* Hero cover when album art loaded */
#hero-cover img, #cover-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
#hero-cover.has-art .label, #cover-art.has-art .label { display: none; }
#hero-cover, #cover-art { position: relative; }

/* ============== LOADING SKELETON ============== */
.skel-row {
  display: grid;
  grid-template-columns: 32px 40px 1fr 200px 110px 70px 130px;
  gap: 14px;
  align-items: center;
  padding: 7px 14px;
}
@media (max-width: 1100px) {
  .skel-row { grid-template-columns: 32px 40px 1fr 160px 90px 130px; }
}
@media (max-width: 760px) {
  .skel-row { grid-template-columns: 32px 40px 1fr 70px; }
}
.skel-bar {
  height: 12px;
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: skel 1.4s ease-in-out infinite;
}
.skel-bar.cover { width: 36px; height: 36px; border-radius: 5px; }
.skel-bar.short { width: 50%; }
.skel-bar.tall { height: 32px; }
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============== ADMIN BADGE ============== */
#admin-badge {
  display: none;
  background: linear-gradient(135deg, var(--accent), #67e893);
  color: #000;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.15s;
}
body.admin #admin-badge { display: inline-flex; align-items: center; gap: 4px; }
#admin-badge:hover { opacity: 0.85; }
#admin-badge svg { width: 12px; height: 12px; }

/* Highlight delete button when admin */
body.admin .icon-mini.danger { color: var(--danger); }
body.admin .icon-mini.danger:hover { background: rgba(255,94,110,0.2); }

/* ============== WISHLIST ============== */
#btn-request {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #000;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(30, 215, 96, 0.18);
}
#btn-request:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30, 215, 96, 0.3); }
#btn-request:active { transform: scale(0.98); }
#btn-request svg { width: 14px; height: 14px; }

.wishlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wishlist-form label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
.wishlist-form input,
.wishlist-form textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--muted2);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.wishlist-form input:focus,
.wishlist-form textarea:focus { border-color: var(--accent); }
.wishlist-form textarea { resize: vertical; min-height: 60px; }

.wishlist-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.wish-card {
  background: var(--surface2);
  border: 1px solid var(--muted2);
  border-radius: 10px;
  padding: 14px;
  position: relative;
}
.wish-card.status-added { border-left: 3px solid var(--accent); }
.wish-card.status-rejected { border-left: 3px solid var(--danger); opacity: 0.5; }
.wish-card.status-pending { border-left: 3px solid var(--warn); }
.wish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.wish-requester {
  font-weight: 600;
  font-size: 13px;
}
.wish-status {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--surface3);
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.wish-status.added { background: var(--accent-soft); color: var(--accent); }
.wish-status.rejected { background: rgba(255,94,110,0.15); color: var(--danger); }
.wish-status.pending { background: rgba(251,191,36,0.15); color: var(--warn); }
.wish-desc {
  font-size: 14px;
  color: var(--text);
  margin: 4px 0;
}
.wish-meta {
  font-size: 11px;
  color: var(--muted);
}
.wish-meta a { color: var(--text2); text-decoration: underline; }
.wish-meta a:hover { color: var(--accent); }
.wish-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.wish-actions button {
  background: var(--surface3);
  color: var(--text2);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  transition: background 0.15s, color 0.15s;
}
.wish-actions button:hover { background: var(--surface4); color: var(--text); }
.wish-actions .pri { background: var(--accent); color: #000; }
.wish-actions .pri:hover { background: #33e074; color: #000; }
.wish-actions .dan { background: rgba(255,94,110,0.18); color: var(--danger); }
.wish-actions .dan:hover { background: rgba(255,94,110,0.3); }

/* ============== NEW BADGE ============== */
.new-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  background: linear-gradient(135deg, var(--accent), #67e893);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  position: relative;
  top: -1px;
  overflow: hidden;
  isolation: isolate;
}
/* Shimmer diagonal que barre la etiqueta cada ~3.2s */
.new-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255,255,255,0.55) 50%,
    transparent 75%
  );
  transform: translateX(-120%);
  animation: shimmerSweep 3.2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes shimmerSweep {
  0%   { transform: translateX(-120%); }
  55%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* Variantes por frescura — más brillante mientras más nueva */
.new-badge--today {
  background: linear-gradient(135deg, #ffb800, #ff5e6e);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,94,110,0.45);
}
.new-badge--yesterday {
  background: linear-gradient(135deg, #ff8a3d, #ffb800);
  color: #1a1a1a;
}
.new-badge--recent {
  background: linear-gradient(135deg, #21c064, #67e893);
  color: #001a08;
}
/* NUEVA (7-13d) usa el gradiente por defecto */

/* ============== TOAST ============== */
#toast {
  position: fixed;
  bottom: calc(var(--player-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface3);
  border: 1px solid var(--muted2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============== RESPONSIVE ============== */
@media (max-width: 1100px) {
  #track-list-header, .track-row {
    grid-template-columns: 32px 40px 1fr 160px 90px 130px;
  }
  .track-col.artist, .h-artist { display: none; }
}

@media (max-width: 760px) {
  body { grid-template-columns: 1fr; }
  #sidebar { display: none; position: fixed; left: 0; top: 0; bottom: var(--player-h); width: 80%; max-width: 280px; z-index: 50; }
  #sidebar.open { display: flex; box-shadow: 30px 0 60px rgba(0,0,0,0.4); }
  #sidebar-toggle { display: flex; }
  #track-list-header, .track-row {
    grid-template-columns: 32px 40px 1fr 60px;
  }
  .track-col.artist, .track-col.genre, .h-artist, .h-genre, .h-actions, .track-row-actions { display: none; }

  /* --- HERO en mobile: compacto, layout apilado --- */
  #hero {
    padding: 16px 16px 8px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  #hero-cover {
    width: 88px !important; height: 88px !important;
    font-size: 40px !important;
    align-self: flex-start;
  }
  #hero-meta { width: 100%; padding-bottom: 0; }
  #hero-title {
    font-size: clamp(24px, 7vw, 38px) !important;
    white-space: normal !important;
    line-height: 1.05;
    margin: 6px 0 8px !important;
  }
  #hero-actions { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  #hero-actions .btn { padding: 8px 14px; font-size: 12px; }

  /* --- TOPBAR compacto --- */
  #topbar { padding: 12px 14px 4px; gap: 8px; }
  #search-wrap { flex: 1; }
  #search { width: 100% !important; padding-right: 14px !important; font-size: 14px; }
  #search:focus { width: 100% !important; }
  .kbd-hint { display: none !important; }  /* touch = sin ⌘K */

  /* --- PLAYER BAR en mobile: 1 fila con lo esencial + progress full width abajo --- */
  #player {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    padding: 8px 12px 6px !important;
    gap: 6px !important;
    height: auto !important;
  }
  #now-playing { grid-column: 1; grid-row: 1; gap: 10px; }
  #cover-art { width: 44px !important; height: 44px !important; font-size: 18px; }
  #np-title { font-size: 13px; }
  #np-artist { font-size: 11px; }
  #btn-like-np, #btn-open-np-fs { display: none; }  /* mover a fullscreen */

  #controls-center { grid-column: 2; grid-row: 1; }
  #transport { gap: 4px; }
  #transport .ctrl-btn { padding: 6px; min-width: 34px; min-height: 34px; }
  #btn-shuffle, #btn-repeat { display: none; }  /* dejar solo prev/play/next */
  #btn-play { width: 40px !important; height: 40px !important; }

  /* Progress bar ocupa toda la fila 2 */
  #progress-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2;
    padding: 0 !important;
    display: flex; align-items: center; gap: 8px;
  }
  #time-cur, #time-total { font-size: 10px; }

  #controls-right { display: none; }  /* volume/crossfade/moon/admin en FS */

  --player-h: 80px;
}

.hidden { display: none !important; }

/* =========================================================
   POLISH PACK v2 — jul 2026
   Refinamiento visual: glass, sombras, animaciones, focus.
   ========================================================= */

:root {
  --shadow-1: 0 2px 6px rgba(0,0,0,0.28);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.42);
  --shadow-3: 0 20px 60px rgba(0,0,0,0.58);
  --shadow-accent: 0 6px 22px rgba(30, 215, 96, 0.30);
  --glass: rgba(15, 15, 21, 0.68);
  --glass-strong: rgba(19, 19, 25, 0.82);
  --scrollbar-thumb: rgba(255, 255, 255, 0.09);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.18);
}

/* ============== FOCUS-VISIBLE (accesibilidad) ============== */
*:focus { outline: none; }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
.genre-item:focus-visible,
.track-row:focus-visible,
.upnext-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============== SCROLLBAR PULIDA ============== */
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}

/* ============== TOPBAR con backdrop-blur al scroll ============== */
#topbar {
  transition: background 0.28s var(--easing),
              box-shadow 0.28s var(--easing),
              backdrop-filter 0.28s var(--easing);
  border-radius: 0;
  padding: 14px 28px 8px;
}
#topbar.scrolled {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
#search {
  transition: all 0.24s var(--easing);
  box-shadow: inset 0 0 0 1px transparent;
}
#search:hover:not(:focus) {
  background: var(--surface3);
  box-shadow: inset 0 0 0 1px var(--muted2);
}

/* ============== HERO más dramática ============== */
#hero-cover {
  transition: transform 0.32s var(--easing), box-shadow 0.32s var(--easing);
}
#hero-cover:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
}
#hero-title {
  background: linear-gradient(180deg, var(--text) 0%, var(--text2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============== BOTONES CON MEJOR FEEDBACK ============== */
.btn {
  transition: background 0.18s var(--easing),
              transform 0.14s var(--easing),
              box-shadow 0.22s var(--easing);
  box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.08);
}
.btn:not(.ghost):hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px) scale(1.03);
}
.btn:active { transform: translateY(0) scale(0.98); }

#btn-play {
  transition: transform 0.16s var(--easing),
              background 0.22s var(--easing),
              box-shadow 0.24s var(--easing);
}
#btn-play:hover { box-shadow: var(--shadow-accent); }

.ctrl-btn { transition: color 0.18s, transform 0.12s, background 0.18s; }
.ctrl-btn:hover { background: rgba(255,255,255,0.06); }

/* ============== TRACK ROW MÁS SUAVE ============== */
.track-row {
  transition: background 0.2s var(--easing);
  border-radius: 8px;
}
.track-row.playing {
  background: linear-gradient(90deg, rgba(30,215,96,0.12) 0%, rgba(30,215,96,0.03) 100%);
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 11px;
}
/* Sin efecto de hover en la carátula de la fila: no escala ni cambia sombra. */

/* ============== MODALES CON BACKDROP BLUR ============== */
.modal-bg {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.modal {
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(255,255,255,0.06);
  animation: modalIn 0.28s var(--easing);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============== PLAYER BAR GLASS ============== */
#player {
  background: linear-gradient(180deg, rgba(24,24,32,0.85) 0%, rgba(9,9,14,0.98) 100%);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  border-top: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 -1px 30px rgba(0,0,0,0.4);
}

/* ============== NOW PLAYING info bar refinada ============== */
#np-title { transition: color 0.2s; }
#now-playing:hover #np-title { color: var(--accent); }
#cover-art {
  box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

/* ============== SIDEBAR MÁS ORGANIZADA ============== */
.genre-item {
  transition: background 0.18s, color 0.18s, transform 0.14s;
}
.genre-item:active { transform: scale(0.98); }
.genre-emoji {
  transition: transform 0.22s var(--easing), filter 0.22s var(--easing);
}
.genre-item:hover .genre-emoji { transform: scale(1.06); }
.genre-item.active .genre-emoji {
  box-shadow: 0 4px 12px rgba(30, 215, 96, 0.35);
}

/* ============== TOAST CON TIPOS ============== */
#toast {
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  border-color: transparent;
  animation: none;
}
.toast-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
}
.toast-inner .toast-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
#toast.toast-success .toast-inner { border-left-color: var(--accent); }
#toast.toast-success .toast-icon { color: var(--accent); }
#toast.toast-error .toast-inner { border-left-color: var(--danger); }
#toast.toast-error .toast-icon { color: var(--danger); }
#toast.toast-warn .toast-inner { border-left-color: var(--warn); }
#toast.toast-warn .toast-icon { color: var(--warn); }
#toast.toast-info .toast-inner { border-left-color: var(--text2); }
#toast.toast-info .toast-icon { color: var(--text2); }

/* ============== SUBMENU / CTX MENU refinados ============== */
#submenu, #ctx-menu {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(24, 24, 32, 0.94);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-3);
}

/* ============== EMPTY STATE con ilustración animada ============== */
#empty-state h3 { animation: floatY 3s ease-in-out infinite; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============== HERO IMPROVEMENTS ============== */
#hero { padding: 26px 28px 14px; }

/* ============== BADGE NUEVA — pulso de halo (además del shimmer interno) ============== */
.new-badge {
  animation: pulseGlow 2.6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 215, 96, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(30, 215, 96, 0); }
}
.new-badge--today {
  animation: pulseGlowHot 2.2s ease-in-out infinite;
}
@keyframes pulseGlowHot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 94, 110, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 94, 110, 0); }
}
.new-badge--yesterday {
  animation: pulseGlowWarm 2.4s ease-in-out infinite;
}
@keyframes pulseGlowWarm {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 138, 61, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .new-badge,
  .new-badge--today,
  .new-badge--yesterday { animation: none; }
  .new-badge::before { animation: none; transform: translateX(-120%); }
}

/* ============== ADMIN badge más elegante ============== */
#admin-badge {
  box-shadow: 0 4px 14px rgba(30, 215, 96, 0.4);
  animation: floatY 4s ease-in-out infinite;
}

/* ============== TRANSICIONES ENTRE VISTAS ============== */
#track-list { animation: fadeInList 0.3s var(--easing); }
@keyframes fadeInList {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============== MOBILE POLISH ============== */
@media (max-width: 760px) {
  #hero { padding: 18px 16px 10px; }
  #track-area { padding: 10px 14px 12px; }
  #topbar { padding: 12px 16px 6px; }
  .btn { padding: 9px 14px; font-size: 12px; }
  #hero-cover:hover { transform: none; }
  .track-row:hover .track-cover { transform: none; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* ============================================================
   RADICAL UX PACK — 2026-07-22
   Topbar CTA · Onboarding · Command Palette · Cover color · Mobile nav
   ============================================================ */

/* ---------- Topbar "Pide una canción" CTA ---------- */
#btn-request-topbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--accent), #67e893);
  color: #001a08;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 215, 96, 0.25);
  transition: transform .18s var(--easing), box-shadow .2s var(--easing);
  position: relative;
  white-space: nowrap;
}
#btn-request-topbar:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(30, 215, 96, 0.42);
}
#btn-request-topbar:active { transform: scale(0.97); }
#btn-request-topbar svg { width: 15px; height: 15px; }

.request-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Pulso suave en el CTA cuando NO se ha usado nunca (llama la atención) */
#btn-request-topbar.attention {
  animation: ctaBreath 3.4s ease-in-out infinite;
}
@keyframes ctaBreath {
  0%, 100% { box-shadow: 0 4px 12px rgba(30, 215, 96, 0.25); }
  50%      { box-shadow: 0 6px 22px rgba(30, 215, 96, 0.55); }
}

/* ---------- ONBOARDING ---------- */
#onboarding {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  animation: fadeInOverlay .28s var(--easing);
}
#onboarding.show { display: flex; }
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.onb-card {
  width: min(460px, 92vw);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--surface4);
  border-radius: 18px;
  padding: 26px 26px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: onbPop .35s var(--easing);
}
@keyframes onbPop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.onb-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #67e893);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
  box-shadow: 0 10px 24px rgba(30, 215, 96, 0.35);
}
.onb-card h2 { margin: 0 0 8px; text-align: center; font-size: 22px; }
.onb-card p  { margin: 0 0 16px; text-align: center; color: var(--text2); font-size: 14px; line-height: 1.55; }
.onb-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 18px;
}
.onb-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--surface4);
  transition: background .2s var(--easing), width .2s var(--easing);
}
.onb-dot.active { background: var(--accent); width: 20px; }
.onb-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.onb-skip {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 12px;
}
.onb-skip:hover { color: var(--text); }
.onb-nav { display: flex; gap: 8px; }

/* ---------- COMMAND PALETTE (⌘K) ---------- */
#cmdk {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  animation: fadeInOverlay .18s var(--easing);
}
#cmdk.show { display: flex; }

.cmdk-panel {
  width: min(640px, 92vw);
  background: var(--surface);
  border: 1px solid var(--surface4);
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  animation: cmdkPop .18s var(--easing);
}
@keyframes cmdkPop {
  from { opacity: 0; transform: translateY(-8px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface3);
}
.cmdk-input-wrap svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
#cmdk-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 4px 0;
}
.cmdk-hint {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--surface4);
  padding: 2px 6px;
  border-radius: 4px;
  flex: 0 0 auto;
}

#cmdk-list {
  overflow-y: auto;
  padding: 6px 0;
  min-height: 60px;
}
.cmdk-group-label {
  padding: 6px 16px 4px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 700;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s var(--easing);
}
.cmdk-item:hover,
.cmdk-item.active {
  background: var(--surface2);
  border-left-color: var(--accent);
}
.cmdk-item .cmdk-ico {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex: 0 0 auto;
  color: #000;
  font-weight: 700;
}
.cmdk-item .cmdk-txt { flex: 1; min-width: 0; }
.cmdk-item .cmdk-title {
  font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmdk-item .cmdk-sub {
  font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmdk-item .cmdk-kind {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface2);
  flex: 0 0 auto;
}
.cmdk-item mark {
  background: rgba(30, 215, 96, 0.25);
  color: var(--accent);
  padding: 0 1px;
  border-radius: 2px;
}
.cmdk-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.cmdk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--surface3);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
}
.cmdk-footer .keys { display: flex; gap: 12px; }
.cmdk-footer kbd {
  background: var(--surface3);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--text2);
}

/* ---------- COVER COLOR: hero + player usan --accent-dyn si está seteado ---------- */
:root { --accent-dyn: var(--accent); }
#progress-fill,
#volume-fill {
  background: var(--accent-dyn) !important;
  transition: background .4s var(--easing);
}
#hero-cover, #cover-art {
  transition: box-shadow .5s var(--easing);
}

/* ---------- Date bucket headers en la vista __newest ---------- */
.date-bucket-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 700;
}
.date-bucket-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--surface3), transparent);
}
.date-bucket-head span {
  background: linear-gradient(135deg, var(--accent), #67e893);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ---------- MOBILE POLISH — bottom nav para filtros clave + tap targets ---------- */
#mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--player-h) + 4px);
  padding: 6px 8px;
  background: rgba(24, 24, 24, 0.88);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--surface3);
  z-index: 40;
  gap: 4px;
  justify-content: space-around;
}
.mnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 0;
  color: var(--text2);
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  transition: color .15s var(--easing), background .15s var(--easing);
}
.mnav-btn svg { width: 20px; height: 20px; }
.mnav-btn.active { color: var(--accent); background: rgba(30, 215, 96, 0.08); }
.mnav-btn:active { transform: scale(0.94); }

@media (max-width: 760px) {
  #mobile-nav { display: flex; }
  #btn-request-topbar span { display: none; }
  #btn-request-topbar { padding: 8px 10px; }
  /* Fuerza main a la columna 1 (en mobile body es una sola columna) */
  #main { grid-column: 1 !important; padding-bottom: 60px; }
  /* Player controls con tap targets más grandes */
  #player .pctl button { min-width: 36px; min-height: 36px; }
  /* Track area: reserva espacio abajo para bottom-nav + player */
  #track-area { padding-bottom: 80px; }
}

/* ============================================================
   PREMIUM POLISH v3 — 2026-07-22
   Refinamientos comprehensivos: topbar, hero, player bar, rows
   ============================================================ */

/* ---------- Search input: pill más elegante + hint ⌘K ---------- */
#search-wrap {
  position: relative;
  transition: box-shadow .18s var(--easing), border-color .18s var(--easing);
}
#search-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.18);
}
.kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 3px;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity .15s var(--easing);
}
.kbd-hint:hover { opacity: 1; }
.kbd-hint kbd {
  background: var(--surface3);
  border: 1px solid var(--surface4);
  color: var(--text2);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: ui-monospace, Menlo, monospace;
  line-height: 1;
}
#search { padding-right: 62px; }  /* deja espacio al hint */

/* ---------- Topbar: más aire, mejor separación ---------- */
#topbar {
  gap: 14px;
  padding: 14px 22px 8px;
}
.topbar-spacer { min-width: 12px; }

/* ---------- Hero: ambient glow del accent dinámico ---------- */
#hero {
  position: relative;
  padding: 30px 28px 18px;
  isolation: isolate;
}
#hero::before {
  content: '';
  position: absolute;
  inset: -60px -80px auto -80px;
  height: 340px;
  z-index: -1;
  background: radial-gradient(
    ellipse at 20% 30%,
    color-mix(in oklab, var(--accent-dyn) 22%, transparent) 0%,
    transparent 55%
  );
  filter: blur(30px);
  transition: background 0.6s var(--easing);
  pointer-events: none;
}
#hero-cover {
  width: 192px; height: 192px;
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 40px color-mix(in oklab, var(--accent-dyn) 20%, transparent);
  transition: transform .3s var(--easing), box-shadow .5s var(--easing);
}
#hero-cover:hover {
  transform: translateY(-3px) scale(1.02);
}
.hero-tag {
  color: var(--accent-dyn);
  transition: color 0.5s var(--easing);
}
#hero-title {
  background: linear-gradient(180deg, var(--text) 60%, color-mix(in oklab, var(--text) 65%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Player bar: más presencia, cover más grande, mejor progress ---------- */
#player {
  background: color-mix(in oklab, var(--surface) 92%, black);
  border-top: 1px solid color-mix(in oklab, var(--surface3) 60%, transparent);
  backdrop-filter: blur(20px);
}
#cover-art {
  width: 58px; height: 58px;
  border-radius: 8px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px color-mix(in oklab, var(--accent-dyn) 18%, transparent);
  transition: box-shadow .5s var(--easing), transform .2s var(--easing);
}
#cover-art:hover {
  transform: scale(1.03);
}
/* Cover rota lentamente cuando está sonando — sutil (tipo vinyl) */
#cover-art.playing-anim {
  animation: coverBreath 4s ease-in-out infinite;
}
@keyframes coverBreath {
  0%, 100% { box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px color-mix(in oklab, var(--accent-dyn) 22%, transparent); }
  50%      { box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 34px color-mix(in oklab, var(--accent-dyn) 40%, transparent); }
}

#np-title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.1px;
}
#np-artist {
  color: var(--text2);
}

/* Progress bar más gruesa con glow */
#progress-fill {
  height: 5px;
  border-radius: 999px;
  box-shadow: 0 0 8px color-mix(in oklab, var(--accent-dyn) 60%, transparent);
  transition: background .4s var(--easing), box-shadow .4s var(--easing);
}

/* ---------- Track rows: hover con tinte del accent + playing con stripe ---------- */
.track-row {
  transition: background-color .15s var(--easing), transform .1s var(--easing);
  position: relative;
}
.track-row:hover {
  background: color-mix(in oklab, var(--accent-dyn) 6%, var(--surface2)) !important;
}
.track-row.playing {
  background: color-mix(in oklab, var(--accent-dyn) 10%, var(--surface2)) !important;
}
.track-row.playing::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-dyn);
  box-shadow: 0 0 8px color-mix(in oklab, var(--accent-dyn) 50%, transparent);
  transition: background .4s var(--easing);
}
.track-row.playing .track-name {
  color: var(--accent-dyn);
  font-weight: 600;
  transition: color .4s var(--easing);
}

/* ---------- Sidebar: labels más discretas, playlists tipo chip ---------- */
.sidebar-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 14px 18px 8px;
  opacity: 0.7;
}
.genre-item {
  border-radius: 10px;
  transition: background-color .15s var(--easing), transform .1s var(--easing);
}
.genre-item:hover {
  background: color-mix(in oklab, var(--accent-dyn) 8%, var(--surface2)) !important;
}
.genre-item.active {
  background: color-mix(in oklab, var(--accent-dyn) 15%, var(--surface2)) !important;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent-dyn) 30%, transparent);
}
.genre-item.active .genre-name {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Up Next: section headers + acciones ---------- */
.upnext-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 700;
}
.upnext-section-head:first-child { padding-top: 8px; }
.upnext-count {
  color: var(--text2);
  background: var(--surface3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
}
.upnext-empty.small {
  padding: 12px 18px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.upnext-actions {
  padding: 6px 16px 8px;
  display: flex;
  justify-content: flex-end;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--danger);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s var(--easing);
}
.link-btn:hover { background: rgba(255, 94, 110, 0.1); }

/* Botón X en up-next items — visible al hover */
.upnext-item .queue-remove {
  opacity: 0;
  transition: opacity .15s var(--easing);
  color: var(--muted);
  padding: 4px;
  border-radius: 4px;
}
.upnext-item:hover .queue-remove { opacity: 1; }
.upnext-item .queue-remove:hover { color: var(--danger); background: rgba(255, 94, 110, 0.1); }

/* Los auto tienen un tono ligeramente menor para diferenciarse de los manuales */
.upnext-item.auto .ui-title { color: var(--text2); }
.upnext-item.queue { position: relative; }
.upnext-item.queue::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* ---------- Sidebar foot links (help, feedback) ---------- */
#sidebar-foot { padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
#sidebar-foot a {
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s var(--easing);
}
#sidebar-foot a:hover { color: var(--accent); }

/* ---------- Feedback item: highlight "no leído" ---------- */
.wish-item.unread {
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

/* ============================================================
   PREMIUM PACK v4 — Álbumes / Now Playing FS / Estadísticas / Lyrics
   ============================================================ */

/* ---------- Back button del hero ---------- */
#hero-back[hidden] { display: none !important; }
#hero-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 215, 96, 0.12);
  border: 1px solid rgba(30, 215, 96, 0.35);
  color: var(--brand, #1ed760);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s var(--easing), color .18s var(--easing), transform .18s var(--easing), box-shadow .18s var(--easing);
  margin-bottom: 10px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#hero-back:hover {
  background: rgba(30, 215, 96, 0.22);
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(30,215,96,0.25);
}
#hero-back svg { width: 16px; height: 16px; stroke-width: 2.6; }

/* ---------- Hub de géneros (cards con mini-mosaico) ---------- */
.albums-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  padding: 20px 14px 40px;
}
.album-hub-card {
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .2s var(--easing), background .2s var(--easing), border-color .2s var(--easing), box-shadow .3s var(--easing);
}
.album-hub-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 14px 30px rgba(0,0,0,0.4);
}
.album-hub-mosaic {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: rgba(0,0,0,0.4);
}
.album-hub-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
}
.album-hub-info {
  min-width: 0;
  flex: 1;
}
.album-hub-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}
.album-hub-meta {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Secciones de álbumes (Rock, Urbano, Latino, etc.) ---------- */
.albums-section {
  padding: 0 14px;
}
.albums-section + .albums-section {
  margin-top: 12px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  padding-top: 20px;
}
.albums-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 20px 6px 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.albums-section-count {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0;
}

/* ---------- Grid de álbumes ---------- */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 8px 0 20px;
}
/* La primera sección ya trae su propio padding-top; el grid dentro se
   queda con menos aire para no doblar espacios. */
.albums-section .albums-grid {
  padding: 8px 0 8px;
}
.album-card {
  cursor: pointer;
  transition: transform .18s var(--easing);
}
.album-card:hover { transform: translateY(-4px); }
.album-cover {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 42px;
  color: rgba(255,255,255,0.9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  transition: box-shadow .3s var(--easing);
}
.album-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-cover.has-art .album-cover-initial { display: none; }
.album-card:hover .album-cover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.album-title {
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-artist {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-count {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Now Playing Fullscreen ---------- */
#np-fs {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: #000;
  opacity: 0;
  transition: opacity .25s var(--easing);
  overflow: hidden;
  overscroll-behavior: contain;
}
#np-fs .np-fs-inner {
  overflow: hidden;
}
#np-fs.show { opacity: 1; }
.np-fs-bg {
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    circle at 30% 20%,
    color-mix(in oklab, var(--accent-dyn) 55%, transparent) 0%,
    #050505 60%
  );
  filter: blur(80px);
  transition: background .8s var(--easing);
  pointer-events: none;
  animation: bgBreathe 18s ease-in-out infinite;
}
@keyframes bgBreathe {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50%      { transform: scale(1.1) translate(-2%, 2%); }
}
#np-fs-close {
  position: absolute;
  top: 20px; left: 20px;
  padding: 10px 16px 10px 12px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
  transition: background .15s var(--easing), transform .15s var(--easing);
}
#np-fs-close:hover { background: rgba(255,255,255,0.22); transform: translateX(-2px); }
#np-fs-close svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  #np-fs-close span { display: none; }
  #np-fs-close { padding: 10px; }
}

.np-fs-inner {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(400px, 1.2fr);
  align-items: center;
  gap: 50px;
  padding: 90px 60px 40px;  /* top padding reserva espacio para el botón cerrar */
  max-width: 1400px;
  margin: 0 auto;
  min-height: 0;
}
.np-fs-meta {
  min-height: 0;
  max-height: calc(100vh - 130px);
  overflow: hidden;  /* no crecer fuera; solo .np-fs-lyrics scrollea */
}
.np-fs-cover {
  width: min(420px, 40vw);
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 140px;
  color: rgba(255,255,255,0.95);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.1);
  justify-self: end;
}
.np-fs-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.np-fs-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.np-fs-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-dyn);
  font-weight: 700;
}
.np-fs-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.np-fs-artist {
  font-size: 20px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}
.np-fs-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.np-fs-time {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}
.np-fs-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.np-fs-fill {
  height: 100%;
  background: var(--accent-dyn);
  border-radius: inherit;
  box-shadow: 0 0 12px color-mix(in oklab, var(--accent-dyn) 80%, transparent);
  transition: width .15s linear;
}
.np-fs-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.np-fs-controls button {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.06);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--easing), transform .15s var(--easing);
}
.np-fs-controls button:hover { background: rgba(255,255,255,0.14); }
.np-fs-controls button:active { transform: scale(0.94); }
.np-fs-controls button svg { width: 20px; height: 20px; }
.np-fs-controls button.primary {
  width: 64px; height: 64px;
  background: #fff;
  color: #000;
}
.np-fs-controls button.primary:hover { background: #eee; transform: scale(1.06); }
.np-fs-controls button.primary svg { width: 26px; height: 26px; }
.np-fs-controls button svg.hidden { display: none; }

.np-fs-lyrics {
  margin-top: 24px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.np-fs-lyrics::-webkit-scrollbar { width: 6px; }
.np-fs-lyrics::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }
.np-fs-lyrics-empty {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  font-style: italic;
  padding: 20px 0;
}
.lrc-line {
  padding: 6px 0;
  font-size: 18px;
  color: rgba(255,255,255,0.45);
  transition: color .25s var(--easing), transform .25s var(--easing);
  line-height: 1.4;
}
.lrc-line.active {
  color: #fff;
  font-weight: 600;
  transform: scale(1.03);
  transform-origin: left center;
}
.lrc-plain {
  white-space: pre-wrap;
  font-family: inherit;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.6;
}

/* Mobile Now Playing FS */
@media (max-width: 900px) {
  #np-fs .np-fs-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 70px 24px 40px;
    gap: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .np-fs-cover {
    width: min(280px, 70vw);
    justify-self: center;
  }
  .np-fs-title { text-align: center; }
  .np-fs-artist { text-align: center; }
  .np-fs-controls { justify-content: center; }
}

/* Indicador de que el cover del player es clickeable */
#cover-art { cursor: zoom-in; }

/* ---------- Estadísticas view ---------- */
.stats-view {
  padding: 24px 14px 40px;
  max-width: 900px;
}
.stats-heros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.stats-hero {
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--surface3);
  border-radius: 12px;
  padding: 18px 20px;
}
.stats-value {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
}
.stats-label {
  font-size: 12px;
  color: var(--text2);
  margin-top: 6px;
}
.stats-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.stats-col h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--text);
}
.stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: rank;
}
.stats-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface3);
  counter-increment: rank;
}
.stats-list .rank::before {
  content: counter(rank);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--muted);
  width: 24px;
  text-align: right;
  display: inline-block;
}
.stats-list .name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.stats-list .name small {
  color: var(--muted);
  font-size: 11px;
}
.stats-list .name:hover { color: var(--accent); }
.stats-list .n {
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
}
.stats-col .empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.stats-note {
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   PACK SOCIAL v5 — Sonando ahora / Radio / Multi-select / DnD
   ============================================================ */

/* ---------- Sonando ahora en la oficina ---------- */
.np-live {
  padding: 20px 14px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.np-live-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--surface3);
  border-radius: 12px;
  position: relative;
  transition: background .15s var(--easing), transform .12s var(--easing);
  overflow: hidden;
}
.np-live-card.clickable { cursor: pointer; }
.np-live-card.clickable:hover {
  background: color-mix(in oklab, var(--accent-dyn) 8%, var(--surface2));
  transform: translateY(-2px);
}
.np-live-cover {
  width: 52px; height: 52px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: rgba(255,255,255,0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.np-live-info { flex: 1; min-width: 0; }
.np-live-nick {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.np-live-track {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-live-artist {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.np-live-ago { color: var(--accent); font-weight: 600; }
.np-live-pulse {
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff5e6e;
  box-shadow: 0 0 0 0 rgba(255, 94, 110, 0.6);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 94, 110, 0.6); }
  100% { box-shadow: 0 0 0 10px rgba(255, 94, 110, 0); }
}

/* ---------- Radio mode indicator ---------- */
body.radio-on #btn-radio {
  background: linear-gradient(135deg, #ff5e6e, #ffb800);
  color: #fff;
}

/* ---------- Multi-select selection bar ---------- */
.track-row.selected {
  background: color-mix(in oklab, var(--accent) 20%, var(--surface2)) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
#selection-bar {
  position: fixed;
  bottom: calc(var(--player-h, 90px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 18px;
  background: rgba(20,20,20,0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 150;
  animation: sbSlideUp .22s var(--easing);
}
@keyframes sbSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.sb-count { font-size: 13px; color: var(--text); margin-right: 4px; }
.sb-count strong { color: var(--accent); }
.sb-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 0;
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s var(--easing);
}
.sb-btn:hover { background: rgba(255,255,255,0.14); }
.sb-btn.primary { background: var(--accent); color: #001a08; }
.sb-btn.primary:hover { background: #33e074; }
.sb-btn.ghost { background: transparent; color: var(--muted); }
.sb-btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ---------- Drag & drop en playlists ---------- */
.track-row[draggable="true"] {
  cursor: grab;
}
.track-row.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
/* Sugerencia visual del handle en la primera columna */

/* ---------- Nickname link ---------- */
#btn-nickname {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ---------- KH Chat modal (Mau ↔ Karlita) ---------- */
#kh-chat {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s var(--easing);
}
#kh-chat.show { opacity: 1; }
#kh-chat[hidden] { display: none !important; }
#kh-chat:not([hidden]) { display: flex; }
.kh-chat-panel {
  width: min(420px, 100%);
  height: min(600px, 90vh);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--surface3);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 94, 110, 0.15);
  overflow: hidden;
  animation: khPop .28s var(--easing);
}
@keyframes khPop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.kh-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface3);
  background: linear-gradient(180deg, rgba(255,94,110,0.08), transparent);
}
.kh-chat-title {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.kh-chat-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #ff5e6e, #67e893);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.kh-chat-avatar svg { width: 14px; height: 14px; }
#kh-chat-close {
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s var(--easing), color .12s var(--easing);
}
#kh-chat-close:hover { background: var(--surface3); color: var(--text); }
#kh-chat-close svg { width: 18px; height: 18px; }

.kh-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}
.kh-chat-empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}
.kh-msg { display: flex; }
.kh-msg.mine { justify-content: flex-end; }
.kh-msg.theirs { justify-content: flex-start; }
.kh-bubble {
  max-width: 78%;
  padding: 8px 12px 6px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}
.kh-msg.mine .kh-bubble {
  background: linear-gradient(135deg, #1ed760, #0eb050);
  color: #001a08;
  border-bottom-right-radius: 5px;
}
.kh-msg.theirs .kh-bubble {
  background: var(--surface3);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.kh-msg-from {
  font-size: 10px;
  font-weight: 700;
  color: #ff5e6e;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kh-msg-text {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.kh-msg-time {
  font-size: 10px;
  opacity: 0.55;
  margin-top: 3px;
  text-align: right;
}

.kh-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--surface3);
  background: var(--surface);
}
#kh-chat-input {
  flex: 1;
  background: var(--surface3);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .12s var(--easing);
}
#kh-chat-input:focus { border-color: var(--accent); }
.kh-chat-send {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #001a08;
  border: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s var(--easing), background .12s var(--easing);
}
.kh-chat-send:hover { background: #33e074; transform: scale(1.05); }
.kh-chat-send:active { transform: scale(0.95); }
.kh-chat-send svg { width: 18px; height: 18px; }

/* Badge de mensajes no leídos sobre el KH */
.kh-unread {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  background: #ff5e6e;
  color: #fff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  animation: khUnreadPulse 1.6s ease-in-out infinite;
}
@keyframes khUnreadPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* ---------- KH badge — para Karlita Hidalgo 💚 ---------- */
#kh-badge { position: relative; }
#kh-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 3px 8px 3px 7px;
  background: linear-gradient(135deg, rgba(255,94,110,0.16), rgba(30,215,96,0.12));
  border: 1px solid rgba(255,94,110,0.28);
  border-radius: 999px;
  vertical-align: middle;
  cursor: default;
  transition: transform .18s var(--easing);
}
#kh-badge:hover { transform: scale(1.06); }
#kh-badge .kh-letters {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ff5e6e;
}
#kh-badge .kh-heart {
  width: 10px;
  height: 10px;
  color: #ff5e6e;
  animation: khBeat 1.6s ease-in-out infinite;
  transform-origin: center;
  filter: drop-shadow(0 0 3px rgba(255, 94, 110, 0.5));
}
@keyframes khBeat {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.25); }
  40%      { transform: scale(1); }
  60%      { transform: scale(1.15); }
  80%      { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #kh-badge .kh-heart { animation: none; }
}

/* ---------- Fallback si el navegador no soporta color-mix ---------- */
@supports not (background: color-mix(in oklab, red, blue)) {
  .track-row:hover { background: var(--surface3) !important; }
  .track-row.playing { background: var(--surface3) !important; }
  .track-row.playing::before { background: var(--accent); }
  .genre-item:hover { background: var(--surface2) !important; }
  .genre-item.active { background: var(--surface3) !important; }
  #hero::before { background: radial-gradient(ellipse at 20% 30%, rgba(30,215,96,0.18) 0%, transparent 55%); }
  #hero-cover { box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 40px rgba(30,215,96,0.2); }
  #cover-art { box-shadow: 0 6px 20px rgba(0,0,0,0.55), 0 0 24px rgba(30,215,96,0.18); }
}

/* ============================================================
   UX PACK — 2026-08-05
   Resume chip, mini-player, player-menu (sleep+speed)
   ============================================================ */

/* ---------- Resume chip "Continuar donde lo dejaste" ---------- */
#resume-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(30,215,96,0.14), rgba(30,215,96,0.06));
  border: 1px solid rgba(30,215,96,0.28);
  border-radius: 14px;
  animation: chipIn .35s var(--easing);
  transition: opacity .5s ease;
}
/* El atributo hidden por default es display:none, pero nuestra rule
   más específica de arriba lo pisaba. Restauramos con !important. */
#resume-chip[hidden] { display: none !important; }
#resume-chip.fade { opacity: 0.55; }
#resume-chip > svg {
  width: 22px; height: 22px;
  color: var(--brand, #1ed760);
  flex-shrink: 0;
}
.resume-chip-body { flex: 1; min-width: 0; }
.resume-chip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}
.resume-chip-track {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#resume-chip-play {
  padding: 6px 14px;
  font-size: 12px;
  height: auto;
}
#resume-chip-close {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#resume-chip-close:hover { color: var(--text); }
@keyframes chipIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Player menu (sleep + speed) ---------- */
#player-menu {
  position: fixed;
  z-index: 200;
  background: rgba(24, 24, 30, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 8px;
  width: 260px;
  animation: menuIn .18s var(--easing);
}
@keyframes menuIn {
  from { opacity: 0; transform: scale(.95) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.player-menu-section { padding: 6px 0; }
.player-menu-section + .player-menu-section {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
  padding-top: 8px;
}
.player-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 10px 6px;
}
.player-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s ease;
  font-family: inherit;
}
.player-menu-item:hover { background: rgba(255,255,255,0.06); }
.player-menu-item.active {
  background: rgba(30,215,96,0.18);
  color: var(--brand, #1ed760);
  font-weight: 600;
}
.player-menu-speed {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 0 6px;
}
.player-menu-speed .player-menu-item {
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
}

/* ---------- Reactions en Sonando ahora (task #9) ---------- */
.np-rx-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.np-rx-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, transform .18s var(--easing), border-color .15s ease;
}
.np-rx-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
}
.np-rx-btn.bumped {
  background: rgba(30,215,96,0.14);
  border-color: rgba(30,215,96,0.4);
  color: var(--text);
  animation: rxBump .35s var(--easing);
}
.np-rx-n {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  min-width: 4px;
}
.np-rx-btn.bumped .np-rx-n { color: var(--brand, #1ed760); }
@keyframes rxBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ---------- Nick chip (prompt suave "ponle nombre a tu música") ---------- */
#nick-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 14px;
  animation: chipIn .35s var(--easing);
  flex-wrap: wrap;
}
#nick-chip[hidden] { display: none !important; }
#nick-chip > svg { width: 22px; height: 22px; color: #a78bfa; flex-shrink: 0; }
.nick-chip-body { flex: 1; min-width: 200px; }
.nick-chip-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.nick-chip-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
#nick-chip-input {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  min-width: 140px;
  outline: none;
  transition: border-color .15s ease;
}
#nick-chip-input:focus { border-color: rgba(139, 92, 246, 0.6); }
#nick-chip-save {
  padding: 8px 16px;
  font-size: 12px;
  height: auto;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
}
#nick-chip-save:hover { filter: brightness(1.1); }
#nick-chip-dismiss {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#nick-chip-dismiss:hover { color: var(--text); }
@media (max-width: 640px) {
  #nick-chip { padding: 12px; gap: 10px; }
  .nick-chip-body { min-width: 100%; }
  #nick-chip-input { min-width: 0; flex: 1; }
}

/* ---------- Nick gate (modal bloqueante a 8+ plays) ---------- */
.nick-gate-modal {
  max-width: 420px;
  text-align: center;
  padding: 32px 28px 20px;
}
.nick-gate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(139, 92, 246, 0.12));
  color: #a78bfa;
}
.nick-gate-icon svg { width: 32px; height: 32px; }
.nick-gate-modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.nick-gate-modal p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 20px;
}
#nick-gate-input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
  margin-bottom: 16px;
  box-sizing: border-box;
}
#nick-gate-input:focus { border-color: rgba(139, 92, 246, 0.7); }
.nick-gate-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
#nick-gate-save {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  height: auto;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  font-weight: 600;
}
#nick-gate-save:hover { filter: brightness(1.1); }
.nick-gate-skip {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 6px;
  font-family: inherit;
}
.nick-gate-skip:hover { color: var(--text2); }

/* ---------- FAB móvil "Enviar sugerencia" ---------- */
#mobile-fab-feedback {
  position: fixed;
  right: 16px;
  /* Encima del mobile-nav (~64px alto) + player bar (~72px). Total 140-150. */
  bottom: 152px;
  z-index: 90;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s var(--easing), box-shadow .18s var(--easing);
  animation: fabIn .35s var(--easing);
}
#mobile-fab-feedback[hidden] { display: none !important; }
#mobile-fab-feedback:hover { transform: scale(1.05); box-shadow: 0 12px 30px rgba(124, 58, 237, 0.55); }
#mobile-fab-feedback:active { transform: scale(0.95); }
#mobile-fab-feedback svg { width: 22px; height: 22px; }
@keyframes fabIn {
  from { opacity: 0; transform: scale(.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- PWA install banner (mobile) ---------- */
#pwa-install-banner {
  position: fixed;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(30,215,96,0.14), rgba(30,215,96,0.05));
  border: 1px solid rgba(30,215,96,0.35);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.4);
  animation: chipIn .35s var(--easing);
}
#pwa-install-banner[hidden] { display: none !important; }
.pwa-install-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand, #1ed760), #14b04a);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-install-icon svg { width: 22px; height: 22px; }
.pwa-install-body { flex: 1; min-width: 0; }
.pwa-install-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.pwa-install-sub {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
  line-height: 1.35;
}
#pwa-install-btn {
  padding: 8px 14px;
  font-size: 12px;
  height: auto;
  flex-shrink: 0;
}
#pwa-install-close {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
#pwa-install-close:hover { color: var(--text); }
@media (min-width: 761px) {
  #pwa-install-banner { display: none !important; }
}

/* Error dentro del nick-gate */
.nick-gate-error {
  color: #ff5e6e;
  font-size: 12px;
  margin: -8px 0 10px;
  text-align: center;
  animation: chipIn .2s var(--easing);
}
.nick-gate-error[hidden] { display: none !important; }

/* ---------- Greeting chip (bienvenida diaria + share) ---------- */
#greeting-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(30,215,96,0.16), rgba(30,215,96,0.06));
  border: 1px solid rgba(30,215,96,0.32);
  border-radius: 14px;
  animation: chipIn .4s var(--easing);
  transition: opacity .6s ease;
  flex-wrap: wrap;
}
#greeting-chip[hidden] { display: none !important; }
#greeting-chip.fade { opacity: 0.55; }
.greeting-emoji {
  font-size: 26px;
  flex-shrink: 0;
  animation: greetingWave 1.5s ease-in-out;
  transform-origin: 70% 70%;
}
@keyframes greetingWave {
  0%   { transform: rotate(0); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0); }
  100% { transform: rotate(0); }
}
.greeting-body { flex: 1; min-width: 200px; }
.greeting-line {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  line-height: 1.25;
}
.greeting-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
#greeting-share {
  padding: 8px 14px;
  font-size: 12px;
  height: auto;
  flex-shrink: 0;
}
#greeting-close {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
#greeting-close:hover { color: var(--text); }
@media (max-width: 640px) {
  #greeting-chip { gap: 10px; padding: 12px; }
  .greeting-body { min-width: 100%; }
  .greeting-line { font-size: 14px; }
}

/* ---------- Hero cover mosaico 2×2 (Batch A) ---------- */
#hero-cover.has-mosaic {
  padding: 0;
  overflow: hidden;
  background: transparent !important;
}
.hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
}
.hero-mosaic-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
}
.hero-mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Radio personal button — un poco más de peso visual que un ghost */
#btn-personal-radio {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.42);
  color: #d4c5ff;
}
#btn-personal-radio:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(139, 92, 246, 0.22));
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Modo Concentración (Batch C) ---------- */
body.focus-mode {
  filter: saturate(0.6) brightness(0.92);
}
body.focus-mode #viz { display: none; }
body.focus-mode #greeting-chip,
body.focus-mode #resume-chip { display: none !important; }
body.focus-mode .np-live-pulse { animation: none !important; }

/* ---------- Badges (Batch C) ---------- */
.stats-badges {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--surface3);
}
.stats-badges h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  margin-bottom: 16px;
}
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.badge-card {
  padding: 16px 12px;
  border-radius: 12px;
  text-align: center;
  transition: transform .2s var(--easing);
}
.badge-card.unlocked {
  background: linear-gradient(135deg, rgba(30,215,96,0.14), rgba(30,215,96,0.05));
  border: 1px solid rgba(30,215,96,0.32);
  cursor: default;
}
.badge-card.locked {
  background: var(--surface);
  border: 1px solid var(--surface3);
  opacity: 0.4;
  filter: grayscale(0.8);
}
.badge-card.unlocked:hover { transform: translateY(-2px); }
.badge-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}
.badge-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}
.badge-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

/* ---------- Perfil público (Batch D) ---------- */
.profile-modal {
  max-width: 500px;
  padding: 24px;
  position: relative;
}
.profile-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  z-index: 2;
}
.profile-close:hover { color: var(--text); }
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.profile-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.profile-modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  margin: 0 0 4px;
  color: var(--text);
}
#profile-stats-line { font-size: 13px; color: var(--text2); }
.profile-body { margin: 16px 0; max-height: 420px; overflow-y: auto; }
.profile-section { margin: 20px 0; }
.profile-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 10px;
}
.profile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pli;
}
.profile-list li {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--surface3);
  counter-increment: pli;
  position: relative;
  padding-left: 34px;
}
.profile-list li::before {
  content: counter(pli);
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}
.profile-list .name { font-size: 14px; color: var(--text); font-weight: 500; }
.profile-list .sub { font-size: 12px; color: var(--muted); }
.profile-loading { text-align: center; padding: 30px; color: var(--muted); font-size: 13px; }
.profile-footer {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid var(--surface3);
}
/* Wrapped variants inside same modal */
.wrapped-big { text-align: center; padding: 20px; }
.wrapped-big-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 72px;
  line-height: 1;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wrapped-big-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 6px;
}
.wrapped-hero {
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(236,72,153,0.10));
  border: 1px solid rgba(245,158,11,0.28);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.wrapped-hero .sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

/* ---------- Micro-animaciones (Batch A) ---------- */
.icon-mini.bump { animation: iconBump .35s var(--easing); }
@keyframes iconBump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.28); }
  60%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.icon-mini.liked svg { animation: heartPulse .55s var(--easing); }
@keyframes heartPulse {
  0%   { transform: scale(1); }
  20%  { transform: scale(1.35); }
  40%  { transform: scale(0.95); }
  60%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.icon-mini.add-pl.bump {
  background: rgba(30,215,96,0.5) !important;
  color: #fff !important;
  transition: background 0.2s;
}

/* Confetti al desbloquear badge */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  overflow: hidden;
}
.confetti-bit {
  position: absolute;
  top: -40px;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(0.25, 0.9, 0.55, 1);
  animation-fill-mode: forwards;
  display: inline-block;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0.2; }
}

/* ---------- Canción del día (Batch B) ---------- */
#tod-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 14px;
  animation: chipIn .4s var(--easing);
  position: relative;
}
#tod-chip[hidden] { display: none !important; }
.tod-badge {
  position: absolute;
  top: -8px; left: 16px;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.tod-cover {
  width: 52px; height: 52px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: rgba(255,255,255,0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.tod-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tod-body { flex: 1; min-width: 0; }
.tod-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}
.tod-artist { font-size: 12px; color: var(--text2); }
.tod-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}
#tod-play { padding: 8px 14px; height: auto; font-size: 12px; }
#tod-close {
  width: 30px; height: 30px;
  border: none; background: transparent;
  color: var(--muted); cursor: pointer;
}
#tod-close:hover { color: var(--text); }

/* ---------- Progress bar en Sonando ahora (Batch B) ---------- */
.np-live-progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.np-live-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand, #1ed760), rgba(30,215,96,0.7));
  border-radius: 2px;
  transition: width 1s linear;
}

/* Badge "Liked hace X" en la vista favoritos (Batch D #9) */
.freshness-badge.liked-since {
  background: rgba(255, 77, 141, 0.14);
  color: #ff6699;
  border: 1px solid rgba(255, 77, 141, 0.32);
}

/* ============================================================
   VISUAL POLISH v2 — quick-access grid, cards elegantes,
   micro-interacciones + hitos silenciosos
   ============================================================ */

/* Distinción visual de playlists oficiales en sidebar.
   Items un pelín más compactos que "Tu librería" para que
   la biblioteca personal siga siendo la protagonista visual. */
#official-playlist-list {
  padding: 0 10px 4px;
}
#official-playlist-list .genre-item,
#playlist-list .genre-item {
  padding: 8px 10px;
  gap: 10px;
}
#official-playlist-list .genre-item .genre-emoji,
#playlist-list .genre-item .genre-emoji {
  width: 30px; height: 30px;
  font-size: 15px;
  border-radius: 8px;
}
#official-playlist-list .genre-item .genre-emoji {
  box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.08);
}
#official-playlist-list .genre-item .genre-name,
#playlist-list .genre-item .genre-name {
  font-size: 12.5px;
  font-weight: 500;
}
#official-playlist-list .genre-item .genre-count,
#playlist-list .genre-item .genre-count {
  font-size: 10.5px;
}
#official-playlist-list .genre-item::after {
  content: '';
  position: absolute;
  right: 12px; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: translateY(-50%) scale(0.6);
  transition: opacity 300ms ease, transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}
#official-playlist-list .genre-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
#official-playlist-list .genre-item.active::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Sidebar más aireado */
.sidebar-section-head {
  padding: 4px 22px 0;
}
.sidebar-label {
  letter-spacing: 2px;
  font-size: 10.5px;
}

/* Genre-item: hover más suave con lift */
.genre-item {
  transition: background var(--transition), color var(--transition), transform 220ms var(--easing);
}
.genre-item:hover {
  transform: translateX(2px);
}

/* Cards con más rounded corners y sombras suaves */
#hero-cover {
  border-radius: 14px;
  box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* Track rows más elegantes en hover */
.track-row {
  transition: background 160ms ease, transform 220ms var(--easing);
}
.track-row:hover {
  transform: translateX(1px);
}

/* Player bar refinamiento sutil */
#player {
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* Chip de "hito" silencioso: aparece brevemente al hacer milestone */
.milestone-chip {
  position: fixed;
  bottom: calc(var(--player-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid rgba(30, 215, 96, 0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  border-radius: 999px;
  padding: 12px 22px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  opacity: 0;
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 400ms ease;
  pointer-events: none;
  max-width: 90vw;
}
.milestone-chip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.milestone-chip .m-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #67e893);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}
.milestone-chip .m-body { display: flex; flex-direction: column; min-width: 0; }
.milestone-chip .m-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}
.milestone-chip .m-sub {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.3;
  margin-top: 1px;
}

/* Album cover en player: sombra que respira */
@keyframes coverBreathe {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04); }
  50%      { box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06); }
}
#cover-art {
  animation: coverBreathe 6s ease-in-out infinite;
}

/* Blur sutil en cover art del player en pausa */
body.paused #cover-art {
  filter: saturate(0.75) brightness(0.85);
  transition: filter 400ms ease;
}
#cover-art { transition: filter 400ms ease; }

/* ============================================================
   Search-more banner: aparece cuando buscas dentro de una sección
   y hay más resultados en la biblioteca completa
   ============================================================ */
.search-more-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(30,215,96,0.10), rgba(30,215,96,0.02));
  border: 1px solid rgba(30, 215, 96, 0.28);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.search-more-banner:hover {
  background: linear-gradient(135deg, rgba(30,215,96,0.16), rgba(30,215,96,0.05));
  border-color: rgba(30, 215, 96, 0.5);
}
.search-more-banner svg {
  width: 16px; height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.search-more-banner span { flex: 1; min-width: 0; }
.search-more-banner strong { color: var(--text); font-weight: 700; }
.search-more-banner .btn {
  padding: 6px 14px;
  font-size: 12px;
  flex-shrink: 0;
}
.search-more-banner .icon-mini {
  width: 28px; height: 28px;
  flex-shrink: 0;
}

/* ============================================================
   Mood chips scrollables (tipo Spotify): filtro secundario
   por sub-género bajo el hero
   ============================================================ */
#mood-chips {
  padding: 4px 28px 8px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
  align-items: center;
}
#mood-chips::-webkit-scrollbar { display: none; }
.mood-chip {
  flex-shrink: 0;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 120ms var(--easing);
  white-space: nowrap;
}
.mood-chip:hover {
  background: var(--surface3);
  color: var(--text);
  transform: translateY(-1px);
}
.mood-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

@media (max-width: 768px) {
  #mood-chips { padding: 2px 16px 6px; }
  .mood-chip { font-size: 12px; padding: 6px 12px; }
}

/* ============================================================
   Sidebar liveliness: skeletons + chip vivo (N escuchando, racha)
   + badge "HOY" en playlists especiales (viernes)
   ============================================================ */

/* Skeleton rows para MauPlayer curadas mientras cargan */
.op-skel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 22px;
  margin-bottom: 2px;
  opacity: 0.6;
}
.op-skel-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: opskelShimmer 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
.op-skel-bar {
  height: 10px;
  flex: 1;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: opskelShimmer 1.4s ease-in-out infinite;
}
@keyframes opskelShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Error state con botón reintentar */
.op-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-size: 12px;
  color: var(--muted);
}
.op-empty button {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  padding: 0;
}
.op-empty button:hover { text-decoration: underline; }

/* Badge "HOY" para playlists relevantes al día (Viernes 🎉 los viernes) */
.op-now-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  vertical-align: middle;
  animation: opNowPulse 2s ease-in-out infinite;
}
@keyframes opNowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30,215,96,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(30,215,96,0); }
}

/* Chip vivo bajo "Tu librería": N escuchando + racha */
#sidebar-live-chip {
  padding: 2px 22px 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--muted2);
  white-space: nowrap;
}
.sl-pill strong { color: var(--text); font-weight: 700; }
.sl-live {
  color: #a8ffcb;
  background: rgba(30, 215, 96, 0.1);
  border-color: rgba(30, 215, 96, 0.28);
}
.sl-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: slDotPulse 1.6s ease-in-out infinite;
}
@keyframes slDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.7); }
}
.sl-streak {
  color: #ffcda8;
  background: rgba(251, 146, 60, 0.08);
  border-color: rgba(251, 146, 60, 0.28);
}

/* ============================================================
   COVER-DYNAMIC TINT: --cover-tint / --cover-tint-deep se setean
   desde extractAccentFromImage() con el color dominante del cover
   actual. Se aplica como radial-gradient sutil sobre el #main que
   deja el hero con "atmósfera" del disco (estilo Spotify web).
   Defaults verdes hasta que carga la primera cover.
   ============================================================ */
:root {
  --cover-tint: hsl(150, 40%, 20%);
  --cover-tint-deep: hsl(150, 45%, 10%);
}

/* Overlay que se aplica al top del #main con el tint del cover */
#main::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 340px;
  background: linear-gradient(180deg,
    var(--cover-tint) 0%,
    color-mix(in oklab, var(--cover-tint) 45%, transparent) 55%,
    transparent 100%);
  pointer-events: none;
  opacity: 0.7;
  transition: background 800ms ease;
  z-index: 0;
}
/* En light theme el tint queda muy pastel, bajamos opacidad */
:root[data-theme="light"] #main::before { opacity: 0.35; }

/* Todo lo demás del main queda por encima del overlay */
#topbar, #hero, #mood-chips, #tod-chip, #greeting-chip,
#hidden-banner, #track-area {
  position: relative;
  z-index: 1;
}

/* Player bar: sutil glassmorphism con el tint del cover reflejado */
#player {
  background: color-mix(in oklab, var(--surface) 88%, var(--cover-tint) 12%);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-top-color: color-mix(in oklab, var(--muted2) 60%, var(--cover-tint) 40%);
  transition: background 800ms ease, border-color 800ms ease;
}

/* Player: cover-art más redondeado + shadow tinted */
#cover-art {
  border-radius: 8px;
  box-shadow:
    0 6px 18px color-mix(in oklab, var(--cover-tint-deep) 60%, transparent),
    0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: box-shadow 600ms ease;
}

/* ============================================================
   Radios inteligentes (mood radios) — cards en el home
   ============================================================ */
#mood-radios {
  padding: 6px 28px 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.mr-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.mr-head .mr-hint {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: none;
  font-size: 10.5px;
}
.mr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.mr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--muted2);
  cursor: pointer;
  transition: transform 200ms var(--easing), background 200ms ease, border-color 200ms ease, box-shadow 300ms ease;
  min-height: 56px;
  text-align: left;
  color: var(--text);
  overflow: hidden;
  position: relative;
}
.mr-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--mr-grad, linear-gradient(135deg, #333, #111));
  opacity: 0;
  transition: opacity 250ms ease;
  z-index: 0;
}
.mr-card:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.mr-card:hover::before { opacity: 0.15; }
.mr-emoji {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--mr-grad, linear-gradient(135deg, #444, #222));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
}
.mr-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.mr-card.mr-now {
  border-color: var(--accent-soft);
  background: color-mix(in oklab, var(--surface2) 85%, var(--accent) 15%);
}
.mr-card.mr-now::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: slDotPulse 1.6s ease-in-out infinite;
  z-index: 2;
}

@media (max-width: 640px) {
  #mood-radios { padding: 4px 16px; }
  .mr-grid { grid-template-columns: repeat(2, 1fr); }
  .mr-name { font-size: 12px; }
}

/* "¿Sigues ahí?" chip — aparece a los 20 min sin actividad */
.still-here-chip {
  position: fixed;
  bottom: calc(var(--player-h) + 20px);
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--muted2);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 9998;
  max-width: 300px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms var(--easing);
  pointer-events: none;
}
.still-here-chip.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.still-here-chip .sh-icon { font-size: 22px; flex-shrink: 0; }
.still-here-chip .sh-body { flex: 1; min-width: 0; }
.still-here-chip .sh-title { font-size: 13px; font-weight: 700; color: var(--text); }
.still-here-chip .sh-sub { font-size: 11px; color: var(--text3); margin-top: 2px; line-height: 1.35; }
.still-here-chip .sh-yes {
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms ease;
}
.still-here-chip .sh-yes:hover { background: #33e074; }

@media (max-width: 560px) {
  .still-here-chip { right: 12px; left: 12px; max-width: none; }
}

/* ============================================================
   SIDEBAR TIERS — jerarquía visual clara:
   PRIMARY (grandes con sub-text) > EXPLORE/PERSONAL (compactos)
   > GENRES (compactos, plegables)
   ============================================================ */

.sb-group { padding: 0 10px; margin-bottom: 4px; }
.sb-group + .sb-mini-label { margin-top: 8px; }

/* Micro-label divisor entre secciones */
.sb-mini-label {
  padding: 8px 14px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.65;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.sb-toggle-genres {
  cursor: pointer;
  transition: color 200ms ease, opacity 200ms ease;
  justify-content: space-between;
}
.sb-toggle-genres:hover { color: var(--text2); opacity: 1; }
.sb-caret {
  transition: transform 200ms var(--easing);
  color: currentColor;
  flex-shrink: 0;
}
.sb-caret.open { transform: rotate(0deg); }
.sb-caret:not(.open) { transform: rotate(-90deg); }

/* TIER 1 — PRIMARY: destino principal, más grande con sub-text */
.nav-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text2);
  margin-bottom: 4px;
  position: relative;
  transition: background 200ms ease, transform 200ms var(--easing), color 200ms ease;
  border: 1px solid transparent;
}
.nav-primary:hover {
  background: var(--surface2);
  color: var(--text);
  transform: translateX(2px);
}
.nav-primary:hover .np-arrow { opacity: 0.7; transform: translateX(2px); }
.nav-primary.active {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent-soft) 100%, transparent),
    color-mix(in oklab, var(--accent-soft) 30%, transparent));
  color: var(--text);
  border-color: rgba(30, 215, 96, 0.28);
}
.nav-primary.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}
.np-emoji {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.np-meta { flex: 1; min-width: 0; }
.np-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.np-arrow {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 200ms ease, transform 200ms var(--easing);
}
.nav-primary.active .np-arrow { opacity: 0.9; transform: translateX(0); color: var(--accent); }

/* TIER 2 — COMPACT: para Explorar / Personal / Géneros */
.nav-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text3);
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--easing);
  margin-bottom: 1px;
  position: relative;
}
.nav-compact:hover { background: var(--surface2); color: var(--text); transform: translateX(2px); }
.nav-compact.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-compact.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.nc-emoji {
  width: 20px;
  font-size: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.nc-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.nav-compact.active .nc-count { color: var(--accent); opacity: 0.8; }

/* ============================================================
   HERO BADGES — trofeos ganados, bajo el hero del home
   "que sienta como que ganó un premio" — feedback del user
   ============================================================ */
#hero-badges {
  margin-top: 14px;
  max-width: 720px;
}
.hb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.hb-title { color: var(--text3); }
.hb-count {
  background: var(--accent);
  color: #000;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hb-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.hb-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--surface2) 85%, var(--accent) 15%),
    var(--surface2));
  border: 1px solid rgba(30, 215, 96, 0.28);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 200ms var(--easing), box-shadow 300ms ease, border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.hb-badge::before {
  /* Shine sweep sutil al hover, tipo trofeo */
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: rotate(20deg) translateX(0);
  transition: transform 0.9s ease;
  pointer-events: none;
}
.hb-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30,215,96,0.22), 0 2px 6px rgba(0,0,0,0.35);
  border-color: rgba(30, 215, 96, 0.55);
}
.hb-badge:hover::before { transform: rotate(20deg) translateX(340%); }

.hb-emoji {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: radial-gradient(circle at 30% 30%, #ffd777, #f59e0b 60%, #b45309);
  box-shadow: 0 2px 6px rgba(245,158,11,0.5), inset 0 0 0 1px rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.hb-name { white-space: nowrap; }

.hb-more {
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px dashed var(--muted2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
.hb-more:hover { color: var(--text); border-color: var(--text3); }

.hb-teaser {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px dashed var(--muted2);
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.hb-teaser:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.hb-teaser-icon { font-size: 16px; opacity: 0.85; }

/* ============================================================
   NAV-QUICK — chips horizontales bajo "Todas" (Noche relax + Descubre)
   ============================================================ */
.nav-quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 6px 2px 0;
}
.nav-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid transparent;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--easing), border-color 180ms ease;
  min-width: 0;
  text-align: left;
}
.nav-quick:hover {
  background: var(--surface3);
  color: var(--text);
  transform: translateY(-1px);
}
.nav-quick.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(30, 215, 96, 0.35);
}
.nq-emoji { font-size: 15px; flex-shrink: 0; opacity: 0.9; }
.nq-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Sidebar: toggle "Ver géneros" — ahora es un BOTÓN obvio, no
   un mini-label camuflado. Feedback: "no me di cuenta que era colapsable".
   ============================================================ */
.sb-genres-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 20px);
  margin: 8px 10px 4px;
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--muted2);
  border-radius: 10px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms var(--easing);
  text-align: left;
}
.sb-genres-toggle:hover {
  background: var(--surface3);
  color: var(--text);
  border-color: var(--text3);
  transform: translateX(2px);
}
.sb-genres-toggle[data-open="1"] {
  background: color-mix(in oklab, var(--accent-soft) 60%, var(--surface2));
  border-color: rgba(30, 215, 96, 0.32);
  color: var(--text);
}
.sgt-icon {
  font-size: 15px;
  flex-shrink: 0;
  opacity: 0.9;
}
.sgt-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sgt-count {
  background: var(--surface3);
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}
.sb-genres-toggle[data-open="1"] .sgt-count {
  background: var(--accent);
  color: #000;
}
.sgt-caret {
  transition: transform 250ms var(--easing);
  color: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}
.sgt-caret.open { transform: rotate(180deg); opacity: 1; }
