/**
 * PWA de la emisora: BASE comun a todos los disenos.
 *
 * Esta hoja la carga SIEMPRE station.php, y detras carga `diseno-<nombre>.css`
 * con el aspecto elegido por el cliente.
 *
 * -----------------------------------------------------------------------------
 * Que va aqui y que va en un diseno
 * -----------------------------------------------------------------------------
 * Aqui: lo que no es una decision de estilo. Reordenar el marcado que produce
 * el motor de audio, esconder sus menus, los iconos de play y pausa, las zonas
 * seguras del telefono, el comportamiento sin conexion. Un arreglo en esto
 * tiene que llegar a las seis plantillas a la vez, y por eso vive en un solo
 * sitio.
 *
 * En el diseno: tamanos, formas, colores, colocacion. Lo que una plantilla
 * querria cambiar.
 *
 * -----------------------------------------------------------------------------
 * Las reglas del diseno NO llevan prefijo
 * -----------------------------------------------------------------------------
 * Como solo se carga una hoja de diseno, sus selectores son iguales a los de
 * aqui y ganan por ir despues. Eso es deliberado: antes cada plantilla tenia
 * que escribir `.st[data-plantilla="x"] .foo` para superar a `.st .foo`, y
 * cada excepcion nueva necesitaba un selector mas largo que la anterior.
 *
 * El atributo `data-plantilla` sigue estando en el <body>, pero ya solo sirve
 * para saber desde JavaScript o desde fuera que diseno se esta viendo.
 */

:root {
  --radio: 20px;
  --radio-chico: 12px;
  --tarjeta: rgba(var(--capa-rgb), .62);
  --suave: rgba(var(--texto-capa-rgb), .68);
  --linea: rgba(var(--texto-capa-rgb), .14);
  --nav-alto: 64px;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
  color-scheme: dark light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(64px + var(--seguro-arriba));
  -webkit-text-size-adjust: 100%;
  background: var(--fondo);

  /* Desactiva el «tirar hacia abajo para recargar» de Chrome en el movil.
   *
   * TIENE QUE IR AQUI, en el elemento raiz, y esa es toda la historia: al
   * contrario que `overflow`, el valor de `overscroll-behavior` puesto en el
   * <body> NO se propaga al area de desplazamiento de la ventana. La regla que
   * hay mas abajo en `body.st` estaba escrita y no servia de nada; se deja
   * porque si algun dia el que desplaza pasa a ser el body, entonces si contara.
   *
   * Solo el eje Y: tocar el eje X afectaria al carrusel de banners y al gesto
   * de volver atras del navegador, que no tienen nada que ver con esto.
   *
   * En una app instalada, recargar de un manotazo mientras suena la radio corta
   * el audio. No es un gesto util aqui: no hay nada que refrescar que no se
   * refresque solo. */
  overscroll-behavior-y: none;
}

body.st {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  color: var(--texto);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;

  /* Ver la nota en `html`: la que desactiva el tiron de recarga es aquella,
     no esta. */
  overscroll-behavior-y: none;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.i {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }

.st-fondo,
.st-velo {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.st-fondo {
  background: var(--fondo) center top / cover no-repeat;
}
.st-velo {
  background: linear-gradient(
    to bottom,
    rgba(var(--fondo-rgb), .25) 0%,
    rgba(var(--fondo-rgb), .10) 28%,
    rgba(var(--fondo-rgb), .55) 65%,
    rgba(var(--fondo-rgb), .82) 100%
  );
}
.st-fondo-claro .st-velo {
  background: linear-gradient(
    to bottom,
    rgba(var(--fondo-rgb), .62) 0%,
    rgba(var(--fondo-rgb), .50) 28%,
    rgba(var(--fondo-rgb), .75) 65%,
    rgba(var(--fondo-rgb), .90) 100%
  );
}
.st-fondo-claro .st-reproductor { background: rgba(var(--capa-rgb), .5); }

@media (min-width: 960px) {
  .st-fondo { inset: -40px; filter: blur(14px); }
  .st-velo { background: rgba(var(--fondo-rgb), .55); }
}

.st-barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--seguro-arriba)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: linear-gradient(rgba(var(--capa-rgb), .55), rgba(var(--capa-rgb), 0));
  color: var(--texto-capa);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.st-barra.st-barra--solida {
  background: rgba(var(--capa-rgb), .78);
  border-bottom-color: var(--linea);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
          backdrop-filter: blur(16px) saturate(1.2);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .st-barra.st-barra--solida { background: rgba(var(--capa-rgb), .94); }
}
.st-barra__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--fondo);
  box-shadow: 0 0 0 2px rgba(var(--texto-capa-rgb), .35);
}
.st-barra__nombre { text-shadow: 0 1px 8px rgba(var(--capa-rgb), .5); }
.st-barra__nombre {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-boton-icono {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.st-boton-icono:active { background: var(--linea); }

.st-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--texto-capa);
  color: var(--fondo);
  font-weight: 700;
  cursor: pointer;
}
.st-boton-texto {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--linea);
  border-radius: var(--radio-chico);
  background: transparent;
  color: var(--texto-capa);
  font-weight: 600;
  cursor: pointer;
}

