/*
 * TST — La Jornada de los Argentinos
 * CSS del módulo — OPCIÓN D: Premium Compacta
 *
 * Versión: 2.0.0 — Rediseño completo con optimización mobile/desktop
 * 
 * Características:
 * - Diseño premium con gradientes y efectos sutiles
 * - Optimización mobile específica (nombres truncados, dobles compactos)
 * - Sin badges redundantes (solo trofeos)
 * - Duraciones de partidos visibles
 * - Headers de torneos clickeables
 * - Traducciones completas al español
 */

/* ═══════════════════════════════════════════════════════
   VARIABLES CSS
═══════════════════════════════════════════════════════ */

:root {
  --tst-jornada-brand-dark: #1E3A5F;
  --tst-jornada-brand-mid: #2B5080;
  --tst-jornada-brand-light: #3A6BA0;
  --tst-jornada-lime: #E1FA59;
  --tst-jornada-wta-dark: #6A4C93;
  --tst-jornada-wta-mid: #8A60B8;
  --tst-jornada-wta-light: #A976DC;
  --tst-jornada-live: #E63946;
  --tst-jornada-win: #2A9D8F;
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN WRAPPER
═══════════════════════════════════════════════════════ */

.tst-jornada {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════
   HEADER DE SECCIÓN — Estilo premium con gradientes
═══════════════════════════════════════════════════════ */

.tst-jornada__header {
  background: linear-gradient(145deg, #0a0f1e 0%, var(--tst-jornada-brand-dark) 40%, var(--tst-jornada-brand-mid) 70%, var(--tst-jornada-brand-light) 100%);
  border-radius: 16px;
  padding: 24px 26px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

/* Mobile: padding más compacto */
@media (max-width: 600px) {
  .tst-jornada__header {
    border-radius: 12px;
    padding: 16px 16px 14px;
    margin-bottom: 12px;
  }
}

/* Efectos decorativos de fondo */
.tst-jornada__header::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(225, 250, 89, 0.13) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

@media (max-width: 600px) {
  .tst-jornada__header::before {
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(225, 250, 89, 0.1) 0%, transparent 70%);
  }
}

.tst-jornada__header::after {
  content: '';
  position: absolute;
  bottom: -70px;
  left: -70px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(117, 170, 219, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tst-jornada__header-inner {
  position: relative;
  z-index: 1;
}

/* Eyebrow */
.tst-jornada__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tst-jornada-lime);
  margin-bottom: 12px;
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(225, 250, 89, 0.15) 0%, rgba(225, 250, 89, 0.08) 100%);
  border-radius: 24px;
  border: 1.5px solid rgba(225, 250, 89, 0.3);
}

@media (max-width: 600px) {
  .tst-jornada__eyebrow {
    font-size: 9px;
    gap: 5px;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(225, 250, 89, 0.25);
  }
}

/* Título */
.tst-jornada__title {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #E8F4FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@media (max-width: 600px) {
  .tst-jornada__title {
    gap: 8px;
    margin: 0 0 8px;
  }
}

.tst-jornada__title-flag {
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 600px) {
  .tst-jornada__title-flag {
    font-size: 1.15rem;
  }
}

/* Selector de fecha con flechas */
.tst-jornada__date-selector {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}

.tst-jornada__date-nav {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  padding: 0;
}

.tst-jornada__date-nav svg {
  width: 18px;
  height: 18px;
}

.tst-jornada__date-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.tst-jornada__date-nav:active {
  transform: scale(0.9);
}

/* Fecha */
.tst-jornada__date {
  font-family: var(--font-body, "Lora", serif);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  min-width: 200px;
  text-align: center;
}

@media (max-width: 600px) {
  .tst-jornada__date-selector {
    gap: 12px;
  }
  
  .tst-jornada__date-nav {
    width: 24px;
    height: 24px;
  }
  
  .tst-jornada__date-nav svg {
    width: 16px;
    height: 16px;
  }
  
  .tst-jornada__date {
    font-size: 12px;
    min-width: 160px;
  }
}

/* ── STATS BOXES ── */

.tst-jornada__stats {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .tst-jornada__stats {
    gap: 8px;
    margin-top: 12px;
  }
}

.tst-jornada__stat {
  flex: 1;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  text-align: center;
}

@media (max-width: 600px) {
  .tst-jornada__stat {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.tst-jornada__stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--tst-jornada-lime);
  line-height: 1;
  margin-bottom: 5px;
}

@media (max-width: 600px) {
  .tst-jornada__stat-val {
    font-size: 18px;
    margin-bottom: 3px;
  }
}

.tst-jornada__stat-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 600px) {
  .tst-jornada__stat-lbl {
    font-size: 9px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
  }
}

/* ── FILTROS ATP / WTA ── */

.tst-jornada__filter-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .tst-jornada__filter-row {
    gap: 6px;
    margin-top: 12px;
  }
}

.tst-jornada__filter {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  color: rgba(225, 250, 255, 0.8);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 600px) {
  .tst-jornada__filter {
    font-size: 10px;
    letter-spacing: 0.03em;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
  }
}

.tst-jornada__filter:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #fff;
  transform: translateY(-2px);
}

