/* La Rockola · estructura de app de música: barra lateral, estantes, reproductor fijo abajo y pantalla completa. */
:root {
  --exterior: #000;
  --fondo: #121417;
  --elevado: #1b1e23;
  --elevado-2: #262a31;
  --linea: rgba(255, 255, 255, .09);
  --texto: #fff;
  --suave: #a9b0bb;
  --tenue: #6f7782;
  --acento: #ff8a3d;
  --acento-hover: #ffa25f;
  --acento-texto: #1a0c02;
  --video: #3ad1b7;
  --abajo: 0px;
  --rapido: 150ms cubic-bezier(.3, .7, .4, 1);
  --suelto: 320ms cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; scrollbar-color: #4a4f57 transparent }
body { font-family: 'Figtree', system-ui, sans-serif; background: var(--exterior); color: var(--texto); line-height: 1.4; overflow-x: clip; min-height: 100dvh }
body.con-modal { overflow: hidden }
button, input { font: inherit; color: inherit }
button { cursor: pointer; border: 0; background: none }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; border-radius: 4px }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; text-wrap: balance }
svg { width: 24px; height: 24px; fill: currentColor; display: block; flex-shrink: 0 }
svg.play { transform: translateX(1px) } /* centrado óptico del triángulo */
.cifra { font-variant-numeric: tabular-nums }
img { display: block }
[hidden] { display: none !important }

/* ---------- Marco ---------- */
.marco { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 8px; padding: 8px 8px calc(8px + var(--abajo)); min-height: 100dvh }
body.con-reproductor { --abajo: 80px }
.lateral { position: sticky; top: 8px; height: calc(100dvh - 16px - var(--abajo)); display: flex; flex-direction: column; gap: 8px; min-height: 0 }
.lat-bloque { background: var(--fondo); border-radius: 10px; padding: 8px 12px }
.lat-marca { display: flex; align-items: center; gap: 10px; padding: 12px 8px 14px; font-size: 19px; font-weight: 900; letter-spacing: -.02em }
.lat-marca svg { width: 32px; height: 32px; padding: 6px; border-radius: 8px; background: var(--acento); color: var(--acento-texto) }
.lat-enlace { display: flex; align-items: center; gap: 18px; height: 44px; padding: 0 10px; font-weight: 700; color: var(--suave); border-radius: 6px; transition: color var(--rapido) }
.lat-enlace:hover, .lat-enlace.activo { color: var(--texto) }
.lat-biblioteca { flex: 1; overflow-y: auto; min-height: 0 }
.lat-titulo { display: flex; align-items: center; gap: 12px; padding: 10px 10px 8px; font-weight: 700; color: var(--suave) }
.lat-biblioteca ul { list-style: none }
.lat-genero { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; transition: background-color var(--rapido) }
.lat-genero:hover { background: rgba(255, 255, 255, .07) }
.lat-genero.activo { background: rgba(255, 255, 255, .11) }
.lat-genero span { min-width: 0 }
.lat-genero b, .lat-genero small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lat-genero b { font-weight: 600; font-size: 15px }
.lat-genero small { color: var(--suave); font-size: 13px }
.lat-genero.sonando b { color: var(--acento) }
.lat-salir { color: var(--suave); font-weight: 600; font-size: 14px; padding: 14px 10px; min-height: 44px }
.principal { background: var(--fondo); border-radius: 10px; overflow: clip; min-width: 0; min-height: calc(100dvh - 16px - var(--abajo)) }
.tabs { display: none }

/* ---------- Portadas ---------- */
.portada { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--elevado-2); flex-shrink: 0; position: relative; container-type: inline-size }
.portada img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid rgba(255, 255, 255, .08); outline-offset: -1px }
.portada.vacia { display: flex; align-items: flex-end; padding: 9%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06) }
.portada.vacia span { font-weight: 900; font-size: 15cqi; line-height: .98; letter-spacing: -.03em; overflow-wrap: break-word; hyphens: auto; text-wrap: balance; text-shadow: 0 2px 10px rgba(0, 0, 0, .3) }
.portada.mini { width: 48px; border-radius: 4px }
.portada.mini span, .portada.chica span { font-size: 20cqi }
.portada.chica { width: 64px; height: 100%; border-radius: 0 }

/* ---------- Controles comunes ---------- */
.ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--suave); position: relative;
  transition-property: color, transform, background-color; transition-duration: 150ms; transition-timing-function: ease-out }