/* --- Contenido ------------------------------------------------------------- */
.st-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--nav-alto) + 24px + var(--seguro-abajo)) max(16px, env(safe-area-inset-left));
}

.st-tarjeta {
  padding: 18px;
  border-radius: var(--radio);
  background: var(--tarjeta);
  color: var(--texto-capa);
  border: 1px solid var(--linea);
}

.st-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}
.st-titulo .i { width: 20px; height: 20px; opacity: .8; }

.st-lista { list-style: none; margin: 0; padding: 0; }
.st-vacio { margin: 8px 0; color: var(--suave); }

/* --- Reproductor -----------------------------------------------------------
 *
 * Lo de aqui abajo tiene DOS naturalezas y conviene distinguirlas al tocarlo:
 *
 *   - Estructura: que el marcado del motor se reordene en una rejilla, que sus
 *     menus se escondan, que los iconos de play y pausa sean mascaras. Sin eso
 *     no hay reproductor, lo diseñe quien lo diseñe.
 *
 *   - Forma: que la caratula sea cuadrada, centrada y de 300 px; que el boton
 *     mida 76. Eso es una decision de la CLASICA que estaba escrita como si
 *     fuera una ley.
 *
 * La segunda sale por variables, con los valores de la clasica por defecto. Un
 * diseño cambia el valor y no tiene que saber contra que pelea:
 *
 *     .st .EjeServerPlayer .cover { --arte-proporcion: auto; }
 */
.st-reproductor {
  padding: 16px 18px 20px;
  background: rgba(var(--capa-rgb), .38);
  border-color: rgba(var(--texto-capa-rgb), .2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
          backdrop-filter: blur(22px) saturate(1.3);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .st-reproductor { background: var(--tarjeta); }
}

.st-envivo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.st-envivo__punto {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff3b30;
}

.st-envivo__punto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ff3b30;
  opacity: 0;
}
.st-reproductor.sonando .st-envivo__punto::after {
  animation: st-latido 1.8s ease-out infinite;
}
.st-envivo__programa {
  margin-left: auto;
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  font-size: .8rem;
  color: var(--suave);
}
@keyframes st-latido {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .st-reproductor.sonando .st-envivo__punto::after { animation: none; }
  html { scroll-behavior: auto; }
}

.st .EjeServerPlayer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "arte  arte  arte"
    "tit   tit   tit"
    "sub   sub   sub"
    "mute  power extra"
    "vol   vol   vol";
  align-items: center;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: visible;
  text-align: center;
  font: inherit;
}

.st .EjeServerPlayer .radio-logo,
.st .EjeServerPlayer .cover {
  grid-area: arte;

  /* La forma de la caja, en variables. Ver la cabecera de esta seccion.
   * `--arte-proporcion: auto` es lo que permite una caratula apaisada o a
   * pantalla completa; sin ella, cualquier intento de estirarla la devolvia a
   * cuadrada sin decir por que. */
  justify-self: var(--arte-alineacion, center);
  width: var(--arte-ancho, min(100%, 300px));
  aspect-ratio: var(--arte-proporcion, 1);
  border-radius: var(--arte-radio, 18px);

  background-position: center;
  background-repeat: no-repeat;
}
.st .EjeServerPlayer .radio-logo {
  /* `contain` y no `cover`: el logo de reserva se ve entero. La caratula de un
   * tema si se recorta, porque ahi lo que importa es llenar la caja. */
  background-size: var(--arte-ajuste-logo, contain);
  background-color: rgba(var(--texto-capa-rgb), .06);
  box-shadow: var(--arte-sombra, 0 18px 40px rgba(0, 0, 0, .35));
}

