/* Colores de chapatuwork.com. Más/menos de la línea: azul y rojo (par validado para
   daltonismo; el verde y rojo de chapatuwork no se distinguen con deuteranopía). */
/* Dos estilos: normal (claro) y nocturno (azul marino). Sin elección guardada sigue al sistema.
   Más/menos de la línea: azul y rojo (par validado para daltonismo). */
:root {
  color-scheme: light;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f1f2f6;
  --text: #1b1f2a;
  --muted: #6b7285;
  --line: #e4e6ec;
  --accent: #d9480f;
  --accent-text: #ffffff;
  --accent-soft: #fff0e6;
  --ok: #2b8a3e;
  --ok-soft: #ebfbee;
  --err: #c92a2a;
  --err-soft: #fff0f0;
  --over: #1c7ed6;
  --under: #c92a2a;
  --push: #a6a6a6;
  --thr: #1b1f2a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  --hero-a: #0e2240;
  --hero-b: #1d428a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220; --surface: #0f1a2e; --surface-2: #13203a; --text: #e6ecf5; --muted: #8ea2c4; --line: #1d2a44;
    --accent: #ff7a33; --accent-text: #1a0d05; --accent-soft: #2a1d17; --ok: #69db7c; --ok-soft: #13291c; --err: #ff8787; --err-soft: #2e1720;
    --over: #2f8cf0; --under: #ef4444; --push: #5c6b85; --thr: #e6ecf5; --shadow: none; --hero-a: #13213b; --hero-b: #0f1a2e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --surface: #0f1a2e; --surface-2: #13203a; --text: #e6ecf5; --muted: #8ea2c4; --line: #1d2a44;
  --accent: #ff7a33; --accent-text: #1a0d05; --accent-soft: #2a1d17; --ok: #69db7c; --ok-soft: #13291c; --err: #ff8787; --err-soft: #2e1720;
  --over: #2f8cf0; --under: #ef4444; --push: #5c6b85; --thr: #e6ecf5; --shadow: none; --hero-a: #13213b; --hero-b: #0f1a2e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Encabezado */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo svg { flex: none; }
.logo b { color: var(--accent); font-weight: 800; }
.search { position: relative; flex: 1 1 240px; max-width: 420px; margin-left: auto; }
.search input { width: 100%; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); overflow: hidden; display: none; z-index: 40; }
.results.open { display: block; }
.results a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; text-decoration: none; color: var(--text); }
.results a:hover, .results a.sel { background: var(--surface-2); }
.results small { color: var(--muted); white-space: nowrap; }
.results .none { padding: 10px 12px; color: var(--muted); }

