/* ============ PADEL TOUR 2026 · tema oscuro con acentos azules ============ */
:root {
  --bg: #060a13;
  --bg-2: #0a1120;
  --panel: #0e1729;
  --panel-2: #121d33;
  --line: #1c2c4d;
  --line-strong: #2a4a8a;
  --blue: #3b82f6;
  --blue-2: #2563eb;
  --blue-soft: rgba(59, 130, 246, .14);
  --cyan: #38bdf8;
  --text: #e6edf8;
  --text-2: #a9b6cc;
  --muted: #6b7a94;
  --live: #ef4444;
  --ok: #22c55e;
  --gold: #f5c451;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-head: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(37, 99, 235, .18), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(56, 189, 248, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  display: flex; flex-direction: column;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--blue-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1f3260; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #0b1324, #080e1b);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(59,130,246,.55)); }
.brand-title { font: 700 21px/1 var(--font-head); letter-spacing: .06em; }
.brand-title span { color: var(--blue); }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 3px; letter-spacing: .04em; }
.topbar-live { flex: 1; display: flex; justify-content: center; }
.clocks { display: flex; gap: 10px; }
.clock {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.clock-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.clock-time { font: 600 17px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }

.live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(37,99,235,.25), rgba(37,99,235,.08));
  cursor: pointer; font-weight: 600;
}
.live-pill .sub { color: var(--text-2); font-weight: 400; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(239,68,68,.7); animation: pulse 1.6s infinite; flex: none; }
.dot.blue { background: var(--blue); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6);} 70% { box-shadow: 0 0 0 9px rgba(239,68,68,0);} 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0);} }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 6px; padding: 10px 22px 0;
  background: #080e1b; border-bottom: 1px solid var(--line-strong);
}
.tab {
  background: transparent; border: 1px solid transparent; border-bottom: none;
  color: var(--text-2); padding: 10px 18px; border-radius: 10px 10px 0 0;
  cursor: pointer; font-weight: 600; letter-spacing: .02em; position: relative; top: 1px;
}
.tab:hover { color: var(--text); background: rgba(59,130,246,.07); }
.tab.active {
  color: #fff; background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
  border-color: var(--line-strong); box-shadow: 0 -4px 18px rgba(37,99,235,.35);
}
.tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- layout ---------- */
main { flex: 1; overflow: auto; padding: 22px; }
.view { display: none; animation: fade .18s ease; max-width: 1500px; margin: 0 auto; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none;} }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1.4fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.card.accent { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(59,130,246,.15), var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font: 600 15px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 16px; background: var(--blue); border-radius: 2px; }
.section-title { font: 600 22px/1.2 var(--font-head); letter-spacing: .03em; margin: 0 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }

