:root {
  --bg-black: #000000;
  --bg-placeholder: #0d0d0d;
  --text-white: #f5f5f3;
  --text-muted: #787878;
  --text-dim: #444444;

  /* Tipografías de identidad */
  --font-helvetica: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-didot: 'Didot', 'Didot LT STD', 'GFS Didot', 'Bodoni Moda', 'Bodoni MT', Georgia, serif;
  --font-sans: 'Switzer', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* =================================================================
   LOGOS OFICIALES: etc. (Helvetica) y ZINE etc. (Didot + Helvetica)
   ================================================================= */
.logo-etc-helvetica {
  font-family: var(--font-helvetica);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}

.logo-zine-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 0.82;
}

.zine-didot {
  font-family: var(--font-didot);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
}

.zine-sub-etc {
  font-family: var(--font-helvetica);
  font-weight: 400;
  font-size: 0.31em;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 0.07em;
  margin-right: 0.03em;
}

/* =================================================================
   LOGOS media etc. y radio etc. (Helvetica + etc. alineado a la derecha)
   ================================================================= */
:root {
  /* Colores primarios del logo media */
  --media-red: #ff2b1c;
  --media-yellow: #ffd60a;
  --media-blue: #1f44ff;
  /* Duración del ciclo completo blanco → rojo → amarillo → azul */
  --media-chroma-duration: 4.8s;
}

.logo-word-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 0.86;
}

.logo-word {
  font-family: var(--font-helvetica);
  font-weight: 400;
  letter-spacing: -0.03em;
  display: block;
}

.logo-word-etc {
  font-family: var(--font-helvetica);
  font-weight: 400;
  font-size: 0.33em;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 0.1em;
  margin-right: 0.02em;
}

/* La palabra "media" cambia de golpe entre blanco y los primarios */
.media-chroma {
  animation: mediaChroma var(--media-chroma-duration) steps(1, end) infinite;
}

@keyframes mediaChroma {
  0%   { color: var(--text-white); }
  40%  { color: var(--media-red); }
  60%  { color: var(--media-yellow); }
  80%  { color: var(--media-blue); }
  100% { color: var(--text-white); }
}

/* Permite "congelar" el logo en un color (ej. al pasar el cursor por zine/radio) */
.media-chroma[data-lock="red"]    { animation: none; color: var(--media-red); }
.media-chroma[data-lock="yellow"] { animation: none; color: var(--media-yellow); }
.media-chroma[data-lock="blue"]   { animation: none; color: var(--media-blue); }
.media-chroma[data-lock="white"]  { animation: none; color: var(--text-white); }

/* Lockups compactos para docks y breadcrumbs */
.dock-item .logo-word-lockup,
.dock-item .logo-zine-lockup {
  font-size: 0.95rem;
  line-height: 0.82;
}

.crumb-lockup {
  font-size: 1.05rem;
  line-height: 0.84;
  vertical-align: baseline;
}

@media (prefers-reduced-motion: reduce) {
  .media-chroma { animation: none; }
}

/* =================================================================
   PUNTO AL AIRE (REUTILIZABLE) Y REPRODUCTOR FLOTANTE DE RADIO
   ================================================================= */
.onair-dot {
  display: inline-block;
  width: 0.52em;
  height: 0.52em;
  border-radius: 50%;
  background: var(--media-red, #ff2b1c);
  box-shadow: 0 0 0 0 rgba(255, 43, 28, 0.6);
  animation: onairPulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes onairPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 43, 28, 0.55); }
  70%  { box-shadow: 0 0 0 0.6em rgba(255, 43, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 43, 28, 0); }
}

.live-floating-player {
  position: fixed;
  bottom: 22px;
  right: 24px;
  z-index: 280;
  display: inline-flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid #282828;
  border-radius: 9999px;
  padding: 4px 14px 4px 5px;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(255, 255, 255, 0.04);
  font-family: var(--font-sans);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.live-floating-player:hover {
  border-color: #3e3e3e;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.92);
}

.live-floating-player.is-playing {
  border-color: rgba(255, 43, 28, 0.5);
  box-shadow: 0 12px 36px rgba(255, 43, 28, 0.12), 0 16px 40px rgba(0, 0, 0, 0.9);
}

/* Botón play/pausa circular */
.lfp-play-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: none;
  background: #f5f5f3;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.lfp-play-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.lfp-play-btn:active {
  transform: scale(0.92);
}

