/* ============================================================
   Quiniela Liga MX · Apertura 2026 — estilo premium dark
   ============================================================ */
/* Acento: VERDE mexicano. --pino es el verde profundo de marca (el mismo
   theme_color del manifest y del icono) y --grass el verde vivo que se lee
   encima del dark. Todo el color del sitio sale de estas variables: si hay que
   mover la paleta se mueve aquí, no partido por partido. */
:root {
  --bg: #0a0f0d;   /* verde-negro; = background_color del manifest */
  --bg-2: #101a15;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --text: #eaf2ec;
  --muted: #9db0a6;
  --faint: #6d8177;
  --pino: #0b3d2e; /* = theme_color del manifest */
  --grass: #10b981;
  --grass-2: #0a7d57;
  --gold: #ffc83d;
  --magenta: #ff2d78;
  --sky: #38bdf8;
  --danger: #ff5d6c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(16, 185, 129, 0.13), transparent 60%),
    radial-gradient(1000px 700px at -10% 10%, rgba(255, 45, 120, 0.08), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(11, 61, 46, 0.55), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(16, 185, 129, 0.35); }

/* ---------- boot ---------- */
.boot { display: grid; place-items: center; min-height: 100dvh; gap: 14px; color: var(--muted); }
.boot-ball { font-size: 54px; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.shell { max-width: 1080px; margin: 0 auto; padding: 0 16px 120px; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 15, 13, 0.92), rgba(10, 15, 13, 0.7));
  border-bottom: 1px solid var(--stroke);
}
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .t1 { font-size: 16px; line-height: 1; }
.brand .t2 { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.topbar-spacer { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--stroke); font-size: 13px; font-weight: 600; color: var(--text);
}
.pill b { color: var(--gold); }

.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--stroke); background: var(--panel); color: var(--text); font-size: 18px;
  transition: 0.15s;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--stroke-2); }
.badge-dot {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg);
}

/* ---------- nav ---------- */
.nav { display: flex; gap: 6px; margin: 18px 0 8px; padding: 5px; background: var(--panel); border: 1px solid var(--stroke); border-radius: 14px; overflow-x: auto; }
.nav button {
  flex: 1; min-width: max-content; border: 0; background: transparent; color: var(--muted);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap; transition: 0.15s;
}
.nav button.active { background: linear-gradient(135deg, var(--grass), var(--grass-2)); color: #04150d; box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25); }
.nav button:not(.active):hover { color: var(--text); background: var(--panel-2); }

/* ---------- cards & sections ---------- */
.card { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 18px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 800; margin: 22px 4px 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--stroke-2);
  background: var(--panel-2); color: var(--text); padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; transition: 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--grass), var(--grass-2)); color: #04150d; border: 0; box-shadow: 0 10px 26px rgba(16, 185, 129, 0.3); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #f0a800); color: #2a1c00; border: 0; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- inputs ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--stroke-2);
  background: rgba(0, 0, 0, 0.25); color: var(--text); font-size: 15px; font-family: inherit; outline: none; transition: 0.15s;
}
.input:focus { border-color: var(--grass); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 0.9fr; }
.auth-hero {
  padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background:
    radial-gradient(700px 500px at 20% 10%, rgba(16, 185, 129, 0.18), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(255, 45, 120, 0.14), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(11, 61, 46, 0.5), transparent 65%);
  border-right: 1px solid var(--stroke);
}
.auth-hero h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; margin: 0; letter-spacing: -0.03em; }
.auth-hero h1 .hl { background: linear-gradient(135deg, var(--gold), var(--grass)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { color: var(--muted); font-size: 16px; max-width: 44ch; line-height: 1.5; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-stat { background: var(--panel); border: 1px solid var(--stroke); border-radius: 14px; padding: 14px 18px; }
.hero-stat b { display: block; font-size: 24px; color: var(--gold); }
.hero-stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-stack { width: 100%; max-width: 400px; display: flex; flex-direction: column; }
.auth-card { width: 100%; max-width: 400px; }
.auth-tabs { display: flex; background: var(--panel); border: 1px solid var(--stroke); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 700; }
.auth-tabs button.active { background: var(--panel-2); color: var(--text); }

@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { border-right: 0; border-bottom: 1px solid var(--stroke); padding: 32px 24px; }
}

/* ---------- match cards ---------- */
.match-grid { display: grid; gap: 12px; }
.match {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 16px; transition: 0.18s; position: relative; overflow: hidden;
}
.match:hover { border-color: var(--stroke-2); }
.match.hl { border-color: rgba(255, 200, 61, 0.4); background: linear-gradient(180deg, rgba(255, 200, 61, 0.07), var(--panel)); }
/* Un clásico SIEMPRE es destacado, así que va después de .match.hl para ganarle (misma
   especificidad, manda el orden): el partido del año no se ve igual que uno de Liguilla. */
.match.clasico { border-color: rgba(255, 45, 120, 0.4); background: linear-gradient(180deg, rgba(255, 45, 120, 0.1), rgba(255, 200, 61, 0.04) 55%, var(--panel)); }
.match.locked { opacity: 0.97; }
.match-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 7px; letter-spacing: 0.04em; text-transform: uppercase; }
.tag-stage { background: var(--panel-2); color: var(--muted); border: 1px solid var(--stroke); }
.tag-hl { background: rgba(255, 200, 61, 0.16); color: var(--gold); border: 1px solid rgba(255, 200, 61, 0.3); }
.tag-clasico {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.22), rgba(255, 200, 61, 0.16));
  color: #ffd3e2; border: 1px solid rgba(255, 45, 120, 0.45);
}
.tag-live { background: rgba(255, 45, 120, 0.16); color: var(--magenta); border: 1px solid rgba(255, 45, 120, 0.3); }
.tag-final { background: rgba(16, 185, 129, 0.16); color: var(--grass); border: 1px solid rgba(16, 185, 129, 0.3); }
.match-when { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: right; }
.match-when .cd { color: var(--gold); }