.st .EjeServerPlayer .cover {
  position: relative;
  z-index: 1;
  background-size: var(--arte-ajuste, cover);
  box-shadow: var(--arte-sombra, none);
  pointer-events: none;
}

.st .EjeServerPlayer .title,
.st .EjeServerPlayer .subtitle {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-transform: none;
}
.st .EjeServerPlayer .title {
  grid-area: tit;
  margin-top: 18px;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
}
.st .EjeServerPlayer .subtitle {
  grid-area: sub;
  min-height: 1.4em;
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--suave);
}

.st .EjeServerPlayer .power-button {
  grid-area: power;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--play-medida, 76px);
  height: var(--play-medida, 76px);
  margin: var(--play-margen, 16px 0 10px);
  border-radius: 50%;
  background: var(--texto-capa);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .15s ease;
}
.st .EjeServerPlayer .power-button:active { transform: scale(.94); }
.st .EjeServerPlayer .power-button::before {
  content: "";
  /* El icono, proporcional al boton: asi un diseño cambia una sola medida y el
   * dibujo de dentro le sigue. 34 de 76 es el 45 %. */
  width: calc(var(--play-medida, 76px) * .45);
  height: calc(var(--play-medida, 76px) * .45);
  background: var(--fondo);
  -webkit-mask: var(--m-play) center / contain no-repeat;
          mask: var(--m-play) center / contain no-repeat;
}
.st .EjeServerPlayer .power-button.on::before {
  -webkit-mask-image: var(--m-pausa);
          mask-image: var(--m-pausa);
}

.st .EjeServerPlayer .mute-button {
  grid-area: mute;
  justify-self: end;
  position: static;
  width: 44px;
  height: 44px;
  margin-right: 20px;
  background: var(--texto-capa);
  opacity: .8;
  cursor: pointer;
  -webkit-mask: var(--m-volumen) center / 26px no-repeat;
          mask: var(--m-volumen) center / 26px no-repeat;
}
.st .EjeServerPlayer .mute-button.on {
  -webkit-mask-image: var(--m-silencio);
          mask-image: var(--m-silencio);
}

.st .EjeServerPlayer .volume {
  grid-area: vol;
  position: relative;
  justify-self: center;
  width: min(100%, 280px);
  height: 24px;
  margin: 4px 0 0;
  left: auto;
  top: auto;
  background: linear-gradient(rgba(var(--texto-capa-rgb), .22), rgba(var(--texto-capa-rgb), .22)) center / 100% 4px no-repeat;
  border-radius: 999px;
  cursor: pointer;
}
.st .EjeServerPlayer .slider {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: 100%;
  background: linear-gradient(var(--texto-capa), var(--texto-capa)) center / 100% 4px no-repeat;
}
.st .EjeServerPlayer .slider::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--texto-capa);
}

.st .EjeServerPlayer .menuButton,
.st .EjeServerPlayer .overlay,
.st .EjeServerPlayer [class="mute-button.on"],
.st .EjeServerPlayer [class="power-button.on"],
.st .EjeServerPlayer .embed,
.st .EjeServerPlayer .popup { display: none !important; }

.st .EjeServerPlayer > :not(.radio-logo):not(.cover):not(.title):not(.subtitle):not(.mute-button):not(.power-button):not(.volume):not(.menuButton):not(.overlay):not(.cast-launcher-wrap) {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden;
}

.st {
  --m-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.14v13.72a1 1 0 0 0 1.52.85l10.6-6.86a1 1 0 0 0 0-1.7L9.52 4.29A1 1 0 0 0 8 5.14z'/%3E%3C/svg%3E");
  --m-pausa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='4' width='4.5' height='16' rx='1.2'/%3E%3Crect x='13.5' y='4' width='4.5' height='16' rx='1.2'/%3E%3C/svg%3E");
  --m-volumen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z' fill='%23000'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E");
  --m-silencio: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z' fill='%23000'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E");
}

