/* ==========================================================================
   Match Detail V2 — full-width, no tabs, dos columnas en desktop
   ========================================================================== */

.match-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 0 8px 80px; /* Even less padding on mobile */
}
@media (min-width: 720px) {
  .match-v2 { padding: 0 var(--content-pad) 80px; }
}

/* ── HEADER (full-width) ───────────────────────────────────────────── */
.match-v2-header {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.match-v2-header > .meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.match-v2-header > .meta-line > .dot-sep { color: var(--muted); opacity: 0.5; }
.match-v2-header > .meta-line > .venue {
  display: inline-flex; align-items: center; gap: 5px;
}
.match-v2-header > .meta-line > .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
.match-v2-header > .meta-line > .status.-live {
  background: rgba(255, 120, 102, 0.1);
  color: var(--coral);
  border-color: rgba(255, 120, 102, 0.4);
}
.match-v2-header > .meta-line > .status.-live > .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.match-v2-header > .meta-line > .status.-finished {
  background: rgba(255, 210, 63, 0.08);
  color: var(--gold);
  border-color: rgba(255, 210, 63, 0.3);
}
.match-v2-header > .meta-line > .status.-scheduled {
  background: rgba(78, 199, 122, 0.08);
  color: var(--green);
  border-color: rgba(78, 199, 122, 0.3);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.match-v2-header > .match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.match-v2-header .team {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
/* Home: name a la izquierda, badge pegado al score (a la derecha del cluster).
   Away: badge pegado al score (a la izquierda del cluster), name a la derecha. */
.match-v2-header .team.-home { justify-content: flex-end; text-align: right; }
.match-v2-header .team.-away { justify-content: flex-start; text-align: left; }
.match-v2-header .team.-home > .team-meta { align-items: flex-end; }
.match-v2-header .team.-away > .team-meta { align-items: flex-start; }

.match-v2-header .team > .badge-wrap {
  width: 56px; height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: center;
}
.match-v2-header .team > .team-meta {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.match-v2-header .team > .team-meta > .name {
  font-size: 18px; font-weight: 600; line-height: 1.15;
  color: var(--fg); margin: 0;
  width: 100%;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 540px) {
  .match-v2-header .team > .team-meta > .name { font-size: 12px; white-space: normal; text-align: center; }
}
.match-v2-header .team > .team-meta > .line {
  display: flex; gap: 6px; align-items: center;
  margin: 0;
  font-size: 11px;
  color: var(--fg-3);
}
.match-v2-header .team > .team-meta > .line > .formation {
  font-family: var(--mono);
  letter-spacing: 0.4px;
}
.match-v2-header .team > .team-meta > .line > .card {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  min-width: 14px;
  height: 14px;
}
.match-v2-header .team > .team-meta > .line > .card.-yellow {
  background: var(--amarilla); color: var(--amarilla-ink);
}
.match-v2-header .team > .team-meta > .line > .card.-red {
  background: var(--roja); color: white;
}

.match-v2-header > .match-row > .score-wrap { text-align: center; min-width: 100px; }
.match-v2-header > .match-row > .score-wrap > .score {
  font-family: var(--font-scoreboard);
  display: flex; gap: 10px; justify-content: center; align-items: baseline;
}
.match-v2-header > .match-row > .score-wrap > .score > .num {
  font-size: 56px; line-height: 1; color: var(--fg);
}
.match-v2-header > .match-row > .score-wrap > .score > .sep {
  font-size: 26px; color: var(--fg-3);
}
.match-v2-header > .match-row > .score-wrap > .time {
  display: flex; flex-direction: column; gap: 2px;
}
.match-v2-header > .match-row > .score-wrap > .time > .hr {
  font-family: var(--mono); font-size: 26px; color: var(--fg);
  letter-spacing: 0.5px;
}
.match-v2-header > .match-row > .score-wrap > .time > .day {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  text-transform: uppercase;
}

.match-v2-header > .meta-bottom {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 12px;
  color: var(--fg-3);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.match-v2-header > .meta-bottom > span {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  min-width: 0;
}
.match-v2-header > .meta-bottom > span.venue .venue-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-v2-header > .meta-bottom > span.venue .venue-place {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile fixes */
@media (max-width: 540px) {
  .match-v2-header { padding: 12px; }
  .match-v2-header > .match-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }
  .match-v2-header .team { 
    flex-direction: column !important; 
    gap: 4px; 
    text-align: center;
  }
  .match-v2-header .team.-home { flex-direction: column-reverse !important; }
  .match-v2-header .team > .badge-wrap { width: 32px; height: 32px; flex-basis: 32px; }
  .match-v2-header .team > .team-meta { align-items: center; }
  
  .match-v2-header > .match-row > .score-wrap > .score > .num { font-size: 28px; }
  .match-v2-header > .match-row > .score-wrap { min-width: 60px; }
}
@media (max-width: 380px) {
  .match-v2-header > .match-row > .score-wrap > .score > .num { font-size: 24px; }
  .match-v2-header .team > .team-meta > .name { font-size: 11px; }
}

/* ── SUMMARY ROW (palpito + comunidad) ─────────────────────────────── */
.match-v2-summary-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
@media (min-width: 720px) {
  .match-v2-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
}

/* ── PITCH + TIMELINE (side-by-side en desktop) ────────────────────── */
.match-v2-pitch-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.match-v2-pitch-timeline > .pitch-col,
.match-v2-pitch-timeline > .timeline-col {
  min-width: 0;
}
@media (min-width: 900px) {
  .match-v2-pitch-timeline {
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(260px, 1fr);
    gap: 16px;
    align-items: stretch;
  }
  .match-v2-pitch-timeline.-only-pitch,
  .match-v2-pitch-timeline.-only-timeline {
    grid-template-columns: 1fr;
  }
  /* El bloque del timeline crece para alinearse con el alto del pitch. */
  .match-v2-pitch-timeline > .timeline-col > .block {
    height: 100%;
  }
  .match-v2-pitch-timeline > .timeline-col .timeline-list {
    max-height: 460px;
  }
}

/* ── BLOCK shell ───────────────────────────────────────────────────── */
.match-v2 .block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
@media (min-width: 720px) {
  .match-v2 .block { padding: 14px 16px 16px; }
}
.match-v2 .block-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.match-v2 .block-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--mono);
  margin-left: auto;
}
.match-v2 .block-empty {
  font-size: 13px; color: var(--fg-3); text-align: center; padding: 12px 0; margin: 0;
}
.match-v2 .block-cta { align-self: flex-start; }

/* ── TIMELINE ──────────────────────────────────────────────────────── */
.timeline-list {
  display: flex; flex-direction: column;
  gap: 6px;
  position: relative;
  padding-left: 38px;
  max-height: 360px;
  overflow-y: auto;
  /* fade en el borde inferior para sugerir scroll */
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.timeline-list::-webkit-scrollbar { width: 4px; }
.timeline-list::-webkit-scrollbar-track { background: transparent; }
.timeline-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }
.timeline-list::before {
  content: "";
  position: absolute;
  left: 18px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  margin-left: -38px;
}
.timeline-row > .minute {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  text-align: right;
  padding-right: 14px;
  position: relative;
  display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 1px;
}
.timeline-row > .minute > .num { font-weight: 600; color: var(--fg-2); }
.timeline-row > .minute::after {
  content: "";
  position: absolute;
  right: -3px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line-strong);
}
.timeline-row.-home > .minute::after { background: var(--accent); border-color: var(--accent); }
.timeline-row > .timeline-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-row > .timeline-card > .ev-icon {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2);
  color: var(--fg-2);
  font-size: 11px;
  font-weight: 700;
}
.timeline-row > .timeline-card > .ev-icon.-goal {
  background: var(--accent-dim); color: var(--accent);
}
.timeline-row > .timeline-card > .ev-icon.-goal.-own-goal {
  background: #ff4d4d1a !important; 
  color: #ff4d4d !important;
}
.timeline-row > .timeline-card > .ev-icon.-yellow {
  background: var(--amarilla);
  width: 14px; height: 18px; border-radius: 2px; flex-basis: 14px;
}
.timeline-row > .timeline-card > .ev-icon.-red {
  background: var(--roja);
  width: 14px; height: 18px; border-radius: 2px; flex-basis: 14px;
}
.timeline-row > .timeline-card > .ev-icon.-sub { color: var(--fg-2); font-size: 14px; }
.timeline-row > .timeline-card > .ev-icon.-var {
  background: var(--card-2); font-size: 8px; color: var(--fg-3);
}
.timeline-row > .timeline-card > .ev-body {
  flex: 1; min-width: 0;
}
.timeline-row > .timeline-card > .ev-body > .head {
  margin: 0; font-size: 12px; color: var(--fg);
  display: flex; align-items: center; gap: 6px;
}
.timeline-row > .timeline-card > .ev-body > .head > .player { font-weight: 500; }
.timeline-row > .timeline-card > .ev-body > .head > .side {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono); font-size: 10px;
  font-weight: 700;
  background: var(--card-2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.timeline-row > .timeline-card > .ev-body > .sub {
  margin: 1px 0 0;
  font-size: 10px; color: var(--fg-3);
}
.timeline-row > .timeline-card > .ev-body > .sub.-out { color: #ff4d4d; opacity: 0.85; }
.timeline-row > .timeline-card .ev-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  background: var(--accent-dim);
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 4px;
}
.timeline-row > .timeline-card .ev-tag.-own-goal {
  color: #ff4d4d !important;
  background: #ff4d4d1a !important;
}

/* ── STATS ─────────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .match-v2 > .block.stats-block { padding-bottom: 18px; }
  .stat-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
}
.stat-rows {
  display: flex; flex-direction: column;
  gap: 12px;
}
.stat-row > .vals {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  font-family: var(--mono);
  font-size: 14px;
  align-items: baseline;
  margin-bottom: 4px;
}
.stat-row > .vals > .v { font-weight: 600; color: var(--fg); }
.stat-row > .vals > .v.-home { text-align: left; }
.stat-row > .vals > .v.-away { text-align: right; }
.stat-row > .vals > .lbl {
  text-align: center;
  font-family: var(--font);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-row > .bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  height: 4px;
}
.stat-row > .bars > .bar {
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.stat-row > .bars > .bar > .fill {
  position: absolute; top: 0; bottom: 0;
  background: var(--accent);
  transition: width 0.3s;
}
.stat-row > .bars > .bar.-home > .fill { right: 0; }
.stat-row > .bars > .bar.-away > .fill { left: 0; background: var(--accent-2); }

/* ── PITCH HORIZONTAL ──────────────────────────────────────────────── */
.pitch-h {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(90deg, #1d2b1f 0%, #243528 50%, #1d2b1f 100%);
  border: 1px solid var(--line-strong);
}
@media (min-width: 720px) { .pitch-h { height: 460px; } }
.pitch-h-bg {
  position: absolute; inset: 0;
  background-image:
    /* franjas verticales alternadas (sutil) */
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.018) 0px,
      rgba(255,255,255,0.018) 8.33%,
      transparent 8.33%,
      transparent 16.66%
    ),
    /* línea de mitad de cancha (vertical) */
    linear-gradient(
      90deg,
      transparent calc(50% - 0.5px),
      rgba(236,232,220,0.22) 50%,
      transparent calc(50% + 0.5px)
    ),
    /* círculo central */
    radial-gradient(
      circle at 50% 50%,
      transparent 60px,
      rgba(236,232,220,0.22) 60px,
      rgba(236,232,220,0.22) 61.5px,
      transparent 61.5px
    ),
    /* área izquierda (rectángulo) */
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(8% - 1px),
      rgba(236,232,220,0.18) calc(8% - 1px),
      rgba(236,232,220,0.18) 8%,
      transparent 8%,
      transparent calc(20% - 1px),
      rgba(236,232,220,0.18) calc(20% - 1px),
      rgba(236,232,220,0.18) 20%,
      transparent 20%
    ),
    /* área derecha (rectángulo) */
    linear-gradient(
      90deg,
      transparent 80%,
      rgba(236,232,220,0.18) 80%,
      rgba(236,232,220,0.18) calc(80% + 1px),
      transparent calc(80% + 1px),
      transparent 92%,
      rgba(236,232,220,0.18) 92%,
      rgba(236,232,220,0.18) calc(92% + 1px),
      transparent calc(92% + 1px)
    );
  pointer-events: none;
}

