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

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

/* Las secciones (header, "Tu pálpito", formación, tabs) viven DENTRO del
   turbo-frame match_bzzoiro_details. `gap` en un <turbo-frame> es poco
   confiable → separamos con margin entre hermanos (owl). Robusto e
   independiente del display del frame. */
#match_bzzoiro_details > * + * { margin-top: 20px; }
@media (min-width: 720px) {
  #match_bzzoiro_details > * + * { margin-top: 28px; }
}

/* ── 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;
}
/* En vivo: SOLO el borde coral + glow que "respira" (sin tinte de fondo — el
   fondo queda igual que cualquier card). */
.match-v2-header.-live {
  border-color: var(--coral);
  animation: live-breath 2.4s ease-in-out infinite;
}
@keyframes live-breath {
  0%, 100% {
    border-color: color-mix(in srgb, var(--coral) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--coral) 18%, transparent),
                0 8px 24px -16px var(--coral-glow);
  }
  50% {
    border-color: var(--coral);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--coral) 45%, transparent),
                0 16px 40px -10px var(--coral-glow);
  }
}
@media (prefers-reduced-motion: reduce) {
  .match-v2-header.-live { animation: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--coral) 30%, transparent); }
}

.match-v2-header > .meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
/* Fase del torneo, pegada a la derecha de la barra. */
.match-v2-header > .meta-line > .stage {
  margin-left: auto;
  color: var(--fg-3);
  white-space: nowrap;
}
.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: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.match-v2-header > .meta-line > .status.-scheduled {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--green);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

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

.match-v2-header > .match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 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;
}
/* Ganador de la tanda de penales: nombre en verde. */
.match-v2-header .team.-winner > .team-meta > .name,
.match-v2-header .team.-winner > .team-meta > .name a { color: var(--accent); }
@media (max-width: 540px) {
  .match-v2-header .team > .team-meta > .name {
    font-size: 12.5px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    overflow: visible;
    /* break-word (no "anywhere"): rompe en el espacio ("Países"/"Bajos") en vez
       de cortar a mitad de palabra ("Paíse-s"). */
    overflow-wrap: break-word;
    hyphens: none;
  }
  .match-v2-header > .match-row > .score-wrap { max-width: 150px; }
  .match-v2-header > .match-row > .score-wrap > .score.-with-pens > .num { font-size: 34px; }
}
.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;
}

/* Forma reciente (últimos 5: V/E/D, el más reciente a la derecha) */
.match-v2-header .team > .team-meta > .form-streak {
  display: flex; gap: 3px;
  margin: 0;
}
.match-v2-header .team > .team-meta > .form-streak > .res {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px;
  border-radius: 3px;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  cursor: default;
}
.match-v2-header .team > .team-meta > .form-streak > .res.-win  { background: #22c55e; color: #04210f; }
.match-v2-header .team > .team-meta > .form-streak > .res.-draw { background: var(--amarilla); color: var(--amarilla-ink); }
.match-v2-header .team > .team-meta > .form-streak > .res.-loss { background: var(--roja); color: white; }
@media (max-width: 540px) {
  /* El team-meta queda flex-end/flex-start incluso en mobile (la regla
     desktop por lado gana en especificidad); el nombre se ve centrado solo
     porque estira al 100%. Los chips son content-width → centrarlos a sí
     mismos. */
  .match-v2-header .team > .team-meta > .form-streak { align-self: center; }
  .match-v2-header .team > .team-meta > .form-streak > .res { width: 13px; height: 13px; font-size: 8px; }
}

.match-v2-header > .match-row > .score-wrap {
  text-align: center;
  min-width: 100px;
  /* Tope para que los captions largos ("X ganó por penales") envuelvan en 2
     líneas en vez de ensanchar la columna central y aplastar los nombres. */
  max-width: 172px;
  margin: 0 auto;
}
.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);
}
/* Tanda de penales pegada a cada equipo en el marcador: 1 (3) — (4) 1. Dorado,
   nunca sumada al marcador del juego (es el desempate). */