.ico:hover { color: var(--texto) }
.ico:active { transform: scale(.92) }
.ico.circulo { width: 34px; height: 34px; background: rgba(0, 0, 0, .5); color: var(--texto) }
.ico.circulo svg { width: 20px; height: 20px }
.ico.modo[aria-pressed="true"] { color: var(--acento) }
.ico.modo[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor }
.ico.modo.una::before { content: '1'; position: absolute; top: 5px; right: 4px; font-size: 9px; font-weight: 900; background: var(--acento); color: var(--acento-texto);
  width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center }
.play-redondo { width: 36px; height: 36px; border-radius: 50%; background: var(--texto); color: #000; display: grid; place-items: center;
  transition: transform 150ms ease-out }
.play-redondo svg { width: 20px; height: 20px }
.play-redondo:hover { transform: scale(1.06) }
.play-redondo:active { transform: scale(.95) }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: 999px;
  background: var(--acento); color: var(--acento-texto); font-weight: 800; font-size: 16px; transition: transform 150ms ease-out, background-color 150ms ease-out }
.boton:hover { background: var(--acento-hover) }
.boton:active { transform: scale(.96) }
.boton.ancho { width: 100%; margin-top: 14px }
.pildora { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 11px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(255, 255, 255, .1); color: var(--texto); white-space: nowrap; transition: background-color 150ms ease-out, transform 150ms ease-out }
.pildora:hover { background: rgba(255, 255, 255, .16) }
.pildora:active { transform: scale(.96) }
.pildora svg { width: 18px; height: 18px }
.pildora.video svg { color: var(--video) }
.pildora.karaoke svg { color: var(--acento) }
.pildora.grande { height: 40px; padding: 0 18px 0 14px; font-size: 14.5px }
.etiqueta-tipo { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 3px 9px 3px 7px; border-radius: 999px }
.etiqueta-tipo svg { width: 13px; height: 13px }
.etiqueta-tipo.tipo-video { background: var(--video); color: #03211c }
.etiqueta-tipo.tipo-karaoke { background: var(--acento); color: var(--acento-texto) }

/* ---------- Páginas ---------- */
.pagina { padding: 0 24px 40px }
.barra-arriba { display: flex; gap: 8px; padding: 16px 0 0 }
.vacio { color: var(--suave); padding: 48px 0; text-align: center; text-wrap: pretty }
.pie { color: var(--tenue); font-size: 13px; padding: 40px 0 8px; max-width: 70ch }
.estante { margin-top: 32px }
.estante-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px }
.estante-cabeza h2 { font-size: 23px }
.ver-todo { color: var(--suave); font-size: 14px; font-weight: 700 }
.ver-todo:hover { color: var(--texto); text-decoration: underline }

/* Inicio: saludo y accesos rápidos */
.cabeza-inicio { margin: 0 -24px; padding: 28px 24px 4px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color-sonando, var(--acento)) 34%, var(--fondo)), var(--fondo) 300px) }
.cabeza-inicio h1 { font-size: 32px; margin-bottom: 20px }
.rapidas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px }
.rapida { position: relative; display: flex; align-items: center; height: 64px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08);
  font-weight: 700; font-size: 15px; text-align: left; transition: background-color var(--rapido) }