/* --- Banners --------------------------------------------------------------- */
.st-banners { margin: 0 -2px; }
.st-banners__pista {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radio-chico);
}
.st-banners__pista::-webkit-scrollbar { display: none; }
.st-banners__item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: var(--radio-chico);
  overflow: hidden;
  background: var(--tarjeta);
}
.st-banners__item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}
.st-banners__puntos {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.st-banners__puntos span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--texto);
  opacity: .35;
  transition: opacity .2s, width .2s;
}
.st-banners__puntos span.activo { width: 16px; border-radius: 3px; opacity: .9; }

/* --- Canciones recientes --------------------------------------------------- */
.st-cancion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--linea);
}
.st-cancion:first-child { border-top: 0; padding-top: 0; }
.st-cancion__arte {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(var(--texto-capa-rgb), .1) center / cover no-repeat;
}
.st-cancion__arte .i { width: 20px; height: 20px; opacity: .6; }
.st-cancion__texto, .st-top__texto, .st-persona__datos {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.st-cancion__titulo, .st-top__cancion {
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.st-cancion__artista, .st-top__artista {
  font-size: .88rem;
  color: var(--suave);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* --- Top ------------------------------------------------------------------- */
.st-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--linea);
}
.st-top:first-child { border-top: 0; padding-top: 0; }
.st-top__puesto {
  width: 32px;
  flex: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--suave);
}
.st-top--podio .st-top__puesto {
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: var(--texto-capa);
  color: var(--fondo);
  font-size: .95rem;
}

/* --- Programacion ---------------------------------------------------------- */
.st-dias {
  display: flex;
  gap: 8px;
  margin: 0 -18px 12px;
  padding: 0 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.st-dias::-webkit-scrollbar { display: none; }
.st-dia {
  flex: none;
  min-width: 52px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.st-dia[aria-selected="true"] {
  background: var(--texto-capa);
  border-color: var(--texto-capa);
  color: var(--fondo);
}
.st-dia.hoy:not([aria-selected="true"]) { border-color: var(--texto-capa); }

.st-programa {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--linea);
}
.st-programa:first-child { border-top: 0; padding-top: 4px; }
.st-programa__hora {
  display: flex;
  flex-direction: column;
  width: 52px;
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.st-programa__hora small { font-weight: 400; color: var(--suave); }
.st-programa__nombre { flex: 1; min-width: 0; font-weight: 600; }
.st-programa__aire {
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.st-programa.al-aire .st-programa__aire { display: inline-block; }
.st-programa.al-aire .st-programa__nombre { font-weight: 800; }

/* --- Equipo ---------------------------------------------------------------- */
.st-persona { border-top: 1px solid var(--linea); }
.st-persona:first-child { border-top: 0; }
.st-persona__fila {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  list-style: none;
  cursor: default;
}
details > .st-persona__fila { cursor: pointer; }
.st-persona__fila::-webkit-details-marker { display: none; }
.st-persona__foto {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--linea);
}
.st-persona__datos { flex: 1; }
.st-persona__nombre { font-weight: 700; }
.st-persona__cargo { font-size: .9rem; color: var(--suave); }
.st-persona__flecha { transition: transform .2s; opacity: .7; }
details[open] .st-persona__flecha { transform: rotate(180deg); }
.st-persona__descripcion { margin: 0 0 14px 78px; color: var(--suave); }

/* --- Redes ----------------------------------------------------------------- */
.st-redes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 14px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.st-red {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
}
.st-red__circulo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--texto-capa);
  color: var(--fondo);
}
.st-red:active .st-red__circulo { transform: scale(.94); }

/* --- Apps ------------------------------------------------------------------ */
.st-apps__instalar {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--linea);
}
.st-apps__instalar p, .st-apps__texto { margin: 0; color: var(--suave); }
.st-apps__codigo {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 8px;
  background: rgba(var(--texto-capa-rgb), .12);
  color: var(--texto-capa);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.st-apps__tiendas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.st-apps__tiendas img { display: block; height: 44px; width: auto; }

.st-pie {
  padding: 8px 0 0;
  text-shadow: 0 1px 6px rgba(var(--fondo-rgb), .8);
  text-align: center;
  font-size: .78rem;
  color: rgba(var(--texto-rgb), .6);
}

/* --- Navegacion inferior --------------------------------------------------- */
.st-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + var(--seguro-abajo)) max(8px, env(safe-area-inset-left));
  background: rgba(var(--capa-rgb), .94);
  color: var(--texto-capa);
  border-top: 1px solid var(--linea);
}
.st-nav__item {
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 14px;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  opacity: .62;
}
.st-nav__item.activo { opacity: 1; }
.st-nav__item.activo .i { stroke-width: 2.5; }