.tst-jornada__filter--active {
  background: linear-gradient(135deg, var(--tst-jornada-lime) 0%, #C8E048 100%);
  border-color: var(--tst-jornada-lime);
  color: #0d1628;
  box-shadow: 0 4px 16px rgba(225, 250, 89, 0.4);
}

@media (max-width: 600px) {
  .tst-jornada__filter--active {
    box-shadow: 0 2px 8px rgba(225, 250, 89, 0.35);
  }
}

/* ── FILTROS DE ESTADO (En juego / Próximamente / Finalizados) ── */

.tst-jornada__status-filters {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tst-jornada__status-filter {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tst-jornada__status-filter:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.tst-jornada__status-filter--active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tst-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.tst-status-dot--live {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@media (max-width: 600px) {
  .tst-jornada__status-filters {
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
  }
  
  .tst-jornada__status-filter {
    font-size: 11px;
    padding: 6px 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   GRUPO DE TORNEO
═══════════════════════════════════════════════════════ */

.tst-venue-group {
  background: linear-gradient(135deg, var(--color-background-primary, #fff) 0%, rgba(255, 255, 255, 0.97) 100%);
  border: 1px solid var(--color-border-secondary, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 600px) {
  .tst-venue-group {
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

.tst-venue-group:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--color-border-primary, rgba(0, 0, 0, 0.15));
}

/* Header del torneo */
.tst-venue-group__header {
  background: linear-gradient(135deg, var(--tst-jornada-brand-dark) 0%, var(--tst-jornada-brand-mid) 50%, var(--tst-jornada-brand-light) 100%);
  padding: 14px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .tst-venue-group__header {
    padding: 10px 14px;
    align-items: center;
  }
}

.tst-venue-group__header::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(225, 250, 89, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@media (max-width: 600px) {
  .tst-venue-group__header::before {
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(225, 250, 89, 0.08) 0%, transparent 70%);
  }
}

/* WTA variant */
.tst-venue-group--wta .tst-venue-group__header {
  background: linear-gradient(135deg, var(--tst-jornada-wta-dark) 0%, var(--tst-jornada-wta-mid) 50%, var(--tst-jornada-wta-light) 100%);
}

.tst-venue-group--wta .tst-venue-group__header:hover {
  background: linear-gradient(135deg, #7A5CA3 0%, #9A70C8 50%, #BA86ED 100%);
}

/* Nombre del torneo - ahora es un link */
.tst-jornada__t-link {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.tst-venue-group__name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  .tst-venue-group__name {
    font-size: 12px;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Meta del torneo */
.tst-jornada__t-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 600px) {
  .tst-jornada__t-meta {
    gap: 6px;
    font-size: 9px;
  }
}

.tst-jornada__t-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
  .tst-jornada__t-meta-item {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }
}

.tst-jornada__t-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* Badges */
.tst-jornada__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .tst-jornada__badges {
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }
}

.tst-jornada__circuit-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(225, 250, 89, 0.25) 0%, rgba(225, 250, 89, 0.15) 100%);
  color: var(--tst-jornada-lime);
  border: 1.5px solid rgba(225, 250, 89, 0.4);
  box-shadow: 0 2px 8px rgba(225, 250, 89, 0.2);
}

@media (max-width: 600px) {
  .tst-jornada__circuit-badge {
    font-size: 8px;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(225, 250, 89, 0.35);
  }
}

.tst-jornada__circuit-badge--wta {
  background: linear-gradient(135deg, rgba(232, 217, 249, 0.25) 0%, rgba(232, 217, 249, 0.15) 100%);
  color: #E8D9F9;
  border: 1.5px solid rgba(232, 217, 249, 0.35);
  box-shadow: 0 2px 8px rgba(232, 217, 249, 0.2);
}

@media (max-width: 600px) {
  .tst-jornada__circuit-badge--wta {
    border: 1px solid rgba(232, 217, 249, 0.3);
  }
}

.tst-venue-group__count {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
  .tst-venue-group__count {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 10px;
  }
}

/* Link "Ver cuadro" */
.tst-jornada__cuadro-link {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tst-jornada__cuadro-link:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--tst-jornada-lime);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .tst-jornada__cuadro-link {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
  }
}

/* ═══════════════════════════════════════════════════════
   MATCH ROW — Compacto y optimizado
═══════════════════════════════════════════════════════ */

.tst-venue-group__matches {
  /* Container para los partidos */
}

.tsc-row {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-tertiary, rgba(0, 0, 0, 0.08));
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  gap: 16px;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

@media (max-width: 600px) {
  .tsc-row {
    padding: 10px 14px;
    grid-template-columns: 48px 1fr 68px;
    gap: 10px;
  }
}

/* Efecto hover sutil */
.tsc-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(225, 250, 89, 0.06) 0%, transparent 100%);
  transition: width 0.25s ease;
}

.tsc-row:hover::before {
  width: 100%;
}

.tsc-row:hover {
  background: rgba(245, 248, 250, 0.4);
}

/* Partido en vivo */
.tsc-row--live {
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.05) 0%, rgba(230, 57, 70, 0.02) 50%, transparent 100%);
  border-left: 4px solid var(--tst-jornada-live);
  padding-left: 16px;
}

@media (max-width: 600px) {
  .tsc-row--live {
    background: linear-gradient(90deg, rgba(230, 57, 70, 0.04) 0%, transparent 100%);
    border-left: 3px solid var(--tst-jornada-live);
    padding-left: 11px;
  }
}

.tsc-row--live::before {
  display: none;
}

/* ── COLUMNA META (hora + ronda) ── */

.tsc-col-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .tsc-col-meta {
    gap: 2px;
  }
}

.tsc-meta-time {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text-primary, #1A1A1A);
  letter-spacing: -0.02em;
}

@media (max-width: 600px) {
  .tsc-meta-time {
    font-size: 11px;
    letter-spacing: -0.01em;
  }
}

.tsc-meta-rd {
  font-size: 10px;
  color: var(--color-text-secondary, #5C5C5C);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

@media (max-width: 600px) {
  .tsc-meta-rd {
    font-size: 8px;
    letter-spacing: 0.02em;
  }
}

/* Live badge */
.tsc-meta-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  padding: 4px 9px;
  background: linear-gradient(135deg, var(--tst-jornada-live) 0%, #C42E3A 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
  margin-bottom: 8px;
  width: fit-content;
}

@media (max-width: 600px) {
  .tsc-meta-live {
    gap: 4px;
    font-size: 9px;
    padding: 3px 7px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(230, 57, 70, 0.25);
    margin-bottom: 6px;
  }
}

.tsc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: tst-jornada-pulse 1.3s ease-in-out infinite;
}

@media (max-width: 600px) {
  .tsc-live-dot {
    width: 5px;
    height: 5px;
    animation: tst-jornada-pulse-mobile 1.3s ease-in-out infinite;
  }
}

@keyframes tst-jornada-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0);
  }
}

@keyframes tst-jornada-pulse-mobile {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.75);
  }
}

/* ── COLUMNA PLAYERS ── */

.tsc-col-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .tsc-col-players {
    gap: 5px;
  }
}

.tsc-player {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  transition: transform 0.15s ease;
  min-width: 0;
}

@media (max-width: 600px) {
  .tsc-player {
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
  }
}

.tsc-player:hover {
  transform: translateX(2px);
}

/* Jugador argentino con highlight */
.tsc-player--arg {
  font-weight: 800;
  color: var(--color-text-primary, #1A1A1A);
  position: relative;
}

/* Barra lateral gradiente argentina */
.tsc-player--arg::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #75AADB 0%, var(--tst-jornada-lime) 100%);
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(117, 170, 219, 0.3);
}

@media (max-width: 600px) {
  .tsc-player--arg::before {
    left: -8px;
    width: 3px;
    height: 14px;
    border-radius: 1.5px;
  }
}

/* Bandera */
.tsc-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

@media (max-width: 600px) {
  .tsc-flag {
    width: 16px;
    height: 11px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  }
}

