/* NetPicks — identidad visual.
   Idea única: la RED. Cada partido es su cancha vista desde arriba y la red reparte el territorio
   según la probabilidad. Todo lo demás es sobrio: tinta marino, blanco tiza frío, azul cancha.
   El amarillo pelota se reserva para Premium. */

:root {
  --court: #1647C0;          /* territorio del favorito, acciones primarias */
  --court-hover: #0F3596;
  --court-text: #1647C0;
  --court-dim: #7A8EC4;      /* territorio del no favorito */
  --ink: #0A1633;
  --bg: #F3F5F7;
  --panel: #FFFFFF;
  --panel-2: #E9EDF2;
  --line: #D9DFE7;
  --muted: #56627A;
  --go: #0FA968;  --go-text: #0A7A4B;
  --risk: #F2A413; --risk-text: #8A5800;
  --red: #E5484D; --red-text: #B8262B;
  --ball: #F1E04B; --ball-ink: #0A1633;
  --hatch-bg: #F3F5F7; --hatch-ln: #0A1633;
  --chalk-line: rgba(255, 255, 255, .78);
  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut: 16px;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --court: #2F62E6; --court-hover: #4A78F0; --court-text: #8FB0FF; --court-dim: #2B3D6B;
    --ink: #E8EDF5; --bg: #0A1633; --panel: #0F1E40; --panel-2: #16295A; --line: #22355F; --muted: #9DABC4;
    --go-text: #3DD598; --risk-text: #F5BC55; --red-text: #FF8589;
    --hatch-bg: #0F1E40; --hatch-ln: #E8EDF5; --chalk-line: rgba(255, 255, 255, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --court: #2F62E6; --court-hover: #4A78F0; --court-text: #8FB0FF; --court-dim: #2B3D6B;
  --ink: #E8EDF5; --bg: #0A1633; --panel: #0F1E40; --panel-2: #16295A; --line: #22355F; --muted: #9DABC4;
  --go-text: #3DD598; --risk-text: #F5BC55; --red-text: #FF8589;
  --hatch-bg: #0F1E40; --hatch-ln: #E8EDF5; --chalk-line: rgba(255, 255, 255, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.lock { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--court-text); text-underline-offset: 2px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 800; line-height: 1.02; letter-spacing: .005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--court); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }
.ic { width: 20px; height: 20px; flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--court-text); text-decoration: underline; font-weight: 600; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font-weight: 650; text-decoration: none; line-height: 1.1; }
.btn:hover { border-color: var(--ink); }
.btn .ic { width: 18px; height: 18px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14.5px; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--court); border-color: var(--court); color: #fff; }
.btn-court { background: var(--court); border-color: var(--court); color: #fff; }
.btn-court:hover { background: var(--court-hover); border-color: var(--court-hover); }
.btn-prem-solid { background: var(--ball); border-color: var(--ball); color: var(--ball-ink); }
.btn-prem-solid:hover { border-color: var(--ball-ink); }
.btn.is-on { border-color: var(--go); color: var(--go-text); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--panel-2); }