.match-v2-header > .match-row > .score-wrap > .score.-with-pens { gap: 6px; }
/* Con penales el marcador lleva 2 números extra → achicamos el grande para que
   "1 (2) — (3) 1" entre sin desbordar la columna acotada. */
.match-v2-header > .match-row > .score-wrap > .score.-with-pens > .num { font-size: 42px; }
.match-v2-header > .match-row > .score-wrap > .score > .pk {
  font-size: 24px; line-height: 1; font-weight: 700;
  color: var(--gold, #ffd23f);
}
.match-v2-header > .match-row > .score-wrap > .score > .pk::before { content: "("; }
.match-v2-header > .match-row > .score-wrap > .score > .pk::after  { content: ")"; }

/* Quién ganó la tanda — caption bajo el marcador, con el ganador resaltado. */
.match-v2-header > .match-row > .score-wrap > .score-pens-win {
  margin-top: 8px;
  font-size: 12px;
  color: var(--fg-3);
}
.match-v2-header > .match-row > .score-wrap > .score-pens-win strong {
  color: var(--accent);
  font-weight: 700;
}
/* Resultado de los 90' (tiempo reglamentario) cuando el partido se definió en
   el alargue — subtítulo bajo el marcador real. Lo que puntúa el scoring; va
   discreto, pegado al marcador grande. */
.match-v2-header > .match-row > .score-wrap > .score-reg {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

/* Resultado global del cruce (ida + vuelta) — dato APARTE del marcador del
   juego, neutro para no competir con el chip dorado de penales. */
.match-v2-header > .match-row > .score-wrap > .score-agg {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
@media (max-width: 540px) {
  .match-v2-header > .match-row > .score-wrap > .score > .pk { font-size: 18px; }
  .match-v2-header > .match-row > .score-wrap > .score-pens-win { font-size: 11px; margin-top: 6px; }
  .match-v2-header > .match-row > .score-wrap > .score-agg {
    font-size: 10.5px; margin-top: 6px;
  }
}
.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 — header compacto y sin recortes:
   menos padding/gap, escudos arriba del nombre y nombres que envuelven. */
@media (max-width: 540px) {
  .match-v2-header { padding: 12px 10px; gap: 10px; }

  .match-v2-header > .meta-line {
    font-size: 9.5px;
    gap: 6px 8px;
    letter-spacing: 0.12em;
  }

  .match-v2-header > .match-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }
  .match-v2-header .team {
    flex-direction: column !important;
    gap: 5px;
    text-align: center;
    min-width: 0;
  }
  .match-v2-header .team.-home { flex-direction: column-reverse !important; }
  .match-v2-header .team > .badge-wrap { width: 40px; height: 40px; flex-basis: 40px; }
  .match-v2-header .team > .team-meta { align-items: center; width: 100%; min-width: 0; }
  .match-v2-header .team > .team-meta > .line { justify-content: center; font-size: 10px; }

  .match-v2-header > .match-row > .score-wrap { min-width: 0; padding: 0 2px; }
  .match-v2-header > .match-row > .score-wrap > .score { gap: 6px; }
  .match-v2-header > .match-row > .score-wrap > .score > .num { font-size: 30px; }
  .match-v2-header > .match-row > .score-wrap > .score > .sep { font-size: 18px; }
  .match-v2-header > .match-row > .score-wrap > .time > .hr { font-size: 19px; }
  .match-v2-header > .match-row > .score-wrap > .vs-lite { font-size: 18px; }

  .match-v2-header > .match-v2-pick { padding-top: 12px; gap: 8px; }
  .match-v2-header > .meta-bottom { padding-top: 10px; font-size: 11px; }
}
@media (max-width: 380px) {
  .match-v2-header > .match-row > .score-wrap > .score > .num { font-size: 26px; }
  .match-v2-header .team > .team-meta > .name { font-size: 11.5px; }
  .match-v2-header .team > .badge-wrap { width: 36px; height: 36px; flex-basis: 36px; }
}

/* ── 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;
  }
  .match-v2-summary-row.-solo { display: block; }
}

/* -solo: solo "Tu pálpito" (comunidad oculta, en el detalle). Sin la
   grid de 2 col que dejaba media caja vacía: strip full-width, bloque
   horizontal y compacto; el CTA = link a palpitar. */
.match-v2-summary-row.-solo .block {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
}
.match-v2-summary-row.-solo .block-title { margin-right: auto; }
.match-v2-summary-row.-solo .block-cta { align-self: auto; }
.match-v2-summary-row.-solo .my-pick-card {
  flex-direction: row;
  gap: 14px;
  padding: 8px 14px;
  background: transparent;
}
.match-v2-summary-row.-solo .my-pick-card > .status { margin-left: 4px; }

/* ── PÁLPITO INLINE EN EL HEADER ───────────────────────────────────────
   El editor vive DENTRO del card del header (junto a los escudos), no en
   un bloque aparte: así no repetimos escudos ni fecha. Solo una línea
   divisoria, un label chico y los steppers + autosave centrados. */
.match-v2-header > .match-v2-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}
.match-v2-header > .match-v2-pick > .pick-label {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
/* El .pp-form viene de "Palpitar" con su propio padding/fondo; acá ya
   está dentro del card del header → lo neutralizamos. */
.match-v2-header > .match-v2-pick > .pp-form {
  padding: 0;
  width: 100%;
  min-width: 0;
}
.match-v2-header .match-v2-pick .pp-m2 { gap: 10px; }
.match-v2-header .match-v2-pick .pp-step { border-radius: 10px; }
.match-v2-header .match-v2-pick .pp-step > button { width: 36px; height: 50px; font-size: 17px; }
.match-v2-header .match-v2-pick .pp-num { width: 48px; height: 50px; font-size: 32px; }
.match-v2-header .match-v2-pick .pp-d { font-size: 20px; }
.match-v2-header .match-v2-pick .pp-foot { margin-top: 12px; gap: 8px 12px; }
.match-v2-header .match-v2-pick .pp-res { font-size: 10px; letter-spacing: 0.1em; }

@media (min-width: 720px) {
  .match-v2-header .match-v2-pick .pp-m2 { gap: 16px; }
  .match-v2-header .match-v2-pick .pp-step > button { width: 42px; height: 58px; font-size: 19px; }
  .match-v2-header .match-v2-pick .pp-num { width: 60px; height: 58px; font-size: 40px; }
  .match-v2-header .match-v2-pick .pp-d { font-size: 24px; }
}
@media (max-width: 360px) {
  .match-v2-header .match-v2-pick .pp-step > button { width: 30px; height: 46px; font-size: 15px; }
  .match-v2-header .match-v2-pick .pp-num { width: 42px; height: 46px; font-size: 28px; }
}

/* "vs" sobrio en el centro del header cuando está programado y editable
   (el marcador a palpitar va abajo; la fecha ya está en la meta-line). */
.match-v2-header > .match-row > .score-wrap > .vs-lite {
  font: 400 22px/1 var(--font-scoreboard);
  color: var(--fg-3);
  letter-spacing: 0.08em;
}

/* ── ESTADO EN VIVO UNIFICADO (dentro de la meta-line del header) ──────
   Antes había 3 indicadores ("Live" en el ribbon, "EN VIVO" en un strip
   suelto y "En juego" en el header). Ahora hay UNO solo: el fragment
   live (auto-actualiza vía Turbo Stream) renderizado como pill acá. */
.match-v2-header > .meta-line > .match-live-strip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  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 > .match-live-strip.-live {
  background: rgba(255, 120, 102, 0.1);
  color: var(--coral);
  border-color: rgba(255, 120, 102, 0.4);
  /* el emblema EN VIVO ya trae su propio borde redondo → menos padding izq. */
  padding-left: 4px;
}
.match-v2-header > .meta-line > .match-live-strip.-finished {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.match-v2-header > .meta-line > .match-live-strip.-scheduled {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--green);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
/* El score grande ya está en el centro del header → no lo repetimos
   chiquito en la pill (sí dejamos el minuto). */
.match-v2-header > .meta-line > .match-live-strip > .live-score { display: none; }

/* Strip suelto fuera del header: ya no se usa en el detalle (el fragment
   vive en la meta-line). Si quedara alguno, que no rompa el layout. */
.match-v2 > .match-live-strip { display: none; }

/* ── PÁLPITO: resto de estados (look de Pronosticar, embebido) ─────────
   Reutilizamos las clases pp-* de la página Palpitar para que se vea
   idéntico; solo neutralizamos sus márgenes/bordes laterales porque acá
   ya viven dentro del card del header con su propia línea divisoria. */
.match-v2-header > .match-v2-pick { align-items: stretch; }
.match-v2-header > .match-v2-pick > .pick-label { align-self: center; }
.match-v2-header > .match-v2-pick > .pp-result {
  border-top: 0;
  padding: 0;
  text-align: center;
}
.match-v2-header > .match-v2-pick > .pp-chip,
.match-v2-header > .match-v2-pick > .pp-locked {
  margin: 0;
  width: 100%;
}
/* Compartir la card del pálpito (IG Stories / WhatsApp) — la imagen la
   genera share_card_controller en el cliente. */
.pp-result > .pp-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px auto 0;
  padding: 8px 18px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.4px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.pp-result > .pp-share:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pp-result > .pp-share:disabled { opacity: 0.6; cursor: default; }
.pp-result > .pp-share svg { width: 14px; height: 14px; }
/* Solo mobile: en desktop no hay hoja nativa de compartir (Instagram /
   WhatsApp), así que el botón no aporta. */
@media (min-width: 720px) {
  .pp-result > .pp-share { display: none; }
}

.match-v2-header > .match-v2-pick.-guest {
  align-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--fg-3);
  gap: 0;
  padding-top: 14px;
}
.match-v2-header > .match-v2-pick.-guest a { color: var(--accent); }

/* ── 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: 50px;
  max-height: 360px;
  overflow-y: auto;
}
.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: 30px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  margin-left: -50px;
}
.timeline-row > .minute > .num { white-space: nowrap; }
/* Divisor de fase (1T / 2T / tiempo extra). Ocupa todo el ancho de la lista
   (cancela el padding-left del riel) con el label centrado entre dos líneas. */
.timeline-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px -50px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.timeline-divider::before,
.timeline-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.timeline-divider > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.timeline-divider:first-child { margin-top: 0; }
/* Cierre de la tanda de penales — dorado para distinguirlo de los cortes de fase. */
.timeline-divider.-pen { color: var(--gold, #ffd23f); }
.timeline-divider.-pen::before,
.timeline-divider.-pen::after { background: rgba(255, 210, 63, 0.3); }
.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;
}
/* Gol anulado por VAR: apagado y tachado, para que se lea como "no contó". */
.timeline-row > .timeline-card > .ev-icon.-goal.-annulled {
  background: var(--card-2) !important;
  color: var(--fg-3) !important;
  opacity: 0.85;
}
.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;
}
.timeline-row > .timeline-card .ev-tag.-annulled {
  color: var(--fg-3) !important;
  background: var(--card-2) !important;
}
.timeline-row > .timeline-card > .ev-body > .head > .player.-annulled {
  text-decoration: line-through;
  color: var(--fg-3);
}

/* ── 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(--accent); color: var(--accent-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 {
    /* Cancha más alta en mobile: más espacio entre filas →
       los iconos de goles/cambios nunca se cortan */
    height: 700px;
    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: 18px 6px;
  }
  .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 {
    min-width: 0;
    /* overflow: visible para que los iconos absolutos (goles/cambios)
       no queden recortados por el contenedor del jugador */
    overflow: visible;
  }
  .pitch-h-player > .name,
  .pitch-h-player > .sub-name {
    font-size: 8px;
    letter-spacing: 0;
    padding: 0 2px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.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;
}

/* ── HEAD-TO-HEAD (Compacta · plegable) ────────────────────────────── */
/* Todo el bloque es un <details open>: tocar el encabezado lo minimiza,
   como colapsar un hilo de comentarios. Sin JS (details/summary nativo). */
.h2h-block { padding: 0; overflow: hidden; }

.h2h-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.h2h-summary::-webkit-details-marker { display: none; }
.h2h-summary:hover { background: var(--card-2); }
.h2h-summary .icon { stroke: var(--accent); flex: none; }
.h2h-summary__sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
}
/* resumen mini: nº de victorias pegado a su escudo, empates al medio.
   Se ve SOLO cuando el bloque está minimizado. */
