.rrtb-audiencia-wrap {
  --rrtb-bg: #07111f;
  --rrtb-card: rgba(13, 28, 48, .92);
  --rrtb-text: #f4f8ff;
  --rrtb-muted: #9fb2c8;
  --rrtb-line: rgba(255, 255, 255, .12);
  --rrtb-accent: #37d5ff;
  --rrtb-hot: #ff315f;
  --rrtb-map-height: 520px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(55, 213, 255, .16), transparent 34%), var(--rrtb-bg);
  color: var(--rrtb-text);
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}
.rrtb-theme-light {
  --rrtb-bg: #f5f8fc;
  --rrtb-card: rgba(255, 255, 255, .96);
  --rrtb-text: #0d1d31;
  --rrtb-muted: #58708d;
  --rrtb-line: rgba(8, 30, 55, .12);
}
.rrtb-audiencia-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.rrtb-audiencia-header h2 {
  margin: 0 0 6px;
  color: var(--rrtb-text);
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  line-height: 1.1;
}
.rrtb-audiencia-header p {
  margin: 0;
  color: var(--rrtb-muted);
}
.rrtb-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--rrtb-line);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-weight: 700;
  font-size: .82rem;
}
.rrtb-live-badge span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--rrtb-hot);
  box-shadow: 0 0 0 7px rgba(255, 49, 95, .15);
}
.rrtb-animated .rrtb-live-badge span { animation: rrtbPulseBadge 1.4s infinite; }
.rrtb-audiencia-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, .8fr);
  gap: 18px;
}
.rrtb-map-panel,
.rrtb-stats-panel {
  background: var(--rrtb-card);
  border: 1px solid var(--rrtb-line);
  border-radius: 18px;
  overflow: hidden;
}
.rrtb-map-panel { position: relative; min-height: var(--rrtb-map-height); }
.rrtb-map { height: var(--rrtb-map-height); min-height: 360px; z-index: 1; }
.rrtb-map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--rrtb-muted);
  text-align: center;
  z-index: 0;
}
.rrtb-stats-panel { padding: 16px; }
.rrtb-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.rrtb-stat {
  border: 1px solid var(--rrtb-line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.05);
}
.rrtb-stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--rrtb-accent);
}
.rrtb-stat span {
  display: block;
  color: var(--rrtb-muted);
  font-size: .75rem;
  margin-top: 4px;
}
.rrtb-ranking { border-top: 1px solid var(--rrtb-line); padding-top: 14px; margin-top: 14px; }
.rrtb-ranking h3 { margin: 0 0 10px; color: var(--rrtb-text); font-size: 1rem; }
.rrtb-ranking ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rrtb-ranking li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed var(--rrtb-line);
  padding-bottom: 8px;
  color: var(--rrtb-muted);
  font-size: .9rem;
}
.rrtb-ranking li span { min-width: 0; overflow-wrap: anywhere; }
.rrtb-ranking li a { color: inherit; text-decoration: none; }
.rrtb-ranking li a:hover { color: var(--rrtb-accent); text-decoration: underline; }
.rrtb-ranking li strong { color: var(--rrtb-text); }
.rrtb-audiencia-footnote { color: var(--rrtb-muted); font-size: .8rem; padding-top: 12px; }
.rrtb-div-icon { background: transparent; border: 0; }
.rrtb-dot {
  display: block;
  border-radius: 999px;
  background: var(--rrtb-hot);
  border: 2px solid rgba(255,255,255,.92);
  box-shadow: 0 0 18px rgba(255, 49, 95, .86), 0 0 42px rgba(55, 213, 255, .3);
}
.rrtb-dot-pulse { animation: rrtbPulseDot 1.55s infinite; }
.rrtb-audiencia-wrap .leaflet-container { background: #09111e; font: inherit; }
.rrtb-audiencia-wrap .leaflet-popup-content-wrapper,
.rrtb-audiencia-wrap .leaflet-popup-tip {
  background: #07111f;
  color: #f4f8ff;
}
@keyframes rrtbPulseDot {
  0% { transform: scale(.82); opacity: .72; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(.82); opacity: .72; }
}
@keyframes rrtbPulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(255, 49, 95, .32); }
  70% { box-shadow: 0 0 0 10px rgba(255, 49, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 49, 95, 0); }
}
@media (max-width: 980px) {
  .rrtb-audiencia-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .rrtb-audiencia-wrap { border-radius: 16px; padding: 14px; }
  .rrtb-audiencia-header { flex-direction: column; }
  .rrtb-stat-cards { grid-template-columns: 1fr; }
}
