/* QuinielaInc.com — tema negro / azul / dorado */
:root {
  --ink: #05070d;
  --navy-900: #070b17;
  --navy-800: #0b1224;
  --navy-700: #111b35;
  --navy-600: #1a2747;
  --blue: #2f7bff;
  --blue-soft: #6fa4ff;
  --gold: #e9b636;
  --gold-hi: #ffe08a;
  --gold-lo: #b8841a;
  --gold-grad: linear-gradient(135deg, #ffe08a 0%, #e9b636 45%, #b8841a 100%);
  --text: #eef2fb;
  --muted: #93a0bd;
  --line: rgba(255, 255, 255, .09);
  --card: rgba(9, 14, 30, .78);
  --card-solid: #0b1224;
  --ok: #34d17a;
  --bad: #ff5d6c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,7,13,.70) 0%, rgba(5,7,13,.86) 40%, rgba(5,7,13,.96) 100%),
    url('/img/fondo.jpg') center top / cover no-repeat;
}
a { color: var(--blue-soft); text-decoration: none; }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(22px, 3vw, 30px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 7, 13, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 182, 54, .25);
}
.topbar-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { height: 40px; width: auto; filter: drop-shadow(0 2px 6px rgba(233,182,54,.35)); }
.brand-text { font: italic 800 20px var(--font-head); letter-spacing: -.3px; }
.brand-text b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text small { font-size: 13px; color: var(--muted); font-style: normal; font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--muted); font-weight: 700; padding: 8px 12px; border-radius: 10px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav a.active { color: var(--ink); background: var(--gold-grad); }
.session { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.session .who { font-weight: 700; }
.menu-btn { display: none; margin-left: 8px; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; font-size: 20px; padding: 4px 10px; cursor: pointer; }

.leagues { display: flex; gap: 8px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.league-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.03);
}
.league-chip.on { color: var(--gold-hi); border-color: rgba(233,182,54,.6); background: rgba(233,182,54,.1); }
.league-chip.off { opacity: .55; cursor: not-allowed; }
.league-chip em { font-style: normal; font-size: 11px; font-weight: 600; }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14px var(--font-body); border-radius: 10px; padding: 10px 16px;
  border: 1px solid transparent; cursor: pointer; transition: transform .08s, filter .15s, background .15s;
  color: var(--ink); background: var(--gold-grad);
}
.btn:hover { filter: brightness(1.08); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: rgba(233,182,54,.5); color: var(--gold-hi); }
.btn.blue { background: linear-gradient(135deg, #4f8fff, #1f5fe0); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255,93,108,.4); }

label { display: block; font-weight: 700; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
input, select {
  width: 100%; font: 600 15px var(--font-body); color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,182,54,.2); }
select option { background: var(--card-solid); }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 160px; }

/* ---------- Tarjetas y layout ---------- */
main { flex: 1; padding-top: 22px; padding-bottom: 40px; outline: none; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1.4fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.hero {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(233,182,54,.35); margin-bottom: 18px; background: #000;
}
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 533; object-fit: cover; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font: 800 28px var(--font-head); }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .3px; text-transform: uppercase; }
.badge.gold { background: var(--gold-grad); color: var(--ink); }
.badge.blue { background: rgba(47,123,255,.18); color: var(--blue-soft); border: 1px solid rgba(47,123,255,.4); }
.badge.live { background: rgba(255,93,108,.18); color: #ff8a95; border: 1px solid rgba(255,93,108,.45); }
.badge.grey { background: rgba(255,255,255,.07); color: var(--muted); }
.notice { border-left: 3px solid var(--gold); background: rgba(233,182,54,.08); padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.notice.blue { border-color: var(--blue); background: rgba(47,123,255,.08); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- Selector de semana ---------- */
.weekbar { display: flex; align-items: center; gap: 8px; }
.weeks { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.wk {
  flex: none; min-width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--muted); font: 700 13px var(--font-body); cursor: pointer;
}
.wk:hover { color: var(--text); border-color: rgba(233,182,54,.5); }
.wk.cur { border-color: var(--blue); color: var(--blue-soft); }
.wk.on { background: var(--gold-grad); color: var(--ink); border-color: transparent; }

/* ---------- Partidos / picks ---------- */
.games { display: grid; gap: 10px; }
.game {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.game-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; gap: 8px; }
.team {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text);
  font: 700 15px var(--font-body); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .08s;
}
.team.home { flex-direction: row-reverse; text-align: right; }
.team img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.team .tn { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.team .tn small { color: var(--muted); font-weight: 600; font-size: 11px; }
.team .sc { margin-left: auto; font: 800 22px var(--font-head); }
.team.home .sc { margin-left: 0; margin-right: auto; }
.team:hover:not(:disabled) { border-color: rgba(233,182,54,.6); }
.team:active:not(:disabled) { transform: scale(.99); }
.team.picked { border-color: var(--gold); background: rgba(233,182,54,.13); box-shadow: inset 0 0 0 1px rgba(233,182,54,.5); }
.team:disabled { cursor: default; }
.team.won .sc { color: var(--gold-hi); }
.team.picked.hit { border-color: var(--ok); background: rgba(52,209,122,.12); box-shadow: inset 0 0 0 1px rgba(52,209,122,.5); }
.team.picked.miss { border-color: var(--bad); background: rgba(255,93,108,.10); box-shadow: inset 0 0 0 1px rgba(255,93,108,.45); }
.vs { align-self: center; font: 800 13px var(--font-head); color: var(--muted); }
.logo-fallback { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-600); font-size: 11px; font-weight: 800; flex: none; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold-grad); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 800; position: sticky; top: 0; background: var(--card-solid); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.c, th.c { text-align: center; }
tr.me td { background: rgba(47,123,255,.08); }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; background: rgba(255,255,255,.06); }
.rank.r1 { background: var(--gold-grad); color: var(--ink); }
.rank.r2 { background: linear-gradient(135deg, #f1f4f9, #a9b2c3); color: var(--ink); }
.rank.r3 { background: linear-gradient(135deg, #f0b27a, #a8662d); color: var(--ink); }
.pos { color: var(--ok); font-weight: 800; }
.neg { color: var(--bad); font-weight: 800; }
.cell-win { background: rgba(233,182,54,.16); color: var(--gold-hi); font-weight: 800; }
.cell-prov { color: var(--muted); font-style: italic; }
.pk { display: inline-block; min-width: 42px; font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 6px; text-align: center; }
.pk.hit { background: rgba(52,209,122,.16); color: #7cf0ad; }
.pk.miss { background: rgba(255,93,108,.14); color: #ff9aa4; }
.pk.pend { background: rgba(255,255,255,.07); color: var(--text); }
.pk.none { color: var(--muted); }

/* ---------- Noticias ---------- */
.news { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.news-item {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.news-item:hover { border-color: rgba(233,182,54,.55); transform: translateY(-2px); color: var(--text); }
.news-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.news-item h3 { margin: 0; font-size: 15px; font-family: var(--font-body); font-weight: 700; }
.news-item .src { font-size: 12px; color: var(--muted); font-weight: 700; }
.news-list .news-item { flex-direction: row; align-items: baseline; gap: 10px; padding: 10px 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.news-list .news-item:hover { transform: none; }

/* ---------- Auth ---------- */
.auth { max-width: 460px; margin: 10px auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; background: rgba(255,255,255,.04); padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; border: 0; background: none; color: var(--muted); font: 700 14px var(--font-body); padding: 9px; border-radius: 9px; cursor: pointer; }
.tabs button.on { background: var(--gold-grad); color: var(--ink); }
.err { color: #ff9aa4; font-weight: 700; font-size: 14px; min-height: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--card-solid); border: 1px solid rgba(233,182,54,.5); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow); transition: all .25s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255,93,108,.6); }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 24px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column;
    background: rgba(5,7,13,.97); border-bottom: 1px solid rgba(233,182,54,.25); padding: 8px 16px 14px; margin: 0;
  }
  .nav.open { display: flex; }
  .session .who { display: none; }
}
@media (max-width: 560px) {
  .brand-text small { display: none; }
  .game { grid-template-columns: 1fr; }
  .vs { display: none; }
  .team.home { flex-direction: row; text-align: left; }
  .team.home .sc { margin-left: auto; margin-right: 0; }
  .team .tn small { display: none; }
}
.grid > .card + .card { margin-top: 0; }

/* ---------- v2: logos, avatares, en vivo, cuadrícula ---------- */
.tt { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tt .rec { color: var(--muted); font-size: 11px; font-weight: 700; }
.tt .rec i { font-style: normal; opacity: .8; }
.tlogo { object-fit: contain; flex: none; }
.tbadge {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--tc, #1a2747); color: #fff; font: 800 9px var(--font-body); letter-spacing: -.2px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
}
.team .tbadge { font-size: 11px; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px rgba(233,182,54,.55); }
.avatar.ph { display: inline-grid; place-items: center; background: var(--navy-600); color: var(--gold-hi); font-weight: 800; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; }
.me-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-row input[type=file] { padding: 8px; font-size: 13px; }
th.pl { text-align: center; }
th.pl .avatar { margin: 0 auto 4px; display: block; }
th.pl .avatar.ph { display: grid; }

/* Cuadrícula en las tablas */
table.grid-table { border-collapse: collapse; }
.grid-table th, .grid-table td { border: 1px solid rgba(255,255,255,.12); }
.grid-table thead th { background: #0e1730; }
.grid-table tfoot th { background: #0e1730; color: var(--text); font-size: 13px; }
.table-wrap { border: 1px solid rgba(255,255,255,.12); }
.table-wrap > table.grid-table { margin: -1px; width: calc(100% + 2px); }

/* Récord en las tarjetas de picks */
.rec-box { display: flex; flex-direction: column; align-items: center; line-height: 1.1; margin-left: auto; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.05); }
.rec-box b { font-size: 13px; }
.rec-box small { color: var(--muted); font-size: 11px; font-weight: 700; }
.team .sc { margin-left: 8px; min-width: 28px; text-align: right; }
.team.home .rec-box { margin-left: 0; margin-right: auto; }
.team.home .sc { margin-left: 0; margin-right: 8px; text-align: left; }

/* Franja de marcadores en vivo */
.card.live { padding: 12px 14px; margin-top: -4px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
.live-head .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 4px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-head .dot { animation: none; } }
.live-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lcard { flex: none; min-width: 118px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.lcard.live { border-color: rgba(255,93,108,.6); background: rgba(255,93,108,.08); }
.lst { font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; white-space: nowrap; }
.lcard.live .lst { color: #ff8a95; }
.lrow { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.lrow b { margin-left: auto; font: 800 15px var(--font-head); }
.lrow.w b { color: var(--gold-hi); }

/* Bye week */
.byes { margin-top: 16px; }
.byes h3 { font-size: 14px; color: var(--muted); }
.bye-list { display: flex; flex-wrap: wrap; gap: 8px; }
.bye { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }

/* Tabla de la semana */
.week-table td, .week-table th { padding: 6px 8px; font-size: 13px; }
.week-table .pk { display: inline-flex; align-items: center; gap: 4px; }
.shot-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.shot-title div { display: flex; flex-direction: column; line-height: 1.15; }
.shot-title b { font: 800 16px var(--font-head); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shot-title span { color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: .5px; }
.wk:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 560px) {
  .rec-box { margin-left: auto; }
  .team.home .rec-box { margin-left: auto; margin-right: 0; }
  .team.home .sc { margin-left: 8px; margin-right: 0; text-align: right; }
}

/* ---------- v3 ---------- */
/* Banner en todas las páginas + marcadores fijos al hacer scroll */
body > .wrap > .hero { margin: 16px auto 0; }
.live-bar {
  position: sticky; top: 62px; z-index: 15; margin-top: 12px;
  background: rgba(5, 7, 13, .92); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(233,182,54,.25); border-bottom: 1px solid rgba(233,182,54,.25);
}
.live-in { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 64px; }
.live-tag { flex: none; font: 800 11px var(--font-body); letter-spacing: .6px; color: var(--gold-hi); writing-mode: horizontal-tb; display: flex; align-items: center; gap: 5px; }
.live-tag .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s infinite; }
@media (prefers-reduced-motion: reduce) { .live-tag .dot { animation: none; } }
.live-bar .live-strip { padding-bottom: 2px; }
.live-bar .lcard { min-width: 104px; padding: 5px 8px; }
.live-bar .lst { font-size: 10px; margin-bottom: 2px; }
.live-bar .lrow { font-size: 12px; }
.live-bar .lrow b { font-size: 14px; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; border-color: rgba(233,182,54,.45); }
.grid.four { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid.four .stat .v { font-size: 24px; }
.grid.four .progress { margin-top: 6px; }

/* Equipo con récord abajo del nombre */
.tstack { display: inline-flex; align-items: center; gap: 8px; }
.tstack > span { display: flex; flex-direction: column; line-height: 1.15; }
.tstack small { color: var(--muted); font-size: 11px; font-weight: 700; }
.home-games td { white-space: normal; vertical-align: middle; }
.home-games td.score { font-size: 17px; white-space: nowrap; }
.byes h3 { color: var(--gold-hi); letter-spacing: 1px; font-size: 13px; }

.divs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.divs h3 { font-size: 13px; color: var(--gold-hi); margin-bottom: 6px; }
.divs table { width: 100%; }
.divs td { padding: 6px 8px; font-size: 13px; }
.divs tr.lead td { background: rgba(233,182,54,.08); }
@media (max-width: 980px) { .divs { grid-template-columns: repeat(2, 1fr); } .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .divs { grid-template-columns: 1fr; } }

/* Tarjeta de partido: casilla con palomita, ciudad, récord al centro, línea punteada, marcador grande */
.game { display: flex; flex-direction: column; gap: 8px; }
.trow {
  display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) 110px 76px; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.trow.ro { cursor: default; }
.trow:not(.ro):hover { border-color: rgba(233,182,54,.6); }
.trow input.pick { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.trow .box {
  width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(255,255,255,.35); display: grid; place-items: center;
  background: rgba(0,0,0,.25); transition: all .15s;
}
.trow.picked .box { background: var(--gold-grad); border-color: transparent; }
.trow.picked .box::after { content: '✓'; color: var(--ink); font: 900 17px/1 var(--font-body); }
.trow input.pick:focus-visible + .box { box-shadow: 0 0 0 3px rgba(233,182,54,.45); }
.trow.ro:not(.picked) .box { opacity: .4; }
.trow.picked { border-color: var(--gold); background: rgba(233,182,54,.10); }
.trow.picked.hit { border-color: var(--ok); background: rgba(52,209,122,.12); }
.trow.picked.hit .box { background: var(--ok); }
.trow.picked.miss { border-color: var(--bad); background: rgba(255,93,108,.10); }
.trow.picked.miss .box { background: var(--bad); }
.trow.picked.miss .box::after { content: '✕'; color: #fff; }
.tname { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tname small { color: var(--muted); font-size: 12px; font-weight: 700; }
.tname b { font: 700 18px var(--font-head); }
.trec { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.trec b { font: 800 20px var(--font-head); }
.trec small { color: var(--muted); font-weight: 800; font-size: 14px; }
.tscore { border-left: 2px dashed rgba(255,255,255,.25); align-self: stretch; display: grid; place-items: center; font: 800 32px var(--font-head); }
.trow.won .tscore { color: var(--gold-hi); }
.venue { font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 4px; }
@media (max-width: 560px) {
  .trow { grid-template-columns: 26px 32px minmax(0, 1fr) 70px 52px; gap: 8px; padding: 8px; }
  .trow .tlogo, .trow .tbadge { width: 32px !important; height: 32px !important; }
  .tname b { font-size: 15px; }
  .trec b { font-size: 15px; } .trec small { font-size: 12px; }
  .tscore { font-size: 24px; }
  .live-bar { top: 62px; }
}

/* ---------- v4 ---------- */
/* Logos directos, sin fondo; un contorno suave para que los oscuros (Giants, Bears…) no se pierdan */
.tlogo { background: none; padding: 0; border-radius: 0; filter: drop-shadow(0 0 1px rgba(255,255,255,.45)) drop-shadow(0 1px 2px rgba(0,0,0,.5)); }

/* Noticias en Inicio: mismo alto que el recuadro de resultados, con scroll propio */
.grid.two { align-items: stretch; }
.news-box { display: flex; flex-direction: column; min-height: 0; position: relative; }
.news-box .news-list { flex: 1 1 0; min-height: 320px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; }
.news-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.news-row:last-child { border-bottom: 0; }
.news-row:hover b { color: var(--gold-hi); }
.news-row img { width: 84px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.news-row > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.news-row b { font: 700 14px/1.3 var(--font-body); }
.news-row small { color: var(--muted); font-size: 12px; font-weight: 700; }
.news-row em { font-style: normal; color: var(--blue-soft); }
@media (max-width: 860px) { .news-box .news-list { flex: none; max-height: 480px; } }

/* Mis picks: ambos equipos en una sola línea (local en espejo) */
.matchup { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: stretch; gap: 8px; }
.matchup .at { display: grid; place-items: center; color: var(--muted); font: 800 15px var(--font-head); }
.trow { grid-template-columns: 26px 46px minmax(0, 1fr) 74px 64px; gap: 10px; }
.trow .tlogo, .trow .tbadge { width: 46px !important; height: 46px !important; }
.trow.home { grid-template-columns: 64px 74px minmax(0, 1fr) 46px 26px; }
.trow.home .box { order: 5; } .trow.home .tlogo, .trow.home .tbadge { order: 4; } .trow.home .tname { order: 3; text-align: right; align-items: flex-end; }
.trow.home .trec { order: 2; } .trow.home .tscore { order: 1; border-left: 0; border-right: 2px dashed rgba(255,255,255,.25); }
.trow:has(input.pick:focus-visible) .box { box-shadow: 0 0 0 3px rgba(233,182,54,.45); }
.tname b { font-size: 17px; }
.trec b { font-size: 18px; } .trec small { font-size: 13px; }
.tscore { font-size: 30px; }
/* Franja de resultados bajo el banner (estilo marcador de TV) */
.live-in { gap: 0; padding: 0; min-height: 0; align-items: stretch; }
.wk-pill {
  position: relative; flex: none; align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-right: 10px;
  padding: 8px 14px; border-radius: 999px; background: #fff; color: #0b1020; font: 800 14px var(--font-head); white-space: nowrap; cursor: pointer;
}
.wk-pill .car { font-size: 16px; line-height: 0; transform: translateY(-3px); }
.wk-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s infinite; }
.wk-pill select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.wk-pill:has(select:focus-visible) { box-shadow: 0 0 0 3px rgba(233,182,54,.6); }
.live-bar .live-strip { gap: 0; padding: 0; align-items: stretch; }
.lc { flex: none; width: 148px; padding: 7px 12px 8px; border-left: 1px solid rgba(255,255,255,.28); display: flex; flex-direction: column; gap: 3px; }
.lc:last-child { border-right: 1px solid rgba(255,255,255,.28); }
.lc .lst { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 700; color: #c9d3e8; text-transform: none; margin: 0 0 2px; white-space: nowrap; }
.lc .lst b { font-weight: 800; color: #fff; }
.lc .lst b.on { color: #ff8a95; display: inline-flex; align-items: center; gap: 4px; }
.lc .lst .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s infinite; }
.lc .net { color: #9aa6c0; font-weight: 800; }
.lr { display: grid; grid-template-columns: 24px 1fr auto 10px; align-items: center; gap: 6px; font: 800 13px var(--font-body); color: #fff; }
.lr .sc { font: 800 15px var(--font-head); text-align: right; }
.lr .rc { color: #8d97ad; font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.lr .arr { font-style: normal; font-size: 9px; color: #fff; }
.lr.lose { color: #7d879c; }
.lr.lose .tlogo { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .wk-pill .dot, .lc .lst .dot { animation: none; } }
@media (max-width: 560px) { .lc { width: 136px; padding: 6px 9px; } .wk-pill { padding: 7px 11px; font-size: 13px; } }

/* ---------- v4.1: celular ---------- */
/* Nada se sale de su recuadro: las columnas del grid pueden encogerse y las tablas anchas hacen scroll dentro */
.grid > *, .card { min-width: 0; }
.wk-pill { cursor: default; }
@media (max-width: 560px) {
  .wk-pill { padding: 6px 10px; font-size: 12px; margin-right: 8px; }
  /* Resultados de Inicio como tarjetitas: fecha y estado arriba, visitante · marcador · local abajo */
  .home-games thead { display: none; }
  .home-games, .home-games tbody { display: block; }
  .home-games tr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px 8px;
    padding: 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .home-games tr:last-child { border-bottom: 0; }
  .home-games td { border: 0 !important; padding: 0 !important; background: none !important; }
  .home-games td.day { grid-column: 1 / 3; grid-row: 1; font-size: 12px; }
  .home-games td.day br { display: none; }
  .home-games td.day::after { content: ''; }
  .home-games td:nth-child(2) { grid-row: 2; grid-column: 1; }
  .home-games td.score { grid-row: 2; grid-column: 2; font-size: 16px; }
  .home-games td:nth-child(4) { grid-row: 2; grid-column: 3; justify-self: end; }
  .home-games td:nth-child(4) .tstack { flex-direction: row-reverse; text-align: right; }
  .home-games td:nth-child(5) { grid-row: 1; grid-column: 3; justify-self: end; }
  .home-games .tstack { gap: 6px; }
  .home-games .tstack .tlogo, .home-games .tstack .tbadge { width: 28px !important; height: 28px !important; }
  .home-games .tstack b { font-size: 14px; }
  .home-games .tstack small { font-size: 10px; }
}

/* ---------- v4.2: picks ---------- */
/* Antes de que termine el partido solo se ve la palomita (sin color en la casilla del equipo);
   al terminar: verde si acertaste, rojo si fallaste. */
.trow.picked:not(.hit):not(.miss) { border-color: var(--line); background: rgba(255,255,255,.03); }
.trow.picked:not(.hit):not(.miss) .box { background: rgba(0,0,0,.25); border-color: #fff; }
.trow.picked:not(.hit):not(.miss) .box::after { color: #fff; }
.mrec { display: none; font-style: normal; color: var(--muted); font-size: 11px; font-weight: 800; }
/* Ambos equipos siempre en el mismo renglón; en pantallas chicas se compacta */
@media (max-width: 860px) {
  .matchup { gap: 4px; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); }
  .matchup .at { font-size: 12px; }
  .trow, .trow.home { gap: 6px; padding: 8px 6px; }
  .trow { grid-template-columns: 22px 30px minmax(0, 1fr) 36px; }
  .trow.home { grid-template-columns: 36px minmax(0, 1fr) 30px 22px; }
  .trow.home .tlogo, .trow.home .tbadge { order: 3; } .trow.home .tname { order: 2; } .trow.home .tscore { order: 1; } .trow.home .box { order: 4; }
  .trow .trec, .tname small { display: none; }
  .mrec { display: block; }
  .trow .box { width: 22px; height: 22px; border-radius: 6px; }
  .trow.picked .box::after { font-size: 14px; }
  .trow .tlogo, .trow .tbadge { width: 30px !important; height: 30px !important; }
  .tname b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tscore { font-size: 20px; }
}

.tname .tab { display: none; }
@media (max-width: 560px) {
  .tname .tnk { display: none; }
  .tname .tab { display: block; font-size: 15px; }
  .trow, .trow.home { padding: 8px 5px; gap: 5px; }
}

/* Tabla de la semana: el pick de cada jugador es solo el logo del equipo (verde = acierto, rojo = fallo) */
.week-table .pk:not(.none) { justify-content: center; min-width: 40px; padding: 3px 6px; }
.week-table .pk.miss .tlogo { opacity: .6; }
.week-table .pk.hit { background: rgba(52,209,122,.30); box-shadow: inset 0 0 0 1px rgba(52,209,122,.6); }
.week-table .pk.miss { background: rgba(255,93,108,.24); box-shadow: inset 0 0 0 1px rgba(255,93,108,.5); }

/* iPhone agranda el texto al voltear el celular y lo hace salirse de las celdas: se desactiva */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.week-table td .tt > span { overflow: hidden; text-overflow: ellipsis; }

/* Tabla: columna Week angosta */
.grid-table .wkcol { width: 1%; padding-left: 8px; padding-right: 8px; }
.wk-live { color: var(--bad); font-size: 10px; vertical-align: middle; }

/* ---------- Grupos y perfil/admin ---------- */
.group-chip { display: inline-flex; align-items: center; gap: 6px; }
.group-chip em { opacity: .7; }
.glogo { border-radius: 8px; object-fit: cover; flex: none; }
.glogo.ph { display: inline-grid; place-items: center; background: var(--gold-grad); color: var(--ink); font: 800 13px var(--font-head); }
.admin-title { color: var(--gold-hi); letter-spacing: .5px; margin-bottom: 10px; }
.groups { display: grid; gap: 8px; }
.group { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.group.open { border-color: rgba(233,182,54,.5); }
.group-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.group-head > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.group-head small { color: var(--muted); font-weight: 700; }
.group-head .car { color: var(--muted); }
.group-body { padding: 0 12px 14px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 13px; font-weight: 700; }
.chip.sm { padding: 1px 7px; font-size: 11px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 13px; font-weight: 700; cursor: pointer; }
.chk input { width: auto; margin: 0; accent-color: var(--gold); }
.chk:has(input:checked) { border-color: rgba(233,182,54,.6); background: rgba(233,182,54,.10); }
.add-box > summary { list-style: none; display: inline-flex; }
.add-box > summary::-webkit-details-marker { display: none; }
.add-form { margin-top: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.players-table td { vertical-align: middle; }
.edit-row td { background: rgba(233,182,54,.05); white-space: normal; }