.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team.away { flex-direction: row-reverse; text-align: right; }
/* Escudo del club. 'contain' y NO 'cover': los escudos no son cuadrados (el de Tigres es
   casi circular y el de Rayados un óvalo alto), y con 'cover' se les recortarían los bordes.
   Sin borde ni fondo: el PNG de ESPN ya viene con transparencia y en el dark se ve mejor
   suelto, solo con sombra para despegarlo. */
.club-logo {
  width: 30px; height: 30px; object-fit: contain; display: block; flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
/* Respaldo sin red: monograma con el código sobre el color del club. */
.club-mono {
  width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 8px; font-size: 9.5px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}
/* Aún sin equipos (llaves de liguilla por definir): neutro, sin color de club. */
.club-mono-tbd { background: var(--panel-2); color: var(--faint); font-size: 14px; }
.team-name { font-weight: 700; font-size: 15px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.team-sub { font-size: 11px; color: var(--faint); }
/* Partido de Liguilla que todavía no se siembra: los dos lados son la misma incógnita, así
   que se pintan apagados (mismo peso que el 'Por definir' del cuadro) y en su centro va un
   "vs" en lugar del marcador — no hay casillas que llenar ni resultado que mostrar. */
.match.tbd .team-name { color: var(--faint); font-weight: 600; }
.tbd-vs { color: var(--faint); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; padding: 0 6px; }
.match-when.tent { color: var(--faint); font-weight: 700; }

.score-box { display: flex; align-items: center; gap: 8px; }
.score-input {
  width: 52px; height: 52px; text-align: center; font-size: 24px; font-weight: 800;
  border-radius: 12px; border: 1px solid var(--stroke-2); background: rgba(0, 0, 0, 0.3); color: var(--text);
  outline: none; transition: 0.15s; -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input:focus { border-color: var(--grass); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.score-input:disabled { opacity: 0.8; }
.score-dash { color: var(--faint); font-weight: 800; }
.score-final { font-size: 26px; font-weight: 900; min-width: 44px; text-align: center; }
.score-final.win { color: var(--grass); }

.match-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Por qué este partido no se puede pronosticar todavía. Misma voz que el pie del cuadro
   de la Liguilla (.tie-foot): es la misma espera. */
.tbd-note { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.mypred { font-size: 12.5px; color: var(--muted); }
.mypred b { color: var(--text); }
.pts {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: 13px;
  background: rgba(16, 185, 129, 0.16); color: var(--grass); border: 1px solid rgba(16, 185, 129, 0.3);
}
.pts.zero { background: var(--panel-2); color: var(--muted); border-color: var(--stroke); }
.pts.max { background: rgba(255, 200, 61, 0.18); color: var(--gold); border-color: rgba(255, 200, 61, 0.35); }
.foot-spacer { flex: 1; }
.save-hint { font-size: 12px; color: var(--gold); display: inline-flex; align-items: center; gap: 5px; }

/* reactions */
.reacts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.react {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--stroke); font-size: 14px; transition: 0.12s;
}
.react:hover { background: rgba(255, 255, 255, 0.1); }
.react.mine { background: rgba(56, 189, 248, 0.18); border-color: rgba(56, 189, 248, 0.4); }
.react .c { font-size: 12px; font-weight: 800; color: var(--muted); }
.react-add { color: var(--muted); font-weight: 800; }
.react-picker { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--bg-2); border: 1px solid var(--stroke-2); border-radius: 12px; }
.react-picker button { font-size: 20px; background: transparent; border: 0; padding: 4px 6px; border-radius: 8px; }
.react-picker button:hover { background: var(--panel-2); transform: scale(1.15); }

/* ---------- leaderboard ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin-bottom: 16px; }
.pod { background: var(--panel); border: 1px solid var(--stroke); border-radius: 16px; padding: 16px 12px; text-align: center; }
.pod .medal { font-size: 30px; }
.pod .pname { font-weight: 800; font-size: 14px; margin: 6px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .ppts { color: var(--gold); font-weight: 900; font-size: 20px; }
.pod .pprize { font-size: 12px; color: var(--grass); font-weight: 700; }
.pod.p1 { border-color: rgba(255, 200, 61, 0.45); background: linear-gradient(180deg, rgba(255, 200, 61, 0.12), var(--panel)); transform: translateY(-6px); }
.pod.p2 { border-color: rgba(190, 200, 220, 0.3); }
.pod.p3 { border-color: rgba(205, 127, 50, 0.35); }

.lb { width: 100%; border-collapse: collapse; }
.lb th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 10px 10px; font-weight: 800; }
.lb td { padding: 12px 10px; border-top: 1px solid var(--stroke); font-size: 14px; }
.lb tr.me td { background: rgba(56, 189, 248, 0.08); }
.lb .rank { font-weight: 900; color: var(--muted); width: 42px; }
.lb .rank.top { color: var(--gold); }
.lb .nm { font-weight: 700; }
.nm-link { cursor: pointer; border-bottom: 1px dotted var(--stroke-2); transition: color 0.12s; }
.nm-link:hover { color: var(--sky); border-bottom-color: var(--sky); }
.pod .pname.nm-link { display: inline-block; }

/* ---------- equipos: chat ---------- */
.team-chat { max-height: 340px; min-height: 90px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 4px 2px; }
.chat-msg { max-width: 82%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; }
.chat-who { font-size: 10.5px; color: var(--faint); font-weight: 700; margin: 0 6px 2px; }
.chat-bubble { display: inline-block; padding: 8px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--stroke); font-size: 14px; line-height: 1.35; word-break: break-word; text-align: left; }
.chat-msg.mine .chat-bubble { background: linear-gradient(135deg, var(--grass), var(--grass-2)); color: #04150d; border: 0; }
.chat-time { font-size: 10px; color: var(--faint); margin: 2px 6px 0; }
.chat-msg.mine .chat-time { text-align: right; }

/* ---------- sala en vivo: punto pulsante ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

/* ---------- bracket de la Liguilla (por SERIE) ---------- */
/* Cada tarjeta es un CRUCE: los dos clubes con su global y abajo sus juegos (ida/vuelta).
   En Cuartos hay 4 llaves, así que en pantalla ancha van de dos en dos. */
.tie-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.round-hint { color: var(--muted); font-size: 12.5px; margin: -6px 4px 12px; line-height: 1.5; }
.tie-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tie.tie-done { border-color: rgba(16, 185, 129, 0.3); }
.bteams { display: grid; gap: 6px; }
.brow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--panel-2); transition: 0.12s; }
.brow[role="button"] { cursor: pointer; }
.brow[role="button"]:hover { border-color: var(--stroke-2); background: rgba(255, 255, 255, 0.08); }
.brow[role="button"]:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.brow .bname { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .bmine { font-size: 10px; color: var(--sky); font-weight: 800; flex-shrink: 0; }
.brow .bmark { flex-shrink: 0; font-size: 13px; }
/* Goles del club en TODA la serie: el número que decide quién avanza, así que pesa. */
.brow .bagg { font-weight: 900; font-size: 17px; flex-shrink: 0; min-width: 20px; text-align: right; }
.brow.bpicked { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.1); }
.brow.badv { border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.12); }
.brow.badv .bagg { color: var(--grass); }
.brow.bout { opacity: 0.55; }
.brow.btbd .bname { color: var(--faint); font-weight: 600; }
.tie-global { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.tie-global b { color: var(--text); font-size: 13px; }
.tie-legs { margin-top: 10px; display: grid; gap: 4px; }
.tleg {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--stroke);
}
.tleg.live { border-color: rgba(255, 45, 120, 0.35); }
.tleg .tl-lbl { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); width: 66px; flex-shrink: 0; }
.tleg .tl-mt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tleg .tl-vs { color: var(--faint); }
.tleg .tl-tbd { color: var(--faint); }
.tleg .tl-sc { font-weight: 900; color: var(--text); flex-shrink: 0; }
.tleg .tl-when { font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.tie-note { font-size: 11.5px; color: var(--faint); line-height: 1.45; margin-top: 8px; }
.tie-foot { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.tie-foot b { color: var(--text); }
.tie-foot .cd { color: var(--gold); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); vertical-align: middle; animation: livePulse 1.4s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(255, 45, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0); } }