.rapida > a { display: flex; align-items: center; gap: 14px; height: 100%; flex: 1; min-width: 0; padding-right: 52px }
.rapida span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2 }
.rapida.mezcla { gap: 14px; padding-right: 12px; width: 100% }
.mezcla-icono { display: grid; place-items: center; background: linear-gradient(135deg, var(--acento), #ff3d6e); color: #fff }
.rapida.sonando span { color: var(--acento) }

/* Tarjetas de género con botón de play flotante */
.carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 186px); gap: 4px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -12px; padding: 0 0 4px }
.carrusel::-webkit-scrollbar { display: none }
.carrusel > * { scroll-snap-align: start }
.carrusel.videos { grid-auto-columns: minmax(230px, 290px); gap: 16px; margin: 0; }
.tarjeta { position: relative; padding: 12px; border-radius: 8px; container-type: inline-size; transition: background-color var(--suelto) }
.t-enlace { display: block }
.t-enlace .portada { box-shadow: 0 8px 24px rgba(0, 0, 0, .5) }
.t-titulo { font-weight: 700; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.t-sub { color: var(--suave); font-size: 13.5px; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.tarjeta.sonando .t-titulo { color: var(--acento) }
.play-flotante { position: absolute; right: 20px; top: calc(100cqi - 68px); width: 48px; height: 48px; border-radius: 50%; background: var(--acento);
  color: var(--acento-texto); display: grid; place-items: center; box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(8px); transition-property: opacity, transform, background-color; transition-duration: 250ms; transition-timing-function: cubic-bezier(.3, .7, .4, 1) }
.play-flotante:hover { background: var(--acento-hover); transform: scale(1.05) }
.play-flotante.peq { right: 10px; top: 50%; width: 36px; height: 36px; margin-top: -18px; transform: none }
.play-flotante.peq svg { width: 18px; height: 18px }
.tarjeta.sonando .play-flotante, .rapida.sonando .play-flotante, .play-flotante:focus-visible { opacity: 1; transform: none }
@media (hover: hover) {
  .tarjeta:hover { background: var(--elevado) }
  .tarjeta:hover .play-flotante, .rapida:hover .play-flotante { opacity: 1; transform: none }
  .rapida:hover { background: rgba(255, 255, 255, .15) }
}

/* Cabecera de género con el color de su foto */
.genero { --tinte: #3a3f47 }
.cabeza-genero { margin: 0 -24px; padding: 0 24px 24px;
  background: linear-gradient(to bottom, var(--tinte), color-mix(in srgb, var(--tinte) 45%, var(--fondo))); transition: background-color .6s }
.cg-cuerpo { display: flex; align-items: flex-end; gap: 24px; margin-top: 20px }
.cg-cuerpo .portada { width: clamp(150px, 20vw, 232px); box-shadow: 0 8px 40px rgba(0, 0, 0, .5) }
.cg-textos { min-width: 0; padding-bottom: 4px }
.cg-tipo { font-size: 14px; font-weight: 600 }
.titulo-gigante { font-size: clamp(40px, 6.6vw, 96px); font-weight: 900; line-height: .95; letter-spacing: -.045em; margin: .08em 0 .25em; overflow-wrap: break-word }
.cg-desc { color: rgba(255, 255, 255, .75); font-size: 14.5px; margin-bottom: 6px; max-width: 60ch; text-wrap: pretty }
.cg-meta { font-size: 14px; color: rgba(255, 255, 255, .8) }
.cg-meta b { color: var(--texto) }
.cuerpo-genero { margin: 0 -24px; padding: 20px 24px 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--tinte) 22%, var(--fondo)), var(--fondo) 230px) }
.acciones { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; flex-wrap: wrap }
.play-grande { width: 56px; height: 56px; border-radius: 50%; background: var(--acento); color: var(--acento-texto); display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3); transition: transform 150ms ease-out, background-color 150ms ease-out }
.play-grande svg { width: 26px; height: 26px }
.play-grande:hover { transform: scale(1.04); background: var(--acento-hover) }
.play-grande:active { transform: scale(.96) }
.ico.accion { width: 44px; height: 44px }
.ico.accion svg { width: 30px; height: 30px }
.aviso-mejora { margin: 0 0 18px; padding: 16px 18px; border-radius: 8px; background: rgba(255, 138, 61, .12); border: 1px solid rgba(255, 138, 61, .35);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap }
.aviso-mejora p { flex: 1 1 240px; font-weight: 600 }