/* Controles */
.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 2px; gap: 2px; }
.segmented button, .segmented a, .segmented span { border: 0; background: transparent; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; font-size: 15px; }
.segmented .active { background: var(--accent); color: var(--accent-text); }
.segmented .off { opacity: 0.45; cursor: default; }
.segmented small { font-weight: 400; font-size: 12px; opacity: 0.9; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.chip-btn:hover { border-color: var(--muted); }
.chip-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip-btn small { font-size: 12px; opacity: 0.8; margin-left: 3px; }
.toggle { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 15px; }
.toggle.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.line-ctl { display: inline-flex; align-items: center; gap: 6px; }
.line-ctl .lbl { color: var(--muted); font-size: 14px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; width: 36px; height: 36px; cursor: pointer; font-size: 19px; line-height: 1; }
.line-val { min-width: 48px; text-align: center; font-size: 18px; font-weight: 800; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.note { color: var(--muted); font-size: 13px; margin: 0; }

/* Distribución: lista del día a la izquierda, partido a la derecha */
main { max-width: 1240px; margin: 0 auto; padding: 16px; }
.layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.list { position: sticky; top: 116px; max-height: calc(100dvh - 132px); overflow-y: auto; display: grid; gap: 8px; }
.detail { display: grid; gap: 12px; min-width: 0; }
.back { display: none; text-decoration: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 16px; }
.games { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.game:first-child { border-top: 0; }
.game:hover { background: var(--surface-2); }
.game.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.game .time { color: var(--muted); font-size: 13px; line-height: 1.3; white-space: nowrap; min-width: 52px; }
.game .time.live { color: var(--err); font-weight: 700; }
.game .teams { display: grid; min-width: 0; }
.game .teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .teams small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.game .score { display: grid; text-align: right; font-weight: 700; }
.empty { color: var(--muted); padding: 16px; text-align: center; }

/* Cabecera del partido */
.match-head { display: grid; gap: 6px; }
.match-head h2 { overflow-wrap: anywhere; }
.match-head .meta { color: var(--muted); font-size: 14px; }
.forms { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.form-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-left: 3px; }
.form-chip.G { background: var(--ok-soft); color: var(--ok); }
.form-chip.P { background: var(--err-soft); color: var(--err); }
.banner { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 0; }
.filters { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.team-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }

/* Tarjetas de gráfico */
.chart-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.chart-card { display: grid; gap: 8px; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.chart-card h3 .note { font-weight: 400; font-size: 14px; }
.headline { font-size: 15px; margin: 0; }
.headline b.o { color: var(--over); }
.headline b.u { color: var(--under); }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; background: var(--surface); }

/* Barras: una por partido, con su valor en la punta */
.bars { display: grid; gap: 6px; container-type: inline-size; grid-template-columns: minmax(0, 1fr); }
.bars .plot { height: 200px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.bars.diverging .plot { padding-bottom: 18px; border-bottom: 0; }
.bars .area { position: relative; height: 100%; }
.bars .cols { position: absolute; inset: 0; display: flex; gap: 2px; z-index: 2; }
.bars .col { flex: 1 1 0; min-width: 0; height: 100%; position: relative; border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.bars .col .bar { position: absolute; left: 50%; transform: translateX(-50%); width: min(28px, 100%); border-radius: 4px 4px 0 0; background: var(--push); min-height: 2px; }
.bars .col.down .bar { border-radius: 0 0 4px 4px; }
.bars .col.over .bar { background: var(--over); }
.bars .col.under .bar { background: var(--under); }
.bars .col .val { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text); background: var(--surface); border-radius: 3px; padding: 0 2px; white-space: nowrap; }
.bars .col:hover .bar, .bars .col.sel .bar, .bars .col:focus-visible .bar { outline: 2px solid var(--text); outline-offset: 1px; }
.bars .col:focus-visible { outline: none; }
.bars .area > .thr, .bars .area > .avg, .bars .area > .zero { position: absolute; left: 0; right: 0; height: 0; pointer-events: none; z-index: 1; }
.bars .area > .thr { border-top: 2px dashed var(--thr); }
.bars .area > .avg { border-top: 1px solid var(--muted); }
.bars .area > .zero { border-top: 1px solid var(--line); }
.bars .xlabels { display: flex; gap: 2px; }
.bars .xlabels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.bars .xlabels.dense span { font-size: 10px; }
@container (max-width: 460px) {
  .bars .xlabels.many span:nth-child(even) { visibility: hidden; }
  .bars.many .col .val { font-size: 9px; }
}
.bars-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.bars-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bars-legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--push); }
.bars-legend .sw.over { background: var(--over); }
.bars-legend .sw.under { background: var(--under); }
.bars-legend .key { width: 16px; height: 0; }
.bars-legend .key.k-line { border-top: 2px dashed var(--thr); }
.bars-legend .key.k-avg { border-top: 1px solid var(--muted); }
.bars-caption { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.4em; }

/* Tablas */
details.games-table summary { cursor: pointer; font-size: 14px; color: var(--accent); font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
th:first-child, td:first-child, .l { text-align: left; }
td.o { color: var(--over); font-weight: 700; }
td.u { color: var(--under); font-weight: 700; }
td a { color: var(--text); font-weight: 600; text-decoration: none; }
td a:hover { color: var(--accent); }

/* Navegación principal y barra de tendencias */
.mainnav { display: flex; gap: 2px; }
.mainnav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.soon-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.trending { border-top: 1px solid var(--line); background: var(--surface-2); }
.trending-in { max-width: 1240px; margin: 0 auto; padding: 7px 16px; display: flex; gap: 6px 14px; align-items: center; overflow-x: auto; scrollbar-width: none; font-size: 14px; white-space: nowrap; }
.trending-in::-webkit-scrollbar { display: none; }
.trending-in b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.trending-in a { color: var(--text); text-decoration: none; padding-left: 14px; border-left: 1px solid var(--line); }
.trending-in b + a { border-left: 0; padding-left: 0; }
.trending-in a:hover { color: var(--accent); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); border-radius: var(--radius); padding: 10px 18px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.small { padding: 6px 12px; font-size: 14px; }

/* Inicio */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.home-main, .home-side { display: grid; gap: 14px; min-width: 0; }
.home-side { position: sticky; top: 112px; }
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; background-image: linear-gradient(120deg, var(--accent-soft), transparent 60%); }
.hero h1 { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.02em; max-width: 22ch; }
.hero p { margin: 0; color: var(--muted); max-width: 60ch; }
.sport-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sport-tabs::-webkit-scrollbar { display: none; }
.sport-tab { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 700; text-decoration: none; color: var(--text); }
.sport-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sport-tab.off { color: var(--muted); cursor: default; }
.sport-tab small { font-weight: 400; font-size: 11px; margin-left: 5px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-head h2 { font-size: 20px; }
.sec-head a { font-weight: 600; text-decoration: none; font-size: 14px; }
.gcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; background: var(--bg); }
.gc-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.gc-meta .live { color: var(--err); font-weight: 700; }
.gc-team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.tbadge { display: inline-grid; place-items: center; min-width: 46px; height: 32px; padding: 0 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 13px; }
.gc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-name small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 5px; }
.gc-form .form-chip { width: 16px; height: 16px; font-size: 10px; margin-left: 2px; }
.gc-num { text-align: right; line-height: 1.1; }
.gc-num small { display: block; font-size: 10px; color: var(--muted); }
.gcard .btn { justify-self: start; }
.streaks { display: grid; gap: 8px; margin-top: 10px; }
.streak { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--bg); }
.st-num { text-align: center; background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 6px 0; line-height: 1.1; }
.st-num b { display: block; font-size: 22px; }
.st-num small { font-size: 11px; }
.st-body { min-width: 0; }
.st-name { font-weight: 700; color: var(--text); text-decoration: none; margin-right: 6px; }
.st-name:hover { color: var(--accent); }
.st-body p { margin: 2px 0 0; font-size: 14px; }
.more-btn { margin-top: 10px; }
.tools { display: grid; gap: 4px; }
.tools h3 { margin-bottom: 6px; }
.tool { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.tool:hover { background: var(--surface-2); }
.tool small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.ticon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--accent-text); }
.facts { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.narrow { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }

/* Calendario */
.datebar { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 3px; }
.datebar .nav, .cal-head .nav { display: inline-grid; place-items: center; width: 38px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font-size: 20px; text-decoration: none; cursor: pointer; flex: none; }
.datebar .nav:hover, .cal-head .nav:hover:not(:disabled) { background: var(--surface-2); }
.datebar .nav.off, .cal-head .nav:disabled { color: var(--muted); opacity: 0.4; cursor: default; }
.cal-open { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 8px 10px; background: var(--accent); color: var(--accent-text); font-weight: 700; cursor: pointer; }
.cal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .dow { font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal-grid .day { display: grid; place-items: center; height: 36px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.cal-grid a.day:hover { background: var(--surface-2); }
.cal-grid .day.today { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); font-weight: 700; }
.cal-grid .day.sel { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cal-grid .day.off { color: var(--muted); opacity: 0.35; }
.cal .note { margin-top: 8px; }
.today-link { font-size: 14px; font-weight: 600; text-decoration: none; justify-self: start; }

@media (max-width: 999px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; }
}
@media (max-width: 560px) {
  .mainnav a { padding: 6px 7px; }
  .mainnav a[data-nav="inicio"] { display: none; }
  .mainnav { margin-left: auto; }
  .logo { font-size: 17px; }
  .logo svg { width: 26px; height: 26px; }
  .streak { grid-template-columns: 52px minmax(0, 1fr); }
  .streak .btn { grid-column: 1 / -1; justify-self: start; }
  .hero { padding: 16px; }
  .gc-team { grid-template-columns: auto minmax(0, 1fr) auto; }
  .gc-form { display: none; }
}

/* Fútbol: ligas, empates y filas del inicio */
.form-chip.E { background: var(--surface-2); color: var(--muted); }
.sport-switch { display: flex; }
.sport-switch > * { flex: 1; text-align: center; }
.league-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface-2); }
.league-head small { color: var(--muted); font-weight: 400; }
.search-sport { padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.sgroups { display: grid; gap: 10px; }
.sgroup { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.srow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--bg); }
.srow:hover { background: var(--surface-2); }
.srow-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.srow-time .live { color: var(--err); font-weight: 700; }
.srow-teams, .srow-score { display: grid; }
.srow-teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-score { font-weight: 700; text-align: right; }
.srow-go { color: var(--muted); }