.h2h-summary__mini {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}
.h2h-summary__mini .-h { color: var(--accent); }
.h2h-summary__mini .-a { color: var(--accent-2); }
.h2h-summary__mini .-d { color: var(--fg-3); font-weight: 400; font-size: 11px; }
.h2h-summary__chev { display: inline-flex; color: var(--fg-3); transition: transform 0.2s; }
.h2h-block[open] .h2h-summary__chev { transform: rotate(90deg); }
.h2h-block[open] .h2h-summary__mini { display: none; }
.h2h-block[open] .h2h-summary__sub { margin-left: auto; }

.h2h-body { padding: 0 14px 13px; }

/* Marcador en una línea: escudo · nº · barra · nº · escudo */
.h2h-record { display: flex; flex-direction: column; gap: 8px; }
.h2h-record > .line {
  display: flex;
  align-items: center;
  gap: 9px;
}
.h2h-record > .line > .num {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}
.h2h-record > .line > .num.-home { color: var(--accent); }
.h2h-record > .line > .num.-away { color: var(--accent-2); }
.h2h-record > .line > .bar {
  flex: 1;
  display: flex;
  gap: 3px;
  height: 5px;
}
.h2h-record > .line > .bar > .seg { border-radius: 2px; background: var(--card); }
.h2h-record > .line > .bar > .seg.-home { background: var(--accent); }
.h2h-record > .line > .bar > .seg.-draw { background: var(--line-strong); }
.h2h-record > .line > .bar > .seg.-away { background: var(--accent-2); }
.h2h-record > .foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}

