/* ============================================================
   Polla Mundialista — hoja de estilos v2 (rediseño completo)
   Dirección: "verde cancha, limpio".
   Regla 60-30-10:
     60% neutros (fondo gris claro, superficies blancas)
     30% secundario (texto oscuro, bordes, chips suaves)
     10% acento (verde cancha) — solo para acciones, puntos y posiciones
   Rojo reservado EXCLUSIVAMENTE para "en vivo" y tarjetas rojas.
   La versión anterior quedó en la carpeta respaldos/.
   ============================================================ */

:root {
  /* Neutros (60%) */
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --line: #e3e8e1;
  --line-strong: #d2dad0;

  /* Texto (30%) */
  --ink: #1b2620;
  --muted: #5f6c63;

  /* Acento (10%): verde cancha */
  --primary: #0e7a3e;
  --primary-dark: #0a5c2f;
  --primary-soft: #e6f3ea;
  --primary-border: #bfdfca;

  /* Semánticos (uso puntual, no decorativo) */
  --live: #d92d20;        /* solo "en vivo" y tarjeta roja */
  --live-soft: #fceae8;
  --gold: #d9a514;        /* 1.er puesto / 3.os en clasificación */
  --gold-soft: #fbf3dd;
  --silver: #98a1ab;
  --bronze: #b9722d;
  --yellow-card: #f2c200;

  /* Efectos */
  --shadow: 0 1px 2px rgba(27, 38, 32, 0.04), 0 4px 14px rgba(27, 38, 32, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
}

/* ---------- Reset y base ---------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* evita el desplazamiento horizontal en móviles */
}

/* Iconografía: SVG en línea que hereda el color del texto (sin emojis) */
.tab-icon svg,
.segment-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.home-groups-icon svg,
.home-list-title span svg {
  width: 55%;
  height: 55%;
  color: var(--primary-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.1rem, 3.6vw, 1.3rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1rem;
}

p {
  margin: 0.35rem 0;
}

.muted {
  color: var(--muted);
}

/* ---------- Etiqueta de versión ---------- */

.build-tag {
  padding: 0.25rem 0.5rem;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Encabezado y navegación ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3.6rem;
  padding: 0.3rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.brand-logo {
  height: clamp(2.5rem, 9vw, 3.1rem);
  width: auto;
  object-fit: contain;
}

/* El menú hamburguesa ya no se usa: móvil navega con la barra inferior */
.nav-toggle,
.menu-button {
  display: none;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-links a.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* ---------- Barra inferior móvil ---------- */

.mobile-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 4rem;
  padding: 0.35rem 0.25rem calc(0.45rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.mobile-tabbar a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.18rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.tab-icon {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
}

.mobile-tabbar a.is-active {
  color: var(--primary-dark);
}

.mobile-tabbar a.is-active .tab-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mobile-tabbar .home-tab .tab-icon {
  width: 2.3rem;
  height: 2.3rem;
}

/* ---------- Layout ---------- */

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(0.9rem, 3vw, 1.75rem) clamp(0.75rem, 3vw, 1.5rem) 3rem;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(0.9rem, 3vw, 1.4rem);
}

.dashboard,
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.8rem, 2.5vw, 1.2rem);
  align-items: start;
}

.home-dashboard + .grid {
  margin-top: clamp(1.1rem, 4vw, 1.8rem);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.8rem, 2.5vw, 1.2rem);
}

/* ---------- Superficies ---------- */

.panel,
.card,
.group-card,
.match-card,
.prediction-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(0.9rem, 3vw, 1.3rem);
}

.card {
  padding: 1.1rem;
}

.card-actions {
  margin-top: 1rem;
}

.empty-box {
  padding: 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
}

/* ---------- Botones ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--surface-soft);
}

.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ---------- Chips de estado ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.65rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.finished,
.status.postponed,
.status.cancelled {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.status.live {
  background: var(--live);
  color: #fff;
}

.status.live::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fff;
  animation: live-blink 1.4s ease-in-out infinite;
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Avatares y banderas ---------- */

.avatar,
.flag,
.winner-avatar,
.profile-avatar {
  object-fit: cover;
  flex: 0 0 auto;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-soft);
}

.flag {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
}

/* ---------- Listas y filas ---------- */

