/* =========================================================
   Portal público — Torneos de Fútbol
   Mobile-first. Paleta: azul marino + verde cancha + dorado.
   ========================================================= */
:root {
    --navy-950: #06111F;
    --navy-900: #0B1D33;
    --navy-800: #102A4A;
    --navy-700: #17385F;
    --pitch:    #0F9D58;
    --pitch-dk: #0B7A45;
    --gold:     #F4B400;
    --gold-soft:#FFF6D6;

    --bg:       #F2F4F8;
    --surface:  #FFFFFF;
    --surface-2:#F7F9FC;
    --line:     #E3E8EF;
    --text:     #0F1B2D;
    --text-2:   #475569;
    --muted:    #8391A7;

    --win:  #16A34A;
    --draw: #94A3B8;
    --loss: #DC2626;
    --zone-top:  #16A34A;
    --zone-mid:  #F59E0B;
    --zone-out:  #DC2626;

    --radius:   14px;
    --radius-sm:10px;
    --shadow:   0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
    --shadow-lg:0 12px 40px rgba(6, 17, 31, .25);

    --font:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-disp: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
    --gutter: 16px;
    --maxw: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: var(--navy-900);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar .wrap { display: flex; align-items: center; gap: 10px; height: 56px; }
.topbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { display: block; font-size: .7rem; font-weight: 500; color: rgba(255,255,255,.55); letter-spacing: .04em; text-transform: uppercase; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--pitch), var(--pitch-dk));
    font-size: 1.3rem; color: #fff;
}
.icon-btn {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    color: rgba(255,255,255,.85); font-size: 1.35rem;
    background: rgba(255,255,255,.06); border: 0; cursor: pointer;
}
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(15,157,88,.35) 0%, transparent 55%),
        linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
    color: #fff;
    padding: 20px 0 64px;
    position: relative;
    overflow: hidden;
}
.hero::after { /* líneas de cancha sutiles */
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.06);
    box-shadow: 0 0 0 40px rgba(255,255,255,.02);
    pointer-events: none;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--gold);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pitch); box-shadow: 0 0 0 3px rgba(15,157,88,.3); }
.hero h1 {
    font-family: var(--font-disp);
    font-weight: 700; font-size: 2rem; line-height: 1.05;
    margin: 8px 0 6px; letter-spacing: .01em; text-transform: uppercase;
}
.hero p { margin: 0; color: rgba(255,255,255,.7); font-size: .9rem; max-width: 560px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .8rem; color: rgba(255,255,255,.7); }
.hero-meta i { color: var(--gold); margin-right: 4px; vertical-align: -2px; }

.kpis {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    margin-top: -44px; position: relative; z-index: 2;
    background: var(--line); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}