/* Cruces recientes: segundo nivel plegable */
.h2h-recents { margin-top: 11px; }
.h2h-recents > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}
.h2h-recents > summary::-webkit-details-marker { display: none; }
.h2h-recents > summary:hover { color: var(--fg-2); }
.h2h-recents__chev { display: inline-flex; transition: transform 0.2s; }
.h2h-recents[open] .h2h-recents__chev { transform: rotate(90deg); }
.h2h-recents > .list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.h2h-recents > .list > .row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.h2h-recents > .list > .row:first-child { border-top: 0; }
.h2h-recents > .list > .row > .date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  flex-shrink: 0;
}
.h2h-recents > .list > .row > .pair {
  color: var(--fg-2);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h2h-recents > .list > .row > .pair > .vs { color: var(--fg-3); }
.h2h-recents > .list > .row > .score {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--fg);
}
.h2h-recents > .list > .row > .score > .-win { color: var(--accent); }

/* ── BROADCASTS / TV (solo Argentina, chips de marca por canal) ─────── */
.tv-block { padding: 12px 16px 14px; gap: 10px; }
.tv-block > .tv-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tv-block > .tv-head > .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-head > .meta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
}
.tv-block > .tv-channels {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tv-channel {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg-2);
}
/* Logo oficial del canal (app/assets/images/channels/) sobre pastilla
   blanca: varios wordmarks son oscuros y en el tema dark no se verían. */