.pitch-h-team {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  display: flex;
  padding: 14px 8px;
  z-index: 1;
}
.pitch-h-team.-home { left: 0; flex-direction: row; }
.pitch-h-team.-away { right: 0; flex-direction: row-reverse; }

.pitch-h-line {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.pitch-h-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

/* JERSEY: circulo con numero */
.jersey {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  border: 1.5px solid rgba(255,255,255,0.15);
}
.jersey > .num {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  color: inherit;
  letter-spacing: -0.5px;
}
.jersey.-home { background: var(--paper); color: var(--paper-ink); }
.jersey.-away { background: var(--amarilla); color: var(--amarilla-ink); }
@media (min-width: 720px) {
  .jersey { width: 32px; height: 32px; }
  .jersey > .num { font-size: 13px; }
}

/* JERSEY EVENTS (tarjetas, goles, cambios) */
.player-events-wrap {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  z-index: 5;
}
.player-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(20, 20, 25, 0.95);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
}
.player-event.-card {
  width: 8px;
  height: 12px;
  border-radius: 2px;
}
.player-event.-card.-yellow { background: #fde047; border-color: #ca8a04; }
.player-event.-card.-red { background: #ef4444; border-color: #991b1b; }
.player-event.-goal { width: 14px; height: 14px; color: #fde047; }
.player-event.-sub-out { width: 14px; height: 14px; color: #ef4444; font-size: 11px; }
.player-event.-sub-in { width: 14px; height: 14px; color: #22c55e; font-size: 11px; }

@media (min-width: 720px) {
  .player-events-wrap { top: -6px; right: -6px; }
  .player-event.-goal, .player-event.-sub-out, .player-event.-sub-in { width: 16px; height: 16px; font-size: 12px; }
  .player-event.-card { width: 10px; height: 14px; }
}

.pitch-h-player > .name {
  font-size: 10px;
  color: var(--fg);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 2px;
}
@media (min-width: 720px) { .pitch-h-player > .name { font-size: 11px; } }

.pitch-h-player > .sub-name {
  font-size: 9px;
  color: #a7f3d0; /* Un verde suave para destacar que ingresó */
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 2px;
  margin-top: -2px;
}
@media (min-width: 720px) { .pitch-h-player > .sub-name { font-size: 10px; } }

/* ── PITCH VERTICAL (mobile) ──
   Voltea la cancha 90°: home arriba, away abajo. Las líneas pasan a ser
   filas horizontales, y el fondo (medio campo, círculo central, áreas)
   se redibuja con gradientes verticales. */
@media (max-width: 720px) {
  .pitch-h {
    height: 540px;
    background: linear-gradient(180deg, #1d2b1f 0%, #243528 50%, #1d2b1f 100%);
  }
  .pitch-h-bg {
    background-image:
      repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.018) 0px,
        rgba(255,255,255,0.018) 8.33%,
        transparent 8.33%,
        transparent 16.66%
      ),
      linear-gradient(
        0deg,
        transparent calc(50% - 0.5px),
        rgba(236,232,220,0.22) 50%,
        transparent calc(50% + 0.5px)
      ),
      radial-gradient(
        circle at 50% 50%,
        transparent 50px,
        rgba(236,232,220,0.22) 50px,
        rgba(236,232,220,0.22) 51.5px,
        transparent 51.5px
      ),
      /* área inferior (away) */
      linear-gradient(
        0deg,
        transparent 8%,
        rgba(236,232,220,0.18) 8%,
        rgba(236,232,220,0.18) calc(8% + 1px),
        transparent calc(8% + 1px),
        transparent 20%,
        rgba(236,232,220,0.18) 20%,
        rgba(236,232,220,0.18) calc(20% + 1px),
        transparent calc(20% + 1px)
      ),
      /* área superior (home) */
      linear-gradient(
        0deg,
        transparent 80%,
        rgba(236,232,220,0.18) 80%,
        rgba(236,232,220,0.18) calc(80% + 1px),
        transparent calc(80% + 1px),
        transparent 92%,
        rgba(236,232,220,0.18) 92%,
        rgba(236,232,220,0.18) calc(92% + 1px),
        transparent calc(92% + 1px)
      );
  }
  .pitch-h-team {
    width: 100%;
    height: 50%;
    padding: 14px 8px;
  }
  .pitch-h-team.-home {
    top: 0; left: 0; bottom: auto; right: auto;
    flex-direction: column;
  }
  .pitch-h-team.-away {
    bottom: 0; left: 0; top: auto; right: auto;
    flex-direction: column-reverse;
  }
  .pitch-h-line {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    gap: 2px;
  }
  .pitch-h-player > .name {
    font-size: 9px;
    max-width: 100%;
    letter-spacing: 0;
  }
  .pitch-h-team {
    padding: 10px 4px;
  }
}

.pitch-h-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 0;
  font-size: 13px;
}
.pitch-h-foot > .side {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
}
.pitch-h-foot > .side.-away { flex-direction: row; justify-content: flex-end; }
.pitch-h-foot > .side > .name { 
  font-weight: 600; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pitch-h-foot > .side.-away > .name {
  text-align: right;
}
.pitch-h-foot > .side > .formation {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  background: var(--card);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Bench colapsable */
.bench-collapse {
  background: var(--card);
  border-radius: var(--radius);
  margin-top: 6px;
}
.bench-collapse > summary {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg-2);
  font-weight: 500;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.bench-collapse > summary::after {
  content: "›";
  transition: transform 0.2s;
  color: var(--fg-3);
}
.bench-collapse[open] > summary::after { transform: rotate(90deg); }
.bench-collapse[open] > summary { border-bottom: 1px solid var(--line); }
.bench-collapse > .bench-list {
  list-style: none; padding: 8px; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px;
}
.bench-collapse > .bench-list > li {
  display: grid;
  grid-template-columns: 28px 1fr 32px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-2);
  padding: 5px 8px;
  background: var(--bg-2);
  border-radius: 4px;
}
.bench-collapse > .bench-list > li > .num {
  font-family: var(--mono); font-weight: 600; color: var(--fg-3);
  text-align: right;
}
.bench-collapse > .bench-list > li > .pos {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  text-align: right;
}

/* ── PLAYER STATS ──────────────────────────────────────────────────── */
.match-v2 .pstats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 900px) {
  .match-v2 .pstats-grid { grid-template-columns: 1fr 1fr; }
}
.pstats-table {
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow-x: auto; /* Enable horizontal scroll if needed */
  -webkit-overflow-scrolling: touch;
}
.pstats-table > .head, .pstats-table > .row {
  display: grid;
  grid-template-columns: 100px 32px 24px 24px 24px 38px 38px;
  gap: 4px;
  background: var(--bg-2);
  padding: 8px 10px;
  align-items: center;
  font-size: 11px;
  min-width: 340px; /* Force minimum width to prevent crushing name */
}
@media (min-width: 540px) {
  .pstats-table > .head, .pstats-table > .row {
    grid-template-columns: minmax(0, 1fr) 38px 26px 26px 26px 38px 38px;
    gap: 6px;
    font-size: 12px;
  }
}
.pstats-table > .head {
  background: var(--card);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pstats-table > .head > .col,
.pstats-table > .row > .col {
  text-align: right;
  font-family: var(--mono);
}
.pstats-table > .row > .player {
  display: flex; align-items: center; gap: 5px;
  min-width: 0;
}
.pstats-table > .row > .player > .name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--fg);
}
.pstats-table > .row > .player > .card {
  display: inline-block;
  width: 8px; height: 11px;
  border-radius: 1.5px;
  flex: 0 0 8px;
}
.pstats-table > .row > .player > .card.-yellow { background: var(--amarilla); }
.pstats-table > .row > .player > .card.-red    { background: var(--roja); }
.pstats-table > .row > .player > .unknown {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--fg-3);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  flex: 0 0 14px;
}
.pstats-table > .row > .player > .name.-muted {
  color: var(--fg-3);
  font-style: italic;
}
.pstats-table > .row > .player > .pid {
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-3); opacity: 0.7;
}

