/* Animación (azules degradados) para la siguiente emisión recomendada (Comienzan pronto)
   - Mantiene el efecto original: parpadeo/crossfade de fondo (no resplandor de borde).
   - El fondo se renderiza con ::before/::after y el pulso solo enfatiza suavemente. */
.program.after-23-animate,
.program.upcoming-recommended-animate {
  background: none !important;
  position: relative;
}

.program.after-23-animate:not(.current),
.program.upcoming-recommended-animate:not(.current) {
  animation: none !important;
  -webkit-animation: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Force readable white text on animated recommended cards */
.program.after-23-animate .time,
.program.after-23-animate .title,
.program.after-23-animate .category,
.program.after-23-animate .title-inner,
.program.upcoming-recommended-animate .time,
.program.upcoming-recommended-animate .title,
.program.upcoming-recommended-animate .category,
.program.upcoming-recommended-animate .title-inner {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6) !important;
}

/* Pseudo-element usado para animar el fondo y evitar overrides por otras reglas */
.program.after-23-animate::before,
.program.upcoming-recommended-animate::before {
  /* Base layer: start background (var(--bg-a)) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 4px;
  background-image: var(--bg-a, linear-gradient(135deg, #1f4068 0%, #164a73 100%));
  pointer-events: none;
}

.program.after-23-animate::after,
.program.upcoming-recommended-animate::after {
  /* Top layer: target background (var(--bg-b)) that crossfades via opacity */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background-image: var(--bg-b, linear-gradient(135deg, #01121a 0%, #032433 100%));
  opacity: 0;
  animation: upcoming-recommended-crossfade 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes upcoming-recommended-crossfade {
  /* Gentle fade-in, hold, gentle fade-out */
  0%, 22% { opacity: 0; }
  50% { opacity: 1; }
  78%, 100% { opacity: 0; }
}

/* Asegura que el contenido de la tarjeta quede por encima del pseudo-elemento */
.program .time,
.program .title,
.program .category,
.program .recommended-star {
  position: relative;
  z-index: 10;
}
/* Highlight styles for active single-filter mode */
.program.filter-match-pink {
  background-image: linear-gradient(135deg, #ffd6ec 0%, #ffb3d6 55%, #ff9ebf 100%) !important;
  color: #3b0022 !important;
  border: 1px solid rgba(255,95,159,0.16) !important;
  box-shadow: 0 6px 18px rgba(233,69,144,0.08) !important;
}

/* Enhanced darker pink gradient for channel-filter 'pink' cards (more saturated, depth) */
.program.filter-match-pink,
.program.current.filter-match-pink {
  /* Use same deep-blue grid tone as the 'Todos' area */
  background: linear-gradient(135deg, #1f3f78 0%, #103157 60%) !important;
  color: #e6f7ff !important;
  border: 1px solid rgba(16,81,130,0.9) !important;
  box-shadow: 0 10px 28px rgba(16,78,120,0.14) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45) !important;
}
.program.filter-match-pink .title,
.program.filter-match-pink .time,
.program.current.filter-match-pink .title,
.program.current.filter-match-pink .time {
  color: #ffffff !important;
}

/* Slight inner highlight to give a glossy feel */
.program.filter-match-pink::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.00) 35%);
  pointer-events: none;
  z-index: 1;
}
.program.filter-match-gold {
  /* Gold gradient: darker at start/end (less pale) */
  background-image: linear-gradient(135deg, #f2a700 0%, #ffe066 100%) !important;
  color: #2b1a00 !important;
  border: 1px solid rgba(225,184,0,0.9) !important;
  box-shadow: 0 6px 20px rgba(225,184,0,0.08) !important;
  text-shadow: none !important;
}

/* Slight inner highlight to give a glossy feel (gold cards) */
.program.filter-match-gold::after,
.program.gold::after,
.program.current.gold::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.00) 35%);
  pointer-events: none;
  z-index: 2;
}

/* Ensure .program.gold and .program.filter-match-gold share identical gold appearance */
.program.gold,
.program.filter-match-gold,
.program.current.gold {
  /* Gold gradient: darker at start/end (less pale) */
  background: linear-gradient(135deg, #f2a700 0%, #ffe066 100%) !important;
  color: #111 !important;
  border: 1px solid #8a5a00 !important;
  box-shadow:
    0 10px 28px rgba(225,184,0,0.12),
    0 0 0 1px rgba(17, 17, 17, 0.22) inset !important;
  text-shadow: none !important;
}
.program.recommended-border {
  border: 1px solid #8a5a00 !important;
  box-shadow:
    0 14px 34px rgba(16, 78, 120, 0.28),
    0 0 0 1px rgba(17, 17, 17, 0.22) inset;
}

/* Recommended (not on-air): emphasize via background (not border) */
.program.recommended-border:not(.gold) {
  background: linear-gradient(135deg, #062b44 0%, #0b2f46 55%, #1f4068 100%) !important;
}

/* If a card is highlighted as gold by a filter, gold must win over the recommended blue background */
.program.recommended-border.filter-match-gold {
  background: linear-gradient(135deg, #f2a700 0%, #ffe066 100%) !important;
  color: #111 !important;
  border: 1px solid #8a5a00 !important;
  box-shadow:
    0 10px 28px rgba(225,184,0,0.12),
    0 0 0 1px rgba(17, 17, 17, 0.22) inset !important;
  text-shadow: none !important;
}

.program.recommended-border:not(.gold)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.00) 40%),
    linear-gradient(135deg, rgba(6, 43, 68, 0.62) 0%, rgba(6, 43, 68, 0.00) 62%),
    radial-gradient(120% 90% at 18% 0%, rgba(16, 81, 130, 0.22) 0%, rgba(16, 81, 130, 0.00) 58%);
  pointer-events: none;
  z-index: 1;
}

.program.recommended-border.filter-match-gold::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.00) 35%) !important;
  z-index: 2;
}
.filters-label, .recommended-label {
  font-size: 0.82em;
  font-weight: 400;
  color: #fff;
  margin-right: 8px;
  margin-left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  top: 5px;
  gap: 5px;
}

.recommended-label {
  margin-left: 18px;
}

.channel-filters-wrapper {
  display: flex;
  align-items: center;
  gap: 18px;
  /* Use padding instead of margin so the sticky background also covers the gap */
  margin-bottom: 0;
  padding-bottom: 0.5em;
  position: sticky;
  top: var(--filters-sticky-top);
  z-index: 95;
  /* Fondo sólido para que no haya "cambio de color" y no se vea nada por debajo */
  background: #1a1a2e;
  background-image: none;
}
.channel-filters {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: static;
  background: transparent;
}
.recommended-now-container {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 210px;
  margin-left: 18px;
  height: 100%;
  margin-top: 10px;
  gap: 8px;
}



.logo-wrap {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
hr.modal-divider-dark {
  border: none;
  border-top: 1px solid #070d1a;
  margin: 18px 0 12px 0;
  width: 100%;
}
.modal-chip-score {
  background: #ffe066;
  color: #222;
  border: 1.5px solid #e1b800;
  font-weight: bold;
  box-shadow: 0 1px 4px #e1b80044;
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 4px;
  margin-bottom: 2px;
  font-size: 1.08em;
}

/* --- Blog cards (home + blog index) ----------------------------------- */
.blog-today {
  padding: 18px 0;
}

.blog-today-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 12px;
}

.blog-today-kicker {
  font-size: 0.95em;
  opacity: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(197, 214, 239, 0.82);
}

.blog-today-title {
  margin: 2px 0 0;
  font-size: 1.1em;
}