.live-floating-player.is-playing .lfp-play-btn {
  background: var(--media-red, #ff2b1c);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(255, 43, 28, 0.4);
}

.lfp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.lfp-icon svg {
  display: block;
}

.lfp-icon-pause,
.lfp-icon-spinner {
  display: none;
}

.live-floating-player.is-playing .lfp-icon-play {
  display: none;
}

.live-floating-player.is-playing .lfp-icon-pause {
  display: flex;
}

/* Estado de carga */
.lfp-play-btn.is-loading .lfp-icon-play,
.lfp-play-btn.is-loading .lfp-icon-pause {
  display: none !important;
}

.lfp-play-btn.is-loading .lfp-icon-spinner {
  display: flex;
  animation: lfpSpin 0.9s linear infinite;
}

@keyframes lfpSpin {
  100% { transform: rotate(360deg); }
}

/* Divisor vertical */
.lfp-divider {
  width: 1px;
  height: 20px;
  background: #242424;
  flex-shrink: 0;
}

/* Enlace a /radio/ con logo media etc. */
.lfp-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-white);
  padding: 2px 2px 2px 0;
  transition: opacity 0.2s ease;
}

.lfp-link:hover {
  opacity: 0.9;
}

.lfp-logo-wrap {
  display: inline-flex;
  align-items: center;
  font-size: 0.94rem;
  line-height: 0.84;
}

.lfp-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.lfp-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-helvetica);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.live-floating-player.is-playing .lfp-badge-row {
  color: var(--text-white);
}

.lfp-title {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.live-floating-player.is-playing .lfp-title {
  color: var(--text-white);
}

.lfp-arrow {
  font-family: var(--font-helvetica);
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
  margin-left: 2px;
}

.lfp-link:hover .lfp-arrow {
  color: var(--text-white);
  transform: translateX(3px);
}

/* Adaptación móvil */
@media (max-width: 760px) {
  .live-floating-player {
    /* Significativamente más arriba para evitar amontonarse con los links del dock */
    bottom: 88px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 4px 12px 4px 5px;
    gap: 8px;
    max-width: calc(100vw - 28px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.9);
  }

  .live-floating-player:hover {
    transform: translateX(-50%) translateY(-1px);
  }

  .lfp-play-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .lfp-title {
    max-width: 110px;
    font-size: 0.7rem;
  }
}

/* =================================================================
   PWA — BANNER DE INSTALACIÓN, MODAL IOS Y ESTILOS STANDALONE
   ================================================================= */
.pwa-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  max-width: 360px;
  width: calc(100vw - 32px);
  background: rgba(14, 14, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.pwa-banner-media {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pwa-banner-logo {
  font-family: var(--font-helvetica);
  font-size: 1.15rem;
  font-weight: 500;
  color: #000000;
  background: #f5f5f3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pwa-banner-text strong {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-btn-install {
  background: #f5f5f3;
  color: #000000;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.pwa-btn-install:hover {
  opacity: 0.88;
}

.pwa-btn-install:active {
  transform: scale(0.96);
}

.pwa-btn-close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.85rem;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s;
}

.pwa-btn-close:hover {
  color: var(--text-white);
}

/* Modal iOS Safari */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pwa-ios-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pwa-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pwa-ios-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px 22px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-ios-modal.is-open .pwa-ios-sheet {
  transform: translateY(0);
}

.pwa-ios-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pwa-ios-logo {
  font-family: var(--font-helvetica);
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.pwa-ios-close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.pwa-ios-title {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--text-white);
}

.pwa-ios-steps {
  list-style: none;
  counter-reset: pwa-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-ios-steps li {
  counter-increment: pwa-step;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pwa-ios-steps li strong {
  color: var(--text-white);
}

.pwa-ios-steps li::before {
  content: counter(pwa-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: #222222;
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 500;
}

.pwa-ios-icon {
  display: inline-block;
  vertical-align: middle;
  color: var(--text-white);
}

/* Adaptación móvil del banner */
@media (max-width: 760px) {
  .pwa-banner {
    bottom: auto;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

/* Standalone PWA Safe Areas */
html.is-pwa-standalone {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}