/* Nombre del jugador */
.tsc-pname {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Seed - PEGADO al nombre sin margen */
.tsc-seed {
  font-size: 11px;
  color: var(--color-text-tertiary, #A8A8A8);
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 3px;
}

@media (max-width: 600px) {
  .tsc-seed {
    font-size: 9px;
    margin-left: 2px;
  }
}

/* Trofeo */
.tsc-trophy {
  font-size: 14px;
  margin-left: 4px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .tsc-trophy {
    font-size: 12px;
  }
}

/* Próximo rival */
.tsc-rival-slot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tst-jornada__next-rival {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary, #6B7280);
  background: rgba(59, 130, 246, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.tst-jornada__next-label {
  font-weight: 600;
  color: rgba(59, 130, 246, 0.9);
}

.tst-jornada__next-rival .tsc-flag {
  margin: 0 2px;
}

@media (max-width: 600px) {
  .tst-jornada__next-rival {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* Duración del partido */
.tst-jornada__duration {
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-tertiary, #A8A8A8);
  font-weight: 500;
}

@media (max-width: 600px) {
  .tst-jornada__duration {
    font-size: 10px;
  }
}

/* Walkover y Retiro */
.tsc-status-slot {
  margin-top: 6px;
}

.tst-match-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tst-match-status--walkover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tst-match-status--retirement {
  background: rgba(251, 146, 60, 0.1);
  color: #ea580c;
  border: 1px solid rgba(251, 146, 60, 0.2);
}

@media (max-width: 600px) {
  .tst-match-status {
    font-size: 10px;
    padding: 2px 8px;
  }
}

/* ── COLUMNA SCORE ── */

.tsc-col-score {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .tsc-col-score {
    gap: 3px;
  }
}

.tsc-score-cols {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

@media (max-width: 600px) {
  .tsc-score-cols {
    gap: 3px;
  }
}

.tsc-score-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  font-weight: 800;
}

@media (max-width: 600px) {
  .tsc-score-row {
    gap: 5px;
  }
}

.tsc-s {
  min-width: 32px;  /* Aumentado para acomodar 10 */
  width: 32px;      /* Ancho fijo para alineación */
  text-align: center;
  font-size: 16px;
  font-variant-numeric: tabular-nums;  /* Números monoespaciados */
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .tsc-s {
    min-width: 24px;
    width: 24px;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 4px;
  }
}

.tsc-s--w {
  color: var(--color-text-primary, #1A1A1A);
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(42, 157, 143, 0.08) 100%);
  border: 1.5px solid rgba(42, 157, 143, 0.25);
  box-shadow: 0 2px 4px rgba(42, 157, 143, 0.1);
}

@media (max-width: 600px) {
  .tsc-s--w {
    border: 1px solid rgba(42, 157, 143, 0.2);
  }
}

.tsc-s:not(.tsc-s--w) {
  color: var(--color-text-tertiary, #A8A8A8);
  background: rgba(0, 0, 0, 0.02);
}

/* Duración del partido - AHORA EN LA COLUMNA DE PLAYERS */
.tst-jornada__duration {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary, #A8A8A8);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border-tertiary, rgba(0, 0, 0, 0.08));
}

@media (max-width: 600px) {
  .tst-jornada__duration {
    font-size: 9px;
    margin-top: 4px;
    padding-top: 4px;
  }
}

/* Score placeholders */
.tsc-score-dash {
  font-size: 16px;
  color: var(--color-text-tertiary, #A8A8A8);
}

@media (max-width: 600px) {
  .tsc-score-dash {
    font-size: 13px;
  }
}

.tsc-score-enjuego {
  font-size: 24px;
  color: var(--tst-jornada-live);
}

@media (max-width: 600px) {
  .tsc-score-enjuego {
    font-size: 18px;
  }
}

/* ═══════════════════════════════════════════════════════
   SKELETON — Mismo estilo que el plugin principal
═══════════════════════════════════════════════════════ */

.tst-jornada__skeleton {
  /* Container para el skeleton */
}

.tst-skeleton-text {
  background: linear-gradient(90deg, #E4E3DC 25%, #EFEFEA 50%, #E4E3DC 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: tst-sk-shimmer 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes tst-sk-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ═══════════════════════════════════════════════════════
   ESTADO VACÍO / ERROR
═══════════════════════════════════════════════════════ */

.tst-jornada__empty,
.tst-jornada__error {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-body, "Lora", serif);
  font-size: 0.95rem;
  color: var(--color-text-secondary, #5C5C5C);
}

.tst-jornada__empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════
   ANIMACIÓN DE ENTRADA
═══════════════════════════════════════════════════════ */

.tst-jornada__anim {
  animation: tst-jornada-fade-in 250ms cubic-bezier(0, 0, 0.2, 1) both;
}

@keyframes tst-jornada-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tst-jornada__anim:nth-child(1) {
  animation-delay: 40ms;
}

.tst-jornada__anim:nth-child(2) {
  animation-delay: 80ms;
}

.tst-jornada__anim:nth-child(3) {
  animation-delay: 120ms;
}

.tst-jornada__anim:nth-child(4) {
  animation-delay: 160ms;
}

.tst-jornada__anim:nth-child(5) {
  animation-delay: 200ms;
}

/* ═══════════════════════════════════════════════════════
   DARK MODE — Overrides mínimos
═══════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  .tst-jornada__header {
    background: linear-gradient(145deg, #0a0f1e 0%, #0d1628 50%, #1a2740 100%);
  }

  .tst-venue-group {
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  }

  .tst-venue-group__header {
    background: linear-gradient(135deg, #1a2740 0%, #243a5f 50%, #2e4a7f 100%);
  }

  .tst-venue-group--wta .tst-venue-group__header {
    background: linear-gradient(135deg, #3a2650 0%, #4a3670 50%, #5a4690 100%);
  }

  .tsc-row:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  .tsc-s--w {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.2) 0%, rgba(42, 157, 143, 0.12) 100%);
  }
}

/* ═══════════════════════════════════════════════════════
   ACCESIBILIDAD
═══════════════════════════════════════════════════════ */

.tst-jornada__filter:focus-visible {
  outline: 2px solid var(--tst-jornada-lime);
  outline-offset: -3px;
}

.tst-venue-group__header:focus-visible {
  outline: 2px solid var(--tst-jornada-lime);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {

  .tst-jornada__anim,
  .tst-skeleton-text,
  .tsc-live-dot {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════
   v2.1.0 — MEJORAS POST-FEEDBACK
   • Espaciado de scores y trofeo
   • Walkover/Retiro inline
   • Nombres completos en desktop
   • Badge de categoría visible
   • Alineación con TST Design System
═══════════════════════════════════════════════════════ */

/* ── Espaciado del score (más aire entre sets y entre score y trofeo) ── */
.tsc-col-score {
  gap: 6px;
}

.tsc-score-cols {
  gap: 6px;
}

.tsc-score-row {
  gap: 10px;  /* antes 8px, ahora más aire entre cuadritos */
  font-family: var(--font-mono, "DM Mono", monospace);
}

@media (max-width: 600px) {
  .tsc-score-row {
    gap: 7px;
  }
}

.tsc-s {
  font-family: var(--font-mono, "DM Mono", monospace);
  font-size: 15px;
  font-weight: 700;
  min-width: 30px;
  width: 30px;
  padding: 5px 6px;
  border-radius: 5px;
}

@media (max-width: 600px) {
  .tsc-s {
    min-width: 24px;
    width: 24px;
    font-size: 13px;
    padding: 3px 4px;
  }
}

/* Trofeo: separar más del score */
.tsc-trophy {
  margin-left: 8px;
}

@media (max-width: 600px) {
  .tsc-trophy {
    margin-left: 6px;
  }
}

/* ── Walkover / Retiro inline (en la línea del jugador) ── */
.tsc-inline-status {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  flex-shrink: 0;
  line-height: 1.4;
  white-space: nowrap;
}

.tsc-inline-status--walkover {
  background: rgba(230, 57, 70, 0.10);
  color: #C2293A;
  border: 1px solid rgba(230, 57, 70, 0.22);
}

.tsc-inline-status--retirement {
  background: rgba(245, 176, 33, 0.12);
  color: #B07B0E;
  border: 1px solid rgba(245, 176, 33, 0.25);
}

.tsc-inline-status--canceled {
  background: rgba(107, 114, 128, 0.10);
  color: #6B7280;
  border: 1px solid rgba(107, 114, 128, 0.22);
}

.tsc-inline-status--postponed {
  background: rgba(99, 102, 241, 0.10);
  color: #4F46E5;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

@media (max-width: 600px) {
  .tsc-inline-status {
    font-size: 9px;
    padding: 1px 5px;
    margin-left: 5px;
    letter-spacing: 0.02em;
  }
}

/* ── Badge de categoría del torneo (Challenger, ATP 1000, ITF W35...) ── */
.tst-jornada__cat-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
  margin-right: 4px;
}

/* Variantes por importancia */
.tst-jornada__cat-badge--gs {
  background: linear-gradient(135deg, #F5B021 0%, #C8890F 100%);
  color: #1A1A1A;
  box-shadow: 0 1px 3px rgba(245, 176, 33, 0.4);
}

.tst-jornada__cat-badge--m1000 {
  background: rgba(225, 250, 89, 0.18);
  color: #5A6B0E;
  border: 1px solid rgba(225, 250, 89, 0.4);
}

.tst-jornada__cat-badge--tour500,
.tst-jornada__cat-badge--tour250 {
  background: rgba(255, 255, 255, 0.12);
  color: #E9F1F7;
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.tst-jornada__cat-badge--challenger {
  background: rgba(255, 255, 255, 0.08);
  color: #C8D4E0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tst-jornada__cat-badge--itf {
  background: rgba(255, 255, 255, 0.06);
  color: #A8B5C2;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.tst-jornada__cat-badge--finals {
  background: linear-gradient(135deg, rgba(225, 250, 89, 0.25), rgba(245, 176, 33, 0.20));
  color: #FFE066;
  border: 1px solid rgba(225, 250, 89, 0.35);
}

.tst-jornada__cat-badge--unknown {
  background: rgba(255, 255, 255, 0.06);
  color: #B0BAC4;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

@media (max-width: 600px) {
  .tst-jornada__cat-badge {
    font-size: 9px;
    padding: 2px 6px;
    letter-spacing: 0.03em;
  }
}

/* ── Nombres: en desktop más cómodos, en mobile más compactos ── */
@media (min-width: 768px) {
  .tsc-pname {
    font-size: 14.5px;
  }
  .tsc-player {
    font-size: 14.5px;
  }
}

/* ── Tipografía consistente con Design System ── */
.tsc-pname,
.tsc-meta-time,
.tsc-meta-rd {
  font-family: var(--font-headline, "DM Sans", sans-serif);
}

.tsc-meta-time {
  font-variant-numeric: tabular-nums;
}

/* Espaciado adicional para la columna players cuando hay status inline */
.tsc-player {
  flex-wrap: nowrap;
}

/* ── Asegurar que el row tiene altura suficiente con todos los elementos ── */
.tsc-row {
  align-items: center;
}

/* ═══════════════════════════════════════════════════════
   v2.2.0 — TABS, TAGS DE RANKING Y AVISO DE ACTUALIZACIÓN
═══════════════════════════════════════════════════════ */

/* ── Tabs principales (Partidos / ATP / WTA) ────────── */
.tst-jornada__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 5px;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .tst-jornada__tabs {
    margin-top: 10px;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
  }
}

.tst-jornada__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  min-width: 0;
}

.tst-jornada__tab:hover:not(.tst-jornada__tab--active) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tst-jornada__tab:active {
  transform: scale(0.97);
}

.tst-jornada__tab--active {
  background: var(--tst-jornada-lime, #E1FA59);
  color: var(--tst-jornada-brand-dark, #1E3A5F);
  box-shadow: 0 2px 6px rgba(225, 250, 89, 0.25);
}

.tst-jornada__tab-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.tst-jornada__tab-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@media (max-width: 600px) {
  .tst-jornada__tab {
    padding: 8px 6px;
    font-size: 11.5px;
    gap: 4px;
  }
  .tst-jornada__tab-icon {
    font-size: 13px;
  }
  /* En mobile abreviar las labels para que entren */
  .tst-jornada__tab[data-tab="atp"] .tst-jornada__tab-label::after,
  .tst-jornada__tab[data-tab="wta"] .tst-jornada__tab-label::after {
    content: '';
  }
}

@media (max-width: 380px) {
  .tst-jornada__tab-icon {
    display: none;  /* En pantallas muy chicas solo el texto */
  }
  .tst-jornada__tab {
    padding: 8px 4px;
  }
}

/* ── Paneles ──────────────────────────────────────────── */
.tst-jornada__panel {
  animation: tstPanelFadeIn 0.22s ease-out;
}

.tst-jornada__panel[hidden] {
  display: none !important;
}

@keyframes tstPanelFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Aviso de actualización ──────────────────────────── */
.tst-jornada__update-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 4px 8px;
  padding: 5px 11px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-tertiary, #6B7280);
  line-height: 1.4;
}

.tst-jornada__update-icon {
  flex-shrink: 0;
  color: var(--color-text-tertiary, #A8A8A8);
  opacity: 0.7;
}

@media (max-width: 600px) {
  .tst-jornada__update-notice {
    font-size: 10.5px;
    margin: 10px 2px 6px;
    padding: 4px 9px;
  }
  .tst-jornada__update-icon {
    width: 11px;
    height: 11px;
  }
}

@media (prefers-color-scheme: dark) {
  .tst-jornada__update-notice {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.55);
  }
  .tst-jornada__update-icon {
    color: rgba(255, 255, 255, 0.4);
  }
}

/* ── Tags de cambio de ranking ──────────────────────── */
.tsc-rk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.tsc-rk-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: help;
}

.tsc-rk-arrow,
.tsc-rk-star {
  font-size: 10px;
  line-height: 1;
}

.tsc-rk-diff {
  font-variant-numeric: tabular-nums;
}

/* Subió */
.tsc-rk-tag--up {
  background: rgba(42, 157, 143, 0.12);
  color: #1D7268;
  border: 1px solid rgba(42, 157, 143, 0.25);
}

.tsc-rk-tag--up .tsc-rk-arrow {
  color: #2A9D8F;
}

/* Bajó */
.tsc-rk-tag--down {
  background: rgba(230, 57, 70, 0.08);
  color: #B5252F;
  border: 1px solid rgba(230, 57, 70, 0.20);
}

.tsc-rk-tag--down .tsc-rk-arrow {
  color: #E63946;
}

/* Nuevo career high */
.tsc-rk-tag--newbest {
  background: linear-gradient(135deg, rgba(245, 176, 33, 0.15) 0%, rgba(245, 176, 33, 0.08) 100%);
  color: #8C6309;
  border: 1px solid rgba(245, 176, 33, 0.35);
  box-shadow: 0 1px 3px rgba(245, 176, 33, 0.15);
}

.tsc-rk-tag--newbest .tsc-rk-star {
  filter: drop-shadow(0 1px 1px rgba(245, 176, 33, 0.3));
}

/* Iguala career high */
.tsc-rk-tag--equalbest {
  background: rgba(225, 250, 89, 0.20);
  color: #5A6B0E;
  border: 1px solid rgba(184, 204, 48, 0.35);
}

@media (max-width: 600px) {
  .tsc-rk-tags {
    gap: 5px;
    margin-top: 6px;
    padding-top: 5px;
  }
  .tsc-rk-tag {
    font-size: 10px;
    padding: 2px 7px;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .tsc-rk-tag--up {
    background: rgba(42, 157, 143, 0.18);
    color: #6DD7C8;
  }
  .tsc-rk-tag--down {
    background: rgba(230, 57, 70, 0.18);
    color: #F08891;
  }
  .tsc-rk-tag--newbest {
    background: rgba(245, 176, 33, 0.18);
    color: #F5C572;
  }
  .tsc-rk-tag--equalbest {
    background: rgba(225, 250, 89, 0.18);
    color: #E1FA59;
  }
  .tsc-rk-tags {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
}

/* ═══════════════════════════════════════════════════════
   v2.3.0 — FIXES POST-DEPLOY
═══════════════════════════════════════════════════════ */

/* ── FIX: trofeo se superponía con el último cuadrito de set ── */
.tsc-col-score {
  /* Aumentamos ancho de columna para evitar superposición */
  min-width: 0;
}

@media (min-width: 601px) {
  /* En desktop, dar más espacio a la columna de score */
  .tsc-row {
    grid-template-columns: 76px 1fr minmax(140px, auto);
  }
}

@media (max-width: 600px) {
  /* En mobile, asegurar que la columna del score tenga suficiente espacio */
  .tsc-row {
    grid-template-columns: 50px 1fr minmax(100px, auto);
  }
}

/* La copa debe tener su propio espacio antes de los sets */
.tsc-score-cols {
  /* Por si está en el container con copa */
  position: relative;
}

/* Si el trofeo está dentro de la fila del jugador (que es lo correcto),
   asegurarnos que tenga aire del nombre y los seed tags */
.tsc-player .tsc-trophy {
  margin-left: auto;
  padding-left: 8px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .tsc-player .tsc-trophy {
    padding-left: 5px;
  }
}

/* ── FIX: ocultar status filters cuando NO estamos en panel matches ── */
.tst-jornada[data-active-panel="atp"] .tst-jornada__status-filters,
.tst-jornada[data-active-panel="wta"] .tst-jornada__status-filters,
.tst-jornada[data-active-panel="atp"] .tst-jornada__date-selector,
.tst-jornada[data-active-panel="wta"] .tst-jornada__date-selector,
.tst-jornada[data-active-panel="atp"] .tst-jornada__filter-row,
.tst-jornada[data-active-panel="wta"] .tst-jornada__filter-row {
  display: none !important;
}

/* ── FIX: en desktop el flex de player debe tener wrap permitido para mostrar tags sin romper ── */
@media (min-width: 768px) {
  .tsc-player {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .tsc-pname {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* La columna de players debe poder crecer */
  .tsc-col-players {
    min-width: 0;
    overflow: visible;
  }
}

/* ── FIX: nombre completo en desktop, asegurar que no se trunque innecesariamente ── */
@media (min-width: 901px) {
  .tsc-pname {
    /* En pantallas grandes, no truncar agresivamente */
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
  }
}

/* ── FIX: el legacy filter-row ya no existe en HTML, pero por las dudas ── */
.tst-jornada__filter-row {
  display: none !important;
}

/* ── FIX: walkover/retiro tag deben verse SIEMPRE bien en mobile ── */
@media (max-width: 600px) {
  .tsc-inline-status {
    /* En mobile, si no entra al lado del nombre, baja a línea nueva */
    margin-left: 0;
    margin-top: 4px;
    align-self: flex-start;
  }

  /* Permitir wrap en mobile para que walkover baje a nueva línea si hace falta */
  .tsc-player {
    flex-wrap: wrap;
    row-gap: 2px;
  }
}

/* ── FIX: tags de ranking deben ocupar el ancho disponible bien ── */
.tsc-rk-tags {
  align-items: center;
}

@media (min-width: 601px) {
  /* En desktop poner los tags al lado derecho debajo de los jugadores */
  .tsc-rk-tags {
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════
   v2.4.0 — FIXES UI POST-FEEDBACK
═══════════════════════════════════════════════════════ */

/* ── 1. FIX DEFINITIVO: grid de la fila del partido ── */
/* Importante: este bloque sobrescribe TODOS los grid-template-columns previos */
.tsc-row {
  display: grid;
  /* Mobile-first */
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
}

@media (min-width: 601px) {
  .tsc-row {
    grid-template-columns: 70px 1fr auto;
    gap: 16px;
    padding: 14px 20px;
  }
}

/* La columna del score: sin width fijo, que se ajuste al contenido */
.tsc-col-score {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 0;
}

/* ── 2. FIX bandera argentina: la barra lateral lime ── */
/* Esto puede estar tapado por background del row, lo aseguro */
.tsc-player--arg {
  position: relative;
  padding-left: 0;
}

.tsc-player--arg::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: linear-gradient(180deg, #75AADB 0%, #E1FA59 100%);
  border-radius: 2px;
  z-index: 2;
  box-shadow: 0 0 6px rgba(117, 170, 219, 0.4);
}

@media (max-width: 600px) {
  .tsc-player--arg::before {
    left: -7px;
    width: 2.5px;
    height: 14px;
  }
}

/* ── 3. Tag de ranking AL LADO del nombre (no debajo) ── */
/* Lo sacamos del bloque "tags" debajo y lo metemos como inline */
.tsc-rk-tags-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* En mobile, los tags inline son más chicos */
@media (max-width: 600px) {
  .tsc-rk-tags-inline {
    margin-left: 5px;
    gap: 3px;
  }
}

/* Ocultar el contenedor viejo (debajo) si existe */
.tsc-rk-tags {
  display: none !important;
}

/* Estilo de tags inline: tamaño compacto */
.tsc-rk-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.5;
  white-space: nowrap;
  letter-spacing: 0.02em;
  cursor: help;
}

@media (max-width: 600px) {
  .tsc-rk-tag {
    font-size: 9.5px;
    padding: 1px 6px;
    border-radius: 8px;
  }
}

/* Tag combinado: muestra "+29 · #239" - el ranking actual + el diff */
.tsc-rk-tag .tsc-rk-rank {
  opacity: 0.75;
  font-weight: 600;
  border-left: 1px solid currentColor;
  padding-left: 4px;
  margin-left: 1px;
}

/* ── 4. Fix tabs en mobile (no cortar texto) ── */
@media (max-width: 600px) {
  .tst-jornada__tab {
    padding: 7px 4px;
    font-size: 10.5px;
    gap: 3px;
    letter-spacing: 0;
  }

  .tst-jornada__tab-icon {
    display: none;  /* Sin íconos en mobile, más espacio para texto */
  }

  /* Reemplazamos el texto en mobile con versiones cortas */
  .tst-jornada__tab[data-tab="matches"] .tst-jornada__tab-label {
    font-size: 0;  /* Ocultar el texto largo */
  }
  .tst-jornada__tab[data-tab="matches"] .tst-jornada__tab-label::after {
    content: 'Partidos';
    font-size: 11px;
  }
  .tst-jornada__tab[data-tab="atp"] .tst-jornada__tab-label {
    font-size: 0;
  }
  .tst-jornada__tab[data-tab="atp"] .tst-jornada__tab-label::after {
    content: 'ATP en Vivo';
    font-size: 11px;
  }
  .tst-jornada__tab[data-tab="wta"] .tst-jornada__tab-label {
    font-size: 0;
  }
  .tst-jornada__tab[data-tab="wta"] .tst-jornada__tab-label::after {
    content: 'WTA en Vivo';
    font-size: 11px;
  }
}

/* En pantallas MUY chicas (<400px) más compacto aún */
@media (max-width: 400px) {
  .tst-jornada__tab[data-tab="atp"] .tst-jornada__tab-label::after {
    content: 'ATP Live';
  }
  .tst-jornada__tab[data-tab="wta"] .tst-jornada__tab-label::after {
    content: 'WTA Live';
  }
}

/* ── 5. Ocultar el legacy filter-row para siempre ── */
.tst-jornada__filter-row,
#tst-jornada-filters {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════
   v2.5.0 — RESPONSIVE FLUIDO + RANKING ABAJO + BANDERA HEADER
═══════════════════════════════════════════════════════ */

/* ── BANDERA ARG en el header del título (NO emoji, imagen real) ──
   Reemplaza el emoji que estaba ahí con una imagen SVG real */
.tst-jornada__title-flag {
  display: inline-block;
  width: 28px;
  height: 19px;
  margin-left: 10px;
  background-image: url('https://flagcdn.com/w40/ar.png');
  background-size: cover;
  background-position: center;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  vertical-align: middle;
  /* Ocultar el emoji original adentro */
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  /* Por si la imagen no carga, fallback al emoji con tamaño visible */
}

/* Si la imagen falla a cargar, restaurar emoji visible (esto NO se aplica
   si la imagen carga ok porque el background-image queda) */
@media (max-width: 600px) {
  .tst-jornada__title-flag {
    width: 22px;
    height: 15px;
    margin-left: 7px;
  }
}

/* ── TABS PRINCIPALES: Responsive fluido, texto completo siempre ── */
.tst-jornada__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3px, 1vw, 6px);
  margin-top: clamp(10px, 2vw, 14px);
  background: rgba(0, 0, 0, 0.18);
  padding: clamp(3px, 1vw, 5px);
  border-radius: clamp(7px, 1.5vw, 10px);
}

.tst-jornada__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 1vw, 6px);
  padding: clamp(7px, 2vw, 10px) clamp(4px, 1.5vw, 14px);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: clamp(9.5px, 2.4vw, 13px);
  font-weight: 700;
  letter-spacing: 0;
  border-radius: clamp(5px, 1vw, 7px);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.tst-jornada__tab--active {
  background: var(--tst-jornada-lime, #E1FA59);
  color: var(--tst-jornada-brand-dark, #1E3A5F);
  box-shadow: 0 2px 6px rgba(225, 250, 89, 0.25);
}

.tst-jornada__tab:hover:not(.tst-jornada__tab--active) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tst-jornada__tab-icon {
  font-size: clamp(11px, 2.5vw, 15px);
  line-height: 1;
  flex-shrink: 0;
}

.tst-jornada__tab-label {
  /* IMPORTANTE: nunca truncar, mostrar texto completo */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
  display: inline-block;
}

/* En pantallas muy chicas (<400px) ocultar ícono para liberar espacio */
@media (max-width: 400px) {
  .tst-jornada__tab-icon {
    display: none;
  }
  .tst-jornada__tab {
    padding: 6px 3px;
  }
}

/* En pantallas chiquísimas (<340px) achicar más la fuente */
@media (max-width: 340px) {
  .tst-jornada__tab {
    font-size: 8.5px;
    padding: 6px 2px;
  }
}

/* ── ANULAR los content::after que reemplazaban texto en mobile ── */
.tst-jornada__tab[data-tab="matches"] .tst-jornada__tab-label::after,
.tst-jornada__tab[data-tab="atp"]     .tst-jornada__tab-label::after,
.tst-jornada__tab[data-tab="wta"]     .tst-jornada__tab-label::after {
  content: none !important;
}

.tst-jornada__tab[data-tab="matches"] .tst-jornada__tab-label,
.tst-jornada__tab[data-tab="atp"]     .tst-jornada__tab-label,
.tst-jornada__tab[data-tab="wta"]     .tst-jornada__tab-label {
  font-size: inherit !important;
}

/* ── FILTROS DE ESTADO: una sola fila, scroll horizontal si no entra ── */
.tst-jornada__status-filters {
  display: flex;
  flex-wrap: nowrap !important;
  gap: clamp(4px, 1.2vw, 8px);
  margin-top: clamp(10px, 2vw, 14px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;  /* Firefox */
  padding-bottom: 2px;
}

.tst-jornada__status-filters::-webkit-scrollbar {
  display: none;  /* Chrome/Safari */
}

.tst-jornada__status-filter {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: clamp(11px, 2.5vw, 13px);
  padding: clamp(5px, 1.2vw, 8px) clamp(10px, 2.5vw, 14px);
  border-radius: clamp(6px, 1.5vw, 12px);
}

/* ── NOMBRES SIN ELLIPSIS ── */
.tsc-pname {
  flex: 1 1 auto;
  min-width: 0;
  /* Sin text-overflow ni overflow:hidden */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  overflow: visible !important;
  text-overflow: clip !important;
}

@media (min-width: 901px) {
  .tsc-pname {
    white-space: nowrap;  /* Solo en desktop grande nowrap */
  }
}

/* ── ASTERISCO QUE ASOCIA NOMBRE-ARG CON RANKING ── */
.tsc-arg-asterisk {
  display: inline-block;
  color: var(--tst-jornada-win, #2A9D8F);
  font-weight: 800;
  margin-left: 3px;
  font-size: 0.9em;
  vertical-align: super;
  line-height: 1;
}

/* ── BLOQUE DE RANKING DEBAJO DE LOS DOS JUGADORES ── */
.tsc-rk-below {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-family: var(--font-headline, "DM Sans", sans-serif);
}

.tsc-rk-below .tsc-arg-asterisk {
  margin-left: 0;
  margin-right: 2px;
  font-size: 12px;
  vertical-align: baseline;
}

.tsc-rk-tags-below {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

/* En desktop, MOSTRAR el ranking debajo igual (consistencia) */
/* No hacemos diferencia inline vs below — siempre below ahora */
.tsc-rk-tags-inline {
  display: none !important;
}

/* ── REDUCIR espacio entre ronda y dot live ── */
.tsc-col-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;  /* antes 4-6px */
  align-items: flex-start;
}

.tsc-meta-live {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tsc-meta-live + .tsc-player,
.tsc-col-players .tsc-meta-live {
  margin-bottom: 3px;  /* antes 6-8px */
}

/* ── BARRA LATERAL del jugador argentino: más visible ── */
.tsc-player--arg::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;  /* antes 3px */
  height: 22px;  /* antes 18px */
  background: linear-gradient(180deg, #75AADB 0%, #E1FA59 100%);
  border-radius: 2px;
  z-index: 3;
  box-shadow: 0 0 8px rgba(117, 170, 219, 0.5);
}

@media (max-width: 600px) {
  .tsc-player--arg::before {
    left: -8px;
    width: 3px;
    height: 16px;
  }
}

/* ═══════════════════════════════════════════════════════
   v2.7.0 — FIX ALINEACIÓN, HORA, CATEGORÍA, GRID
═══════════════════════════════════════════════════════ */

/* ── 1. GRID DE FILA: sistema de 3 columnas fijo y confiable ── */
/* Columna meta: ancho fijo para que no comprima
   Columna players: todo el espacio disponible
   Columna score: solo lo que necesite el contenido */
.tsc-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0 12px;
  padding: 12px 16px;
  align-items: center;
  min-height: 56px;
}

@media (min-width: 601px) {
  .tsc-row {
    grid-template-columns: 70px 1fr auto;
    gap: 0 16px;
    padding: 14px 20px;
    min-height: 62px;
  }
}

/* ── 2. COLUMNA META: altura total, flex column, centrado vertical ── */
.tsc-col-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  height: 100%;
}

/* Hora: siempre en una sola línea, nunca se rompe */
.tsc-meta-time {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;           /* <- la clave para que no se rompa */
  color: var(--color-text-secondary, #555);
  line-height: 1.3;
}

.tsc-meta-rd {
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-tertiary, #888);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.3;
}

/* Badge "EN JUEGO" en la columna meta (si lo hay) */
.tsc-meta-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  margin-bottom: 2px;
}

/* ── 3. COLUMNA PLAYERS: dos filas perfectamente alineadas ── */
.tsc-col-players {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}

/* Cada fila de jugador */
.tsc-player {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 22px;          /* altura fija para que los scores alineen */
}

@media (max-width: 600px) {
  .tsc-player {
    height: 20px;
  }
}

/* ── 4. COLUMNA SCORE: cuadritos alineados exactamente con los jugadores ── */
.tsc-col-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;               /* DEBE ser igual que el gap de .tsc-col-players */
  flex-shrink: 0;
}

/* Cada fila de scores del partido */
.tsc-score-row {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 22px;           /* DEBE ser igual que height de .tsc-player */
  font-family: var(--font-mono, "DM Mono", monospace);
}

@media (max-width: 600px) {
  .tsc-score-row {
    gap: 5px;
    height: 20px;         /* DEBE ser igual que .tsc-player en mobile */
  }
}

/* Cuadrito de set individual */
.tsc-s {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .tsc-s {
    width: 22px;
    height: 20px;
    font-size: 12px;
    border-radius: 3px;
  }
}

/* Trofeo alineado con la fila */
.tsc-trophy {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 4px;
  font-size: 14px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .tsc-trophy {
    height: 20px;
    font-size: 13px;
    margin-left: 3px;
  }
}

/* ── 5. Badge de categoría: solo si existe, sin badge ATP/WTA duplicado ── */
/* Ocultar los circuit badges ATP/WTA (ya no se renderizan en el JS,
   pero por si hay residuos del CSS anterior) */
.tst-jornada__circuit-badge {
  display: none !important;
}

/* El badge de categoría siempre visible si existe */
.tst-jornada__cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: clamp(9px, 2vw, 10.5px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px clamp(6px, 1.5vw, 9px);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 6. Dash "—" cuando no hay score aún ── */
.tsc-score-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--color-text-tertiary, #aaa);
  font-size: 14px;
}

/* ── 7. La columna col-actions: sin espacio visual ── */
.tsc-col-actions {
  display: none;  /* Ya no se usa */
}

/* ═══════════════════════════════════════════════════════
   v2.8.0 — FIX ALINEACIÓN DEFINITIVA + DARK MODE
═══════════════════════════════════════════════════════ */

/* ── WRAPPER DEL PARTIDO (reemplaza tsc-row como contenedor) ── */
/* El badge EN JUEGO vive aquí, FUERA del grid, arriba de ambas columnas */
.tsc-match-wrapper {
  border-top: 1px solid var(--color-border-tertiary, rgba(0, 0, 0, 0.06));
  transition: background 0.2s ease;
}

.tsc-match-wrapper:first-child {
  border-top: none;
}

.tsc-match-wrapper:hover {
  background: rgba(0, 0, 0, 0.015);
}

/* Barra roja "EN JUEGO" — ancho completo, encima del grid */
.tsc-live-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px 0;
  font-family: var(--font-headline, "DM Sans", sans-serif);
  font-size: 10.5px;
  font-weight: 800;
  color: #E53935;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (min-width: 601px) {
  .tsc-live-bar {
    padding: 6px 20px 0;
    font-size: 11px;
  }
}

/* ── ROW DENTRO DEL WRAPPER: grid puro sin badge ── */
/* Sobrescribe todas las versiones anteriores del .tsc-row */
.tsc-row {
  display: grid !important;
  grid-template-columns: 54px 1fr auto !important;
  gap: 0 10px !important;
  padding: 8px 16px 10px !important;
  align-items: stretch !important;  /* STRETCH: las columnas se estiran por igual */
  border-top: none !important;      /* El border va en .tsc-match-wrapper */
  border: none !important;
  background: transparent !important;
}

@media (min-width: 601px) {
  .tsc-row {
    grid-template-columns: 70px 1fr auto !important;
    gap: 0 14px !important;
    padding: 10px 20px 12px !important;
  }
}

/* ── COLUMNA META ── */
.tsc-col-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 2px !important;
  padding-top: 2px;
}

/* ── COLUMNA PLAYERS: flex column, altura exacta = 2 jugadores ── */
.tsc-col-players {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

/* ── COLUMNA SCORE: misma estructura que players ── */
.tsc-col-score {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 6px !important;
  align-items: flex-end !important;
  flex-shrink: 0 !important;
}

/* ── FILA DE JUGADOR: altura fija y estable ── */
.tsc-player {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 22px !important;
  min-width: 0 !important;
}

/* ── FILA DE SCORE: MISMA altura que .tsc-player ── */
.tsc-score-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 22px !important;
  justify-content: flex-end !important;
}

/* ── EXTRAS (ranking, próximo rival, duración) ── */
.tsc-row-extras {
  padding: 0 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

@media (min-width: 601px) {
  .tsc-row-extras {
    padding: 0 20px 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE — COMPLETO Y DEFINITIVO
   Forzar colores explícitos para que nada quede en negro
═══════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {

  /* Contenedor principal */
  .tst-jornada {
    color-scheme: light;  /* <- le dice al browser que este componente es light */
  }

  /* Card de torneo: fondo blanco suave oscuro, no negro puro */
  .tst-venue-group {
    background: #1C2333 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3) !important;
  }

  /* Filas de partido */
  .tsc-match-wrapper {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
  }

  .tsc-match-wrapper:hover {
    background: rgba(255, 255, 255, 0.03) !important;
  }

  /* Nombres de jugadores */
  .tsc-pname {
    color: #E8EDF5 !important;
  }

  .tsc-player--w .tsc-pname {
    color: #FFFFFF !important;
    font-weight: 700 !important;
  }

  /* Hora y ronda */
  .tsc-meta-time {
    color: #9BA8BB !important;
  }

  .tsc-meta-rd {
    color: #7A8799 !important;
  }

  /* Seeds */
  .tsc-seed {
    color: #7A8799 !important;
  }

  /* Cuadritos de score */
  .tsc-s {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
  }

  .tsc-s--w {
    background: rgba(42, 157, 143, 0.25) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
  }

  /* Score dash */
  .tsc-score-dash {
    color: rgba(255, 255, 255, 0.3) !important;
  }

  /* Badge de categoría en dark */
  .tst-jornada__cat-badge--challenger,
  .tst-jornada__cat-badge--tour500,
  .tst-jornada__cat-badge--tour250,
  .tst-jornada__cat-badge--unknown {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #C8D4E0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  /* Superficie (Polvo de ladrillo, etc) */
  .tst-jornada__surface {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9BA8BB !important;
  }

  /* Aviso de actualización */
  .tst-jornada__update-notice {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /* Botón "Ver cuadro" */
  .tst-jornada__cuadro-link {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #E8EDF5 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  .tst-jornada__cuadro-link:hover {
    background: rgba(255, 255, 255, 0.18) !important;
  }

  /* Filtros de estado */
  .tst-jornada__status-filter {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }

  .tst-jornada__status-filter--active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
  }

  /* Tags de ranking en dark */
  .tsc-rk-tag--up {
    background: rgba(42, 157, 143, 0.20) !important;
    color: #6DD7C8 !important;
    border-color: rgba(42, 157, 143, 0.35) !important;
  }

  .tsc-rk-tag--down {
    background: rgba(230, 57, 70, 0.20) !important;
    color: #F08891 !important;
    border-color: rgba(230, 57, 70, 0.35) !important;
  }

  .tsc-rk-tag--newbest {
    background: rgba(245, 176, 33, 0.20) !important;
    color: #F5C572 !important;
    border-color: rgba(245, 176, 33, 0.40) !important;
  }

  /* Walkovers/retiros */
  .tsc-inline-status--walkover {
    background: rgba(230, 57, 70, 0.18) !important;
    color: #F08891 !important;
    border-color: rgba(230, 57, 70, 0.30) !important;
  }

  .tsc-inline-status--retirement {
    background: rgba(245, 176, 33, 0.18) !important;
    color: #F5C572 !important;
    border-color: rgba(245, 176, 33, 0.30) !important;
  }

  /* Skeleton en dark */
  .tst-skeleton-text {
    background: rgba(255, 255, 255, 0.07) !important;
  }

  /* Siguiente rival */
  .tsc-rival-slot {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /* Duración del partido */
  .tst-jornada__duration {
    color: rgba(255, 255, 255, 0.4) !important;
  }
}

/* ═══════════════════════════════════════════════════════
   v2.8.1 — FORZAR LIGHT MODE: el componente siempre se
   ve igual sin importar la preferencia del sistema.
   Se anulan TODOS los @media prefers-color-scheme: dark
   con color-scheme: light en el root del componente.
═══════════════════════════════════════════════════════ */

/* Forzar light mode en todo el componente */
.tst-jornada {
  color-scheme: light !important;
  forced-color-adjust: none !important;
}
.tst-jornada * {
  color-scheme: light !important;
  forced-color-adjust: none !important;
}

/* Anular dark mode del tema de WordPress y del OS en mobile y desktop */
@media (prefers-color-scheme: dark) {
  .tst-jornada {
    color-scheme: light !important;
    forced-color-adjust: none !important;
    background: unset;
  }
  .tst-jornada * {
    color-scheme: light !important;
    forced-color-adjust: none !important;
  }

  /* Restaurar todos los fondos y colores a sus valores light */
  .tst-venue-group {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.97) 100%) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
    color: #1A1A1A !important;
  }

  .tsc-match-wrapper {
    background: transparent !important;
    border-top-color: rgba(0, 0, 0, 0.06) !important;
  }

  .tsc-match-wrapper:hover {
    background: rgba(0, 0, 0, 0.015) !important;
  }

  .tsc-pname,
  .tsc-player--w .tsc-pname {
    color: #1A1A1A !important;
    font-weight: inherit !important;
  }

  .tsc-player--w .tsc-pname {
    font-weight: 700 !important;
  }

  .tsc-meta-time {
    color: #555 !important;
  }

  .tsc-meta-rd {
    color: #888 !important;
  }

  .tsc-seed {
    color: #888 !important;
  }

  .tsc-s {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1A1A1A !important;
  }

  .tsc-s--w {
    background: linear-gradient(135deg, rgba(42,157,143,0.15) 0%, rgba(42,157,143,0.08) 100%) !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
  }

  .tsc-score-dash {
    color: rgba(0, 0, 0, 0.3) !important;
  }

  .tst-jornada__status-filter {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #444 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
  }

  .tst-jornada__status-filter--active {
    background: #1E3A5F !important;
    color: #fff !important;
  }

  .tst-jornada__cuadro-link {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.25) !important;
  }

  .tst-jornada__update-notice {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #6B7280 !important;
  }

  .tst-skeleton-text {
    background: rgba(0, 0, 0, 0.07) !important;
  }
}





/* ══════════════════════════════════════════════════════════════
   H2H — Head to Head Modal (design system TST v6 — actualizado)
   ══════════════════════════════════════════════════════════════ */

/* Tag H2H */
.tst-h2h-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  width: auto;
  align-self: flex-start;
  background: #D6E3F0;
  border: 1px solid rgba(48,81,128,0.25);
  border-radius: 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #305180;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.tst-h2h-btn:hover { background: rgba(48,81,128,0.18); transform: scale(1.03); }
.tst-h2h-btn:active { transform: scale(0.97); }

/* Modal overlay */
.tst-h2h-modal {
  position: fixed; inset: 0; z-index: 99999;
  pointer-events: none; color-scheme: light;
  font-family: "DM Sans", sans-serif;
}
.tst-h2h-modal--open { pointer-events: all; }

.tst-h2h-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}
.tst-h2h-modal--open .tst-h2h-backdrop { background: rgba(10,15,30,0.65); }

.tst-h2h-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 92vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.tst-h2h-modal--open .tst-h2h-sheet { transform: translateY(0); }

.tst-h2h-handle {
  width: 36px; height: 4px;
  background: #E4E3DC;
  border-radius: 2px;
  margin: 12px auto 0;
}

.tst-h2h-inner { padding-bottom: 40px; }

/* Header oscuro (design system) */
.tst-h2h__header {
  background: #1E3A5F;
  padding: 12px 16px;
  display: flex; align-items: center;
  font-family: "DM Sans", sans-serif;
  gap: 8px;
}
.tst-h2h__title {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #E1FA59; flex: 1;
}
.tst-h2h__record {
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 11px; color: rgba(255,255,255,0.5);
}
.tst-h2h-close {
  background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
  width: 26px; height: 26px; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: background 0.15s;
}
.tst-h2h-close:hover { background: rgba(255,255,255,0.2); }

/* Grid jugadores */
.tst-h2h__players {
  display: grid; grid-template-columns: 1fr 40px 1fr;
  padding: 16px 16px 8px; align-items: center; gap: 0;
}
.tst-h2h__player { text-align: center; }
.tst-h2h-photo {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 6px;
  background: #EFEFEA;
  border: 2px solid #E4E3DC;
  display: block;
}
.tst-h2h__players .tst-h2h__player:first-child .tst-h2h-photo {
  border-color: #305180;
}
.tst-h2h-photo--placeholder {
  background: #EFEFEA;
  display: flex; align-items: center; justify-content: center;
}
.tst-h2h__player-name {
  font-size: 13px; font-weight: 800; color: #1A1A1A; line-height: 1.2;
}
.tst-h2h__player-fullname {
  font-size: 10px; color: #A8A8A8; margin-top: 1px;
}
.tst-h2h__vs {
  font-size: 11px; font-weight: 900; color: #A8A8A8; text-align: center;
}

/* Score */
.tst-h2h__score {
  display: flex; align-items: center; justify-content: center; gap: 0;
  padding: 4px 16px 12px;
}
.tst-h2h__wins {
  flex: 1; text-align: center;
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 36px; font-weight: 800; line-height: 1;
}
.tst-h2h__wins--leader { color: #305180; }
.tst-h2h__wins--other  { color: #E4E3DC; }
.tst-h2h__divider {
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 20px; color: #E4E3DC; padding: 0 12px;
}

/* Barra */
.tst-h2h__bar-wrap { padding: 0 16px 4px; }
.tst-h2h__bar-track {
  height: 5px; background: #E4E3DC;
  border-radius: 3px; overflow: hidden; display: flex;
}
.tst-h2h__bar-fill {
  height: 100%; background: #305180;
  border-radius: 3px 0 0 3px; transition: width .4s ease;
}

/* Stat rows (design system) */
.tst-h2h__stat-row {
  display: flex; align-items: center;
  padding: 9px 16px;
  border-top: .5px solid #E4E3DC;
  font-family: "DM Sans", sans-serif;
}
.tst-h2h__stat-row.tst-h2h__expand-row { cursor: pointer; }
.tst-h2h__stat-row.tst-h2h__expand-row:hover { background: #F7F6F2; }
.tst-h2h__stat-val {
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 12px; font-weight: 700; min-width: 60px;
}
.tst-h2h__stat-val--left  { text-align: left;  color: #305180; }
.tst-h2h__stat-val--right { text-align: right; color: #5C5C5C; }
.tst-h2h__stat-val--leader     { color: #305180; font-weight: 800; }
.tst-h2h__stat-val--leader-opp { color: #5C5C5C; font-weight: 700; }
.tst-h2h__stat-label {
  flex: 1; text-align: center;
  font-size: 9px; color: #A8A8A8;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
}

/* Expandable extra */
.tst-h2h-expand-arrow {
  font-size: 14px; color: #A8A8A8;
  transition: transform 0.2s ease; display: inline-block;
}
.tst-h2h-expand-arrow--open { transform: rotate(180deg); }
.tst-h2h-extra {
  display: none; overflow: hidden;
  border-bottom: .5px solid #E4E3DC;
}
.tst-h2h-extra--open { display: block; }
.tst-h2h-extra .tst-h2h__stat-row { border-top: .5px solid #E4E3DC; }
.tst-h2h-extra .tst-h2h__stat-row:first-child { border-top: none; }

/* Historial */
.tst-h2h-history-title {
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #A8A8A8;
  padding: 12px 16px 6px;
  border-top: .5px solid #E4E3DC;
}
.tst-h2h-history { display: flex; flex-direction: column; }

.tst-h2h-match-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 8px 16px;
  border-top: .5px solid #E4E3DC;
}
.tst-h2h-match-row--arg-won { background: rgba(48,81,128,0.04); }
.tst-h2h-match-row--pending { opacity: 0.65; }
.tst-h2h-match-info { min-width: 0; }
.tst-h2h-match-tournament {
  display: block; font-size: 12px; font-weight: 600;
  color: #1A1A1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tst-h2h-match-year { font-size: 10px; color: #A8A8A8; }
.tst-h2h-winner-name {
  font-size: 11px; color: #A8A8A8; white-space: nowrap;
  font-family: "DM Sans", sans-serif;
}
.tst-h2h-winner-name--arg { color: #305180; font-weight: 700; }
.tst-h2h-match-scores { display: flex; gap: 3px; }
.tst-h2h-set {
  background: #EFEFEA; border-radius: 4px;
  padding: 2px 5px; font-size: 11px; color: #5C5C5C;
  font-weight: 600; font-family: "DM Mono", "Courier New", monospace;
}
.tst-h2h-set--w { background: rgba(48,81,128,0.1); color: #1E3A5F; font-weight: 700; }
.tst-h2h-set--pending { font-style: italic; color: #A8A8A8; }

/* Loading / error */
.tst-h2h-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px 20px; color: #A8A8A8; font-size: 13px;
}
.tst-h2h-spinner {
  width: 28px; height: 28px;
  border: 3px solid #D6E3F0;
  border-top-color: #305180;
  border-radius: 50%; animation: tst-h2h-spin 0.7s linear infinite;
}
@keyframes tst-h2h-spin { to { transform: rotate(360deg); } }
.tst-h2h-error, .tst-h2h-no-matches {
  padding: 24px 16px; text-align: center;
  color: #A8A8A8; font-size: 12px;
  font-style: italic; line-height: 1.6;
}

/* Desktop: popup centrado */
@media (min-width: 640px) {
  .tst-h2h-sheet {
    top: 50%; left: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -40%) scale(0.96);
    border-radius: 16px; width: 460px; max-width: 95vw; max-height: 90vh;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1), opacity 0.25s ease;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.12);
  }
  .tst-h2h-modal--open .tst-h2h-sheet {
    transform: translate(-50%,-50%) scale(1); opacity: 1;
  }
  .tst-h2h-handle { display: none; }
}

/* ATP Media Notes en el modal H2H */
.tst-h2h-atp-note {
  margin: 0 16px 20px;
  padding: 12px 14px;
  background: #F5FDD0;
  border-left: 3px solid #B8CC30;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #5C5C5C;
  font-family: "Lora", Georgia, serif;
}

/* ══════════════════════════════════════════════════════════════
   Vista Toggle — Torneo / Horario
   ══════════════════════════════════════════════════════════════ */

/* Fila que contiene el aviso + toggle */
.tst-jornada__update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  flex-wrap: wrap;
  gap: 6px;
}

.tst-view-toggle {
  display: inline-flex !important;
  gap: 0 !important;
  flex-shrink: 0 !important;
  background: #EEF2F7 !important;
  border-radius: 22px !important;
  padding: 3px !important;
  border: 1px solid #D5DCE8 !important;
  box-shadow: none !important;
}

.tst-view-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 14px !important;
  border-radius: 18px !important;
  border: none !important;
  background: transparent !important;
  color: #64748B !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}
.tst-view-btn:hover:not(.tst-view-btn--active) {
  color: #305180 !important;
  background: rgba(48,81,128,0.08) !important;
}
.tst-view-btn--active {
  background: #1E3A5F !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(30,58,95,0.35) !important;
  border: none !important;
}

/* ── Vista Horario ── */
.tst-horario-group {
  margin-bottom: 4px;
}

.tst-horario-time-label {
  font-family: "DM Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #305180;
  padding: 12px 4px 4px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #E4E3DC;
  margin-bottom: 4px;
}

.tst-horario-match {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 6px;
  padding: 10px 14px;
  border-left: 3px solid #E4E3DC;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 2px 8px;
}
.tst-horario-match--live {
  border-left-color: #E63946;
  background: #fff8f8;
}
.tst-horario-match--fin {
  opacity: 0.75;
  border-left-color: #C8C8C0;
}

.tst-horario-match__tourn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.tst-horario-tourn-name {
  font-size: 11px;
  color: #A8A8A8;
  font-weight: 500;
}

.tst-horario-round {
  font-size: 10px;
  color: #C0C0C0;
  font-family: "DM Mono", monospace;
}

.tst-horario-match__players {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tst-horario-match__players .tsc-player {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #1A1A1A;
  font-family: "DM Sans", sans-serif;
}

.tst-horario-match__players .tsc-player--winner .tsc-player-name {
  font-weight: 700;
  color: #1E3A5F;
}

.tst-horario-match__players .tsc-player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.tst-horario-match__players .tsc-seed {
  font-size: 10px;
  color: #A8A8A8;
}

.tst-horario-match__score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  grid-row: 2;
  grid-column: 2;
}

.tst-horario-match .tsc-set {
  background: #F0EFE9;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  color: #5C5C5C;
  font-weight: 600;
  font-family: "DM Mono", monospace;
}
.tst-horario-match .tsc-set--w {
  background: #E8EFF8;
  color: #1E3A5F;
  font-weight: 700;
}

.tst-horario-match .tsc-row-extras {
  grid-column: 1 / -1;
  padding: 4px 0 0;
}

.tst-horario-match .tsc-live-dot {
  width: 6px; height: 6px;
  background: #E63946;
  border-radius: 50%;
  display: inline-block;
  animation: tst-live-pulse 1.2s ease-in-out infinite;
}