.blog-card-grid {
  display: grid;
  gap: 12px;
}

/* Home-only tuning: smaller, more separated highlight cards */
.blog-today .blog-card-grid {
  gap: 18px;
}

.blog-today .blog-card-grid.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 280px));
  justify-content: center;
}

.blog-today .blog-card-grid.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 280px));
  justify-content: center;
}

.blog-today .blog-card-body {
  padding: 8px 10px;
}

.blog-today .blog-card-title {
  font-size: 14px;
}

.blog-card-grid.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card-grid.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .blog-card-grid.columns-3,
  .blog-card-grid.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .blog-card-grid.columns-3,
  .blog-card-grid.columns-4 {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-card-body {
  padding: 10px 12px;
}

.blog-card-meta {
  font-size: 12px;
  opacity: 0.9;
  margin: 0 0 6px;
}

.blog-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
}

.blog-today-footer {
  margin-top: 12px;
}

.blog-view-all {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

/* Make the home "Ver todo el blog" link more discreet */
.blog-today-footer .blog-view-all {
  font-weight: 500;
  opacity: 0.92;
  font-size: 13px;
}

.blog-today-footer .blog-view-all:hover {
  text-decoration: underline;
  opacity: 1;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Screen-reader only: keeps semantic headings without changing visual layout */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:root {
  --layout-max-width: 1600px;
  --side-banner-width: 0px;
  --side-banner-gap: 18px;
  --filters-sticky-top: 56px;
  --timeline-sticky-top: 104px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-inline: calc(var(--side-banner-width) + var(--side-banner-gap));
}

body.has-side-banners {
  --side-banner-width: clamp(130px, 11vw, 220px);
}

.ad-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Top ad slot: keep layout stable even before ad scripts load */
.ad-slot-top {
  margin: 10px 0 6px 0;
  min-height: 100px; /* common mobile banner heights (100/50) without CLS */
}

/* Affiliate mini-banners (reuses the top banner slot area) */
.affiliate-strip {
  width: min(var(--layout-max-width), 100%);
  padding: 0 12px;
}

.affiliate-strip-inner {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 10px;
}

.affiliate-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.affiliate-strip-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: rgba(219, 232, 255, 0.95);
}

.affiliate-strip-note {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(197, 214, 239, 0.82);
  white-space: nowrap;
}

.affiliate-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* If there's only one platform card, let it use the full row */
.affiliate-strip-grid > :only-child {
  grid-column: 1 / -1;
  justify-self: stretch;
}

.affiliate-mini {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(219, 232, 255, 0.95);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.affiliate-mini[data-affiliate="1"]::after {
  content: 'Afiliado';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 224, 102, 0.16);
  border: 1px solid rgba(255, 224, 102, 0.35);
  color: rgba(255, 224, 102, 0.95);
}

.affiliate-mini:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.affiliate-mini-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.affiliate-mini-layout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.affiliate-mini-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.affiliate-mini-name {
  font-weight: 800;
  line-height: 1.1;
}

.affiliate-mini-sub {
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 600;
  color: rgba(197, 214, 239, 0.86);
}

@media (min-width: 768px) {
  .affiliate-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .affiliate-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ad-placeholder {
  width: min(320px, 100%);
  height: 100px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(219, 232, 255, 0.9);
  pointer-events: none;
}

.ad-placeholder-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
}

.ad-placeholder-kicker {
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(197, 214, 239, 0.82);
}

.ad-placeholder-size {
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 600;
}

@media (min-width: 768px) {
  .ad-slot-top {
    min-height: 90px; /* common desktop leaderboard height */
  }

  .ad-placeholder {
    width: min(728px, 100%);
    height: 90px;
  }
}

header,


header {
  background: #0f3460;
  box-sizing: border-box;
  padding: 10px 32px;
  min-height: 88px;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
  margin-left: calc(-1 * (var(--side-banner-width) + var(--side-banner-gap)));
  margin-right: calc(-1 * (var(--side-banner-width) + var(--side-banner-gap)));
  left: 0;
  position: relative;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

h1 {
  font-size: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
  justify-content: flex-start;
}

.site-logo {
  max-width: 100vw;
  height: 86px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.date-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.date-selector-kicker {
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(197, 214, 239, 0.82);
}

.date-selector-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Channel logo (static /canales/*.html header) */
.channel-page-logo {
  height: 34px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* When the channel logo is present, align the title next to it (not centered like the date selector on home) */
.channel-page-logo + #current-date {
  min-width: 0;
  text-align: left;
}

#current-date {
  font-weight: 600;
  min-width: 180px;
  text-align: center;
}

/* Overlay loading spinner */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(10, 18, 34, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  font-size: 1.12rem;
  color: #ffe066;
  pointer-events: all;
  transition: opacity 0.2s;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 999px;
  border: 3px solid rgba(151, 225, 255, 0.28);
  border-top-color: #57e9ff;
  border-right-color: #ff5f9f;
  box-shadow: 0 0 0 1px rgba(87, 233, 255, 0.16), 0 0 18px rgba(87, 233, 255, 0.2);
  animation: loading-spinner-rotate 0.95s linear infinite;
}

.loading-text {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #d6e8ff;
}

@keyframes loading-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.channel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 15px 2px;
  align-items: center;
  /* Only the wrapper is sticky; keeping this static prevents layout shifts on scroll */
  position: static;
  top: auto;
  z-index: auto;
  background: transparent;
  box-shadow: none;
}

.channel-filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(219, 232, 255, 0.75);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.channel-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.channel-filter-btn.active {
  background: linear-gradient(135deg, #e94590 0%, #e94560 45%, #ff6b6b 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 14px rgba(233, 69, 144, 0.5), 0 0 0 1px rgba(255, 107, 193, 0.25);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Channel-type filters (not 'all') use a blue grid style when active */
.channel-filter-btn[data-filter="tdt"].active,
.channel-filter-btn[data-filter="autonomic"].active,
.channel-filter-btn[data-filter="pay"].active,
.channel-filter-btn[data-filter="favorites"].active,
#favorites-only-btn.active {
  background: linear-gradient(90deg, #1f3f78 0%, #103157 60%);
  color: #e6f7ff !important;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(16,78,120,0.28), 0 0 0 1px rgba(16,78,120,0.08);
  text-shadow: none;
}

/* Botón 'Recomendados ahora' con borde dorado y animación sutil */
.channel-filter-btn.recommended-now-btn {
  /* neutral base like other filter buttons */
  background: rgba(255,255,255,0.05) !important;
  color: rgba(219, 232, 255, 0.75) !important;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
  position: relative;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.channel-filter-btn.recommended-now-btn.active {
  /* Sin cambio de fondo al activar: solo borde (sin glow) */
  background: rgba(255,255,255,0.05) !important;
  color: #ffe066 !important;
  font-weight: 700;
  border: 1.5px solid #e1b800;
  box-shadow: none !important;
  animation: none !important;
}
.channel-filter-btn.upcoming-recommended-btn {
  /* neutral base */
  background: rgba(255,255,255,0.05) !important;
  color: rgba(219, 232, 255, 0.75) !important;
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 500;
  box-shadow: none;
  position: relative;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.channel-filter-btn.upcoming-recommended-btn.active {
  /* Sin cambio de fondo al activar: solo borde (sin glow) */
  background: rgba(255,255,255,0.05) !important;
  color: #ffe066 !important;
  font-weight: 700;
  border: 1.5px solid #e1b800;
  box-shadow: none !important;
  animation: none !important;
}

@keyframes border-glow-gold {
  0%, 100% { box-shadow: 0 0 0 0 #ffe06644; }
  50% { box-shadow: 0 0 8px 2px #ffe06688; }
}

/* Recomendados: no animación ni glow al activar */
.channel-filter-btn.recommended-now-btn.active,
.channel-filter-btn.upcoming-recommended-btn.active,
.channel-filter-btn.esta-noche-btn.active {
  animation: none !important;
}

/* Esta noche: sin cambio de fondo al activar (solo borde, sin glow) */
.channel-filter-btn.esta-noche-btn.active {
  background: rgba(255,255,255,0.05) !important;
  color: #ffe066 !important;
  font-weight: 700;
  border: 1.5px solid #e1b800 !important;
  box-shadow: none !important;
  animation: none !important;
}

.filter-count {
  font-size: 0.8em;
  opacity: 0.72;
  font-weight: 400;
  vertical-align: middle;
  margin-left: 3px;
 }

.tv-grid {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Static (HTML-only) schedule used in /canales/*.html */
.seo-schedule {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(87, 233, 255, 0.18);
  border-radius: 10px;
  padding: 14px 14px;
  color: rgba(237, 246, 255, 0.95);
}

.seo-schedule-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.seo-channel-logo {
  height: 36px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 6px;
}

.date-selector-channel-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.channel-page-logo {
  height: 28px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 4px;
}

.date-selector-channel-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.seo-schedule-updated {
  margin: 0;
  color: rgba(197, 214, 239, 0.82);
  font-size: 0.88rem;
}

.seo-schedule h2 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.seo-schedule ul,
.seo-schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-schedule-li {
  margin: 0;
  padding: 0;
}

/* The clickable row is the <summary> */
.seo-schedule-item {
  display: block;
}

.seo-schedule-summary {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  padding-right: 26px;
  position: relative;
}

.seo-schedule-summary::-webkit-details-marker {
  display: none;
}

details.seo-schedule-item > summary {
  outline: none;
}

details.seo-schedule-item > summary::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(219, 232, 255, 0.85);
  border-bottom: 2px solid rgba(219, 232, 255, 0.85);
  transform: translateY(-60%) rotate(45deg);
  opacity: 0.8;
}

details.seo-schedule-item[open] > summary::after {
  transform: translateY(-40%) rotate(225deg);
}

.seo-schedule-item:hover {
  border-color: rgba(87, 233, 255, 0.26);
  background: rgba(255, 255, 255, 0.03);
}

.seo-schedule-item.is-now:hover {
  border-color: rgba(225, 184, 0, 0.7);
  background: rgba(225, 184, 0, 0.1);
}

details.seo-schedule-item > summary:focus-visible {
  outline: 2px solid rgba(87, 233, 255, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}

.seo-schedule-item {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.seo-schedule-item[open] {
  background: rgba(255, 255, 255, 0.03);
}

.seo-program-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(237, 246, 255, 0.92);
}

.seo-program-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.seo-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(87, 233, 255, 0.22);
  background: rgba(87, 233, 255, 0.06);
  color: rgba(237, 246, 255, 0.95);
}

.seo-program-score {
  border-color: rgba(225, 184, 0, 0.55);
  background: rgba(225, 184, 0, 0.12);
  color: #ffe066;
}

.seo-program-desc {
  margin: 0;
  color: rgba(197, 214, 239, 0.92);
  font-size: 0.95rem;
  line-height: 1.35;
}

.seo-program-details .modal-facts-grid.seo-facts-grid {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .seo-schedule li strong,
  .seo-schedule-summary strong {
    min-width: 94px;
  }
  .seo-schedule-summary {
    gap: 8px;
  }
}

.seo-schedule-item.is-now {
  border-color: rgba(225, 184, 0, 0.55);
  background: rgba(225, 184, 0, 0.08);
}

.seo-schedule li strong {
  flex: 0 0 auto;
  min-width: 118px;
  color: #ffe066;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.seo-schedule-title {
  flex: 1 1 auto;
  min-width: 0;
}

.seo-schedule-badges {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 8px;
}

.seo-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(237, 246, 255, 0.95);
  white-space: nowrap;
}

.seo-badge-now {
  border-color: rgba(225, 184, 0, 0.75);
  background: rgba(225, 184, 0, 0.14);
  color: #ffe066;
}

.seo-badge-night {
  border-color: rgba(87, 233, 255, 0.28);
  background: rgba(87, 233, 255, 0.08);
}

.seo-schedule p {
  margin: 10px 0 0 0;
  color: rgba(197, 214, 239, 0.82);
  font-size: 0.92rem;
}

.perf-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.time-header {
  display: flex;
  position: sticky;
  top: var(--timeline-sticky-top);
  z-index: 120;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  margin-bottom: 0;
  border: 1px solid rgba(87, 233, 255, 0.28);
  box-shadow: 0 10px 24px rgba(4, 26, 34, 0.34);
  /* Opaque base so channel rows never show through while sticky */
  background: #0d3b54;
}

.time-header-spacer {
  width: 164px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px 0;
  color: #e6e6e6;
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  box-shadow: none;
  /* Use same vertical gradient as the time header track for visual continuity */
  background: linear-gradient(180deg, #0f4d66 0%, #0d3b54 100%);
  /* Copiado literal de .channel-info */
  /* Si .channel-info cambia, cambiar aquí también */
  /* width, padding, display, align-items, gap, flex-shrink ya están igualados */
  border-right: none;
  border-radius: 10px 0 0 0;
}

.time-header-spacer::before {
  content: 'GUIA TV';
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  box-shadow: none;
  padding: 0;
  margin: 0;
  letter-spacing: inherit;
  text-transform: inherit;
}

.time-header-track {
  display: grid;
  grid-template-columns: repeat(24, 180px);
  align-items: center;
  min-height: 40px;
  background: linear-gradient(180deg, #0f4d66 0%, #0d3b54 100%);
  position: relative;
  position: relative;
}

.time-header-scroll {
  z-index: 120;
  border-radius: 0 10px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #2dd4bf #0e2a3c;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
  position: relative;
  /* Fully opaque so the content below doesn't show through */
  background: linear-gradient(180deg, #0c3d4e 0%, #0a2d40 100%);
  /* padding-left eliminado para alineación precisa */
}

/* Blinking "highlighter" to indicate the timeline can be dragged (only while hint is visible) */
.time-header.timeline-scroll-hint {
  position: sticky; /* keep existing behavior, ensures pseudo-element anchors correctly */
}

.time-header.timeline-scroll-hint::after {
  content: none;
}

@keyframes tvguia-attention-sheen {
  0%, 100% {
    opacity: 0;
    background-position: center, 0% 0%;
  }
  50% {
    opacity: 1;
    background-position: center, 100% 0%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .time-header.timeline-scroll-hint::after {
    content: none;
  }
}

/* Timeline drag hint: line + moving hand overlaid on the timeline */
.timeline-drag-hint {
  position: absolute;
  top: 15px;
  bottom: 0;
  left: 164px; /* match .time-header-spacer width */
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 140;
  --hand-size: 30px;
}

/* Keep the timeline scroll hint animating even when 'hidden' so it doesn't restart with visible jumps */
#scroll-hint.hidden {
  display: flex !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.timeline-drag-hint .scroll-hint-line {
  width: min(320px, 58%);
  height: 26px;
}

.timeline-drag-hint .scroll-hint-line::before {
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.10)
  );
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.20),
    0 0 34px rgba(255, 255, 255, 0.14);
  animation: scroll-hint-line-glow 1.35s ease-in-out infinite;
}

.timeline-drag-hint .scroll-hint-hand-icon {
  color: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.18)) drop-shadow(0 0 28px rgba(255, 255, 255, 0.14));
}

@keyframes scroll-hint-line-glow {
  0%, 100% {
    opacity: 0.66;
    box-shadow:
      0 0 12px rgba(255, 255, 255, 0.18),
      0 0 26px rgba(255, 255, 255, 0.12);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.28),
      0 0 46px rgba(255, 255, 255, 0.20);
  }
}

@keyframes scroll-hint-hand-glow {
  0%, 100% {
    opacity: 0.82;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes scroll-hint-hand-halo {
  0%, 100% {
    opacity: 0.22;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.78;
    transform: scale(1.08);
  }
}

.time-header-scroll.dragging {
  cursor: grabbing;
}

.time-header-scroll::-webkit-scrollbar {
  height: 6px;
}

.time-header-scroll::-webkit-scrollbar-thumb {
  background: #2dd4bf;
  border-radius: 3px;
}

@media (min-width: 601px) {
  .time-header {
    margin-bottom: 0;
    box-shadow: 0 12px 28px rgba(4, 26, 34, 0.4), 0 0 0 1px rgba(87, 233, 255, 0.18);
  }



  .time-header-scroll {
    position: relative;
    border-left: 1px solid rgba(153, 243, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(87, 233, 255, 0.18), inset 0 -10px 20px rgba(0, 0, 0, 0.16);
  }

  /* Make the spacer match the stronger desktop gradient/shadow */
  .time-header-spacer {
    background: linear-gradient(180deg, #13607c 0%, #0d3e58 100%);
    box-shadow: none;
    border-right: none;
  }

  .time-header-track {
    background: linear-gradient(180deg, #13607c 0%, #0d3e58 100%);
  }

  .hour-tick {
    border-left-color: rgba(202, 248, 255, 0.24);
  }
}

.hour-tick {
  font-size: 0.72rem;
  opacity: 0.8;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 4px;
}

.hour-tick.day-start {
  border-left: 2px solid rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.08);
  font-weight: 700;
}

.now-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    #2dd4bf 0 4px,
    transparent 4px 7px
  );
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.7);
  pointer-events: none;
}

.now-marker-label {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  top: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(180deg, #0c3d4e 0%, #0a2d40 100%);
  border: 1px solid rgba(45, 212, 191, 0.28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(87, 233, 255, 0.10);
  white-space: nowrap;
  pointer-events: none;
  z-index: 120;
}

.channel-row {
  display: flex;
  background: #16213e;
  border-radius: 0 !important;
  overflow: hidden;
  min-height: 70px;
}

.channel-row + .channel-row {
  margin-top: 3px;
}

.tv-grid > .channel-row:first-of-type {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.channel-info {
  width: 164px;
  padding: 10px 10px 10px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #2d4fa3 0%, #1a1a2e 100%);
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 10;
}

.channel-info img {
  width: 96%;
  height: 96%;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.channel-info img.logo-small {
  width: auto;
  height: auto;
  background: none;
}

.logo-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 5px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.logo-wrap img.logo-small {
  max-height: 24px;
  max-width: 36px;
  width: auto;
  height: auto;
  display: block;
}

/* ETB: agrandar solo la imagen (no el wrapper) */
.channel-info .logo-wrap img.logo-etb-large {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
  transform: scale(1.45);
  transform-origin: center;
}

/* channel-level category badges removed — icons are shown on program cards only */

.logo-fallback {
  width: 45px;
  height: 35px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #243b55, #141e30);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.channel-info span {
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  margin-left: 6px;
  margin-top: 4px;
}

.favorite-toggle {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  --fav-icon-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 2px;
  z-index: 2;
}

.favorite-toggle .favorite-icon {
  display: block;
  width: var(--fav-icon-size);
  height: var(--fav-icon-size);
  min-width: var(--fav-icon-size);
  min-height: var(--fav-icon-size);
  max-width: var(--fav-icon-size);
  max-height: var(--fav-icon-size);
  aspect-ratio: 1 / 1;
  transform-origin: 50% 50%;
  overflow: visible;
  flex: 0 0 auto;
  opacity: 0.85;
}

.favorite-toggle .favorite-icon path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.favorite-toggle.active {
  color: #f06292;
}

.favorite-toggle.active .favorite-icon {
  opacity: 1;
}

.favorite-toggle.active .favorite-icon path {
  fill: #f06292;
  stroke: none;
}

.favorite-top-right {
  position: absolute;
  top: 6px;
  right: 8px;
}

.programs {
  flex: 1;
  overflow: hidden;
}

.programs-track {
  position: relative;
  min-height: 70px;
  height: 70px;
}

.program {
  position: absolute;
  top: 0;
  bottom: 0;
  min-height: 70px;
  height: 100%;
  padding: 14px 15px 10px 15px;
  border-left: 1px solid #1a1a2e;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 4px;
  overflow: hidden;
}

.program:hover {
  background: #1f4068;
}

/* Render gaps with an explicit, muted placeholder block (no EPG data) */
.program.nodata {
  cursor: default;
  background: #1a1a2e;
  border-left: 1px solid #1a1a2e;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.program.nodata:hover {
  background: #1a1a2e;
}

/* Program genre badge (small, minimal icon at top-right of program card) */
.program svg.genre-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  z-index: 11;
  pointer-events: none;
  display: block;
}

/* color by genre */
.program svg.genre-icon[data-genre="movie"] { color: #ffffff; }
.program svg.genre-icon[data-genre="series"] { color: #ffffff; }
.program svg.genre-icon[data-genre="sports"] { color: #ffffff; }
.program svg.genre-icon[data-genre="documentary"] { color: #ffffff; }
.program svg.genre-icon[data-genre="news"] { color: #ffffff; }
.program svg.genre-icon[data-genre="kids"] { color: #ffffff; }
.program svg.genre-icon[data-genre="music"] { color: #ffffff; }
.program svg.genre-icon[data-genre="other"] { color: #ffffff; }

/* Force icons to render in white while preserving stroke shapes */
.program svg.genre-icon {
  color: #ffffff !important;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.45));
}

/* Ensure SVG paths use currentColor for stroke and do NOT get filled; lock size */
.program svg.genre-icon * {
  stroke: currentColor !important;
  fill: none !important;
  vector-effect: non-scaling-stroke !important;
}

/* Gold cards: category icon should be black and lighter (not bold) */
.program.gold svg.genre-icon,
.program.filter-match-gold svg.genre-icon,
.program.current.gold svg.genre-icon {
  color: #000000 !important;
  filter: none;
}

/* Gold cards: slightly lighter icon stroke */
.program.gold svg.genre-icon *,
.program.filter-match-gold svg.genre-icon *,
.program.current.gold svg.genre-icon * {
  stroke-width: 1.4 !important;
}

/* Pink/current cards: keep icon from looking too bold */
.program.current svg.genre-icon *,
.program.filter-match-pink svg.genre-icon *,
.program.current.filter-match-pink svg.genre-icon * {
  stroke-width: 1.6 !important;
}

.program svg.genre-icon { min-width:18px; min-height:18px; max-width:18px; max-height:18px; }

.program.current {
  /* Pink gradient: left stronger -> right lighter */
  background: linear-gradient(90deg, #7a0c3d 0%, #b11663 48%, #ff6fb0 100%);
  border: 1px solid rgba(224, 43, 120, 0.66);
  box-shadow: 0 10px 28px rgba(122, 12, 61, 0.28);
  text-shadow: 0 1px 2px rgba(0,0,0,0.42);
  animation: current-program-glow 3.4s ease-in-out infinite;
}

/* glossy highlight layer for current pink cards (not for gold) */
.program.current:not(.gold)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background: radial-gradient(120% 90% at 14% 10%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 58%);
  pointer-events: none;
}


.program.current.gold {
  color: #111 !important;
  border: 1px solid #8a5a00 !important;
  font-weight: bold;
  box-shadow:
    0 10px 28px rgba(225,184,0,0.16),
    0 0 0 1px rgba(17, 17, 17, 0.22) inset !important;
  animation: none !important;
}

/* glossy highlight layer for current gold cards (similar to current pink cards) */
.program.current.gold::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background: radial-gradient(120% 90% at 14% 10%, rgba(255,224,102,0.18) 0%, rgba(255,224,102,0) 60%);
  pointer-events: none;
}

/* Animación para el siguiente recomendado solo en filtro upcoming-recommended */
.upcoming-recommended-animate {
  /* El fondo animado se renderiza exclusivamente en ::before;
     no establecer background/animation aquí para evitar overrides */
  z-index: 5 !important;
  position: relative !important;
  transform-origin: center center;
}

/* Re-assert animated background layers after other card variants (e.g. filter-match-* using ::after).
   Also make it resilient when JS sets --bg-a/--bg-b to 'none'. */
.program.after-23-animate.after-23-animate::before,
.program.upcoming-recommended-animate.upcoming-recommended-animate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 4px;
  background-image: var(--bg-a), linear-gradient(135deg, #1f4068 0%, #164a73 100%);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.program.after-23-animate.after-23-animate::after,
.program.upcoming-recommended-animate.upcoming-recommended-animate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background-image: var(--bg-b), linear-gradient(135deg, #01121a 0%, #032433 100%);
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: upcoming-recommended-crossfade 2.8s ease-in-out infinite;
  pointer-events: none;
}

/* Ensure gold recommended cards show readable dark text */
.program.gold,
.program.current.gold {
  color: #111 !important;
}

/* Ensure title/time specifically visible on gold cards */
.program.gold .title,
.program.gold .time,
.program.current.gold .title,
.program.current.gold .time {
  color: #111 !important;
}

@keyframes upcoming-recommended-blink-strong {
  0% {
    background-color: #062b44;
    box-shadow: 0 0 6px 2px rgba(30,111,160,0.12);
  }
  40% {
    background-color: #114e78;
    box-shadow: 0 0 18px 6px rgba(30,111,160,0.22);
  }
  60% {
    background-color: #1e6fa0;
    box-shadow: 0 0 22px 8px rgba(30,111,160,0.26);
  }
  100% {
    background-color: #062b44;
    box-shadow: 0 0 6px 2px rgba(30,111,160,0.12);
  }
}

@keyframes upcoming-recommended-pulse {
  0% {
    box-shadow: 0 0 6px 2px rgba(30,111,160,0.12);
    filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  }
  40% {
    box-shadow: 0 0 20px 8px rgba(30,111,160,0.28);
    filter: drop-shadow(0 6px 12px rgba(16,78,120,0.12));
  }
  60% {
    box-shadow: 0 0 26px 10px rgba(30,111,160,0.34);
    filter: drop-shadow(0 8px 18px rgba(16,78,120,0.16));
  }
  100% {
    box-shadow: 0 0 6px 2px rgba(30,111,160,0.12);
    filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  }
}

@keyframes current-program-glow {
  0%, 100% {
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.06);
    filter: brightness(1);
  }

  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(233, 69, 96, 0.22);
    filter: brightness(1.03);
  }
}

@keyframes current-program-gold-glow {
  0%, 100% {
    box-shadow: 0 14px 34px rgba(224, 184, 0, 0.32), 0 0 0 1px #ffe06644;
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 18px 40px rgba(224, 184, 0, 0.5), 0 0 0 1px #ffe06688, 0 0 0 6px #ffe06622;
    transform: translateY(-1px);
  }
}

/* Asegura que el texto de la estrella sea visible en fondo dorado */
.program.current.gold .recommended-star {
  color: #ffad00;
  text-shadow: none !important;
}

.program.past {
  opacity: 0.5;
}

.program .time {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-bottom: 0 !important;
  font-weight: 600;
  position: relative;
  background: transparent;
}

/* When a card shows the time, take it out of flow so 2 title lines always fit */
.program.has-time .time {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 30px;
  margin-bottom: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.program .title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  line-clamp: 2 !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  white-space: normal !important;
  word-break: break-word !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-top: 0 !important;
  padding-bottom: 2px !important;
}

.program.has-time .title {
  margin-top: 18px !important;
}

.program .category {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Force identical text layout for all program states (current, gold, animated, etc.)
   so titles/times/categories behave the same regardless of card color. */
.program .title,
.program.current .title,
.program.gold .title,
.program.recommended-border .title,
.program.upcoming-recommended-animate .title,
.program.after-23-animate .title,
.program.current.gold .title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  line-clamp: 2 !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Inner wrapper should NOT clamp; clamping is handled by .program .title */
.title-inner {
  display: inline !important;
  overflow: visible !important;
  white-space: inherit !important;
  word-break: inherit !important;
  line-height: inherit !important;
  max-height: none !important;
  width: 100% !important;
}

.program .time,
.program.current .time,
.program.gold .time,
.program.recommended-border .time,
.program.upcoming-recommended-animate .time,
.program.after-23-animate .time {
  line-height: 1.15;
}

.program.compact {
  padding: 8px 10px;
}

.program.compact .time {
  margin-bottom: 4px !important;
}

.program.compact .title {
  font-size: 0.78rem;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

.program.full {
  padding: 12px 15px 8px 15px;
}

.program.full .time {
  margin-bottom: 4px !important;
}

.program.full .title,
.program.compact .title {
  line-height: 1.25 !important;
}

.program.tiny {
  padding: 7px 8px;
}

.program.tiny .time {
  font-size: 0.67rem;
  margin-bottom: 2px;
}

.program.tiny .title {
  font-size: 0.68rem;
  line-height: 1.22 !important;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

.program.tiny .category {
  display: none;
}

.program.micro {
  padding: 4px 5px;
}

.program.micro .time,
.program.micro .category {
  display: none;
}

.program.micro .title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  font-size: 0.62rem;
  line-height: 1.18;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #16213e;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: 640px;
  max-height: 78vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 40px rgba(6,10,22,0.6);
}

.hidden {
  display: none !important;
}

.modal-header-block {
  margin-bottom: 14px;
  padding-right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Modal-scoped logo sizing and tweaks to avoid changing global .logo-wrap */
  .modal .logo-wrap {
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
}
.modal .modal-channel-logo {
  height: 32px !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Fallback square with initials when channel logo is not available */
.modal-logo-fallback {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0a2236;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Poster inserted into modal */
.modal-body-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.modal-body-top .description {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.modal-poster {
  display: none;
  width: 132px;
  flex: 0 0 132px;
}

.modal-poster.has-poster {
  display: block;
}

.modal-poster-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

@media (max-width: 640px) {
  .modal-body-top {
    flex-direction: column;
  }

  .modal-poster {
    width: 170px;
    flex: 0 0 auto;
  }

  .modal-content { padding: 12px; max-width: 94vw; }
  .modal-header-block { flex-direction: column; align-items: flex-start; gap: 8px; }
  .modal h2 { font-size: 1.05em; }
}

.modal-kicker {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fb8e8;
  margin-bottom: 8px;
  font-weight: 700;
}

.modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.modal-time {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffd166;
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-chip {
  background: rgba(255, 255, 255, 0.08);
  --modal-chip-border-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--modal-chip-border-color);
  color: #d8e7ff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.2;
}

/* Score chip: show a small decorative star "sticker" only when score >= 7 */
.modal-chip.modal-chip-score {
  position: relative;
  overflow: visible;
}

.modal-chip.modal-chip-score.score-good::after {
  content: "★";
  position: absolute;
  top: -6px;
  right: -5px;
  color: #ffcc33;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.35);
  transform: rotate(12deg);
  pointer-events: none;
}

/* Age / audience classification chips (pill shape, compact) */
.modal-chip.modal-chip-age {
  /* Keep same visual size as other chips, but bolder */
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.76rem;
  padding: 5px 10px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
}

.modal-chip.modal-chip-age.age-tp {
  background: #25c06d;
  border-color: #118e49;
  color: #062015;
}

.modal-chip.modal-chip-age.age-18 {
  background: #e53935;
  border-color: #a51412;
  color: #ffffff;
}

.modal-chip.modal-chip-age.age-16 {
  background: #ff8f00;
  border-color: #b05f00;
  color: #1b0f00;
}

.modal-chip.modal-chip-age.age-12 {
  background: #ffd166;
  border-color: #c19a2c;
  color: #1b1200;
}

.modal-chip.modal-chip-age.age-7 {
  background: #4fc3f7;
  border-color: #1e88c8;
  color: #04121a;
}

.modal-chip.modal-chip-age.age-0 {
  background: #9ad66d;
  border-color: #4a8f2a;
  color: #0d1a05;
}

.modal-body-block {
  /* Remove thin top border to avoid duplicate separators; keep spacing */
  border-top: none;
  padding-top: 16px;
}

.modal-live-cta-wrap {
  margin-top: 10px;
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.modal-feedback {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-right: 0;
  padding-right: 0;
}

/* Keep action CTAs pinned to the right (share is always present) */
.modal-actions-row .modal-share-trigger {
  margin-left: auto;
}

.modal-feedback-label {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1;
}

.modal-feedback-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-feedback-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.12;
}

.modal-feedback-btn:hover {
  background: rgba(255, 255, 255, 0.10);
}

.modal-feedback-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}

.modal-feedback-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.modal-feedback-text {
  display: inline-block;
  line-height: 1;
}

.modal-feedback-btn.is-selected[data-vote="1"] {
  border-color: rgba(37, 192, 109, 0.55);
}

.modal-feedback-btn.is-selected[data-vote="1"] .modal-feedback-icon {
  color: #25c06d;
}

.modal-feedback-btn.is-selected[data-vote="-1"] {
  border-color: rgba(215, 38, 61, 0.55);
}

.modal-feedback-btn.is-selected[data-vote="-1"] .modal-feedback-icon {
  color: rgb(215, 38, 61);
}

.modal-live-cta {
  width: fit-content;
  max-width: 100%;
  justify-content: center;
  border: 1px solid rgba(255, 243, 191, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
  color: #222;
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  line-height: 1.12;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38), 0 6px 16px rgba(17, 24, 39, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.modal-live-cta-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.modal-live-cta-note {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(34, 34, 34, 0.72);
  line-height: 1.1;
}

button.modal-live-cta {
  appearance: none;
  -webkit-appearance: none;
}

.modal-action-btn {
  font-size: 0.78rem;
  padding: 4px 10px;
  gap: 6px;
  align-items: center;
}

.modal-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.modal-action-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.modal-action-label {
  display: inline-block;
  line-height: 1;
}

.modal-action-pill {
  font-weight: 500;
}

/* Share submodal (platform picker) */
.modal-submodal-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.55);
  z-index: 5;
}

.modal-submodal-overlay.is-open {
  display: flex;
}

.modal-submodal {
  width: min(420px, calc(100% - 12px));
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  box-shadow: 0 12px 40px rgba(6,10,22,0.6);
}

.modal-submodal-title {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(143, 184, 232, 0.95);
  margin: 2px 0 10px 0;
}

.modal-submodal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

/* Submodal buttons: no border/halo, consistent alignment */
.modal-submodal .modal-live-cta {
  width: 100%;
  justify-content: flex-start;
  box-shadow: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.18s ease;
}

.modal-submodal .modal-live-cta:hover {
  box-shadow: none;
  filter: none;
  transform: none;
  background: rgba(255, 255, 255, 0.11);
}

.modal-submodal .modal-action-btn {
  padding: 6px 10px;
  font-size: 0.82rem;
  gap: 8px;
  align-items: center;
}

.modal-submodal .modal-action-label {
  line-height: 1;
}

/* Share trigger + platform icon accents */
.modal-share-trigger .modal-action-icon {
  color: #25c06d;
}

/* Share trigger should match the primary CTA height */
.modal-share-trigger {
  font-size: 0.84rem;
  padding: 4px 10px;
  gap: 8px;
}

.modal-submodal-actions [data-share-action="whatsapp"] .modal-action-icon {
  color: #25c06d;
}

.modal-submodal-actions [data-share-action="facebook"] .modal-action-icon {
  color: #1e88c8;
}

.modal-submodal-actions [data-share-action="x"] .modal-action-icon {
  color: #111;
  background: #fff;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.12);
}

.modal-submodal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.modal-live-cta-icon {
  display: inline-block;
  color: rgb(215, 38, 61);
  line-height: 1;
  font-size: 1.05em;
}

.modal-live-cta:hover {
  transform: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38), 0 6px 16px rgba(17, 24, 39, 0.22);
  filter: none;
}

.modal-live-cta:focus-visible {
  outline: 2px solid rgba(255, 209, 102, 0.55);
  outline-offset: 3px;
}

.modal-external {
  margin: 10px 0 6px 0;
}

.modal-affiliate {
  width: 100%;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modal-affiliate:hover,
.modal-affiliate:focus-within {
  border-color: rgba(255, 209, 102, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.12);
}

.modal-affiliate .modal-external-row {
  justify-content: flex-start;
}

.modal-affiliate .modal-external-link {
  text-align: center;
  width: 100%;
  justify-content: flex-start;
  padding: 2px 6px;
  border: none;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-affiliate .modal-external-link:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.98);
}

.modal-affiliate-logo {
  width: auto;
  height: 16px;
  max-width: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}

.modal-affiliate-text {
  display: inline-block;
  line-height: 1.2;
}

.modal-affiliate-name {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.7;
  flex: 0 0 auto;
  white-space: nowrap;
}

.modal-affiliate .modal-external-link:focus-visible {
  outline: 2px solid rgba(255, 209, 102, 0.55);
  outline-offset: 3px;
}

.modal-external-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(143, 184, 232, 0.95);
  margin-bottom: 6px;
}

.modal-external-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.modal-chip.modal-chip-imdb {
  background: rgba(255, 209, 102, 0.12);
  border-color: rgba(255, 209, 102, 0.35);
  color: #ffeab6;
}

.modal-external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #d8e7ff;
  text-decoration: none;
  font-size: 0.76rem;
  line-height: 1.2;
}

/* Modal primary action: "Ver online" (when live URL exists) */
.modal-live-link {
  margin-left: auto;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18) inset,
    0 8px 18px rgba(0, 0, 0, 0.22);
  text-decoration: none;
}

.modal-live-link:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10));
}

.modal-live-link:focus-visible {
  outline: 2px solid rgba(255, 209, 102, 0.55);
  outline-offset: 2px;
}

.modal-external-link:hover {
  background: rgba(255, 255, 255, 0.09);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal h2 {
  margin-bottom: 10px;
  color: #ffffff;
  line-height: 1.2;
}

.modal .meta {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 15px;
}

.modal .description {
  line-height: 1.6;
  color: #edf3ff;
  font-size: 0.85em;
}

.modal-facts {
  margin-top: 14px;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.modal-facts li + li {
  margin-top: 8px;
}

.modal-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px 12px;
  font-size: 0.75em;
  margin-bottom: 8px;
}
.modal-facts-grid div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.modal-facts-grid strong {
  color: #ffe066;
  font-weight: 600;
  font-size: 0.97em;
  margin-bottom: 1px;
  white-space: nowrap;
}
.modal-facts-grid span {
  color: #eee;
  font-size: 0.96em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-jump-btn {
  position: fixed;
  right: calc(var(--side-banner-width) + var(--side-banner-gap) + 18px);
  bottom: 18px;
  z-index: 1100;
  border: 1px solid rgba(255, 243, 191, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%) !important;
  color: #222 !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48), 0 6px 16px rgba(17, 24, 39, 0.28), 0 0 0 5px rgba(255, 209, 102, 0.22);
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: saturate(1) blur(0);
  will-change: transform, opacity;
  transition: transform 0.62s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.58s ease, box-shadow 0.3s ease, filter 0.58s ease;
  animation: now-button-breathe 3.2s ease-in-out infinite;
}

.now-jump-btn.now-jump-btn-pop {
  animation: now-button-pop-in 0.62s cubic-bezier(0.16, 1, 0.3, 1), now-button-breathe 3.2s ease-in-out 0.62s infinite;
}

.now-jump-btn-dot {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  animation: live-dot-pulse 1.8s ease-in-out infinite;
}

.now-jump-btn-label {
  white-space: nowrap;
}

.now-jump-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.54), 0 8px 18px rgba(17, 24, 39, 0.32), 0 0 0 7px rgba(255, 209, 102, 0.28);
  filter: saturate(1.04);
}

.now-jump-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(42px) scale(0.56) rotate(-7deg);
  filter: saturate(0.55) blur(4.6px);
  animation: none;
}


.scroll-hint {
  position: fixed;
  top: 116px;
  right: calc(var(--side-banner-width) + var(--side-banner-gap) + 18px);
  z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(8, 19, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #dbe8ff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  animation: none;
  overflow: hidden;
}

/* Synced emphasis with the timeline hint */
.scroll-hint::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 140% at 50% 50%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.00) 62%),
    linear-gradient(90deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.16) 45%, rgba(255,255,255,0.00) 100%);
  background-size: 100% 100%, 220% 100%;
  background-position: center, 0% 0%;
  opacity: 0;
  animation: tvguia-attention-sheen 1.25s ease-in-out infinite;
}

.scroll-hint > * {
  position: relative;
  z-index: 1;
}

.scroll-hint-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(126, 203, 255, 0.22);
    text-shadow: 0 1px 6px #fffbe6;
    padding-left: 0.5em;
}

.scroll-hint-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
    font-size: 1.2em;
    color: #7ecbff;
}

.scroll-hint-line {
  position: relative;
  width: 78px;
  height: 24px;
  overflow: visible;
  --hand-size: 28px;
}

.scroll-hint-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(143, 184, 232, 0.28), rgba(255, 255, 255, 0.08));
  transform: translateY(-50%);
}

.scroll-hint-hand-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: var(--hand-size);
  will-change: transform;
  animation: scroll-hint-hand-slide 2.6s linear infinite alternate;
}

.scroll-hint-hand-icon {
  position: relative;
  display: block;
  width: var(--hand-size);
  height: var(--hand-size);
  color: #f7fbff;
  opacity: 0.96;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.14));
  animation: scroll-hint-hand-glow 1.35s ease-in-out infinite;
}

.scroll-hint-hand-icon::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.00) 72%);
  opacity: 0.32;
  pointer-events: none;
  animation: scroll-hint-hand-halo 1.35s ease-in-out infinite;
}