.kpi { background: var(--surface); padding: 12px 8px; text-align: center; }
.kpi b { display: block; font-family: var(--font-disp); font-size: 1.6rem; line-height: 1; color: var(--navy-900); }
.kpi span { display: block; margin-top: 4px; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.progress { grid-column: 1 / -1; background: var(--surface); padding: 0 12px 12px; }
.progress-track { height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--pitch), var(--gold)); border-radius: 99px; }
.progress-lbl { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- Tabs ---------- */
.tabs-bar {
    position: sticky; top: 56px; z-index: 30;
    background: rgba(242,244,248,.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    padding: 12px 0 10px;
}
.tabs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: #E2E7EF; border-radius: 12px; padding: 4px; gap: 4px;
}
.tab {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; border-radius: 9px;
    font-size: .85rem; font-weight: 600; color: var(--text-2);
    position: relative;
}
.tab i { font-size: 1.1rem; }
.tab.is-active { background: var(--surface); color: var(--navy-900); box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.tab .pill { position: absolute; top: 4px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--loss); color: #fff; font-size: .62rem; display: grid; place-items: center; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin-top: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0; padding: 7px 14px; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: .8rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

main { padding: 6px 0 32px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 14px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.card-head .sub { font-size: .75rem; color: var(--muted); }
.section-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin: 22px 2px 10px;
}
.section-title h2 { margin: 0; font-family: var(--font-disp); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--navy-900); }
.section-title span { font-size: .75rem; color: var(--muted); font-weight: 600; }

/* ---------- Crest ---------- */
.crest {
    --crest: var(--navy-700);
    width: 28px; height: 28px; flex-shrink: 0;
    display: inline-grid; place-items: center;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--crest), color-mix(in srgb, var(--crest) 70%, #000));
    color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .02em;
    object-fit: cover;
}
img.crest { background: var(--surface-2); border: 1px solid var(--line); }
.crest-md { width: 40px; height: 40px; border-radius: 11px; font-size: .9rem; }
.crest-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.25rem; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* ---------- Tabla de posiciones ---------- */
.standings { width: 100%; border-collapse: collapse; font-size: .85rem; }
.standings th {
    padding: 10px 4px; font-size: .66rem; font-weight: 700; letter-spacing: .05em;
    color: var(--muted); text-transform: uppercase; text-align: center;
    background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.standings th.t-team { text-align: left; padding-left: 8px; }
.standings td { padding: 10px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.standings tr:last-child td { border-bottom: 0; }
.standings td.t-pos { font-weight: 700; color: var(--text-2); }
.standings td.t-pos::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.standings tr.z-top  td.t-pos::before { background: var(--zone-top); }
.standings tr.z-mid  td.t-pos::before { background: var(--zone-mid); }
.standings tr.z-out  td.t-pos::before { background: var(--zone-out); }
.standings td.t-team { text-align: left; padding-left: 8px; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standings td.t-pts { font-weight: 800; font-size: .95rem; color: var(--navy-900); width: 44px; }
.standings .t-x { display: none; }

/* Todas las columnas en móvil: desplazamiento horizontal con # y Equipo fijos */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .standings { min-width: 520px; }
.standings th, .standings td { white-space: nowrap; }
.standings td:not(.t-team), .standings th:not(.t-team) { min-width: 32px; }
.standings .t-pos, .standings .t-team { position: sticky; z-index: 1; background: var(--surface); }
.standings th.t-pos, .standings th.t-team { background: var(--surface-2); }
.standings .t-pos { left: 0; width: 34px; min-width: 34px; }
.standings .t-team { left: 34px; max-width: 150px; box-shadow: 6px 0 8px -8px rgba(15,27,45,.35); }
.standings .team-cell b { max-width: 104px; }
.standings th.t-pts { color: var(--navy-900); }
.standings td.t-pts, .standings th.t-pts { background: #EEF3FA; }
.glossary { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; font-size: .7rem; color: var(--muted); border-top: 1px solid var(--line); }
.glossary b { color: var(--text-2); margin-right: 2px; }
.standings .dg-pos { color: var(--win); font-weight: 600; }
.standings .dg-neg { color: var(--loss); font-weight: 600; }
.form { display: inline-flex; gap: 3px; }
.form i { width: 16px; height: 16px; border-radius: 4px; font-style: normal; font-size: .58rem; font-weight: 800; color: #fff; display: grid; place-items: center; }
.form .W { background: var(--win); } .form .D { background: var(--draw); } .form .L { background: var(--loss); }
.form .N { background: var(--line); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; font-size: .72rem; color: var(--text-2); border-top: 1px solid var(--line); background: var(--surface-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Partidos ---------- */
.day-group + .day-group { border-top: 1px solid var(--line); }
.day-label {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: var(--surface-2);
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2);
}
.day-label.is-today { color: var(--pitch-dk); }
.day-label.is-today::after { content: "HOY"; background: var(--pitch); color: #fff; padding: 2px 8px; border-radius: 99px; font-size: .62rem; }

.match {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
    padding: 12px 12px; width: 100%;
    background: none; border: 0; border-top: 1px solid var(--line);
    text-align: left; cursor: pointer;
}
.day-label + .match { border-top: 0; }
.match:hover, .match:focus-visible { background: #FAFBFD; outline: none; }
.match .side { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: .88rem; }
.match .side .nm {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.2; overflow-wrap: anywhere;
}
.match .side .crest { width: 26px; height: 26px; font-size: .62rem; }
.match .side.right { flex-direction: row-reverse; text-align: right; }
.match .side.is-winner span { color: var(--navy-900); font-weight: 800; }
.match .side.is-loser span { color: var(--muted); }
.match .mid { min-width: 58px; text-align: center; }
.score {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-disp); font-weight: 700; font-size: 1.3rem; line-height: 1;
    background: var(--navy-900); color: #fff; padding: 6px 10px; border-radius: 8px;
}
.score em { font-style: normal; opacity: .45; font-size: 1rem; }
.kick { display: inline-block; font-weight: 700; font-size: .85rem; color: var(--navy-900); background: var(--gold-soft); border: 1px solid #F6E3A1; padding: 5px 9px; border-radius: 8px; }
.status-tag { display: block; margin-top: 4px; font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status-tag.hora { color: var(--text-2); font-weight: 600; letter-spacing: .02em; }
.match-card .status-tag.hora { margin-top: 6px; }
.status-tag.live { color: var(--loss); }
.status-tag.off  { color: var(--loss); }

/* Tarjeta grande de partido (Hoy) */
.match-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.match-card + .match-card { margin-top: 12px; }
.match-card .mc-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: .72rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.match-card .mc-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 18px 12px; text-align: center; }
.match-card .mc-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.match-card .mc-team b { font-size: .9rem; line-height: 1.2; overflow-wrap: anywhere; }
.match-card .mc-mid .score { font-size: 1.9rem; padding: 8px 14px; }
.match-card .mc-mid .kick { font-size: 1.05rem; padding: 8px 12px; }
.match-card .mc-foot { display: flex; }
.match-card .mc-foot button {
    flex: 1; border: 0; border-top: 1px solid var(--line); background: var(--surface-2);
    padding: 12px; font-weight: 600; font-size: .85rem; color: var(--navy-800); cursor: pointer;
    display: inline-flex; justify-content: center; align-items: center; gap: 6px;
}
.match-card .mc-foot button:hover { background: #EEF2F8; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; font-size: .66rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-done  { background: #E7F6EE; color: var(--pitch-dk); }
.badge-sched { background: #E8EEF8; color: var(--navy-700); }
.badge-live  { background: #FDECEC; color: var(--loss); }
.badge-off   { background: #F1F5F9; color: var(--text-2); }

/* Filtro de equipo */
.filter { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
.select {
    flex: 1; appearance: none; -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 11px 36px 11px 14px; font: inherit; font-size: .9rem; color: var(--text);
}
.select:focus { outline: 2px solid var(--pitch); outline-offset: 1px; }

.week { scroll-margin-top: 170px; }
.week-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    margin: 20px 2px 8px;
}
.week-head h3 { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--navy-900); }
.week-head span { font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.week.is-current .week-head h3 { color: var(--pitch-dk); }

/* Tira de días (Hoy) */
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; margin: 4px 0 8px; scroll-snap-type: x proximity; }
.days::-webkit-scrollbar { display: none; }
.day {
    flex-shrink: 0; width: 58px; padding: 8px 0; border-radius: 12px; text-align: center;
    background: var(--surface); border: 1px solid var(--line); scroll-snap-align: center;
}
.day small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.day b { display: block; font-family: var(--font-disp); font-size: 1.35rem; line-height: 1.1; color: var(--navy-900); }
.day em { display: block; font-style: normal; font-size: .6rem; color: var(--muted); text-transform: uppercase; }
.day.is-today { border-color: var(--pitch); }
.day.is-past b { color: var(--text-2); }
.day.is-active { background: var(--navy-900); border-color: var(--navy-900); }
.day.is-active small, .day.is-active em { color: rgba(255,255,255,.6); }
.day.is-active b { color: #fff; }

/* Estado vacío */
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty i { font-size: 2.6rem; color: var(--muted); }
.empty h3 { margin: 8px 0 4px; font-size: 1rem; color: var(--text); }
.empty p { margin: 0 auto 14px; max-width: 360px; font-size: .85rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 18px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
    font-weight: 700; font-size: .88rem;
    background: var(--navy-900); color: #fff;
}
.btn:hover { background: var(--navy-800); }
.btn-ghost { background: var(--surface-2); color: var(--navy-800); border: 1px solid var(--line); }
.btn-ghost:hover { background: #EEF2F8; }
.btn-block { display: flex; width: 100%; }

/* ---------- Próximo partido destacado ---------- */
.next-match { margin-top: 14px; }
.next-match .mc-top { background: var(--navy-900); color: rgba(255,255,255,.75); border-bottom: 0; }
.next-match .mc-top b { color: var(--gold); }

/* ---------- Hoja inferior (ficha) ---------- */
.sheet {
    border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
    max-height: 92vh; border-radius: 20px 20px 0 0;
    background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-lg);
}
.sheet::backdrop { background: rgba(6,17,31,.55); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 10px auto 0; }
.sheet-loading { padding: 48px 20px; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--pitch); animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contenido de la ficha */
.fx-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 0; }
.fx-head .fx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-close { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--surface-2); font-size: 1.3rem; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.fx-score {
    margin: 12px 16px 0; padding: 18px 10px; border-radius: var(--radius);
    background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: #fff;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 6px;
}
.fx-score .mc-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.fx-score .mc-team b { font-size: .92rem; line-height: 1.2; overflow-wrap: anywhere; }
.fx-score .score { background: rgba(255,255,255,.1); font-size: 2.2rem; padding: 8px 14px; }
.fx-score .kick { font-size: 1.1rem; }
.fx-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 12px 16px; font-size: .8rem; color: var(--text-2); }
.fx-meta i { color: var(--pitch); vertical-align: -2px; margin-right: 3px; }
.fx-body { padding: 0 16px 16px; }
.fx-block { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.fx-block + .fx-block { margin-top: 12px; }
.fx-block h4 { margin: 0; padding: 10px 12px; font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--text-2); }
.fx-cols { display: grid; grid-template-columns: 1fr 1fr; }
.fx-cols > div { padding: 10px 12px; font-size: .85rem; }
.fx-cols > div + div { border-left: 1px solid var(--line); text-align: right; }
.fx-cols ul { list-style: none; margin: 0; padding: 0; }
.fx-cols li { padding: 3px 0; }
.fx-cols .none { color: var(--muted); font-size: .8rem; }
.fx-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--gold-soft); font-size: .82rem; color: #6B4E00; }
.fx-foot { display: flex; gap: 8px; padding: 0 16px 16px; }
.fx-foot > * { flex: 1; }
.yc, .rc { display: inline-block; width: 10px; height: 14px; border-radius: 2px; vertical-align: -2px; margin: 0 4px; }
.yc { background: #FACC15; } .rc { background: var(--loss); }

/* ---------- Portada (lista de torneos) ---------- */
.t-card { display: block; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.t-card + .t-card { margin-top: 14px; }
.t-card-top { padding: 16px; display: flex; gap: 14px; align-items: center; }
.t-card-logo { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); color: var(--gold); font-size: 1.6rem; overflow: hidden; }
.t-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.t-card h3 { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.25; }
.t-card p { margin: 0; padding: 0 16px 14px; font-size: .85rem; color: var(--text-2); }
.t-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.t-card-stats div { padding: 10px 6px; text-align: center; }
.t-card-stats div + div { border-left: 1px solid var(--line); }
.t-card-stats b { display: block; font-family: var(--font-disp); font-size: 1.3rem; color: var(--navy-900); line-height: 1; }
.t-card-stats span { font-size: .65rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.t-card-cta { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; background: var(--navy-900); color: #fff; font-weight: 700; font-size: .88rem; }
.t-card-cta i { font-size: 1.3rem; color: var(--gold); transition: transform .15s; }
.t-card:hover .t-card-cta i { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer { padding: 24px 0 32px; text-align: center; font-size: .75rem; color: var(--muted); }
.footer a { color: var(--text-2); font-weight: 600; }

/* ---------- Página completa de partido ---------- */
.page-sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 16px; }


/* ---------- Ficha de equipo ---------- */
.standings tr.is-clickable { cursor: pointer; }
.standings tr.is-clickable:hover td, .standings tr.is-clickable:focus-visible td { background: #F4F7FC; }
.standings tr.is-clickable:focus-visible { outline: none; }
.fx-score [data-team] { cursor: pointer; border-radius: 12px; padding: 4px; }
.fx-score [data-team]:hover { background: rgba(255,255,255,.06); }

.tm-hero {
    display: flex; align-items: center; gap: 14px;
    margin: 12px 16px 12px; padding: 16px; border-radius: var(--radius);
    background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: #fff;
}
.tm-hero-txt { display: flex; flex-direction: column; min-width: 0; }
.tm-hero h3 { margin: 0 0 2px; font-family: var(--font-disp); font-size: 1.6rem; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.tm-hero span { font-size: .82rem; color: rgba(255,255,255,.75); }
.tm-hero b { color: var(--gold); }
.tm-hero .form b { color: inherit; }

.tm-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
    margin-bottom: 12px;
}
.tm-stats div { background: var(--surface); padding: 10px 4px; text-align: center; }
.tm-stats b { display: block; font-family: var(--font-disp); font-size: 1.35rem; line-height: 1.1; color: var(--navy-900); white-space: nowrap; }
.tm-stats b .yc, .tm-stats b .rc { margin: 0 3px 0 0; }
.tm-stats span { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.tm-list { list-style: none; margin: 0; padding: 0; }
.tm-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: .88rem; }
.tm-list li + li { border-top: 1px solid var(--line); }
.tm-list li b { font-family: var(--font-disp); font-size: 1.15rem; color: var(--navy-900); }
.tm-list li small { color: var(--muted); font-size: .72rem; }
.tm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tm-cards { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.tm-none { padding: 12px; font-size: .84rem; color: var(--muted); }
.tm-date { display: flex; align-items: center; gap: 6px; padding: 8px 12px 0; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); }
.fx-block h4 + .tm-date { border-top: 0; }
.tm-date + .match { border-top: 0; padding-top: 6px; }
.fx-block .match { padding-left: 12px; padding-right: 12px; }

/* ---------- Fase final (cuadro público) ---------- */
.champion { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(135deg, #FFF3C4, #FFE08A); color: #5C4300; box-shadow: var(--shadow); }
.champion i { font-size: 2.4rem; color: #B7791F; }
.champion small { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.champion b { font-family: var(--font-disp); font-size: 1.6rem; line-height: 1.1; text-transform: uppercase; }
.bracket-title { display: flex; align-items: center; gap: 8px; margin: 28px 2px 0; padding-bottom: 8px; border-bottom: 2px solid var(--navy-900); font-family: var(--font-disp); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; color: var(--navy-900); }
.bracket-title i { color: var(--pitch); }
.bracket-title.is-liguilla { border-color: #D97706; }
.bracket-title.is-liguilla i { color: #D97706; }
.champion.is-liguilla { background: linear-gradient(135deg, #EEF2F7, #DCE3EC); color: var(--navy-800); }
.champion.is-liguilla i { color: #64748B; }
.bracket-title small { margin-left: auto; font-family: var(--font); font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.proyeccion-nota { margin: 4px 2px 0; font-size: .8rem; color: var(--text-2); }
.proyeccion-nota i { color: var(--loss); vertical-align: -2px; }
.match.proyectado { cursor: default; }
.match.proyectado:hover { background: none; }
.match.proyectado .kick { background: var(--surface-2); border-color: var(--line); color: var(--muted); text-transform: uppercase; font-size: .72rem; }
.seed { display: inline-block; min-width: 24px; font-size: .68rem; font-weight: 800; color: var(--muted); }
.llave-pub + .llave-pub, .llave-pub + .match, .match + .llave-pub { border-top: 1px solid var(--line); }
.llave-pub.doble .match { border-top: 0; padding-top: 4px; padding-bottom: 8px; }
.llave-pub .pierna { padding: 8px 14px 0; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.llave-pub .global { padding: 8px 14px 10px; font-size: .78rem; color: var(--text-2); background: var(--surface-2); border-top: 1px dashed var(--line); }
.llave-pub .global b { color: var(--navy-900); }
.match.bye { cursor: default; }
.match.bye:hover { background: none; }

/* ---------- Proyección de fase final: posiciones, no equipos ---------- */
.tag-proyeccion { background: var(--gold-soft); color: #8A6400 !important; border: 1px dashed #E7C65A; padding: 2px 8px; border-radius: 99px; font-size: .66rem !important; letter-spacing: .06em; text-transform: uppercase; }
.card-proyeccion { border: 1px dashed var(--line); box-shadow: none; background: var(--surface); }
.proy-cruce { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 14px; }
.proy-cruce + .proy-cruce { border-top: 1px dashed var(--line); }
.proy-lado { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.proy-pos { font-family: var(--font-disp); font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--navy-900); }
.proy-eq { margin-top: 3px; font-size: .68rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proy-vs { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.proyeccion-nota i { color: var(--navy-700); }
.proyeccion-nota .proy-x { color: var(--loss); }
.proyeccion-nota small { color: var(--muted); }
/* ---------- Goleadores (podio + lista) ---------- */
.goleadores-card { padding-top: 18px; }
.podio-pub { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; padding: 14px 14px 0; }
.podio-pub .podio-lugar { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.podio-pub .podio-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; text-align: center; margin-bottom: 8px; }
.podio-pub .podio-corona { position: absolute; top: -20px; font-size: 1.25rem; color: var(--gold); }
.pod-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #E8EEF8; color: var(--navy-700); font-size: 1.4rem; }
.podio-pub .lugar-1 .pod-icon { width: 54px; height: 54px; font-size: 1.7rem; background: var(--gold-soft); color: #9A6B00; }
.podio-pub .podio-nombre { font-size: .82rem; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.podio-goles { font-family: var(--font-disp); font-size: 1.3rem; font-weight: 700; line-height: 1; color: var(--navy-900); }
.podio-goles small { font-family: var(--font); font-size: .65rem; font-weight: 600; color: var(--muted); }
.podio-equipo { border: 0; background: none; padding: 0; font-size: .7rem; color: var(--text-2); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio-equipo:hover { color: var(--pitch-dk); text-decoration: underline; }
.podio-escalon { width: 100%; border-radius: 10px 10px 0 0; display: grid; place-items: center; color: #fff; font-family: var(--font-disp); font-size: 1.5rem; font-weight: 700; }
.podio-escalon.e1 { height: 78px; background: linear-gradient(180deg, #F4B400, #C98F00); }
.podio-escalon.e2 { height: 56px; background: linear-gradient(180deg, #B8C2CF, #8592A3); }
.podio-escalon.e3 { height: 42px; background: linear-gradient(180deg, #D9905A, #A8622E); }
.podio-pub .vacio .podio-escalon { opacity: .25; }
.goleadores-lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.goleadores-lista li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.goleadores-lista li + li { border-top: 1px solid var(--line); }
.gl-pos { width: 22px; font-weight: 800; color: var(--muted); text-align: center; }
.gl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gl-info b { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-info button { align-self: flex-start; border: 0; background: none; padding: 0; font-size: .72rem; color: var(--muted); cursor: pointer; }
.gl-info button:hover { color: var(--pitch-dk); text-decoration: underline; }
.gl-goles { font-family: var(--font-disp); font-size: 1.25rem; font-weight: 700; color: var(--navy-900); min-width: 28px; text-align: right; }
/* =========================================================
   Pantallas más grandes
   ========================================================= */
@media (min-width: 560px) {
    .standings .t-x { display: table-cell; }
    .hero h1 { font-size: 2.6rem; }
    .kpi b { font-size: 1.9rem; }
}
@media (min-width: 768px) {
    body { font-size: 16px; }
    .hero { padding: 36px 0 76px; }
    .hero h1 { font-size: 3rem; }
    .tab { font-size: .92rem; }
    .t-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .t-grid .t-card + .t-card { margin-top: 0; }
    .hoy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hoy-grid .match-card + .match-card { margin-top: 0; }
    .sheet { margin: auto; border-radius: 20px; }
    .sheet-grip { display: none; }
    .match .side { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Aviso destacado: los cruces de la fase final son una proyección */
.aviso-proyeccion { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--gold-soft); border: 1px solid #E7C65A; border-left: 5px solid var(--gold); color: #5C4300; }
.aviso-proyeccion > i { font-size: 1.6rem; color: #B98600; flex-shrink: 0; margin-top: 1px; }
.aviso-proyeccion b { display: block; font-size: .95rem; line-height: 1.3; color: #4A3600; }
.aviso-proyeccion p { margin: 4px 0 0; font-size: .82rem; line-height: 1.45; color: #6B5200; }
.aviso-proyeccion strong { color: #4A3600; }

/* Aviso destacado: equipos eliminados en la proyección */
.aviso-eliminados { margin: 14px 0 6px; padding: 12px 14px; border-radius: 12px; background: #FEF2F2; border: 1px solid #FECACA; border-left: 5px solid var(--zone-out, #DC2626); }
.aviso-eliminados-head { display: flex; gap: 12px; align-items: flex-start; }
.aviso-eliminados-head > i { font-size: 1.6rem; color: #DC2626; flex-shrink: 0; margin-top: 1px; }
.aviso-eliminados-head b { display: block; font-size: .95rem; line-height: 1.3; color: #7F1D1D; }
.aviso-eliminados-head p { margin: 4px 0 0; font-size: .82rem; line-height: 1.45; color: #991B1B; }
.eliminados-lista { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-left: 38px; }
.eliminado-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 99px; background: #fff; border: 1px solid #FECACA; font-size: .8rem; font-weight: 600; color: #7F1D1D; }
.eliminado-chip em { font-style: normal; font-weight: 800; font-size: .72rem; color: #B91C1C; min-width: 22px; text-align: center; }
.eliminado-chip .crest { width: 20px; height: 20px; border-radius: 6px; font-size: .5rem; }
@media (max-width: 420px) { .eliminados-lista { padding-left: 0; } }