.tv-channel > .logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; min-width: 42px;
  padding: 4px 9px;
  background: #fff;
  border-radius: 999px;
}
.tv-channel > .logo img {
  height: 100%;
  width: auto;
  max-width: 58px;
  object-fit: contain;
}
.tv-channel > .logo.-generic {
  background: var(--card-2);
  color: var(--fg-3);
}
.tv-channel > .logo.-generic svg { width: 12px; height: 12px; }
.tv-channel > .name { white-space: nowrap; }
.tv-channel > .link { color: var(--accent); font-size: 12px; text-decoration: none; }

/* ── 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: var(--accent-dim);
  color: var(--accent);
  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 .comments-list > .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(--accent); 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(--accent); }
.match-v2-comments > .comment-form .input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  resize: none;
  outline: none;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.4;
  max-height: 120px;
  overflow-y: auto;
}
.match-v2-comments > .comment-form .input::placeholder { color: var(--muted); }
.match-v2-comments > .comment-form .submit {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-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); }
/* Contador oculto cuando no hay comentarios (el turbo_stream lo repuebla). */
.match-v2-comments > .block-title > .count.-empty { display: none; }

/* Mobile: el botón "Enviar" va DEBAJO del input (mismo patrón que salas).
   El input pasa a tener su propio borde/fondo (la "pill" deja de envolver
   ambos) y ocupa todo el ancho, así el placeholder entra sin scroll. */
