/* ===== Variables ===== */
:root {
  --bg: #0b0f17;
  --bg-alt: #0f1521;
  --surface: #151c2b;
  --surface-2: #1c2538;
  --border: #253049;
  --text: #e8ecf4;
  --muted: #8b96ad;
  --accent: #ff6b1a;
  --accent-2: #ffb020;
  --win: #2fd17c;
  --loss: #ff5466;
  --live: #ff3b4f;
  --radius: 14px;
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ===== Ticker ===== */
.ticker {
  display: flex;
  align-items: stretch;
  background: #070a10;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  overflow: hidden;
}
.ticker__label {
  flex: none;
  display: grid;
  place-items: center;
  padding: 0 16px;
  background: var(--accent);
  color: #111;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
}
.ticker__track {
  display: flex;
  overflow-x: auto;
}
.ticker__game {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 14px;
  padding: 8px 18px;
  border-right: 1px solid var(--border);
}
.ticker__game .status {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ticker__game .status.is-live { color: var(--live); font-weight: 600; }
.ticker__game .score { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker__game .is-lead { color: var(--text); font-weight: 700; }
.ticker__game .is-trail { color: var(--muted); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 23, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__ball {
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 47%, #111 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, #111 47% 53%, transparent 53%),
    radial-gradient(circle at 35% 30%, #ffa35c, var(--accent) 60%, #c94a06);
  box-shadow: 0 0 18px rgba(255, 107, 26, .45);
}
.logo__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.logo__text span { color: var(--accent); }
.logo--sm .logo__ball { width: 24px; height: 24px; }
.logo--sm .logo__text { font-size: 21px; }

.nav { display: flex; gap: 4px; }
.nav__link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--text); background: var(--surface-2); }

.header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }

.menu-btn { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== Botones / etiquetas ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #111; }
.btn--primary:hover { background: #ff8340; }
.btn--ghost { border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--muted); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.tag--accent { background: rgba(255, 107, 26, .15); color: var(--accent); }

.link { color: var(--accent); font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(255, 107, 26, .18), transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(29, 66, 138, .25), transparent 60%);
}
/* Líneas de cancha decorativas */
.hero::before {
  content: "";
  position: absolute;
  right: -180px; top: 50%;
  width: 620px; height: 620px;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, .04);
  border-radius: 50%;
  box-shadow: inset 0 0 0 140px transparent, 0 0 0 120px rgba(255, 255, 255, .015);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  margin: 18px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.hero__title em { font-style: normal; color: var(--accent); }
.hero__text { max-width: 520px; color: var(--muted); font-size: 17px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__kpis {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero__kpis dt { color: var(--muted); font-size: 13px; }
.hero__kpis dd { font-family: var(--font-display); font-size: 34px; font-weight: 700; }

/* Jugador de la noche */
.potn {
  padding: 24px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.potn__head { display: flex; justify-content: space-between; align-items: center; }
.potn__date { color: var(--muted); font-size: 13px; }
.potn__player { display: flex; align-items: center; gap: 16px; margin: 22px 0; }
.potn__name { font-family: var(--font-display); font-size: 28px; line-height: 1.05; text-transform: uppercase; }
.potn__team { color: var(--muted); font-size: 14px; }
.potn__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.potn__stats div {
  padding: 12px 0;
  text-align: center;
  background: var(--bg-alt);
  border-radius: 10px;
}
.potn__stats strong { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--accent); }
.potn__stats span { color: var(--muted); font-size: 12px; font-weight: 600; }
.potn__game { margin-top: 16px; text-align: center; color: var(--muted); font-size: 13px; }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--team, var(--surface-2));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15);
}
.avatar--lg { width: 72px; height: 72px; font-size: 22px; }
.avatar--photo { position: relative; overflow: hidden; }
.avatar--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.empty { padding: 18px; color: var(--muted); font-size: 14px; }

/* ===== Secciones ===== */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.section__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ===== Partidos ===== */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.game {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.game:hover { border-color: var(--accent); transform: translateY(-3px); }
.game__status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.game__status .is-live { color: var(--live); display: flex; align-items: center; gap: 6px; }
.game__status .is-live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.game__team {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.game__team .name { flex: 1; font-weight: 600; }
.game__team .record { color: var(--muted); font-size: 12px; font-weight: 400; }
.game__team .pts { font-family: var(--font-display); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.game__team.is-trail .pts, .game__team.is-trail .name { color: var(--muted); }

/* ===== Líderes / Clasificación ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tab {
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent); color: #111; }

.leader {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.leader:last-child { border-bottom: 0; }
.leader__rank { width: 18px; color: var(--muted); font-weight: 700; }
.leader__info { flex: 1; min-width: 0; }
.leader__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader__team { color: var(--muted); font-size: 12px; }
.leader__bar { flex: 0 0 90px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.leader__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; }
.leader__val { width: 48px; text-align: right; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.leader:first-child { background: linear-gradient(90deg, rgba(255, 107, 26, .1), transparent); }
.leader:first-child .leader__val { color: var(--accent); }

.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings th {
  padding: 12px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
}
.standings td { padding: 10px; text-align: center; border-bottom: 1px solid var(--border); }
.standings .left { text-align: left; }
.standings tbody tr:hover { background: var(--surface-2); }
.standings .team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.standings .team-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
.standings .rank { position: relative; color: var(--muted); font-weight: 700; }
.standings tr.is-po .rank { box-shadow: inset 3px 0 var(--win); }
.standings tr.is-pi .rank { box-shadow: inset 3px 0 var(--accent-2); }
.standings tr.cut td { border-bottom: 2px dashed var(--border); }
.streak.w { color: var(--win); font-weight: 600; }
.streak.l { color: var(--loss); font-weight: 600; }
.standings__legend { display: flex; align-items: center; gap: 6px; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot--po { background: var(--win); }
.dot--pi { background: var(--accent-2); margin-left: 12px; }

/* ===== Explorar ===== */
.explore {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.explore__card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.explore__card:hover { border-color: var(--accent); transform: translateY(-3px); }
.explore__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 16px;
  font-size: 24px;
  background: var(--surface-2);
  border-radius: 12px;
}
.explore__card h3 { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; margin-bottom: 6px; }
.explore__card p { color: var(--muted); font-size: 14px; }

/* ===== Cabecera de página interna ===== */
.page-head {
  padding: 48px 0 8px;
  background: radial-gradient(ellipse 60% 100% at 90% 0%, rgba(255, 107, 26, .14), transparent 60%);
}
.page-head__title {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.page-head__text { max-width: 640px; color: var(--muted); }
.section--tight { padding-top: 24px; }
.muted { color: var(--muted); }

/* ===== Selector de días ===== */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.day {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.day:hover { border-color: var(--muted); }
.day.is-active { background: var(--accent); border-color: var(--accent); color: #111; }
.day__label { font-weight: 700; text-transform: capitalize; }
.day__date { font-size: 12px; opacity: .75; }
.day-info { margin: 16px 0; color: var(--muted); font-size: 14px; }

/* ===== Tarjeta de partido ===== */
.matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 16px;
}
.match {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.match__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 13px;
}
.match__time { color: var(--text); font-weight: 700; }
.match__time .is-live { color: var(--live); }
.match__note { margin-top: -8px; color: var(--accent-2); font-size: 13px; font-weight: 600; }
.match__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.match__team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.match__team:last-child { flex-direction: row-reverse; text-align: right; }
.match__team:last-child .chip { margin-left: auto; }
.match__team .avatar { width: 44px; height: 44px; }
.match__name { font-weight: 700; line-height: 1.2; }
.match__record { color: var(--muted); font-size: 12px; }
.match__score { margin-left: auto; font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.match__team:last-child .match__score { margin-left: 0; margin-right: auto; }
.match__at { color: var(--muted); font-weight: 700; }

.chip {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.chip--good { background: rgba(47, 209, 124, .14); color: var(--win); }
.chip--bad { background: rgba(255, 84, 102, .14); color: var(--loss); }
.chip--warn { background: rgba(255, 176, 32, .14); color: var(--accent-2); }
.chip--accent { background: rgba(255, 107, 26, .16); color: var(--accent); }

.model-detail { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 13px; }
.model-detail h4 { font-size: 14px; margin-bottom: 4px; }
.model-detail > * + * { margin-top: 8px; }
.model-table { width: 100%; border-collapse: collapse; }
.model-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.model-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.model-table .total td { border-bottom: 0; font-weight: 700; color: var(--accent); }

/* ===== Página del modelo ===== */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.metric { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.metric__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.metric__value { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.1; }
.metric__sub { color: var(--muted); font-size: 13px; }

.power { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.power th { padding: 12px 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; text-align: right; }
.power td { padding: 10px; text-align: right; border-bottom: 1px solid var(--border); }
.power .left { text-align: left; }
.power tbody tr:hover { background: var(--surface-2); }
.power .team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.power .team-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
.power .elo-bar { display: inline-block; width: 120px; height: 6px; margin-left: 10px; background: var(--surface-2); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.power .elo-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.up { color: var(--win); }
.down { color: var(--loss); }

.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.how__step { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.how__step h3 { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; margin-bottom: 6px; }
.how__step p { color: var(--muted); font-size: 14px; }
.how__step strong { color: var(--text); }
.note { margin-top: 16px; color: var(--muted); font-size: 13px; }
.note--top { margin: -8px 0 16px; max-width: 760px; }

/* ===== Equipos ===== */
.conf-title { margin: 8px 0 16px; }
.conf-title:not(:first-child) { margin-top: 40px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--team);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.team-card:hover { transform: translateY(-2px); border-color: var(--accent); border-left-color: var(--team); }
.team-card__name { font-weight: 700; }
.team-card .muted { font-size: 12px; }
.team-card__level { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; }
.avatar--md { width: 48px; height: 48px; font-size: 15px; }

.team-hero {
  padding: 32px 0 24px;
  background: radial-gradient(ellipse 70% 120% at 90% 0%, color-mix(in srgb, var(--team, var(--accent)) 35%, transparent), transparent 65%);
  border-bottom: 1px solid var(--border);
}
.team-hero__main { display: flex; align-items: center; gap: 18px; margin: 18px 0 24px; }
.team-hero__main .page-head__title { margin: 0 0 4px; }
.metrics--compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.metrics--compact .metric { padding: 14px 16px; }
.metrics--compact .metric__value { font-size: 30px; }

.factors { min-width: 560px; }
.roster { min-width: 760px; }
.roster .inj__status { margin-left: 6px; }

.sched-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.sched-row:last-child { border-bottom: 0; }
.sched-row__date { width: 92px; flex: none; font-size: 12px; text-transform: capitalize; }
.sched-row .team-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.sched-row .team-cell .avatar { width: 26px; height: 26px; font-size: 10px; }
.sched-row__right { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
a.team-cell:hover { color: var(--accent); }

/* ===== Historial ===== */
.share { margin-top: 16px; padding: 14px; max-width: 520px; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.share__row { display: flex; gap: 8px; margin-top: 10px; }
.share input { flex: 1; min-width: 0; padding: 8px 12px; background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.share > p { margin-top: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; font-size: 13px; }
.toolbar .muted { margin-right: auto; }
.btn--sm { padding: 8px 14px; font-size: 13px; cursor: pointer; }
.metrics--spaced { margin-top: 24px; }
.table-scroll { overflow-x: auto; }
.history { min-width: 860px; }
.lines-score { min-width: 600px; }
.history td { white-space: nowrap; }
.history .team-cell { gap: 8px; }
.moves td.left { font-size: 13px; }
.moves td:nth-child(2) { font-weight: 700; }

.match__probs { display: flex; flex-direction: column; gap: 12px; }
.prob__label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.prob__label .muted { font-weight: 500; text-align: right; }
.prob__bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; }
.prob__bar span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-width: max-content;
  background: color-mix(in srgb, var(--c) 75%, #000);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.prob__bar span:last-child { justify-content: flex-end; }

.match__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }

.lines { font-size: 13px; }
.lines__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines__table th { padding: 6px 8px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; text-align: right; border-bottom: 1px solid var(--border); }
.lines__table th:first-child, .lines__table td:first-child { text-align: left; padding-left: 0; }
.lines__table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--border); }
.lines__table tr:last-child td { border-bottom: 0; }
.lines__table td.hot { color: var(--accent); font-weight: 700; }
.lines > p, .lines__empty { margin-top: 6px; font-size: 12px; }

.alarm { padding: 10px 12px; font-size: 13px; color: var(--accent-2); background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .4); border-radius: 10px; }
.alarm--info { color: var(--muted); background: var(--surface-2); border-color: var(--border); }

.ev { font-size: 13px; }
.ev__scroll { overflow-x: auto; }
.ev__table { min-width: 480px; }
.ev__table th, .ev__table td { white-space: nowrap; }
.ev__table .chip { margin-top: 0; }
.ev > p { margin-top: 6px; font-size: 12px; }

.match__more { border-top: 1px solid var(--border); padding-top: 12px; }
.match__more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.match__detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.tdetail h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.tdetail h4 .avatar { width: 26px; height: 26px; font-size: 10px; }
.tdetail dt { margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.tdetail dd { font-size: 13px; }
.forms { display: flex; gap: 4px; margin-top: 4px; }
.form {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.form--w { background: rgba(47, 209, 124, .16); color: var(--win); }
.form--l { background: rgba(255, 84, 102, .16); color: var(--loss); }
.inj { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.inj li { display: flex; gap: 8px; align-items: flex-start; }
.inj__status { flex: none; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.inj__status--out { background: rgba(255, 84, 102, .16); color: var(--loss); }
.inj__status--dtd { background: rgba(255, 176, 32, .16); color: var(--accent-2); }

.skeleton {
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Footer ===== */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__note { color: var(--muted); font-size: 13px; }
.footer__copy { margin-left: auto; color: var(--muted); font-size: 13px; }

/* ===== Lista de partidos: tarjeta que lleva a la página del partido ===== */
.match--link { transition: border-color .2s, transform .2s; }
.match--link:hover { border-color: var(--accent); transform: translateY(-2px); }
.match__cta { color: var(--accent); font-weight: 600; font-size: 14px; }
.match--flat { gap: 18px; }
.small { font-size: 12px; }

/* ===== Página de un partido ===== */
.page-head--match { padding-bottom: 8px; }
.vs { margin-top: 20px; }
.vs__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.vs__team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.vs__team strong { font-family: var(--font-display); font-size: 26px; line-height: 1.05; text-transform: uppercase; }
.vs__team:hover strong { color: var(--accent); }
.vs__center { text-align: center; }
.vs__time, .vs__score { font-family: var(--font-display); font-size: 44px; font-weight: 800; line-height: 1; }
.vs__score span { margin: 0 8px; color: var(--muted); }
.vs__center div:last-child { text-transform: capitalize; font-size: 13px; }
.vs__place { margin-top: 14px; text-align: center; font-size: 13px; }
.is-live { color: var(--live); font-weight: 600; }

/* Cara a cara: dos barras que crecen desde el centro, una por equipo */
.cmp { padding: 18px 20px; }
.cmp__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 12px; }
.cmp__head .team-cell { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.cmp__head .avatar { width: 30px; height: 30px; font-size: 11px; }
.cmp__head-h { text-align: right; }
.cmp__head-h .team-cell { justify-content: flex-end; }
.cmp__row { display: grid; grid-template-columns: 82px 1fr minmax(120px, 190px) 1fr 82px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.cmp__row:last-child { border-bottom: 0; }
.cmp__label { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.cmp__val { font-weight: 700; }
.cmp__val small { margin: 0 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.cmp__val--h { text-align: right; }
.cmp__val.is-better { color: var(--win); }
.cmp__bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; }
.cmp__bar--a { justify-content: flex-end; }
.cmp__bar span { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.cmp__bar span.is-neutral { background: var(--muted); opacity: .4; }

/* Jugadores clave */
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.pgrid > .card { padding: 18px 20px; }
.pcard__title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 16px; border-left: 3px solid var(--team); padding-left: 10px; }
.pcard__title .avatar { width: 30px; height: 30px; font-size: 11px; }
.ptable td { vertical-align: top; }
.ptable td.left strong { font-size: 14px; }
.ptable .inj__status { margin-left: 6px; }
.ptable tr.is-out td { opacity: .55; }
.match__detail--page { padding: 20px; margin-top: 0; }

/* Simulación */
.sim { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.sim > .btn { align-self: flex-start; font-size: 16px; padding: 14px 26px; }
.sim__summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sim__big, .sim__score { padding: 16px 18px; background: var(--surface-2); border-radius: 12px; }
.sim__big { display: flex; flex-direction: column; }
.sim__big strong { font-family: var(--font-display); font-size: 32px; line-height: 1.1; text-transform: uppercase; }
.sim__score strong { display: block; font-family: var(--font-display); font-size: 32px; line-height: 1.1; }
.sim__title { font-size: 14px; }
.sim__bars { display: flex; flex-direction: column; gap: 8px; }
.sim__bar { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.sim__track { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.sim__track span { display: block; height: 100%; background: var(--c); border-radius: 7px; transition: width .6s ease; }
.sim__pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.sim__bar.is-top .sim__label, .sim__bar.is-top .sim__pct { color: var(--accent); font-weight: 700; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .search { width: 200px; }
  .split { grid-template-columns: 1fr; }
  .explore { grid-template-columns: repeat(2, 1fr); }
}

/* En pantallas estrechas el menú se pliega en el botón ☰ */
@media (max-width: 760px) {
  .menu-btn { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: 12px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.is-open { display: flex; }
}

@media (max-width: 860px) {
  .hero { padding: 48px 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  .search { display: none; }
  .hero__kpis { gap: 24px; }
  .hero__kpis dd { font-size: 28px; }
  .explore { grid-template-columns: 1fr; }
  .leader__bar { display: none; }
  .match { padding: 16px; }
  .match__teams { grid-template-columns: 1fr; }
  .match__at { display: none; }
  .match__team:last-child { flex-direction: row; text-align: left; }
  .match__team:last-child .chip { margin-left: 0; }
  .match__team:last-child .match__score { margin-left: auto; margin-right: 0; }
  .match__detail { grid-template-columns: 1fr; }
  .vs__row { gap: 8px; }
  .vs__team strong { font-size: 18px; }
  .vs__team .avatar--lg { width: 52px; height: 52px; font-size: 16px; }
  .vs__time, .vs__score { font-size: 32px; }
  .cmp { padding: 14px; }
  .cmp__row { grid-template-columns: 58px 1fr 92px 1fr 58px; gap: 6px; }
  .cmp__label { font-size: 11px; }
  .cmp__val { font-size: 13px; }
  .cmp__val small { display: none; }
  .sim { padding: 16px; }
  .sim__bar { grid-template-columns: 104px 1fr 38px; font-size: 12px; }
  /* En móvil: #, equipo, nivel, Net y récord */
  .ranking .elo-bar,
  .ranking :is(th, td):is(:nth-child(4), :nth-child(5), :nth-child(6), :nth-child(8), :nth-child(9)) { display: none; }
  .moves th:nth-child(4), .moves td:nth-child(4) { display: none; }
  .standings th:nth-child(6), .standings td:nth-child(6),
  .standings th:nth-child(7), .standings td:nth-child(7) { display: none; }
  .footer__copy { margin-left: 0; }
}

/* Bloques plegables (explicaciones largas) */
.fold > summary { cursor: pointer; margin-bottom: 14px; color: var(--accent); font-weight: 600; font-size: 14px; }
.fold[open] > summary { margin-bottom: 16px; }

/* ===== Página del partido: pestañas (al estilo SofaScore) ===== */
.ptabs { position: sticky; top: 69px; z-index: 40; background: rgba(11, 15, 23, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.ptabs__inner { display: flex; gap: 4px; overflow-x: auto; }
.ptab { flex: none; padding: 14px 14px 12px; color: var(--muted); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.ptab:hover { color: var(--text); }
.ptab.is-active { color: var(--text); border-bottom-color: var(--text); }
.ptab--accent.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.panel__stack { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.box { padding: 18px 20px; }
.box__title { margin-bottom: 12px; font-size: 17px; text-align: center; }
.box__title--out { margin: 10px 0 -4px; text-align: left; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; }
.center { text-align: center; }
.center-block { display: block; margin-top: 12px; text-align: center; }
.avatar--xs { width: 24px; height: 24px; font-size: 9px; }
.pavatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--team); color: var(--text); font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.team-cell--h { justify-content: flex-end; }

/* Filas de dos lados: visitante · etiqueta · local */
.srow { display: grid; grid-template-columns: 1fr minmax(120px, 1.3fr) 1fr; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.srow:last-of-type { border-bottom: 0; }
.srow--head { padding-top: 0; font-weight: 700; }
.srow--head .team-cell { display: flex; align-items: center; gap: 8px; }
.srow__label { text-align: center; color: var(--muted); font-size: 13px; }
.srow__val { font-weight: 700; }
.srow__val--h { text-align: right; }
.srow__val.is-better { color: var(--win); }
.forms--h { justify-content: flex-end; }

/* Cara a cara */
.h2h-count { display: flex; align-items: center; justify-content: center; gap: 16px; }
.h2h-count strong { font-family: var(--font-display); font-size: 44px; line-height: 1; }
.h2h-count__sep { width: 1px; height: 40px; background: var(--border); }
.h2h-chips { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 2px; }
.h2h-chip { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; font-variant-numeric: tabular-nums; }

/* Lesiones en dos columnas */
.injcols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.injcol h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.injlist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.injlist li { display: flex; gap: 10px; align-items: flex-start; }
.injlist li strong { margin-right: 6px; font-size: 14px; }
.injlist li.is-minor { opacity: .6; }
.injlist .pavatar { width: 34px; height: 34px; font-size: 13px; }

/* Líderes por categoría */
.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.lcard__title { margin-bottom: 12px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.lcard__top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lead--h { flex-direction: row-reverse; text-align: right; }
.lead__val { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.lcard__more { margin-top: 12px; }
.lcard__more summary { cursor: pointer; text-align: center; color: #8f8cff; font-weight: 600; font-size: 14px; list-style: none; }
.lcard__more summary::after { content: " ⌄"; }
.lcard__more[open] summary::after { content: " ⌃"; }
.lcard__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.lcard__lists ol { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lcard__lists li { display: flex; gap: 6px; align-items: baseline; }
.lcard__lists li b { margin-left: auto; }

/* Clasificación con los dos equipos resaltados */
.ctable { min-width: 0; }
.name-short { display: none; }
.ctable tr.is-mine td { background: rgba(110, 120, 255, .16); }

/* Partidos: selector de equipo / H2H y filas */
.seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 8px; background: var(--bg-alt); border-radius: 999px; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 999px; color: var(--muted); font-weight: 700; }
.seg button.is-active { background: var(--text); color: #111; }
.grow { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.grow:last-child { border-bottom: 0; }
.grow__date { font-size: 12px; line-height: 1.4; }
.grow__po { color: var(--accent-2); font-weight: 600; }
.grow__teams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.grow__teams div { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow__score { display: flex; flex-direction: column; gap: 4px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .ptabs { top: 61px; }
  .ptab { padding: 12px 10px 10px; font-size: 14px; }
  .box { padding: 14px; }
  .srow { grid-template-columns: 1fr 1.2fr 1fr; gap: 6px; font-size: 13px; }
  .srow__label { font-size: 12px; }
  .injcols { grid-template-columns: 1fr; }
  .lead__val { font-size: 22px; }
  .lead .pavatar { width: 34px; height: 34px; font-size: 13px; }
  .ptable th, .ptable td { padding: 8px 5px; font-size: 13px; }
  .name-full { display: none; }
  .name-short { display: inline; }
  .ctable th, .ctable td { padding: 8px 5px; font-size: 13px; }
  .ptable td.left strong { font-size: 13px; }
}

/* Enlaces a jugadores, resultado V/D y puesto entre 30 */
.plink { color: inherit; }
.plink:hover { color: var(--accent); text-decoration: underline; }
a.grow { color: inherit; grid-template-columns: 74px 1fr auto auto; }
a.grow:hover .grow__teams { color: var(--accent); }
.wl { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #111; }
.wl--w { background: var(--win); }
.wl--l { background: var(--loss); }
.rankb { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; border: 2px solid #5a6be8; border-radius: 50%; font-size: 12px; font-weight: 700; color: #8f9cff; }
.rankb--top { border-color: var(--win); color: var(--win); }
.rankb--low { border-color: var(--loss); color: var(--loss); }

/* ===== Página de un jugador ===== */
.phero { margin: 18px 0 6px; }
.phero__row { display: flex; align-items: center; gap: 16px; }
.phero__name { margin: 0 0 4px; }
.pavatar--lg { width: 76px; height: 76px; font-size: 26px; border-width: 3px; }
.team-cell--inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
a.team-cell--inline:hover { color: var(--accent); }
.ptiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.ptile { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.ptile span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ptile strong { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.ptile em { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 600; }
.box__title--left { text-align: left; }
.lrow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.lrow:last-of-type { border-bottom: 0; }
.lrow strong { text-align: right; font-variant-numeric: tabular-nums; }
.gtable { min-width: 420px; }
.gtable--log { min-width: 640px; }
.gtable th, .gtable td { padding: 8px 6px; white-space: nowrap; }
@media (max-width: 600px) {
  .pavatar--lg { width: 60px; height: 60px; font-size: 20px; }
  .ptile strong { font-size: 24px; }
  .gtable th, .gtable td { font-size: 13px; padding: 7px 5px; }
}

/* ===== Página de un equipo ===== */
.nextg { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 0; }
.nextg__team { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; }
.nextg__mid { display: flex; flex-direction: column; align-items: center; text-transform: capitalize; }
.nextg__mid strong { font-family: var(--font-display); font-size: 26px; }
.nextg:hover .nextg__mid strong { color: var(--accent); }
.nextg__odds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.nextg__odds span { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; font-weight: 700; }
.nextg__odds em { font-style: normal; color: var(--muted); font-weight: 500; }
.fchips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fchip { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fchip__score { width: 100%; padding: 4px 2px; border-radius: 6px; text-align: center; font-size: 13px; font-weight: 700; color: #111; white-space: nowrap; }
.fchip__score--w { background: var(--win); }
.fchip__score--l { background: var(--loss); }
.list-label { margin: 14px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.seg--wide { max-width: 420px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rchip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; text-align: center; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.rchip:hover { border-color: var(--accent); }
.rchip strong { font-size: 13px; line-height: 1.2; }
.rchip.is-out { opacity: .6; }
.rchip__av { position: relative; }
.rchip__mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-style: normal; font-size: 13px; font-weight: 900; line-height: 1; color: #fff; }
.rchip__av .rchip__mark { position: absolute; top: -4px; left: -6px; }
.rchip__mark--out { background: var(--loss); }
.rchip__mark--dtd { background: var(--accent-2); }
.blist { list-style: none; display: flex; flex-direction: column; }
.bline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.blist .bline:last-child { border-bottom: 0; }
.bline b { font-family: var(--font-display); font-size: 22px; }
.stat-head, .stat-row { display: grid; grid-template-columns: 1fr 70px 44px; align-items: center; gap: 8px; }
.stat-head { padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.stat-head h3 { color: var(--text); font-size: 17px; }
.stat-head span, .stat-row strong { text-align: right; }
.stat-head span:last-child, .stat-row span:last-child { text-align: center; }
.stat-row { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.stat-row:last-child { border-bottom: 0; }
.stat-row strong { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .fchip__score { font-size: 11px; }
  .rgrid { grid-template-columns: repeat(2, 1fr); }
}

/* Escudos: el logo sobre un círculo claro (así se ven también los logos negros) */
.avatar--logo { display: block; position: relative; overflow: hidden; background: #f3f5f9; font-size: 0 !important; padding: 0; }
.avatar--logo img { position: absolute; inset: 14%; display: block; width: 72%; height: 72%; object-fit: contain; }

/* Escudos y nombres de equipo tocables: llevan a la página del equipo */
[data-team] { cursor: pointer; }
.tname:hover { color: var(--accent); text-decoration: underline; }

/* ===== Props (al estilo de Outlier) ===== */
.chips-scroll { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { flex: none; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 700; font-size: 14px; }
.pchip.is-active { background: var(--text); color: #111; border-color: var(--text); }
.seg--scroll { display: flex; }
.seg--scroll button { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 14px; white-space: nowrap; }
.seg button:disabled { opacity: .35; cursor: default; }
.pline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pline strong { display: block; font-size: 22px; }
.pline__btns { display: flex; gap: 8px; }
.pline__btns button { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 24px; font-weight: 700; line-height: 1; }
.pline__btns button:hover { border-color: var(--accent); color: var(--accent); }
.psum { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 14px; }
.psum > div:first-child { display: flex; flex-direction: column; }
.psum__pct { font-family: var(--font-display); font-size: 46px; line-height: 1; }
.psum__avg { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; }
.psum__avg em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 13px; }
.prates { display: grid; grid-template-columns: repeat(5, 1fr); margin: 14px 0 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prate { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-right: 1px solid var(--border); }
.prate:last-child { border-right: 0; }
.prate span { color: var(--muted); font-size: 12px; }
.prate strong { font-size: 15px; }
.pchart-scroll { overflow-x: auto; margin: 10px 0 6px; }
.pchart { position: relative; display: flex; gap: 6px; min-width: 100%; width: max-content; padding-top: 18px; }
.pchart__line { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(255, 255, 255, .45); pointer-events: none; z-index: 1; }
.pchart__line em { position: absolute; left: 0; top: -10px; padding: 0 4px; background: var(--surface); border-radius: 4px; font-style: normal; font-size: 11px; color: var(--text); }
.pbar { flex: 1 0 30px; display: flex; flex-direction: column; align-items: stretch; padding: 0; background: none; border: 0; color: inherit; }
.pbar__plot { height: var(--plot); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pbar__val { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.pbar__fill { width: 100%; border-radius: 4px 4px 0 0; }
.pbar.is-over .pbar__fill { background: var(--win); }
.pbar.is-over .pbar__val { color: var(--win); }
.pbar.is-under .pbar__fill { background: var(--loss); }
.pbar.is-under .pbar__val { color: var(--loss); }
.pbar.is-neutral .pbar__fill { background: #4a5266; }
.pbar.is-sel .pbar__fill { outline: 2px solid var(--text); outline-offset: 1px; }
.pbar__label { height: var(--label); padding-top: 4px; font-size: 10px; line-height: 1.3; text-align: center; color: var(--muted); white-space: nowrap; }
.pdetail { margin-top: 8px; padding: 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.pdetail__score { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; font-weight: 600; }
.pdetail__score .small { margin-left: auto; }
.pdetail__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.psup__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.psup__head .box__title { margin: 0; }
.seg--mini { display: flex; margin: 0; }
.seg--mini button { padding: 6px 12px; font-size: 13px; }
.psup__tabs { display: flex; gap: 4px; margin: 12px 0 4px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.psup__tabs button { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px 8px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 13px; text-align: left; }
.psup__tabs button strong { font-size: 13px; }
.psup__tabs button.is-active { color: var(--text); border-bottom-color: var(--text); }
@media (max-width: 600px) {
  .psum__pct { font-size: 38px; }
  .prate strong { font-size: 13px; }
}

/* ===== Filas que se deslizan de lado =====
   Barra fina y visible en el ordenador; en el teléfono (donde la barra no se ve) una sombra y una
   flecha en el borde avisan de que hay más. Las flechas las pone utils.js (enhanceScrollers). */
* { scrollbar-width: thin; scrollbar-color: #3a4560 transparent; }
::-webkit-scrollbar { width: 8px; height: 6px; }
::-webkit-scrollbar-thumb { background: #3a4560; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }
.hscroll { position: relative; min-width: 0; }
.ticker > .hscroll { flex: 1; min-width: 0; }
/* El contenido se desvanece en el borde por donde sigue (sirve sobre cualquier fondo) */
.hscroll.more-r > .hs-el { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.hscroll.more-l > .hs-el { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px); mask-image: linear-gradient(to right, transparent, #000 44px); }
.hscroll.more-l.more-r > .hs-el { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.hscroll__btn { position: absolute; top: 50%; z-index: 3; display: none; place-items: center; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: rgba(28, 37, 56, .95); border: 1px solid var(--border); color: var(--accent); font-size: 22px; font-weight: 700; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); cursor: pointer; }
.hscroll__btn--l { left: 2px; }
.hscroll__btn--r { right: 2px; }
.hscroll.more-l > .hscroll__btn--l, .hscroll.more-r > .hscroll__btn--r { display: grid; }

/* Que ningún bloque empuje la página de lado en el teléfono */
.split > * { min-width: 0; }
.section__head { flex-wrap: wrap; gap: 10px 16px; }
.tabs { flex-wrap: wrap; }

/* ===== Ataque contra defensa, quinteto probable (página del partido) ===== */
.mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; }
.mhead .team-cell { display: flex; align-items: center; gap: 8px; }
.mswap { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); font-weight: 700; font-size: 13px; }
.mswap span { color: var(--text); }
.mswap:hover { border-color: var(--accent); }
.mrow { display: grid; grid-template-columns: 52px 42px 1fr 42px 52px; align-items: center; column-gap: 6px; padding: 8px 0 6px; font-variant-numeric: tabular-nums; font-size: 14px; }
.mrow--head { padding: 0 0 4px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.mrow__v { font-weight: 600; }
.mrow__r { color: var(--muted); font-size: 13px; }
.mrow__label { text-align: center; font-weight: 700; font-size: 13px; }
.mrow__r--h, .mrow__v--h { text-align: right; }
.mrow__bar { grid-column: 1 / -1; height: 3px; margin-top: 6px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.mrow__bar span { display: block; height: 100%; background: #2f7fe0; }
.lgrid5 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 6px; }
.lcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lcell--h { flex-direction: row-reverse; text-align: right; }
.lcell strong { font-size: 14px; }
.lcell .pavatar { width: 36px; height: 36px; font-size: 13px; }
.ltag { display: inline-block; margin-left: 4px; font-size: 13px; font-weight: 800; }
.ltag--p { color: var(--accent-2); }
.ltag--q { color: #ff9f43; }
@media (max-width: 600px) {
  .mrow { grid-template-columns: 44px 34px 1fr 34px 44px; font-size: 13px; }
  .mrow__label { font-size: 12px; }
  .mrow__r { font-size: 12px; }
  .mswap { padding: 6px 10px; font-size: 12px; }
  .lcell .pavatar { width: 30px; height: 30px; font-size: 11px; }
  .lcell strong { font-size: 13px; }
}