/* Lista de canciones */
.pistas-cabeza, .pista { display: grid; grid-template-columns: 40px minmax(0, 1fr) 64px 40px; gap: 12px; align-items: center; padding: 0 12px 0 4px }
.pistas-cabeza { color: var(--suave); font-size: 13.5px; height: 36px; border-bottom: 1px solid var(--linea); margin-bottom: 8px }
.pistas-cabeza span:first-child { text-align: center }
.pistas-cabeza span:nth-child(3) { text-align: right }
.pistas { list-style: none }
.pista { min-height: 56px; border-radius: 6px; transition: background-color var(--rapido) }
.p-n { display: grid; place-items: center; color: var(--suave); font-size: 15px; height: 100% }
.p-n > * { grid-area: 1 / 1 }
.p-play, .eq { display: none }
.p-play svg { width: 18px; height: 18px; color: var(--texto) }
.p-cuerpo { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; min-height: 56px; padding: 6px 0 }
.p-cuerpo .portada.mini { width: 40px }
.p-textos { display: grid; min-width: 0 }
.p-titulo { font-size: 15.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.p-sub { display: flex; align-items: center; color: var(--suave); font-size: 13.5px; overflow: hidden; white-space: nowrap }
.p-sub { text-overflow: ellipsis }
.insignia-tipo { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; margin-right: 6px; flex-shrink: 0;
  background: var(--video); color: #03211c }
.insignia-tipo.tipo-karaoke { background: var(--acento); color: var(--acento-texto) }
.insignia-tipo svg { width: 11px; height: 11px }
.p-dur { color: var(--suave); font-size: 14px; text-align: right }
.pista.sonando .p-titulo { color: var(--acento) }
.pista.sonando .num { display: none }
.pista.sonando .eq { display: flex }
.pista.bloqueada .p-textos { opacity: .5 }
.eq { gap: 2px; align-items: flex-end; height: 14px }
.eq i { width: 3px; background: var(--acento); border-radius: 1px; animation: eq .9s ease-in-out infinite alternate }
.eq i:nth-child(2) { animation-delay: -.35s }
.eq i:nth-child(3) { animation-delay: -.6s }
@keyframes eq { from { height: 3px } to { height: 14px } }
body:not(.tocando) .eq i { animation-play-state: paused; height: 6px }
@media (hover: hover) {
  .pista:hover { background: rgba(255, 255, 255, .07) }
  .pista:hover .num, .pista:hover .eq { display: none }
  .pista:not(.bloqueada):hover .p-play { display: block }
  .p-mas { opacity: 0 }
  .pista:hover .p-mas, .p-mas:focus-visible { opacity: 1 }
}

/* Videos */
.rejilla-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 16px }
.tv { display: block; text-align: left; width: 100%; min-width: 0 }
.tv-imagen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .4) }
.tv-imagen .etiqueta-tipo { position: absolute; top: 8px; left: 8px }
.tv-play { width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); display: grid; place-items: center;
  transition: transform var(--rapido), background-color var(--rapido) }
.tv-play svg { width: 24px; height: 24px }
.tv-dur { position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .72) }
.tv-titulo, .tv-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tv-titulo { font-weight: 700; margin-top: 10px }
.tv-sub { color: var(--suave); font-size: 13.5px }
.tv.bloqueada { opacity: .5 }
@media (hover: hover) { .tv:hover .tv-play { transform: scale(1.08); background: var(--acento); color: var(--acento-texto) } }
.titulo-pagina { font-size: 32px; padding: 28px 0 16px }
.filtros { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap }
.filtro { height: 34px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 600; transition: background-color var(--rapido) }
.filtro:hover { background: rgba(255, 255, 255, .14) }
.filtro[aria-pressed="true"] { background: var(--texto); color: #000 }

/* Buscar */
.buscador { position: sticky; top: 0; z-index: 3; margin: 0 -24px; padding: 16px 24px 12px; background: var(--fondo) }
.buscador input { width: min(480px, 100%); height: 48px; border-radius: 999px; padding: 0 20px 0 50px; background: var(--elevado-2);
  border: 1px solid transparent; font-size: 16px; transition: border-color var(--rapido), background-color var(--rapido) }
.buscador input::placeholder { color: var(--suave) }
.buscador input:hover { background: #2e333b }
.buscador input:focus { outline: none; border-color: var(--texto) }
.buscador svg { position: absolute; left: 40px; top: 28px; color: var(--suave) }
.explorar { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px }
.explorar-tarjeta { --tinte: #444; position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; padding: 14px 16px; background: var(--tinte);
  font-size: 21px; font-weight: 800; letter-spacing: -.02em; transition: transform var(--rapido) }
.explorar-tarjeta > span { position: relative; z-index: 1; display: block; max-width: 70%; line-height: 1.1; text-shadow: 0 1px 8px rgba(0, 0, 0, .25) }
.portada.inclinada { position: absolute; width: 46%; right: -7%; bottom: -5%; transform: rotate(24deg); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); border-radius: 4px }
.explorar-tarjeta:active { transform: scale(.98) }

/* ---------- Barra del reproductor ---------- */
.barra-rep { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 80px; background: var(--exterior);
  display: grid; grid-template-columns: minmax(180px, 30%) minmax(0, 40%) minmax(180px, 30%); align-items: center; padding: 0 16px }
.barra-rep:not([hidden]) { animation: subir 350ms cubic-bezier(.2, .8, .2, 1) }
.br-actual { display: flex; align-items: center; gap: 14px; min-width: 0; text-align: left; padding: 6px; margin-left: -6px; border-radius: 8px; transition: background-color var(--rapido) }
.br-actual:hover { background: rgba(255, 255, 255, .06) }
.br-portada .portada { width: 56px; border-radius: 4px }
.br-info { display: grid; min-width: 0 }
.br-titulo { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.br-artista { font-size: 12.5px; color: var(--suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.br-centro { display: flex; flex-direction: column; align-items: center; gap: 4px }
.br-controles { display: flex; align-items: center; gap: 14px }
.br-controles .ico { width: 34px; height: 34px }
.br-controles .ico svg { width: 20px; height: 20px }
.br-tiempo { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 620px; font-size: 12px; color: var(--suave) }
.br-tiempo span { min-width: 40px }
.br-tiempo span:first-child { text-align: right }
.br-derecha { display: flex; align-items: center; justify-content: flex-end; gap: 4px }
.br-derecha #br-video { color: var(--acento) }
.play-movil, .br-linea-movil { display: none }
.deslizador { position: relative; flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none }
.deslizador::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28) }
.deslizador .relleno { position: relative; height: 4px; width: 0; border-radius: 2px; background: var(--texto) }
.deslizador .relleno::after { content: ''; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--texto);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5); transform: scale(0); transition: transform 120ms ease-out }
.deslizador:hover .relleno, .deslizador.arrastrando .relleno, .deslizador:focus-visible .relleno { background: var(--acento) }
.deslizador:hover .relleno::after, .deslizador.arrastrando .relleno::after, .deslizador:focus-visible .relleno::after { transform: scale(1) }
.deslizador.vol { flex: 0 0 96px; margin-right: 4px }
@keyframes subir { from { transform: translateY(100%) } }