/* ---------- trivia (Reto en Vivo) ---------- */
.trivia-barwrap { height: 8px; border-radius: 6px; background: var(--stroke); overflow: hidden; margin: 10px 0 2px; }
.trivia-barfill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--magenta)); border-radius: 6px; transition: width .25s linear; }
.trivia-opt { transition: transform .06s ease; }
.trivia-opt:active:not([disabled]) { transform: scale(.98); }
.lb .nm .you { font-size: 11px; color: var(--sky); font-weight: 800; margin-left: 6px; }
.lb .p { font-weight: 900; color: var(--gold); text-align: right; }
.lb .prize { color: var(--grass); font-weight: 800; text-align: right; white-space: nowrap; }
.lb .badge-unpaid { font-size: 10px; color: var(--danger); border: 1px solid rgba(255, 93, 108, 0.4); border-radius: 6px; padding: 1px 5px; margin-left: 6px; }
.lb .badge-free { font-size: 10px; color: var(--grass); border: 1px solid rgba(16, 185, 129, 0.4); border-radius: 6px; padding: 1px 5px; margin-left: 6px; }

/* ---------- avatares ---------- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex-shrink: 0; vertical-align: middle; background: var(--panel-2); border: 1px solid var(--stroke); }
.av svg, .av img { width: 100%; height: 100%; display: block; }
.av-initials { font-weight: 800; letter-spacing: -0.02em; border: 0; }
.nm-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nm-cell .nm-txt { min-width: 0; }
.pod-av { display: flex; justify-content: center; margin: 4px 0 2px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-top: 8px; }
.av-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 700; transition: 0.12s; }
.av-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.av-tile:hover { border-color: var(--stroke-2); background: var(--panel-2); }
.av-tile.sel { border-color: var(--sky); background: rgba(56, 189, 248, 0.12); color: var(--text); box-shadow: inset 0 0 0 1px var(--sky); }
.av-group-title { font-size: 12px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 2px; }

/* ---------- efectividad ---------- */
.eff-cell { text-align: right; white-space: nowrap; }
.eff-cell b { color: var(--sky); font-weight: 900; }
.eff-bar { display: inline-block; width: 60px; height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; vertical-align: middle; margin-right: 8px; border: 1px solid var(--stroke); }
.eff-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--grass), var(--sky)); }