/* --- Hoja de instrucciones (iOS) y aviso ---------------------------------- */
.st-hoja {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
}
.st-hoja__caja {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 22px 22px calc(26px + var(--seguro-abajo));
  border-radius: 22px 22px 0 0;
  background: rgb(var(--capa-rgb));
  color: var(--texto-capa);
}
.st-hoja__caja h2 { margin: 0 0 12px; font-size: 1.15rem; }
.st-hoja__caja ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.st-hoja__caja .i { width: 20px; height: 20px; vertical-align: -4px; }
.st-hoja__cerrar { position: absolute; top: 14px; right: 14px; }

/* --- Ajuste dentro del reproductor ----------------------------------------- */
.st-ajuste {
  display: flex;
  align-items: center;
  gap: 10px;
  /* El relleno vertical no se ve, pero lleva la fila de 24 a 44 px, que es lo
     que necesita un dedo. El margen de arriba se recorta en la misma medida
     para que la separacion con el reproductor no cambie. */
  margin: 4px 2px 0;
  padding: 10px 0;
  font-size: .82rem;
  color: var(--suave);
  cursor: pointer;
}

/* La casilla del sistema no se puede pintar, y en el movil sale diminuta al
   lado del resto de controles. Se esconde y se dibuja una pista con el propio
   <span>, que sigue siendo la etiqueta del campo: el <label> envuelve a los
   dos, asi que tocar el texto tambien cambia el valor. */
.st-ajuste input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.st-ajuste span { position: relative; padding-left: 44px; line-height: 24px; }
.st-ajuste span::before,
.st-ajuste span::after {
  content: "";
  position: absolute;
  transition: background .18s ease, transform .18s ease;
}
.st-ajuste span::before {
  left: 0;
  top: 2px;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(var(--texto-capa-rgb), .22);
}
.st-ajuste span::after {
  left: 3px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--texto-capa);
}
.st-ajuste input:checked + span::before { background: var(--texto-capa); }
.st-ajuste input:checked + span::after {
  background: rgb(var(--capa-rgb));
  transform: translateX(14px);
}
.st-ajuste input:focus-visible + span::before {
  outline: 2px solid var(--texto-capa);
  outline-offset: 3px;
}

/* --- Temporizador de apagado ---------------------------------------------- */
.st-dormir { position: relative; }

/* El numero de minutos que quedan, dentro del propio boton. Se pone ahi y no
   en un texto aparte porque en la barra no sobra sitio, y porque el oyente
   solo necesita confirmar de un vistazo que sigue puesto. */
.st-dormir__resto {
  position: absolute;
  right: 0;
  bottom: 2px;
  min-width: 19px;
  padding: 0 3px;
  border-radius: 10px;
  background: var(--texto-capa);
  color: rgb(var(--capa-rgb));
  font-size: .64rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
.st-dormir.activo .i { opacity: 1; }

.st-hoja__pie { margin: 0; font-size: .92rem; opacity: .78; }

.st-hoja__opciones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.st-hoja__opciones button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(var(--texto-capa-rgb), .13);
  color: var(--texto-capa);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.st-hoja__opciones button:active { background: rgba(var(--texto-capa-rgb), .26); }
.st-hoja__opciones button.activo {
  background: var(--texto-capa);
  color: rgb(var(--capa-rgb));
}
.st-hoja__cancelar { width: 100%; margin-top: 14px; }

.st-aviso {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-alto) + 16px + var(--seguro-abajo));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(var(--texto-capa-rgb));
  color: rgb(var(--capa-rgb));
  font-size: .9rem;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.st-aviso .i { width: 18px; height: 18px; }

@media (display-mode: standalone) {
  #stInstalar, #stInstalarTarjeta { display: none !important; }
}