/* ---------- cabecera ---------- */
.hd { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
/* Celular en horizontal con notch: el contenido no queda debajo de la cámara. */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.hd-in { max-width: 1240px; margin: 0 auto; padding: 8px var(--gut); display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.mark { width: 34px; height: 34px; }
.mk-court { fill: var(--court-dim); }
.mk-fav { fill: var(--court); }
.mk-line { stroke: var(--chalk-line); stroke-width: 1.5; }
.mk-net { fill: var(--ink); }
.wm { font-family: var(--f-display); font-weight: 900; font-size: 27px; letter-spacing: .01em; }
.mainnav { display: flex; gap: 2px; }
.mainnav a { position: relative; padding: 8px 11px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.mainnav a:hover { color: var(--ink); background: var(--panel-2); }
.mainnav a[aria-current] { color: var(--ink); }
.mainnav a[aria-current]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -13px; height: 3px; background: var(--court); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 5px; padding: 0 5px; border-radius: 9px; background: var(--court); color: #fff; font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.badge:empty { display: none; }
.hd-act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip-set { display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 6px 0 4px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 13px; font-weight: 700; color: var(--muted); }
.chip-set span { padding: 2px 6px; border-right: 1px solid var(--line); }
.chip-set span:nth-child(3) { border-right: 0; }
.chip-set .ic { width: 18px; height: 18px; margin-left: 2px; }
.chip-set:hover { border-color: var(--ink); color: var(--ink); }
.btn-prem { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1.5px solid var(--ball); color: var(--ink); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.btn-prem .ic { width: 17px; height: 17px; }
.btn-prem.on, .btn-prem:hover { background: var(--ball); color: var(--ball-ink); }

/* ---------- estructura ---------- */
main { display: block; max-width: 1240px; margin: 0 auto; padding: 20px var(--gut) 40px; outline: none; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.col-main { min-width: 0; }
.rail { position: sticky; top: 80px; display: grid; gap: 18px; }

/* ---------- Hoy ---------- */
.today-hd { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.day-title { font-size: clamp(34px, 5vw, 50px); font-weight: 800; }
.day-sum { margin-top: 4px; color: var(--muted); font-size: 15px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 2px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; position: relative; padding: 10px 12px 12px; border: 0; background: none; color: var(--muted); font-weight: 650; font-size: 15.5px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--court); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.sub, .chip { padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 14px; font-weight: 600; color: var(--muted); }
.sub:hover, .chip:hover { color: var(--ink); border-color: var(--ink); }
.sub.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.days { display: flex; gap: 6px; margin: 14px 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: baseline; min-width: 84px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel); text-align: left; }
.day .dl { grid-column: 1 / 3; font-size: 13px; font-weight: 600; color: var(--muted); }
.day .dn { font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; }
.day .dc { font-size: 12.5px; color: var(--muted); }
.day:hover { border-color: var(--ink); }
.day.on { border-color: var(--court); box-shadow: inset 0 0 0 1px var(--court); }
.day.on .dl { color: var(--court-text); }
.day.extra { border-style: dashed; }
.note { margin: 10px 0; font-size: 14.5px; color: var(--muted); }
.note-warn { padding: 10px 12px; border-left: 3px solid var(--risk); background: var(--panel); color: var(--ink); }
.note-ok { padding: 10px 12px; border-left: 3px solid var(--go); background: var(--panel); color: var(--ink); }
.loading-line { margin: 12px 2px; color: var(--muted); font-size: 14px; }

/* destacado */
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: center; margin: 4px 0 26px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.feat h2 { font-size: 19px; font-weight: 700; color: var(--muted); font-family: var(--f-body); letter-spacing: 0; }
.feat-pick .big { display: block; margin-top: 6px; font-family: var(--f-display); font-weight: 900; font-size: clamp(36px, 4.6vw, 54px); line-height: .98; }
.feat-meta { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.feat-num { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 16px; }
.feat-num .n { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.fair { font-size: 14px; color: var(--muted); }
.fair b { color: var(--ink); }
.feat-court { position: relative; display: block; padding: 0; border: 0; background: none; border-radius: 6px; }
.fc-names { display: flex; justify-content: space-between; margin-bottom: 6px; font-weight: 700; font-size: 14.5px; }

/* grupos y filas del marcador */
.grp { margin-bottom: 22px; }
.grp-h { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; font-size: 22px; font-weight: 800; }
.grp-h small { font-family: var(--f-body); font-size: 13.5px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grp-n { margin-left: auto; font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--muted); }
.rows { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 132px 158px; align-items: center; gap: 14px; width: 100%; padding: 9px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--panel-2); }
.row:focus-visible { outline-offset: -3px; }
.row.done { color: var(--muted); }
.row.done .meter { opacity: .4; }
.row.done .pp-none { font-size: 15px; font-family: var(--f-body); font-weight: 600; }
.r-time { display: grid; gap: 1px; font-size: 14px; font-weight: 600; }
.r-time small { font-size: 11.5px; font-weight: 500; color: var(--muted); line-height: 1.2; }
.stt-live { display: inline-flex; align-items: center; gap: 5px; color: var(--red-text); font-size: 13px; }
.stt-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; }
.stt-final { color: var(--muted); }
.stt-post { color: var(--risk-text); font-size: 13px; }
.r-teams { display: grid; gap: 3px; min-width: 0; }
.r-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; }
.r-team .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-team .rec { flex: none; color: var(--muted); font-size: 12.5px; }
.r-team .sc { margin-left: auto; font-family: var(--f-display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.r-team.is-fav .nm { color: var(--court-text); }
.r-team.is-win .sc { color: var(--ink); }
.row.done .r-team:not(.is-win) .sc { color: var(--muted); font-weight: 600; }
.lg { flex: none; object-fit: contain; }
.lg-flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.lg-empty { display: inline-grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-size: 9px; font-weight: 700; color: var(--muted); }
.r-meter { display: block; }
.r-pick { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline; column-gap: 8px; row-gap: 2px; text-align: right; }
.r-pick .pk-ab { display: none; }
.aff-btn .aff-i { display: none; }
.aff-btn .aff-i .ic { width: 16px; height: 16px; }
.r-pick b { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 104px; }
.pp { font-family: var(--f-display); font-weight: 800; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.pp-none { color: var(--muted); }
.r-pick .cf, .r-pick .lim, .r-pick .mk { grid-column: 1 / 3; justify-self: end; }
.r-pick .mk { display: none; }
.cf { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; }
.cf i { width: 8px; height: 8px; border-radius: 2px; }
.cf-high { color: var(--go-text); } .cf-high i { background: var(--go); }
.cf-med { color: var(--risk-text); } .cf-med i { background: var(--risk); }
.cf-low { color: var(--muted); } .cf-low i { background: var(--court-dim); }
.cf-none { color: var(--muted); font-size: 12px; }
.lim { font-size: 11.5px; color: var(--muted); }

/* esqueleto */
.sk-row { display: grid; pointer-events: none; }
.sk-row span { height: 14px; border-radius: 4px; background: var(--panel-2); }
.sk-row span:nth-child(2) { height: 34px; }
.empty { padding: 28px 20px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

/* ---------- LA RED ---------- */
.meter { display: block; width: 100%; overflow: hidden; }
.meter-thin { height: 24px; aspect-ratio: 5 / 1; border-radius: 3px; }
.meter-big { aspect-ratio: 2 / 1; height: auto; border-radius: 6px; }
.tr-fav { fill: var(--court); }
.tr-dim { fill: var(--court-dim); }
.tr-draw { fill: url(#np-hatch); }
.meter.nodata .tr-fav, .meter.nodata .tr-dim { fill: var(--panel-2); }
.meter .ln { fill: none; stroke: var(--chalk-line); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.meter-thin .ln { stroke-width: 1; }
.meter .ez { fill: rgba(255, 255, 255, .1); }
.meter .base { fill: var(--chalk-line); }
.meter .net { fill: url(#np-mesh); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.meter-thin .net { fill: #fff; stroke: var(--ink); }
.meter .post { fill: var(--ink); }
.meter .mt { font-family: var(--f-display); font-weight: 900; font-size: 46px; fill: #fff; }
.meter .mt-d { font-size: 26px; fill: var(--ink); paint-order: stroke; stroke: var(--hatch-bg); stroke-width: 5px; }
.meter.sp-mma { overflow: hidden; }
.mv { transform: translateX(var(--x)); }
.intro .mv { animation: net-in 950ms cubic-bezier(.22, .9, .24, 1) both; animation-delay: calc(min(var(--i), 22) * 30ms + 100ms); }
@keyframes net-in { from { transform: translateX(var(--from)); } }
.hatch-bg { fill: var(--hatch-bg); }
.hatch-ln { stroke: var(--hatch-ln); stroke-width: 1.3; opacity: .45; }
.mesh-bg { fill: #fff; }
.mesh-ln { stroke: #0A1633; stroke-width: .8; opacity: .7; }

/* ---------- columna lateral ---------- */
.rail-box { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rail-box h2 { font-size: 21px; margin-bottom: 10px; }
.mini { list-style: none; display: grid; gap: 2px; }
.mini li button { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; }
.mini li button:hover { background: var(--panel-2); }
.mini-pick { font-weight: 650; }
.mini-pick b { font-family: var(--f-display); font-size: 19px; font-weight: 800; margin-left: 4px; }
.mini-m { grid-column: 1; font-size: 13px; color: var(--muted); }
.mini .cf { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.aff ul { list-style: none; display: grid; gap: 6px; margin-bottom: 10px; }
.aff a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 650; text-decoration: none; }
.aff a:hover { border-color: var(--court); color: var(--court-text); }
.aff a .ic { width: 16px; height: 16px; color: var(--muted); }
.aff .small + .small { margin-top: 6px; }
.aff-c { margin-top: 18px; }

/* ---------- formulario del predictor ---------- */
.ask { display: flex; gap: 8px; align-items: center; }
.ask input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 16px; }
.ask input:focus { border-color: var(--court); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--court) 25%, transparent); }
.ask .btn { min-height: 46px; }
.ask-c { flex-wrap: wrap; }
.ask-c input { flex-basis: 100%; }
.ask-c .btn { flex: 1; }
.mic { width: 46px; height: 46px; border: 1.5px solid var(--line); }
.mic.on { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- panel de detalle ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(6, 12, 30, .45); }
.sheet { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.sheet.opening { animation: sheet-in 220ms ease-out; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: .4; } }
.sheet-body { overflow-y: auto; padding: 14px 22px 40px; overscroll-behavior: contain; }
.d-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-league { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.d-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 14px; font-size: 25px; line-height: 1.05; }
.d-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d-right { justify-content: flex-end; text-align: right; }
.d-sep { font-size: 18px; color: var(--muted); font-weight: 700; }
.d-sc { font-size: 34px; }
.d-status { margin: -6px 0 10px; }
.d-court { margin: 4px 0 14px; }
.verdict { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.v-pick { font-family: var(--f-display); font-weight: 900; font-size: 42px; line-height: 1; }
.v-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.v-p { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.d-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.d-sec h3 { font-size: 22px; margin-bottom: 10px; }
.why { list-style: none; display: grid; gap: 12px; }
.why li { display: grid; grid-template-columns: 1fr 96px; gap: 4px 12px; align-items: center; }
.why li p { grid-column: 1 / 3; }
.why-note p { color: var(--muted); font-size: 14.5px; }
.wbar { display: block; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.wbar i { display: block; height: 100%; background: var(--court); border-radius: 3px; }
.wv { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tbl tbody th { font-weight: 650; }
.tbl tr.pk th { color: var(--court-text); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .ev.pos { color: var(--go-text); font-weight: 700; }
.tbl .ic { width: 15px; height: 15px; color: var(--muted); vertical-align: -2px; }
.books { margin: 10px 0 6px; }
.books summary { cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--court-text); }
.tbl-books { margin-top: 8px; font-size: 13.5px; }
.d-sec .small { margin-top: 8px; }
.ln-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ln-box { padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 14.5px; display: grid; gap: 4px; }
.ln-box h4 { font-family: var(--f-body); font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.moves { list-style: none; display: grid; gap: 4px; }
.fm { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.fm-n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-l { list-style: none; display: flex; gap: 5px; }
.fr { display: grid; justify-items: center; width: 44px; padding: 3px 0; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); line-height: 1.1; }
.fr b { font-family: var(--f-display); font-size: 17px; }
.fr small { font-size: 11px; color: var(--muted); }
.fr-W b { color: var(--go-text); } .fr-W { border-color: color-mix(in srgb, var(--go) 45%, var(--line)); }
.fr-L b { color: var(--red-text); }
.fr-D b { color: var(--risk-text); }
.risk { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--risk); background: var(--panel); font-size: 14px; }
.lockbox { margin-top: 18px; padding: 18px; border: 1.5px solid var(--ball); border-radius: var(--radius); background: var(--panel); display: grid; gap: 8px; justify-items: start; }
.lockbox > .ic { color: var(--ink); }

/* ---------- páginas ---------- */
.page { max-width: 820px; }
.page h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 8px; }
.page > .lead, .doc .lead { color: var(--muted); font-size: 17px; max-width: 640px; margin-bottom: 18px; }
.page-ask .ask { max-width: 640px; }
.ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 15px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--court); }
/* Asistente: conversación */
.page-chat { max-width: 760px; }
.chat-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chat { list-style: none; display: grid; gap: 14px; padding: 0; margin: 0 0 16px; }
.msg { display: flex; gap: 10px; align-items: flex-start; min-width: 0; scroll-margin-top: 80px; }
.msg-body { min-width: 0; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; }
.msg-body p { font-size: 16px; line-height: 1.5; }
.msg-bot .msg-body { flex: 1; background: var(--panel); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { max-width: 85%; background: var(--court); color: #fff; border-top-right-radius: 4px; }
.msg-who { flex: none; width: 30px; height: 30px; display: grid; place-items: center; margin-top: 2px; }
.msg-who svg { width: 26px; height: 26px; }
.msg .ex { margin: 0; }
.parlay { display: grid; gap: 10px; padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; }
.parlay-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.parlay-sum > b { font-family: var(--f-display); font-size: 28px; font-weight: 900; color: var(--ink); }
.parlay-sum span b { color: var(--ink); }
.parlay .btn { justify-self: start; }
.chat-input { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 0 12px; background: var(--bg); border-top: 1px solid var(--line); }
.chat-input > * { min-width: 0; }
.ex-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ex-row::-webkit-scrollbar { display: none; }
.ex-row .chip { flex: none; }
.chat-input .ex { margin: 0; }
.chat-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-bottom: 8px; }
.page-chat .ask input { min-width: 0; }
@media (max-width: 820px) { .chat-input { bottom: calc(62px + env(safe-area-inset-bottom)); } body:has(input:focus) .chat-input { bottom: 0; } }
.ans { margin-top: 18px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 14px; }
.ans-txt { font-size: 19px; line-height: 1.4; }
.ans-live { margin-top: 16px; color: var(--red-text); font-weight: 600; }
.ans-live span { color: var(--ink); font-weight: 400; }
.ans-game { display: grid; gap: 10px; justify-items: start; }
.ans-game .d-court { width: 100%; max-width: 520px; margin: 0; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tr-blk { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tr-blk h2 { font-size: 22px; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag-prem { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ball); color: var(--ball-ink); font-family: var(--f-body); font-size: 12px; font-weight: 700; }
.tag-prem .ic { width: 13px; height: 13px; }
.tr-list { list-style: none; display: grid; gap: 2px; }
.tr-list button { display: grid; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; text-align: left; }
.tr-list button:hover { background: var(--panel-2); }
.tl-main { font-weight: 600; }
.tl-sub { font-size: 13px; color: var(--muted); }
.page-f1 { max-width: 920px; }
.f1-next { padding: 18px; margin-bottom: 18px; background: var(--ink); color: var(--bg); border-radius: var(--radius); }
.f1-next h2 { font-size: clamp(32px, 5vw, 46px); margin: 4px 0 6px; }
.f1-next .muted { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.f1-round { font-size: 14px; font-weight: 600; opacity: .8; }
.f1-when { font-weight: 600; }
.f1-probs h2, .f1-std h2 { font-size: 24px; margin: 18px 0 6px; }
.f1-code { display: inline-block; min-width: 38px; font-family: var(--f-display); font-weight: 800; color: var(--court-text); }
.f1-tbl .bar { display: inline-block; width: 70px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--panel-2); overflow: hidden; vertical-align: 1px; }
.f1-tbl .bar i { display: block; height: 100%; background: var(--court); }
.f1-last, .f1-team-m { display: none; }
.f1-probs { margin-bottom: 14px; }
.f1-probs > p.small { margin-top: 8px; }
.f1-std { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.std { list-style: decimal-leading-zero inside; display: grid; gap: 2px; }
.std li { display: flex; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.std li::marker { color: var(--muted); }
.std b { margin-left: auto; }
.slip-rec { font-weight: 650; margin-bottom: 10px; }
.slip { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 14px; }
.sl { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.sl:first-child { border-top: 0; }
.sl-main { display: grid; }
.sl-main small { color: var(--muted); font-size: 13px; }
.sl-st { font-weight: 700; font-size: 13.5px; }
.sl-won .sl-st { color: var(--go-text); }
.sl-lost .sl-st { color: var(--red-text); }
.sl-pending .sl-st, .sl-push .sl-st { color: var(--muted); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 18px; }
.plan { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 12px; align-content: start; }
.plan-prem { border: 2px solid var(--ball); }
.plan h2 { font-size: 26px; }
.price { font-family: var(--f-display); font-weight: 900; font-size: 40px; line-height: 1; }
.price small { font-family: var(--f-body); font-size: 14px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; display: grid; gap: 8px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .ic { color: var(--go-text); width: 18px; height: 18px; margin-top: 3px; }
.prem-on { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.pay-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-btns .btn { min-height: 46px; }
.plan-prem .pay-btns .btn { flex: 1 1 100%; justify-content: center; }
.save { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--ball); color: var(--ball-ink); font-size: 12.5px; }
.pay-alt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 18px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.pay-alt h2 { font-size: 22px; }
.pay-form { max-width: 460px; min-width: 0; }
.pay-form .btn { flex: none; }
.spei { font-size: 15px; overflow-wrap: anywhere; }
.pay-legal { margin-top: 14px; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.demo { display: grid; gap: 6px; justify-items: start; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.doc { max-width: 720px; }
.doc h2 { font-size: 26px; margin: 26px 0 8px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.6; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; }
.doc p + p { margin-top: 10px; }

/* ---------- modales ---------- */
#modal .scrim { z-index: 60; }
.modal-card { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 14px; }
.modal-card h2 { font-size: 30px; }
.modal-card .mark { width: 44px; height: 44px; }
.set-form { display: grid; gap: 14px; }
.set-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.set-form legend { font-size: 13.5px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.seg input:checked + span { border-color: var(--court); color: var(--court-text); box-shadow: inset 0 0 0 1px var(--court); }
.seg input:focus-visible + span { outline: 3px solid var(--court); outline-offset: 2px; }
.age-act { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- pie y barra inferior ---------- */
.ft { border-top: 1px solid var(--line); margin-top: 20px; }
.ft-in { max-width: 1240px; margin: 0 auto; padding: 22px var(--gut) 30px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.ft-age b { display: inline-grid; place-items: center; min-width: 34px; height: 24px; margin-right: 6px; padding: 0 6px; border: 1.5px solid var(--ink); border-radius: 6px; color: var(--ink); font-size: 13px; }
.ft-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ft-links a { color: var(--ink); }
.ft-src { font-size: 12.5px; }
.tabbar { display: none; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: 1fr 1fr; }
  .rail .rail-box:first-child { display: none; }
  .mainnav a[href="#/how"] { display: none; }
}
@media (max-width: 820px) {
  .mainnav { display: none; }
  .tabbar { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; border-radius: 8px; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--court-text); }
  body { padding-bottom: 70px; }
  #toast { bottom: 84px; }
  .feat { grid-template-columns: 1fr; gap: 14px; }
  .feat-court { order: -1; }
  .tr-grid, .plans, .f1-std, .ln-grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .sheet { top: auto; left: 0; width: 100vw; height: 92vh; height: 92dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; }
  .sheet.opening { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
  .sheet-body { padding: 10px 16px calc(30px + env(safe-area-inset-bottom)); }
  .sheet-body::before { content: ""; display: block; width: 44px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: var(--line); }
}
@media (max-width: 640px) {
  .hd-in { gap: 10px; min-height: 54px; }
  .wm { font-size: 24px; }
  .chip-set span:nth-child(3) { display: none; }
  .chip-set span:nth-child(2) { border-right: 0; }
  .btn-prem span { display: none; }
  .btn-prem { padding: 0 10px; }
  main { padding-top: 14px; }
  .row { grid-template-columns: 58px minmax(0, 1fr) 92px; grid-template-areas: "time teams pick" "time meter pick"; gap: 6px 10px; padding: 9px 12px; }
  .r-time { grid-area: time; align-self: start; padding-top: 2px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
  .stt-live { display: block; font-size: 12px; line-height: 1.25; }
  .stt-live i { display: inline-block; margin-right: 4px; vertical-align: 1px; }
  .r-teams { grid-area: teams; }
  .r-meter { grid-area: meter; }
  .r-meter .meter-thin { height: 14px; aspect-ratio: auto; }
  .r-pick { grid-area: pick; align-self: center; }
  .r-pick b { max-width: 74px; font-size: 13.5px; }
  .row { grid-template-columns: 54px minmax(0, 1fr) 84px; }
  .r-pick .pk-full { display: none; }
  .r-pick .pk-ab { display: inline; }
  .aff-btn { padding: 0 10px; }
  .f1-tbl .f1-team, .f1-full { display: none; }
  .f1-last { display: inline; }
  .f1-team-m { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
  .f1-tbl th, .f1-tbl td { padding-left: 6px; padding-right: 6px; }
  .f1-tbl .bar { width: 38px; margin-right: 6px; }
  .aff-btn .aff-t { display: none; }
  .aff-btn .aff-i { display: inline-flex; }
  .r-team { gap: 6px; }
  .r-team .rec { font-size: 11.5px; }
  /* partidos terminados: sin pick a la derecha, los nombres usan todo el ancho */
  .row.done .r-teams, .row.done .r-meter { grid-column: 2 / 4; }
  .row.done .r-pick { display: none; }
  .pp { font-size: 21px; }
  .r-team { font-size: 14.5px; }
  .d-title { font-size: 20px; }
  .d-title .lg { width: 30px; height: 30px; }
  .d-sc { font-size: 28px; }
  .v-pick { font-size: 36px; }
  .why li { grid-template-columns: 1fr 84px; }
  .fm { grid-template-columns: 1fr; gap: 4px; }
  .fr { width: 40px; }
  .feat { padding: 14px; }
  .today-hd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .hd, .tabbar, .rail, #drawer, #modal { display: none; }
}

/* novedades del partido */
.news .nw { margin: 8px 0; }
.news .nw h4 { font-size: 14px; margin-bottom: 4px; }
.news ul { list-style: none; display: grid; gap: 6px; font-size: 14.5px; }
.inj-st { font-weight: 700; }

/* Pantallas táctiles: todo objetivo de toque mide al menos 44 × 44 px (WCAG 2.5.5 / guías de iOS y Android). */
@media (pointer: coarse) {
  .btn, .btn-sm, .chip, .icon-btn, .chip-set, .btn-prem, .brand { min-height: 44px; }
  .icon-btn, .btn-prem { min-width: 44px; }
  .chip-set, .btn-prem { height: 44px; }
  .tab { min-width: 44px; min-height: 44px; }
  .link { display: inline-block; min-height: 44px; padding: 11px 4px; }
  .ft-links { gap: 0 16px; }
  .ft-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .check, label:has(> input[type=checkbox]) { min-height: 44px; }
  /* Con el teclado abierto la barra inferior fija no tapa el campo de texto. */
  body:has(input:focus, textarea:focus) .tabbar { display: none; }
}