.pstats-table > .row > .col.rating {
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-align: center;
}
.pstats-table > .row > .col.rating.-hot  { background: var(--accent-dim); color: var(--accent); }
.pstats-table > .row > .col.rating.-good { color: var(--accent); }
.pstats-table > .row > .col.rating.-mid  { color: var(--fg-2); }
.pstats-table > .row > .col.rating.-low  { color: var(--roja); }

.pstats-legend {
  margin: 8px 0 0;
  font-size: 10px; color: var(--fg-3);
  font-family: var(--mono);
  letter-spacing: 0.3px;
}

/* ── BROADCASTS / TV ───────────────────────────────────────────────── */
.tv-block { padding: 0; gap: 0; }
.tv-block > .tv-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--fg-2);
  user-select: none;
}
.tv-block > .tv-summary::-webkit-details-marker { display: none; }
.tv-block > .tv-summary > .title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--fg);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.tv-block > .tv-summary > .meta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}
.tv-block > .tv-summary > .chev {
  color: var(--fg-3);
  font-size: 18px;
  transition: transform 0.15s;
  display: inline-block;
}
.tv-block[open] > .tv-summary > .chev { transform: rotate(90deg); }
.tv-block[open] > .tv-summary { border-bottom: 1px solid var(--line); }
.tv-block > .tv-grid {
  padding: 12px 16px 16px;
}
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.tv-country-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.tv-country-card > .head {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.tv-country-card > .head > .code {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.4px;
}
.tv-country-card > .head > .name {
  font-size: 12px; color: var(--fg-2); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.tv-country-card > .head > .count {
  font-family: var(--mono);
  font-size: 10px; color: var(--fg-3);
}
.tv-country-card > .channels {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.tv-country-card > .channels > .channel {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--fg-2);
  padding: 2px 0;
  min-width: 0;
}
.tv-country-card > .channels > .channel > .icon-wrap {
  flex: 0 0 14px;
  width: 14px; height: 14px;
  color: var(--fg-3);
  display: inline-flex; align-items: center; justify-content: center;
}
.tv-country-card > .channels > .channel > .icon-wrap svg { width: 12px; height: 12px; }
.tv-country-card > .channels > .channel > .name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-country-card > .channels > .channel > .link { color: var(--accent); font-size: 12px; flex: 0 0 auto; }
.tv-country-card > .more {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  background: none; border: 0; padding: 2px 0;
  text-align: left; cursor: pointer;
}
.tv-country-card > .more:hover { color: var(--accent); }

/* ── COMMUNITY (resumen aside) ─────────────────────────────────────── */
.community-bars { display: flex; flex-direction: column; gap: 8px; }
.community-bars > .bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 2fr 38px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.community-bars > .bar-row > .label {
  color: var(--fg-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.community-bars > .bar-row > .bar {
  height: 6px;
  background: var(--card);
  border-radius: 3px;
  overflow: hidden;
}
.community-bars > .bar-row > .bar > .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.community-bars > .bar-row > .bar > .fill.-home { background: var(--accent); }
.community-bars > .bar-row > .bar > .fill.-draw { background: var(--fg-3); }
.community-bars > .bar-row > .bar > .fill.-away { background: var(--accent-2); }
.community-bars > .bar-row > .pct {
  font-family: var(--mono); font-weight: 600;
  text-align: right; color: var(--fg-2);
}

.my-pick-card {
  display: flex; flex-direction: column;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
}
.my-pick-card > .vs {
  display: flex; align-items: center; gap: 14px;
}
.my-pick-card > .vs > .side {
  display: flex; align-items: center; gap: 6px;
}
.my-pick-card > .vs > .side > .num {
  font-family: var(--font-scoreboard);
  font-size: 36px; line-height: 1;
  color: var(--fg);
}
.my-pick-card > .vs > .sep {
  font-size: 18px; color: var(--fg-3);
}
.my-pick-card > .status {
  margin: 0;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── COMENTARIOS ───────────────────────────────────────────────────── */
.match-v2-comments {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.match-v2-comments > .block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 10px;
  margin: 0;
  border-bottom: 1px dashed var(--line-strong);
}
.match-v2-comments > .block-title > svg { color: var(--muted); }
.match-v2-comments > .block-title > .count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  background: rgba(255, 210, 63, 0.14);
  color: var(--gold);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: none;
}
.match-v2-comments > .comments-list {
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.match-v2-comments .comment {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 150ms;
}
.match-v2-comments .comment + .comment { margin-top: 2px; }
.match-v2-comments .comment:hover { background: rgba(255, 255, 255, 0.018); }
.match-v2-comments .comment > .body { flex: 1; min-width: 0; padding: 0; background: none; }
.match-v2-comments .comment .meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
  line-height: 1.2;
}
.match-v2-comments .comment .author {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.match-v2-comments .comment .time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.match-v2-comments .comment .text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.match-v2-comments > .empty,
.match-v2-comments > .login-prompt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 18px 0;
  margin: 0;
}
.match-v2-comments > .login-prompt a { color: var(--gold); text-decoration: none; }
.match-v2-comments > .login-prompt a:hover { text-decoration: underline; }
.match-v2-comments > .comment-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}
.match-v2-comments > .comment-form > .input-row {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 4px 4px 12px;
  transition: border-color 150ms;
}
.match-v2-comments > .comment-form > .input-row:focus-within { border-color: var(--gold); }
.match-v2-comments > .comment-form .input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  padding: 7px 0;
  resize: none;
  outline: none;
  font-family: var(--font);
  font-size: 13.5px;
}
.match-v2-comments > .comment-form .input::placeholder { color: var(--muted); }
.match-v2-comments > .comment-form .submit {
  background: linear-gradient(135deg, var(--gold), #f0b820);
  color: var(--paper-ink);
  border: 0;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: transform 150ms;
}
.match-v2-comments > .comment-form .submit:hover { transform: translateY(-1px); }
/* ── TABS SYSTEM (programa style) ─────────────────────────────────── */
.match-v2-tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.match-v2-tabs > .tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 0;
}
.match-v2-tabs .tab-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.match-v2-tabs .tab-btn:hover { color: var(--ink); }
.match-v2-tabs .tab-btn.-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.match-v2-tabs .tab-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.match-v2-tabs .tab-pane.-hidden { display: none; }

/* ── TOOLTIP INFO PREMIUM ── */
.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cl-text-muted);
  cursor: help;
  margin-left: 8px;
  position: relative;
  transition: color 0.2s;
}