/* --- Pantalla ancha: reproductor fijo a la izquierda, contenido a la derecha */
@media (min-width: 960px) {
  .st-main {
    max-width: 1080px;
    grid-template-columns: 400px minmax(0, 1fr);
    align-items: start;
    gap: 0 24px;
    padding-bottom: 32px;
  }
  .st-main > * { grid-column: 2; margin-bottom: 16px; }
  .st-main > .st-reproductor {
    grid-column: 1;
    grid-row: 1 / span 20;
    position: sticky;
    top: 84px;
  }
  .st-nav { display: none; }
  .st-aviso { bottom: 24px; }

  /*
     Con television, la columna del reproductor manda.

     Los 400px de arriba estan pensados para la radio: la caratula mide 300 y
     el resto de la tarjeta se ordena a su alrededor, asi que ensancharla solo
     anadiria aire alrededor de lo mismo. Un video de 400px en un monitor, en
     cambio, es una miniatura: ahi el ancho SI es el tamano de la imagen.

     Crece con la pantalla hasta topar con el primero de estos tres limites:

       - 860px, donde el video ya llena su parte de un monitor y seguir
         creciendo convertiria la columna de la derecha en un margen;
       - 56vw, el reparto con esa otra columna, que tiene que seguir siendo una
         columna de lectura y no una tira;
       - el alto de la ventana. La tarjeta va pegada arriba (sticky), asi que
         una mas alta que la pantalla deja el pie del video fuera de vista y
         sin forma de bajar a verlo: al quedarse pegada, no se mueve. Los 300px
         que se descuentan son lo que ocupa la tarjeta aparte del video
         (cabecera «En vivo», selector Radio|TV, nombre y relleno), y el 1.78
         es 16/9, que pasa de ese alto libre al ancho de video que cabe en el.

     Y nunca por debajo de los 400px de la radio: una ventana ancha pero baja
     no debe acabar con un video mas pequeno que el de una cuenta de solo
     audio.
  */
  .st-main--tv {
    max-width: 1500px;
    grid-template-columns:
      max(400px, min(860px, 56vw, calc((100vh - 300px) * 1.78))) minmax(0, 1fr);
  }
}

/* --- Google Cast ---------------------------------------------------------- */
.st google-cast-launcher {
  --disconnected-color: var(--texto-capa);
  --connected-color: var(--texto-capa);
  display: block;
  width: 26px;
  height: 26px;
  cursor: pointer;
}
.st .EjeServerPlayer .cast-launcher-wrap {
  grid-area: extra;
  justify-self: start;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 20px;
  opacity: .85;
}

/* --- Television: selector Radio | TV y panel de video --------------------- */
.st-modos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(var(--texto-capa-rgb), .1);
}
.st-modo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--texto-capa);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.st-modo .i { width: 18px; height: 18px; }
.st-modo[aria-selected="true"] {
  background: var(--texto-capa);
  color: var(--fondo);
}

.st-tv { text-align: center; }
.st-tv__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.st-tv__logo {
  display: block;
  width: min(60%, 220px);
  margin: 12px auto 0;
  aspect-ratio: 1;
  object-fit: contain;
}
.st-tv__marco { position: relative; }
.st-tv__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: rgba(0, 0, 0, .25);
  cursor: pointer;
}
.st-tv__play span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--texto-capa);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.st-tv__play span::before {
  content: "";
  width: 34px;
  height: 34px;
  margin-left: 4px;
  background: var(--fondo);
  -webkit-mask: var(--m-play) center / contain no-repeat;
          mask: var(--m-play) center / contain no-repeat;
}
.st-tv__play:active span { transform: scale(.94); }
.st-tv__play:disabled span { opacity: .6; }
.st-tv__transmitiendo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
.st-tv__transmitiendo .i { width: 40px; height: 40px; }
.st-tv__pie {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 44px;
}
.st-tv__cast {
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -14px;
}
.st-tv__nombre {
  margin: 16px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* El giro solo mientras suena, y solo la caratula: el logo de reserva no es
   un disco y girandolo se lee como un error. 12 s por vuelta, que a 33 rpm
   reales marearia. */
@keyframes st-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .st[data-plantilla="vinilo"] .st-reproductor.sonando .EjeServerPlayer .cover {
    animation: none;
  }
}

.st-tv__aviso {
  margin: 8px 0 0;
  color: var(--suave);
}