/* Portal de TV para decos MAG (plataforma de facturas). Medidas en em: el tamaño de letra
   del body se ajusta al alto de la pantalla en portal.js (20px a 720 líneas). */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: transparent; color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 20px; }
.oculto { display: none !important; }
#banda { position: absolute; left: 3em; right: 3em; bottom: 2em; background: rgba(10, 20, 35, 0.92); border-top: 0.25em solid #3d8ee0; padding: 1em 1.4em; overflow: hidden; }
#bandaLogo { float: left; width: 7em; height: 5em; margin-right: 1.4em; text-align: center; }
#bandaLogo img { max-width: 7em; max-height: 5em; }
#bandaTexto { overflow: hidden; }
#bandaCanal { font-size: 2em; font-weight: bold; white-space: nowrap; overflow: hidden; margin-right: 3em; }
#bandaNumero { color: #ffd24d; }
#bandaHora { position: absolute; right: 0.7em; top: 0.5em; font-weight: normal; color: #cfe3f7; }
#bandaAhora { font-size: 1.6em; margin-top: 0.3em; white-space: nowrap; overflow: hidden; }
#bandaBarra { height: 0.5em; background: #34465a; margin: 0.5em 0; }
#bandaProgreso { height: 0.5em; width: 0; background: #3d8ee0; }
#bandaDespues { font-size: 1.3em; color: #b8c8d8; white-space: nowrap; overflow: hidden; }
#numero { position: absolute; right: 2em; top: 1.5em; font-size: 4em; font-weight: bold; color: #ffd24d; background: rgba(10, 20, 35, 0.9); padding: 0.1em 0.5em; }
#volumen { position: absolute; left: 50%; top: 2em; width: 24em; margin-left: -12em; background: rgba(10, 20, 35, 0.92); padding: 0.8em 1em; text-align: center; }
#volumenTexto { font-size: 1.8em; margin-bottom: 0.3em; }
#volumenBarra { height: 1em; background: #34465a; }
#volumenNivel { height: 1em; width: 0; background: #ffd24d; }
#lista { position: absolute; left: 3em; top: 2em; bottom: 2em; width: 46em; background: rgba(10, 20, 35, 0.95); padding: 1em; }
#listaTitulo { font-size: 1.8em; font-weight: bold; color: #ffd24d; margin-bottom: 0.4em; }
#listaFilas { position: absolute; left: 1em; right: 1em; top: 3.6em; bottom: 2.6em; overflow: hidden; }
.fila { font-size: 1.7em; height: 1.9em; line-height: 1.9em; padding: 0 0.4em; white-space: nowrap; overflow: hidden; }
.fila .n { display: inline-block; width: 2.2em; color: #ffd24d; }
.fila.sel { background: #3d8ee0; }
.fila.sel .n { color: #fff; }
/* Lista de canales: logo, número, nombre y lo que echan ahora */
#listaFilas .fila { position: relative; padding: 0; }
#listaFilas .fila span { position: absolute; top: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#listaFilas .fila .logo { left: 0.3em; width: 2.4em; text-align: center; }
#listaFilas .fila .logo img { max-width: 2.4em; max-height: 1.5em; vertical-align: middle; }
#listaFilas .fila .n { left: 2.9em; width: 1.9em; text-align: right; }
#listaFilas .fila .nombre { left: 5.2em; width: 7.4em; }
#listaFilas .fila .ahora { left: 12.9em; right: 0.4em; color: #b8c8d8; }
#listaFilas .fila.sel .ahora { color: #fff; }
#listaFilas.desplazable { overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Con el dedo: filas más altas y separadas para acertar */
#listaFilas.desplazable .fila { height: 2.8em; line-height: 2.8em; border-bottom: 0.08em solid rgba(255, 255, 255, 0.12); }
#listaFilas.desplazable .fila .logo img { max-height: 2em; }
#listaAyuda { position: absolute; left: 1em; right: 1em; bottom: 0.8em; font-size: 1.1em; color: #b8c8d8; }
#mensaje { position: absolute; left: 50%; top: 40%; width: 30em; margin-left: -15em; background: rgba(10, 20, 35, 0.92); padding: 1em; font-size: 1.6em; text-align: center; }
#aviso { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #0a1423; text-align: center; padding-top: 12%; }
#avisoTexto { font-size: 2.4em; line-height: 1.4; margin: 0 2em; white-space: pre-line; }
#avisoMac { font-size: 1.4em; color: #b8c8d8; margin-top: 2em; }
#entrada { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #0a1423; padding: 3em 0 0 0; text-align: center; }
#entradaTitulo { font-size: 2.4em; font-weight: bold; color: #ffd24d; }
#entradaTexto { font-size: 1.5em; margin: 0.6em 0 1.2em 0; }
#entrada .campo { width: 30em; margin: 0 auto 1em auto; text-align: left; }
#entrada label { display: block; font-size: 1.3em; color: #b8c8d8; margin-bottom: 0.2em; }
#entrada input { width: 100%; box-sizing: border-box; -webkit-box-sizing: border-box; font-size: 1.8em; padding: 0.3em 0.5em; border: 0.15em solid #34465a; background: #fff; color: #000; }
#entrada input.foco { border-color: #ffd24d; }
.boton { display: inline-block; font-size: 1.8em; padding: 0.4em 2em; background: #34465a; margin-top: 0.4em; }
.boton.foco { background: #3d8ee0; outline: 0.12em solid #ffd24d; }
#entradaError { font-size: 1.5em; color: #ff8a80; margin-top: 0.8em; min-height: 1.4em; }
#entradaAyuda { font-size: 1.1em; color: #b8c8d8; margin-top: 0.8em; }
#entradaMac { font-size: 1.1em; color: #8aa0b8; margin-top: 1.2em; }
#epg { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #101010; color: #fff; }
#epgDetalle { position: absolute; left: 2em; right: 2em; top: 1.2em; height: 7.4em; overflow: hidden; }
#epgLogo { float: left; width: 9em; height: 6em; margin-right: 1.2em; background: #1c1c1c; text-align: center; line-height: 6em; font-size: 1em; }
#epgLogo img { max-width: 8em; max-height: 5em; vertical-align: middle; }
#epgLogo span { font-size: 2.4em; color: #00a4dc; }
#epgDetalleTexto2 { overflow: hidden; }
#epgDetalleTitulo { font-size: 2em; font-weight: bold; white-space: nowrap; overflow: hidden; }
#epgDetalleHora { font-size: 1.2em; color: #00a4dc; margin: 0.25em 0 0.3em 0; white-space: nowrap; overflow: hidden; }
#epgDetalleTexto { font-size: 1.15em; line-height: 1.35; color: #c8c8c8; height: 2.7em; overflow: hidden; }
#epgCabecera { position: absolute; left: 2em; right: 2em; top: 9.4em; height: 2em; }
.epgDia { position: absolute; left: 0; width: 13em; top: 0; height: 2em; line-height: 2em; font-size: 1em; font-weight: bold; color: #00a4dc; padding-left: 0.4em; box-sizing: border-box; -webkit-box-sizing: border-box; }
.epgHoras { position: absolute; left: 13em; right: 0; top: 0; height: 2em; }
.epgMarca { position: absolute; top: 0; height: 2em; line-height: 2em; font-size: 1.1em; color: #c8c8c8; padding-left: 0.4em; border-left: 0.08em solid #444; }
#epgReloj { display: none; }
#epgFilas { position: absolute; left: 2em; right: 2em; top: 11.6em; bottom: 2.8em; overflow: hidden; }
.epgFila { position: relative; height: 2.85em; margin-bottom: 0.2em; }
.epgCanal { position: absolute; left: 0; top: 0; bottom: 0; width: 12.6em; background: #1c1c1c; padding: 0 0.5em; white-space: nowrap; overflow: hidden; font-size: 1em; line-height: 2.85em; box-sizing: border-box; -webkit-box-sizing: border-box; color: #ddd; }
.epgCanal img { max-width: 3em; max-height: 2.2em; vertical-align: middle; margin-right: 0.5em; }
.epgCanal .n { color: #00a4dc; margin-right: 0.5em; font-weight: bold; }
.epgFila.sel .epgCanal { background: #00a4dc; color: #fff; }
.epgFila.sel .epgCanal .n { color: #fff; }
.epgFila.viendo .epgCanal { border-left: 0.3em solid #00a4dc; }
.epgBloques { position: absolute; left: 13em; right: 0; top: 0; bottom: 0; overflow: hidden; }
.epgBloque { position: absolute; top: 0; bottom: 0; background: #262626; border-right: 0.15em solid #101010; padding: 0.3em 0.5em; overflow: hidden; white-space: nowrap; box-sizing: border-box; -webkit-box-sizing: border-box; }
.epgBloque .ti { font-size: 1.1em; overflow: hidden; }
.epgBloque .ho { font-size: 0.85em; color: #999; margin-top: 0.15em; }
.epgBloque.ahora { background: #303030; }
.epgBloque.catp { border-bottom: 0.25em solid #a066cc; }
.epgBloque.catd { border-bottom: 0.25em solid #4caf50; }
.epgBloque.catn { border-bottom: 0.25em solid #e0a030; }
.epgBloque.cati { border-bottom: 0.25em solid #e05a9a; }
.epgBloque.vacio { color: #777; }
.epgBloque.elegido { background: #00a4dc; color: #fff; }
.epgBloque.elegido .ho { color: #e8f6fb; }
.epgAhora { position: absolute; top: 0; bottom: 0; width: 0.15em; background: #e53935; }
#epgAyuda { position: absolute; left: 2em; right: 2em; bottom: 0.9em; font-size: 1.05em; color: #999; }
#inactivo { position: absolute; left: 50%; top: 30%; width: 34em; margin-left: -17em; background: rgba(10, 20, 35, 0.95); border-top: 0.25em solid #ffd24d; padding: 1.4em; text-align: center; }
#inactivoTitulo { font-size: 2.2em; font-weight: bold; color: #ffd24d; }
#inactivoTexto { font-size: 1.7em; margin: 0.6em 0; }
#inactivoAyuda { font-size: 1.4em; color: #b8c8d8; }
#negro { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #000; }

/* Películas y series (Jellyfin), con los colores de Jellyfin. Todo a 2,5em o más del borde: las teles
   recortan un poco los bordes de la imagen. Rejilla: 6 columnas (6 x 16,6 % caben) y 2 filas que caben en el alto */
#jf { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #101010; color: #fff; }
#jfTitulo { position: absolute; left: 9.5em; top: 1em; right: 6em; font-size: 2em; font-weight: bold; white-space: nowrap; overflow: hidden; }
#jfMenu { position: absolute; left: 2.5em; top: 2em; width: 15em; bottom: 3.6em; overflow: hidden; }
.jfOpcion { font-size: 1.5em; padding: 0.45em 0.6em; margin-bottom: 0.2em; color: #ccc; white-space: nowrap; overflow: hidden; }
.jfOpcion.abierta { color: #00a4dc; }
.jfOpcion.sel { background: #00a4dc; color: #fff; }
#jfRejilla { position: absolute; left: 19em; right: 2.5em; top: 5.2em; bottom: 3.6em; overflow: hidden; }
.jfCaja { float: left; width: 15.2%; margin: 0 1.4% 1em 0; }
.jfPortada { position: relative; height: 10em; background: #262626 center center no-repeat; -webkit-background-size: cover; background-size: cover; border: 0.2em solid transparent; overflow: hidden; }
.jfPortada span { display: block; padding: 0.6em; font-size: 1.1em; color: #ccc; }
.jfCaja.sel .jfPortada { border-color: #00a4dc; }
.jfCaja.sel .jfNombre { color: #00a4dc; }
.jfNombre { font-size: 1em; margin-top: 0.3em; white-space: nowrap; overflow: hidden; color: #ddd; }
.jfVisto { position: absolute; right: 0.3em; top: 0.3em; background: #00a4dc; color: #fff; width: 1.4em; height: 1.4em; line-height: 1.4em; text-align: center; font-weight: bold; }
.jfBarra { position: absolute; left: 0; right: 0; bottom: 0; height: 0.35em; background: rgba(0, 0, 0, 0.6); }
.jfBarra div { height: 0.35em; background: #00a4dc; }
.jfCargando { font-size: 1.6em; color: #999; padding: 2em 0; }
#jfAyuda { position: absolute; left: 2.5em; right: 2.5em; bottom: 1.4em; font-size: 1.05em; color: #999; }
#jfFicha { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #101010; color: #fff; }
#jfFichaPortada { position: absolute; left: 3em; top: 3em; width: 16em; height: 24em; background: #262626 center center no-repeat; -webkit-background-size: cover; background-size: cover; }
#jfFichaInfo { position: absolute; left: 22em; right: 3em; top: 3em; bottom: 4em; overflow: hidden; }
#jfFichaTitulo { font-size: 2.6em; font-weight: bold; }
#jfFichaDatos { font-size: 1.3em; color: #00a4dc; margin: 0.5em 0; }
#jfFichaTexto { font-size: 1.25em; line-height: 1.4; color: #c8c8c8; max-height: 9.8em; overflow: hidden; }
#jfFichaBotones { margin-top: 1.4em; }
#jfFichaBotones .boton.foco { background: #00a4dc; outline: none; }
#jfFichaAyuda { position: absolute; left: 3em; right: 3em; bottom: 1.6em; font-size: 1.05em; color: #999; }
#jfOsd { position: absolute; left: 3em; right: 3em; bottom: 2em; background: rgba(16, 16, 16, 0.9); border-top: 0.25em solid #00a4dc; padding: 1em 1.4em; }
#jfOsdTitulo { font-size: 1.8em; font-weight: bold; white-space: nowrap; overflow: hidden; }
#jfOsdBarra { height: 0.5em; background: #444; margin: 0.6em 0 0.4em 0; }
#jfOsdProgreso { height: 0.5em; width: 0; background: #00a4dc; }
#jfOsdTiempo { font-size: 1.4em; color: #ddd; }
#jfOsdAyuda { font-size: 1em; color: #999; margin-top: 0.3em; }

/* Idioma del audio: abajo a la derecha (joan), a 3em de los bordes que recortan las teles; por encima de la barra */
#audio { position: absolute; z-index: 10; right: 3em; bottom: 3em; width: 26em; background: rgba(10, 20, 35, 0.95); padding: 1em; }
#audioTitulo { font-size: 1.6em; font-weight: bold; color: #ffd24d; margin-bottom: 0.4em; }
#audioFilas .fila { font-size: 1.5em; text-overflow: ellipsis; }
#audioAyuda { margin-top: 0.6em; font-size: 1em; color: #b8c8d8; }

/* Pantalla de inicio (móvil): dos botones grandes, TV en directo y películas y series */
#inicio { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #0a1423; text-align: center; }
#inicioTitulo { font-size: 3em; font-weight: bold; color: #ffd24d; padding-top: 0.8em; }
#inicioBotones { position: absolute; left: 14%; right: 14%; top: 32%; bottom: 22%; }
.inicioBoton { position: absolute; top: 0; bottom: 0; width: 45%; background: #1d3554; border-radius: 1.8em; box-shadow: 0 0.3em 1.2em rgba(0, 0, 0, 0.45); }
.inicioBoton.izquierda { left: 0; }
.inicioBoton.derecha { right: 0; }
.inicioBoton.sel { background: #3d8ee0; }
.inicioTexto { position: absolute; left: 0.5em; right: 0.5em; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); }
.inicioNombre { font-size: 3em; font-weight: bold; }
.inicioDetalle { font-size: 1.6em; color: #b8c8d8; margin-top: 0.4em; }
.inicioBoton.sel .inicioDetalle { color: #fff; }

/* Móvil: biblioteca un 30 % más grande, se desplaza con el dedo y se toca; sin textos de teclas */
.movil #jf, .movil #jfFicha, .movil #jfOsd { font-size: 182%; }
/* Móvil: menú más estrecho para dejar sitio a las portadas */
.movil #jfMenu { left: 0.6em; width: 9em; }
.movil .jfOpcion { font-size: 1.2em; }
.movil #jfRejilla { left: 10.2em; right: 0.8em; top: 3.4em; }
/* Nombre de la serie o temporada: a la altura del menú y encima de la rejilla (el título va a 2em) */
.movil #jfTitulo { left: 5.1em; top: 1em; }
.movil.conTitulo #jfRejilla { top: 5.4em; }
.movil.conLetras #jf #jfRejilla { right: 2.4em; }
/* Barra para pasar rápido (bibliotecas grandes) */
#jfPista { display: none; }
.movil.conLetras #jf #jfPista { display: block; position: absolute; right: 0.5em; top: 3.4em; bottom: 0.6em; width: 1.3em; background: #222; border-radius: 0.6em; }
/* Botón Atrás abajo a la izquierda (móvil) */
.jfVolver { display: none; }
/* Misma flecha que en TV directo (3,64em de la letra normal; la biblioteca va al 182 %) */
.movil .jfVolver { display: block; position: absolute; left: 0.6em; bottom: 0.6em; width: 2em; height: 2em; background: #00a4dc; border-radius: 50%; text-align: center; z-index: 5; }
.movil .jfVolver svg { width: 1.32em; height: 1.32em; fill: #fff; margin-top: 0.34em; }

#jfAsa { position: absolute; left: 0.15em; right: 0.15em; top: 0; height: 10%; background: #00a4dc; border-radius: 0.5em; }
.movil #jfRejilla.desplazable { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.movil #jfMenu { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.movil #jfAyuda, .movil #jfFichaAyuda, .movil #listaAyuda { display: none; }
.movil #jfRejilla { bottom: 1em; }
.movil #jfMenu { bottom: 3em; }
/* Guía en el móvil: todos los canales en una lista que se arrastra; filas más altas para el dedo */
.movil #epgFilas { overflow-y: auto; -webkit-overflow-scrolling: touch; bottom: 0.6em; }
.movil .epgFila { height: 3.6em; margin-bottom: 0.3em; }
.movil .epgCanal { line-height: 3.6em; }
.movil .epgBloque { padding-top: 0.6em; }
.movil #epgAyuda { display: none; }
/* Móvil: con la lista de canales abierta, iconos de audio y subtítulos abajo a la derecha de la pantalla */
#listaIconos { display: none; }
.movil #listaIconos { display: block; position: fixed; right: 1.5em; bottom: 1.5em; z-index: 5; }
#listaIconos .icono { display: inline-block; margin-left: 0.8em; padding: 0.45em 0.9em; background: #00a4dc; color: #fff; border-radius: 0.4em; font-size: 1.2em; line-height: 1.6em; }
#listaIconos .icono svg { width: 1.6em; height: 1.6em; fill: #fff; vertical-align: middle; margin-right: 0.35em; }
#listaIconos .icono span { vertical-align: middle; }
.movil #audioFilas .fila { padding: 0.35em 0; }
.movil #audioAyuda { display: none; }
/* Móvil: flecha Atrás arriba a la derecha (sale con la lista de canales) */
#listaAtras { display: none; }
.movil #listaAtras { display: block; position: fixed; right: 1.5em; top: 1.2em; z-index: 5; width: 3.64em; height: 3.64em; background: #00a4dc; border-radius: 50%; text-align: center; }
.movil #listaAtras svg { width: 2.4em; height: 2.4em; fill: #fff; margin-top: 0.62em; }
/* Móvil: la lista de canales como ventana flotante, algo separada del borde izquierdo */
.movil #lista { left: 5em; top: 2.5em; bottom: 2.5em; border-radius: 1em; box-shadow: 0 0.4em 1.6em rgba(0, 0, 0, 0.6); }
/* Buscador de la biblioteca: arriba, donde va el título, a la altura del menú */
#jfBuscaCaja { position: absolute; left: 19em; right: 2.5em; top: 2em; height: 2.6em; }
#jfBusca { width: 100%; height: 100%; box-sizing: border-box; -webkit-box-sizing: border-box; font-size: 1.4em; padding: 0 0.6em; border: 0.1em solid #444; border-radius: 0.4em; background: #1c1c1c; color: #fff; outline: none; }
#jfBusca:focus { border-color: #00a4dc; }
.movil #jfBuscaCaja { left: 10.2em; right: 0.8em; }
/* Móvil: la banda del canal también flotante, con aire a los lados y esquinas redondeadas */
.movil #banda { left: 7em; right: 7em; bottom: 1.6em; border-top: 0; border-radius: 1em; box-shadow: 0 0.4em 1.6em rgba(0, 0, 0, 0.6); }

/* ===== Estilo unificado y suave (móvil, decos y web) =====
   Un solo azul suave (#5aa6dc) y un ámbar cálido para números y títulos, fondos carbón cálido (no azulados, para que no quede frío), ventanas flotantes con esquinas de 0,8em,
   elementos pequeños con 0,5em, barras redondeadas, sombras suaves y textos secundarios en gris claro.
   Va al final para mandar sobre lo de arriba. Nació en el móvil (joan 2026-11-09) y se extendió a todos. */
body, input { font-family: Roboto, "Segoe UI", -apple-system, Arial, Helvetica, sans-serif; }
/* Ventanas flotantes: el mismo fondo, esquinas y sombra */
#banda, #lista, #audio, #mensaje, #volumen, #numero, #jfOsd, #inactivo {
    background: rgba(28, 27, 30, 0.9); border: 0; border-radius: 0.8em; box-shadow: 0 0.3em 1.4em rgba(0, 0, 0, 0.45); }
.movil #jfOsd { left: 7em; right: 7em; bottom: 1.6em; }
/* Textos: blanco el principal, gris claro el secundario, el azul solo para destacar */
#bandaNumero, .fila .n, #listaTitulo, #audioTitulo, #inactivoTitulo, #inicioTitulo { color: #f0c27a; }
#bandaHora, #bandaDespues, #listaFilas .fila .ahora, .inicioDetalle, #jfOsdTiempo { color: #b9b3ac; }
#bandaCanal { font-weight: 600; }
/* Barras de progreso finas y redondeadas */
#bandaBarra, #jfOsdBarra, #volumenBarra { height: 0.35em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
#bandaProgreso, #jfOsdProgreso, #volumenNivel { height: 0.35em; border-radius: 0.2em; background: #5aa6dc; }
/* Filas elegidas (lista, audio, subtítulos): el azul suave con esquinas */
.fila { border-radius: 0.3em; }
.fila.sel { background: rgba(90, 166, 220, 0.85); }
#listaFilas.desplazable .fila { border-bottom: 0.06em solid rgba(255, 255, 255, 0.07); border-radius: 0; }
/* Botones e iconos: el mismo azul y las mismas esquinas */
#listaIconos .icono { background: rgba(90, 166, 220, 0.92); border-radius: 0.5em; box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.35); }
#listaAtras, .jfVolver { background: rgba(90, 166, 220, 0.92); box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.35); }
.boton { border-radius: 0.5em; background: #2f2e33; }
.boton.foco, #jfFichaBotones .boton.foco { background: #5aa6dc; outline: none; }
/* Pantalla de inicio */
#inicio { background: #161517; }
.inicioBoton { background: #25242a; border-radius: 1em; box-shadow: 0 0.3em 1.2em rgba(0, 0, 0, 0.4); }
.inicioBoton.sel { background: #33506a; }
.inicioBoton.sel .inicioDetalle { color: #f3ede6; }
/* Guía */
#epg { background: #161517; }
#epgLogo, .epgCanal { background: #242327; border-radius: 0.5em; }
#epgLogo span, #epgDetalleHora, .epgDia, .epgCanal .n { color: #f0c27a; }
#epgDetalleTexto, .epgMarca { color: #b9b3ac; }
.epgMarca { border-left-color: rgba(255, 255, 255, 0.12); }
.epgBloque { background: #242327; border-right: 0.2em solid #161517; border-radius: 0.5em; }
.epgBloque.ahora { background: #2e2c31; }
.epgBloque.elegido, .epgFila.sel .epgCanal { background: #4f93c4; }
.epgFila.viendo .epgCanal { border-left: 0; box-shadow: inset 0.25em 0 0 #5aa6dc; }
.epgAhora { width: 0.12em; background: #e06c6c; }
.epgBloque.catp { border-bottom: 0.18em solid #a98bc9; }
.epgBloque.catd { border-bottom: 0.18em solid #7cbf8a; }
.epgBloque.catn { border-bottom: 0.18em solid #d9b36c; }
.epgBloque.cati { border-bottom: 0.18em solid #d48aab; }
/* Biblioteca y ficha */
#jf, #jfFicha { background: #161517; }
.jfOpcion { border-radius: 0.5em; color: #d2ccc5; }
.jfOpcion.abierta { color: #fff; background: rgba(90, 166, 220, 0.22); }
.jfOpcion.sel { background: #5aa6dc; }
.jfPortada { background-color: #242327; border-radius: 0.5em; box-shadow: 0 0.15em 0.6em rgba(0, 0, 0, 0.35); }
.movil .jfPortada { border: 0; }
.jfNombre { color: #d2ccc5; }
.jfVisto { background: #5aa6dc; border-radius: 50%; }
.jfBarra, .jfBarra div { height: 0.25em; }
.jfBarra div { background: #5aa6dc; }
.jfCargando { color: #b9b3ac; }
#jfFichaPortada { border-radius: 0.6em; box-shadow: 0 0.3em 1.2em rgba(0, 0, 0, 0.45); }
#jfFichaDatos { color: #f0c27a; }
#jfFichaTexto { color: #c4beb7; }
#jfBusca { background: #242327; border: 0.08em solid rgba(255, 255, 255, 0.12); border-radius: 0.5em; }
#jfBusca:focus { border-color: #5aa6dc; }
.movil.conLetras #jf #jfPista { background: rgba(255, 255, 255, 0.08); }
#jfAsa { background: #5aa6dc; }
/* Sensación de fluidez: lo que aparece entra con un fundido corto y un poco de desplazamiento,
   los cambios de color son suaves y al tocar hay respuesta inmediata */
@-webkit-keyframes aparece { from { opacity: 0; -webkit-transform: translateY(0.6em); } to { opacity: 1; -webkit-transform: none; } }
@keyframes aparece { from { opacity: 0; transform: translateY(0.6em); } to { opacity: 1; transform: none; } }
@-webkit-keyframes funde { from { opacity: 0; } to { opacity: 1; } }
@keyframes funde { from { opacity: 0; } to { opacity: 1; } }
#banda, #lista, #audio, #mensaje, #volumen, #jfOsd, #listaIconos, #listaAtras {
    -webkit-animation: aparece 0.22s ease-out; animation: aparece 0.22s ease-out; }
#epg, #jf, #jfFicha, #inicio { -webkit-animation: funde 0.25s ease-out; animation: funde 0.25s ease-out; }
* { -webkit-tap-highlight-color: transparent; }
.fila, .jfOpcion, .boton, .epgBloque, .epgCanal, .inicioBoton, .icono, .jfPortada {
    -webkit-transition: background-color 0.18s ease, opacity 0.15s ease, -webkit-transform 0.15s ease; transition: background-color 0.18s ease, opacity 0.15s ease, transform 0.15s ease; }
.fila:active, .jfOpcion:active, .boton:active, .epgBloque:active, .epgCanal:active, .icono:active, #listaAtras:active, .jfVolver:active { opacity: 0.75; }
.inicioBoton:active, .jfCaja:active .jfPortada { -webkit-transform: scale(0.97); transform: scale(0.97); }
#bandaProgreso, #jfOsdProgreso { -webkit-transition: width 0.6s ease; transition: width 0.6s ease; }
.fila.sel .n, #listaFilas .fila.sel .ahora { color: #fff; }

.jfCaja.sel .jfPortada { border-color: #5aa6dc; }
.jfCaja.sel .jfNombre { color: #5aa6dc; }
/* Móvil, ficha: el botón siempre entero abajo; si la descripción no cabe, se desliza con el dedo */
.movil #jfFichaInfo { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-orient: vertical; -webkit-flex-direction: column; flex-direction: column; top: 2em; bottom: 1.2em; }
.movil #jfFichaTitulo, .movil #jfFichaDatos, .movil #jfFichaBotones { -webkit-flex: none; flex: none; }
.movil #jfFichaTexto { -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.movil #jfFichaBotones { margin-top: 0.7em; }
.movil #jfFichaBotones .boton { margin-top: 0; }
.movil #jfFichaPortada { top: 2em; height: auto; bottom: 1.2em; max-height: 24em; }
/* Móvil, ficha: botones uno al lado del otro y más compactos (más sitio para la descripción) */
.movil #jfFichaBotones { white-space: nowrap; }
.movil #jfFichaBotones .boton { font-size: 1.25em; padding: 0.45em 1.6em; margin-right: 0.5em; }

/* Catch-up: programas ya emitidos en la guía (se pueden ver) y la pregunta del que se está echando */
.epgBloque.pasado:not(.elegido) { background: #1d1c20; color: #b9b9b9; }
.epgBloque.pasado:not(.elegido) .ti:before { content: "\21BA  "; color: #4f93c4; }
#cuMenu { position: absolute; z-index: 11; left: 50%; top: 32%; width: 34em; margin-left: -17em; background: rgba(20, 20, 24, 0.96); border-top: 0.25em solid #4f93c4; border-radius: 0.6em; padding: 1.2em 1.4em; text-align: center; }
#cuMenuTitulo { font-size: 1.7em; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cuMenuHora { font-size: 1.15em; color: #bbb; margin: 0.3em 0 0.9em 0; }
#cuMenuBotones { white-space: nowrap; }
.cuBoton { display: inline-block; font-size: 1.4em; padding: 0.5em 1.1em; margin: 0 0.4em; background: #2e2c31; border-radius: 0.4em; }
.cuBoton.sel { background: #4f93c4; color: #fff; }
#cuMenuAyuda { font-size: 1em; color: #999; margin-top: 0.9em; }
.movil #cuMenu { font-size: 160%; width: 22em; margin-left: -11em; }
.movil #cuMenuAyuda { display: none; }
/* Decos (MAG y Android TV con mando): sin efectos que su navegador pinta mal o despacio. Con sombra y
   transición en las portadas el MAG las dejaba en negro hasta elegirlas (joan 2026-11-10) */
.familia-deco * { -webkit-transition: none !important; transition: none !important; -webkit-animation: none !important; animation: none !important; }
.familia-deco #banda, .familia-deco #lista, .familia-deco #audio, .familia-deco #mensaje, .familia-deco #volumen, .familia-deco #numero, .familia-deco #jfOsd, .familia-deco #inactivo,
.familia-deco .jfPortada, .familia-deco #jfFichaPortada, .familia-deco .inicioBoton { box-shadow: none; }
/* Portada elegida un poco más grande, por encima de las de al lado */
.familia-deco .jfCaja { position: relative; }
.familia-deco .jfCaja.sel { z-index: 2; }
/* Todas las portadas con transformación (como la elegida, que era la única que el MAG pintaba) y sin
   esquinas redondeadas; las demás un poco más pequeñas para que la elegida destaque */
.familia-deco .jfPortada { border-radius: 0; -webkit-transform: scale(0.94); transform: scale(0.94); }
.familia-deco .jfCaja.sel .jfPortada { -webkit-transform: scale(1.04); transform: scale(1.04); }
.familia-deco .jfCaja.sel .jfNombre { position: relative; top: 0.4em; }
/* Hueco para que la portada agrandada de la primera fila y columna no se corte */
.familia-deco #jfRejilla { padding: 0.6em 0 0 0.6em; }
/* Biblioteca con mando (deco y web): el menú empieza a la altura de las portadas y más aire entre filas */
body:not(.movil) #jfMenu { top: 5.2em; }
.familia-deco #jfMenu { top: 5.8em; }
body:not(.movil) .jfCaja { margin-bottom: 2.2em; }
.conFicha #jfRejilla { visibility: hidden; }
.jfOpcion.separada { margin-top: 2em; }