@media (max-width: 540px) {
  .match-v2-comments > .comment-form { gap: 8px; }
  .match-v2-comments > .comment-form > .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 0;
  }
  .match-v2-comments > .comment-form .input {
    background: var(--input);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 9px 12px;
  }
  .match-v2-comments > .comment-form .input:focus { border-color: var(--gold); }
  /* Botón full-width (mismo ancho que el input), pero bajito. */
  .match-v2-comments > .comment-form .submit {
    width: 100%;
    padding: 7px 14px;
    font-size: 13px;
  }
  /* Fotos más chicas en mobile (el helper las fija inline → !important). */
  .match-v2-comments .comment > .avatar,
  .match-v2-comments > .comment-form > .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }
  /* Avatares pegados a la pared: menos padding lateral del card y del item. */
  .match-v2-comments { padding-left: 10px; padding-right: 10px; }
  .match-v2-comments > .comments-list { padding-right: 0; }
  .match-v2-comments .comment { padding-left: 4px; }
  .match-v2-comments > .comment-form { padding-left: 0; }
}
/* ── 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(--accent);
  border-bottom-color: var(--accent);
}

.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(--accent);
  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 {
    flex-wrap: wrap;
    column-gap: 6px;
    row-gap: 2px;
  }
  .match-v2-header > .meta-bottom > .venue > .venue-name { max-width: none; }
  .match-v2-header > .meta-bottom > .venue > .venue-place {
    flex-basis: 100%;
    padding-left: 18px;
  }
  .match-v2-header > .meta-bottom > .venue > .venue-place::before {
    display: 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); } }

/* ── Navegación prev/next entre partidos ────────────────────────────── */
.match-v2-matchnav {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.match-v2-matchnav__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.match-v2-matchnav__btn:hover { border-color: var(--accent); color: var(--accent); }
.match-v2-matchnav__btn.-off { opacity: 0.3; pointer-events: none; flex: 0 0 48px; }
.match-v2-matchnav__btn.-prev { text-align: left; }
.match-v2-matchnav__btn.-next { text-align: right; }
@media (max-width: 719px) {
  .match-v2-matchnav__btn { font-size: 11.5px; padding: 10px 12px; }
}