.scroll-hint-hand-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.scroll-hint-hand-icon .hand-fill {
  fill: #ffffff;
}

.scroll-hint-hand-icon .hand-stroke {
  fill: none;
  stroke: #11233f;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes live-dot-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.18), 0 0 12px rgba(215, 38, 61, 0.45);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 7px rgba(215, 38, 61, 0.12), 0 0 18px rgba(215, 38, 61, 0.62);
  }
}

@keyframes now-button-breathe {
  0%, 100% {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48), 0 6px 16px rgba(17, 24, 39, 0.28), 0 0 0 5px rgba(255, 209, 102, 0.22);
    filter: saturate(1);
  }

  50% {
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.54), 0 8px 20px rgba(17, 24, 39, 0.34), 0 0 0 8px rgba(255, 209, 102, 0.18);
    filter: saturate(1.05);
  }
}

@keyframes now-button-pop-in {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.52) rotate(-8deg);
    filter: saturate(0.5) blur(5px);
  }

  62% {
    opacity: 1;
    transform: translateY(-6px) scale(1.08) rotate(0deg);
    filter: saturate(1.06) blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: saturate(1) blur(0);
  }
}

@keyframes current-program-glow {
  0%, 100% {
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.06);
    filter: brightness(1);
  }

  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(233, 69, 96, 0.22);
    filter: brightness(1.03);
  }
}