/* ---------- Reproductor a pantalla completa ---------- */
.rep-completo { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; color: var(--texto);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color-sonando, #3a3f47) 80%, #000), #0b0b0c 88%) }
.rep-completo[open] { animation: subir 380ms cubic-bezier(.2, .8, .2, 1) }
.rep-completo::backdrop { background: #000 }
.rc-cuerpo { width: min(480px, 100%); height: 100%; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)) }
.rc-arriba { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.rc-arriba .ico { color: var(--texto) }
.rc-de { text-align: center; min-width: 0 }
.rc-de small { display: block; font-size: 12px; color: rgba(255, 255, 255, .75) }
.rc-de b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rc-portada { flex: 1; display: grid; place-items: center; min-height: 0; padding: 24px 0 }
.rc-portada .portada { width: min(100%, 48vh); border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  transition: transform 450ms cubic-bezier(.2, .8, .2, 1) }
body:not(.tocando) .rc-portada .portada { transform: scale(.9) } /* como en Apple Music: en pausa la portada se encoge */
.rc-fila { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px }
.rc-textos { min-width: 0 }
.rc-titulo { font-size: 23px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rc-artista { font-size: 16px; color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rc-extras { display: flex; gap: 8px; flex-shrink: 0 }
.rc-cuerpo .deslizador { flex: none }
.rc-tiempos { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 2px }
.rc-controles { display: flex; align-items: center; justify-content: space-between; margin-top: 12px }
.rc-controles .ico { color: var(--texto) }
.rc-controles .ico.grande { width: 56px; height: 56px }
.rc-controles .ico.grande svg { width: 36px; height: 36px }
.rc-controles .ico.modo[aria-pressed="true"] { color: var(--acento) }
.play-redondo.enorme { width: 72px; height: 72px }
.play-redondo.enorme svg { width: 32px; height: 32px }

/* ---------- Menú «⋯» ---------- */
.menu { border: 0; color: var(--texto); background: var(--elevado-2); position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; margin: 0;
  border-radius: 14px 14px 0 0; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); max-height: 80dvh; overflow-y: auto }
.menu[open] { animation: subir 300ms cubic-bezier(.2, .8, .2, 1) }
.menu::backdrop { background: rgba(0, 0, 0, .6) }
.menu-cabeza { display: flex; align-items: center; gap: 12px; padding: 10px 18px 14px; border-bottom: 1px solid var(--linea); margin-bottom: 6px }
.menu-cabeza .portada.chica { width: 48px; height: 48px; border-radius: 4px }
.menu-info { min-width: 0 }
.menu-titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.menu-sub { color: var(--suave); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.menu ul { list-style: none }
.menu [role="menuitem"] { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 20px; font-size: 16px; font-weight: 600; text-align: left }
.menu [role="menuitem"] svg { color: var(--suave) }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: rgba(255, 255, 255, .08); outline: none }
.menu-cancelar { display: block; width: 100%; height: 52px; margin-top: 4px; color: var(--suave); font-weight: 700; font-size: 16px }
.menu.flotante { inset: auto; width: 290px; border-radius: 6px; padding: 4px; box-shadow: 0 16px 34px rgba(0, 0, 0, .55) }
.menu.flotante[open] { animation: aparecer 140ms ease-out }
.menu.flotante::backdrop { background: transparent }
.menu.flotante .menu-cabeza, .menu.flotante .menu-cancelar { display: none }
.menu.flotante [role="menuitem"] { min-height: 42px; padding: 0 12px; font-size: 14.5px; border-radius: 3px; gap: 12px }
.menu.flotante [role="menuitem"] svg { width: 20px; height: 20px }
@keyframes aparecer { from { opacity: 0; transform: scale(.97) } }

/* ---------- Videos y karaoke (pantalla) ---------- */
.pantalla { margin: auto; padding: 0; border: 0; width: min(1100px, 100%); max-height: 100dvh; background: #0b0c0e; color: var(--texto);
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden }
.pantalla::backdrop { background: rgba(0, 0, 0, .85); backdrop-filter: blur(6px) }
.pantalla[open] { animation: aparecer 220ms ease-out }
.pv-arriba { display: flex; gap: 12px; align-items: center; padding: 12px 10px 12px 18px }
.pv-info { min-width: 0; flex: 1 }
.pv-tipo { margin-bottom: 4px }
.pv-titulo { font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pv-artista { color: var(--suave); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pantalla video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 150px); background: #000 }
.pv-abajo { display: flex; align-items: center; gap: 6px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) }
.pv-pos { color: var(--suave); font-size: 14px; min-width: 60px; text-align: center }
.pv-abajo .ico:disabled { opacity: .3; pointer-events: none }
.pv-bajar { margin-left: auto }

/* ---------- Avisos ---------- */
.avisos { position: fixed; left: 50%; bottom: calc(var(--abajo) + 20px); transform: translateX(-50%); z-index: 40; pointer-events: none; width: max-content; max-width: calc(100% - 32px) }
.aviso { background: var(--texto); color: #000; font-weight: 600; font-size: 14.5px; padding: 12px 18px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  animation: aviso-entra 220ms cubic-bezier(.2, .8, .2, 1); transition: opacity 180ms ease-in, transform 180ms ease-in; text-align: center }
.aviso.saliendo { opacity: 0; transform: translateY(6px) }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(10px) scale(.98) } }

/* ---------- Entrada con código ---------- */
.sin-sesion .lateral, .sin-sesion .tabs, .sin-sesion .barra-rep { display: none !important }
.sin-sesion .marco { grid-template-columns: 1fr }
.entrada { min-height: calc(100dvh - 16px); display: grid; place-items: center; padding: 24px 16px }
.entrada .caja { width: min(400px, 100%); text-align: center }
.entrada-logo { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 18px; background: var(--acento); color: var(--acento-texto); display: grid; place-items: center }
.entrada-logo svg { width: 40px; height: 40px }
.entrada h1 { font-size: 34px; font-weight: 900 }
.entrada .lema { color: var(--suave); margin: 8px 0 28px; text-wrap: pretty }
.entrada label { display: block; font-weight: 700; margin-bottom: 8px; text-align: left }
.campo-codigo { width: 100%; text-align: center; font-weight: 800; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; height: 60px;
  border-radius: 8px; background: var(--elevado-2); border: 1px solid var(--linea) }
.campo-codigo:focus { outline: none; border-color: var(--texto) }
.entrada .ayuda { font-size: 14px; color: var(--suave); margin-top: 12px }
.mensaje-error { color: #ff6b7a; font-weight: 600; margin-top: 12px; min-height: 1.4em }

/* ---------- Móvil ---------- */
@media (max-width: 759px) {
  :root { --tabs: calc(62px + env(safe-area-inset-bottom)) }
  body.con-reproductor { --abajo: 64px }
  .marco { display: block; padding: 0 0 calc(var(--tabs) + var(--abajo) + 12px) }
  .lateral, .solo-ancho { display: none }
  .principal { border-radius: 0; min-height: 100dvh }
  .pagina { padding: 0 16px 24px }
  .cabeza-inicio, .cabeza-genero, .cuerpo-genero, .buscador { margin: 0 -16px; padding-left: 16px; padding-right: 16px }
  .cabeza-inicio { padding-top: calc(18px + env(safe-area-inset-top)) }
  .cabeza-inicio h1 { font-size: 26px; margin-bottom: 16px }
  .rapidas { grid-template-columns: 1fr 1fr }
  .rapida { height: 56px; font-size: 13px }
  .rapida > a { gap: 10px; padding-right: 8px }
  .rapida.mezcla { gap: 10px }
  .portada.chica { width: 56px }
  .play-flotante { display: none }
  .carrusel { grid-auto-columns: 41%; gap: 14px; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px }
  .carrusel.videos { grid-auto-columns: 74%; margin: 0 -16px }
  .tarjeta { padding: 0 }
  .estante-cabeza h2 { font-size: 21px }
  .barra-arriba { padding-top: calc(12px + env(safe-area-inset-top)) }
  .cg-cuerpo { flex-direction: column; align-items: stretch; gap: 18px; margin-top: 4px }
  .cg-cuerpo .portada { width: min(64vw, 280px); align-self: center }
  .titulo-gigante { font-size: clamp(26px, 8vw, 40px); letter-spacing: -.03em; margin: 2px 0 6px }
  .cg-tipo { display: none }
  .acciones { gap: 10px }
  .acciones .play-grande { order: 9; margin-left: auto }
  .pistas-cabeza { display: none }
  .pista { grid-template-columns: 26px minmax(0, 1fr) 40px; gap: 10px; padding: 0; border-radius: 0 }
  .p-dur { display: none }
  .p-n { font-size: 13px }
  .rejilla-videos { grid-template-columns: 1fr 1fr; gap: 18px 12px }
  .explorar { grid-template-columns: 1fr 1fr; gap: 12px }
  .explorar-tarjeta { font-size: 16px; padding: 12px }
  .buscador { padding-top: calc(14px + env(safe-area-inset-top)) }
  .buscador input { width: 100%; border-radius: 8px; background: var(--texto); color: #000; font-weight: 600 }
  .buscador input::placeholder { color: #444 }
  .buscador svg { left: 30px; top: calc(26px + env(safe-area-inset-top)); color: #222 }
  .titulo-pagina { font-size: 26px; padding-top: calc(20px + env(safe-area-inset-top)) }

  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; height: var(--tabs);
    padding-bottom: env(safe-area-inset-bottom); background: linear-gradient(to top, #000 55%, rgba(0, 0, 0, .86)) }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--suave) }
  .tabs a.activo { color: var(--texto) }

  .barra-rep { left: 8px; right: 8px; bottom: calc(var(--tabs) + 4px); height: 58px; border-radius: 8px; padding: 0 4px 0 7px;
    grid-template-columns: minmax(0, 1fr) auto; overflow: hidden;
    background: color-mix(in srgb, var(--color-sonando, #2a2f36) 58%, #070707); box-shadow: 0 8px 24px rgba(0, 0, 0, .4) }
  .br-centro { display: none }
  .br-actual { gap: 10px; padding: 0; margin: 0 }
  .br-actual:hover { background: none }
  .br-portada .portada { width: 42px }
  .play-movil { display: grid; place-items: center; width: 44px; height: 44px; color: var(--texto) }
  .play-movil svg { width: 28px; height: 28px }
  .br-derecha #br-video { color: var(--texto) }
  .br-linea-movil { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .22) }
  .br-linea-movil [data-relleno] { height: 100%; width: 0; background: var(--texto); border-radius: 1px }
  .avisos { bottom: calc(var(--tabs) + var(--abajo) + 14px) }

  .pantalla { border-radius: 0; width: 100%; height: 100dvh; max-height: none; display: none; flex-direction: column }
  .pantalla[open] { display: flex; animation: subir 300ms cubic-bezier(.2, .8, .2, 1) }
  .pantalla video { flex: 1; max-height: none; aspect-ratio: auto; min-height: 0 }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important }
}
