/* App de Radio 2Contact (/escuchar/). Mismos colores que el sitio: fondo casi negro, verde #52ff1e. */
:root {
  --fondo: #0b0d0c;
  --tarjeta: rgba(255, 255, 255, .06);
  --texto: #fcfffd;
  --suave: #c5cec7;
  --tenue: #8a948c;
  --verde: #52ff1e;
  --rojo: #ff3b3b;
  --letra: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--fondo); color: var(--texto); font-family: var(--letra); }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fondo {
  position: fixed; inset: -40px; z-index: 0;
  background: var(--fondo) center / cover no-repeat;
  filter: blur(40px) brightness(.35) saturate(1.2);
  transition: background-image .6s;
}
.app {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  max-width: 480px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 20px;
}

.barra { display: flex; align-items: center; gap: 10px; }
.barra-logo { border-radius: 8px; background: #000; }
.barra-nombre { font-weight: 700; letter-spacing: .3px; flex: 1; }
.estado-aire {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--suave); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 6px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.estado-aire[data-vivo="true"] { color: #fff; background: var(--rojo); border-color: var(--rojo); }
.estado-aire[data-vivo="true"]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none;
  animation: latido 1.4s ease-in-out infinite;
}
@keyframes latido { 50% { opacity: .3; } }

.ahora { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.portada {
  width: min(100%, 320px); height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 18px; background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); margin-bottom: 12px;
}
.titulo { font-size: clamp(20px, 5.5vw, 26px); line-height: 1.2; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.artista { margin: 0; color: var(--suave); font-size: 16px; overflow-wrap: anywhere; }

.controles { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fila-controles { display: flex; align-items: center; gap: 28px; }
.boton-salto {
  width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--texto); background: transparent; color: var(--texto);
  cursor: pointer; display: grid; place-items: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.boton-salto[hidden] { display: grid; visibility: hidden; }  /* guarda su lugar: el botón grande no se mueve */
.boton-salto:active { opacity: .6; }
.boton-salto:disabled { opacity: .3; cursor: default; }
.boton-salto:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }
.boton-play {
  position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--verde); color: #08120a; display: grid; place-items: center;
  box-shadow: 0 0 34px rgba(82, 255, 30, .35); transition: transform .15s;
}
.boton-play:active { transform: scale(.94); }
.boton-play:focus-visible { outline: 3px solid var(--texto); outline-offset: 4px; }
.boton-play svg { width: 40px; height: 40px; fill: currentColor; grid-area: 1 / 1; }
.boton-play .i-pausa { display: none; }
.boton-play[data-estado="sonando"] .i-play,
.boton-play[data-estado="cargando"] .i-play { display: none; }
.boton-play[data-estado="sonando"] .i-pausa,
.boton-play[data-estado="cargando"] .i-pausa { display: block; }
.giro {
  position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--verde);
  opacity: 0; animation: giro 1s linear infinite;
}
.boton-play[data-estado="cargando"] .giro { opacity: 1; }
@keyframes giro { to { transform: rotate(360deg); } }
.aviso { margin: 0; min-height: 1.4em; color: var(--suave); font-size: 14px; text-align: center; }
.posicion { align-self: stretch; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.posicion[hidden] { display: none; }
.pista { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); cursor: pointer; touch-action: none; }
.pista::before { content: ""; position: absolute; inset: -14px 0; }  /* área de toque más alta que la línea */
.pista:focus-visible { outline: 2px solid var(--texto); outline-offset: 6px; }
.pista-llena { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 3px; background: var(--verde); }
.perilla { position: absolute; top: 50%; left: 100%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--texto); }
.etiquetas { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.etiqueta { color: var(--suave); font-size: 12px; font-variant-numeric: tabular-nums; }
.tiempo-real, .boton-vivo {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #fff;
}
.tiempo-real { background: var(--rojo); }
.tiempo-real::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.tiempo-real[hidden], .boton-vivo[hidden], .pista[hidden], .etiqueta[hidden] { display: none; }
.etiqueta[hidden] + .tiempo-real[hidden] + .boton-vivo { margin: 0 auto; }
.boton-vivo { border: 1px solid var(--rojo); background: transparent; cursor: pointer; font-family: inherit; }
.extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.extra {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .18); background: transparent;
  color: var(--suave); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.extra svg { width: 18px; height: 18px; fill: currentColor; }
.extra[aria-expanded="true"] { color: var(--verde); border-color: var(--verde); }
.extra[hidden] { display: none; }
.extra:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }
.historial { align-self: stretch; background: var(--tarjeta); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px; }
.historial[hidden] { display: none; }
.historial h2 { margin: 0 4px 8px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--verde); }
.historial ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.historial li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; min-width: 0; }
.historial li:first-child { background: rgba(82, 255, 30, .07); }
.historial .h-hora { width: 44px; flex: none; font-size: 12px; color: var(--suave); font-variant-numeric: tabular-nums; }
.historial li:first-child .h-hora { color: var(--verde); font-weight: 800; }
.historial img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: #000; }
.historial .h-texto { min-width: 0; display: flex; flex-direction: column; text-align: left; }
.historial .h-titulo { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.historial .h-artista { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ahora-real { margin: 0; color: var(--suave); font-size: 13px; opacity: .8; }
.volumen { display: flex; align-items: center; gap: 8px; width: 220px; color: var(--suave); }
.volumen svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.volumen input { width: 100%; accent-color: var(--verde); }
@media (hover: none) and (pointer: coarse) { .volumen { display: none; } }  /* en el teléfono manda el volumen del aparato */

.chat-tarjeta {
  display: flex; align-items: center; gap: 12px;
  background: var(--tarjeta); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 14px 16px;
}
.chat-textos { flex: 1; min-width: 0; }
.chat-tarjeta h2 { margin: 0 0 4px; font-size: 15px; }
.chat-tarjeta p { margin: 0; color: var(--suave); font-size: 14px; line-height: 1.5; }
.chat-boton { border: 0; background: transparent; color: var(--verde); font-weight: 800; letter-spacing: 1px; font-size: 13px; cursor: pointer; font-family: inherit; }
.chat-boton:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }

.testers {
  position: relative;
  background: var(--tarjeta); border: 1px solid rgba(82, 255, 30, .35); border-radius: 14px; padding: 14px 40px 14px 16px;
}
.testers h2 { margin: 0 0 6px; font-size: 15px; line-height: 1.4; }
.testers p { margin: 0 0 8px; color: var(--suave); font-size: 14px; line-height: 1.5; }
.testers ol { margin: 0; padding-left: 20px; color: var(--suave); font-size: 14px; line-height: 1.6; }
.testers a { color: var(--verde); font-weight: 700; }
.testers a:focus-visible, .testers-cerrar:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
.testers-cerrar {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--tenue); font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit;
}

.volver-sitio { align-self: flex-start; margin-bottom: -8px; color: var(--suave); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.volver-sitio:hover { color: var(--verde); }
.volver-sitio:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }
.acerca { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.acerca-etiqueta { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--verde); }
.acerca p { margin: 0; color: var(--suave); font-size: 15px; line-height: 1.6; max-width: 40ch; }
.pie { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.boton-instalar {
  border: 1px solid var(--verde); color: var(--verde); background: transparent; border-radius: 999px;
  padding: 9px 18px; font-weight: 700; cursor: pointer;
}
.pista-ios { margin: 0; color: var(--suave); font-size: 13px; }
.enlace-sitio { color: var(--verde); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.legales { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: #5c665f; }
.legales a { color: #9aa59d; }
.legales a:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
.enlace-sitio:focus-visible, .boton-instalar:focus-visible, .boton-vivo:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .estado-aire[data-vivo="true"]::before, .giro { animation: none; }
}
