/* Difusion Radio Preview v4: tema claro descansado, nav limpio,
   anchuras robustas y estados en vivo. Se carga DESPUES de vibrante-preview.css. */
html:not([data-theme="dark"]) {
  --bg: #e7eff7;
  --surface: #f7faff;
  --surface-2: #e3eef8;
  --surface-3: #d5e5f3;
  --text: #17324d;
  --muted: #506780;
  --border: #c4d5e5;
  --brand-soft: #d7ecfd;
  --accent-purple-soft: #e9e3fa;
  --accent-teal-soft: #d6f1eb;
  --accent-orange-soft: #faeed8;
  --accent-pink-soft: #f9e6eb;
  --shadow-sm: 0 7px 24px rgba(27,70,112,.09);
  --shadow: 0 23px 55px rgba(20,74,123,.14);
  color-scheme: light;
}
html:not([data-theme="dark"]) body {
  background:
    radial-gradient(circle at 7% 8%,rgba(4,155,243,.17),transparent 34rem),
    radial-gradient(circle at 95% 31%,rgba(120,72,246,.12),transparent 33rem),
    linear-gradient(155deg,#e1ecf7 0%,#edf3f9 53%,#dfeaf6 100%);
}
html:not([data-theme="dark"]) .site-header {
  background: color-mix(in srgb,var(--surface) 91%,transparent);
  box-shadow: 0 5px 22px rgba(20,74,123,.075);
}
html:not([data-theme="dark"]) .broadcast-panel {
  background:
    radial-gradient(circle at 93% 6%,rgba(120,72,246,.10),transparent 44%),
    linear-gradient(145deg,#f4f9fe,#e9f2fb);
  border-color: #b7cede;
}
html:not([data-theme="dark"]) .section-soft {
  background: linear-gradient(155deg,#dceaf6,#e9f2fb 65%,#e2ecf8);
}
html:not([data-theme="dark"]) .host-card {
  background:linear-gradient(155deg,#f8fbff,#edf4fb);
}
html:not([data-theme="dark"]) .schedule-event,
html:not([data-theme="dark"]) .contact-form,
html:not([data-theme="dark"]) .audio-dock {
  background: #f5f9fe;
}
/* Sin bloque ni marco azul alrededor de la pestaña de navegación seleccionada. */
.main-nav a.active,
.main-nav a.active:hover {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--brand-strong);
}
.main-nav a {transition: color .17s ease,background-color .17s ease;}
.main-nav a:hover {background: color-mix(in srgb,var(--brand-soft) 58%,transparent);}
/* Corregir anchuras de grid/flex antes de utilizar clip como protección final. */
.site-shell, .header-inner, .hero, .hero-grid-broadcast,
.hero-grid-broadcast > *, .broadcast-panel, .broadcast-panel-head,
.broadcast-kpis, .broadcast-kpis article, .host-card, .host-card-main,
.host-copy, .contact-grid, .schedule-week, .audio-dock {
  min-width: 0;
  max-width: 100%;
}
.hero-grid-broadcast {
  grid-template-columns:minmax(0, .95fr) minmax(0,1.05fr);
}
.broadcast-panel-head > * {min-width:0;}
.broadcast-panel-head h2 {overflow-wrap:anywhere;}
.schedule-week {overflow-x:auto; overscroll-behavior-x:contain;}
html, body {width:100%;max-width:100%;overflow-x:clip;}
@supports not (overflow:clip) {html,body {overflow-x:hidden;}}
@media (max-width:1200px) {
  .hero-grid-broadcast{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:680px) {
  .site-shell{width:calc(100% - 24px);}
  .broadcast-kpis{grid-template-columns:minmax(0,1fr);}
  .broadcast-panel,.live-card{max-width:100%;}
  .broadcast-panel{padding:16px;}
  .broadcast-panel-head h2{font-size:clamp(1.3rem,6vw,1.65rem);}
  .host-card-main{grid-template-columns:72px minmax(0,1fr);}
}
/* Contador: cifra protagonista, rotulo corto sin saltos de linea. */
.broadcast-kpis article:nth-child(3) {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  align-items:center;
  gap:10px;
}
.broadcast-kpis article:nth-child(3)>div {min-width:0;}
.broadcast-kpis article:nth-child(3) #listeners-count {
  display:block;
  font-variant-numeric:tabular-nums;
  font-size:1.65rem;
  line-height:1.1;
  white-space:nowrap;
  margin:0;
}
.broadcast-kpis #audiencia-label {
  display:block;
  font-size:.6rem;
  line-height:1.3;
  white-space:nowrap;
  color:var(--muted);
  margin-top:4px;
}
.broadcast-kpis #audiencia-breakdown {
  display:block;
  margin-top:5px;
  font-size:.52rem;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--muted);
}
/* La franja usa una version desenfocada de la foto REAL del locutor.
   No necesitamos extraer pixels con Canvas ni permisos CORS de fotos de la API. */
.host-card::before,
.host-card:nth-child(n)::before {
  height:6px;
  background-image:
    linear-gradient(90deg,rgba(0,168,255,.10),rgba(255,255,255,.14),rgba(120,72,246,.09)),
    var(--host-artwork, linear-gradient(90deg,#31bdff,#7848f6,#08bca7));
  background-size:cover;
  background-position:center 42%;
  filter:saturate(1.65) brightness(1.09) blur(.65px);
}
.host-card .host-photo {transition:outline-color .2s ease,box-shadow .2s ease;}
.host-card.is-live-host {
  border-color:#10b9ac;
  box-shadow:0 0 0 2px rgba(9,196,181,.20), 0 18px 38px rgba(6,116,167,.15);
}
.host-card.is-live-host .host-photo {
  outline:3px solid #15c7b4;
  outline-offset:3px;
  box-shadow:0 0 0 7px rgba(14,207,184,.12),0 8px 22px rgba(3,90,112,.15);
}
.host-card.is-live-host::before {height:8px; filter:saturate(2) brightness(1.17);}
.host-card.is-live-host .host-live-badge {
  color:#075a51;
  background:#b9f5e7;
  border:1px solid #29beaa;
}
.host-card.is-live-host .host-live-badge span {background:#0cae94;box-shadow:0 0 0 4px rgba(12,174,148,.18);}
html[data-theme="dark"] .host-card.is-live-host .host-live-badge {
  color:#8cffe7;background:#154b49;border-color:#1ba994;
}
/* Programacion: diferenciar horario previsto de emision confirmada desde cabina. */
.schedule-event.is-current-program {
  border-color:rgba(4,155,243,.67);
  background:linear-gradient(130deg,var(--brand-soft),var(--surface));
  box-shadow:inset 3px 0 0 var(--brand),0 9px 26px rgba(0,109,180,.10);
}
.schedule-event.is-live-program {
  border-color:#12bdae;
  background:linear-gradient(130deg,rgba(17,197,177,.14),var(--surface));
  box-shadow:inset 4px 0 0 #10c2b0,0 10px 27px rgba(0,128,130,.13);
}
.dr-v4-program-badge {
  display:inline-flex;align-items:center;gap:5px;
  margin-top:8px;padding:4px 9px;border-radius:999px;
  font-size:.57rem;font-weight:800;letter-spacing:.02em;
  background:var(--brand-soft);color:var(--brand-strong);
}
.is-live-program .dr-v4-program-badge{color:#06564b;background:#b7f4e6;}
html[data-theme="dark"] .is-live-program .dr-v4-program-badge{color:#7affdf;background:#174744;}
.dr-v4-program-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;}
@media (prefers-reduced-motion:reduce) { .main-nav a,.host-card .host-photo{transition:none;} }