/* ---------- toolbar / inputs ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg button { background: transparent; border: none; padding: 8px 14px; cursor: pointer; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--blue-2); color: #fff; }
.input, select.input {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); background: #16264a; text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, #3b82f6, #1d4ed8); border-color: #3b82f6; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: #7f1d1d; color: #fca5a5; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid var(--line-strong); color: var(--text-2); background: var(--bg-2); white-space: nowrap;
}
.badge.cat-Major { color: #fde68a; border-color: #8a6d1f; background: rgba(245,196,81,.08); }
.badge.cat-P1 { color: #93c5fd; border-color: #2a4a8a; background: rgba(59,130,246,.12); }
.badge.cat-P2 { color: #a5f3fc; border-color: #1f5f73; background: rgba(56,189,248,.08); }
.badge.cat-Finals { color: #fff; border-color: var(--blue); background: linear-gradient(90deg, #1d4ed8, #7c3aed); }
.badge.live { color: #fecaca; border-color: #7f1d1d; background: rgba(239,68,68,.12); }
.badge.ok { color: #bbf7d0; border-color: #166534; background: rgba(34,197,94,.08); }
.badge.off { color: var(--muted); }
.flag { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); vertical-align: middle; }
.flag-lg { width: 30px; height: 21px; }

/* ---------- hero torneo ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px 26px;
  background:
    linear-gradient(110deg, rgba(29,78,216,.55), rgba(10,17,32,.2) 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 60px),
    var(--panel);
  box-shadow: 0 0 40px rgba(37,99,235,.25), var(--shadow);
  margin-bottom: 16px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  border: 2px solid rgba(147,197,253,.25); box-shadow: inset 0 0 0 30px rgba(59,130,246,.06);
}
.hero-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-name { font: 700 34px/1.05 var(--font-head); letter-spacing: .02em; margin: 8px 0 6px; position: relative; z-index: 1; }
.hero-meta { color: #c7d5ee; position: relative; z-index: 1; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-days { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.day-chip {
  padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(147,197,253,.25);
  background: rgba(6,10,19,.45); min-width: 118px;
}
.day-chip b { display: block; font: 600 13px var(--font-head); letter-spacing: .04em; }
.day-chip span { color: var(--text-2); font-size: 12px; }
.day-chip.today { border-color: var(--cyan); background: rgba(56,189,248,.14); box-shadow: 0 0 16px rgba(56,189,248,.25); }
.day-chip.past { opacity: .55; }

/* ---------- partidos ---------- */
.match {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
}
.match + .match { margin-top: 10px; }
.match.is-live { border-color: #7f1d1d; background: linear-gradient(90deg, rgba(239,68,68,.10), var(--bg-2) 40%); }
.match-time { font: 600 20px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.match-time small { display: block; font: 400 11.5px var(--font); color: var(--muted); margin-top: 4px; }
.match-teams { display: grid; gap: 6px; min-width: 0; }
.team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team .names { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.team .seed { color: var(--muted); font-size: 12px; }
.team .score { margin-left: auto; font: 600 15px var(--font-head); letter-spacing: .08em; color: var(--cyan); }
.team.win .names { color: #fff; }
.match-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.vs { color: var(--muted); font-size: 11px; letter-spacing: .1em; }

/* avatares */
.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a); border: 1px solid var(--line-strong);
  display: inline-grid; place-items: center; font: 700 12px var(--font-head); color: #bfdbfe;
}
.av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -10px; }

/* ---------- jugadores ---------- */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard {
  position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #10203f, var(--bg-2) 62%);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 12px 30px rgba(37,99,235,.25); }
.pcard-photo { height: 190px; position: relative; display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(59,130,246,.35), transparent 65%); }
.pcard-photo > img { height: 100%; width: 100%; object-fit: cover; object-position: top center; }
.pcard-photo .initials { font: 700 54px var(--font-head); color: rgba(191,219,254,.35); align-self: center; }
.pcard-rank {
  position: absolute; top: 10px; left: 10px; font: 700 13px var(--font-head);
  background: rgba(6,10,19,.75); border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px 8px;
}
.pcard-flag { position: absolute; top: 10px; right: 10px; }
.pcard-body { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.pcard-name { font: 600 17px/1.15 var(--font-head); letter-spacing: .02em; }
.pcard-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.pala { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(59,130,246,.08); border: 1px solid var(--line); }
.pala-brand { font: 700 12px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.pala-model { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ficha */
.ficha { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
@media (max-width: 760px) { .ficha { grid-template-columns: 1fr; } }
.ficha-photo { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-strong); background: radial-gradient(circle at 50% 35%, rgba(59,130,246,.4), #0b1324 70%); height: 300px; display: grid; place-items: center; }
.ficha-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ficha h2 { font: 700 30px/1.1 var(--font-head); margin: 0 0 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); }
.stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font: 600 17px/1.25 var(--font-head); margin-top: 3px; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }

/* ---------- calendario ---------- */
.months { display: grid; gap: 22px; }
.month-title { font: 600 14px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.month-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tcard {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg-2); cursor: pointer;
  display: grid; gap: 10px; transition: border-color .15s, transform .15s;
}
.tcard:hover { border-color: var(--blue); transform: translateY(-2px); }
.tcard.now { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(56,189,248,.35), 0 0 24px rgba(56,189,248,.18); }
.tcard.cancel { opacity: .55; }
.tcard-top { display: flex; align-items: center; gap: 8px; }
.tcard-name { font: 600 18px/1.15 var(--font-head); }
.tcard-dates { color: var(--text-2); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.champ { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.champ b { color: var(--text); font-weight: 600; }
.champ .lbl { width: 18px; color: var(--muted); font-weight: 700; }

/* ---------- directos ---------- */
.player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); }
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-wrap.cine { aspect-ratio: 21/9; }
.platforms { display: grid; gap: 10px; }
.platform { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.platform h4 { margin: 0; font: 600 16px var(--font-head); display: flex; gap: 8px; align-items: center; }
.platform p { margin: 0; color: var(--text-2); font-size: 12.5px; grid-column: 1 / -1; }
.platform .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid label, .field { display: grid; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex !important; grid-auto-flow: column; align-items: center; gap: 8px !important; color: var(--text) !important; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.video { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: pointer; transition: border-color .15s; }
.video:hover { border-color: var(--blue); }
.video img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.video div { padding: 8px 10px; font-size: 12.5px; }
.video small { color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(2,5,12,.72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-back[hidden] { display: none; }
.modal { position: relative; width: min(920px, 100%); max-height: 90vh; overflow: auto; background: linear-gradient(180deg, #0f1a30, #0a1120); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px; box-shadow: 0 0 60px rgba(37,99,235,.25), var(--shadow); }
.modal-close { position: absolute; top: 12px; right: 12px; background: var(--bg-2); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; }
.modal-close:hover { border-color: var(--blue); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #10203f; border: 1px solid var(--blue); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.progress { height: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .2s; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .qf { grid-template-columns: 1fr; } .topbar { flex-wrap: wrap; } .clocks { display: none; } }

/* ================= v2: datos oficiales, cuadros, favoritos ================= */
.match.is-fav { border-color: #8a6d1f; box-shadow: inset 3px 0 0 var(--gold); }
.match.is-live.is-fav { border-color: #b45309; }
.team .names a.pl, .team .names .pl { color: var(--text); }
.team .names a.pl:hover { color: var(--cyan); text-decoration: none; }
.favname { color: var(--gold) !important; }
.team .score { display: inline-flex; gap: 10px; align-items: baseline; }
.set-n { min-width: 12px; text-align: center; }
.set-n sup { font-size: 9px; color: var(--muted); margin-left: 1px; }
.pts { margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: rgba(239,68,68,.18); color: #fecaca; font-size: 13px; }
.serve { color: var(--gold); font-size: 10px; }
.flag + .flag { margin-left: 2px; }
.av.fav { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245,196,81,.4); }

.daybar { margin-bottom: 16px; flex-wrap: wrap; }
.courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.courts .court .match { grid-template-columns: 78px 1fr auto; padding: 10px 12px; }
.courts .court .match-time { font-size: 18px; }
@media (max-width: 900px) { .courts { grid-template-columns: 1fr; } }

/* estrella favoritos */
.star { background: rgba(6,10,19,.7); border: 1px solid var(--line-strong); color: var(--text-2); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 17px; line-height: 1; display: inline-grid; place-items: center; }
.star:hover { border-color: var(--gold); color: var(--gold); }
.star.on { color: var(--gold); border-color: #8a6d1f; background: rgba(245,196,81,.12); }
.star.big { width: 40px; height: 40px; font-size: 22px; }
.pcard-star { position: absolute; bottom: 10px; right: 10px; }
.pcard.is-fav { border-color: #8a6d1f; }
.favs { display: flex; flex-wrap: wrap; gap: 8px; }
.favchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid #8a6d1f; background: rgba(245,196,81,.06); color: var(--text); }
.favchip:hover { text-decoration: none; border-color: var(--gold); }
.favchip .av { width: 28px; height: 28px; }

/* cuadros */
.bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; align-items: stretch; }
.bround { min-width: 250px; flex: 1 0 250px; display: flex; flex-direction: column; }
.bround-title { font: 600 13px var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); padding: 0 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; position: sticky; top: 0; }
.bround-list { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.bm { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.bm.live { border-color: #7f1d1d; }
.bm.is-fav { border-color: #8a6d1f; box-shadow: inset 3px 0 0 var(--gold); }
.bt { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12.5px; min-height: 34px; }
.bt + .bt { border-top: 1px solid var(--line); }
.bt .bn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.bt .bn a { color: inherit; }
.bt.win .bn, .bt.win .bn a { color: #fff; font-weight: 600; }
.bt .seed { color: var(--muted); font-size: 11px; }
.bt .bs { display: inline-flex; gap: 8px; font: 600 13px var(--font-head); color: var(--text-2); }
.bt.win .bs { color: var(--cyan); }
.bt .bs sup { font-size: 8px; color: var(--muted); }
.av-stack.small .av { width: 22px; height: 22px; font-size: 9px; }
.av-stack.small .av + .av { margin-left: -7px; }
.blive { position: absolute; top: 4px; right: 6px; font-size: 9.5px; font-weight: 700; color: #fecaca; display: flex; align-items: center; gap: 4px; }
.blive .dot { width: 6px; height: 6px; }
.champion { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; background: linear-gradient(90deg, rgba(245,196,81,.12), var(--bg-2) 60%); border-color: #8a6d1f; }
.trophy { font-size: 40px; filter: drop-shadow(0 0 12px rgba(245,196,81,.5)); }
.champ-names { font: 600 20px var(--font-head); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.champ-names a { color: #fff; display: inline-flex; gap: 8px; align-items: center; }

/* tarjetas dentro de las columnas por pista: datos debajo para dejar sitio a los nombres */
.courts .court .match { grid-template-columns: 64px 1fr; row-gap: 8px; }
.courts .court .match-meta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 8px; }
.courts .court .team .names { white-space: normal; line-height: 1.25; }
.courts .court .match-time { font-size: 17px; }
.courts { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }

/* directos por pista (YouTube) */
.court-streams { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.court-stream { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); transition: border-color .15s, transform .15s; }
.court-stream:hover { border-color: var(--blue); transform: translateY(-2px); }
.court-stream.on { border-color: #7f1d1d; box-shadow: 0 0 18px rgba(239,68,68,.15); }
.cs-thumb { position: relative; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.cs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.cs-thumb:hover img { opacity: 1; }
.cs-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.cs-body { padding: 10px 12px 12px; }
.cs-body b { font: 600 16px var(--font-head); }

/* ================= v2.1: datos sin actualizar y pantallas estrechas ================= */
.dot.gray { background: var(--muted); animation: none; }
.stale-note { color: var(--gold); font-weight: 600; }
.tgrid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.toolbar .input { max-width: 100%; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; white-space: nowrap; }

@media (max-width: 900px) {
  .tabs { overflow-x: auto; scrollbar-width: none; padding-left: 12px; padding-right: 12px; }
  .tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .tab { flex: none; top: 0; padding: 10px 14px; }
}
@media (max-width: 640px) {
  main { padding: 14px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar-live { flex-basis: 100%; justify-content: flex-start; min-width: 0; }
  .live-pill { max-width: 100%; text-align: left; }
  .hero { padding: 18px 16px; }
  .hero-name { font-size: 27px; }
  .card { padding: 14px; }
  .modal-back { padding: 8px; }
  .modal { padding: 18px 14px; max-height: 96vh; }
  .match, .courts .court .match { grid-template-columns: 64px minmax(0, 1fr); row-gap: 8px; }
  .match-time { font-size: 17px; }
  .match-meta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 8px; }
  .team .names { white-space: normal; line-height: 1.25; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  #pq { width: 100% !important; }
}

/* ================= v2.2: navegación por secciones y pantalla Hoy ================= */
:root { --muted: #9fadc2; }
.topbar { flex-wrap: nowrap; gap: 18px; padding: 10px 22px; }
.brand { flex: none; }
.brand-logo { width: 34px; height: 34px; }
.brand-title { font-size: 19px; white-space: nowrap; }
.topbar .tabs { display: flex; flex: none; gap: 4px; padding: 0; background: none; border: 0; overflow: visible; }
.topbar .tab { display: inline-flex; align-items: center; gap: 7px; flex: none; top: 0; border: 0; border-radius: 8px; padding: 10px 14px; min-height: 44px; }
.topbar .tab.active { color: #fff; background: #1b2940; border: 0; box-shadow: none; }
.tab svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.topbar-live { min-width: 0; justify-content: flex-end; }
.live-pill { max-width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; }
.live-pill .sub { overflow: hidden; text-overflow: ellipsis; }
.clocks { flex: none; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); cursor: pointer; }
.icon-btn:hover, .icon-btn.active { color: #fff; background: #1b2940; border-color: var(--line-strong); }
.subtabs { display: flex; gap: 4px; padding: 6px 22px; background: #080e1b; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs[hidden] { display: none; }
.subtabs button { flex: none; min-height: 40px; padding: 8px 14px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; cursor: pointer; }
.subtabs button:hover { color: #fff; }
.subtabs button.on { color: #fff; border-bottom-color: var(--blue); }
.tab:focus-visible, .icon-btn:focus-visible, .subtabs button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.modal-prev { position: sticky; top: 0; z-index: 2; margin: -8px 0 12px; padding: 8px 12px; min-height: 36px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; }
.modal-prev[hidden] { display: none; }
.modal-prev:hover { border-color: var(--blue); }

/* cabecera y días de Hoy */
.today-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; margin-bottom: 16px; }
.today-kicker { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.today-name { display: flex; align-items: center; gap: 12px; margin: 2px 0 0; font: 700 36px/1.05 var(--font-head); }
.today-meta { color: var(--text-2); margin-top: 4px; }
.day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(82px, 1fr); gap: 6px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-cell { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.day-cell b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.day-cell small { font-size: 11.5px; }
.day-cell.past { opacity: .6; }
.day-cell.today { border-color: #8db8ff; background: #1f3863; color: #fff; }
.day-cell.today b { color: #fff; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.today-col { display: grid; gap: 22px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-head h2 { margin: 0; font: 600 21px/1.2 var(--font-head); }
.fav-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); }
.fav-row:hover { text-decoration: none; color: var(--cyan); }
.fav-row b { display: block; font-weight: 600; }
.fav-row small { display: block; min-height: 1.3em; color: var(--text-2); font-size: 12.5px; }

/* tarjeta de partido oficial */
.mc { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); overflow: hidden; }
.mc + .mc { margin-top: 10px; }
.mc.is-live { border-color: #7f1d1d; }
.mc.is-fav { border-color: #8a6d1f; box-shadow: inset 3px 0 0 var(--gold); }
.mc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; }
.mc-time { color: var(--text); font: 600 16px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.mc-action { margin-left: auto; }
.mc-body { display: grid; gap: 7px; padding: 10px 12px; }
.mc .team .names { white-space: normal; line-height: 1.25; }
.mc .team .score { flex: none; font-size: 18px; font-variant-numeric: tabular-nums; }
.mc .set-n { min-width: 16px; }
.mc .team:not(.win) .score { color: var(--text-2); }
.mc .team.win .score { color: #fff; }

@media (max-width: 1240px) { .topbar-live { display: none; } .topbar .clocks { margin-left: auto; } }
@media (max-width: 1000px) { .topbar .clocks { display: none; } .icon-btn { margin-left: auto; } .today-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px; }
  .topbar-live { display: flex; order: 3; flex: 1 0 100%; justify-content: flex-start; }
  .topbar .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); background: #101929; border-top: 1px solid var(--line); overflow: visible; }
  .topbar .tab { flex-direction: column; justify-content: center; gap: 3px; min-height: 50px; padding: 4px 2px; font-size: 11px; }
  .topbar .tab.active { color: #8db8ff; background: transparent; }
  .tab svg { width: 21px; height: 21px; }
  .subtabs { padding: 4px 10px; }
  main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 24px); }
  .today-name { font-size: 29px; }
  .day-strip { grid-auto-columns: 78px; margin-right: -14px; }
  .card-head { flex-wrap: wrap; }
  .platform { grid-template-columns: minmax(0, 1fr); }
  table.tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 7px 5px; }
}
.grid > * { min-width: 0; }
@media (max-width: 1100px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }

/* ================= v2.7: estado de las fuentes ================= */
.src-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid #8a6d1f; border-radius: 10px; background: rgba(245, 196, 81, .09); }
.src-notice span { color: #d7dee9; font-size: 13px; }
.src-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #24314a; }
.src-row small { display: block; color: #9fadc2; font-size: 12px; }

/* ================= v2.3: rediseño sobrio ================= */
[hidden] { display: none !important; }
:root {
  --bg: #0b1220; --bg-2: #111a2b; --panel: #131d30; --panel-2: #1b2940;
  --line: #24314a; --line-strong: #34466a;
  --blue: #4c8dff; --blue-2: #2f6fe4; --blue-soft: rgba(76, 141, 255, .16); --cyan: #8db8ff;
  --text: #eef2f8; --text-2: #b4c0d3; --muted: #9fadc2;
  --live: #ff6b5e; --gold: #f5c451; --radius: 12px; --shadow: none;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-head: "Bahnschrift", "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
body { background: var(--bg); }
.topbar, .subtabs { background: var(--bg); }
.brand-logo { filter: none; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.card, .card.accent { background: var(--panel); border-color: var(--line); box-shadow: none; }
.card-title { font: 600 18px/1.2 var(--font-head); letter-spacing: 0; text-transform: none; color: var(--text); }
.card-title::before { display: none; }
.section-title { font: 700 30px/1.1 var(--font-head); letter-spacing: 0; }
.section-sub { color: var(--text-2); }
.empty { border-color: var(--line); color: var(--text-2); }

.btn { background: transparent; border-color: var(--line-strong); border-radius: 8px; min-height: 38px; }
.btn.small { min-height: 32px; }
.btn:hover { background: var(--panel-2); border-color: var(--line-strong); }
.btn.primary { background: var(--blue-2); border-color: var(--blue-2); }
.btn.primary:hover { background: #3f7cec; border-color: #3f7cec; filter: none; }
.btn.danger { border-color: #8a3a35; color: #ffb4ad; }
.btn.danger-solid { background: #b93a30; border-color: #b93a30; color: #fff; }
.seg { border-color: var(--line-strong); border-radius: 8px; }
.seg button { min-height: 38px; }
.seg button.on { background: var(--panel-2); color: #fff; box-shadow: inset 0 -2px 0 var(--blue); }
.input, select.input { border-radius: 8px; min-height: 38px; }
.badge { background: transparent; border-color: var(--line-strong); }
.badge.cat-Finals { background: var(--panel-2); }
.badge.live { color: #ffb4ad; border-color: #8a3a35; background: rgba(255, 107, 94, .1); }
.live-pill { background: var(--panel); border-color: var(--line); }
.clock { background: transparent; border-color: var(--line); border-radius: 8px; }
.dot { background: var(--live); }

.mc, .match { background: var(--panel); }
.match.is-live { background: var(--panel); border-color: #8a3a35; }
.mc.is-live { border-color: #8a3a35; }
.mc .team .score { color: var(--text-2); }

.pcard, .tcard, .video, .court-stream, .platform, .stat, .bm { background: var(--panel); }
.pcard:hover, .tcard:hover, .court-stream:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.video:hover { border-color: var(--line-strong); }
.pcard-photo { background: var(--panel-2); }
.pcard-rank { background: rgba(11, 18, 32, .85); border-color: var(--line-strong); }
.pala { background: var(--bg-2); border-color: var(--line); border-radius: 8px; }
.pala-brand { color: var(--cyan); }
.tcard.now { border-color: var(--cyan); box-shadow: none; }
.tcard-dates .ico { width: 14px; height: 14px; }
.month-title { color: var(--text-2); }
.court-stream.on { border-color: #8a3a35; box-shadow: none; }
.cs-play { text-shadow: none; }
.cs-play .ico { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(11, 18, 32, .75); fill: #fff; stroke: none; }
.ficha-photo { background: var(--panel-2); border-color: var(--line); }
.modal { background: var(--panel); border-color: var(--line-strong); border-radius: 14px; box-shadow: none; }
.modal-back { background: rgba(5, 9, 17, .78); backdrop-filter: none; }
.modal-close { background: var(--bg-2); border-radius: 8px; }
.toast { background: var(--panel-2); border-color: var(--line-strong); border-radius: 8px; }
.progress > div { background: var(--blue); }
.champion { background: var(--panel); border-color: #8a6d1f; }
.trophy { font-size: 0; filter: none; color: var(--gold); }
.trophy .ico { width: 34px; height: 34px; }

.star { background: rgba(11, 18, 32, .8); border-radius: 8px; }
.star.on { background: rgba(245, 196, 81, .14); }
.star.on .ico { fill: currentColor; }
.star.big .ico { width: 20px; height: 20px; }

/* carga */
.skel { height: 92px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
.skel + .skel { margin-top: 10px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, .dot, .view { animation: none; } }

/* opciones avanzadas */
details.adv { margin-top: 18px; }
details.adv > summary { min-height: 28px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); font-weight: 600; list-style: none; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "›"; font-size: 18px; line-height: 1; transition: transform .15s; }
details.adv[open] > summary::before { transform: rotate(90deg); }
details.adv > summary:hover { color: #fff; }
details.adv > .adv-body { margin-top: 12px; }

/* diálogos */
.dlg { width: min(420px, calc(100vw - 32px)); padding: 20px; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; }
.dlg::backdrop { background: rgba(5, 9, 17, .78); }
.dlg h3 { margin: 0 0 6px; font: 600 20px/1.2 var(--font-head); }
.dlg p { margin: 0 0 14px; color: var(--text-2); }
.dlg p:empty { display: none; }
.dlg .input { width: 100%; margin-bottom: 14px; }
.dlg-actions { display: flex; flex-direction: row-reverse; gap: 8px; }

/* orden de juego y cuadros */
.daybar { display: flex; flex-wrap: nowrap; width: 100%; }
.daybar button { flex: 1 0 auto; }
.bracket { gap: 18px; padding-right: 2px; }
.bround-title { color: var(--text-2); letter-spacing: .06em; border-bottom-color: var(--line); }
.bround-list { gap: 0; }
.bpair { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; padding: 5px 0; }
.bround:not(:last-child) .bpair:not(.single)::after { content: ""; position: absolute; right: -9px; top: 25%; bottom: 25%; width: 9px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 6px 6px 0; }
.bround:not(:last-child) .bpair::before { content: ""; position: absolute; right: -18px; top: 50%; width: 9px; border-top: 1px solid var(--line-strong); }
.bround:not(:last-child) .bpair.single::before { right: -18px; width: 18px; }
.bround-pick { display: none; margin-bottom: 12px; width: 100%; }
.bround-pick button { flex: 1 0 auto; }

@media (max-width: 760px) {
  .section-title { font-size: 26px; }
  .bround-pick { display: flex; }
  .bracket { display: block; overflow: visible; }
  .bround { display: none; min-width: 0; }
  .bround.on { display: flex; }
  .bround-title { display: none; }
  .bpair::before, .bpair::after { display: none !important; }
  .bpair { padding: 0 0 10px; }
}