.srow.more-row { display: block; text-align: center; color: var(--accent); font-weight: 600; font-size: 14px; }
.sport-tab small { display: block; margin-left: 0; font-size: 11px; font-weight: 400; color: var(--muted); }
.sport-tab { text-align: center; line-height: 1.25; }

/* Rotación: titulares y suplentes por posición */
.rot-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
/* Tabla de profundidad (NBA): muchas columnas, un equipo debajo del otro a todo el ancho. */
.rot-grid:has(.rot-head) { grid-template-columns: minmax(0, 1fr); }
.rot { padding: 12px; background: var(--bg); box-shadow: none; }
.rot h3 { margin-bottom: 8px; }
.rot-table { display: grid; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.rot-row { display: grid; grid-template-columns: 74px max-content; gap: 8px; align-items: center; }
.rot-row + .rot-row { border-top: 1px solid var(--line); padding-top: 6px; }
.rot-head + .rot-row { border-top: 0; padding-top: 0; }
.rot-pos { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; position: sticky; left: 0; z-index: 1; background: var(--bg); align-self: stretch; display: flex; align-items: center; }
.rot-cells { display: flex; gap: 6px; align-items: stretch; }
.rot-col { flex: 0 0 112px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.rot-cell { flex: 0 0 112px; display: grid; gap: 2px; align-content: center; text-align: left; min-height: 40px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; }
.rot-cell:hover { border-color: var(--muted); }
.rot-cell.tit { border-left: 3px solid var(--accent); font-weight: 600; }
.rot-cell.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.rot-cell.fuera .rot-name { text-decoration: line-through; text-decoration-thickness: 1px; opacity: 0.7; }
.rot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rot-st { display: inline-block; justify-self: start; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 6px; line-height: 16px; }
.rot-st.fuera { background: var(--err-soft); color: var(--err); }
.rot-st.duda { background: #fff6d6; color: #6b5300; }
.rot-cell.active .rot-st { background: var(--accent-text); }
.rot-sep { flex: 0 0 1px; background: var(--line); margin: 2px 2px; }
.rot-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); align-items: center; }
.rot-legend span { display: inline-flex; gap: 6px; align-items: center; }
.rot-key { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); }
.rot-key.tit { border-left: 3px solid var(--accent); }
.sel-player { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rot-st.duda { background: #3a3214; color: #f2dc8a; } }
:root[data-theme="dark"] .rot-st.duda { background: #3a3214; color: #f2dc8a; }
@media (max-width: 560px) { .rot-row { grid-template-columns: 56px max-content; } .rot-cell, .rot-col { flex-basis: 100px; } }
.foot { max-width: 1240px; margin: 0 auto; padding: 8px 16px 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 899px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .list { position: static; max-height: none; }
  .layout.open .list { display: none; }
  .layout:not(.open) .detail { display: none; }
  .back { display: inline-block; justify-self: start; }
}
@media (max-width: 560px) {
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .panel { padding: 12px; }
  .segmented button, .segmented a, .segmented span { padding: 6px 9px; font-size: 14px; }
  /* En el celular cada grupo de chips va en una fila que se desliza de lado */
  .chips, .row > .segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .chips::-webkit-scrollbar, .row > .segmented::-webkit-scrollbar { display: none; }
  .chips { margin-right: -12px; padding-right: 12px; }
  .chip-btn { flex: none; }
  .row > .segmented > * { flex: none; }
}

/* Resumen de los dos equipos: cifras grandes, tabla por grupos y puesto en la liga */
.resumen { display: grid; gap: 12px; }
.resumen > * { min-width: 0; }
.res-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.res-tile { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.res-tlabel { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.res-tval { display: flex; align-items: center; gap: 8px; }
.res-tval small { min-width: 34px; font-size: 12px; font-weight: 600; color: var(--muted); }
.res-tval b { font-size: 20px; font-variant-numeric: tabular-nums; }
.res-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.res-table th, .res-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.res-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.res-table .l { text-align: left; white-space: normal; }
.res-table .res-group th { text-align: left; padding-top: 14px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--line); }
.res-v { display: inline-block; min-width: 48px; }
.rk { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: 6px; padding: 0 4px; border-radius: 13px; border: 2px solid var(--push); font-size: 12px; font-weight: 700; color: var(--text); vertical-align: middle; }
.rk-good { border-color: var(--over); color: var(--over); }
.rk-bad { border-color: var(--under); color: var(--under); }
.rk-mid, .rk-neutral { border-color: var(--push); color: var(--muted); }
.res-l10 { margin-top: 0; }

.res-table .t-short { display: none; }
@media (max-width: 560px) {
  .res-table .t-full { display: none; }
  .res-table .t-short { display: inline; }
  .res-table th, .res-table td { padding: 6px 4px; font-size: 13px; }
  .res-v { min-width: 0; }
  .rk { min-width: 22px; height: 22px; margin-left: 4px; font-size: 11px; }
  .res-tile { padding: 8px 10px; }
  .res-tval b { font-size: 17px; }
}

/* Filas de filtros: etiqueta a la izquierda (Partidos, Periodo, Contar, Estadística) */
.frow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; }
.frow > .line-ctl { grid-column: 1 / -1; }
.flbl { padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.per-rows { display: grid; gap: 6px; justify-items: start; }
.chart-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .frow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .flbl { padding-top: 0; }
}

/* Bloques que se abren y cierran (Resumen, Últimos 10, Rotación completa) */
details.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h3 { margin: 0; }
details.fold[open] > summary { margin-bottom: 12px; }
.fold-hint::after { content: '▾ Abrir'; color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; }
details.fold[open] .fold-hint::after { content: '▴ Cerrar'; }

/* Jugadores: lista fija a la izquierda y gráfico a la derecha */
.sec-title { margin: 6px 0 0; font-size: 18px; }
.pl-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; align-items: start; }
.pl-side { position: sticky; top: calc(var(--top, 64px) + 12px); max-height: calc(100dvh - var(--top, 64px) - 24px); overflow-y: auto; display: grid; gap: 6px; padding: 12px; }
.pl-side .segmented, .sheet-head .segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.pl-list { display: grid; }
.pl-pos { margin: 8px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pl { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pl:hover { background: var(--surface-2); }
.pl.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.pl .nm { flex: 1; min-width: 0; display: flex; align-items: center; }
.pl .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl.tit .nm::before { content: ''; flex: 0 0 3px; height: 16px; margin-right: 8px; border-radius: 2px; background: var(--accent); }
.pl.on.tit .nm::before { background: var(--accent-text); }
.pl.out .txt { text-decoration: line-through; opacity: .7; }
.pl small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pl.on small { color: inherit; }
.pl-key { margin: 6px 0 0; font-size: 11px; }
.pl-main { display: grid; gap: 12px; min-width: 0; }
.pl-bar { display: none; }
.stat-groups { display: grid; gap: 6px; }
.grp { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.rows2 { display: grid; gap: 6px; justify-items: start; }
@media (max-width: 900px) {
  .pl-layout { grid-template-columns: minmax(0, 1fr); }
  .pl-side { display: none; }
  .pl-bar { display: flex; position: sticky; top: calc(var(--top, 64px) + 6px); z-index: 20; gap: 8px; align-items: center; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
}
.pl-arr { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 20px; cursor: pointer; }
.pl-arr.off { opacity: .3; cursor: default; }
.pl-who { flex: 1; min-width: 0; display: grid; text-align: left; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.pl-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-who small { font-size: 12px; color: var(--muted); }
.sheet-shade { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 78dvh; overflow-y: auto; display: grid; gap: 8px; align-content: start; padding: 10px 14px 20px; border-radius: 18px 18px 0 0; background: var(--surface); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; }
.sheet-head { display: flex; gap: 8px; align-items: center; }
.sheet-head .segmented { flex: 1; }
.sheet-q { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.sheet .pl { font-size: 15px; padding: 9px 10px; }

/* Tiros: barra de intentados con el tramo de anotados */
.bars.shots .col .bar.att { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--under); }
.bars.shots .col .bar.att .made { display: block; width: 100%; background: var(--over); }
.bars.shots .col .val small { margin-left: 3px; font-size: 10px; font-weight: 500; color: var(--muted); }

/* Lista del día: ligas desplegables y pines */
.game-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); }
.game-row .game { border-top: 0; }
.pin { width: 32px; height: 32px; margin-right: 6px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pin:hover { background: var(--surface-2); color: var(--text); }
.pin.on { color: var(--accent); }
.games.lg .league-head { padding: 0; align-items: center; }
.lg-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 4px 9px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.lg-toggle .lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-toggle small { margin-left: auto; color: var(--muted); font-weight: 400; white-space: nowrap; }
.lg-toggle .chev { width: 12px; color: var(--muted); }
.league-head.pinned { align-items: center; gap: 8px; color: var(--accent); background: var(--accent-soft); }
.league-head.pinned small { margin-left: auto; }
.g-league { display: block; margin: 0 !important; font-size: 11px; color: var(--muted); }
.pl-team { margin: 10px 0 0; font-size: 13px; font-weight: 700; }

/* ---- Nuevo diseño: aspecto, pasos y cabecera del partido con pestañas ---- */
.modo { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.modo button { border: 0; background: transparent; padding: 5px 10px; cursor: pointer; font-size: 15px; line-height: 1.2; opacity: 0.55; }
.modo button.on { background: var(--accent); opacity: 1; }
.pro { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: linear-gradient(90deg, #ff7a33, #ffb347); color: #1a0d05; font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em; vertical-align: 2px; }
.steps { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none; }
a.step:hover { border-color: var(--muted); }
.step i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 800; }
.mhero { border-radius: 14px; padding: 14px 18px 0; background: linear-gradient(120deg, var(--hero-a), var(--hero-b)); color: #fff; display: grid; gap: 8px; border: 1px solid var(--line); }
.mhero .eyebrow { color: rgba(255, 255, 255, 0.75); }
.mhero .back { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.35); }
.mhero .banner { background: rgba(255, 255, 255, 0.12); color: #fff; }
.mh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.mh-row .tm { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mh-row .tm.r { flex-direction: row-reverse; text-align: right; }
.mh-row .tm b { display: block; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.mh-row .tm small { font-size: 12px; opacity: 0.85; }
.mh-row .esc { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #fff; color: var(--hero-a); }
:root[data-theme="dark"] .mh-row .esc { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mh-row .esc { background: transparent; border: 2px solid var(--accent); color: var(--accent); } }
.mh-row .ctr { text-align: center; display: grid; }
.mh-row .ctr b { font-size: 24px; white-space: nowrap; }
.mh-row .ctr small { font-size: 12px; opacity: 0.85; }
.mh-row .ctr small.live { color: #ffb3b3; font-weight: 700; opacity: 1; }
.mhero .form-chip.G { background: rgba(105, 219, 124, 0.25); color: #c3fad0; }
.mhero .form-chip.P { background: rgba(255, 135, 135, 0.25); color: #ffd1d1; }
.mhero .form-chip.E { background: rgba(255, 255, 255, 0.18); color: #fff; }
.mtabs { display: flex; gap: 2px; margin-top: 4px; overflow-x: auto; scrollbar-width: none; }
.mtabs button { border: 0; background: transparent; color: #fff; opacity: 0.75; padding: 10px 16px; font-weight: 700; font-size: 14px; border-radius: 10px 10px 0 0; cursor: pointer; white-space: nowrap; }
.mtabs button:hover { opacity: 1; }
.mtabs button.on { opacity: 1; background: var(--bg); color: var(--text); }
@media (max-width: 640px) {
  .mhero { padding: 12px 12px 0; }
  .mh-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
  .mh-row .tm, .mh-row .tm.r { flex-direction: column; text-align: center; gap: 4px; }
  .mh-row .tm b { font-size: 14px; }
  .mh-row .esc { width: 40px; height: 40px; font-size: 12px; }
  .mh-row .ctr b { font-size: 19px; }
  .mtabs { gap: 0; }
  .mtabs button { padding: 9px 7px; font-size: 12.5px; flex: 1 1 auto; }
  .mtabs .pro { padding: 1px 5px; font-size: 9.5px; }
  .steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 12px; gap: 5px; }
  .step { white-space: nowrap; padding: 4px 9px 4px 5px; }
  .mhero .back { display: none; }
  .modo button { padding: 4px 8px; }
}

/* ---- Página de la liga ---- */
.lg-res { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--accent); }
.lg-res:hover { background: var(--accent-soft); }
a.eyebrow { text-decoration: none; }
a.eyebrow:hover { text-decoration: underline; }
.lh-row { display: flex; align-items: center; gap: 14px; }
.lh-row .esc { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: #fff; color: var(--hero-a); }
.lh-row b { display: block; font-size: 22px; line-height: 1.2; }
.lh-row small { font-size: 13px; opacity: 0.85; }
.ltool { display: grid; gap: 6px; }
.ltool .tg { display: grid; gap: 4px; }
.sg { font-size: 12px; font-weight: 700; color: var(--muted); }
.lsub { font-size: 17px; margin: 4px 0 0; }
.lsub .note { font-weight: 500; }
.ltiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: var(--shadow); cursor: pointer; align-content: start; }
.tile:hover { border-color: var(--muted); }
.tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tile.off { cursor: default; opacity: 0.6; }
.tl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; min-height: 26px; }
.tl .lc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tl .lc b { color: var(--text); min-width: 30px; text-align: center; }
.tl .icon-btn { width: 24px; height: 24px; font-size: 14px; border-radius: 7px; }
.big { font-size: 27px; font-weight: 800; line-height: 1.1; }
.big small { font-size: 13px; color: var(--muted); font-weight: 600; }
.big.yes { color: var(--over); } .big.no { color: var(--under); }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--over); }
.llay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.lgms { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
table.lmat { border-collapse: separate; border-spacing: 3px; font-size: 12px; width: 100%; }
table.lmat th { color: var(--muted); font-weight: 700; font-size: 11px; padding: 4px; }
table.lmat th.cur { color: var(--accent); }
table.lmat td { text-align: center; padding: 7px 4px; border-radius: 6px; font-weight: 700; min-width: 38px; }
table.lmat td.n { text-align: left; white-space: nowrap; padding-left: 4px; }
table.lmat td.na { color: var(--muted); font-weight: 400; }
.lbars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 10px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.lbars .l50 { position: absolute; left: 0; right: 0; bottom: calc(50% - 9px); border-top: 2px dashed var(--thr); opacity: 0.5; }
.lbars { overflow: hidden; }
.lb { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.lb i { width: 60%; max-width: 34px; border-radius: 4px 4px 0 0; }
.lb i.o { background: var(--over); } .lb i.u { background: var(--under); }
.lb span { font-size: 11px; font-weight: 700; }
.lb small { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); }
.lb.cur small { color: var(--accent); font-weight: 700; }
.lbars + * { margin-top: 26px; }
.lbars { margin-bottom: 24px; }
.lg-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.lg-arr { margin-left: auto; display: flex; gap: 4px; }
.lg-arr .icon-btn { width: 30px; height: 30px; font-size: 16px; }
.lg-arr .icon-btn:disabled { opacity: 0.35; cursor: default; }
.lgms { display: grid; gap: 6px; margin-bottom: 8px; }
.lgm { display: grid; gap: 4px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.lgm b { font-weight: 600; } .lgm small { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.lgm .bd { display: flex; gap: 4px; flex-wrap: wrap; }
.lgm .bd span { font-size: 11px; padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.bo { background: color-mix(in srgb, var(--over) 16%, transparent); color: var(--over); }
.bu { background: color-mix(in srgb, var(--under) 14%, transparent); color: var(--under); }
@media (max-width: 1100px) { .ltiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .llay { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .lb:nth-last-child(n+9) { display: none; } .lb span { font-size: 10px; } .ltiles { gap: 8px; } .tile { padding: 10px; } .big { font-size: 22px; } .big small { display: block; font-size: 12px; } .tl { grid-template-columns: minmax(0, 1fr); } .lh-row b { font-size: 18px; } }

/* ---- Multipanel ---- */
.mp-tool { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; }
.mp-tool .tg { display: grid; gap: 4px; }
.mp-rows { position: relative; padding: 0; overflow: hidden; }
.mp-row { display: grid; grid-template-columns: 300px minmax(0, 1fr) 120px; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); position: relative; }
.mp-row > * { position: relative; z-index: 1; }
.mp-hdr { background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 14px; }
.mp-hdr > span:last-child { text-align: right; }
.mp-x { display: flex; gap: 4px; }
.mp-x span { flex: 1 1 0; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
.mp-who { display: grid; gap: 6px; min-width: 0; }
.mp-who > * { min-width: 0; }
.mp-who > b { display: flex; align-items: center; gap: 6px; font-size: 14px; padding-right: 22px; }
.mp-who > b i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.mp-who small { color: var(--muted); font-size: 12px; }
.mp-del { position: absolute; top: -2px; right: 0; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.mp-del:hover { color: var(--err); }
.mp-ctl { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-sel { font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text); max-width: 100%; }
.mini-sel.who { max-width: 170px; }
.chip-btn.mini { padding: 2px 9px; font-size: 12px; }
.mp-who .chips { gap: 4px; }
.mp-line { display: flex; align-items: center; gap: 6px; }
.mp-line .line-slider { width: 100px; }
.mp-line .icon-btn { width: 26px; height: 26px; font-size: 15px; border-radius: 7px; }
.mp-line b { min-width: 40px; text-align: center; font-size: 14px; }
.mp-chart { position: relative; display: flex; gap: 4px; align-items: flex-end; height: 92px; padding-top: 14px; }
.mp-chart.other { height: auto; min-height: 92px; flex-wrap: wrap; }
.mp-chart .mp-thr { position: absolute; left: 0; right: 0; bottom: var(--thr-y); border-top: 2px dashed var(--thr); opacity: 0.55; z-index: 2; pointer-events: none; }
.mp-chart .mc { flex: 1 1 0; min-width: 0; height: 78px; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.mp-chart .mc i { width: 62%; max-width: 30px; border-radius: 3px 3px 0 0; }
.mp-chart .mc i.o { background: var(--over); }
.mp-chart .mc i.u { background: var(--under); }
.mp-chart .mc i.p { background: var(--push); }
.mp-chart .mc span { position: absolute; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.mp-chart .mc.na small { color: var(--muted); font-size: 11px; }
.mp-own { flex-basis: 100%; margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.mp-st { text-align: right; font-size: 12px; }
.mp-st b { font-size: 18px; }
.po { color: var(--over); }
.pu { color: var(--under); }
.rates { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.hr { display: inline-grid; place-items: center; min-width: 38px; padding: 2px 5px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.hhi { background: color-mix(in srgb, var(--over) 20%, transparent); color: var(--over); }
.hmid { background: rgba(255, 209, 102, 0.2); color: #b07d00; }
.hlo { background: color-mix(in srgb, var(--under) 18%, transparent); color: var(--under); }
.mp-all { background: var(--accent-soft); }
.mp-allx { display: flex; gap: 4px; }
.mp-allx span { flex: 1 1 0; min-width: 0; text-align: center; font-weight: 800; font-size: 13px; padding: 6px 0; border-radius: 6px; }
.mp-allx .y { background: color-mix(in srgb, var(--over) 22%, transparent); color: var(--over); }
.mp-allx .n { background: color-mix(in srgb, var(--under) 16%, transparent); color: var(--under); }
.mp-allx .na { color: var(--muted); }
.mp-add { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 14px; }
.mp-add .mini-sel { font-size: 13px; padding: 6px 10px; border-style: dashed; }
.mp-vline { position: absolute; top: 40px; bottom: 56px; width: 0; border-left: 1px solid color-mix(in srgb, var(--text) 30%, transparent); z-index: 0; pointer-events: none; }
.mp-x span.hl { color: var(--accent); }
.mp-rel { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
@media (max-width: 900px) {
  .mp-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mp-hdr > span:first-child, .mp-hdr > span:last-child { display: none; }
  .mp-st { text-align: left; display: flex; gap: 10px; align-items: center; }
  .mp-st .rates { margin: 0; }
  .mp-vline { display: none; }
}

/* ---- Inicio (nuevo diseño) ---- */
.home2 { display: grid; gap: 12px; }
.step.dim { color: var(--muted); }
.step.dim i { background: var(--surface-2); color: var(--muted); }
.sport-seg { justify-self: start; }
.sport-seg a { font-size: 15px; padding: 7px 16px; }
.home-grid { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-day { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.home-day a { font-size: 13px; font-weight: 600; text-decoration: none; }
.home-main { display: grid; gap: 18px; min-width: 0; }
.h-sec { font-size: 18px; margin: 0 0 10px; }
.fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fcard { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.fcard:hover { border-color: var(--accent); }
.fc-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.fc-meta .live { color: var(--err); }
.fc-team { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; }
.fc-team span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-team small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 5px; }
.fc-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.fc-pills .pill { font-size: 12px; }
.callout { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 14px; }
.lg-res-i { display: inline-grid; vertical-align: -4px; color: var(--accent); }
.home-list { position: sticky; top: calc(var(--top, 60px) + 12px); }
.ltool-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; }
.season-sel { font: inherit; font-size: 15px; font-weight: 600; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-list { position: static; max-height: none; }
}

/* ---- Barra lateral compacta, buscador de liga o país y filtros abreviados ---- */
.layout { grid-template-columns: 310px minmax(0, 1fr); }
.list .game-row .pin { width: 28px; }
.lg-find { display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
.lg-find:focus-within { border-color: var(--accent); }
.lg-find input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font-size: 14px; outline: none; }
.list .game { gap: 8px; padding: 6px 10px; }
.list .game .time { font-size: 11.5px; min-width: 44px; }
.list .game .teams { font-size: 13px; line-height: 1.35; }
.list .game .teams span { white-space: normal; overflow: visible; }
.list .game .teams small { font-size: 11px; }
.list .game .score { font-size: 13.5px; line-height: 1.35; }
.list .lg-toggle { font-size: 12.5px; padding: 7px 4px 7px 10px; }
.per-rows { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-col { display: grid; gap: 6px; }
.sgrp { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 5px 6px; }
.sgrp > small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sgrp > .segmented { grid-column: 2; justify-self: start; }
.sgrp .chips { gap: 5px; }
.sgrp .segmented button { font-size: 12.5px; padding: 3px 9px; }
.chart-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); }
@media (max-width: 899px) { .layout { grid-template-columns: minmax(0, 1fr); } .sgrp { grid-template-columns: minmax(0, 1fr); } .sgrp > .segmented { grid-column: 1; } }

/* ---- Más ancho en pantallas grandes, lista plegable y letras más chicas ---- */
main, .topbar-in, .trending-in, .foot { max-width: 1640px; }
.layout { grid-template-columns: 330px minmax(0, 1fr); transition: grid-template-columns .15s; }
.side-top { display: flex; gap: 6px; align-items: stretch; }
.side-top .sport-switch { flex: 1; min-width: 0; }
.side-btn { flex: none; width: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); cursor: pointer; box-shadow: var(--shadow); }
.side-btn:hover { color: var(--accent); border-color: var(--accent); }
@media (min-width: 900px) {
  .layout.side-min { grid-template-columns: 40px minmax(0, 1fr); }
  .layout.side-min .list { overflow: visible; }
  .layout.side-min .list > :not(.side-top) { display: none; }
  .layout.side-min .side-top .sport-switch { display: none; }
  .layout.side-min .side-btn { width: 40px; height: 40px; }
}
/* letras: que no pasen el ancho de su columna */
.segmented button, .segmented a, .segmented span { font-size: 13.5px; padding: 5px 10px; }
.chip-btn { font-size: 13px; padding: 4px 11px; }
.toggle { font-size: 13.5px; padding: 5px 10px; }
.frow { align-items: center; }
.flbl { padding-top: 0; font-size: 12.5px; }
.list .game .teams { font-size: 12.5px; }
.list .game .teams small { font-size: 10.5px; }
.list .game .score { font-size: 13px; }
.list .lg-toggle { font-size: 12px; }
.list .sport-switch a { font-size: 13px; padding: 6px 8px; }
.datebar .cal-open { font-size: 15px; }
@media (max-width: 899px) { .layout { grid-template-columns: minmax(0, 1fr); } .side-btn { display: none; } }

/* ---- Inicio: presentación de la página ---- */
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.howto > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.howto i { flex: none; font-style: normal; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 13px; }
.howto b { display: block; font-size: 14.5px; }
.howto small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.sport-tab { font-size: 15px; }
.tools .tool b .pro { margin-left: 4px; }
@media (max-width: 899px) { .howto { grid-template-columns: minmax(0, 1fr); } }

/* ---- Equipos: filtros en dos columnas (Partidos, Periodo, Contar | Estadística, Línea) ---- */
.fcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 28px; align-items: start; }
.fcol { display: grid; gap: 10px; align-content: start; min-width: 0; }
@media (max-width: 1100px) { .fcols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- cuentas (ui-cuenta.js) ---------- */
.cuenta { flex: none; display: flex; align-items: center; }
.cu-btn { border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.cu-btn:hover { background: var(--accent); color: var(--accent-text); }
.cu-yo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.cu-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 15px; }
body.cu-lock { overflow: hidden; }
.cu-fondo { position: fixed; inset: 0; z-index: 100; background: rgba(5, 10, 20, 0.6); display: grid; place-items: center; padding: 16px; }
.cu-caja { position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.cu-caja h3 { margin: 0 0 14px; font-size: 19px; }
.cu-x { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.cu-tabs { display: flex; margin-bottom: 14px; }
.cu-tabs button { flex: 1; }
.cu-form { display: grid; gap: 12px; }
.cu-form h4 { margin: 4px 0 0; }
.cu-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.cu-form label small { font-weight: 400; color: var(--muted); }
.cu-form input:not([type=checkbox]), .cu-form select, .cu-buscar input { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.cu-form .cu-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.cu-check input { margin-top: 3px; }
.cu-prim { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: var(--accent-text); font-weight: 700; cursor: pointer; font-size: 15px; justify-self: start; }
.cu-caja .cu-prim { justify-self: stretch; }
.cu-prim:disabled { opacity: 0.6; cursor: wait; }
.cu-sec { border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
.cu-nota { margin: 0; font-size: 13px; color: var(--muted); }
.cu-err { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--err-soft); color: var(--err); font-size: 14px; }
.cu-err.ok { background: var(--ok-soft); color: var(--ok); }
.cu-page { max-width: 640px; margin: 0 auto 16px; padding: 20px; }
.cu-page h2 { margin: 0 0 14px; }
.cu-page h3 { margin: 22px 0 8px; font-size: 16px; }
.cu-texto p { line-height: 1.55; }
.cu-dato { display: flex; gap: 12px; margin: 6px 0; }
.cu-dato span { color: var(--muted); min-width: 70px; }
.cu-pie { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.cu-fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.cu-fila label { flex: 1 1 140px; }
.cu-buscar { display: flex; gap: 8px; margin: 10px 0 12px; }
.cu-tabla { width: 100%; }
.cu-tabla tbody tr { cursor: pointer; }
.cu-tabla tbody tr:hover, .cu-tabla tr.on { background: var(--accent-soft); }
.cu-tabla td small { display: block; color: var(--muted); }
.cu-det .cu-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cu-reg { padding-left: 18px; font-size: 14px; line-height: 1.6; }
.cu-reg small { color: var(--muted); }
.cu-tabla th, .cu-tabla td { text-align: left; }
.cu-det h3:first-child { margin-top: 0; }
.cu-det > h4 { margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  /* En el celular: arriba logo, secciones y tema; abajo la búsqueda con el botón de cuenta al lado */
  .topbar-in .search { flex: 1 1 200px; }
  .cuenta { order: 4; }
}
@media (max-width: 760px) {
  .cu-btn { padding: 5px 11px; font-size: 13px; }
  .cu-av { width: 28px; height: 28px; font-size: 13px; }
}

/* ---------- candados PRO (ui-cuenta.js) ---------- */
.pro-bloq { opacity: 0.55; }
.pro-bloq:hover { opacity: 0.8; }
.pro-lk { margin-left: 5px; vertical-align: -1px; color: #ff9d4d; flex: none; }
.pro-tocado { opacity: 1; outline: 2px solid #ffb347; outline-offset: 1px; }
.pro-aviso { position: absolute; z-index: 90; width: min(340px, calc(100vw - 16px)); background: var(--surface); color: var(--text); border: 1px solid #ffb34766; border-radius: 14px; padding: 16px 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); font-size: 14px; line-height: 1.45; }
.pro-aviso::before { content: ''; position: absolute; top: -7px; left: var(--ax, 30px); width: 12px; height: 12px; background: var(--surface); border-left: 1px solid #ffb34766; border-top: 1px solid #ffb34766; transform: rotate(45deg); }
.pro-aviso h4 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pro-aviso h4 .pro-lk { margin: 0; }
.pro-aviso p { margin: 0 0 14px; color: var(--muted); }
.pro-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pro-acts .cu-prim, .pro-acts .cu-sec { text-decoration: none; padding: 8px 16px; font-size: 14px; }
.pro-x { position: absolute; right: 8px; top: 6px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; padding: 2px 8px; }
.cu-lista { padding-left: 20px; line-height: 1.6; }
.pro-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.res-lock { display: inline-flex; align-items: center; gap: 4px; color: #ff9d4d; font-size: 11px; font-weight: 800; text-decoration: none; opacity: 0.85; }
.cu-google { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; font-size: 15px; }
.cu-google:hover { border-color: var(--muted); }
.cu-caja > .cu-nota { margin-top: 8px; }
.cu-o { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.cu-o::before, .cu-o::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cu-link { border: 0; background: transparent; color: var(--accent); padding: 0; cursor: pointer; font-size: 14px; justify-self: start; text-decoration: underline; }

/* ---------- página de planes (ui-cuenta.js) ---------- */
.pz { max-width: 980px; margin: 0 auto 24px; width: 100%; }
.pz-head { text-align: center; margin: 8px 0 22px; }
.pz-head h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.02em; }
.pz-head p { color: var(--muted); margin: 0; font-size: 16px; }
.pz-mon { display: inline-flex; margin-top: 16px; }
.pz-activo { max-width: 640px; margin: 0 auto 18px; text-align: center; }
.pz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; margin-top: 14px; }
.pz-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.pz-card.dest { border: 2px solid var(--accent); box-shadow: 0 10px 40px rgba(255, 122, 51, 0.15); }
.pz-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #ff7a33, #ffb347); color: #1a0d05; font-weight: 800; font-size: 12px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pz-name { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; }
.pz-price { display: flex; align-items: baseline; gap: 6px; }
.pz-price b { font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.pz-price span { color: var(--muted); font-size: 15px; }
.pz-alt { color: var(--muted); font-size: 14px; margin-top: -6px; }
.pz-alt b { color: var(--text); }
.pz-save { color: var(--ok); font-weight: 700; }
.pz-strike { text-decoration: line-through; }
.pz-btn { display: block; text-align: center; border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: 15px; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: transparent; cursor: pointer; font-family: inherit; }
.pz-btn:hover { border-color: var(--muted); }
.pz-btn.prim { background: linear-gradient(90deg, #ff7a33, #ffb347); color: #1a0d05; border: 0; }
.pz-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14.5px; }
.pz-list li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.35; }
.pz-list svg { color: var(--ok); flex: none; margin-top: 1px; }
.pz-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 22px; }
.pz-step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 14px; line-height: 1.45; }
.pz-step b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); margin-bottom: 8px; }
.pz-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
@media (max-width: 560px) { .pz-head h2 { font-size: 24px; } .pz-price b { font-size: 38px; } }

/* Equipos: título, datos de arriba y gráfico alineados entre las tarjetas de una misma fila
   (Enfrentamientos tiene una fila más de datos y su gráfico quedaba más abajo). */
.cc-top { display: grid; gap: 8px; align-content: start; }
@supports (grid-template-rows: subgrid) {
  .chart-grid.alin > .chart-card { grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; }
}
.pz-pagos { margin-top: 26px; text-align: center; }
.pz-pagos h3 { margin: 0 0 12px; font-size: 16px; }
.pz-medios { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pz-medio { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.pz-medio b { font-size: 16px; }
.pz-medio span { color: var(--muted); font-size: 13px; }