.info-tooltip:hover {
  color: var(--cl-primary);
}

.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -8px) scale(0.8);
  background: rgba(20, 20, 25, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  width: 200px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  z-index: 100;
}

.info-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 0) scale(0.8);
  border: 6px solid transparent;
  border-top-color: rgba(20, 20, 25, 0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.info-tooltip:hover::after,
.info-tooltip:hover::before {
  opacity: 1;
  transform: translate(-50%, -8px) scale(1);
}

/* Ajuste para que no se corte en móviles */
@media (max-width: 480px) {
  .info-tooltip::after {
    left: auto;
    right: -20px;
    transform: translate(0, -8px) scale(0.8);
  }
  .info-tooltip:hover::after {
    transform: translate(0, -8px) scale(1);
  }
  .info-tooltip::before {
    display: none; /* Quitamos la flechita en móvil para evitar desalineación */
  }
}


/* ────────── Header — venue chip (esquina inferior derecha) ────────── */
.match-v2-header > .meta-bottom {
  justify-content: space-between;
}
.match-v2-header > .meta-bottom > .palpitos { margin-right: auto; }

.match-v2-header > .meta-bottom > .venue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
  min-width: 0;
}
.match-v2-header > .meta-bottom > .venue > svg {
  color: var(--gold);
  flex-shrink: 0;
}
.match-v2-header > .meta-bottom > .venue > .venue-name {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.match-v2-header > .meta-bottom > .venue > .venue-place {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  white-space: nowrap;
}
.match-v2-header > .meta-bottom > .venue > .venue-place::before {
  content: "·";
  margin-right: 6px;
  opacity: 0.5;
}

@media (max-width: 559px) {
  .match-v2-header > .meta-bottom { flex-direction: column; align-items: stretch; gap: 8px; }
  .match-v2-header > .meta-bottom > .palpitos,
  .match-v2-header > .meta-bottom > .venue {
    margin: 0;
    text-align: left;
    justify-content: flex-start;
  }
  .match-v2-header > .meta-bottom > .venue > .venue-name { max-width: none; }
}

/* ── LOADING placeholder para Turbo Frame lazy ─────────────────────── */
.match-v2-details-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  color: var(--muted, #888);
  background: var(--card, #1a1a1a);
  border: 1px solid var(--line, #2a2a2a);
  border-radius: var(--radius-lg, 12px);
  font-size: 14px;
}
.match-v2-details-loading > .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: match-v2-spin 0.8s linear infinite;
}
@keyframes match-v2-spin { to { transform: rotate(360deg); } }