.list {
  display: grid;
  gap: 0.55rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.2rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.list-row:hover {
  border-color: var(--primary-border);
  background: var(--surface-soft);
}

.identity,
.teams {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-badge {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
}

.points {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.points-rise,
.points-flat {
  display: inline-flex;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.points-rise {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.points-flat {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.mini-match {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-weight: 700;
}

.section-kicker {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- Tablas ---------- */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.65rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

/* ---------- Selector segmentado (inicio) ---------- */

.top-segmented-actions {
  width: min(100%, 30rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.segment-action {
  min-width: 0;
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  font-weight: 700;
  white-space: nowrap;
}

.segment-action.is-active {
  background: var(--primary);
  color: #fff;
}

.segment-icon {
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

/* ---------- Podio ---------- */

.podium-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-bottom: clamp(0.9rem, 3vw, 1.3rem);
}

.podium-entry {
  opacity: 0;
  transform: translateY(0.6rem);
  animation: podium-entry 0.5s ease forwards;
}

.podium-entry-1 { animation-delay: 0.05s; }
.podium-entry-2 { animation-delay: 0.18s; }
.podium-entry-3 { animation-delay: 0.31s; }

@keyframes podium-entry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.podium-card {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.9rem);
  padding: 0;
  border-radius: clamp(16px, 4.5vw, 22px);
  overflow: hidden;
}

/* Jerarquía de más a menos llamativo usando la paleta de la app:
   1.º fondo de estadio con marco dorado, 2.º tinte verde, 3.º casi blanco. */
.podium-1 {
  border: 2px solid #e2b73a;
  background:
    url("/flags/fondo-primera.png") center / 100% 100% no-repeat,
    linear-gradient(135deg, #0a4f29 0%, var(--primary-dark) 45%, var(--primary) 100%);
  box-shadow: 0 6px 20px rgba(10, 92, 47, 0.3), var(--shadow);
}

/* Brillo en el borde superior de la tarjeta del líder */
.podium-1::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}

.podium-1 .podium-names {
  color: #fff;
}

.podium-1 .podium-meta span {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #e8f3ec;
}

.podium-1 .podium-photos .winner-avatar {
  border-color: #ecc44a;
  border-width: 5px;
  box-shadow:
    0 0 18px rgba(243, 214, 120, 0.5),
    0 0 6px rgba(243, 214, 120, 0.6),
    0 3px 12px rgba(0, 0, 0, 0.3);
}

.podium-1 .podium-extra {
  background: #fff;
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.podium-1 .podium-icon {
  animation: sticker-float 3.4s ease-in-out infinite;
}

@keyframes sticker-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.25rem); }
}

.podium-2 {
  border: 3px solid #ffffff;
  background:
    url("/flags/fondo-segunda.png") center / 100% 100% no-repeat,
    linear-gradient(135deg, #cfe9da 0%, #e9f5ee 100%);
  box-shadow: 0 6px 18px rgba(45, 95, 70, 0.22), var(--shadow);
}

.podium-2 .podium-icon {
  animation: sticker-float 3.4s ease-in-out infinite;
  animation-delay: 0.4s;
}

.podium-2 .podium-photos .winner-avatar {
  border-color: #ffffff;
  border-width: 6px;
  box-shadow: 0 3px 12px rgba(30, 70, 50, 0.28);
}

/* Pastilla de puntos del 2.º: relleno verde claro con marco verde marcado */
.podium-2 .score-big {
  background: #d6efdf;
  border: 1.6px solid #3f9e63;
  color: var(--primary-dark);
}

/* Chips de aciertos/exactos del 2.º: borde verde más oscuro y visible */
.podium-2 .podium-meta span {
  background: #ffffff;
  border: 1.6px solid #57b181;
  color: var(--primary-dark);
}

.podium-3 {
  border: 3px solid #ffffff;
  background:
    url("/flags/fondo-tercera.png") center / 100% 100% no-repeat,
    linear-gradient(135deg, #cfe9da 0%, #e9f5ee 100%);
  box-shadow: 0 6px 18px rgba(45, 95, 70, 0.22), var(--shadow);
}

.podium-3 .podium-icon {
  animation: sticker-float 3.4s ease-in-out infinite;
  animation-delay: 0.7s;
}

.podium-3 .podium-photos .winner-avatar {
  border-color: #ffffff;
  border-width: 6px;
  box-shadow: 0 3px 12px rgba(30, 70, 50, 0.28);
}

/* Pastilla de puntos del 3.º: relleno más claro que el chip, borde más oscuro y fino */
.podium-3 .score-big {
  background: #e2f6e2;
  border: 1.5px solid #3f9e5e;
  color: #15592a;
}

/* Chips del 3.º: relleno blanco con borde verde vivo y visible */
.podium-3 .podium-meta span {
  background: #ffffff;
  border: 1.8px solid #4cbd68;
  color: #2f8b57;
}

/* Nombre del 3.º en verde oscuro como la referencia */
.podium-3 .podium-names {
  color: #1d5e30;
}

/* Columna de medalla: icono ilustrado de cada puesto (carpeta imagenes) */
.podium-medal {
  align-self: stretch;
  display: grid;
  place-items: center;
  width: clamp(6rem, 26vw, 9rem);
  padding: 0.15rem 0 0.15rem 0.3rem;
}

.podium-icon {
  width: 100%;
  max-width: 8.8rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(10, 40, 22, 0.35));
}

.podium-body {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 0.42rem;
  padding: 0.8rem 0;
}

/* Chip del puesto + estrella del líder */
.podium-label-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.podium-star {
  width: 1rem;
  height: 1rem;
  color: #f3d678;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Etiqueta del puesto como chip, dorado para el 1.º y verde para el resto */
.podium-label-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.podium-1 .podium-label-chip {
  background: linear-gradient(120deg, #fbf0c4, #ecc44a 60%, #d9a514);
  color: #5d4607;
  border: 1px solid rgba(255, 248, 220, 0.85);
  box-shadow:
    0 0 16px rgba(243, 214, 120, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.podium-2 .podium-label-chip {
  background: linear-gradient(120deg, #2a9c57, var(--primary) 60%, var(--primary-dark));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 14px rgba(14, 122, 62, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Tercer puesto: chip en un solo verde claro (sin gradiente), texto verde oscuro */
.podium-3 .podium-label-chip {
  background: #84d493;
  color: #11551f;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.podium-names {
  margin: 0;
  font-size: clamp(1.12rem, 4.8vw, 1.5rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.score-big {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: fit-content;
  padding: 0.14rem 0.62rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: clamp(0.9rem, 3.8vw, 1.15rem);
  font-weight: 800;
  white-space: nowrap;
}

.score-trend {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--primary-dark);
}

.score-flat {
  color: var(--muted);
  font-weight: 800;
}

/* Pastilla de puntos del 1.º: verde oscuro con marco dorado, como el mockup */
.podium-1 .score-big {
  background: rgba(8, 56, 30, 0.55);
  border: 1.5px solid #ecc44a;
  color: #fff;
}

.podium-1 .score-trend {
  color: #f3d678;
}

.podium-1 .score-flat {
  color: rgba(255, 255, 255, 0.65);
}

.podium-meta {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  margin-top: 0.1rem;
}

.podium-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.16rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.podium-meta svg {
  width: 0.66rem;
  height: 0.66rem;
  flex: 0 0 auto;
}

/* Foto del líder; si hay empate, burbuja con el número de personas extra */
.podium-photos {
  position: relative;
  padding-right: clamp(0.7rem, 3vw, 1rem);
}

.podium-photos .winner-avatar {
  width: clamp(4.2rem, 17vw, 6.2rem);
  height: clamp(4.2rem, 17vw, 6.2rem);
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 2px 8px rgba(27, 38, 32, 0.22);
}

.podium-extra {
  position: absolute;
  top: -0.35rem;
  right: clamp(0.35rem, 2vw, 0.65rem);
  min-width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--primary);
  border: 2px solid var(--surface);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(27, 38, 32, 0.25);
}

/* ---------- Hits de la home ---------- */

.hits-panel {
  margin: clamp(0.85rem, 3vw, 1.25rem) 0;
  padding: clamp(0.85rem, 3vw, 1.1rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hits-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hits-flame {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #fde8d8, #fbd2b9);
  color: #d9531e;
  animation: flame-flicker 1.8s ease-in-out infinite;
}

.hits-flame svg {
  width: 1rem;
  height: 1rem;
}

@keyframes flame-flicker {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Encabezado de panel con título a la izquierda y controles a la derecha */
.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.panel-head-row h2 {
  margin-bottom: 0;
}

/* Flechas verdes del carrusel, en el encabezado */
.hits-arrows {
  display: flex;
  gap: 0.45rem;
}

.hits-arrows button {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary-dark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hits-arrows button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.hits-arrows button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.hits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.hit-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding: 0.78rem 0.9rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Carrusel: las tarjetas fuera de la página activa se ocultan */
.hit-card.is-hidden {
  display: none;
}

.hit-card.is-entering {
  animation: hit-in 0.45s ease both;
}

.hit-card:nth-child(4n + 2).is-entering { animation-delay: 0.06s; }
.hit-card:nth-child(4n + 3).is-entering { animation-delay: 0.12s; }
.hit-card:nth-child(4n).is-entering { animation-delay: 0.18s; }

@keyframes hit-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Avatar con insignia de tono (sube / baja / neutro) */
.hit-media {
  position: relative;
  display: inline-grid;
}

.hit-tone-icon {
  position: absolute;
  right: -0.22rem;
  bottom: -0.22rem;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--muted);
  color: #fff;
}

.hit-tone-icon svg {
  width: 0.6rem;
  height: 0.6rem;
}

.hit-positive .hit-tone-icon {
  background: var(--primary);
}

.hit-negative .hit-tone-icon {
  background: #cf3e45;
}

/* El tono se marca solo con un tinte suave y la insignia del avatar */
.hit-positive {
  background: #f3faf5;
  border-color: #dcebe1;
}

.hit-negative {
  background: #fdf6f5;
  border-color: #f0dcdc;
}

.hit-neutral {
  background: var(--surface-soft);
}

.hit-avatar {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(27, 38, 32, 0.16);
}

/* Hits sin protagonista: balón sobre fondo verde suave en vez de avatar genérico */
.hit-avatar-generic {
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hit-avatar-generic svg {
  width: 1.35rem;
  height: 1.35rem;
}

.hit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

/* ---------- Resumen del día ---------- */

.daily-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0.9rem 0;
}

.daily-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.daily-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.daily-summary-main {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.avatar-stack {
  display: flex;
  align-items: center;
  min-height: 2.1rem;
}

.avatar-stack .avatar {
  width: 2.1rem;
  height: 2.1rem;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(27, 38, 32, 0.15);
}

.avatar-stack .avatar + .avatar {
  margin-left: -0.65rem;
}

.daily-summary-copy {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}

.daily-summary-copy strong,
.daily-summary-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-summary-copy strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.daily-summary-copy span {
  color: var(--muted);
  font-size: 0.85rem;
}

.daily-summary-score {
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 4.2rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-align: center;
}

.daily-summary-score strong {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

.daily-summary-score span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exact-card .daily-summary-score {
  background: var(--gold-soft);
  color: #8a6510;
}

.plus-line {
  margin: 0.25rem 0 0;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.88rem;
}

.exact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.exact-list a {
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
}

.exact-list a:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

/* ---------- En vivo ---------- */

.live-home-panel,
.live-card {
  margin: 0.9rem 0;
  border-left: 1px solid var(--line);
}

.live-card {
  margin: 0;
}

.live-actions {
  display: block;
}

.live-actions .button {
  width: 100%;
}

.live-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.live-home-head small {
  max-width: 16rem;
  text-align: right;
}

.live-home-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.live-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.live-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  font-weight: 800;
}

.live-team strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.live-team .flag {
  width: 2.3rem;
  height: 2.3rem;
}

.live-score {
  display: grid;
  gap: 0.15rem;
  min-width: 4.6rem;
  font-size: clamp(1.5rem, 6vw, 1.9rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.live-score small {
  color: var(--live);
  font-size: 0.7rem;
  font-weight: 700;
}

.live-refresh {
  display: block;
  margin-top: 0.25rem;
}

.live-actions {
  justify-content: flex-end;
  margin: 0.5rem 0;
}

/* ---------- Votos / pronósticos compactos ---------- */

.compact-votes {
  display: grid;
  gap: 0;
}

.compact-votes div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.55rem;
  align-items: start;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.compact-votes strong {
  grid-row: span 2;
  color: var(--primary-dark);
  font-size: 1.15rem;
  line-height: 1.1;
  text-align: center;
}

.compact-votes span {
  font-weight: 700;
  font-size: 0.88rem;
}

.compact-votes small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.vote-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.vote-board div {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.vote-board strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.4rem;
  line-height: 1.1;
}

.vote-board span,
.vote-board small {
  display: block;
}

.vote-board span {
  font-weight: 700;
  font-size: 0.88rem;
}

.vote-board small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Slider de próximos partidos (inicio) ----------
   Carrusel en todos los anchos: desliza con el dedo, flechas o solo (loop). */

.home-match-slider {
  display: flex;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  contain: layout;
}

.home-match-slider::-webkit-scrollbar {
  display: none;
}

.home-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.match-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
}

.slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.slide-match {
  margin: 0.2rem 0;
  font-size: 1.05rem;
}

.slider-dots {
  display: none;
}

.slider-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.slider-arrows button {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.slider-arrows button:hover {
  background: var(--surface-soft);
}

.match-page-actions {
  margin-bottom: 1rem;
}

.match-page-slider,
.match-list-panel {
  margin-top: 1rem;
}

.match-summary-side {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  text-align: right;
}

.match-summary-side strong {
  color: var(--primary-dark);
  font-size: 1.05rem;
}

/* ---------- Tarjeta de partido con detalles (página Partidos) ---------- */

.match-card summary,
.match-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
}

.match-card-link {
  display: block;
  color: inherit;
}

.match-card-link:hover {
  border-color: var(--primary-border);
  background: var(--surface-soft);
}

.finished-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.match-card summary::-webkit-details-marker,
.match-details summary::-webkit-details-marker {
  display: none;
}

.match-title {
  display: grid;
  gap: 0.45rem;
}

.prediction-list {
  display: grid;
  gap: 0;
  margin: 0.5rem 0;
}

.prediction-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.prediction-line:last-child {
  border-bottom: 0;
}

.result-note {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ---------- Puntos por partido (detalle) ---------- */

.pts-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.pts-badge .pts-tag {
  font-weight: 600;
  opacity: 0.8;
}

.pts-exact {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: #8a6a0c;
}

.pts-hit {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
}

.pts-zero {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.pts-pending {
  color: var(--line-strong);
  font-weight: 700;
}

.no-hit-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0 0.9rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.no-hit-note svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--muted);
}

/* Indicador de empate de puesto en el ranking */
.tie-flag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------- Camino a la final (bracket) ---------- */

.tournament-bracket {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  scroll-snap-type: x mandatory;
}

.tournament-round {
  min-width: min(74vw, 15rem);
  display: grid;
  align-content: start;
  gap: 0.55rem;
  scroll-snap-align: start;
}

.tournament-round h3 {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
}

.tournament-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.85rem;
}

.tournament-match strong {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ---------- Clasificación por grupos (inicio) ---------- */

.home-groups-panel {
  grid-column: 1 / -1;
}

.home-groups-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.home-groups-icon,
.home-list-title span {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  font-size: 1.15rem;
  line-height: 1;
}

.home-groups-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
}

.home-groups-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.home-groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.home-group-card {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.home-group-card h3 {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-group-rows {
  display: grid;
  gap: 0.35rem;
}

.home-group-row,
.home-third-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.home-group-row:hover,
.home-third-row:hover {
  border-color: var(--primary-border);
}

.home-group-team,
.home-third-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.home-group-team .flag,
.home-third-team .flag {
  width: 1.6rem;
  height: 1.6rem;
}

.home-position-badge,
.home-third-group {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.home-position-badge.pos-1 {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.home-position-badge.pos-2 {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.home-group-team strong,
.home-third-team strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.home-group-points {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-list-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.25rem 0 0.6rem;
}

.home-list-title span {
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
}

.home-list-title h3 {
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.home-third-list {
  display: grid;
  gap: 0.4rem;
}

.home-third-row {
  min-height: 2.9rem;
}

.home-third-row.possible-row {
  border-style: dashed;
  background: var(--surface-soft);
}

/* ---------- Ranking (filas limpias, como la clasificación por grupos) ---------- */

.ranking-rows {
  display: grid;
  gap: 0.45rem;
}

.ranking-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 3.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.ranking-row:hover {
  border-color: var(--primary-border);
}

.ranking-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ranking-row .avatar {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
}

.ranking-row-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.ranking-row-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.ranking-row-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.ranking-row-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 0.1rem;
}

.ranking-row-side .home-group-points {
  font-size: 0.92rem;
}

.ranking-row-side small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ranking-row-side small.is-up {
  color: var(--primary-dark);
}

/* ---------- Perfil de participante ---------- */

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.8rem, 3vw, 1.3rem);
  margin-bottom: 1rem;
  padding: clamp(0.9rem, 3vw, 1.3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 94% -40%, var(--primary-soft) 0, transparent 52%),
    var(--surface);
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: clamp(4.5rem, 18vw, 6.2rem);
  height: clamp(4.5rem, 18vw, 6.2rem);
  border-radius: 50%;
  border: 3px solid var(--surface);
  outline: 2px solid var(--primary-border);
  box-shadow: 0 2px 8px rgba(27, 38, 32, 0.16);
}

.profile-copy {
  min-width: 0;
}

.profile-copy h1 {
  margin: 0.3rem 0 0.6rem;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  overflow-wrap: anywhere;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.profile-stats div {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.profile-stats strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.15rem;
  line-height: 1.1;
}

.profile-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* Predicciones: tabla en escritorio, tarjetas en móvil */

.desktop-predictions {
  display: none;
}

.mobile-predictions {
  display: grid;
  gap: 0.6rem;
}

.prediction-card {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  transition: border-color 0.15s ease;
}

.mobile-predictions .prediction-card {
  min-width: 0;
}

.mobile-predictions .prediction-card .mini-match {
  display: grid;
  grid-template-columns: auto auto minmax(0, auto) auto auto;
  justify-content: start;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
}

.mobile-predictions .prediction-card .mini-match span,
.mobile-predictions .prediction-card .mini-match strong {
  min-width: 0;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-predictions .prediction-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prediction-section {
  display: grid;
  gap: 0.6rem;
}

.prediction-section h2 {
  margin: 0.4rem 0 0.15rem;
}

.prediction-section-title {
  margin-top: 1.1rem !important;
}

.prediction-card:hover {
  border-color: var(--primary-border);
}

.prediction-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.prediction-metrics div {
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.prediction-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prediction-metrics strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 1rem;
}

/* ---------- Detalle de partido ---------- */

.match-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.match-team {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.match-team .flag {
  width: clamp(2.6rem, 10vw, 3.6rem);
  height: clamp(2.6rem, 10vw, 3.6rem);
}

.inline-team h1 {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(1.1rem, 4.5vw, 1.8rem);
}

.versus {
  font-size: clamp(1.3rem, 5vw, 1.9rem);
  font-weight: 800;
}

.match-center p {
  margin: 0.4rem 0 0;
}

.match-moments,
.match-stats-panel {
  margin-top: 1rem;
}

.moment-list {
  display: grid;
}

.moment-row {
  display: grid;
  grid-template-columns: 2.4rem auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.moment-row:last-child {
  border-bottom: 0;
}

.moment-minute {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.moment-icon {
  min-width: 2.1rem;
  min-height: 1.5rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.moment-icon.is-goal {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.moment-icon.is-yellow {
  background: var(--yellow-card);
  color: #4a3b00;
}

.moment-icon.is-red {
  background: var(--live);
  color: #fff;
}

.moment-row strong,
.moment-row small {
  display: block;
  min-width: 0;
}

.moment-row small {
  color: var(--muted);
}

.match-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-list {
  display: grid;
  margin-top: 0.5rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.stat-row:last-child {
  border-bottom: 0;
}

.lineup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* ---------- Página de grupos ---------- */

.group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.group-card {
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

.group-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.group-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.group-state.is-complete {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.compact-table {
  font-size: 0.88rem;
}

.compact-table th,
.compact-table td {
  padding: 0.5rem 0.45rem;
  white-space: nowrap;
}

.group-table {
  table-layout: fixed;
}

.group-table th:nth-child(1),
.group-table td:nth-child(1) {
  width: 2.3rem;
}

.group-table th:nth-child(2),
.group-table td:nth-child(2) {
  width: auto;
}

.group-table th:nth-child(n+3),
.group-table td:nth-child(n+3) {
  width: 2.2rem;
  text-align: right;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.team-cell .flag {
  width: 1.5rem;
  height: 1.5rem;
}

.team-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
}

.group-position {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0.45rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

/* 1.º y 2.º clasifican directo (verde); 3.º puede clasificar (dorado) */
.group-position.pos-1,
.group-position.pos-2 {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.group-position.pos-3 {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: #8a6510;
}

.group-card h3 {
  padding: 0.85rem 0.95rem 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.group-matches {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem 0.95rem;
}

.group-match {
  display: grid;
  grid-template-columns: minmax(4rem, 1fr) auto auto auto minmax(4rem, 1fr);
  align-items: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  text-align: center;
  transition: border-color 0.15s ease;
}

.group-match:hover {
  border-color: var(--primary-border);
}

.group-match .flag {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

.match-side {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  white-space: nowrap;
}

.home-side {
  justify-content: flex-end;
}

.away-side {
  justify-content: flex-start;
}

.team-code {
  font-weight: 800;
  font-size: 0.85rem;
}

.score-box {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.45rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.empty-score {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
}

.score-separator {
  color: var(--muted);
  font-weight: 800;
}

/* ---------- Soporte / cuadrícula de apoyo ---------- */

.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0.9rem 0;
}

.support-grid div {
  min-height: 4rem;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.support-grid strong {
  color: var(--primary-dark);
  font-size: 1.5rem;
}

.support-box {
  display: grid;
  gap: 0.15rem;
  min-width: 7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.support-box strong {
  color: var(--primary-dark);
}

/* ---------- Móvil: ajustes y slider ---------- */

@media (max-width: 55.99rem) {
  body {
    padding-bottom: 4.8rem; /* espacio para la barra inferior */
  }

  .home-dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.65rem;
    margin-top: 0.8rem !important;
    min-width: 0;
  }

  .home-dashboard .panel {
    min-width: 0;
    padding: 0.75rem;
    overflow: hidden;
  }

  .home-dashboard h2 {
    margin-bottom: 0.55rem;
    font-size: 1rem;
  }

  .home-dashboard .list {
    min-width: 0;
    gap: 0.42rem;
  }

  .home-dashboard .list-row {
    width: 100%;
    min-width: 0;
    min-height: 2.7rem;
    gap: 0.5rem;
    padding: 0.48rem 0.55rem;
  }

  .home-ranking-panel .list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.45rem;
  }

  .home-dashboard .identity {
    min-width: 0;
    gap: 0.45rem;
  }

  .home-ranking-panel .identity strong {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-dashboard .rank-badge {
    width: 1.55rem;
    height: 1.55rem;
    min-width: 1.55rem;
    font-size: 0.74rem;
  }

  .home-dashboard .avatar {
    width: 2rem;
    height: 2rem;
  }

  .home-dashboard .identity strong,
  .home-dashboard .mini-match,
  .home-dashboard .list-row > strong {
    font-size: 0.88rem;
  }

  .home-dashboard .rank-points {
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    min-width: 2.9rem;
    max-width: 4rem;
    gap: 0.12rem;
    font-size: 0.88rem;
    line-height: 1.1;
  }

  .home-dashboard .points-rise,
  .home-dashboard .points-flat {
    padding: 0.08rem 0.35rem;
    font-size: 0.63rem;
  }

  .home-dashboard .mini-match {
    gap: 0.3rem;
  }

  .home-dashboard .mini-match .flag {
    width: 1.45rem;
    height: 1.45rem;
  }

  .home-dashboard .match-card {
    gap: 0.5rem;
    padding: 0.7rem;
  }

  .home-dashboard .slide-head {
    gap: 0.35rem;
  }

  .home-dashboard .slide-head .muted {
    font-size: 0.72rem;
  }

  .home-dashboard .slide-match {
    margin: 0.05rem 0;
    font-size: 0.95rem;
  }

  .home-dashboard .compact-votes div {
    grid-template-columns: 1.55rem minmax(0, 1fr);
    column-gap: 0.42rem;
    padding: 0.38rem 0;
  }

  .home-dashboard .compact-votes strong {
    font-size: 0.98rem;
  }

  .home-dashboard .compact-votes span {
    font-size: 0.78rem;
  }

  .home-dashboard .compact-votes small {
    font-size: 0.7rem;
  }

  .home-dashboard .slider-arrows {
    margin-top: 0.45rem;
  }

  .home-dashboard .slider-arrows button {
    width: 2.05rem;
    height: 2.05rem;
    font-size: 1.25rem;
  }
}

@media (max-width: 26rem) {
  .container {
    padding-inline: 0.6rem;
  }

  .panel {
    padding: 0.8rem;
  }

  .home-group-team strong {
    font-size: 0.8rem;
  }

  .home-group-points {
    font-size: 0.72rem;
  }

  .compact-table th,
  .compact-table td {
    padding-inline: 0.3rem;
    font-size: 0.8rem;
  }

  .home-dashboard .panel {
    padding: 0.65rem;
  }

  .home-dashboard .list-row {
    padding: 0.42rem 0.48rem;
  }

  .home-dashboard .rank-points {
    font-size: 0.82rem;
  }

  .home-dashboard .mini-match {
    font-size: 0.8rem;
  }

  .home-dashboard .list-row > strong {
    font-size: 0.82rem;
  }
}

/* ---------- Tablet en adelante ---------- */

@media (min-width: 46rem) {
  .dashboard,
  .grid,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vote-board {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-stats-grid,
  .lineup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

}

/* ---------- Escritorio: navegación superior ---------- */

@media (min-width: 56rem) {
  .nav {
    justify-content: space-between;
  }

  .nav-links {
    display: flex;
  }

  .mobile-tabbar {
    display: none;
  }

  .desktop-predictions {
    display: block;
  }

  .mobile-predictions {
    display: none;
  }
}

@media (min-width: 70rem) {
  /* En escritorio el podio se muestra en 3 columnas; en móvil/tablet apilado */
  .podium-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

@media (min-width: 75rem) {
  .dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Accesibilidad ---------- */

@media (prefers-reduced-motion: reduce) {
  .podium-entry,
  .hits-flame,
  .hit-card.is-entering,
  .status.live::before {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Los perfiles de rivales usan fichas compactas en todos los anchos. */
.desktop-predictions {
  display: none !important;
}

.mobile-predictions {
  display: grid !important;
}

/* ============================================================
   Detalle de partido estilo Google (móvil primero)
   ============================================================ */

/* ---------- Marcador principal ---------- */

.gm-hero-panel {
  padding-bottom: 1rem;
}

.gm-context {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.gm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
}

.gm-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
}

.gm-team .flag {
  width: clamp(2.8rem, 11vw, 3.8rem);
  height: clamp(2.8rem, 11vw, 3.8rem);
}

.gm-team strong {
  font-size: clamp(1rem, 4vw, 1.4rem);
  font-weight: 800;
}

.gm-team small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-center {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding-top: 0.4rem;
}

.gm-score {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
}

.gm-score .is-winner {
  color: var(--ink);
}

.gm-score-sep {
  font-size: 0.6em;
  color: var(--muted);
}

.gm-score-pending {
  color: var(--muted);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
}

/* Goleadores bajo el marcador */
.gm-scorers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.gm-scorers ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.22rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.gm-scorers-home {
  text-align: left;
}

.gm-scorers-away {
  text-align: right;
}

.gm-scorers-ball {
  display: grid;
  place-items: start center;
  color: var(--primary-dark);
}

.gm-scorers-ball svg {
  width: 1rem;
  height: 1rem;
}

/* ---------- Estadísticas con barras enfrentadas ---------- */

.gstat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.gstat-team {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.gstat-team .flag {
  width: 1.5rem;
  height: 1.5rem;
}

.gstat-list {
  display: grid;
}

.gstat-row {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.gstat-row:last-child {
  border-bottom: 0;
}

.gstat-values {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.5rem;
}

.gstat-label {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.gstat-home {
  justify-self: start;
}

.gstat-away {
  justify-self: end;
}

.gstat-home,
.gstat-away {
  font-size: 0.92rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

/* El lado con mejor número se resalta en verde, como en Google */
.home-best .gstat-home,
.away-best .gstat-away {
  background: var(--primary);
  color: #fff;
}

.gstat-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.gstat-bar-track {
  height: 0.32rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
}

/* La barra local crece desde el centro hacia la izquierda */
.gstat-track-home {
  justify-content: flex-end;
}

.gstat-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 0.6s ease;
}

.home-best .gstat-bar-home,
.away-best .gstat-bar-away {
  background: var(--primary);
}

/* ---------- Lista de partidos jugados: marcador apilado ---------- */

.match-card-finished summary {
  align-items: center;
  flex-wrap: nowrap;
}

.scoreboard {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.45rem;
}

.sb-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sb-meta .muted {
  font-size: 0.74rem;
  font-weight: 600;
}

.sb-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.sb-row .flag {
  width: 1.6rem;
  height: 1.6rem;
}

.sb-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 600;
}

.sb-score {
  font-size: 1.05rem;
  font-weight: 800;
  min-width: 1.4rem;
  text-align: right;
}

/* El ganador se ve en tinta fuerte; el resto en gris */
.sb-row.is-winner {
  color: var(--ink);
}

.sb-row.is-winner .sb-name {
  font-weight: 800;
}

.sb-chevron {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.sb-chevron svg {
  width: 1.15rem;
  height: 1.15rem;
}

details[open] .sb-chevron {
  transform: rotate(180deg);
}

.sb-chevron-link {
  transform: none;
}

/* ---------- Alineaciones sobre la cancha ---------- */

.match-lineups-panel {
  margin-top: 1rem;
}

.pitch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pitch-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pitch-formation {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.pitch-coach {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.78rem;
}

.pitch {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 0.55rem;
  min-height: 21rem;
  padding: 1.4rem 0.6rem 1rem;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 12.5%,
      transparent 12.5%,
      transparent 25%
    ),
    linear-gradient(180deg, #2f9e57, #23854a);
  overflow: hidden;
}

/* Líneas de la cancha: borde interior y área del arquero */
.pitch::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  pointer-events: none;
}

.pitch::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 46%;
  height: 13%;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

.pitch-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 0.25rem;
}

.pitch-row-wrap {
  flex-wrap: wrap;
  row-gap: 0.6rem;
}

.pitch-player {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.18rem;
}

.pitch-dot {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary-dark);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.pitch-dot.is-gk {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.pitch-name {
  max-width: 4.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- En vivo: puntos ganados en resultados recientes ---------- */

.result-points-panel {
  margin-top: 1rem;
}

.result-points-card {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.result-points-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.result-points-head .mini-match span {
  font-weight: 800;
}

.result-points-list {
  display: grid;
}

.result-points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.result-points-row:last-child {
  border-bottom: 0;
}

.result-points-row .avatar {
  width: 1.9rem;
  height: 1.9rem;
}

.result-points-side {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

/* Chip de puntos: verde sólido el exacto, verde suave el acierto, gris el cero */
.pts-chip {
  min-width: 2.2rem;
  text-align: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pts-exact {
  background: var(--primary);
  color: #fff;
}

.pts-hit {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pts-zero {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Momentos importantes: tarjetas de evento estilo Google ---------- */

.event-cards {
  display: grid;
  gap: 0.6rem;
}

.event-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.event-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.event-card.is-goal .event-head {
  background: var(--primary);
  color: #fff;
}

.event-card.is-yellow .event-head {
  background: #fdf6da;
  color: #6b5a00;
  border-bottom: 1px solid #f0e5b4;
}

.event-card.is-red .event-head {
  background: var(--live-soft);
  color: var(--live);
  border-bottom: 1px solid #f4cfca;
}

.event-head-icon {
  display: grid;
  place-items: center;
}

.event-head-icon svg {
  width: 1rem;
  height: 1rem;
}

/* Rectangulito de tarjeta amarilla/roja en el encabezado */
.event-card-chip {
  width: 0.58rem;
  height: 0.82rem;
  border-radius: 2px;
  background: var(--yellow-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.event-card.is-red .event-card-chip {
  background: var(--live);
}

.event-minute {
  margin-left: auto;
  font-weight: 800;
}

.event-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
}

.event-team-flag {
  width: 2rem;
  height: 2rem;
}

.event-body-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.event-body small {
  color: var(--muted);
}

/* ---------- Insignias sobre la cancha (gol, tarjeta, cambio) ---------- */

.pitch-dot-wrap {
  position: relative;
  display: inline-grid;
}

.pmark {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pmark-goal {
  top: -0.34rem;
  left: -0.38rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pmark-goal svg {
  width: 0.68rem;
  height: 0.68rem;
}

.pmark-goal i {
  position: absolute;
  top: -0.4rem;
  right: -0.3rem;
  font-style: normal;
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.pmark-card {
  top: -0.3rem;
  right: -0.28rem;
  width: 0.5rem;
  height: 0.72rem;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pmark-yellow {
  background: var(--yellow-card);
}

.pmark-red {
  background: var(--live);
}

.pmark-sub {
  bottom: -0.28rem;
  right: -0.34rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #fff;
  color: var(--live);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pmark-sub svg {
  width: 0.62rem;
  height: 0.62rem;
}

/* Leyenda bajo la cancha */
.pitch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.pitch-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.pitch-legend i {
  display: inline-block;
}

.pmark-goal-demo {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.pmark-yellow-demo {
  width: 0.45rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--yellow-card);
}

.pmark-red-demo {
  width: 0.45rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--live);
}

.pmark-sub-demo {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 2px solid var(--live);
}

@media (min-width: 46rem) {
  .pitch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pitch {
    min-height: 24rem;
  }

  .pitch-name {
    max-width: 5.4rem;
    font-size: 0.68rem;
  }
}
/* Header final */
.build-tag {
  display: none;
}

.brand-logo {
  height: clamp(3.2rem, 12.2vw, 4.25rem);
  width: min(218px, 66vw);
  max-height: 68px;
  object-fit: contain;
}

.brand {
  min-height: 66px;
}

.nav {
  padding-top: 0;
  padding-bottom: 0;
}