@keyframes scroll-hint-hand-slide {
  0% {
    transform: translate3d(2px, -50%, 0);
  }

  100% {
    transform: translate3d(calc(100% - var(--hand-size) - 2px), -50%, 0);
  }
}


@media (prefers-reduced-motion: reduce) {
  .scroll-hint::before {
    animation: none;
    opacity: 0.75;
    background-position: center, 60% 0%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .program.current,
  .now-jump-btn,
  .now-jump-btn-dot,
  .modal-live-cta-icon,
  .scroll-hint-hand-track,
  .scroll-hint-hand-icon,
  .scroll-hint-hand-icon::after,
  .scroll-hint {
    animation: none;
  }
}

/* Footer Styles */
.page-footer {
  background: linear-gradient(90deg, #0f3460 0%, #16213e 100%);
  border-top: 2px solid rgba(143, 184, 232, 0.22);
  box-shadow: none;
  color: #eaf6ff;
  padding: 28px 0 18px 0;
  margin-top: auto;
  flex-shrink: 0;
  font-size: 1rem;
  text-align: center;
  width: 100vw;
  margin-left: calc(-1 * (var(--side-banner-width) + var(--side-banner-gap)));
  margin-right: calc(-1 * (var(--side-banner-width) + var(--side-banner-gap)));
  left: 0;
  position: relative;
}

.footer-container {
  max-width: var(--layout-max-width);
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 0 15px;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  filter: none !important;
}

.footer-section h3 {
  color: #e94590;
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(238, 238, 238, 0.8);
  margin-bottom: 8px;
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section li {
  font-size: 0.9rem;
}

.footer-section a {
  color: #8fb8e8;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.footer-section a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 20px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: rgba(238, 238, 238, 0.6);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 5px 0;
}

.footer-credits {
  font-size: 0.8rem;
  color: rgba(238, 238, 238, 0.5);
}

@media (max-width: 600px) {
  body,
  body.has-side-banners {
    --side-banner-width: 0px;
    --side-banner-gap: 10px;
    padding-inline: 0;
  }

  header,
  .channel-filters,
  #loading,
  .tv-grid {
    width: 100%;
  }

  header {
    flex-direction: column;
    text-align: center;
  }

  .channel-filters {
    justify-content: center;
    padding-top: 8px;
  }

  .brand {
    justify-content: center;
    width: 100%;
  }

  .site-logo {
    width: 300px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-right: 0.5em;
    flex-shrink: 0;
  }

  .modal-content {
    padding: 18px;
    max-height: 76vh;
  }

  .modal-header-block {
    margin-bottom: 12px;
    padding-right: 24px;
  }

  /* Mantener el efecto SOLO de fondo en móvil también (sin glow de borde) */
  .program.after-23-animate:not(.current),
  .program.upcoming-recommended-animate:not(.current) {
    animation: none !important;
    -webkit-animation: none !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .modal h2 {
    font-size: 1.08rem;
    margin-bottom: 8px;
  }

  .modal-kicker {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }

  .modal-time {
    font-size: 0.8rem;
  }

  .modal-chip {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .modal-body-block {
    padding-top: 12px;
  }

  .modal .description {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .modal-facts {
    margin-top: 10px;
    font-size: 0.82rem;
  }

  .modal-facts li + li {
    margin-top: 6px;
  }

  .time-header-spacer,
  .channel-info {
    width: 112px;
  }

  .time-header-track {
    grid-template-columns: repeat(24, 180px);
  }
  
  .channel-info {
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }
  
  .channel-info {
    width: 164px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f3460;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 10;
    position: relative;
  }

  
  /* .channel-info span { font-size: 0.7rem; }  Eliminado para que prevalezca el tamaño mayor */
  
  .program {
    min-width: 0;
    padding: 8px 10px;
  }

  .now-jump-btn {
    right: 12px;
    bottom: 12px;
    padding: 9px 14px;
  }

  .scroll-hint {
    display: none;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    filter: none !important;
  }
  
  .page-footer {
    padding: 0 !important;
    margin-top: auto !important;
  }
  
  .footer-section h3 {
    font-size: 0.95rem;
  }
  
  .footer-section p {
    font-size: 0.9rem;
  }
  
  .footer-section li {
    font-size: 0.85rem;
  }
  
  .footer-bottom {
    padding: 15px 10px;
  }
  
  .footer-bottom p {
    font-size: 0.8rem;
  }
  
  .footer-credits {
    font-size: 0.75rem;
  }

  .legal-footer-fav-left {
    position: static;
    transform: none;
    margin-bottom: 14px;
  }

  .legal-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px;
  }

  .legal-footer .legal-links {
    font-size: 0.82rem;
    gap: 12px;
  }

  .legal-footer .legal-social {
    font-size: 0.82rem;
  }

  .legal-footer-copy {
    font-size: 0.78rem;
  }

}

/* --- Pie de página legal minimalista --- */
.legal-footer {
  background: #0f3460;
  color: #dbe8ff;
  padding: 24px 0 12px 0;
  margin-top: auto;
  border-top: 2px solid #1a1a2e;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
  position: relative;
}
.legal-footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo links"
    "social social"
    "copy copy";
  align-items: center;
  gap: 10px 14px;
  padding: 0 12px;
}

.legal-footer-fav-left {
  grid-area: logo;
  position: static;
  transform: none;
  width: 56px;
  height: 56px;
  opacity: 0.92;
}

.legal-footer .legal-links {
  grid-area: links;
  justify-self: center;
  font-size: 0.84rem;
  gap: 14px;
}

.legal-social {
  grid-area: social;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.legal-social .footer-social-label {
  color: inherit;
  font-weight: 600;
  opacity: 0.9;
}

.legal-footer .legal-social {
  font-size: 0.84rem;
}

.legal-footer-copy {
  grid-area: copy;
  justify-self: center;
}

/* --- Bloque de canales (sobre el pie legal) --- */
.channels-block {
  background: transparent;
  color: #dbe8ff;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.channels-block-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 12px 30px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.channels-block-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.channels-block-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.channels-block-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.channels-block-label svg {
  width: 20px;
  height: 20px;
  opacity: 0.95;
}
.legal-links {
  display: flex;
  gap: 18px;
  font-size: 1.02rem;
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: center;
}
.legal-links.channel-links {
  gap: 7px;
  font-size: calc(0.76rem - 1px);
  font-weight: 400;
  max-width: 1100px;
  line-height: 1.15;
}

.legal-links.channel-links a {
  font-weight: 400;
}
.legal-links a,
.legal-social a {
  color: #7ecbff;
  text-decoration: none;
  transition: color 0.18s;
}
.legal-links a:hover,
.legal-social a:hover {
  color: #ffffff;
  text-decoration: none;
}

.legal-links a.footer-facebook-link,
.legal-social a.footer-facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-links a.footer-facebook-link .footer-social-icon,
.legal-social a.footer-facebook-link .footer-social-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.footer-sep {
  color: #3e5c8a;
  font-size: 1.1em;
  margin: 0 2px;
}
.legal-footer-copy {
  font-size: 0.84rem;
  color: #b3c7e6;
  margin-top: 2px;
}

.legal-footer-copy a.footer-email-link {
  color: #7ecbff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-footer-copy a.footer-email-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.legal-footer-copy a.footer-email-link .footer-email-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.legal-footer-copy .footer-fav {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  opacity: 0.9;
}

/* --- Cookie notice (minimal) --- */
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner-inner {
  max-width: 980px;
  margin: 0 auto;
  background: rgba(15, 52, 96, 0.96);
  border: 1px solid rgba(143, 184, 232, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-banner-text {
  color: #eaf6ff;
  font-size: 0.92rem;
  line-height: 1.35;
}

.cookie-banner-text a {
  color: #7ecbff;
  text-decoration: none;
}

.cookie-banner-text a:hover {
  color: #ffffff;
}

.cookie-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: #eaf6ff;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.cookie-banner-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    justify-content: flex-end;
  }
}
.legal-main {
  max-width: 700px;
  margin: 48px auto 32px auto;
  background: #1a1a2e;
  color: #e6eaff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 36px 28px 32px 28px;
}
.legal-main h1 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #ff6b6b;
}
.legal-main h2 {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 1.18rem;
  color: #eaf6ff;
}
.legal-main p {
  font-size: 1.08rem;
  margin-bottom: 14px;
  color: #dbe8ff;
}
.legal-main ul {
  margin: 10px 0 16px 18px;
  color: #dbe8ff;
}
.legal-main li {
  margin: 8px 0;
  line-height: 1.55;
}
.legal-main a {
  color: #7ecbff;
  text-decoration: none;
}
.legal-main a:hover {
  text-decoration: underline;
}

.legal-updated {
  margin-top: -6px;
  font-size: 0.96rem;
  color: rgba(219, 232, 255, 0.82);
}

.legal-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(12, 61, 78, 0.35);
  border: 1px solid rgba(87, 233, 255, 0.12);
  color: rgba(234, 246, 255, 0.92);
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(26, 26, 46, 0.35);
  border: 1px solid rgba(153, 243, 255, 0.18);
  color: #eaf6ff;
  text-decoration: none;
  font-weight: 600;
}

.legal-back-link:hover {
  background: rgba(26, 26, 46, 0.55);
  text-decoration: none;
}

.recommended-star {
  display: none !important;
}

/* Borde dorado para recomendados fuera de emisión */
.recommended-border {
  border: 1px solid rgba(225,184,0,0.62) !important;
  box-shadow:
    0 0 0 1px rgba(225, 184, 0, 0.14) inset,
    0 0 10px rgba(255, 224, 102, 0.14);
  border-radius: 4px;
}