/* ---------- notifications panel ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 60; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 100%); z-index: 61;
  background: var(--bg-2); border-left: 1px solid var(--stroke); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slidein 0.2s ease;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { padding: 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--stroke); }
.drawer-head h3 { margin: 0; font-size: 16px; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px; }
.notif { display: flex; gap: 11px; padding: 12px; border-radius: 12px; transition: 0.12s; }
.notif:hover { background: var(--panel); }
.notif.unread { background: rgba(16, 185, 129, 0.07); }
.notif .nic { font-size: 20px; flex-shrink: 0; }
.notif .ntitle { font-weight: 700; font-size: 14px; }
.notif .nbody { font-size: 13px; color: var(--muted); margin-top: 2px; }
.notif .ntime { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 70; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); max-height: 86dvh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--stroke-2); border-radius: 18px; box-shadow: var(--shadow); }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--stroke); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 18px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(440px, calc(100% - 24px)); }
.toast { width: 100%; background: var(--bg-2); border: 1px solid var(--stroke-2); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: pop 0.2s ease; font-size: 14px; }
.toast.ok { border-color: rgba(16, 185, 129, 0.4); }
.toast.err { border-color: rgba(255, 93, 108, 0.4); }
.toast .ti { font-size: 18px; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }

/* ---------- loader overlay premium ---------- */
.loader-overlay {
  position: fixed; inset: 0; z-index: 85; display: grid; place-items: center;
  background: rgba(6, 9, 17, 0.5); backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.loader-overlay.show { opacity: 1; pointer-events: auto; }
.loader-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  transform: translateY(6px) scale(0.96); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.loader-overlay.show .loader-card { transform: translateY(0) scale(1); }
.loader-spin { position: relative; width: 68px; height: 68px; }
.loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 90deg, transparent 0deg, rgba(16, 185, 129, 0.12) 90deg, var(--grass) 270deg, var(--gold) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
  animation: spin 0.85s linear infinite;
}
.loader-ball { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; animation: loader-pulse 1.1s ease-in-out infinite; }
@keyframes loader-pulse { 0%, 100% { transform: scale(0.86); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }
.loader-msg {
  font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--faint), #fff, var(--faint));
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: loader-shimmer 1.6s linear infinite;
}
@keyframes loader-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .loader-ring { animation-duration: 1.6s; }
  .loader-ball, .loader-msg { animation: none; }
  .loader-card { transition: none; }
}

/* ---------- misc ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .e-ic { font-size: 44px; margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; }
.chip.active { background: var(--panel-2); color: var(--text); border-color: var(--stroke-2); }
/* Selector de jornada: 17 chips + Liguilla. Todos del mismo ancho para que J1..J17 se lean
   como una regla graduada, y la jornada activa marcada en verde (es dónde estás parado). */
.chips-ronda { gap: 6px; }
.chips-ronda .chip { min-width: 44px; padding: 7px 10px; text-align: center; font-weight: 700; }
.chips-ronda .chip.active { border-color: var(--grass); color: var(--text); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16); }
.jd-head { display: flex; align-items: center; gap: 8px; }
.jd-count {
  font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--stroke); border-radius: 999px; padding: 2px 8px;
}
.banner { border-radius: 14px; padding: 14px 16px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.banner.warn { background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.3); color: #ffe2a0; }
.banner.info { background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: #bfe9ff; }
.rules h3 { margin: 20px 0 8px; font-size: 17px; }
.rules p, .rules li { color: var(--muted); line-height: 1.6; }
.rules .ex { background: var(--panel); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.prize-bars { display: grid; gap: 8px; }
.prize-bar { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 10px; }
.prize-bar .pl { font-weight: 800; }
.prize-bar .track { height: 12px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.prize-bar .fill { height: 100%; background: linear-gradient(90deg, var(--grass), var(--gold)); }

/* ---------- dinámica (acordeones) ---------- */
.din-hero { margin-bottom: 12px; }
.acc { border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.acc + .acc { margin-top: 10px; }
.acc > summary { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; } /* Safari/iOS pintan su triángulo */
.acc > summary:hover { background: var(--panel-2); }
.acc > summary::after { content: '⌄'; margin-left: auto; color: var(--faint); font-size: 20px; line-height: 1; transition: transform 0.18s; }
.acc[open] > summary::after { transform: rotate(180deg); }
.acc[open] > summary { border-bottom: 1px solid var(--stroke); }
.acc .acc-ic { font-size: 22px; flex-shrink: 0; }
.acc .acc-tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc .acc-tt b { font-size: 15.5px; font-weight: 800; }
.acc .acc-tt small { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.acc .acc-in { padding: 14px 16px 18px; }
.din-p { color: var(--muted); line-height: 1.6; font-size: 13.5px; margin: 0 0 12px; }
.din-p b, .din-note b, .step-b b { color: var(--text); }
.din-h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 18px 0 8px; }
/* pasos numerados: la ruta del torneo se lee como escalera, no como párrafo */
.din-steps { display: grid; }
.step { display: flex; gap: 11px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--stroke); }
.step:first-child { border-top: 0; padding-top: 0; }
.step .step-n {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--stroke); color: var(--gold); font-weight: 900; font-size: 12px;
}
.step .step-b { min-width: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.din-mini { display: grid; gap: 6px; margin-top: 10px; }
.mini-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--stroke); }
.mini-row .mini-k { font-size: 11.5px; font-weight: 900; color: var(--gold); width: 74px; flex-shrink: 0; }
.mini-row .mini-v { font-size: 12.5px; line-height: 1.5; min-width: 0; }
/* los tres escalones de puntos, uno junto a otro */
.din-pts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.din-pt { border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--panel-2); padding: 12px 10px; text-align: center; }
.din-pt b { display: block; font-size: 28px; font-weight: 900; color: var(--text); line-height: 1.1; }
.din-pt span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.din-pt.hi { border-color: rgba(255, 200, 61, 0.35); background: linear-gradient(180deg, rgba(255, 200, 61, 0.1), var(--panel-2)); }
.din-pt.hi b { color: var(--gold); }
.din-formula { text-align: center; padding: 14px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--stroke); margin-bottom: 6px; }
.din-formula .fx { font-size: 19px; font-weight: 900; color: var(--grass); }
.din-formula small { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.45; margin-top: 6px; }
.din-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.22); font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.clasico-list { display: grid; gap: 8px; }
.clasico-row { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid rgba(255, 45, 120, 0.25); }
.clasico-row .club-logo, .clasico-row .club-mono { width: 24px; height: 24px; }
.clasico-row .cl-vs { font-size: 13px; font-weight: 700; margin-left: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clasico-row .cl-nm { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #ffd3e2; flex-shrink: 0; }
.din-extras { display: grid; gap: 8px; }
.din-x { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--stroke); }
.din-x .xi { font-size: 19px; flex-shrink: 0; line-height: 1.2; }
.din-x .xb { font-size: 12.5px; color: var(--muted); line-height: 1.5; min-width: 0; }
.din-x .xb b { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 2px; }

@media (max-width: 560px) {
  .team-name { font-size: 14px; }
  /* 2px de vuelta para el nombre: "Atlético de San Luis" va muy justo en pantalla chica. */
  .club-logo, .club-mono { width: 28px; height: 28px; }
  .score-input { width: 46px; height: 46px; font-size: 21px; }
  .hero-stat b { font-size: 20px; }
  .lb .hide-sm { display: none; }
  /* La serie completa (ida + vuelta) tiene que caber sin scroll horizontal. */
  .tleg { gap: 6px; font-size: 12px; }
  .tleg .tl-lbl { width: 52px; }
  .clasico-row .club-logo, .clasico-row .club-mono { width: 22px; height: 22px; }
  .din-formula .fx { font-size: 16px; }
  .mini-row .mini-k { width: 62px; }
}

/* ---------- marca SP.Digital (footer + login) ---------- */
.sp-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; padding: 24px 16px;
}
.shell .sp-footer { margin-top: 28px; border-top: 1px solid var(--stroke); }
.auth-stack .sp-footer { padding: 22px 16px 4px; }
.sp-footer .sp-by { font-size: 12.5px; color: var(--faint); font-weight: 600; letter-spacing: 0.01em; }
.sp-brand {
  display: inline-flex; align-items: baseline; text-decoration: none; line-height: 1;
  font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.sp-brand .sp-sp { color: #2e9bf6; }
.sp-brand .sp-dg { color: var(--text); }
.sp-brand:hover { transform: translateY(-1px); filter: brightness(1.12); }
.sp-brand:hover .sp-sp { color: #54b1ff; }

/* ---------- instalar PWA (botón + instrucciones iOS) ---------- */
.install-hide { display: none !important; }
.btn-install { gap: 6px; }
.topbar .btn-install { white-space: nowrap; }
.install-steps { margin: 8px 0 12px; padding-left: 22px; display: grid; gap: 9px; color: var(--text); line-height: 1.5; }
.install-steps li { padding-left: 4px; }
.install-steps b { color: var(--text); }
.ios-share { color: var(--sky); vertical-align: -4px; margin: 0 1px; }
@media (max-width: 560px) {
  .topbar .btn-install .install-lbl { display: none; }
  .topbar .btn-install { padding: 9px 11px; }
}
